Namespace Minter

Namespace Minter is a smart contract that is responsible for minting subnames for ENS names which are listed on the Namespace platform.

Contract deployments:

Sepolia - Mainnet -

To mint a subname under the *listed* ENS name, you would need to call the "mint" function of the NamespaceMinter contract:

function mint(MintSubnameContext memory context, bytes memory signature) external payable

The following parameters are needed for minting: MintSubnameContext context and bytes signature.

The context is provided to represent the data required for minting:

struct MintSubnameContext {
    bytes32 parentNode;
    string subnameLabel;
    address resolver;
    address subnameOwner;
    uint32 fuses;
    uint256 mintPrice;
    uint256 mintFee;
    uint64 ttl;
    uint64 expiry;

Since the information about listing configuration is stored offchain, requests to mint subnames are first sent to the backend API. The backend will validate a minting request, and generate both context and signature.

The signature is the hashed version of the context, generated by a private key securely stored on the backend. Thus when the smart contract receives the minting transaction, it will need to verify that the correct address generated the signature. Once the signature verification is confirmed, the smart contract will proceed with the minting based on the provided context.

For information on how to generate minting parameters, visit:

POST /api/v1/mint

POST /api/v1/mint/verified

If at any point you require some assistance or help implementing this, make sure to reach out to us in our Discord and we will answer all your questions.

Last updated