Burning Tokens
Token Burning Operations
// 3. Burn tokens
let burn_payload = TokenBurnPayload {
recent_epoch: state.epoch,
recent_checkpoint: state.checkpoint,
chain_id,
nonce: current_nonce,
recipient: sender_address, // Burn from sender's own account
value: TokenAmount::from(500000000000000000u64), // 0.5 tokens
token: token_address,
};
current_nonce += 1; // Increment for next transaction
match client.burn_token(burn_payload, private_key).await {
Ok(response) => {
println!("Tokens burned - Tx: {}", response.hash);
}
Err(e) => {
print_detailed_error("Could not burn tokens", &e);
}
}
Last updated