Skip to content

Conversation

@ericnordelo
Copy link
Member

Fixes #1577

PR Checklist

  • Tests
  • Documentation
  • Added entry to CHANGELOG.md
  • Tried the feature on a public network

@ericnordelo ericnordelo changed the title EEC20 flash mint extension ERC20 flash mint extension Dec 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

🧪 Cairo Contract Size Benchmark Diff

BYTECODE SIZE (felts) (limit: 81,920 felts)

No changes in felts.

SIERRA CONTRACT CLASS SIZE (bytes) (limit: 4,089,446 bytes)

No changes in bytes.

This comment was generated automatically from benchmark diffs.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.36%. Comparing base (1822e84) to head (d0a5cf4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1608   +/-   ##
=======================================
  Coverage   92.36%   92.36%           
=======================================
  Files          85       85           
  Lines        2278     2278           
=======================================
  Hits         2104     2104           
  Misses        174      174           
Files with missing lines Coverage Δ
packages/interfaces/src/token/erc20.cairo 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d167578...d0a5cf4. Read the comment docs.

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

Copy link
Collaborator

@immrsd immrsd left a comment

Choose a reason for hiding this comment

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

Looking good and consistent with the Solidity implementation!
Left a couple of comments

/// Forwards to `FeeConfig::flash_fee_receiver`.
fn _flash_fee_receiver(self: @ComponentState<TContractState>) -> ContractAddress {
FeeConfig::flash_fee_receiver(self)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this internal trait to wrap calls to the FeeConfig trait?

) -> ContractAddress {
Zero::zero()
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. Are we going to provide DefaultFeeConfig implementation as we usually do?
  2. WDYT about making max_flash_loan function part of the config (and naming it FlashMintConfig)? It will make it much easier to override the implementation if there should be a cap

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.

[Feature]: Add ERC-20 FlashMint Extension

3 participants