Ghostmint ABI Reference
The complete ABI for the Ghostmint precompile at 0x0808.
Functions
mintNativeTo
Mints native GHOST tokens to a recipient address.
function mintNativeTo(address recipient, uint256 amount) external returns (bool success);
| Parameter | Type | Description |
|---|---|---|
recipient | address | Address to receive the minted tokens |
amount | uint256 | Amount in aghost (base units) |
| Returns | bool | true if successful |
burnNativeFrom
Burns native GHOST tokens. The tokens must be sent as msg.value.
function burnNativeFrom(address from, uint256 amount) external payable returns (bool success);
| Parameter | Type | Description |
|---|---|---|
from | address | Address the tokens are being burned from |
amount | uint256 | Amount in aghost (must match msg.value) |
| Returns | bool | true if successful |
totalMinted (view)
Returns the cumulative amount of GHOST minted through the precompile.
function totalMinted() external view returns (uint256 total);
totalBurned (view)
Returns the cumulative amount of GHOST burned through the precompile.
function totalBurned() external view returns (uint256 total);
Events
NativeMinted
event NativeMinted(address indexed recipient, uint256 amount);
NativeBurned
event NativeBurned(address indexed from, uint256 amount);
Full ABI JSON
[
{
"type": "function",
"name": "mintNativeTo",
"inputs": [
{"name": "recipient", "type": "address"},
{"name": "amount", "type": "uint256"}
],
"outputs": [{"name": "success", "type": "bool"}],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "burnNativeFrom",
"inputs": [
{"name": "from", "type": "address"},
{"name": "amount", "type": "uint256"}
],
"outputs": [{"name": "success", "type": "bool"}],
"stateMutability": "payable"
},
{
"type": "function",
"name": "totalMinted",
"inputs": [],
"outputs": [{"name": "total", "type": "uint256"}],
"stateMutability": "view"
},
{
"type": "function",
"name": "totalBurned",
"inputs": [],
"outputs": [{"name": "total", "type": "uint256"}],
"stateMutability": "view"
},
{
"type": "event",
"name": "NativeMinted",
"inputs": [
{"name": "recipient", "type": "address", "indexed": true},
{"name": "amount", "type": "uint256", "indexed": false}
]
},
{
"type": "event",
"name": "NativeBurned",
"inputs": [
{"name": "from", "type": "address", "indexed": true},
{"name": "amount", "type": "uint256", "indexed": false}
]
}
]
Querying supply stats
# Total minted
cast call 0x0000000000000000000000000000000000000808 \
"totalMinted()(uint256)" \
--rpc-url https://testnet.specterchain.com
# Total burned
cast call 0x0000000000000000000000000000000000000808 \
"totalBurned()(uint256)" \
--rpc-url https://testnet.specterchain.com