All Projects → binance-chain → bsc-genesis-contract

binance-chain / bsc-genesis-contract

Licence: other
The genesis contracts of BNB Smart Chain.

Programming Languages

solidity
1140 projects
javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to bsc-genesis-contract

PancakeTokenSniper
BSC BNB Pancake token sniper, buy, take profit and rug check
Stars: ✭ 184 (-42.68%)
Mutual labels:  bsc, bnb
farm-army-backend
Track your farming and pool performance on the Binance Smart Chain, Polygon, Fantom, KuCoin Community Chain, Harmony, Celo - https://farm.army - nodejs backend
Stars: ✭ 86 (-73.21%)
Mutual labels:  smart-contracts, bsc
PancakeSwapBot
PancakeSwap prediction bot
Stars: ✭ 38 (-88.16%)
Mutual labels:  bsc, bnb
uniswap-arbitrage-flash-swap
Uniswap flash swap arbitrage solidity contracts
Stars: ✭ 341 (+6.23%)
Mutual labels:  smart-contracts, bsc
FWI
RTM
Stars: ✭ 30 (-90.65%)
Mutual labels:  bsc
flow-js-testing
Testing framework to enable Cadence testing via a set of JavaScript methods and tools
Stars: ✭ 44 (-86.29%)
Mutual labels:  smart-contracts
erc721
The reference implementation of the ERC-721 non-fungible token standard.
Stars: ✭ 989 (+208.1%)
Mutual labels:  smart-contracts
web3scala
Scala library for integration with Ethereum clients
Stars: ✭ 24 (-92.52%)
Mutual labels:  smart-contracts
ethereum-kit-ios
Comprehensive EVM SDK (ex: Ethereum, Binance Smart Chain) for iOS, implemented on Swift. Create wallets, watch wallets (read-only), sync transactions, filter transactions by type (erc20, bep20, swap transactions etc.), swap using native DEX protocols, easily extendable to work with custom smart contracts, and full support for EIP1159.
Stars: ✭ 148 (-53.89%)
Mutual labels:  bsc
PlasmaContract
More Viable Plasma (MoreVP) contract with Limbo Exits
Stars: ✭ 26 (-91.9%)
Mutual labels:  smart-contracts
solidity-utils
solidity utils to make your life easier
Stars: ✭ 16 (-95.02%)
Mutual labels:  smart-contracts
hardhat-contract-sizer
Output Ethereum contract sizes with Hardhat 📐
Stars: ✭ 55 (-82.87%)
Mutual labels:  smart-contracts
botdexdamar
🤖 multichain trading bot with sniper, frontrun, backrun, sandwich
Stars: ✭ 124 (-61.37%)
Mutual labels:  bsc
Meadow
Integrated Ethereum implementation and tool suite focused on Solidity testing and development.
Stars: ✭ 126 (-60.75%)
Mutual labels:  smart-contracts
ERC884-reference-implementation
An Interface and Reference Implementation of the ERC-884 DGCL Token.
Stars: ✭ 42 (-86.92%)
Mutual labels:  smart-contracts
erc20-balance
💎 Get 2000+ ERC-20 token balances with JavaScript. Supports Node.js and Deno
Stars: ✭ 18 (-94.39%)
Mutual labels:  smart-contracts
typescript-eth-starter
🔌 Ethereum Dapp Basic Typescript Starter
Stars: ✭ 125 (-61.06%)
Mutual labels:  smart-contracts
JeChain
Node for JeChain - an experimental smart contract blockchain network
Stars: ✭ 177 (-44.86%)
Mutual labels:  smart-contracts
nba-smart-contracts
Smart contracts and transactions for Topshot, the official NBA digital collectibles game on the Flow Blockchain
Stars: ✭ 316 (-1.56%)
Mutual labels:  smart-contracts
contracts
Alice smart contracts
Stars: ✭ 57 (-82.24%)
Mutual labels:  smart-contracts

bsc-genesis-contracts

This repo hold all the genesis contracts on Binance Smart chain. More details in doc-site.

Prepare

Install dependency:

npm install

Node: v12.18.3 Truffle: Truffle v5.1.31 Solc: 0.6.4+commit.1dca32f3.Darwin.appleclang Ganache-cli: v6.10.1

unit test

Generate contracts for testing:

# the first account of ganache
node generate-system.js --mock true
node generate-systemReward.js --mock true
node generate-validatorset.js --mock true
node generate-system.js --mock true
node generate-slash.js --mock true
node generate-crosschain.js --mock true
node generate-tokenhub.js --mock true
node generate-tendermintlightclient.js --mock true
node generate-relayerincentivizecontract.js --roundSize 30 --maximumWeight 3 --mock true

Start ganache:

ganache-cli --mnemonic 'clock radar mass judge dismiss just intact mind resemble fringe diary casino' --gasLimit 100000000  -e 10000 --allowUnlimitedContractSize

Run truffle test:

truffle compile
truffle migrate
truffle test

Run hardhat test:

npx hardhat compile
npx hardhat test

Flatten all system contracts:

npm run flatten

how to generate genesis file.

  1. Edit init_holders.js file to alloc the initial BNB holder.
  2. Edit validators.js file to alloc the initial validator set.
  3. Edit generate-validatorset.js file to change fromChainId and toChainId,
  4. Edit generate-tokenhub.js file to change refundRelayReward, minimumRelayFee and maxGasForCallingBEP20.
  5. Edit generate-tendermintlightclient.js file to change chainID and initConsensusStateBytes.
  6. run node generate-genesis.js will generate genesis.json

License

The library is licensed under the Apache License, Version 2.0, also included in our repository in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].