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

feat: add sanity check on provider connect for clearer error message #181

Merged
merged 8 commits into from
Oct 31, 2023

Conversation

denniswon
Copy link
Contributor

@denniswon denniswon commented Oct 29, 2023

app.asana.com/0/1205598840815267/1205773893380310/f

Per the task linked above, added a sanity check early on on the current connect() so that users can get clear error message about the issue.

Follow up PR will made to make entry point contract address param as optional for SmartContractAccount

Also, updated the doc for the missing/added Other methods for SCA class.


PR-Codex overview

Detailed summary:

This PR introduces the getEntryPointAddress method to the ISmartContractAccount interface and the BaseSmartContractAccount class. It also adds implementations and documentation for the method in various files. Additionally, it updates the SmartAccountProvider class to use the connected account's entry point address or the default entry point address for the chain.

The following files were skipped due to too many changes: packages/core/src/provider/__tests__/base.test.ts

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

@denniswon denniswon force-pushed the denniswon/entrypoint-validation branch from d00e59a to f993fb7 Compare October 29, 2023 21:49
@denniswon denniswon changed the base branch from development to denniswon/abstract-entrypoint October 29, 2023 21:49
@denniswon denniswon force-pushed the denniswon/abstract-entrypoint branch from bc2e02b to f2717f8 Compare October 30, 2023 02:59
@denniswon denniswon force-pushed the denniswon/entrypoint-validation branch from f993fb7 to ecf61aa Compare October 30, 2023 03:01
@denniswon denniswon force-pushed the denniswon/abstract-entrypoint branch 2 times, most recently from 8ff1972 to 1b90588 Compare October 30, 2023 03:32
@denniswon denniswon force-pushed the denniswon/entrypoint-validation branch from ecf61aa to 5c36999 Compare October 30, 2023 03:33
@denniswon denniswon changed the title feat: add sanity check on provider connect so that users can get clear error message feat: add sanity check on provider connect for clearer error message Oct 30, 2023
Copy link
Contributor

@avasisht23 avasisht23 left a comment

Choose a reason for hiding this comment

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

few comments/suggestions

packages/core/src/provider/__tests__/base.test.ts Outdated Show resolved Hide resolved
site/packages/aa-core/accounts/other/getOwner.md Outdated Show resolved Hide resolved
site/packages/aa-core/accounts/other/getOwner.md Outdated Show resolved Hide resolved
packages/core/src/provider/base.ts Outdated Show resolved Hide resolved
@denniswon denniswon force-pushed the denniswon/abstract-entrypoint branch 2 times, most recently from 68628f2 to a05006f Compare October 30, 2023 21:19
Base automatically changed from denniswon/abstract-entrypoint to development October 30, 2023 21:25
@denniswon denniswon force-pushed the denniswon/entrypoint-validation branch from c8f5c1d to 9194213 Compare October 30, 2023 23:32
@denniswon denniswon force-pushed the denniswon/entrypoint-validation branch from 9194213 to bb048fd Compare October 31, 2023 01:56
Copy link
Contributor

@avasisht23 avasisht23 left a comment

Choose a reason for hiding this comment

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

this looks good. few nits, then 🚢

packages/core/src/provider/__tests__/base.test.ts Outdated Show resolved Hide resolved
packages/core/src/provider/__tests__/base.test.ts Outdated Show resolved Hide resolved
packages/core/src/provider/__tests__/base.test.ts Outdated Show resolved Hide resolved
packages/core/src/provider/__tests__/base.test.ts Outdated Show resolved Hide resolved
packages/core/src/provider/base.ts Outdated Show resolved Hide resolved
packages/core/src/provider/base.ts Outdated Show resolved Hide resolved
denniswon and others added 5 commits October 30, 2023 22:43
Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
@denniswon denniswon merged commit 7bd1e47 into development Oct 31, 2023
3 checks passed
@denniswon denniswon deleted the denniswon/entrypoint-validation branch October 31, 2023 05:58
avasisht23 added a commit that referenced this pull request Nov 3, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Nov 3, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Nov 3, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
@moldy530 moldy530 mentioned this pull request Nov 10, 2023
moldy530 pushed a commit that referenced this pull request Nov 10, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
moldy530 pushed a commit that referenced this pull request Nov 10, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Nov 14, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Nov 14, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Nov 14, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Nov 14, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
denniswon added a commit that referenced this pull request Nov 16, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
denniswon added a commit that referenced this pull request Nov 16, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
moldy530 pushed a commit that referenced this pull request Nov 16, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
moldy530 pushed a commit that referenced this pull request Nov 16, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
@moldy530 moldy530 mentioned this pull request Nov 17, 2023
7 tasks
@moldy530 moldy530 mentioned this pull request Dec 1, 2023
8 tasks
avasisht23 added a commit that referenced this pull request Dec 3, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Dec 3, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Dec 3, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
avasisht23 added a commit that referenced this pull request Dec 3, 2023
…181)

Co-authored-by: Ajay Vasisht <43521356+avasisht23@users.noreply.github.com>
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.

None yet

3 participants