{"id":29040702,"url":"https://github.com/pushchain/push-node-smart-contracts","last_synced_at":"2025-06-26T14:36:39.949Z","repository":{"id":267928921,"uuid":"829872303","full_name":"pushchain/push-node-smart-contracts","owner":"pushchain","description":"Core contracts powering Push Chain's PoS network   Includes contracts for validator operations, node lifecycle management, and sharded storage mechanisms.","archived":false,"fork":false,"pushed_at":"2024-12-13T09:18:05.000Z","size":119,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-23T13:54:04.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/pushchain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2024-07-17T06:57:21.000Z","updated_at":"2024-12-13T09:18:10.000Z","dependencies_parsed_at":"2024-12-13T20:43:16.848Z","dependency_job_id":null,"html_url":"https://github.com/pushchain/push-node-smart-contracts","commit_stats":null,"previous_names":["push-protocol/push-node-smart-contracts","pushchain/push-node-smart-contracts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pushchain/push-node-smart-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-node-smart-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-node-smart-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-node-smart-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-node-smart-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pushchain","download_url":"https://codeload.github.com/pushchain/push-node-smart-contracts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-node-smart-contracts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262085900,"owners_count":23256540,"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-06-26T14:36:36.098Z","updated_at":"2025-06-26T14:36:39.907Z","avatar_url":"https://github.com/pushchain.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003ca href=\"https://push.org/#gh-light-mode-only\"\u003e\n    \u003cimg width='20%' height='10%' src=\"https://res.cloudinary.com/drdjegqln/image/upload/v1686227557/Push-Logo-Standard-Dark_xap7z5.png\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://push.org/#gh-dark-mode-only\"\u003e\n    \u003cimg width='20%' height='10%' src=\"https://res.cloudinary.com/drdjegqln/image/upload/v1686227558/Push-Logo-Standard-White_dlvapc.png\"\u003e\n    \u003c/a\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ci align=\"center\"\u003ePush protocol is evolving to Push Chain, a shared-state L1 designed to deliver universal app experiences (Any Chain. Any User. Any App).🚀\u003c/i\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003e\n\n  \u003ca href=\"https://discord.com/invite/pushprotocol\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/discord-7289da.svg?style=flat-square\" alt=\"discord\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/pushprotocol\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/twitter-18a1d6.svg?style=flat-square\" alt=\"twitter\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.youtube.com/@pushprotocol\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/youtube-d95652.svg?style=flat-square\u0026\" alt=\"youtube\"\u003e\n  \u003c/a\u003e\n\u003c/h4\u003e\n\n# Push Node Smart Contracts\n\n## Getting Started\n\n### Installation\n\n1. Clone the push-node-smart-contracts repository:\n\n```sh\ngit clone https://github.com/ethereum-push-notification-service/push-node-smart-contracts\n```\n\n2. Change to the project directory:\n\n```sh\ncd push-node-smart-contracts\n```\n\n3. Install the dependencies:\n\n```sh\nnpm install\n```\n\n---\n\n### Running EVM\n\n#### Option1: Sepolia\n\nUse Sepolia\nEdit .env: SEPOLIA_RPC_URL, SEPOLIA_PRIVATE_KEY, SEPOLIA_ETHERSCAN_API_KEY , SEPOLIA_PUSH_TOKEN_ADDRESS\n\n#### Option2: Dockerized pre-configured hardhat for 5 nodes\n\nYou will get a docker image with HardHat\nwith deployed contracts: PushToken(mock), Validator.sol, Storage.sol\nwith deployed nodes: v1,v2,v3,s1,s2\n\ncalls `deploy.sh -n localhost -f deployAllLocalhost` internally\n\n```bash\ndocker build . -t hardhat\ndocker run -it -d -p 8545:8545 --name hardhat hardhat\ndocker logs --follow hardhat\n# TO REMOVE:\ndocker rm -f hardhat\n```\n\n#### Option3: Hardhat VM\n\nRun an empty local hardhat EVM as a DEDICATED SEPARATE PROCESS\n\n```shell\nexport PRIVATE_KEY=[YOUR KEY]\nnpx hardhat node\n```\n\n### Deployment Instructions\n\n#### Deploy on local Hardhat network\n\n- all contracts (no properties needed)\n\n```bash\nbash sh/deploy.sh -n localhost -f deployAll\n```\n\n- all contracts except the Push Token\n  edit XXXXXX_PUSH_TOKEN_ADDRESS variable in .env\n\n```bash\nbash sh/deploy.sh -n localhost -f deployAllNoToken\n```\n\n#### Deploy on Sepolia\n\nsame as for local; use `-n sepolia`\n\n#### Old manual deploy script\n\n```bash\nexport PUSH_CT=# PUT TOKEN HERE\nnpx hardhat --network sepolia v:deployValidatorCt $PUSH_CT\nexport VAL_CT= # PUT PROXY HERE\nnpx hardhat verify --network sepolia $VAL_CT\n\nnpx hardhat --network sepolia v:deployStorageCt $VAL_CT\nexport STORAGE_CT= # PUT PROXY HERE\nnpx hardhat verify --network sepolia $STORAGE_CT\n```\n\n### Registering nodes (sepolia example)\n\nedit .env\nSEPOLIA_RPC_URL\nSEPOLIA_PRIVATE_KEY\n\ndeclare env vars in the shell\n\n```shell\nexport PUSH_CT=# PUT TOKEN HERE\nexport VAL_CT= # PUT PROXY HERE\nexport STORAGE_CT= # PUT PROXY HERE\n```\n\n#### to get sepolia eth (if needed)\n\nhttps://www.alchemy.com/faucets/ethereum-sepolia\n\n#### to get push token (if needed)\n\ngo to https://sepolia.etherscan.io/token/0x37c779a1564DCc0e3914aB130e0e787d93e21804#writeContract\nconnect web3 wallet\nmint to get tokens (x18 zeroes)\n\n```shell\n#v1\nnpx hardhat --network sepolia v:registerValidator --validator-proxy-ct $VAL_CT --push-ct $PUSH_CT 8e12de12c35eabf35b56b04e53c4e468e46727e8 \"https://vv1.dev.push.org\" 101\n#v2\nnpx hardhat --network sepolia v:registerValidator --validator-proxy-ct $VAL_CT --push-ct $PUSH_CT fdaeaf7afcfbb4e4d16dc66bd2039fd6004cfce8 \"https://vv2.dev.push.org\" 102\n#v3\nnpx hardhat --network sepolia v:registerValidator --validator-proxy-ct $VAL_CT --push-ct $PUSH_CT 98f9d910aef9b3b9a45137af1ca7675ed90a5355 \"https://vv3.dev.push.org\" 103\n\n#s1\nnpx hardhat --network sepolia v:registerStorage --validator-proxy-ct $VAL_CT --push-ct $PUSH_CT 3563C89b05e4dcD0edEeE0F3e93e396C128C06E2 \"http://ss1.dev.push.org\" 250\n#s2\nnpx hardhat --network sepolia v:registerStorage --validator-proxy-ct $VAL_CT --push-ct $PUSH_CT b4d6fd1c0df9e3f427a1a8f8a8ec122396206ff7 \"http://ss2.dev.push.org\" 260\n```\n\n#### Info commands\n\n```shell\n# show balance in PUSH tokens for Validator contract\nnpx hardhat --network localhost push:balanceOf --push-ct $PUSH_CT $VAL_CT\n# show registered validator nodes\nnpx hardhat --network localhost v:listNodes --validator-proxy-ct $VAL_CT\n```\n\n---\n\n### Running Tests (uses embedded EVM, it resets for every test case)\n\n#### all tests\n\n```shell\nnpx hardhat test\n```\n\n#### Storage.sol tests\n\n```shell\n# for normal tests\nnpx hardhat test --grep StorageTestAutoRf\nnpx hardhat test --grep StorageTestNoAutoRf\n# for fuzzy tests (takes 5-15min)\nStorageTestBig=true npx hardhat test --grep StorageTestBig\n```\n\n## Licenses\n\nAll crates of this repository are licensed under either of\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushchain%2Fpush-node-smart-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpushchain%2Fpush-node-smart-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushchain%2Fpush-node-smart-contracts/lists"}