@dynamic-labs/ethereum-aa 4.2.3 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -10
- package/src/ZeroDevConnector.cjs +14 -12
- package/src/ZeroDevConnector.js +14 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.3.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.3.0...v4.3.1) (2025-01-23)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* correctly parse message to sign when it has unscaped new line character ([#7850](https://github.com/dynamic-labs/dynamic-auth/issues/7850)) ([156c144](https://github.com/dynamic-labs/dynamic-auth/commit/156c1440989ef7cb9a9066491e8670bc1737eb68))
|
|
8
|
+
* ensure user wallets state has been updated before emitting walletAdded/walletRemoved events ([#7863](https://github.com/dynamic-labs/dynamic-auth/issues/7863)) ([2bf61db](https://github.com/dynamic-labs/dynamic-auth/commit/2bf61dbace85d93c8fb684a9c7304fe562a85395))
|
|
9
|
+
* ensure zerodev simulation has correct gas limit and initCode data ([#7861](https://github.com/dynamic-labs/dynamic-auth/issues/7861)) ([88c2588](https://github.com/dynamic-labs/dynamic-auth/commit/88c2588256a2421907c0d9f0f724a8708cf9a54a))
|
|
10
|
+
|
|
11
|
+
## [4.3.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.2.3...v4.3.0) (2025-01-21)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* add support for Nightly wallet on Eclipse ([#7848](https://github.com/dynamic-labs/dynamic-auth/issues/7848)) ([dd6e8d4](https://github.com/dynamic-labs/dynamic-auth/commit/dd6e8d41daf632a1b55137f903b6fc99a148c071))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* fix storage sync issues when upgrade to sdk v4 while user is logged in ([#7835](https://github.com/dynamic-labs/dynamic-auth/issues/7835)) ([528b6f9](https://github.com/dynamic-labs/dynamic-auth/commit/528b6f9ce5d0e77d518dcfb7021fc711d2a9e503))
|
|
22
|
+
|
|
2
23
|
### [4.2.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.2.2...v4.2.3) (2025-01-16)
|
|
3
24
|
|
|
4
25
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-aa",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@dynamic-labs/sdk-api-core": "0.0.586",
|
|
22
|
-
"@zerodev/ecdsa-validator": "5.4.
|
|
22
|
+
"@zerodev/ecdsa-validator": "5.4.3",
|
|
23
23
|
"@zerodev/multi-chain-ecdsa-validator": "5.4.2",
|
|
24
|
-
"@zerodev/sdk": "5.4.
|
|
25
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
26
|
-
"@dynamic-labs/ethereum-core": "4.
|
|
27
|
-
"@dynamic-labs/logger": "4.
|
|
28
|
-
"@dynamic-labs/types": "4.
|
|
29
|
-
"@dynamic-labs/utils": "4.
|
|
30
|
-
"@dynamic-labs/wallet-book": "4.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
24
|
+
"@zerodev/sdk": "5.4.14",
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.3.1",
|
|
26
|
+
"@dynamic-labs/ethereum-core": "4.3.1",
|
|
27
|
+
"@dynamic-labs/logger": "4.3.1",
|
|
28
|
+
"@dynamic-labs/types": "4.3.1",
|
|
29
|
+
"@dynamic-labs/utils": "4.3.1",
|
|
30
|
+
"@dynamic-labs/wallet-book": "4.3.1",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.3.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"viem": "^2.21.55"
|
package/src/ZeroDevConnector.cjs
CHANGED
|
@@ -371,12 +371,19 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
371
371
|
const entryPoint = kernelAccount === null || kernelAccount === void 0 ? void 0 : kernelAccount.entryPoint;
|
|
372
372
|
const isV6 = (entryPoint === null || entryPoint === void 0 ? void 0 : entryPoint.address.toLowerCase()) ===
|
|
373
373
|
constants$1.getEntryPoint('0.6').address.toLowerCase();
|
|
374
|
+
const factoryArgs = yield (kernelAccount === null || kernelAccount === void 0 ? void 0 : kernelAccount.getFactoryArgs());
|
|
375
|
+
// we need the initCode in order to simulate the transaction
|
|
376
|
+
// when the contract is not yet deployed
|
|
377
|
+
const initCode = (factoryArgs === null || factoryArgs === void 0 ? void 0 : factoryArgs.factory) && (factoryArgs === null || factoryArgs === void 0 ? void 0 : factoryArgs.factoryData)
|
|
378
|
+
? '0x' +
|
|
379
|
+
factoryArgs.factory.slice(2).toLowerCase() +
|
|
380
|
+
factoryArgs.factoryData.slice(2).toLowerCase()
|
|
381
|
+
: '0x';
|
|
374
382
|
if (isV6) {
|
|
375
383
|
return {
|
|
376
384
|
callData: params.callData,
|
|
377
385
|
callGasLimit: viem.toHex(params.callGasLimit),
|
|
378
|
-
|
|
379
|
-
initCode: '0x',
|
|
386
|
+
initCode,
|
|
380
387
|
maxFeePerGas: viem.toHex(params.maxFeePerGas),
|
|
381
388
|
maxPriorityFeePerGas: viem.toHex(params.maxPriorityFeePerGas),
|
|
382
389
|
nonce: viem.toHex(params.nonce),
|
|
@@ -388,16 +395,12 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
388
395
|
};
|
|
389
396
|
}
|
|
390
397
|
const accountGasLimits = '0x' +
|
|
391
|
-
'
|
|
392
|
-
viem.toHex(params.
|
|
393
|
-
'000000000000000000000000000' + // 27 zeros
|
|
394
|
-
viem.toHex(params.callGasLimit).slice(2);
|
|
398
|
+
viem.toHex(params.verificationGasLimit).slice(2).padStart(32, '0') +
|
|
399
|
+
viem.toHex(params.callGasLimit).slice(2).padStart(32, '0');
|
|
395
400
|
const preVerificationGas = viem.toHex(params.preVerificationGas);
|
|
396
401
|
const gasFees = '0x' +
|
|
397
|
-
'
|
|
398
|
-
viem.toHex(params.
|
|
399
|
-
'0000000000000000000000' + // 22 zeros
|
|
400
|
-
viem.toHex(params.maxFeePerGas).slice(2).padStart(10, '0');
|
|
402
|
+
viem.toHex(params.maxPriorityFeePerGas).slice(2).padStart(32, '0') +
|
|
403
|
+
viem.toHex(params.maxFeePerGas).slice(2).padStart(32, '0');
|
|
401
404
|
const paymasterAndData = params.paymaster
|
|
402
405
|
? '0x' +
|
|
403
406
|
params.paymaster.slice(2).toLowerCase() +
|
|
@@ -409,8 +412,7 @@ class ZeroDevConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
409
412
|
accountGasLimits: accountGasLimits,
|
|
410
413
|
callData: params.callData,
|
|
411
414
|
gasFees: gasFees,
|
|
412
|
-
|
|
413
|
-
initCode: '0x',
|
|
415
|
+
initCode,
|
|
414
416
|
nonce: viem.toHex(params.nonce),
|
|
415
417
|
paymasterAndData: paymasterAndData.toLowerCase(),
|
|
416
418
|
preVerificationGas: preVerificationGas,
|
package/src/ZeroDevConnector.js
CHANGED
|
@@ -367,12 +367,19 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
367
367
|
const entryPoint = kernelAccount === null || kernelAccount === void 0 ? void 0 : kernelAccount.entryPoint;
|
|
368
368
|
const isV6 = (entryPoint === null || entryPoint === void 0 ? void 0 : entryPoint.address.toLowerCase()) ===
|
|
369
369
|
getEntryPoint$1('0.6').address.toLowerCase();
|
|
370
|
+
const factoryArgs = yield (kernelAccount === null || kernelAccount === void 0 ? void 0 : kernelAccount.getFactoryArgs());
|
|
371
|
+
// we need the initCode in order to simulate the transaction
|
|
372
|
+
// when the contract is not yet deployed
|
|
373
|
+
const initCode = (factoryArgs === null || factoryArgs === void 0 ? void 0 : factoryArgs.factory) && (factoryArgs === null || factoryArgs === void 0 ? void 0 : factoryArgs.factoryData)
|
|
374
|
+
? '0x' +
|
|
375
|
+
factoryArgs.factory.slice(2).toLowerCase() +
|
|
376
|
+
factoryArgs.factoryData.slice(2).toLowerCase()
|
|
377
|
+
: '0x';
|
|
370
378
|
if (isV6) {
|
|
371
379
|
return {
|
|
372
380
|
callData: params.callData,
|
|
373
381
|
callGasLimit: toHex(params.callGasLimit),
|
|
374
|
-
|
|
375
|
-
initCode: '0x',
|
|
382
|
+
initCode,
|
|
376
383
|
maxFeePerGas: toHex(params.maxFeePerGas),
|
|
377
384
|
maxPriorityFeePerGas: toHex(params.maxPriorityFeePerGas),
|
|
378
385
|
nonce: toHex(params.nonce),
|
|
@@ -384,16 +391,12 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
384
391
|
};
|
|
385
392
|
}
|
|
386
393
|
const accountGasLimits = '0x' +
|
|
387
|
-
'
|
|
388
|
-
toHex(params.
|
|
389
|
-
'000000000000000000000000000' + // 27 zeros
|
|
390
|
-
toHex(params.callGasLimit).slice(2);
|
|
394
|
+
toHex(params.verificationGasLimit).slice(2).padStart(32, '0') +
|
|
395
|
+
toHex(params.callGasLimit).slice(2).padStart(32, '0');
|
|
391
396
|
const preVerificationGas = toHex(params.preVerificationGas);
|
|
392
397
|
const gasFees = '0x' +
|
|
393
|
-
'
|
|
394
|
-
toHex(params.
|
|
395
|
-
'0000000000000000000000' + // 22 zeros
|
|
396
|
-
toHex(params.maxFeePerGas).slice(2).padStart(10, '0');
|
|
398
|
+
toHex(params.maxPriorityFeePerGas).slice(2).padStart(32, '0') +
|
|
399
|
+
toHex(params.maxFeePerGas).slice(2).padStart(32, '0');
|
|
397
400
|
const paymasterAndData = params.paymaster
|
|
398
401
|
? '0x' +
|
|
399
402
|
params.paymaster.slice(2).toLowerCase() +
|
|
@@ -405,8 +408,7 @@ class ZeroDevConnector extends WalletConnectorBase {
|
|
|
405
408
|
accountGasLimits: accountGasLimits,
|
|
406
409
|
callData: params.callData,
|
|
407
410
|
gasFees: gasFees,
|
|
408
|
-
|
|
409
|
-
initCode: '0x',
|
|
411
|
+
initCode,
|
|
410
412
|
nonce: toHex(params.nonce),
|
|
411
413
|
paymasterAndData: paymasterAndData.toLowerCase(),
|
|
412
414
|
preVerificationGas: preVerificationGas,
|