Skip to content

Commit

Permalink
Edit [DOCS]: Updated import. @thirdweb-dev/contracts and add _default…
Browse files Browse the repository at this point in the history
…Admin (#5848)

Signed-off-by: Nidz The Fact <[email protected]>
Signed-off-by: Joaquim Verges <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
  • Loading branch information
nidz-the-fact and joaquim-verges authored Jan 4, 2025
1 parent 273a320 commit a3f59e5
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const metadata = createMetadata({
# AccountFactory

```solidity
import "@thirdweb-dev/contracts/smart-wallet/non-upgradeable/AccountFactory.sol";
import "@thirdweb-dev/contracts/prebuilts/account/non-upgradeable/AccountFactory.sol";
```

This contract inherits from the [`BaseAccountFactory`](/contracts/build/extensions/erc-4337/SmartWalletFactory) contract.
Expand Down Expand Up @@ -54,17 +54,23 @@ npx thirdweb create contract
```bash
npx thirdweb deploy
```
> **Note: secret key required for this command `-k <YOUR_SECRET_KEY>`**
Or import the contract into your existing project and inherit from it.

```solidity
import "@thirdweb-dev/contracts/smart-wallet/non-upgradable/AccountFactory.sol";
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.12;
import "@thirdweb-dev/contracts/prebuilts/account/non-upgradeable/AccountFactory.sol";
contract MyAccountFactory is AccountFactory {
constructor(
address _defaultAdmin,
IEntryPoint _entrypoint
)
AccountFactory(
_defaultAdmin,
_entrypoint
)
{}
Expand Down

0 comments on commit a3f59e5

Please sign in to comment.