8000 Many accounts per EOA by nkrishang · Pull Request #561 · thirdweb-dev/contracts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Many accounts per EOA #561

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

Merged
merged 7 commits into from
Oct 30, 2023
Merged

Many accounts per EOA #561

merged 7 commits into from
Oct 30, 2023

Conversation

nkrishang
Copy link
Contributor

No description provided.

Copy link
Member
@joaquim-verges joaquim-verges left a comment

Choose a reason for hiding this comment

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

LG, just that comment on the encode fn

@@ -189,6 +189,11 @@ contract AccountCore is IAccountCore, Initializable, Multicall, BaseAccount, Acc
Internal functions
//////////////////////////////////////////////////////////////*/

/// @dev Returns the salt used when deploying an Account.
function _generateSalt(address _admin, bytes memory _data) internal view virtual returns (bytes32) {
return keccak256(abi.encodePacked(_admin, _data));
Copy link
Member

Choose a reason for hiding this comment

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

I think we should use encode instead of encode packed here ? From what I read online it's better suited for dynamic types like bytes

function _generateSalt(address _admin, bytes memory) internal view virtual returns (bytes32) {
return keccak256(abi.encode(_admin));
function _generateSalt(address _admin, bytes memory _data) internal view virtual returns (bytes32) {
return keccak256(abi.encodePacked(_admin, _data));
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@codecov
Copy link
codecov bot commented Oct 28, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...racts/prebuilts/account/dynamic/DynamicAccount.sol 100.00% <100.00%> (ø)
contracts/prebuilts/account/utils/AccountCore.sol 94.82% <100.00%> (-0.18%) ⬇️
...cts/prebuilts/account/utils/AccountCoreStorage.sol 0.00% <ø> (ø)
...cts/prebuilts/account/utils/BaseAccountFactory.sol 85.29% <100.00%> (-0.43%) ⬇️
...acts/prebuilts/account/non-upgradeable/Account.sol 71.42% <75.00%> (+3.42%) ⬆️
...racts/prebuilts/account/utils/AccountExtension.sol 51.72% <75.00%> (+5.57%) ⬆️

📢 Thoughts on this report? Let us know!.

Copy link
Member
@joaquim-verges joaquim-verges left a comment

Choose a reason for hiding this comment

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

lg. We'll have to update the AccountExtension impl address so just a reminder that it will need to be redeployed on all chains deterministically.

and with the new function selectors added 🙏

}

/// @notice Withdraw funds for this account from Entrypoint.
function withdrawDepositTo(address payable withdrawAddress, uint256 amount) public {
Copy link
Member

Choose a reason for hiding this comment

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

remember to add those 2 to the AccountExtension struct in the factory when publishing

@nkrishang nkrishang merged commit 80fa323 into main Oct 30, 2023
@nkrishang nkrishang deleted the nkrishang/many-accounts-per-eoa branch October 30, 2023 19:51
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.

2 participants
0