Skip to content

Issue/340 #373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Issue/340 #373

wants to merge 4 commits into from

Conversation

aowheel
Copy link
Collaborator

@aowheel aowheel commented Jun 2, 2025

Description

実装内容

  • FractionTokenコントラクトのHatsModule化
  • モジュールのデプロイスクリプトとテストの追加

詳細

  • 従来のFractionTokenの実装との差分
    • 新たなmappingでトークンのIDと受け取ったアドレスについて記録していたが、ERC1155ネイティブのbalanceOf以上の機能をもたらさないと判断して無くした
    • 代わりにtransferは全てできないように制限し、トークンの送受の記録は消えないようにした(burnによって0にすることはできる)
    • mint、burn、transferはそのHatのWearer、または、ツリーの上位のHat(Top Hat、Hatter Hat)のWearerのみできるようになっている
  • モジュール化したことによる差分
    • FractionTokenはTopHatにのみ紐づくので、InitializeでHatIdがTopHatIdでない場合はrevertするようにしている
    • 各ワークスペースに固有の初期化データは他のモジュールと同様クローン時にencodeして渡している
    • Immutable Argsに追加はない

Fixes #340

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

If applicable, add screenshots to help explain your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssistCreditをHatsModule化する
1 participant