-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: use interfaces from reference implementation and bump version #4
feat: use interfaces from reference implementation and bump version #4
Conversation
Hmm, I should update this to use PackedUserOperation. Update incoming. |
@adamegyed why did we remove the explicit dependency on the 4337 ref impl again here: db6c47f ? |
src/libraries/ModuleEntityLib.sol
Outdated
// Magic value for hooks that should always revert. | ||
ModuleEntity internal constant _PRE_HOOK_ALWAYS_DENY = ModuleEntity.wrap(bytes24(uint192(2))); |
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.
We should re-copy this from the RI, because it's missing some parts like the byte layout diagram, and contains old fields like _PRE_HOOK_ALWAYS_DENY
.
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.
Woops, good catch.
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.
Wait, I did copy this from the reference implementation 😂 . So I guess that needs to be cleaned up?
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.
oof, yeah we should clean that up. will get on it...
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.
When this repo gets added as a dependency to another repo, it may be added either as a git submodule (foundry) or as an NPM package. If this repo depends on any external imports, those imports are not necessarily going to be available to the user unless this repo uses the same import scheme as the user. Because the user may pick either of the two, this repo should have no dependencies, except those which are needed in tests. |
Could you verify that this still works with the |
Yes this works! Already using this line in package.json (after erc6900/reference-implementation#181): "@erc6900/reference-implementation": "github:erc6900/reference-implementation#v0.8.0-rc.1", Will just need to update modular-account's package.json later. |
We should expect the repo importing this package to import https://github.com/eth-infinitism/account-abstraction for those interfaces, right? Why would we expect them to use the interfaces that we provide here? |
The previous state of this repo didn't have that dependency. The downside with requiring users to also install separate dependencies is that they must map things in the same way as this repo's code does. So for instance, this PR uses imports from |
Oof. Solidity dependencies really need better tooling. I imagine this is fine if importing as an npm package but causes problems when used as a submodule? |
I think it's equally a problem between the two different forms. But thinking a bit more about this, maybe we're ok with making it a requirement for users of this library to also install additional dependencies, and handle remappings. We should just call it out in the README. |
Removing the 6900 interfaces from this lib in favor of using the interfaces from https://github.com/erc6900/reference-implementation.
BasePlugin
has also been deleted. We should useBaseModule
from the reference implementation.Also renaming this package to
@erc6900/modular-account-libs
(frommodular-account-libs
)