Skip to content

Instantly share code, notes, and snippets.

@dickolsson
Last active May 28, 2025 20:56
Show Gist options
  • Save dickolsson/e652b3d0e7bee55aa0a582d8a03900bf to your computer and use it in GitHub Desktop.
Save dickolsson/e652b3d0e7bee55aa0a582d8a03900bf to your computer and use it in GitHub Desktop.
Example genesis.json for an Ethereum blockchain
{
"config": {
"chainId": 33,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000033",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x8000000",
"difficulty": "0x100",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc": {}
}
@alfaqi
Copy link

alfaqi commented Jul 16, 2022

Thanks for sharing

@techHiveMinds
Copy link

how to download this file?

It is Possible to Copy and Paste the Code in a File Named genesis-block.json and then Place it in the Folder where you will Initialise, Probably Geth, to Start

@aney9
Copy link

aney9 commented Apr 17, 2024

пасыба брат

@Diasauezov
Copy link

Gitbashhere

@AliAlkhtri
Copy link

json

def extract_genesis_data(filepath):
with open(filepath, 'r') as file:
data = json.load(file)

# استخراج التوكنات
tokens = data.get("app_state", {}).get("tokens", [])
print("🪙 Tokens:")
for token in tokens:
    print(f"- Name: {token['name']}")
    print(f"  Symbol: {token['symbol']}")
    print(f"  Total Supply: {token['total_supply']}")
    print(f"  Owner: {token['owner']}")
    print(f"  Mintable: {token['mintable']}")
    print()

# استخراج العناوين
accounts = data.get("app_state", {}).get("accounts", [])
print("🧾 Addresses:")
for acc in accounts:
    name = acc.get("name", "N/A")
    addr = acc.get("address")
    is_validator = "✅" if acc.get("consensus_addr") else "❌"
    print(f"- Name: {name}, Address: {addr}, Validator: {is_validator}")

@AliAlkhtri
Copy link

: Binance Chain Native Token
Symbol : BNB
Total Supply (smallest unit) : 20000000000000000
Owner Address : bnb1ultyhpw2p2ktvr68swz56570lgj2rdsadq3ym2
Mintable : False

@AliAlkhtri
Copy link

json

def extract_genesis_data(filepath):
with open(filepath, 'r') as file:
data = json.load(file)

# استخراج التوكنات
tokens = data.get("app_state", {}).get("tokens", [])
print("🪙 Tokens:")
for token in tokens:
    print(f"- Name: {token['name']}")
    print(f"  Symbol: {token['symbol']}")
    print(f"  Total Supply: {token['total_supply']}")
    print(f"  Owner: {token['owner']}")
    print(f"  Mintable: {token['mintable']}")
    print()

# استخراج العناوين
accounts = data.get("app_state", {}).get("accounts", [])
print("🧾 Addresses:")
for acc in accounts:
    name = acc.get("name", "N/A")
    addr = acc.get("address")
    is_validator = "✅" if acc.get("consensus_addr") else "❌"
    print(f"- Name: {name}, Address: {addr}, Validator: {is_validator}")

📂 استخدم هذا السطر لتشغيل البرنامج على ملف معين:

extract_genesis_data("genesis.json")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment