Skip to content

Commit 1bfcabe

Browse files
working version
1 parent 265a111 commit 1bfcabe

39 files changed

+2616
-1359
lines changed

.changeset/odd-coats-cheer.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
BETA support for 7579 modular smart accounts
6+
7+
You can now create modular smart wallets using the 7579 preset.
8+
9+
Keep in mind that this is in BETA, and there might be breaking API changes.
10+
11+
```typescript
12+
import { sepolia } from "thirdweb/chains";
13+
import { smartWallet, Config } from "thirdweb/wallets/smart";
14+
const modularSmartWallet = smartWallet(
15+
Config.erc7579({
16+
chain: sepolia,
17+
sponsorGas: true,
18+
factoryAddress: "0x...", // the 7579 factory address
19+
validatorAddress: "0x...", // the default validator module address
20+
}),
21+
});
22+
```

packages/thirdweb/scripts/generate/abis/erc7579/Bootstrap.json

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
"constructor(address _entrypoint, address _owner, address _accountImplementation)",
3+
"function accountImplementation() view returns (address)",
4+
"function addStake(uint32 unstakeDelaySec) payable",
5+
"function createAccountWithModules(address owner, bytes salt, (uint256 moduleTypeId, address module, bytes initData)[] modules) payable returns (address)",
6+
"function entrypoint() view returns (address)",
7+
"function getAddress(address owner, bytes salt) view returns (address account)",
8+
"function implementation() view returns (address result)",
9+
"function owner() view returns (address result)",
10+
"function renounceOwnership()",
11+
"function transferOwnership(address newOwner)",
12+
"function unlockStake()",
13+
"function upgradeTo(address newImplementation)",
14+
"function withdraw(address to, address token, uint256 amount)",
15+
"function withdrawStake(address to)",
16+
"event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)",
17+
"event Upgraded(address indexed implementation)",
18+
"error InitializationFailed()",
19+
"error InvalidModule(address module)",
20+
"error NewImplementationHasNoCode()",
21+
"error NewOwnerIsZeroAddress()",
22+
"error Unauthorized()"
23+
]

packages/thirdweb/scripts/typedoc.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const app = await Application.bootstrapWithPlugins({
88
"src/exports/**/*.ts",
99
"src/extensions/modules/**/index.ts",
1010
"src/adapters/eip1193/index.ts",
11+
"src/wallets/smart/presets/index.ts",
1112
],
1213
exclude: [
1314
"src/exports/*.native.ts",

packages/thirdweb/src/auth/verify-hash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export async function verifyHash({
153153
}
154154

155155
const EIP_1271_MAGIC_VALUE = "0x1626ba7e";
156-
async function verifyEip1271Signature({
156+
export async function verifyEip1271Signature({
157157
hash,
158158
signature,
159159
contract,

packages/thirdweb/src/exports/wallets/smart.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ export type {
3030
PaymasterResult,
3131
} from "../../wallets/smart/types.js";
3232

33+
// all preset configs
34+
export * as Config from "../../wallets/smart/presets/index.js";
35+
3336
export {
3437
ENTRYPOINT_ADDRESS_v0_6,
3538
ENTRYPOINT_ADDRESS_v0_7,

packages/thirdweb/src/extensions/erc7579/__generated__/Bootstrap/read/_getInitMSACalldata.ts

Lines changed: 0 additions & 230 deletions
This file was deleted.

0 commit comments

Comments
 (0)