{"id":28066685,"url":"https://github.com/marksantiago02/bsc-genesis-contract","last_synced_at":"2025-05-12T15:24:04.559Z","repository":{"id":211579675,"uuid":"720456476","full_name":"marksantiago02/bsc-genesis-contract","owner":"marksantiago02","description":"The genesis contracts for the Binance Smart Chain (BSC) network. The project aims to provide a comprehensive set of smart contracts that define the initial state and rules of the BSC blockchain.","archived":false,"fork":false,"pushed_at":"2023-11-18T14:57:34.000Z","size":2375,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"autogen","last_synced_at":"2025-05-12T15:23:54.611Z","etag":null,"topics":["bsc","javascript","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marksantiago02.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-11-18T14:45:59.000Z","updated_at":"2025-04-29T05:18:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"9cf06a33-a4b0-4343-88cc-019e91db0618","html_url":"https://github.com/marksantiago02/bsc-genesis-contract","commit_stats":null,"previous_names":["dodger213/bsc-genesis-contract","btc415/bsc-genesis-contract","marksantiago02/bsc-genesis-contract"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marksantiago02%2Fbsc-genesis-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marksantiago02%2Fbsc-genesis-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marksantiago02%2Fbsc-genesis-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marksantiago02%2Fbsc-genesis-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marksantiago02","download_url":"https://codeload.github.com/marksantiago02/bsc-genesis-contract/tar.gz/refs/heads/autogen","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253764120,"owners_count":21960517,"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":["bsc","javascript","solidity"],"created_at":"2025-05-12T15:24:02.769Z","updated_at":"2025-05-12T15:24:04.539Z","avatar_url":"https://github.com/marksantiago02.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bsc-genesis-contracts\n\nThis repo hold all the genesis contracts on Binance Smart chain. More details in [doc-site](https://github.com/binance-chain/docs-site/blob/add-bsc/docs/smart-chain/guides/concepts/system-contract.md).\n\n## Prepare\n\nInstall dependency:\n```shell script\nnpm install\n``` \n\n## unit test\n\nGenerate contracts for testing:\n```shell script\n# the first account of ganache\nnode generate-system.js --mock true\nnode generate-systemReward.js --mock true\nnode generate-validatorset.js --mock true\nnode generate-system.js --mock true\nnode generate-slash.js --mock true\nnode generate-crosschain.js --mock true\nnode generate-tokenhub.js --mock true\nnode generate-tendermintlightclient.js --mock true\nnode generate-relayerincentivizecontract.js --roundSize 30 --maximumWeight 3 --mock true\n```\n\nStart ganache:\n```shell script\nganache-cli --mnemonic 'clock radar mass judge dismiss just intact mind resemble fringe diary casino' --gasLimit 13000000  -e 10000\n```\n\nRun truffle test:\n```shell script\ntruffle compile\ntruffle migrate\ntruffle test\n```\n\nFlatten all system contracts:\n```shell script\nnpm run flatten\n```\n\n## how to generate genesis file.\n \n1. Edit `init_holders.js` file to alloc the initial BNB holder.\n2. Edit `validators.js` file to alloc the initial validator set.\n3. Edit `generate-validatorset.js` file to change `fromChainId` and `toChainId`,\n4. Edit `generate-tokenhub.js` file to change `refundRelayReward`, `minimumRelayFee` and `maxGasForCallingBEP20`.\n5. Edit `generate-tendermintlightclient.js` file to change `chainID` and `initConsensusStateBytes`.\n6. run ` node generate-genesis.js` will generate genesis.json\n\n## License\n\nThe library is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0),\nalso included in our repository in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarksantiago02%2Fbsc-genesis-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarksantiago02%2Fbsc-genesis-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarksantiago02%2Fbsc-genesis-contract/lists"}