Accounts & Transactions
Accounts and transactions form the foundation of activity on Celestium. They govern how users interact with the network, deploy smart contracts, and transfer value.
1. Accounts in Celestium
Celestium follows the Ethereum account model, meaning it supports two types of accounts:
Externally-Owned Accounts (EOAs)
Controlled by private keys.
Used by users to initiate transactions.
Can send and receive tokens.
Contract Accounts
Controlled by smart contract code.
Cannot initiate transactions independently.
Execute logic when triggered by an EOA or another contract.
Address Format
20-byte hexadecimal addresses.
Derived from the public key using ECDSA (Elliptic Curve Digital Signature Algorithm).
Example:
0x742d35Cc6634C0532925a3b844Bc454e4438f44e
Account State
Each account has the following state properties:
nonce
Number of transactions sent (EOAs) or created (contracts).
balance
Amount of native tokens (CLT) held by the account.
codeHash
Hash of the smart contract code (empty for EOAs).
storageRoot
Merkle Patricia Trie root hash representing contract storage.
2. Transactions in Celestium
Transactions are signed messages that trigger state changes on the Celestium blockchain. They are compatible with Ethereum's transaction structure and comply with EIP-2718 and EIP-2930.
Transaction Fields
nonce
Sequential number to prevent replay attacks.
gasPrice
/ maxFeePerGas
Amount the sender is willing to pay per gas unit.
gasLimit
Maximum gas units the transaction can consume.
to
Recipient address (or empty for contract creation).
value
Amount of CLT tokens to transfer.
data
Input data (e.g., smart contract call).
v, r, s
ECDSA signature fields.
Transaction Types
Legacy Transactions
Pre-EIP-1559 transactions using gasPrice
.
EIP-1559 Transactions
Use maxFeePerGas
and maxPriorityFeePerGas
fields.
EIP-2930 Transactions
Include access lists to optimize gas usage.
Gas and Fees
Gas represents computational effort.
Each opcode has a gas cost.
Transaction fee is calculated as:
Signed Transactions
Transactions must be signed using the sender's private key. This generates the v, r, s
fields in the transaction.
Example: Signing and Sending a Transaction (Web3.js)
3. Native Token (CLT)
The native token on Celestium is CLT.
Used to pay for transaction fees (gas).
Can be transferred between accounts.
4. Wrapped CLT (WCLT)
ERC-20 compliant representation of CLT.
Used in smart contracts requiring ERC-20 compatibility.
5. Nonce Management
Nonces ensure that each transaction is processed in order and prevents double-spending. Transactions with duplicate or out-of-order nonces will fail or be delayed.
Best Practices:
Always retrieve the current nonce before sending a transaction:
6. Access Lists (Optional)
Introduced in EIP-2930, access lists reduce gas costs by pre-declaring state slots and accounts a transaction will access.
Access List Example:
7. Summary
EOAs are user-controlled; Contract Accounts are code-controlled.
Transactions modify state and transfer value.
Gas is a unit of computational cost, paid in CLT.
Access lists and EIP-1559 transactions improve gas efficiency.
Celestium’s Ethereum compatibility allows developers to leverage familiar tooling, making the transition seamless for existing blockchain developers.
Last updated