{"id":19961728,"url":"https://github.com/doiim/p2pix-smart-contracts","last_synced_at":"2025-05-03T22:31:04.454Z","repository":{"id":63688916,"uuid":"556872852","full_name":"doiim/p2pix-smart-contracts","owner":"doiim","description":"Repository for P2Pix EVM contracts to be imported by the project.","archived":false,"fork":false,"pushed_at":"2023-06-09T03:34:43.000Z","size":2352,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-10T09:20:22.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doiim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-24T17:17:08.000Z","updated_at":"2024-04-10T09:20:22.301Z","dependencies_parsed_at":"2023-02-16T14:15:48.201Z","dependency_job_id":null,"html_url":"https://github.com/doiim/p2pix-smart-contracts","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doiim%2Fp2pix-smart-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doiim%2Fp2pix-smart-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doiim%2Fp2pix-smart-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doiim%2Fp2pix-smart-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doiim","download_url":"https://codeload.github.com/doiim/p2pix-smart-contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224374736,"owners_count":17300691,"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":"2024-11-13T02:08:18.227Z","updated_at":"2024-11-13T02:08:18.796Z","avatar_url":"https://github.com/doiim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# p2pix-smart-contracts\n\n**Repository for P2Pix EVM contracts to be imported by the project.**\n\n## SM Dependency Tree\n\n```rs\n./contracts/\n├── DataTypes.sol\n├── EventAndErrors.sol\n├── lib\n│   ├── auth\n│   │   └── Owned.sol\n│   ├── interfaces\n│   │   └── IReputation.sol\n│   ├── mock\n│   │   └── mockToken.sol\n│   ├── tokens\n│   │   └── ERC20.sol\n│   └── utils\n│       ├── MerkleProofLib.sol\n│       ├── ReentrancyGuard.sol\n│       └── SafeTransferLib.sol\n├── p2pix.sol\n└── Reputation.sol\n```\n\n## Callgraph\n\n![Callgraph](docs/callgraph.svg)\n\n## Current Deployment addresses\n\n### V1\n\n| Testnet | Token Address                              | P2pix Address                              |\n| ------- | ------------------------------------------ | ------------------------------------------ |\n| Goerli  | 0x294003F602c321627152c6b7DED3EAb5bEa853Ee | 0x5f3EFA9A90532914545CEf527C530658af87e196 |\n| Mumbai  | 0x294003F602c321627152c6b7DED3EAb5bEa853Ee | 0x5f3EFA9A90532914545CEf527C530658af87e196 |\n\n\u003c!-- All contracts deployed by 0x8dC06F985C131166570825F52447E8c88d64aE20 --\u003e\n\n\u003c!-- https://goerli.etherscan.io/address/0x294003F602c321627152c6b7DED3EAb5bEa853Ee#code --\u003e\n\n\u003c!-- https://goerli.etherscan.io/address/0x5f3EFA9A90532914545CEf527C530658af87e196#code --\u003e\n\n\u003c!-- https://mumbai.polygonscan.com/address/0x294003F602c321627152c6b7DED3EAb5bEa853Ee#code --\u003e\n\n\u003c!-- https://mumbai.polygonscan.com/address/0x5f3EFA9A90532914545CEf527C530658af87e196#code --\u003e\n\n### V2\n\n| Testnet | Token Address                              | P2pix Address                              | Reputation Address                         | Multicall Address                          |\n| ------- | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |\n| Goerli  | 0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00 | 0x2414817FF64A114d91eCFA16a834d3fCf69103d4 | 0x2CFD9354Ec7614fEf036EFd6A730dA1d5fC2762A | 0x8FE009992d96A86c7f0Bccdaf1eC3471E302a8a6 |\n| Mumbai  | 0xC86042E9F2977C62Da8c9dDF7F9c40fde4796A29 | 0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00 | 0x570445E3eF413bCDb5De79ed27B1c3840683e385 | 0x718B2C4DE4F9654E1349F610ff561249bfe1c418 |\n\n\u003c!-- All contracts deployed by 0x8dC06F985C131166570825F52447E8c88d64aE20 --\u003e\n\u003c!-- https://goerli.etherscan.io/address/0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00#code --\u003e\n\u003c!-- https://goerli.etherscan.io/address/0x2414817FF64A114d91eCFA16a834d3fCf69103d4#code --\u003e\n\u003c!-- https://goerli.etherscan.io/address/0x2CFD9354Ec7614fEf036EFd6A730dA1d5fC2762A#code --\u003e\n\u003c!-- https://goerli.etherscan.io/address/0x8FE009992d96A86c7f0Bccdaf1eC3471E302a8a6#code --\u003e\n\n\u003c!-- https://mumbai.polygonscan.com/address/0xC86042E9F2977C62Da8c9dDF7F9c40fde4796A29#code --\u003e\n\u003c!-- https://mumbai.polygonscan.com/address/0x4A2886EAEc931e04297ed336Cc55c4eb7C75BA00#code --\u003e\n\u003c!-- https://mumbai.polygonscan.com/address/0x570445e3ef413bcdb5de79ed27b1c3840683e385#code --\u003e\n\u003c!-- https://mumbai.polygonscan.com/address/0x718B2C4DE4F9654E1349F610ff561249bfe1c418#code --\u003e\n\n## Usage\n\n### Pre Requisites\n\nBefore installing, create a `.env` file and set a BIP-39 compatible mnemonic and other env criteria as in `.env.example`.\n\n### Install\n\n```sh\n$ yarn install\n```\n\n### Compile\n\n```sh\n$ yarn compile\n```\n\n**_NOTE:_** TypeChain artifacts generated at compile time.\n\n### Test\n\n```sh\n$ yarn test\n```\n\n### Report Gas\n\n```sh\n$ REPORT_GAS=true yarn test\n```\n\n**_NOTE_:** Gas usage per unit test and average gas per method call.\n\n### Clean\n\nDelete the smart contract artifacts and cache:\n\n```sh\n$ yarn clean\n```\n\n## Importing artifacts\n\nTo import artifacts on the project use the following:\n\n```ts\nimport P2PIXArtifact from \"p2pix-smart-contracts/artifacts/contracts/p2pix.sol/P2PIX.json\";\n```\n\nTo grab deployment addresses you can just grab from deploys folder:\n\n```ts\nimport localhostDeploys from \"p2pix-smart-contracts/deploys/localhost.json\";\n```\n\n## Deploying to local environment\n\nOn the first teminal, use the following command and import some wallets to your Metamask, then connect to the network pointed:\n\n```sh\nyarn hardhat node\n```\n\nOn the second teminal, run the following commands:\n\n```sh\nyarn deploy1:localhost\nyarn deploy2:localhost\n```\n\n**_NOTE_:** The second script transfers 2M tokens to the first wallet of the node.\nTo use the P2Pix smart contract first transfer some of the tokens to other wallets.\n\n## Deploying to testnets\n\nDeploy to Ethereum's Goerli testnet:\n\n```sh\nyarn deploy1:goerli\nyarn deploy2:goerli\n```\n\nDeploy to Polygon's Mumbai testnet:\n\n```sh\nyarn deploy1:mumbai\nyarn deploy2:mumbai\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoiim%2Fp2pix-smart-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoiim%2Fp2pix-smart-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoiim%2Fp2pix-smart-contracts/lists"}