-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sanity check on provider connect so that users can get clea…
…rer error
- Loading branch information
Showing
8 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
site/packages/aa-core/accounts/other/getEntryPointAddress.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
outline: deep | ||
head: | ||
- - meta | ||
- property: og:title | ||
content: getEntryPointAddress | ||
- - meta | ||
- name: description | ||
content: Overview of the getEntryPointAddress method on BaseSmartContractAccount | ||
- - meta | ||
- property: og:description | ||
content: Overview of the getEntryPointAddress method on BaseSmartContractAccount | ||
--- | ||
|
||
# getEntryPointAddress | ||
|
||
Returns the EntryPoint contract address for the account. | ||
|
||
## Usage | ||
|
||
::: code-group | ||
|
||
```ts [example.ts] | ||
import { provider } from "./provider"; | ||
// [!code focus:99] | ||
const entryPointAddress = await provider.getEntryPointAddress(); | ||
``` | ||
|
||
<<< @/snippets/provider.ts | ||
|
||
::: | ||
|
||
## Returns | ||
|
||
### `Address` | ||
|
||
The address of the EntryPoint contract |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
outline: deep | ||
head: | ||
- - meta | ||
- property: og:title | ||
content: getFactoryAddress | ||
- - meta | ||
- name: description | ||
content: Overview of the getFactoryAddress method on BaseSmartContractAccount | ||
- - meta | ||
- property: og:description | ||
content: Overview of the getFactoryAddress method on BaseSmartContractAccount | ||
--- | ||
|
||
# getFactoryAddress | ||
|
||
Returns the account factory address for the account. | ||
|
||
## Usage | ||
|
||
::: code-group | ||
|
||
```ts [example.ts] | ||
import { provider } from "./provider"; | ||
// [!code focus:99] | ||
const factoryAddress = await provider.getFactoryAddress(); | ||
``` | ||
|
||
<<< @/snippets/provider.ts | ||
|
||
::: | ||
|
||
## Returns | ||
|
||
### `Address` | ||
|
||
The address of the account factory contract |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
outline: deep | ||
head: | ||
- - meta | ||
- property: og:title | ||
content: getOwner | ||
- - meta | ||
- name: description | ||
content: Overview of the getOwner method on BaseSmartContractAccount | ||
- - meta | ||
- property: og:description | ||
content: Overview of the getOwner method on BaseSmartContractAccount | ||
--- | ||
|
||
# getOwner | ||
|
||
Returns the `SmartAccountSigner` that repensents the current owner for the account | ||
|
||
## Usage | ||
|
||
::: code-group | ||
|
||
```ts [example.ts] | ||
import { provider } from "./provider"; | ||
// [!code focus:99] | ||
const ownerSigner = await provider.getOwner(); | ||
``` | ||
|
||
<<< @/snippets/provider.ts | ||
|
||
::: | ||
|
||
## Returns | ||
|
||
### `SmartAccountSigner | undefined` | ||
|
||
The `SmartAccountSigner` object that repensents the current owner for the account |