⏰Cronos EVM: Differences from Ethereum
Overview
1. Batch Transactions
Key Characteristics of Cronos Batching
Implementation Example (Integration Pattern)
def build_batch_tx(w3, cli, txs, key):
signed_txs = [sign_transaction(w3, tx, key) for tx in txs]
# Convert signed Eth txs to Cosmos-compatible EVM messages
tmp_txs = [cli.build_evm_tx(Web3.to_hex(s.raw_transaction)) for s in signed_txs]
msgs = [tx["body"]["messages"][0] for tx in tmp_txs]
# Aggregate fees and gas
total_fee = sum(int(tx["auth_info"]["fee"]["amount"][0]["amount"]) for tx in tmp_txs)
total_gas = sum(int(tx["auth_info"]["fee"]["gas_limit"]) for tx in tmp_txs)
return {
"body": { "messages": msgs, ... },
"auth_info": { "fee": { "amount": [{"denom": "basetcro", "amount": str(total_fee)}], "gas_limit": str(total_gas) }, ... }
}2. Transaction Hash Uniqueness
Impact on Indexers and RPCs
Behavior Across Current Cronos Versions
Endpoint
Pre-fix (v1.7.0 / v1.7.4)
Post-fix (v1.7.1 / v1.7.5)
Last updated
Was this helpful?