@pushchain/core 5.1.4-alpha.1 → 5.1.4-alpha.11

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.
Files changed (30) hide show
  1. package/package.json +4 -4
  2. package/src/lib/constants/abi/factoryV1.d.ts +59 -76
  3. package/src/lib/constants/abi/factoryV1.js +0 -517
  4. package/src/lib/constants/abi/feeLocker.evm.d.ts +15 -50
  5. package/src/lib/constants/abi/feeLocker.evm.js +0 -385
  6. package/src/lib/constants/abi/index.d.ts +1 -1
  7. package/src/lib/constants/abi/index.js +1 -2
  8. package/src/lib/constants/abi/prc20.evm.d.ts +0 -53
  9. package/src/lib/constants/abi/prc20.evm.js +1 -42
  10. package/src/lib/constants/abi/uea.svm.d.ts +21 -99
  11. package/src/lib/constants/abi/uea.svm.js +0 -299
  12. package/src/lib/constants/abi/universalGatewayV0.evm.d.ts +45 -104
  13. package/src/lib/constants/abi/universalGatewayV0.evm.js +0 -2149
  14. package/src/lib/index.d.ts +1 -1
  15. package/src/lib/orchestrator/internals/cascade.d.ts +4 -2
  16. package/src/lib/orchestrator/internals/cascade.js +34 -18
  17. package/src/lib/orchestrator/internals/execute-standard.js +5 -1
  18. package/src/lib/orchestrator/internals/gas-calculator.d.ts +9 -0
  19. package/src/lib/orchestrator/internals/gas-calculator.js +94 -0
  20. package/src/lib/orchestrator/internals/route-handlers.js +88 -57
  21. package/src/lib/orchestrator/orchestrator.d.ts +5 -3
  22. package/src/lib/orchestrator/orchestrator.js +2 -12
  23. package/src/lib/orchestrator/orchestrator.types.d.ts +8 -15
  24. package/src/lib/progress-hook/progress-hook.js +1 -1
  25. package/src/lib/push-chain/push-chain.d.ts +5 -6
  26. package/src/lib/push-chain/push-chain.js +4 -3
  27. package/src/lib/universal/account/account.d.ts +16 -8
  28. package/src/lib/universal/account/account.js +118 -73
  29. package/src/lib/universal/signer/signer.js +1 -1
  30. package/src/lib/universal/universal.types.d.ts +2 -2
@@ -106,6 +106,14 @@ export type ExecuteParams = {
106
106
  * @internal
107
107
  */
108
108
  _skipFeeLocking?: boolean;
109
+ /**
110
+ * Internal: Minimum fee-locking deposit in USD (8 decimals).
111
+ * Overrides the default $1 floor when the caller needs a larger deposit
112
+ * (e.g., Route 2 needs enough UPC for the outbound swap).
113
+ * Still capped at $10 by lockFee.
114
+ * @internal
115
+ */
116
+ _minimumDepositUsd?: bigint;
109
117
  };
110
118
  /**
111
119
  * New Universal Transaction Receipt interface with prioritized field ordering
@@ -465,10 +473,6 @@ export interface PreparedUniversalTx {
465
473
  deadline: bigint;
466
474
  /** Internal hop descriptor for cascade nesting @internal */
467
475
  _hop: HopDescriptor;
468
- /** Chain additional transactions after this one (cascade) */
469
- thenOn: (nextTx: PreparedUniversalTx) => CascadedTransactionBuilder;
470
- /** Execute this prepared transaction */
471
- send: () => Promise<UniversalTxResponse>;
472
476
  }
473
477
  /**
474
478
  * @deprecated Use CascadedTxResponse instead.
@@ -485,17 +489,6 @@ export interface MultiChainTxResponse {
485
489
  status: 'pending' | 'confirmed' | 'failed';
486
490
  }[];
487
491
  }
488
- /**
489
- * Builder for composing cascaded (nested) multi-chain transactions.
490
- * Each call to thenOn() adds another hop to the cascade.
491
- * send() composes all hops bottom-to-top and executes a single Push Chain tx.
492
- */
493
- export interface CascadedTransactionBuilder {
494
- /** Add another hop to the cascade */
495
- thenOn: (nextTx: PreparedUniversalTx) => CascadedTransactionBuilder;
496
- /** Compose all hops bottom-to-top and execute the single initial tx */
497
- send: () => Promise<CascadedTxResponse>;
498
- }
499
492
  /**
500
493
  * Response for cascaded multi-chain transactions.
501
494
  * Contains the initial tx and tracking info for all hops.
@@ -35,7 +35,7 @@ const RAW_HOOKS = {
35
35
  [progress_hook_types_1.PROGRESS_HOOK.SEND_TX_03_01]: () => ({
36
36
  id: progress_hook_types_1.PROGRESS_HOOK.SEND_TX_03_01,
37
37
  title: 'Resolving UEA',
38
- message: 'Resolving Execution Account (UEA) – computing address, checking deployment status and balance',
38
+ message: 'Resolving Executor Account (UEA) – computing address, checking deployment status and balance',
39
39
  response: null,
40
40
  level: 'INFO',
41
41
  }),
@@ -6,7 +6,7 @@ import { TypedData, TypedDataDomain } from 'viem';
6
6
  import { ProgressEvent } from '../progress-hook/progress-hook.types';
7
7
  import type { AccountStatus } from '../orchestrator/orchestrator.types';
8
8
  import { MoveableToken, PayableToken, ConversionQuote, MoveableTokenAccessor, PayableTokenAccessor } from '../constants/tokens';
9
- import type { PreparedUniversalTx, CascadedTransactionBuilder } from '../orchestrator/orchestrator.types';
9
+ import type { PreparedUniversalTx, CascadedTxResponse } from '../orchestrator/orchestrator.types';
10
10
  /**
11
11
  * @class PushChain
12
12
  *
@@ -71,15 +71,14 @@ export declare class PushChain {
71
71
  sendTransaction: Orchestrator['execute'];
72
72
  /**
73
73
  * Prepare a universal transaction without executing it.
74
- * Returns a PreparedUniversalTx that can be chained with thenOn() or sent.
74
+ * Returns a PreparedUniversalTx that can be passed to executeTransactions.
75
75
  */
76
76
  prepareTransaction: Orchestrator['prepareTransaction'];
77
77
  /**
78
- * Execute multiple transactions in sequence across chains.
79
- * Accepts PreparedUniversalTx (from prepareTransaction) and returns
80
- * a CascadedTransactionBuilder that supports .thenOn() for chaining.
78
+ * Execute one or more prepared transactions as a cascade across chains.
79
+ * Accepts an array of PreparedUniversalTx (from prepareTransaction).
81
80
  */
82
- executeTransactions: (firstTx: PreparedUniversalTx) => CascadedTransactionBuilder;
81
+ executeTransactions: (txs: PreparedUniversalTx[]) => Promise<CascadedTxResponse>;
83
82
  /**
84
83
  * Tracks a transaction by hash on Push Chain
85
84
  */
@@ -87,12 +87,12 @@ class PushChain {
87
87
  }
88
88
  return orchestrator.prepareTransaction.bind(orchestrator)(params);
89
89
  },
90
- executeTransactions: (firstTx) => {
90
+ executeTransactions: (txs) => tslib_1.__awaiter(this, void 0, void 0, function* () {
91
91
  if (this.isReadMode) {
92
92
  throw new Error('Read only mode cannot call executeTransactions function');
93
93
  }
94
- return orchestrator.createCascadedBuilder([firstTx]);
95
- },
94
+ return orchestrator.createCascadedBuilder(txs).send();
95
+ }),
96
96
  trackTransaction: (txHash, options) => {
97
97
  return orchestrator.trackTransaction.bind(orchestrator)(txHash, options);
98
98
  },
@@ -400,6 +400,7 @@ class PushChain {
400
400
  // Stored on instance so consumers can await it if needed: await client.accountStatusReady
401
401
  const ACCOUNT_STATUS_TIMEOUT = 30000;
402
402
  instance.accountStatusReady = Promise.race([
403
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
403
404
  instance.getAccountStatus().then(() => { }),
404
405
  new Promise((_, reject) => setTimeout(() => reject(new Error('Account status fetch timed out')), ACCOUNT_STATUS_TIMEOUT)),
405
406
  ]).catch(() => {
@@ -69,29 +69,37 @@ export declare function convertExecutorToOrigin(executorAddress: string, options
69
69
  _internal?: boolean;
70
70
  }): Promise<OriginAccountInfo>;
71
71
  /**
72
- * Derive the executor account (UEA or CEA) for a given origin account.
72
+ * Derive the executor account (UEA or CEA) for a given account.
73
73
  *
74
- * @param account - CAIP-10 formatted address string (e.g., "eip155:11155111:0xABC...")
75
- * @param options.chain - Target chain for CEA derivation. If omitted, derives UEA on Push Chain.
74
+ * - If account is on an external chain (Ethereum, Solana, etc.):
75
+ * Computes the UEA on Push Chain via the factory contract's computeUEA.
76
+ * If options.chain is an external chain, further derives the CEA on that chain.
77
+ *
78
+ * - If account is on Push Chain:
79
+ * Returns the address as-is (it's already a UEA or Push EOA).
80
+ * If options.chain is an external chain, derives the CEA on that chain.
81
+ *
82
+ * @param account - UniversalAccount with chain and address.
83
+ * @param options.chain - Target external chain for CEA derivation. If omitted, returns UEA.
76
84
  * @param options.skipNetworkCheck - If true, skip deployment check and return deployed: false.
77
85
  * @returns The derived executor account address and deployment status.
78
86
  */
79
- export declare function deriveExecutorAccount(account: string, options?: {
87
+ export declare function deriveExecutorAccount(account: UniversalAccount, options?: {
80
88
  chain?: CHAIN;
81
89
  skipNetworkCheck?: boolean;
82
90
  }): Promise<DerivedExecutorAccount>;
83
91
  /**
84
92
  * Resolve the controller (origin) accounts for a given executor address.
85
93
  *
86
- * Given a UEA or CEA address (as CAIP-10), resolves the full controller chain
94
+ * Given a UEA or CEA plain address, resolves the full controller chain
87
95
  * back to the origin account.
88
96
  *
89
- * @param account - CAIP-10 formatted address string of the executor account
90
- * @param options.chain - Supplementary chain context (chain info is in CAIP-10)
97
+ * @param address - Plain address string of the executor account (e.g., "0xABC...")
98
+ * @param options.chain - Chain context. If external chain, address is treated as CEA on that chain. If omitted or Push chain, address is treated as UEA on Push Chain.
91
99
  * @param options.skipNetworkCheck - If true, skip existence checks, set exists: false
92
100
  * @returns Resolved accounts in the controller chain
93
101
  */
94
- export declare function resolveControllerAccount(account: string, options?: {
102
+ export declare function resolveControllerAccount(address: string, options?: {
95
103
  chain?: CHAIN;
96
104
  skipNetworkCheck?: boolean;
97
105
  }): Promise<ResolvedControllerAccounts>;
@@ -10,6 +10,7 @@ exports.deriveExecutorAccount = deriveExecutorAccount;
10
10
  exports.resolveControllerAccount = resolveControllerAccount;
11
11
  const tslib_1 = require("tslib");
12
12
  const viem_1 = require("viem");
13
+ const web3_js_1 = require("@solana/web3.js");
13
14
  const chain_1 = require("../../constants/chain");
14
15
  const enums_1 = require("../../constants/enums");
15
16
  const bs58_1 = require("../../internal/bs58");
@@ -431,120 +432,161 @@ function getChainName(chain) {
431
432
  return entry ? entry[0] : chain;
432
433
  }
433
434
  /**
434
- * Derive the executor account (UEA or CEA) for a given origin account.
435
+ * Derive the SVM CEA (PDA) for a UEA address on a Solana-based chain.
435
436
  *
436
- * @param account - CAIP-10 formatted address string (e.g., "eip155:11155111:0xABC...")
437
- * @param options.chain - Target chain for CEA derivation. If omitted, derives UEA on Push Chain.
437
+ * Solana doesn't use a CEAFactory contract — instead, the CEA is a
438
+ * Program Derived Address (PDA) with seeds: ["push_identity", ueaBytes]
439
+ * and the SVM gateway program as the program ID.
440
+ *
441
+ * @param ueaAddress - The UEA (or Push EOA) hex address (20 bytes).
442
+ * @param targetChain - The SVM target chain.
443
+ * @param skipNetworkCheck - Whether to skip deployment status check.
444
+ * @returns The derived 32-byte Solana PDA address (as 0x-prefixed hex) and deployment status.
445
+ */
446
+ function deriveSvmCeaPda(ueaAddress, targetChain, skipNetworkCheck) {
447
+ const gatewayAddress = chain_1.CHAIN_INFO[targetChain].lockerContract;
448
+ if (!gatewayAddress) {
449
+ throw new Error(`SVM gateway program not configured for chain ${targetChain}`);
450
+ }
451
+ const gatewayProgramId = new web3_js_1.PublicKey(gatewayAddress);
452
+ const ueaBytes = Buffer.from(ueaAddress.slice(2), 'hex'); // 20 bytes
453
+ const [ceaPda] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('push_identity'), ueaBytes], gatewayProgramId);
454
+ const ceaPdaHex = ('0x' +
455
+ Buffer.from(ceaPda.toBytes()).toString('hex'));
456
+ return { address: ceaPdaHex, deployed: skipNetworkCheck ? null : null };
457
+ }
458
+ /**
459
+ * Derive the executor account (UEA or CEA) for a given account.
460
+ *
461
+ * - If account is on an external chain (Ethereum, Solana, etc.):
462
+ * Computes the UEA on Push Chain via the factory contract's computeUEA.
463
+ * If options.chain is an external chain, further derives the CEA on that chain.
464
+ *
465
+ * - If account is on Push Chain:
466
+ * Returns the address as-is (it's already a UEA or Push EOA).
467
+ * If options.chain is an external chain, derives the CEA on that chain.
468
+ *
469
+ * @param account - UniversalAccount with chain and address.
470
+ * @param options.chain - Target external chain for CEA derivation. If omitted, returns UEA.
438
471
  * @param options.skipNetworkCheck - If true, skip deployment check and return deployed: false.
439
472
  * @returns The derived executor account address and deployment status.
440
473
  */
441
474
  function deriveExecutorAccount(account, options) {
442
475
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
443
476
  var _a;
444
- const { chain: originChain, address } = fromChainAgnostic(account);
445
477
  const skipNetworkCheck = (_a = options === null || options === void 0 ? void 0 : options.skipNetworkCheck) !== null && _a !== void 0 ? _a : false;
446
478
  const targetChain = options === null || options === void 0 ? void 0 : options.chain;
447
- // If target chain is external, derive CEA on that chain
448
- if (targetChain && !isPushChain(targetChain)) {
449
- // First get the UEA on Push Chain
479
+ const { chain, address } = account;
480
+ // --- Case 1: Input is on an external chain ---
481
+ if (!isPushChain(chain)) {
482
+ const { vm, chainId } = chain_1.CHAIN_INFO[chain];
483
+ const pushNetwork = getPushNetworkFromChain(chain);
484
+ // Check cache for previously computed UEA
485
+ const cachedUea = accountCache.get(cache_1.CacheKeys.ueaAddressOnchain(chain, address, pushNetwork, vm));
450
486
  let ueaAddress;
451
- if (isPushChain(originChain)) {
452
- ueaAddress = address;
487
+ if (cachedUea) {
488
+ ueaAddress = cachedUea;
453
489
  }
454
490
  else {
455
- const ueaResult = yield deriveExecutorAccount(account);
456
- ueaAddress = ueaResult.address;
491
+ // Compute UEA via factory contract
492
+ const pushChainKey = pushNetworkToChainKey(pushNetwork);
493
+ const pushClient = new push_client_1.PushClient({
494
+ rpcUrls: chain_1.CHAIN_INFO[pushChainKey].defaultRPC,
495
+ network: pushNetwork,
496
+ });
497
+ ueaAddress = yield pushClient.readContract({
498
+ address: pushClient.pushChainInfo.factoryAddress,
499
+ abi: factoryV1_1.FACTORY_V1,
500
+ functionName: 'computeUEA',
501
+ args: [
502
+ {
503
+ chainNamespace: chain_1.VM_NAMESPACE[vm],
504
+ chainId: chainId,
505
+ owner: vm === enums_1.VM.EVM
506
+ ? address
507
+ : vm === enums_1.VM.SVM
508
+ ? (0, viem_1.bytesToHex)(Uint8Array.from(bs58_1.bs58.decode(address)))
509
+ : address,
510
+ },
511
+ ],
512
+ });
513
+ // Cache the computed address
514
+ accountCache.set(cache_1.CacheKeys.ueaAddressOnchain(chain, address, pushNetwork, vm), ueaAddress);
457
515
  }
458
- // Get CEA on the target external chain
459
- const { cea, isDeployed } = yield (0, cea_utils_1.getCEAAddress)(ueaAddress, targetChain);
460
- return { address: cea, deployed: skipNetworkCheck ? false : isDeployed };
461
- }
462
- // If origin is Push chain, return the address directly
463
- if (isPushChain(originChain)) {
516
+ // If target chain is external, derive CEA from the computed UEA
517
+ if (targetChain && !isPushChain(targetChain)) {
518
+ // SVM chains use PDA derivation, not CEAFactory
519
+ if (chain_1.CHAIN_INFO[targetChain].vm === enums_1.VM.SVM) {
520
+ return deriveSvmCeaPda(ueaAddress, targetChain, skipNetworkCheck);
521
+ }
522
+ const { cea, isDeployed } = yield (0, cea_utils_1.getCEAAddress)(ueaAddress, targetChain);
523
+ return { address: cea, deployed: skipNetworkCheck ? null : isDeployed };
524
+ }
525
+ // Return UEA with deployment check
464
526
  if (skipNetworkCheck) {
465
- return { address: address, deployed: false };
527
+ return { address: ueaAddress, deployed: null };
466
528
  }
467
- const pushNetwork = getPushNetworkFromChain(originChain);
468
529
  const pushChainKey = pushNetworkToChainKey(pushNetwork);
469
530
  const pushClient = new push_client_1.PushClient({
470
531
  rpcUrls: chain_1.CHAIN_INFO[pushChainKey].defaultRPC,
471
532
  network: pushNetwork,
472
533
  });
473
534
  const byteCode = yield pushClient.publicClient.getCode({
474
- address: address,
535
+ address: ueaAddress,
475
536
  });
476
- return { address: address, deployed: byteCode !== undefined };
537
+ const isDeployed = byteCode !== undefined;
538
+ accountCache.set(cache_1.CacheKeys.deploymentStatus(ueaAddress), isDeployed);
539
+ return { address: ueaAddress, deployed: isDeployed };
477
540
  }
478
- // Origin is external chain → compute UEA on Push Chain
479
- const { vm, chainId } = chain_1.CHAIN_INFO[originChain];
480
- const pushNetwork = getPushNetworkFromChain(originChain);
481
- // Check cache
482
- const cachedAddress = accountCache.get(cache_1.CacheKeys.ueaAddressOnchain(originChain, address, pushNetwork, vm));
483
- if (cachedAddress) {
484
- if (skipNetworkCheck) {
485
- return { address: cachedAddress, deployed: false };
486
- }
487
- const cachedDeploymentStatus = accountCache.get(cache_1.CacheKeys.deploymentStatus(cachedAddress));
488
- if (cachedDeploymentStatus !== null) {
489
- return {
490
- address: cachedAddress,
491
- deployed: cachedDeploymentStatus,
492
- };
541
+ // --- Case 2: Input is on Push Chain ---
542
+ // If target chain is external, derive CEA
543
+ if (targetChain && !isPushChain(targetChain)) {
544
+ // SVM chains use PDA derivation, not CEAFactory
545
+ if (chain_1.CHAIN_INFO[targetChain].vm === enums_1.VM.SVM) {
546
+ return deriveSvmCeaPda(address, targetChain, skipNetworkCheck);
493
547
  }
548
+ const { cea, isDeployed } = yield (0, cea_utils_1.getCEAAddress)(address, targetChain);
549
+ return { address: cea, deployed: skipNetworkCheck ? null : isDeployed };
494
550
  }
551
+ // Push address, no external target — return with deployment check
552
+ if (skipNetworkCheck) {
553
+ return { address: address, deployed: null };
554
+ }
555
+ const pushNetwork = targetChain && isPushChain(targetChain)
556
+ ? getPushNetworkFromChain(targetChain)
557
+ : getPushNetworkFromChain(chain);
495
558
  const pushChainKey = pushNetworkToChainKey(pushNetwork);
496
559
  const pushClient = new push_client_1.PushClient({
497
560
  rpcUrls: chain_1.CHAIN_INFO[pushChainKey].defaultRPC,
498
561
  network: pushNetwork,
499
562
  });
500
- const computedAddress = yield pushClient.readContract({
501
- address: pushClient.pushChainInfo.factoryAddress,
502
- abi: factoryV1_1.FACTORY_V1,
503
- functionName: 'computeUEA',
504
- args: [
505
- {
506
- chainNamespace: chain_1.VM_NAMESPACE[vm],
507
- chainId: chainId,
508
- owner: vm === enums_1.VM.EVM
509
- ? address
510
- : vm === enums_1.VM.SVM
511
- ? (0, viem_1.bytesToHex)(Uint8Array.from(bs58_1.bs58.decode(address)))
512
- : address,
513
- },
514
- ],
515
- });
516
- // Cache the computed address
517
- accountCache.set(cache_1.CacheKeys.ueaAddressOnchain(originChain, address, pushNetwork, vm), computedAddress);
518
- if (skipNetworkCheck) {
519
- return { address: computedAddress, deployed: false };
520
- }
521
563
  const byteCode = yield pushClient.publicClient.getCode({
522
- address: computedAddress,
564
+ address: address,
523
565
  });
524
- const isDeployed = byteCode !== undefined;
525
- // Cache the deployment status
526
- accountCache.set(cache_1.CacheKeys.deploymentStatus(computedAddress), isDeployed);
527
- return { address: computedAddress, deployed: isDeployed };
566
+ return {
567
+ address: address,
568
+ deployed: byteCode !== undefined,
569
+ };
528
570
  });
529
571
  }
530
572
  /**
531
573
  * Resolve the controller (origin) accounts for a given executor address.
532
574
  *
533
- * Given a UEA or CEA address (as CAIP-10), resolves the full controller chain
575
+ * Given a UEA or CEA plain address, resolves the full controller chain
534
576
  * back to the origin account.
535
577
  *
536
- * @param account - CAIP-10 formatted address string of the executor account
537
- * @param options.chain - Supplementary chain context (chain info is in CAIP-10)
578
+ * @param address - Plain address string of the executor account (e.g., "0xABC...")
579
+ * @param options.chain - Chain context. If external chain, address is treated as CEA on that chain. If omitted or Push chain, address is treated as UEA on Push Chain.
538
580
  * @param options.skipNetworkCheck - If true, skip existence checks, set exists: false
539
581
  * @returns Resolved accounts in the controller chain
540
582
  */
541
- function resolveControllerAccount(account, options) {
583
+ function resolveControllerAccount(address, options) {
542
584
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
543
585
  var _a;
544
- const { chain: inputChain, address } = fromChainAgnostic(account);
586
+ const inputChain = options === null || options === void 0 ? void 0 : options.chain;
545
587
  const skipNetworkCheck = (_a = options === null || options === void 0 ? void 0 : options.skipNetworkCheck) !== null && _a !== void 0 ? _a : false;
546
- // Case A: Input is on an external chain (CEA)
547
- if (!isPushChain(inputChain)) {
588
+ // Case A: External chain → address is a CEA on that chain
589
+ if (inputChain && !isPushChain(inputChain)) {
548
590
  // Look up UEA on Push Chain from CEA
549
591
  const pushAccountAddress = yield (0, cea_utils_1.getPushAccountForCEA)(address, inputChain);
550
592
  if (pushAccountAddress === '0x0000000000000000000000000000000000000000') {
@@ -597,9 +639,12 @@ function resolveControllerAccount(account, options) {
597
639
  }
598
640
  return { accounts };
599
641
  }
600
- // Case B: Input is on Push Chain (UEA or EOA)
601
- const pushNetwork = getPushNetworkFromChain(inputChain);
642
+ // Case B: No chain or Push chain → address is a UEA or EOA on Push Chain
643
+ const pushNetwork = inputChain && isPushChain(inputChain)
644
+ ? getPushNetworkFromChain(inputChain)
645
+ : enums_1.PUSH_NETWORK.TESTNET_DONUT;
602
646
  const pushChainKey = pushNetworkToChainKey(pushNetwork);
647
+ const pushChainId = pushChainKey;
603
648
  const RPC_URL = chain_1.PUSH_CHAIN_INFO[pushChainKey].defaultRPC[0];
604
649
  const FACTORY_ADDRESS = chain_1.PUSH_CHAIN_INFO[pushChainKey].factoryAddress;
605
650
  const client = (0, viem_1.createPublicClient)({ transport: (0, viem_1.http)(RPC_URL) });
@@ -639,8 +684,8 @@ function resolveControllerAccount(account, options) {
639
684
  return {
640
685
  accounts: [
641
686
  {
642
- chain: inputChain,
643
- chainName: getChainName(inputChain),
687
+ chain: pushChainId,
688
+ chainName: getChainName(pushChainId),
644
689
  address: address,
645
690
  type: 'uoa',
646
691
  exists: skipNetworkCheck ? false : true,
@@ -23,7 +23,7 @@ const bs58_1 = require("../../internal/bs58");
23
23
  * viem uses `gas` while ethers expects `gasLimit`.
24
24
  */
25
25
  function toEthersTxRequest(viemTx) {
26
- const _a = viemTx, { gas } = _a, rest = tslib_1.__rest(_a, ["gas"]);
26
+ const _a = viemTx, { gas, type } = _a, rest = tslib_1.__rest(_a, ["gas", "type"]);
27
27
  return Object.assign(Object.assign({}, rest), { gasLimit: gas });
28
28
  }
29
29
  /**
@@ -137,8 +137,8 @@ export type AccountRole = 'controller';
137
137
  export interface DerivedExecutorAccount {
138
138
  /** The computed executor address on Push Chain (or CEA on external chain) */
139
139
  address: `0x${string}`;
140
- /** Whether the executor account is deployed on-chain */
141
- deployed: boolean;
140
+ /** Whether the executor account is deployed on-chain. null when skipNetworkCheck is true. */
141
+ deployed: boolean | null;
142
142
  }
143
143
  /**
144
144
  * A single resolved account entry in the resolveControllerAccount response.