Skip to content

Conversation

@arad-starkware
Copy link
Collaborator

@arad-starkware arad-starkware commented Oct 26, 2025

This change is Reviewable


Note

Adds ownable-controlled mint/burn to DualCaseERC20Mock and introduces IMintableToken (+ camelCase variant) interfaces.

  • ERC20 Mocks
    • packages/utils/src/erc20/erc20_mocks.cairo
      • DualCaseERC20Mock:
        • Integrates OwnableComponent (storage + events) and initializes ownership in constructor.
        • Constructor now takes owner (replaces recipient) and mints initial supply to owner.
        • Implements IMintableToken and IMintableTokenCamelOnly with owner-restricted permissioned_mint/permissioned_burn and is_permitted_minter.
  • Interfaces
    • packages/utils/src/interfaces/mintable_token.cairo: Adds IMintableToken and IMintableTokenCamelOnly traits.

Written by Cursor Bugbot for commit 3af3954. This will update automatically on new commits. Configure here.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Oct 26, 2025

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@736c904). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/utils/src/erc20/erc20_mocks.cairo 0.00% 19 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #125   +/-   ##
=======================================
  Coverage        ?   89.06%           
=======================================
  Files           ?       43           
  Lines           ?     2387           
  Branches        ?        0           
=======================================
  Hits            ?     2126           
  Misses          ?      261           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arad-starkware arad-starkware force-pushed the arad/feat_add_burnable_mock_erc20 branch 3 times, most recently from 89b8b22 to 446c612 Compare October 26, 2025 13:04
@arad-starkware arad-starkware marked this pull request as ready for review October 26, 2025 13:05
Copy link
Collaborator

@remollemo remollemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @ishay-starkware and @noa-starkware)


a discussion (no related file):

  1. how is it applicable in current context?
  2. allowing any user to burn to any other user is a bit aggressive even for testing... although legit
  3. might be handy to be able to create supply as well

@arad-starkware arad-starkware force-pushed the arad/feat_add_burnable_mock_erc20 branch from 446c612 to 866324e Compare October 26, 2025 15:45
cursor[bot]

This comment was marked as outdated.

@arad-starkware arad-starkware force-pushed the arad/feat_add_burnable_mock_erc20 branch 2 times, most recently from 5ee2e4e to f57716b Compare October 26, 2025 16:04
Copy link
Collaborator

@remollemo remollemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @arad-starkware, @ishay-starkware, and @noa-starkware)


packages/utils/src/erc20/erc20_mocks.cairo line 68 at r3 (raw file):

        }
    }
}

if you're DualCase implement the IMintableTokenCamel as well

@arad-starkware arad-starkware force-pushed the arad/feat_add_burnable_mock_erc20 branch from f57716b to 3af3954 Compare October 27, 2025 07:18
Copy link
Collaborator Author

@arad-starkware arad-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @ishay-starkware, @noa-starkware, and @remollemo)


a discussion (no related file):

Previously, remollemo wrote…
  1. how is it applicable in current context?
  2. allowing any user to burn to any other user is a bit aggressive even for testing... although legit
  3. might be handy to be able to create supply as well

Done.


packages/utils/src/erc20/erc20_mocks.cairo line 68 at r3 (raw file):

Previously, remollemo wrote…

if you're DualCase implement the IMintableTokenCamel as well

Done.

Copy link
Collaborator

@remollemo remollemo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@remollemo reviewed 1 of 2 files at r2, 2 of 2 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ishay-starkware and @noa-starkware)

@arad-starkware arad-starkware merged commit 0eec6a6 into main Oct 27, 2025
6 checks passed
Copy link
Collaborator Author

Merge activity

@arad-starkware arad-starkware deleted the arad/feat_add_burnable_mock_erc20 branch October 27, 2025 08:26
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.

3 participants