{"id":19121142,"url":"https://github.com/maticnetwork/genesis-contracts","last_synced_at":"2025-04-09T12:03:02.151Z","repository":{"id":44032693,"uuid":"209604702","full_name":"maticnetwork/genesis-contracts","owner":"maticnetwork","description":"Bor genesis contracts","archived":false,"fork":false,"pushed_at":"2025-03-13T09:39:06.000Z","size":940,"stargazers_count":49,"open_issues_count":14,"forks_count":37,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-02T10:36:05.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","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/maticnetwork.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":"2019-09-19T16:50:42.000Z","updated_at":"2025-03-13T09:38:49.000Z","dependencies_parsed_at":"2023-12-27T12:31:48.732Z","dependency_job_id":"ef613b8f-c20b-43f0-9ef6-0f3f571422e4","html_url":"https://github.com/maticnetwork/genesis-contracts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maticnetwork%2Fgenesis-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maticnetwork%2Fgenesis-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maticnetwork%2Fgenesis-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maticnetwork%2Fgenesis-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maticnetwork","download_url":"https://codeload.github.com/maticnetwork/genesis-contracts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036060,"owners_count":21037092,"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-09T05:16:13.922Z","updated_at":"2025-04-09T12:03:02.115Z","avatar_url":"https://github.com/maticnetwork.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# genesis-contracts\n\n\u003e NOTE (IMPORTANT!)\n\u003e If you modify contracts, run `forge build` before testing/deploying/etc, or Foundry may not recompile them!\n\n#### Setup genesis\n\nSetup genesis whenever contracts get changed\n### 1. Install dependencies and submodules\n```bash\nnpm install\ngit submodule init\ngit submodule update\n```\n\n### 2. Compile Matic contracts\n```bash\ncd matic-contracts\nnpm install\nnode scripts/process-templates.js --bor-chain-id \u003cbor-chain-id\u003e\nnpm run truffle:compile\ncd ..\n```\n\n### 3. Generate Bor validator set sol file\n\nFollowing command will generate `BorValidatorSet.sol` file from `BorValidatorSet.template` file.\n\n```bash\n# Generate bor validator set using stake and balance\n# Modify validators.json before as per your need\n$ node generate-borvalidatorset.js --bor-chain-id \u003cbor-chain-id\u003e --heimdall-chain-id \u003cheimdall-chain-id\u003e\n```\n\n### 4. Compile contracts\n```bash\n$ npm run truffle:compile\n```\n\n### 5. Configure Block times\n\nTo add custom block time and associated block no.s in genesis, edit the `blocks.js` file\n\n### 6. Generate genesis file\n\nFollowing command will generate `genesis.json` file from `genesis-template.json` file.\n\n```bash\n# Generate genesis file\nnode generate-genesis.js --bor-chain-id \u003cbor-chain-id\u003e --heimdall-chain-id \u003cheimdall-chain-id\u003e\n```\n\n### 7. Run Tests\n```bash\n$ npm run testrpc\n$ npm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaticnetwork%2Fgenesis-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaticnetwork%2Fgenesis-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaticnetwork%2Fgenesis-contracts/lists"}