Skip to content
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

test: add multi-owner modular account updateOwners test #1160

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jaypaik
Copy link
Contributor

@jaypaik jaypaik commented Nov 18, 2024

Debugging inaccurate gas/fee estimation for modular account's updateOwners. Bumped values with overrides to get test to pass. Putting this up for 👀 .

Pull Request Checklist


PR-Codex overview

This PR adds a test case to verify the functionality of updating ownership in a smart contract. It checks the successful removal and addition of owners using different signers.

Detailed summary

  • Introduced a test case named should update ownership successfully.
  • Connected a provider with signer2 and set an initial balance.
  • Updated owners by removing signer1 and adding signer3.
  • Verified that signer1 was removed and signer2, signer3 were present.
  • Updated owners again to remove signer3 and add signer1.
  • Confirmed the final ownership state reflects the expected addresses.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Nov 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 1:33am
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 1:33am

Copy link

graphite-app bot commented Nov 18, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “graphite-merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor Author

jaypaik commented Nov 18, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jaypaik jaypaik marked this pull request as ready for review November 18, 2024 01:27
@jaypaik jaypaik force-pushed the 11-17-test_add_multi-owner_modular_account_updateowners_test branch from 1983a71 to 908d16e Compare November 18, 2024 01:28
Comment on lines +203 to +209
overrides: {
maxFeePerGas: 1_851_972_078n * 2n,
maxPriorityFeePerGas: 1_000_000_000n * 2n,
callGasLimit: 43_960n * 2n,
verificationGasLimit: 92_326n * 2n,
preVerificationGas: 46_248n * 2n,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to figure out why these values need to be increased. Doubling the derived values got the UO to succeed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

heads up: each of these fields supports a {multiplier: 2n} instead of raw bigint

Copy link
Collaborator

@moldy530 moldy530 Nov 18, 2024

Choose a reason for hiding this comment

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

hmmm that's strange... we still need to merge in wevm/prool#26 because our tests use rundler 0.2.0 and we're on 0.4.0 already... I know there's been some changes to the pvg logic in later versions of rundler, so I wonder if that's related

maybe we should fork prool and use that instead


// Deploy account and update owners. Remove signer1 and add signer3.
let result = await provider.updateOwners({
args: [[await signer3.getAddress()], [await signer1.getAddress()]],
Copy link
Collaborator

Choose a reason for hiding this comment

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

is signer1 already on the account? or is this part of the test -- it should not revert if a signer is not on the account?

I ask because you attach signer2 above to this and wanted to make sure this was intentional

Copy link
Contributor Author

Choose a reason for hiding this comment

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

signer1 and signer2 are the initial owners. So here we deploy, set the initial owners, and update them at the same time. This one doesn't revert.

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