Back to Sway

Burning

docs/reference/src/documentation/operations/asset/burn.md

0.71.0736 B
Original Source

Burning

Burning an asset means to destroy an asset that a contract has minted.

The standard library contains a module that can be used to burn an asset.

There is one function used to burn:

<!-- no toc -->

To use the function we must import it.

sway
{{#include ../../../code/operations/asset_operations/src/lib.sw:burn_import}}

burn

To burn some amount of an asset we specify the amount that we would like to burn and pass it into the burn() function.

sway
{{#include ../../../code/operations/asset_operations/src/lib.sw:burn}}