hackquest logo
  • 学习
  • 课程探索
  • 实战
  • 探索黑客松
  • 往期项目
  • 社区
  • 论坛
  • 全球活动
  • 我的社区
  • 共学营
  • 组织中心
  • 更多
    • 词汇表
    • 博客
    • 水龙头
    • 工作机会
    • 媒体工具包
    • 创始人
hackquest logo

Deflationary Token

A simple Solidity-based deflationary token with a burn-on-transfer mechanism. Every transaction burns a percentage of the transferred amount, reducing the total supply over time.

技术栈

Web3
Ethers
Solidity

描述

Deflationary Token

A simple Solidity-based deflationary token with a burn-on-transfer mechanism. Every transaction burns a percentage of the transferred amount, reducing the total supply over time.

Features

  • Burn on Transfer: A fixed percentage (2%) of the transferred tokens is burned.

  • Minting: The owner can mint new tokens.

  • No Imports: A simple implementation without any external dependencies.

Smart Contract Overview

This contract includes:

  • mint(address to, uint256 amount): Allows the owner to mint new tokens.

  • transfer(address to, uint256 amount): Transfers tokens with a 2% burn rate.

How It Works

  1. The owner can mint tokens and assign them to an address.

  2. When tokens are transferred, 2% of the transferred amount is burned.

  3. The total supply decreases with every transfer.

Deployment

  1. Compile the contract using Solidity 0.8.0 or later.

  2. Deploy the contract on a blockchain network.

  3. Call the mint function to allocate tokens.

  4. Use the transfer function to send tokens and trigger the burn mechanism.

License

This project is open-source and available for public use. Modify and use it as needed!

融资状态

0
队长
Hhq_1743492969
项目链接
赛道
DeFi