Skip to content

Commit

Permalink
Merge pull request #74 from bcnmy/rc/methodupdates
Browse files Browse the repository at this point in the history
Rc/methodupdates
  • Loading branch information
Rahat-ch authored Sep 26, 2023
2 parents db69927 + 8168486 commit c9de23f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
12 changes: 3 additions & 9 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,16 @@ First we import our Module:
```typescript
import { ECDSAOwnershipValidationModule, DEFAULT_ECDSA_OWNERSHIP_MODULE } from "@biconomy/modules";
```
Now initialize it:
Now let's initialize the module and pass it to our account creation config:

```typescript
async function createAccount() {

const module = await ECDSAOwnershipValidationModule.create({
const module = await ECDSAOwnershipValidationModule.create({
signer: wallet,
moduleAddress: DEFAULT_ECDSA_OWNERSHIP_MODULE
})

```

Now with the config setup let's create a smart account:

```typescript
async function createAccount() {
let biconomySmartAccount = await BiconomySmartAccountV2.create({
signer: wallet,
chainId: ChainId.POLYGON_MUMBAI,
Expand All @@ -141,7 +136,6 @@ async function createAccount() {
defaultValidationModule: module,
activeValidationModule: module
})
console.log("owner: ", biconomySmartAccount.owner)
console.log("address: ", await biconomySmartAccount.getAccountAddress())
return biconomySmartAccount;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/smartAccountv1/quickstartv1.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ async function createAccount() {
const biconomyAccount = new BiconomySmartAccount(biconomySmartAccountConfig)
const biconomySmartAccount = await biconomyAccount.init()
console.log("owner: ", biconomySmartAccount.owner)
console.log("address: ", await biconomySmartAccount.getSmartAccountAddress())
console.log("address: ", await biconomySmartAccount.getAccountAddress())
return biconomyAccount
}
async function createTransaction() {
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/React_vite/sdk-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@ async function setupSmartAccount() {
defaultValidationModule: module,
activeValidationModule: module
})
console.log("owner: ", biconomySmartAccount.owner)
console.log("address: ", await biconomySmartAccount.getAccountAddress())
console.log("deployed: ", await biconomySmartAccount.isAccountDeployed( await biconomySmartAccount.getAccountAddress()))
console.log("deployed: ", await biconomySmartAccount.isAccountDeployed())

setSmartAccount(biconomySmartAccount)
setLoading(false)
Expand Down
16 changes: 7 additions & 9 deletions docs/tutorials/nodejs/initializeaccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,17 @@ import { ECDSAOwnershipValidationModule, DEFAULT_ECDSA_OWNERSHIP_MODULE } from "

Now lets initialize the module:

```typescript
const module = await ECDSAOwnershipValidationModule.create({
signer: wallet,
moduleAddress: DEFAULT_ECDSA_OWNERSHIP_MODULE
})
```


Now lets use the create method on the `BiconomySmartAccountV2` class to create a new instance of our smart account:
Now lets initialize the module and use the create method on the `BiconomySmartAccountV2` class to create a new instance of our smart account:

```typescript
async function createAccount() {

const module = await ECDSAOwnershipValidationModule.create({
signer: wallet,
moduleAddress: DEFAULT_ECDSA_OWNERSHIP_MODULE
})

let biconomySmartAccount = await BiconomySmartAccountV2.create({
chainId: ChainId.POLYGON_MUMBAI,
bundler: bundler,
Expand All @@ -107,7 +106,6 @@ async function createAccount() {
defaultValidationModule: module,
activeValidationModule: module
})
console.log("owner: ", biconomySmartAccount.owner)
console.log("address: ", await biconomySmartAccount.getAccountAddress())
return biconomySmartAccount;
}
Expand Down

0 comments on commit c9de23f

Please sign in to comment.