Skip to content

Latest commit

 

History

History
82 lines (69 loc) · 3.24 KB

chain-id.md

File metadata and controls

82 lines (69 loc) · 3.24 KB
meta canonicalUrl
name content
title
Cronos | Crypto.org EVM Chain | Chain ID and Address Format
name content
description
Find out more about Bech32 address, BIP-0173 address prefix and Chain ID format in this documentation.
name content
og:title
Cronos | Crypto.org EVM Chain | Chain ID and Address Format
name content
og:type
Website
name content
og:description
Find out more about Bech32 address, BIP-0173 address prefix and Chain ID format in this documentation.
name content
og:image
name content
twitter:title
Cronos | Crypto.org EVM Chain | Chain ID and Address Format
name content
twitter:site
@cryptocom
name content
twitter:card
summary_large_image
name content
twitter:description
Find out more about Bech32 address, BIP-0173 address prefix and Chain ID format in this documentation.
name content
twitter:image

Chain ID and Address Format

Chain ID

Cronos has different Chain IDs to distinguish between the devnet, testnet and mainnet. When running Cronos in your local environment, you will need to decide your own Chain ID.

For example, our testnet Chain ID is cronostestnet_338-1.

Address prefix

BIP-0173 defines a new format for segregated witness output addresses that contains a human-readable part which identifies the coin type. Cronos has different address prefixes for its corresponding network types, these prefixes are:

Testnet
tcrc

Cronos uses the Bech32 address format wherever users must handle binary data. Bech32 encoding provides robust integrity checks on data and the human readable part (HRP) that provides contextual hints that can assist UI developers with providing informative error messages. Specifically, we have the following HRP prefixes for different address types in the mainnet:

Address bech32 Prefix
Account tcrc
Validator Operator tcrcvaloper
Consensus Nodes tcrcvalcons

We can use the keys show command of cronosd with the flag --bech <type> (acc|val|cons) to obtain the addresses and keys as mentioned above.
For example:

$ cronosd keys show mykey --bech acc
- name: mykey
  type: local
  address: tcrc1qsklxwt77qrxur494uvw07zjynu03dq9alwh37
  pubkey: '{"@type":"/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey","key":"A8nbJ3eW9oAb2RNZoS8L71jFMfjk6zVa1UISYgKK9HPm"}'
  mnemonic: ""

$ cronosd keys show test --bech val
- name: mykey
  type: local
  address: tcrcvaloper1qsklxwt77qrxur494uvw07zjynu03dq9rdsrlq
  pubkey: '{"@type":"/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey","key":"A8nbJ3eW9oAb2RNZoS8L71jFMfjk6zVa1UISYgKK9HPm"}'
  mnemonic: ""

$ cronosd keys show test --bech cons
- name: mykey
  type: local
  address: tcrcvalcons1qsklxwt77qrxur494uvw07zjynu03dq9h7rlnp
  pubkey: '{"@type":"/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey","key":"A8nbJ3eW9oAb2RNZoS8L71jFMfjk6zVa1UISYgKK9HPm"}'
  mnemonic: ""