Skip to content

Conversation

nkrishang
Copy link
Contributor

No description provided.

// \____/ \__| \__|\__|\__| \_______| \_____\____/ \_______|\_______/

contract AccountExtension is ContractMetadata, PermissionsEnumerable, ERC721Holder, ERC1155Holder {
contract AccountExtension is ContractMetadata, AccountPermissions, ERC721Holder, ERC1155Holder {
Copy link
Member

Choose a reason for hiding this comment

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

how come both AccountCore and AccountExtension both inherit AccountPermissions ? would have expected it only in the core

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both require the functionality of AccountPermissions since both contracts have logic that works with permission checks.

The AccountPermissions contract uses the library storage layout, so even though the two seperate contracts inherit it, the same storage slots are read/written to in a dynamic contract using both AccountCore + AccountExtension.

require(data.approvedTargets[role].contains(targets[i]), "Account: target not approved.");
require(restrictions.maxValuePerTransaction >= values[i], "Account: value too high.");
}
}
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we revert if the function called is neither execute/executeBatch here?

mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
mstore(add(ptr, 0x58), salt)
mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
predicted := keccak256(add(ptr, 0x43), 0x55)
Copy link
Member

Choose a reason for hiding this comment

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

need to test this accross the board make sure there's no unexpected behavior on the SDK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nkrishang nkrishang merged commit e7fd7f7 into main Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants