-
Notifications
You must be signed in to change notification settings - Fork 196
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(world-modules): add ERC20 module #1789
Conversation
🦋 Changeset detectedLatest commit: b5dddc8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
return MODULE_NAME; | ||
} | ||
|
||
function install(bytes memory args) public { |
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.
do we need an "already installed" check here?
} | ||
|
||
// Emit Transfer event on puppet | ||
puppet().log(IERC20Events.Transfer.selector, _toBytes32(from), _toBytes32(to), abi.encode(value)); |
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.
wtb solidity native encodeLog
like encodeCall
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 open an EIP for that, would be nice for sure
|
||
function _requireDependencies() internal view { | ||
// If the PuppetModule is not installed yet, install it | ||
if (InstalledModules.get(PUPPET_MODULE_NAME, keccak256(new bytes(0))) == address(0)) { |
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.
side note/not blocking: since we're starting to use this more, might be nice to lift this into Module
as a helper function e.g. isInstalled()
or isInstalled(module)
and requireNotInstalled()
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.
…#1799) Co-authored-by: Fraser Scott <[email protected]>
MUD-native ERC20 token