-
Notifications
You must be signed in to change notification settings - Fork 1
feat: SignetL1 #4
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
base: prestwich/clean-up
Are you sure you want to change the base?
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
81ecee3 to
319d8a7
Compare
3222713 to
c8c5f5d
Compare
319d8a7 to
4cccf9a
Compare
4cccf9a to
7333cc0
Compare
5d13c01 to
6dd9ee5
Compare
| import {PecorinoConstants} from "../chains/Pecorino.sol"; | ||
|
|
||
| abstract contract SignetL1 { | ||
| /// @notice Sentinal value for the native asset in order inputs/outputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// @notice Sentinal value for the native asset in order inputs/outputs | |
| /// @notice Sentinel value for the native asset in order inputs/outputs |
| bool is7702; | ||
| assembly { | ||
| let ptr := mload(0x40) | ||
| extcodecopy(caller(), ptr, 0, 0x20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is kind of obscure, but isn't this a bug under a certain circumstance?
we check above for the correct code length on 7702 delegated addresses, but do the codecopy for prefix checking on caller, which IIRC, returns who is the call sender. So for any 7702 delegated user who uses an intermediary contract (e.g some router/defi thing) to call this, we'll return an aliased address instead of the EOA. shouldn't it be address()?
| ethToSignet(amount); | ||
| return; | ||
| } | ||
| IERC20(token).approve(address(PASSAGE), amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this might be problematic w/ USDT since they're non ERC20 compliant, and solidity tries to decode return data even if you don't use it. so this might straight up revert. we should use SafeERC20 here

Add an L1 contract for Signet users