Skip to main content
Glama

Rootstock MCP Server

by cuongpo
MintableERC20.sol•1.15 kB
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract MintableERC20 is ERC20, Ownable { uint8 private _decimals; constructor( string memory name, string memory symbol, uint256 initialSupply, uint8 decimals_ ) ERC20(name, symbol) Ownable(msg.sender) { _decimals = decimals_; _mint(msg.sender, initialSupply * 10 ** decimals_); } // Override decimals function to return custom decimals function decimals() public view virtual override returns (uint8) { return _decimals; } // Mint function - only owner can mint function mint(address to, uint256 amount) public onlyOwner { _mint(to, amount); } // Burn function - anyone can burn their own tokens function burn(uint256 amount) public { _burn(msg.sender, amount); } // Burn from allowance function burnFrom(address account, uint256 amount) public { _spendAllowance(account, msg.sender, amount); _burn(account, amount); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cuongpo/rootstock-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server