FRE-600: Fix code review blockers

- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-25 00:08:01 -04:00
parent 65b552bb08
commit 7c684a42cc
48450 changed files with 5679671 additions and 383 deletions

81
node_modules/viem/zksync/errors/bridge.ts generated vendored Normal file
View File

@@ -0,0 +1,81 @@
import { BaseError } from '../../errors/base.js'
import type { Hash } from '../../types/misc.js'
export type BaseFeeHigherThanValueErrorType = BaseFeeHigherThanValueError & {
name: 'BaseFeeHigherThanValueError'
}
export class BaseFeeHigherThanValueError extends BaseError {
constructor(baseCost: bigint, value: bigint) {
super(
[
'The base cost of performing the priority operation is higher than the provided transaction value parameter.',
'',
`Base cost: ${baseCost}.`,
`Provided value: ${value}.`,
].join('\n'),
{ name: 'BaseFeeHigherThanValueError' },
)
}
}
export type TxHashNotFoundInLogsErrorType = BaseFeeHigherThanValueError & {
name: 'TxHashNotFoundInLogsError'
}
export class TxHashNotFoundInLogsError extends BaseError {
constructor() {
super('The transaction hash not found in event logs.', {
name: 'TxHashNotFoundInLogsError',
})
}
}
export type WithdrawalLogNotFoundErrorType = WithdrawalLogNotFoundError & {
name: 'WithdrawalLogNotFoundError'
}
export class WithdrawalLogNotFoundError extends BaseError {
constructor({ hash }: { hash: Hash }) {
super(
[
`Withdrawal log with hash ${hash} not found.`,
'',
'Either the withdrawal transaction is still processing or it did not finish successfully.',
].join('\n'),
{ name: 'WithdrawalLogNotFoundError' },
)
}
}
export type CannotClaimSuccessfulDepositErrorType =
CannotClaimSuccessfulDepositError & {
name: 'CannotClaimSuccessfulDepositError'
}
export class CannotClaimSuccessfulDepositError extends BaseError {
constructor({ hash }: { hash: Hash }) {
super([`Cannot claim successful deposit: ${hash}.`].join('\n'), {
name: 'CannotClaimSuccessfulDepositError',
})
}
}
export type LogProofNotFoundErrorType = LogProofNotFoundError & {
name: 'LogProofNotFoundError'
}
export class LogProofNotFoundError extends BaseError {
constructor({ hash, index }: { hash: Hash; index: number }) {
super(
[`Log proof not found for hash ${hash} and index ${index}.`].join('\n'),
{ name: 'LogProofNotFoundError' },
)
}
}
export type L2BridgeNotFoundErrorType = L2BridgeNotFoundError & {
name: 'L2BridgeNotFoundError'
}
export class L2BridgeNotFoundError extends BaseError {
constructor() {
super(['L2 bridge address not found.'].join('\n'), {
name: 'L2BridgeNotFoundError',
})
}
}

46
node_modules/viem/zksync/errors/bytecode.ts generated vendored Normal file
View File

@@ -0,0 +1,46 @@
import { BaseError } from '../../errors/base.js'
export type BytecodeLengthExceedsMaxSizeErrorType =
BytecodeLengthExceedsMaxSizeError & {
name: 'BytecodeLengthExceedsMaxSizeError'
}
export class BytecodeLengthExceedsMaxSizeError extends BaseError {
constructor({
givenLength,
maxBytecodeSize,
}: { givenLength: number; maxBytecodeSize: bigint }) {
super(
`Bytecode cannot be longer than ${maxBytecodeSize} bytes. Given length: ${givenLength}`,
{ name: 'BytecodeLengthExceedsMaxSizeError' },
)
}
}
export type BytecodeLengthInWordsMustBeOddErrorType =
BytecodeLengthInWordsMustBeOddError & {
name: 'BytecodeLengthInWordsMustBeOddError'
}
export class BytecodeLengthInWordsMustBeOddError extends BaseError {
constructor({ givenLengthInWords }: { givenLengthInWords: number }) {
super(
`Bytecode length in 32-byte words must be odd. Given length in words: ${givenLengthInWords}`,
{ name: 'BytecodeLengthInWordsMustBeOddError' },
)
}
}
export type BytecodeLengthMustBeDivisibleBy32ErrorType =
BytecodeLengthMustBeDivisibleBy32Error & {
name: 'BytecodeLengthMustBeDivisibleBy32Error'
}
export class BytecodeLengthMustBeDivisibleBy32Error extends BaseError {
constructor({ givenLength }: { givenLength: number }) {
super(
`The bytecode length in bytes must be divisible by 32. Given length: ${givenLength}`,
{ name: 'BytecodeLengthMustBeDivisibleBy32Error' },
)
}
}

15
node_modules/viem/zksync/errors/token-is-eth.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import { BaseError } from '../../errors/base.js'
export type TokenIsEthErrorType = TokenIsEthError & {
name: 'TokenIsEthError'
}
export class TokenIsEthError extends BaseError {
constructor() {
super(
['Token is an ETH token.', '', 'ETH token cannot be retrieved.'].join(
'\n',
),
{ name: 'TokenIsEthError' },
)
}
}

20
node_modules/viem/zksync/errors/transaction.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import { BaseError } from '../../errors/base.js'
export type InvalidEip712TransactionErrorType =
InvalidEip712TransactionError & {
name: 'InvalidEip712TransactionError'
}
export class InvalidEip712TransactionError extends BaseError {
constructor() {
super(
[
'Transaction is not an EIP712 transaction.',
'',
'Transaction must:',
' - include `type: "eip712"`',
' - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`',
].join('\n'),
{ name: 'InvalidEip712TransactionError' },
)
}
}