Skip to content

Commit

Permalink
fix: docs and internal provider methods
Browse files Browse the repository at this point in the history
  • Loading branch information
excaliborr committed Feb 7, 2024
1 parent 97a3716 commit c2da0de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This plugin does not extend the hardhat runtime environment
## Configuration
> **NOTE: Currently the plugin will only use the first private key in `accounts`**
This plugin requires 23 new field inside an `accountAbstraction` object which will be nested inside each hardhat network that is set in the config
This plugin requires 2 new fields inside an `accountAbstraction` object which will be nested inside each hardhat network that is set in the config

This is an example of how to set it:

Expand Down Expand Up @@ -182,7 +182,7 @@ This plugin adds additional JSON-RPC methods to be able to interact and get data

### `aa_getSmartAccountAddress`

**Description:** Returns the address for the smart account that would be used if we deploy one for you, the user does not provide a smart account address, this will be deterministically generated from the provided signer address:
**Description:** Returns the address for the smart account that is being used by the provider.
- Parameters:
- `signerAddress: 0x${string}` - The signer of the transactions
- Example:
Expand Down
9 changes: 2 additions & 7 deletions src/gasless-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,14 +542,9 @@ export class GaslessProvider extends ProviderWrapper {
* Determines address for a smart account already deployed or to be deployed
* @param owner The owner of the smart account
* @returns A promise that resolves to sender address
* @dev Needs to be async so it returns a promise for the request method
*/
private async _getSmartAccountAddress(owner: `0x${string}`): Promise<`0x${string}`> {

Check warning on line 547 in src/gasless-provider.ts

View workflow job for this annotation

GitHub Actions / Run Linters (18.x)

'owner' is defined but never used
const { senderAddress } = await getSmartAccountData(
this.publicClient,
this._simpleAccountFactoryAddress,
owner,
this._entryPoint,
);
return senderAddress;
return this.senderAddress;
}
}
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async function createFolderIfNotExists(folderName: string): Promise<void> {
// If successfull, folder should not be created
await fs.promises.access(folderName);
} catch {
await fs.promises.mkdir(folderName);
await fs.promises.mkdir(folderName, { recursive: true });
}
}

Expand Down

0 comments on commit c2da0de

Please sign in to comment.