-
Notifications
You must be signed in to change notification settings - Fork 79
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
Upgrades methods in Account V1 #306
Conversation
branch |
if (validationModule.getAddress() === DEFAULT_ECDSA_OWNERSHIP_MODULE) { | ||
const eoaSigner = await validationModule.getSigner(); | ||
const eoaAddress = await eoaSigner.getAddress(); | ||
const accountAddress = await this.getV1AccountsUpgradedToV2(eoaAddress, index); | ||
Logger.log("account address from V1 ", accountAddress); | ||
if (accountAddress !== ethers.constants.AddressZero) { | ||
return accountAddress; | ||
} | ||
} else { | ||
// can check using module.getAddress() and module.getInitData() for some other auth module | ||
} |
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.
Why not keep it generic, take signer and call getAddress with module.getAddress()
and module.getInitData()
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.
hmm ok in that case I can always call then this function instead.
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 am also thinking about more specific methods in the contract and have another review.
like I added this comment
https://github.com/bcnmy/scw-contracts/blob/features/SMA-321-account-address-resolver/contracts/smart-account/utils/AddressResolver.sol#L19C5-L19C76
What do you think @AmanRaj1608 @ankurdubey521
because here we're and will always be only interested in querying possible addresses from V1 factory which have implementation as V2. so why query V2 addresses?
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 feel both is fine, if removing the query of v2 address can save some time let's remove 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.
LGTM!
Summary
test script for upgrade
bcnmy/sdk-examples@d4c395e
After we merge this PR, we also need to finalise AddressResolver contract and deploy it on all supported EVM networks. then update the address and abi in the sdk.
Related Issue: # (issue number)
Change Type
Checklist
Additional Information
Branch Naming