Academy

Native Minter Precompile

Learn how to enable minting of new native tokens and configure the allow list in an Avalanche L1 blockchain.

Minting Native Tokens

Once the allow list is configured, addresses with the Enabled role can mint new native tokens using the following interface:

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
 
interface INativeMinter {
  event NativeCoinMinted(address indexed sender, address indexed recipient, uint256 amount);
 
  function mintNativeCoin(address addr, uint256 amount) external;
}

Conclusion: By enabling the Native Minter Precompile and setting up an allow list with proper roles, you can effectively manage who has permission to mint new native tokens and adjust the token supply as needed. By doing so at the smart contract level, Avalanche provides flexibility and security, allowing developers to control minting directly within their blockchain applications.

Quiz topic

Time for a Quiz!

Wolfie wants to test your knowledge. Select the correct answer.

What is the AllowList used for when configuring the Native Minter Precompile?

ATo set transaction fees for using the native token
BTo control which addresses are allowed to mint native tokens
CTo limit the total number of native tokens that can be minted
DTo freeze minting of native tokens
Edit on GitHub

Last updated on 1/9/2025

On this page