Skip to content

pandaritz/memecoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

如何在Solana区块链上发布Memecoin REDNOTE

本教程将指导您如何在Solana区块链上发布Memecoin REDNOTE,包括代币分配、解锁机制等技术实现细节。

1. 项目概述

代币分配

  • 总发行量: 10亿
  • 分配比例:
    • Creators & CIC Digital, 1: 36%
    • Creators & CIC Digital, 2: 18%
    • Creators & CIC Digital, 3: 18%
    • 公共分配: 10%
    • Creators & CIC Digital, 4: 4%
    • Creators & CIC Digital, 5: 2%
    • Creators & CIC Digital, 6: 2%
    • 流动性: 10%

发行期限

  • 总发行期限: 36个月

2. 技术实现

2.1 创建代币

spl-token create-token --decimals 9

2.2 设置分配账户

spl-token create-account <TOKEN_ADDRESS>

2.3 实现解锁机制

// 线性解锁示例代码
class VestingSchedule {
  constructor(totalAmount, cliffDuration, vestingDuration) {
    this.totalAmount = totalAmount;
    this.cliffDuration = cliffDuration;
    this.vestingDuration = vestingDuration;
  }

  getUnlockedAmount(currentTime) {
    if (currentTime < this.cliffDuration) {
      return 0;
    }
    const elapsed = currentTime - this.cliffDuration;
    return Math.min(
      this.totalAmount,
      (this.totalAmount * elapsed) / this.vestingDuration
    );
  }
}

3. 部署与测试

3.1 部署到Solana测试网

solana config set --url https://api.testnet.solana.com
anchor deploy

3.2 测试解锁机制

npm run test

4. 参考资源

About

rednote memecoin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors