{"id":17846272,"url":"https://github.com/yuriko627/poseidon-sol","last_synced_at":"2026-02-02T11:37:33.711Z","repository":{"id":144022039,"uuid":"600925362","full_name":"yuriko627/poseidon-sol","owner":"yuriko627","description":"Poseidon Hash Function implementation in Solidity","archived":false,"fork":false,"pushed_at":"2023-09-27T23:16:51.000Z","size":2059,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T17:05:18.645Z","etag":null,"topics":["hashfunction","solidity","zkp"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuriko627.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2023-02-13T01:26:05.000Z","updated_at":"2025-06-19T08:21:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"0659f9e9-ebf9-4515-8ad3-e01dc00b667f","html_url":"https://github.com/yuriko627/poseidon-sol","commit_stats":{"total_commits":60,"total_committers":1,"mean_commits":60.0,"dds":0.0,"last_synced_commit":"68c34beb5cf7a991ab057496be7d1ee0d8ece97b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yuriko627/poseidon-sol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriko627%2Fposeidon-sol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriko627%2Fposeidon-sol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriko627%2Fposeidon-sol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriko627%2Fposeidon-sol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuriko627","download_url":"https://codeload.github.com/yuriko627/poseidon-sol/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuriko627%2Fposeidon-sol/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261528671,"owners_count":23172753,"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":["hashfunction","solidity","zkp"],"created_at":"2024-10-27T21:39:30.160Z","updated_at":"2026-02-02T11:37:33.665Z","avatar_url":"https://github.com/yuriko627.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# poseidon-sol\n\n## Overview\n\nPoseidon Hash Function implementation in Solidity\n\n![](https://img.shields.io/hexpm/l/plug?color=green)\n![GitHub issues](https://img.shields.io/github/issues/yuriko627/poseidon-sol)\n[![Build Status](https://github.com/yuriko627/poseidon-sol/workflows/Build%20Status/badge.svg?branch=main)](https://github.com/yuriko627/poseidon-sol/actions?query=workflow%3A%22Build+Status%2)\n[![codecov](https://codecov.io/gh/yuriko627/poseidon-sol/branch/main/graph/badge.svg)](https://codecov.io/gh/yuriko627/poseidon-sol)\n[![npm](https://img.shields.io/npm/v/poseidon-sol)](https://www.npmjs.com/package/poseidon-sol)\n[![Documentation Status](https://readthedocs.org/projects/poseidon-sol/badge/?version=latest)](https://poseidon-sol.readthedocs.io/en/latest/?badge=latest)\n      \n\n## Description\n\nCurrently, the most widely-used Poseidon hash function for EVM is implemented in JS, and it is performant but it could be more unreadable. Also, if you write a smart contract in Solidity, it has to link the bytecode or call an external contract address for hash functions, which is inconvenient.\n\nIn the future, Poseidon hash might be implemented as a precompile contract in the Ethereum protocol (https://eips.ethereum.org/EIPS/eip-5988), so that people can call it with cheap gas. However, I think it would still be valuable to have a Poseidon Solidity implementation as a baseline for the performance benchmark.\n\n## Installation\nmake sure that your noder version is \u003e= 16.\n`npm install poseidon-sol`\n\n## Usage\nput the 2 elements that you want to hash into the array:\n`poseidon.hash([0, 0])`\n\n## Contribution\nmake sure to run the test and lint before making a PR.\n\n### How to run a test\n1. `npm install`\n2. `npx hardhat test`\n\nyou can see the test coverage by the following command:\n`npx hardhat coverage`\n\n### How to lint\n1. `npm install`\n2. `npx solhint contracts/Poseidon.sol`\n\n### Other commands\n- `npx hardhat compile`: compile the contract\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuriko627%2Fposeidon-sol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuriko627%2Fposeidon-sol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuriko627%2Fposeidon-sol/lists"}