```python import hashlib import time class Block: def __init__(self, index, previous_hash, timestamp, data, hash): self.index = index self.previous_hash = previous_hash self.timestamp = timestamp self.data = data self.hash = hash class Blockchain: def __init__(self): self.chain = [self.create_genesis_block()] def create_genesis_block(self): return Block(0, "0", int(time.time()), "Genesis Block", self.calculate_hash(0, "0", int(time.time()), "Genesis Block")) def get_latest_block(self): return self.chain[-1] def add_block(self, new_block): new_block.hash = self.calculate_hash(new_block.index, new_block.previous_hash, new_block.timestamp, new_block.data) self.chain.append(new_block) def calculate_hash(self, index, previous_hash, timestamp, data): value = str(index) + previous_hash + str(timestamp) + data return hashlib.sha256(value.encode()).hexdigest() def create_new_block(self, data): latest_block = self.get_latest_block() new_block_index = latest_block.index + 1 new_block_timestamp = int(time.time()) new_block = Block(new_block_index, latest_block.hash, new_block_timestamp, data, "") self.add_block(new_block) # Example usage degocoin_blockchain = Blockchain() degocoin_blockchain.create_new_block("First Block Data") degocoin_blockchain.create_new_block("Second Block Data") for block in degocoin_blockchain.chain: print(f"Block {block.index} has been added to the blockchain!") print(f"Hash: {block.hash}") print(f"Previous Hash: {block.previous_hash}") print(f"Data: {block.data}") print("-" * 20) ```

Retiré
0.0000
Détenteurs:
1
Déjà déployé
-
Pas encore libéré:
-
Ordres actifs
-
crée le:
07 Jan 2025
Ordres actifs
-
Période de libération:
- année(s)
Paiement horaire:
-
Déjà déployé
-
Détenteurs:
1
10 000 000.0000
Retiré
0.0000
Vendu sur le marché:
0.0000
Pas encore libéré:
-
Volume d'achat direct:
0
Dernières nouvelles
Le créateur du jeton n'a ajouté aucun post pour l'instant.
Principaux détenteurs
Trader Montant
Bounty campaigns
Token shop