Denominations
GHOST and aghost
| Unit | Symbol | Relation |
|---|---|---|
| GHOST | GHOST | 1 GHOST = 10^18 aghost |
| aghost | aghost | Base unit (like wei in Ethereum) |
This follows the same pattern as ETH/wei. All on-chain values and smart contract interactions use aghost (the base unit). Display values use GHOST.
Conversion examples
// JavaScript: convert GHOST to aghost
const ghostAmount = 1.5;
const aghostAmount = BigInt(ghostAmount * 1e18); // 1500000000000000000n
// ethers.js
import { parseEther, formatEther } from 'ethers';
const aghost = parseEther('1.5'); // 1500000000000000000n
const ghost = formatEther(aghost); // "1.5"
// viem
import { parseEther, formatEther } from 'viem';
const aghost = parseEther('1.5'); // 1500000000000000000n
# Foundry: convert using cast
cast to-wei 1.5 # 1500000000000000000
cast from-wei 1500000000000000000 # 1.5
In Cosmos SDK
When interacting via the Cosmos side (staking, governance), amounts use the aghost denomination:
# Send tokens via specterd
specterd tx bank send <from> <to> 1000000000000000000aghost
# Query balance
specterd query bank balance <address> aghost
In smart contracts
Solidity contracts always work with aghost (uint256):
// 1 GHOST = 1 ether in Solidity notation
uint256 oneGhost = 1 ether; // 1000000000000000000
// Sending GHOST
payable(recipient).transfer(1 ether);