Function std::asset::burn

pub fn burn(sub_id: SubId, amount: u64) 
Expand description

Burn amount coins of the current contract’s sub_id. Burns them from the balance of the current contract.

Arguments

  • sub_id: [SubId] - The sub identifier of the asset which to burn.
  • amount: [u64] - The amount of coins to burn.

Reverts

  • When the contract balance is less than amount.

Examples

use std::{constants::ZERO_B256, asset::burn};

fn foo() {
    burn(ZERO_B256, 500);
}