Deployment

Obtain LUMIA token from the Faucet​

To deploy a contract on Lumia L2, you will need to obtain some LUMIA tokens from the Faucet, which is explained on the faucet page.

Once successful, you will see some LUMIA tokens available within MetaMask, if not, double-check to ensure Lumia Testnet is selected as your current network.

Deploy Contract on Lumia TestnNet

The last step will be to deploy a smart contract on Lumia TestNet.

Token Contract

// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";

contract Sportimex is ERC20, ERC20Permit {
    constructor() ERC20("Hello Lumia", "HelloLumia") ERC20Permit("HelloLumia") {
        _mint(msg.sender, 100000000 * 10 ** decimals());
    }
}

This contract will issue an ERC20 token called 'Hello Lumia', with ticker HelloLumia, and a total supply of 100m using 18 decimals of precision with ERC20Permits implemented. You will be able to compile this contract using one of the deployment methods described in later sections.

Last updated