From 45d1f7ff76587527ac803e262b1b0128ba353c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Blanchemain?= Date: Sun, 2 Jun 2024 09:01:47 -0700 Subject: [PATCH] feat: added jotbot-generated code documentation --- package.json | 6 +- src/abi/sequencerInboxABI.ts | 5 + src/arbAggregatorPrepareTransactionRequest.ts | 49 + src/arbAggregatorReadContract.ts | 19 + src/arbGasInfoReadContract.ts | 17 + src/arbOwnerPrepareTransactionRequest.ts | 38 +- src/arbOwnerReadContract.ts | 16 + src/chains.ts | 7 + src/constants.ts | 16 + src/contracts.ts | 59 +- src/createRollup.ts | 7 +- src/createRollupDefaults.ts | 17 + ...eateRollupEnoughCustomFeeTokenAllowance.ts | 25 +- src/createRollupFetchCoreContracts.ts | 18 + src/createRollupFetchTransactionHash.ts | 10 + src/createRollupGetCallValue.ts | 25 + src/createRollupGetMaxDataSize.ts | 9 + src/createRollupPrepareConfig.ts | 41 +- ...ustomFeeTokenApprovalTransactionRequest.ts | 25 + ...eateRollupPrepareDeploymentParamsConfig.ts | 63 +- ...upPrepareDeploymentParamsConfigDefaults.ts | 17 + src/createRollupPrepareTransaction.ts | 19 + src/createRollupPrepareTransactionReceipt.ts | 21 + src/createRollupPrepareTransactionRequest.ts | 28 + src/createTokenBridge-ethers.ts | 83 + src/createTokenBridge-testHelpers.ts | 4 + src/createTokenBridge.ts | 29 +- ...okenBridgeEnoughCustomFeeTokenAllowance.ts | 25 +- ...ateTokenBridgeFetchTokenBridgeContracts.ts | 19 + ...ustomFeeTokenApprovalTransactionRequest.ts | 22 + ...PrepareSetWethGatewayTransactionReceipt.ts | 38 + ...PrepareSetWethGatewayTransactionRequest.ts | 30 + ...ateTokenBridgePrepareTransactionReceipt.ts | 67 + ...ateTokenBridgePrepareTransactionRequest.ts | 27 + src/decorators/arbAggregatorActions.ts | 18 + src/decorators/arbGasInfoPublicActions.ts | 15 + src/decorators/arbOwnerPublicActions.ts | 24 + .../rollupAdminLogicPublicActions.ts | 27 + src/decorators/sequencerInboxActions.ts | 30 +- ...nsactionReceiptToViemTransactionReceipt.ts | 17 + src/ethers-compat/publicClientToProvider.ts | 24 +- ...actionReceiptToEthersTransactionReceipt.ts | 12 + src/getDefaultConfirmPeriodBlocks.ts | 7 + ...etDefaultSequencerInboxMaxTimeVariation.ts | 21 + src/package.json | 2 +- src/parentChainIsMainnet.ts | 6 + src/prepareChainConfig.ts | 39 + src/prepareKeyset.ts | 27 + src/prepareNodeConfig.ts | 58 +- ...llupAdminLogicPrepareTransactionRequest.ts | 39 + src/rollupAdminLogicReadContract.ts | 31 + src/scripts/generateNodeConfigType.ts | 57 + ...sequencerInboxPrepareTransactionRequest.ts | 36 + src/sequencerInboxReadContract.ts | 24 + src/setValidKeyset.ts | 27 + src/setValidKeysetEncodeFunctionData.ts | 7 + ...setValidKeysetPrepareTransactionRequest.ts | 28 + src/testHelpers.ts | 10 + src/types/ParentChain.ts | 10 + src/upgradeExecutorEncodeFunctionData.ts | 39 +- src/upgradeExecutorFetchPrivilegedAccounts.ts | 4 +- ...torPrepareAddExecutorTransactionRequest.ts | 2 +- ...PrepareRemoveExecutorTransactionRequest.ts | 2 +- src/utils/erc20.ts | 49 + src/utils/gasOverrides.ts | 15 +- src/utils/generateChainId.ts | 9 + src/utils/getArbOSVersion.ts | 4 +- src/utils/getClientVersion.ts | 7 + src/utils/getParentChainLayer.ts | 8 + src/utils/getters.ts | 20 + src/utils/isAnyTrustChainConfig.ts | 9 +- src/utils/isCustomFeeTokenAddress.ts | 7 + src/utils/isCustomFeeTokenChain.ts | 21 +- src/utils/registerNewNetwork.ts | 69 +- src/utils/sanitizePrivateKey.ts | 10 + src/utils/validateChain.ts | 14 + tsconfig.json | 41 +- yarn.lock | 1349 +---------------- 78 files changed, 1708 insertions(+), 1468 deletions(-) diff --git a/package.json b/package.json index 62c4aa9b..51781d91 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,5 @@ { - "workspaces": [ - "src", - "examples/*" - ], - "private": true, + "name": "@arbitrum/orbit-sdk", "type": "module", "scripts": { "prebuild": "rm -rf ./src/dist", diff --git a/src/abi/sequencerInboxABI.ts b/src/abi/sequencerInboxABI.ts index 4b9c8fac..f4b1a9eb 100644 --- a/src/abi/sequencerInboxABI.ts +++ b/src/abi/sequencerInboxABI.ts @@ -1,3 +1,8 @@ +/** + * Variable "sequencerInboxABI" defines the ABI for the Sequencer Inbox + * contract, including error types, events, and functions such as adding a + * sequencer L2 batch and setting valid keysets. + */ export const sequencerInboxABI = [ { inputs: [], name: 'AlreadyInit', type: 'error' }, { diff --git a/src/arbAggregatorPrepareTransactionRequest.ts b/src/arbAggregatorPrepareTransactionRequest.ts index e7e42442..df67754b 100644 --- a/src/arbAggregatorPrepareTransactionRequest.ts +++ b/src/arbAggregatorPrepareTransactionRequest.ts @@ -17,6 +17,16 @@ export type ArbAggregatorEncodeFunctionDataParameters< TFunctionName extends ArbAggregatorPrepareTransactionRequestFunctionName, > = EncodeFunctionDataParameters; +/** + * Encodes function data for the ArbAggregator contract function specified by the given function name. + * + * @template TFunctionName - The name of the function to encode data for. + * @param {ArbAggregatorEncodeFunctionDataParameters} params - The parameters for encoding function data. + * @param {string} params.functionName - The name of the function to encode data for. + * @param {Array} params.args - The arguments to pass to the function. + * @param {Array} params.abi - The ABI of the contract. + * @returns {string} The encoded function data. + */ function arbAggregatorEncodeFunctionData< TFunctionName extends ArbAggregatorPrepareTransactionRequestFunctionName, >({ functionName, abi, args }: ArbAggregatorEncodeFunctionDataParameters) { @@ -33,6 +43,18 @@ type ArbAggregatorPrepareFunctionDataParameters< upgradeExecutor: Address | false; abi: ArbAggregatorAbi; }; + +/** + * Prepares function data for the ArbAggregator contract function specified by the given function name. + * + * @template TFunctionName - The name of the function to prepare data for. + * @param {ArbAggregatorPrepareFunctionDataParameters} params - The parameters for preparing function data. + * @param {string} params.functionName - The name of the function to prepare data for. + * @param {Array} params.args - The arguments to pass to the function. + * @param {Array} params.abi - The ABI of the contract. + * @param {Address|false} params.upgradeExecutor - The address of the upgrade executor or false if not applicable. + * @returns {Object} The prepared function data including the target address, encoded data, and value. + */ function arbAggregatorPrepareFunctionData< TFunctionName extends ArbAggregatorPrepareTransactionRequestFunctionName, >(params: ArbAggregatorPrepareFunctionDataParameters) { @@ -68,6 +90,33 @@ export type ArbAggregatorPrepareTransactionRequestParameters< > = Omit, 'abi'> & { account: Address; }; + +/** + * Prepares a transaction request for the ArbAggregator contract function specified by the given function name. + * It generates the necessary data and value for the transaction based on the input parameters and prepares the + * transaction request using the provided client and account information. + * + * @template TFunctionName - The name of the function to prepare the transaction request for. + * @template TChain - The type of the chain. + * @param {PublicClient} client - The public client used to prepare the transaction request. + * @param {ArbAggregatorPrepareTransactionRequestParameters} params - The parameters for preparing the transaction request. + * @param {string} params.functionName - The name of the function to prepare the transaction request for. + * @param {Array} params.args - The arguments to pass to the function. + * @param {Address|false} params.upgradeExecutor - The address of the upgrade executor or false if not applicable. + * @param {Address} params.account - The account address to use for the transaction. + * @returns {Promise} The prepared transaction request including the chain ID. + * @throws {Error} If the client.chain is undefined. + * + * @example + * const client = new PublicClient(...); + * const params = { + * functionName: 'someFunction', + * args: [arg1, arg2], + * upgradeExecutor: '0xExecutorAddress', + * account: '0xAccountAddress', + * }; + * const request = await arbAggregatorPrepareTransactionRequest(client, params); + */ export async function arbAggregatorPrepareTransactionRequest< TFunctionName extends ArbAggregatorPrepareTransactionRequestFunctionName, TChain extends Chain | undefined, diff --git a/src/arbAggregatorReadContract.ts b/src/arbAggregatorReadContract.ts index 9082cdbc..d33241bf 100644 --- a/src/arbAggregatorReadContract.ts +++ b/src/arbAggregatorReadContract.ts @@ -13,6 +13,25 @@ export type ArbAggregatorReadContractParameters = ReadContractReturnType; +/** + * Reads data from the ArbAggregator smart contract and returns the specified + * result. + * + * @template TChain - The type of the blockchain chain. + * @template TFunctionName - The name of the function to read from the contract. + * @param {PublicClient} client - The public client to interact with the blockchain. + * @param {ArbAggregatorReadContractParameters} params - The parameters for reading the contract. + * @param {TFunctionName} params.functionName - The name of the function to call on the contract. + * @param {Array} [params.args] - The arguments to pass to the contract function. + * @returns {Promise>} - The result from the contract function. + * @example + * const client = new PublicClient(...); + * const result = await arbAggregatorReadContract(client, { + * functionName: 'getTotalStaked', + * args: [], + * }); + * console.log(result); + */ export function arbAggregatorReadContract< TChain extends Chain | undefined, TFunctionName extends ArbAggregatorFunctionName, diff --git a/src/arbGasInfoReadContract.ts b/src/arbGasInfoReadContract.ts index 13db05d1..cf816681 100644 --- a/src/arbGasInfoReadContract.ts +++ b/src/arbGasInfoReadContract.ts @@ -7,12 +7,29 @@ export type ArbGasInfoAbi = typeof arbGasInfo.abi; export type ArbGasInfoFunctionName = GetFunctionName; export type ArbGasInfoReadContractParameters = { + /** + * The name of the function to be called on the ArbGasInfo contract. + */ functionName: TFunctionName; } & GetFunctionArgs; export type ArbGasInfoReadContractReturnType = ReadContractReturnType; +/** + * Reads data from the ArbGasInfo contract on a specified chain and returns the + * result. + * + * @template TChain - The type of the chain, can be a specific chain or undefined. + * @template TFunctionName - The name of the function to be called on the ArbGasInfo contract. + * + * @param {PublicClient} client - The public client to interact with the blockchain. + * @param {ArbGasInfoReadContractParameters} params - The parameters for reading the contract. + * @param {string} params.functionName - The name of the function to be called. + * @param {Array} [params.args] - The arguments to be passed to the function. + * + * @returns {Promise>} - The result of the contract call. + */ export function arbGasInfoReadContract< TChain extends Chain | undefined, TFunctionName extends ArbGasInfoFunctionName, diff --git a/src/arbOwnerPrepareTransactionRequest.ts b/src/arbOwnerPrepareTransactionRequest.ts index 67e1bb97..10a4642f 100644 --- a/src/arbOwnerPrepareTransactionRequest.ts +++ b/src/arbOwnerPrepareTransactionRequest.ts @@ -17,6 +17,16 @@ export type ArbOwnerEncodeFunctionDataParameters< TFunctionName extends ArbOwnerPrepareTransactionRequestFunctionName, > = EncodeFunctionDataParameters; +/** + * Encodes function data for the ArbOwner contract. + * + * @template TFunctionName - The name of the function to encode. + * @param {ArbOwnerEncodeFunctionDataParameters} params - The parameters for encoding the function data. + * @param {string} params.functionName - The name of the function to encode. + * @param {Array} params.args - The arguments for the function. + * @param {Array} params.abi - The ABI of the contract. + * @returns {string} The encoded function data. + */ function arbOwnerEncodeFunctionData< TFunctionName extends ArbOwnerPrepareTransactionRequestFunctionName, >({ functionName, abi, args }: ArbOwnerEncodeFunctionDataParameters) { @@ -27,12 +37,24 @@ function arbOwnerEncodeFunctionData< }); } -type ArbOwnerPrepareFunctionDataParameters< +export type ArbOwnerPrepareFunctionDataParameters< TFunctionName extends ArbOwnerPrepareTransactionRequestFunctionName, > = ArbOwnerEncodeFunctionDataParameters & { upgradeExecutor: Address | false; abi: ArbOwnerAbi; }; + +/** + * Prepares function data for the ArbOwner contract, optionally using an upgrade executor. + * + * @template TFunctionName - The name of the function to prepare data for. + * @param {ArbOwnerPrepareFunctionDataParameters} params - The parameters for preparing the function data. + * @param {string} params.functionName - The name of the function to prepare data for. + * @param {Array} params.args - The arguments for the function. + * @param {Array} params.abi - The ABI of the contract. + * @param {Address|false} params.upgradeExecutor - The address of the upgrade executor or false if not using an upgrade executor. + * @returns {Object} The prepared function data including the target address, data, and value. + */ function arbOwnerPrepareFunctionData< TFunctionName extends ArbOwnerPrepareTransactionRequestFunctionName, >(params: ArbOwnerPrepareFunctionDataParameters) { @@ -67,6 +89,20 @@ export type ArbOwnerPrepareTransactionRequestParameters< account: Address; }; +/** + * Prepares a transaction request for executing a function on the ArbOwner contract. + * + * @template TFunctionName - The name of the function to execute. + * @template TChain - The type of the chain. + * @param {PublicClient} client - The public client to use for the transaction. + * @param {ArbOwnerPrepareTransactionRequestParameters} params - The parameters for preparing the transaction request. + * @param {string} params.functionName - The name of the function to execute. + * @param {Array} params.args - The arguments for the function. + * @param {Address|false} params.upgradeExecutor - The address of the upgrade executor or false if not using an upgrade executor. + * @param {Address} params.account - The address of the account to use for the transaction. + * @returns {Promise} The prepared transaction request including the chain ID. + * @throws Will throw an error if the client chain is undefined. + */ export async function arbOwnerPrepareTransactionRequest< TFunctionName extends ArbOwnerPrepareTransactionRequestFunctionName, TChain extends Chain | undefined, diff --git a/src/arbOwnerReadContract.ts b/src/arbOwnerReadContract.ts index 62a5ff15..4e310bbe 100644 --- a/src/arbOwnerReadContract.ts +++ b/src/arbOwnerReadContract.ts @@ -7,12 +7,28 @@ export type ArbOwnerPublicAbi = typeof arbOwnerPublic.abi; export type ArbOwnerPublicFunctionName = GetFunctionName; export type ArbOwnerReadContractParameters = { + /** + * The name of the function to call on the contract. + */ functionName: TFunctionName; } & GetFunctionArgs; export type ArbOwnerReadContractReturnType = ReadContractReturnType; +/** + * Reads data from a contract owned by an arbitrary owner. + * + * @template TChain - The type of the blockchain chain. + * @template TFunctionName - The name of the function to call on the contract. + * + * @param {PublicClient} client - The public client to use for reading the contract. + * @param {ArbOwnerReadContractParameters} params - The parameters for reading the contract. + * @param {TFunctionName} params.functionName - The name of the function to call on the contract. + * @param {Array} [params.args] - The arguments to pass to the function. + * + * @returns {Promise>} - The result of reading the contract. + */ export function arbOwnerReadContract< TChain extends Chain | undefined, TFunctionName extends ArbOwnerPublicFunctionName, diff --git a/src/chains.ts b/src/chains.ts index eacfb2b5..66b9da56 100644 --- a/src/chains.ts +++ b/src/chains.ts @@ -57,6 +57,13 @@ const nitroTestnodeL3 = defineChain({ testnet: true, }); +/** + * The `chains` variable contains an array of various blockchain configurations, + * including mainnet, testnet, and local nitro-testnode chains. Each chain + * object includes information such as network name, native currency details, + * RPC URLs, and testnet status. It provides a convenient way to access and + * reference different blockchain configurations within the application. + */ export const chains = [ // mainnet mainnet, diff --git a/src/constants.ts b/src/constants.ts index 1d6a30ae..181ad7fc 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,21 @@ import { parseEther } from 'viem'; +/** + * Represents the default retryables fees for rollup transactions. + * + * This constant returns an Ether value representing the default fees + * for retryable transactions in rollups. + * + * @constant {bigint} createRollupDefaultRetryablesFees + */ export const createRollupDefaultRetryablesFees = parseEther('0.125'); +/** + * Represents the default fees for retryable transactions in the TokenBridge. + * + * This constant returns an Ether value representing the default fees + * for retryable transactions in the TokenBridge. + * + * @constant {bigint} createTokenBridgeDefaultRetryablesFees + */ export const createTokenBridgeDefaultRetryablesFees = parseEther('0.02'); diff --git a/src/contracts.ts b/src/contracts.ts index 79f9217a..3f75b7e2 100644 --- a/src/contracts.ts +++ b/src/contracts.ts @@ -11,32 +11,64 @@ import { } from './generated'; import { sequencerInboxABI, rollupAdminLogicABI } from './abi'; +/** + * ERC-20 token contract configuration. + * @property {Array} abi - The ABI of the ERC-20 token contract. + */ export const erc20 = { abi: erc20ABI, }; +/** + * Arbitrum owner configuration. + * @property {Object} arbOwnerConfig - The configuration object for the Arbitrum owner. + * @property {string} address - The address of the Arbitrum owner. + */ export const arbOwner = { ...arbOwnerConfig, address: Object.values(arbOwnerConfig.address)[0], } as const; +/** + * Gas information configuration for the Arbitrum network. + * @property {Object} arbGasInfoConfig - The configuration object for Arbitrum gas information. + * @property {string} address - The address for gas information. + */ export const arbGasInfo = { ...arbGasInfoConfig, address: Object.values(arbGasInfoConfig.address)[0], } as const; +/** + * Public configuration for the Arbitrum owner's address. + * @property {Object} arbOwnerPublicConfig - The configuration object for the Arbitrum owner's public address. + * @property {string} address - The public address of the Arbitrum owner. + */ export const arbOwnerPublic = { ...arbOwnerPublicConfig, address: Object.values(arbOwnerPublicConfig.address)[0], } as const; +/** + * Aggregator configuration for retrieving data from a specified source. + * @property {Object} arbAggregatorConfig - The configuration object for the Arbitrum aggregator. + * @property {string} address - The address of the aggregator. + */ export const arbAggregator = { ...arbAggregatorConfig, address: Object.values(arbAggregatorConfig.address)[0], } as const; +/** + * Rollup creator configuration. + * @property {Object} rollupCreatorConfig - The configuration object for the rollup creator. + */ export const rollupCreator = rollupCreatorConfig; +/** + * Executor for upgrades, calls, and role management. + * @property {Array} abi - The ABI for the upgrade executor contract. + */ export const upgradeExecutor = { abi: parseAbi([ 'function execute(address upgrade, bytes upgradeCallData)', @@ -93,19 +125,6 @@ const tokenBridgeCreatorABI = [ anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'inbox', type: 'address' }, - { - components: [ - { internalType: 'address', name: 'router', type: 'address' }, - { internalType: 'address', name: 'standardGateway', type: 'address' }, - { internalType: 'address', name: 'customGateway', type: 'address' }, - { internalType: 'address', name: 'wethGateway', type: 'address' }, - { internalType: 'address', name: 'weth', type: 'address' }, - ], - indexed: false, - internalType: 'struct L1DeploymentAddresses', - name: 'l1', - type: 'tuple', - }, { components: [ { internalType: 'address', name: 'router', type: 'address' }, @@ -199,15 +218,29 @@ const tokenBridgeCreatorABI = [ }, ] as const; +/** + * Token bridge creator configuration and ABI. + * @property {Object} tokenBridgeCreatorConfig - The configuration object for the token bridge creator. + * @property {Array} abi - The ABI for the token bridge creator contract. + */ export const tokenBridgeCreator = { ...tokenBridgeCreatorConfig, abi: tokenBridgeCreatorABI, } as const; +/** + * Sequencer inbox contract configuration. + * @property {Array} abi - The ABI of the sequencer inbox contract. + */ export const sequencerInbox = { abi: sequencerInboxABI, }; +/** + * Rollup Admin Logic contract configuration. + * @property {Array} abi - The ABI of the Rollup Admin Logic contract. + */ export const rollupAdminLogic = { abi: rollupAdminLogicABI, }; + diff --git a/src/createRollup.ts b/src/createRollup.ts index a42369b6..11faf778 100644 --- a/src/createRollup.ts +++ b/src/createRollup.ts @@ -29,6 +29,11 @@ type EnsureCustomGasTokenAllowanceGrantedToRollupCreatorParams = { * * If not, perform an approval transaction to grant the custom fee token * spend allowance to the Rollup Creator address. + * + * @param {EnsureCustomGasTokenAllowanceGrantedToRollupCreatorParams} params - The parameters required to ensure custom gas token allowance + * @param {Address} params.nativeToken - The native token address + * @param {ParentChainPublicClient} params.parentChainPublicClient - The parent chain public client + * @param {PrivateKeyAccount} params.account - The rollup owner private key account */ async function ensureCustomGasTokenAllowanceGrantedToRollupCreator({ nativeToken, @@ -80,7 +85,7 @@ export type CreateRollupFunctionParams = { /** * @param {Object} createRollupResults - results of the createRollup function * @param {Object} createRollupResults.transaction - the transaction for deploying the core contracts - * @param {Object} createRollupResults.txReceipt - the transaction receipt + * @param {Object} createRollupResults.transactionReceipt - the transaction receipt * @param {Object} createRollupResults.coreContracts - the core contracts */ export type CreateRollupResults = { diff --git a/src/createRollupDefaults.ts b/src/createRollupDefaults.ts index 380bc888..64834dc1 100644 --- a/src/createRollupDefaults.ts +++ b/src/createRollupDefaults.ts @@ -1,7 +1,24 @@ import { zeroAddress, parseGwei } from 'viem'; +/** + * The `defaults` object provides default values for various settings, including + * the native token address, deployment to Layer 2, and maximum fee per gas for + * retryable transactions. + */ export const defaults = { + /** + * The address of the native token. Defaults to zero address. + * @type {string} + */ nativeToken: zeroAddress, + /** + * Whether to deploy factories to Layer 2. Defaults to true. + * @type {boolean} + */ deployFactoriesToL2: true, + /** + * The maximum fee per gas for retryable transactions. Defaults to 0.1 gwei. + * @type {BigInt} + */ maxFeePerGasForRetryables: parseGwei(String('0.1')), }; diff --git a/src/createRollupEnoughCustomFeeTokenAllowance.ts b/src/createRollupEnoughCustomFeeTokenAllowance.ts index 1ce3c325..2cec22e1 100644 --- a/src/createRollupEnoughCustomFeeTokenAllowance.ts +++ b/src/createRollupEnoughCustomFeeTokenAllowance.ts @@ -15,12 +15,35 @@ export type CreateRollupEnoughCustomFeeTokenAllowanceParams = Prettify< }> >; +/** + * Checks if the allowance for a specific native token is enough for creating a rollup with custom fees. + * + * Fetches the allowance using the owner's account and the spender address, which is either provided or fetched + * from the Rollup creator address. The function returns a boolean indicating whether the allowance is greater than + * or equal to the default retryable fees required for creating the rollup. + * + * @param {CreateRollupEnoughCustomFeeTokenAllowanceParams} params - The parameters for checking the allowance. + * @param {Address} params.nativeToken - The address of the native token. + * @param {Address} params.account - The address of the owner's account. + * @param {PublicClient} params.publicClient - The public client used to interact with the blockchain. + * @param {Address} [params.rollupCreatorAddressOverride] - Optional override for the Rollup creator address. + * + * @returns {Promise} - A promise that resolves to a boolean indicating if the allowance is sufficient. + * + * @example + * const isAllowanceEnough = await createRollupEnoughCustomFeeTokenAllowance({ + * nativeToken: '0xTokenAddress', + * account: '0xOwnerAddress', + * publicClient, + * }); + * console.log(isAllowanceEnough); // true or false + */ export async function createRollupEnoughCustomFeeTokenAllowance({ nativeToken, account, publicClient, rollupCreatorAddressOverride, -}: CreateRollupEnoughCustomFeeTokenAllowanceParams) { +}: CreateRollupEnoughCustomFeeTokenAllowanceParams): Promise { const allowance = await fetchAllowance({ address: nativeToken, owner: account, diff --git a/src/createRollupFetchCoreContracts.ts b/src/createRollupFetchCoreContracts.ts index 76d8253b..25382651 100644 --- a/src/createRollupFetchCoreContracts.ts +++ b/src/createRollupFetchCoreContracts.ts @@ -9,6 +9,24 @@ export type CreateRollupFetchCoreContractsParams = { publicClient: PublicClient; }; +/** + * Creates and fetches core contracts for a specified rollup using the provided + * public client. This function retrieves the transaction hash and prepares the + * transaction receipt to return the core contracts. Returns a {@link + * CoreContracts}. + * + * @param {CreateRollupFetchCoreContractsParams} createRollupFetchCoreContractsParams - The parameters for fetching core contracts + * @param {Address} createRollupFetchCoreContractsParams.rollup - The rollup address + * @param {PublicClient} createRollupFetchCoreContractsParams.publicClient - The public client + * + * @returns {Promise} - The core contracts + * + * @example + * const coreContracts = await createRollupFetchCoreContracts({ + * rollup: '0x1234567890abcdef1234567890abcdef12345678', + * publicClient: viemPublicClient, + * }); + */ export async function createRollupFetchCoreContracts({ rollup, publicClient, diff --git a/src/createRollupFetchTransactionHash.ts b/src/createRollupFetchTransactionHash.ts index 88d5ec8c..a48f5066 100644 --- a/src/createRollupFetchTransactionHash.ts +++ b/src/createRollupFetchTransactionHash.ts @@ -1,4 +1,5 @@ import { Address, PublicClient } from 'viem'; +- import { AbiEvent } from 'abitype'; import { validateParentChain } from './types/ParentChain'; @@ -52,6 +53,15 @@ const earliestRollupCreatorDeploymentBlockNumber = { [nitroTestnodeL2.id]: 0n, }; +/** + * createRollupFetchTransactionHash retrieves the transaction hash of the + * RollupInitialized event for a specified rollup contract on a given chain. It + * takes in the rollup contract address and a PublicClient, validates the parent + * chain, and then fetches the RollupInitialized event logs to extract the + * transaction hash. This function ensures that only one RollupInitialized event + * is found for the specified rollup address before returning the transaction + * hash. + */ export async function createRollupFetchTransactionHash({ rollup, publicClient, diff --git a/src/createRollupGetCallValue.ts b/src/createRollupGetCallValue.ts index 8d496e03..19530b21 100644 --- a/src/createRollupGetCallValue.ts +++ b/src/createRollupGetCallValue.ts @@ -2,6 +2,31 @@ import { CreateRollupParams } from './types/createRollupTypes'; import { isCustomFeeTokenAddress } from './utils/isCustomFeeTokenAddress'; import { createRollupDefaultRetryablesFees } from './constants'; +/** + * Calculates the call value needed for creating retryable tickets in a rollup chain. + * + * @param {CreateRollupParams} params - The parameters for creating the rollup. + * @param {Object} params.config - The chain config. + * @param {string} params.batchPoster - The batchPoster address. + * @param {Array} params.validators - The validator(s) address array. + * @param {boolean} [params.deployFactoriesToL2=true] - Optional, defaults to true. Deploying factories via retryable tickets at rollup creation time is the most reliable method to do it since it doesn't require paying the L1 gas. + * @param {string} [params.nativeToken=ETH] - The native token address, optional, defaults to ETH. + * @param {number} [params.maxDataSize=104857] - The max calldata size, optional, defaults to 104857 bytes for Orbit chains. + * @param {number} [params.maxFeePerGasForRetryables=0.1] - The max fee per gas for retryables, optional, defaults to 0.1 gwei. + * + * @returns {BigInt} - The calculated call value. + * + * @example + * const callValue = createRollupGetCallValue({ + * config: createRollupConfig, + * batchPoster: '0x1234...', + * validators: ['0x5678...', '0x9abc...'], + * deployFactoriesToL2: true, + * nativeToken: '0xdef0...', + * maxDataSize: 104857, + * maxFeePerGasForRetryables: 0.1, + * }); + */ export function createRollupGetCallValue(params: CreateRollupParams) { // when not deploying deterministic factories to L2, no callvalue is necessary, as no retryable tickets will be created if (!params.deployFactoriesToL2) { diff --git a/src/createRollupGetMaxDataSize.ts b/src/createRollupGetMaxDataSize.ts index 7be48f1b..209f5558 100644 --- a/src/createRollupGetMaxDataSize.ts +++ b/src/createRollupGetMaxDataSize.ts @@ -10,6 +10,15 @@ import { } from './chains'; import { ParentChainId } from './types/ParentChain'; +/** + * Calculates and returns the maximum data size allowed for a given parent chain. + * + * This function determines the maximum data size for different chains such as mainnet, + * testnet, and nitro-testnode, returning the appropriate value as a BigInt. + * + * @param {ParentChainId} parentChainId - The ID of the parent chain. + * @returns {BigInt} - The maximum data size allowed for the specified parent chain. + */ export function createRollupGetMaxDataSize(parentChainId: ParentChainId) { // doing switch here to make sure it's exhaustive when checking against `ParentChainId` switch (parentChainId) { diff --git a/src/createRollupPrepareConfig.ts b/src/createRollupPrepareConfig.ts index 89310123..333f8944 100644 --- a/src/createRollupPrepareConfig.ts +++ b/src/createRollupPrepareConfig.ts @@ -8,27 +8,32 @@ import { Prettify } from './types/utils'; export type CreateRollupPrepareConfigResult = CreateRollupFunctionInputs[0]['config']; -type RequiredKeys = 'chainId' | 'owner'; -type RequiredParams = Pick; -type OptionalParams = Partial>; - -export type CreateRollupPrepareConfigParams = Prettify< - RequiredParams & { chainConfig?: ChainConfig } & OptionalParams ->; - -export const defaults = { - ...defaultsCommon, - confirmPeriodBlocks: BigInt(150), - sequencerInboxMaxTimeVariation: { - delayBlocks: BigInt(5_760), - futureBlocks: BigInt(48), - delaySeconds: BigInt(86_400), - futureSeconds: BigInt(3_600), - }, -} as const; +... /** + * Prepares the configuration for creating a Rollup deployment. + * * @deprecated Will be removed in a future release. Please use {@link createRollupPrepareDeploymentParamsConfig} instead. + * + * @param {CreateRollupPrepareConfigParams} createRollupPrepareConfigParams - The parameters for preparing the Rollup config + * @param {ChainConfig} [createRollupPrepareConfigParams.chainConfig] - Optional chain configuration + * @param {bigint} createRollupPrepareConfigParams.chainId - The chain ID + * @param {string} createRollupPrepareConfigParams.owner - The owner of the chain + * @param {number} [createRollupPrepareConfigParams.confirmPeriodBlocks=150] - Optional, defaults to 150 + * @param {Object} [createRollupPrepareConfigParams.sequencerInboxMaxTimeVariation] - Optional, default values provided + * @param {bigint} [createRollupPrepareConfigParams.sequencerInboxMaxTimeVariation.delayBlocks=5760] - Optional, defaults to 5760 + * @param {bigint} [createRollupPrepareConfigParams.sequencerInboxMaxTimeVariation.futureBlocks=48] - Optional, defaults to 48 + * @param {bigint} [createRollupPrepareConfigParams.sequencerInboxMaxTimeVariation.delaySeconds=86400] - Optional, defaults to 86400 + * @param {bigint} [createRollupPrepareConfigParams.sequencerInboxMaxTimeVariation.futureSeconds=3600] - Optional, defaults to 3600 + * + * @returns {CreateRollupPrepareConfigResult} - The prepared Rollup configuration + * + * @example + * const config = createRollupPrepareConfig({ + * chainId: 1234n, + * owner: '0xYourAddress', + * }); + * console.log(config); */ export function createRollupPrepareConfig({ chainConfig, diff --git a/src/createRollupPrepareCustomFeeTokenApprovalTransactionRequest.ts b/src/createRollupPrepareCustomFeeTokenApprovalTransactionRequest.ts index be2524ef..6e4acbe6 100644 --- a/src/createRollupPrepareCustomFeeTokenApprovalTransactionRequest.ts +++ b/src/createRollupPrepareCustomFeeTokenApprovalTransactionRequest.ts @@ -17,6 +17,31 @@ export type CreateRollupPrepareCustomFeeTokenApprovalTransactionRequestParams = }> >; +/** + * Creates a custom fee token approval transaction request for the Rollup chain. + * The function takes in parameters such as the amount, native token address, + * account address, and public client. It then validates the parent chain, + * generates the transaction request, and returns it along with the chain ID. + * + * @param {Object} params - The parameters for creating the approval transaction request. + * @param {bigint} [params.amount=createRollupDefaultRetryablesFees] - The amount of tokens to approve, optional, defaults to createRollupDefaultRetryablesFees. + * @param {Address} params.nativeToken - The native token address. + * @param {Address} params.account - The account address. + * @param {PublicClient} params.publicClient - The public client. + * @param {Address} [params.rollupCreatorAddressOverride] - Optional override for the rollup creator address. + * + * @returns {Promise} The custom fee token approval transaction request and the chain ID. + * + * @example + * const approvalRequest = await createRollupPrepareCustomFeeTokenApprovalTransactionRequest({ + * amount: 1000n, + * nativeToken: '0xTokenAddress', + * account: '0xAccountAddress', + * publicClient, + * }); + * + * console.log(approvalRequest); + */ export async function createRollupPrepareCustomFeeTokenApprovalTransactionRequest({ amount = createRollupDefaultRetryablesFees, nativeToken, diff --git a/src/createRollupPrepareDeploymentParamsConfig.ts b/src/createRollupPrepareDeploymentParamsConfig.ts index 8f7cbd52..2c4b9a7d 100644 --- a/src/createRollupPrepareDeploymentParamsConfig.ts +++ b/src/createRollupPrepareDeploymentParamsConfig.ts @@ -15,40 +15,31 @@ import { getDefaultSequencerInboxMaxTimeVariation } from './getDefaultSequencerI export type CreateRollupPrepareDeploymentParamsConfigResult = CreateRollupFunctionInputs[0]['config']; -type RequiredKeys = 'chainId' | 'owner'; -type RequiredParams = Pick; -type OptionalParams = Partial< - Omit ->; - -export type CreateRollupPrepareDeploymentParamsConfigParams = Prettify< - RequiredParams & { chainConfig?: ChainConfig } & OptionalParams ->; +/** + * @typedef {Object} CreateRollupPrepareDeploymentParamsConfigParams + * @property {BigInt} chainId - The chain ID + * @property {string} owner - The owner of the chain + * @property {ChainConfig} [chainConfig] - Optional chain configuration + * @property {BigInt} [confirmPeriodBlocks] - Optional confirmation period blocks + * @property {BigInt} [extraChallengeTimeBlocks] - Optional extra challenge time blocks + * @property {string} [stakeToken] - Optional stake token + * @property {BigInt} [baseStake] - Optional base stake + * @property {string} [wasmModuleRoot] - Optional WASM module root + * @property {string} [loserStakeEscrow] - Optional loser stake escrow + * @property {BigInt} [genesisBlockNum] - Optional genesis block number + * @property {Object} [sequencerInboxMaxTimeVariation] - Optional sequencer inbox max time variation + * @property {BigInt} [sequencerInboxMaxTimeVariation.delayBlocks] - Optional delay blocks for sequencer inbox + * @property {BigInt} [sequencerInboxMaxTimeVariation.futureBlocks] - Optional future blocks for sequencer inbox + * @property {BigInt} [sequencerInboxMaxTimeVariation.delaySeconds] - Optional delay seconds for sequencer inbox + * @property {BigInt} [sequencerInboxMaxTimeVariation.futureSeconds] - Optional future seconds for sequencer inbox + */ /** * Creates the configuration object to be used with {@link createRollup}. * - * @param {PublicClient} client Parent chain client - * @param {Object} params Chain configuration parameters - * @see https://docs.arbitrum.io/launch-orbit-chain/how-tos/customize-deployment-configuration - * @see https://docs.arbitrum.io/launch-orbit-chain/reference/additional-configuration-parameters - * @param {string} params.owner - * @param {BigInt} params.chainId - * @param {ChainConfig} [params.chainConfig] - * @param {BigInt} [params.confirmPeriodBlocks] - * @param {BigInt} [params.extraChallengeTimeBlocks] - * @param {string} [params.stakeToken] - * @param {BigInt} [params.baseStake] - * @param {string} [params.wasmModuleRoot] - * @param {string} [params.loserStakeEscrow] - * @param {BigInt} [params.genesisBlockNum] - * @param {Object} [params.sequencerInboxMaxTimeVariation] - * @param {BigInt} [params.sequencerInboxMaxTimeVariation.delayBlocks] - * @param {BigInt} [params.sequencerInboxMaxTimeVariation.futureBlocks] - * @param {BigInt} [params.sequencerInboxMaxTimeVariation.delaySeconds] - * @param {BigInt} [params.sequencerInboxMaxTimeVariation.futureSeconds] - * - * @returns {Object} {@link CreateRollupPrepareDeploymentParamsConfigResult} + * @param {Client} client - Parent chain client + * @param {CreateRollupPrepareDeploymentParamsConfigParams} params - Chain configuration parameters + * @returns {CreateRollupPrepareDeploymentParamsConfigResult} - The configuration object to be used with createRollup * * @example * const config = createRollupPrepareDeploymentParamsConfig(parentPublicClient, { @@ -90,3 +81,15 @@ export function createRollupPrepareDeploymentParamsConfig< ), }; } + +// Define the required and optional parameters separately +type RequiredKeys = 'chainId' | 'owner'; +type RequiredParams = Pick; +type OptionalParams = Partial< + Omit +>; + +// Combine required and optional parameters into a single type +export type CreateRollupPrepareDeploymentParamsConfigParams = Prettify< + RequiredParams & { chainConfig?: ChainConfig } & OptionalParams +>; diff --git a/src/createRollupPrepareDeploymentParamsConfigDefaults.ts b/src/createRollupPrepareDeploymentParamsConfigDefaults.ts index e1b52eca..15b3d522 100644 --- a/src/createRollupPrepareDeploymentParamsConfigDefaults.ts +++ b/src/createRollupPrepareDeploymentParamsConfigDefaults.ts @@ -1,9 +1,26 @@ import { parseEther, zeroAddress } from 'viem'; +/** + * wasmModuleRoot is a hexadecimal string representing the root hash of a + * WebAssembly module. + */ export const wasmModuleRoot: `0x${string}` = // https://github.com/OffchainLabs/nitro/releases/tag/consensus-v20 '0x8b104a2e80ac6165dc58b9048de12f301d70b02a0ab51396c22b4b4b802a16a4'; +/** + * defaults defines the default values for various parameters used in the + * preparation of deployment configuration. It includes + * extraChallengeTimeBlocks, stakeToken, baseStake, wasmModuleRoot, + * loserStakeEscrow, and genesisBlockNum. + * + * @property {bigint} defaults.extraChallengeTimeBlocks - The additional challenge time blocks. + * @property {string} defaults.stakeToken - The address of the stake token. + * @property {bigint} defaults.baseStake - The base stake amount in wei. + * @property {`0x${string}`} defaults.wasmModuleRoot - The root hash of the WebAssembly module. + * @property {string} defaults.loserStakeEscrow - The address of the loser stake escrow. + * @property {bigint} defaults.genesisBlockNum - The genesis block number. + */ export const defaults = { extraChallengeTimeBlocks: BigInt(0), stakeToken: zeroAddress, diff --git a/src/createRollupPrepareTransaction.ts b/src/createRollupPrepareTransaction.ts index 2b943bb1..c1d4458c 100644 --- a/src/createRollupPrepareTransaction.ts +++ b/src/createRollupPrepareTransaction.ts @@ -3,6 +3,12 @@ import { Transaction, decodeFunctionData } from 'viem'; import { rollupCreator } from './contracts'; import { CreateRollupFunctionInputs } from './types/createRollupTypes'; +/** + * Decodes the function data for the createRollup function call using the Rollup Creator ABI. + * + * @param {string} data - The hexadecimal string representing the encoded function data. + * @returns {Object} The decoded function data. + */ function createRollupDecodeFunctionData(data: `0x${string}`) { return decodeFunctionData({ abi: rollupCreator.abi, @@ -11,9 +17,22 @@ function createRollupDecodeFunctionData(data: `0x${string}`) { } export type CreateRollupTransaction = Transaction & { + /** + * Retrieves the inputs for the createRollup function call. + * + * @returns {CreateRollupFunctionInputs} The inputs for the createRollup function. + */ getInputs(): CreateRollupFunctionInputs; }; +/** + * Creates a transaction object for preparing a createRollup function call, + * which extends the base Transaction type and includes a method to retrieve the + * inputs for creating a rollup. + * + * @param {Transaction} tx - The base transaction object. + * @returns {CreateRollupTransaction} The prepared transaction object with added getInputs method. + */ export function createRollupPrepareTransaction(tx: Transaction): CreateRollupTransaction { return { ...tx, diff --git a/src/createRollupPrepareTransactionReceipt.ts b/src/createRollupPrepareTransactionReceipt.ts index 440838b4..a2521615 100644 --- a/src/createRollupPrepareTransactionReceipt.ts +++ b/src/createRollupPrepareTransactionReceipt.ts @@ -3,6 +3,13 @@ import { TransactionReceipt, getAbiItem, getEventSelector, Log, decodeEventLog } import { rollupCreator } from './contracts'; import { CoreContracts } from './types/CoreContracts'; +/** + * Finds the "RollupCreated" event log within the given transaction receipt. + * + * @param {TransactionReceipt} txReceipt - The transaction receipt to search for the event log. + * @returns {Log} The log containing the "RollupCreated" event. + * @throws Will throw an error if no "RollupCreated" logs are found. + */ function findRollupCreatedEventLog(txReceipt: TransactionReceipt) { const abiItem = getAbiItem({ abi: rollupCreator.abi, name: 'RollupCreated' }); const eventSelector = getEventSelector(abiItem); @@ -17,6 +24,13 @@ function findRollupCreatedEventLog(txReceipt: TransactionReceipt) { return log; } +/** + * Decodes the "RollupCreated" event log. + * + * @param {Log} log - The log to decode. + * @returns {Object} The decoded event log. + * @throws Will throw an error if the event name is not "RollupCreated". + */ function decodeRollupCreatedEventLog(log: Log) { const decodedEventLog = decodeEventLog({ ...log, abi: rollupCreator.abi }); @@ -31,6 +45,13 @@ export type CreateRollupTransactionReceipt = TransactionReceipt & { getCoreContracts(): CoreContracts; }; +/** + * Creates a transaction receipt for preparing a rollup, including core contract + * information. Returns a {@link CreateRollupTransactionReceipt}. + * + * @param {TransactionReceipt} txReceipt - The transaction receipt from which to create the rollup receipt. + * @returns {CreateRollupTransactionReceipt} The rollup transaction receipt with core contracts information. + */ export function createRollupPrepareTransactionReceipt( txReceipt: TransactionReceipt, ): CreateRollupTransactionReceipt { diff --git a/src/createRollupPrepareTransactionRequest.ts b/src/createRollupPrepareTransactionRequest.ts index 85cfc712..2844994e 100644 --- a/src/createRollupPrepareTransactionRequest.ts +++ b/src/createRollupPrepareTransactionRequest.ts @@ -36,6 +36,34 @@ export type CreateRollupPrepareTransactionRequestParams = Prettify< }> >; +/** + * Prepares a transaction request to create a rollup chain on the specified + * parent chain. The function validates the input parameters, including the + * batch poster address and validator addresses, and checks if the native token + * is allowed based on the chain configuration. It then encodes the function + * data using the rollup creator ABI and prepares the transaction request with + * the necessary data, value, and gas limits. Returns the prepared transaction + * request along with the chain ID. + * + * @param {CreateRollupPrepareTransactionRequestParams} createRollupPrepareTransactionRequestParams - The parameters for preparing the transaction request + * @param {CreateRollupParams} createRollupPrepareTransactionRequestParams.params - The parameters for creating the rollup + * @param {Address} createRollupPrepareTransactionRequestParams.account - The account address + * @param {PublicClient} createRollupPrepareTransactionRequestParams.publicClient - The public client + * @param {TransactionRequestGasOverrides} [createRollupPrepareTransactionRequestParams.gasOverrides] - Optional gas overrides for the transaction request + * @param {Address} [createRollupPrepareTransactionRequestParams.rollupCreatorAddressOverride] - Optional override for the rollup creator address + * + * @returns {Promise} The prepared transaction request and the chain ID + * @throws {Error} If the batch poster address or validator addresses are invalid, or if the native token is not allowed + * + * @example + * const transactionRequest = await createRollupPrepareTransactionRequest({ + * params: createRollupParams, + * account: '0xYourAccountAddress', + * publicClient: yourPublicClientInstance, + * gasOverrides: { gasLimit: { base: 500000, percentIncrease: 20 } }, + * rollupCreatorAddressOverride: '0xOverrideAddress', + * }); + */ export async function createRollupPrepareTransactionRequest({ params, account, diff --git a/src/createTokenBridge-ethers.ts b/src/createTokenBridge-ethers.ts index ba387ad2..b84e4bcf 100644 --- a/src/createTokenBridge-ethers.ts +++ b/src/createTokenBridge-ethers.ts @@ -10,7 +10,17 @@ import { TransactionRequestRetryableGasOverrides } from './createTokenBridgePrep import { registerNewNetwork } from './utils/registerNewNetwork'; import { publicClientToProvider } from './ethers-compat/publicClientToProvider'; +/** + * A named factory type extending ContractFactory with a contractName property. + */ type NamedFactory = ContractFactory & { contractName: string }; + +/** + * Creates an instance of NamedFactory with the provided contract JSON. + * + * @param {Object} contractJson - The contract JSON containing ABI, bytecode, and contract name. + * @returns {NamedFactory} The named factory instance. + */ const NamedFactoryInstance = (contractJson: { abi: any; bytecode: string; @@ -24,6 +34,13 @@ const NamedFactoryInstance = (contractJson: { // import from token-bridge-contracts directly to make sure the bytecode is the same const L2AtomicTokenBridgeFactory__factory = NamedFactoryInstance(L2AtomicTokenBridgeFactory); +/** + * @typedef {Object} CreateTokenBridgeGetInputsResult + * @property {Address} inbox - The inbox address. + * @property {bigint} maxGasForContracts - The maximum gas for contracts. + * @property {bigint} gasPrice - The gas price. + * @property {bigint} retryableFee - The retryable fee. + */ export type CreateTokenBridgeGetInputsResult = { inbox: Address; maxGasForContracts: bigint; @@ -31,6 +48,18 @@ export type CreateTokenBridgeGetInputsResult = { retryableFee: bigint; }; +/** + * Returns a {@link CreateTokenBridgeGetInputsResult} object containing inputs + * required for creating a token bridge. + * + * @param {string} l1DeployerAddress - The address of the L1 deployer. + * @param {PublicClient} l1PublicClient - The L1 public client. + * @param {PublicClient} l2PublicClient - The L2 public client. + * @param {string} l1TokenBridgeCreatorAddress - The address of the L1 token bridge creator. + * @param {string} rollupAddress - The rollup address. + * @param {TransactionRequestRetryableGasOverrides} [retryableGasOverrides] - Optional gas overrides for retryable transactions. + * @returns {Promise} A promise that resolves to the token bridge inputs. + */ export const createTokenBridgeGetInputs = async ( l1DeployerAddress: string, l1PublicClient: PublicClient, @@ -39,15 +68,25 @@ export const createTokenBridgeGetInputs = async ( rollupAddress: string, retryableGasOverrides?: TransactionRequestRetryableGasOverrides, ): Promise => { + /** l1Provider is a {@link Provider} for interacting with the layer 1 chain. */ const l1Provider = publicClientToProvider(l1PublicClient); + /** l2Provider is a {@link PublicClient} provider for Layer 2 network. */ const l2Provider = publicClientToProvider(l2PublicClient); await registerNewNetwork(l1Provider, l2Provider, rollupAddress); + /** + * L1AtomicTokenBridgeCreator__factory creates an instance to interact with + * the L1 Atomic Token Bridge Creator contract on Ethereum. + */ const L1AtomicTokenBridgeCreator__factory = new ethers.Contract( l1TokenBridgeCreatorAddress, L1AtomicTokenBridgeCreator.abi, ); + /** + * l1TokenBridgeCreator connects to the L1AtomicTokenBridgeCreator contract on + * the Ethereum network. + */ const l1TokenBridgeCreator = L1AtomicTokenBridgeCreator__factory.connect(l1Provider); //// gasPrice @@ -59,7 +98,12 @@ export const createTokenBridgeGetInputs = async ( l1Provider, l2Provider, ); + /** The maximum submission cost for factory estimation. */ const maxSubmissionCostForFactoryEstimation = deployFactoryGasParams.maxSubmissionCost.mul(2); + /** + * The variable `maxGasForFactoryEstimation` represents the maximum gas limit + * for estimating the deployment of an L2 factory. + */ const maxGasForFactoryEstimation = await l1TokenBridgeCreator.gasLimitForL2FactoryDeployment(); //// run retryable estimate for deploying L2 contracts @@ -67,6 +111,10 @@ export const createTokenBridgeGetInputs = async ( const l2FactoryTemplate = L2AtomicTokenBridgeFactory__factory.attach( await l1TokenBridgeCreator.l2TokenBridgeFactoryTemplate(), ).connect(l1Provider); + /** + * l2Code retrieves the bytecode for various L2 templates from the + * L1AtomicTokenBridgeCreator contract. + */ const l2Code = { router: await l1Provider.getCode(await l1TokenBridgeCreator.l2RouterTemplate()), standardGateway: await l1Provider.getCode( @@ -82,6 +130,7 @@ export const createTokenBridgeGetInputs = async ( ), multicall: await l1Provider.getCode(await l1TokenBridgeCreator.l2MulticallTemplate()), }; + /** gasEstimateToDeployContracts returns a {@link BigNumber}. */ const gasEstimateToDeployContracts = await l2FactoryTemplate.estimateGas.deployL2Contracts( l2Code, ethers.Wallet.createRandom().address, @@ -93,6 +142,7 @@ export const createTokenBridgeGetInputs = async ( ethers.Wallet.createRandom().address, ethers.Wallet.createRandom().address, ); + /** maxSubmissionCostForContractsEstimation returns a {@link BigNumber}. */ const maxSubmissionCostForContractsEstimation = deployFactoryGasParams.maxSubmissionCost.mul(2); //// apply gas overrides @@ -108,6 +158,10 @@ export const createTokenBridgeGetInputs = async ( ) : maxSubmissionCostForFactoryEstimation; + /** + * maxGasForFactory returns a {@link BigNumber} representing the maximum gas + * limit for deploying L2 factory. + */ const maxGasForFactory = retryableGasOverrides && retryableGasOverrides.maxGasForFactory ? BigNumber.from( @@ -120,6 +174,7 @@ export const createTokenBridgeGetInputs = async ( ) : maxGasForFactoryEstimation; + /** The maximum submission cost for deploying contracts. */ const maxSubmissionCostForContracts = retryableGasOverrides && retryableGasOverrides.maxSubmissionCostForContracts ? BigNumber.from( @@ -132,6 +187,7 @@ export const createTokenBridgeGetInputs = async ( ) : maxSubmissionCostForContractsEstimation; + /** Returns the maximum gas limit for deploying contracts. */ const maxGasForContracts = retryableGasOverrides && retryableGasOverrides.maxGasForContracts ? BigNumber.from( @@ -144,11 +200,16 @@ export const createTokenBridgeGetInputs = async ( ) : gasEstimateToDeployContracts; + /** The maximum gas price to be used for transactions. */ const maxGasPrice = retryableGasOverrides && retryableGasOverrides.maxGasPrice ? retryableGasOverrides.maxGasPrice : gasPrice; + /** + * retryableFee is the total fee required for retryable transactions, + * including submission costs and gas fees. + */ let retryableFee = maxSubmissionCostForFactory .add(maxSubmissionCostForContracts) .add(maxGasForFactory.mul(maxGasPrice)) @@ -165,6 +226,14 @@ export const createTokenBridgeGetInputs = async ( }; }; +/** + * Returns an estimate for deploying the factory on L2. + * + * @param {string} l1DeployerAddress - The address of the L1 deployer. + * @param {ethers.providers.Provider} l1Provider - The L1 provider. + * @param {ethers.providers.Provider} l2Provider - The L2 provider. + * @returns {Promise} A promise that resolves to the gas parameters for deploying the factory. + */ const getEstimateForDeployingFactory = async ( l1DeployerAddress: string, l1Provider: ethers.providers.Provider, @@ -189,6 +258,17 @@ const getEstimateForDeployingFactory = async ( return deployFactoryGasParams; }; +/** + * Returns an estimate for setting a token gateway in the router. + * + * @param {Address} l1ChainOwnerAddress - The address of the L1 chain owner. + * @param {Address} l1UpgradeExecutorAddress - The address of the L1 upgrade executor. + * @param {Address} l1GatewayRouterAddress - The address of the L1 gateway router. + * @param {string} setGatewaysCalldata - The calldata for setting gateways. + * @param {PublicClient} parentChainPublicClient - The parent chain public client. + * @param {PublicClient} orbitChainPublicClient - The orbit chain public client. + * @returns {Promise} A promise that resolves to the gas parameters for setting the gateway. + */ export const getEstimateForSettingGateway = async ( l1ChainOwnerAddress: Address, l1UpgradeExecutorAddress: Address, @@ -199,11 +279,13 @@ export const getEstimateForSettingGateway = async ( ) => { // ethers providers const parentChainProvider = publicClientToProvider(parentChainPublicClient); + /** orbitChainProvider estimates gas for setting a token gateway in the router. */ const orbitChainProvider = publicClientToProvider(orbitChainPublicClient); // run retryable estimate for setting a token gateway in the router const l1ToL2MsgGasEstimate = new L1ToL2MessageGasEstimator(orbitChainProvider); + /** Estimates the gas parameters for setting a token gateway in the router. */ const setGatewaysGasParams = await l1ToL2MsgGasEstimate.estimateAll( { from: l1UpgradeExecutorAddress, @@ -224,3 +306,4 @@ export const getEstimateForSettingGateway = async ( deposit: setGatewaysGasParams.deposit.toBigInt(), }; }; + diff --git a/src/createTokenBridge-testHelpers.ts b/src/createTokenBridge-testHelpers.ts index c83f92ff..4f2cde02 100644 --- a/src/createTokenBridge-testHelpers.ts +++ b/src/createTokenBridge-testHelpers.ts @@ -7,6 +7,10 @@ import { getNitroTestnodePrivateKeyAccounts } from './testHelpers'; const execPromise = promisify(exec); const testnodeAccounts = getNitroTestnodePrivateKeyAccounts(); +/** + * Deploys a Token Bridge Creator contract on the specified public client + * network and returns the address of the deployed contract. + */ export async function deployTokenBridgeCreator({ publicClient, }: { diff --git a/src/createTokenBridge.ts b/src/createTokenBridge.ts index 0631c95d..ec66007b 100644 --- a/src/createTokenBridge.ts +++ b/src/createTokenBridge.ts @@ -92,24 +92,19 @@ export type CreateTokenBridgeResults = { * * Returns the token bridge core contracts. * - * @param {CreateTokenBridgeParams} createTokenBridgeParams - * @param {String} createRollupParams.rollupOwner - The address of the rollup owner - * @param {Object} createRollupParams.rollupAddress - The address of the Rollup contract - * @param {Object} [createRollupParams.account] - The private key account to sign transactions - * @param {String} [createRollupParams.nativeTokenAddress=] - Optional - * If nativeTokenAddress is passed and different than zero address, deploy a token bridge with custom fee token. - * @param {Object} createRollupParams.parentChainPublicClient - The parent chain Viem Public Client - * @param {Object} createRollupParams.orbitChainPublicClient - The orbit chain Viem Public Client - * @param {String} [createRollupParams.tokenBridgeCreatorAddressOverride=] - Optional - * If tokenBridgeCreatorAddressOverride is passed, the address is overridden in the different transactions - * @param {Object} [createRollupParams.gasOverrides=] - {@link TransactionRequestGasOverrides} Optional - * Gas overrides for createTokenBridgePrepareTransactionRequest - * @param {Object} createRollupParams.retryableGasOverrides - {@link TokenBridgeRetryableGasOverrides} Optional - * Retryable gas overrides for createTokenBridgePrepareTransactionRequest - * @param {Object} createRollupParams.setWethGatewayGasOverrides - {@link SetWethGatewayRetryableGasOverrides} Optional - * Retryable gas overrides for createTokenBridgePrepareSetWethGatewayTransactionRequest + * @param {CreateTokenBridgeParams} createTokenBridgeParams - The parameters for creating the token bridge + * @param {Address} createTokenBridgeParams.rollupOwner - The address of the rollup owner + * @param {Address} createTokenBridgeParams.rollupAddress - The address of the Rollup contract + * @param {PrivateKeyAccount} createTokenBridgeParams.account - The private key account to sign transactions + * @param {Address} [createTokenBridgeParams.nativeTokenAddress] - Optional. If nativeTokenAddress is passed and different than zero address, deploy a token bridge with custom fee token. + * @param {PublicClient} createTokenBridgeParams.parentChainPublicClient - The parent chain Viem Public Client + * @param {PublicClient} createTokenBridgeParams.orbitChainPublicClient - The orbit chain Viem Public Client + * @param {Address} [createTokenBridgeParams.tokenBridgeCreatorAddressOverride] - Optional. If tokenBridgeCreatorAddressOverride is passed, the address is overridden in the different transactions + * @param {TransactionRequestGasOverrides} [createTokenBridgeParams.gasOverrides] - Optional. Gas overrides for createTokenBridgePrepareTransactionRequest + * @param {TokenBridgeRetryableGasOverrides} [createTokenBridgeParams.retryableGasOverrides] - Optional. Retryable gas overrides for createTokenBridgePrepareTransactionRequest + * @param {SetWethGatewayRetryableGasOverrides} [createTokenBridgeParams.setWethGatewayGasOverrides] - Optional. Retryable gas overrides for createTokenBridgePrepareSetWethGatewayTransactionRequest * - * @returns Promise<{@link CreateTokenBridgeResults}> + * @returns {Promise} - The result of the token bridge creation * * @example * const tokenBridgeCreator = await deployTokenBridgeCreator({ diff --git a/src/createTokenBridgeEnoughCustomFeeTokenAllowance.ts b/src/createTokenBridgeEnoughCustomFeeTokenAllowance.ts index 28fe7b50..24f32124 100644 --- a/src/createTokenBridgeEnoughCustomFeeTokenAllowance.ts +++ b/src/createTokenBridgeEnoughCustomFeeTokenAllowance.ts @@ -15,12 +15,35 @@ export type CreateTokenBridgeEnoughCustomFeeTokenAllowanceParams = Prettify< }> >; +/** + * Creates a token bridge with enough custom fee token allowance. + * + * This function fetches the allowance for a native token owned by a specified address, + * compares it to the default retryable fees for creating a token bridge, and + * returns a boolean indicating if the allowance is sufficient. + * + * @param {CreateTokenBridgeEnoughCustomFeeTokenAllowanceParams} params - The parameters for checking token allowance + * @param {Address} params.nativeToken - The native token address + * @param {Address} params.owner - The owner address + * @param {PublicClient} params.publicClient - The public client + * @param {Address} [params.tokenBridgeCreatorAddressOverride] - Optional override for the token bridge creator address + * + * @returns {Promise} - Returns true if the allowance is sufficient, otherwise false + * + * @example + * const isAllowanceSufficient = await createTokenBridgeEnoughCustomFeeTokenAllowance({ + * nativeToken: '0xTokenAddress', + * owner: '0xOwnerAddress', + * publicClient, + * }); + * console.log(isAllowanceSufficient); + */ export async function createTokenBridgeEnoughCustomFeeTokenAllowance({ nativeToken, owner, publicClient, tokenBridgeCreatorAddressOverride, -}: CreateTokenBridgeEnoughCustomFeeTokenAllowanceParams) { +}: CreateTokenBridgeEnoughCustomFeeTokenAllowanceParams): Promise { const allowance = await fetchAllowance({ address: nativeToken, owner, diff --git a/src/createTokenBridgeFetchTokenBridgeContracts.ts b/src/createTokenBridgeFetchTokenBridgeContracts.ts index 01e5b8c2..d2092455 100644 --- a/src/createTokenBridgeFetchTokenBridgeContracts.ts +++ b/src/createTokenBridgeFetchTokenBridgeContracts.ts @@ -14,6 +14,25 @@ export type CreateTokenBridgeFetchTokenBridgeContractsParams = Prettify< }> >; +/** + * Creates and fetches the token bridge contracts on both the parent chain and + * the orbit chain. It retrieves addresses for various contracts including + * routers, gateways, WETH, proxy admin, beacon proxy factory, upgrade executor, + * and multicall on both chains. Returns {@link TokenBridgeContracts}. + * + * @param {CreateTokenBridgeFetchTokenBridgeContractsParams} createTokenBridgeFetchTokenBridgeContractsParams - The parameters for fetching token bridge contracts + * @param {Address} createTokenBridgeFetchTokenBridgeContractsParams.inbox - The inbox address + * @param {PublicClient} createTokenBridgeFetchTokenBridgeContractsParams.parentChainPublicClient - The parent chain public client + * @param {Address} [createTokenBridgeFetchTokenBridgeContractsParams.tokenBridgeCreatorAddressOverride] - Optional override for the token bridge creator address + * @returns {Promise} The token bridge contracts on both chains + * + * @example + * const contracts = await createTokenBridgeFetchTokenBridgeContracts({ + * inbox: '0xYourInboxAddress', + * parentChainPublicClient: yourPublicClientInstance, + * }); + * console.log(contracts); + */ export async function createTokenBridgeFetchTokenBridgeContracts({ inbox, parentChainPublicClient, diff --git a/src/createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest.ts b/src/createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest.ts index 9c95a191..70d97b54 100644 --- a/src/createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest.ts +++ b/src/createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest.ts @@ -16,6 +16,28 @@ export type CreateTokenBridgePrepareCustomFeeTokenApprovalTransactionRequestPara }> >; +/** + * Creates a Token Bridge prepare custom fee token approval transaction request + * with specified parameters. This function returns a {@link Request} object + * containing the approval transaction details. + * + * @param {CreateTokenBridgePrepareCustomFeeTokenApprovalTransactionRequestParams} params - The parameters for the approval transaction request + * @param {bigint} [params.amount=maxInt256] - The amount to approve, optional, defaults to maxInt256 + * @param {Address} params.nativeToken - The native token address + * @param {Address} params.owner - The owner address + * @param {PublicClient} params.publicClient - The public client instance + * @param {Address} [params.tokenBridgeCreatorAddressOverride] - Optional token bridge creator address override + * + * @returns {Promise} The approval transaction request details including chainId + * + * @example + * const approvalRequest = await createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest({ + * amount: BigInt(1000), + * nativeToken: '0xTokenAddress', + * owner: '0xOwnerAddress', + * publicClient, + * }); + */ export async function createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest({ amount = maxInt256, nativeToken, diff --git a/src/createTokenBridgePrepareSetWethGatewayTransactionReceipt.ts b/src/createTokenBridgePrepareSetWethGatewayTransactionReceipt.ts index 6a8df10d..1060404a 100644 --- a/src/createTokenBridgePrepareSetWethGatewayTransactionReceipt.ts +++ b/src/createTokenBridgePrepareSetWethGatewayTransactionReceipt.ts @@ -6,21 +6,59 @@ import { publicClientToProvider } from './ethers-compat/publicClientToProvider'; import { viemTransactionReceiptToEthersTransactionReceipt } from './ethers-compat/viemTransactionReceiptToEthersTransactionReceipt'; import { ethersTransactionReceiptToViemTransactionReceipt } from './ethers-compat/ethersTransactionReceiptToViemTransactionReceipt'; +/** + * Represents a redeemed retryable ticket. + * + * @typedef {Object} RedeemedRetryableTicket + * @property {L1ToL2MessageStatus.REDEEMED} status - The status of the message, indicating it has been redeemed. + * @property {EthersTransactionReceipt} l2TxReceipt - The transaction receipt on the L2 chain. + */ type RedeemedRetryableTicket = { status: L1ToL2MessageStatus.REDEEMED; l2TxReceipt: EthersTransactionReceipt; }; +/** + * Parameters required to wait for retryable messages. + * + * @typedef {Object} WaitForRetryablesParameters + * @property {PublicClient} orbitPublicClient - The public client for the Orbit chain. + */ export type WaitForRetryablesParameters = { orbitPublicClient: PublicClient; }; +/** + * Result of waiting for retryable messages. + * + * @typedef {Array} WaitForRetryablesResult - An array containing a single transaction receipt. + */ export type WaitForRetryablesResult = [TransactionReceipt]; +/** + * Extended transaction receipt with added functionality to wait for retryable messages. + * + * @typedef {Object} CreateTokenBridgeSetWethGatewayTransactionReceipt + * @property {function(WaitForRetryablesParameters): Promise} waitForRetryables - Method to wait for retryable messages. + */ export type CreateTokenBridgeSetWethGatewayTransactionReceipt = TransactionReceipt & { + /** + * Waits for retryable messages on the Orbit chain. + * + * @param {WaitForRetryablesParameters} params - The parameters required to wait for retryables. + * @param {PublicClient} params.orbitPublicClient - The public client for the Orbit chain. + * @returns {Promise} - A promise that resolves to an array of transaction receipts. + */ waitForRetryables(params: WaitForRetryablesParameters): Promise; }; +/** + * Creates a token bridge transaction receipt for setting up the WETH gateway, + * including a method to wait for retryable messages on the Orbit chain. + * + * @param {TransactionReceipt} txReceipt - The transaction receipt to extend. + * @returns {CreateTokenBridgeSetWethGatewayTransactionReceipt} - The extended transaction receipt with added functionality. + */ export function createTokenBridgePrepareSetWethGatewayTransactionReceipt( txReceipt: TransactionReceipt, ): CreateTokenBridgeSetWethGatewayTransactionReceipt { diff --git a/src/createTokenBridgePrepareSetWethGatewayTransactionRequest.ts b/src/createTokenBridgePrepareSetWethGatewayTransactionRequest.ts index 6959a2e8..3bc9f0d8 100644 --- a/src/createTokenBridgePrepareSetWethGatewayTransactionRequest.ts +++ b/src/createTokenBridgePrepareSetWethGatewayTransactionRequest.ts @@ -89,6 +89,36 @@ const parentChainGatewayRouterAbi = [ }, ]; +/** + * Creates a transaction request to set the WETH gateway on the parent chain + * router for the TokenBridge. The request includes gas overrides for retryable + * transactions and ensures that the WETH gateway is not already registered. + * Returns the prepared transaction request with the chain ID. + * + * @param {CreateTokenBridgePrepareRegisterWethGatewayTransactionRequestParams} params - The parameters for preparing the transaction request + * @param {Address} params.rollup - The rollup address + * @param {PublicClient} params.parentChainPublicClient - The parent chain public client + * @param {PublicClient} params.orbitChainPublicClient - The orbit chain public client + * @param {Address} params.account - The account address + * @param {TransactionRequestRetryableGasOverrides} [params.retryableGasOverrides] - Optional gas override options for retryable transactions + * @param {string} [params.tokenBridgeCreatorAddressOverride] - Optional override for the token bridge creator address + * + * @returns {Promise} The prepared transaction request with the chain ID + * + * @example + * const transactionRequest = await createTokenBridgePrepareSetWethGatewayTransactionRequest({ + * rollup: '0x123...', + * parentChainPublicClient, + * orbitChainPublicClient, + * account: '0xabc...', + * retryableGasOverrides: { + * gasLimit: { base: 1000000n, percentIncrease: 10 }, + * maxFeePerGas: { base: 1000000000n, percentIncrease: 20 }, + * maxSubmissionCost: { base: 100000000000000n, percentIncrease: 15 } + * }, + * tokenBridgeCreatorAddressOverride: '0xdef...' + * }); + */ export async function createTokenBridgePrepareSetWethGatewayTransactionRequest({ rollup, parentChainPublicClient, diff --git a/src/createTokenBridgePrepareTransactionReceipt.ts b/src/createTokenBridgePrepareTransactionReceipt.ts index faca61a9..e8299027 100644 --- a/src/createTokenBridgePrepareTransactionReceipt.ts +++ b/src/createTokenBridgePrepareTransactionReceipt.ts @@ -16,6 +16,13 @@ import { TokenBridgeContracts } from './types/TokenBridgeContracts'; import { tokenBridgeCreator } from './contracts'; import { createTokenBridgeFetchTokenBridgeContracts } from './createTokenBridgeFetchTokenBridgeContracts'; +/** + * Finds the OrbitTokenBridgeCreated event log in the transaction receipt. + * + * @param {TransactionReceipt} txReceipt - The transaction receipt + * @returns {Log} - The log of the OrbitTokenBridgeCreated event + * @throws {Error} - If no OrbitTokenBridgeCreated log is found + */ function findOrbitTokenBridgeCreatedEventLog(txReceipt: TransactionReceipt) { const abiItem = getAbiItem({ abi: tokenBridgeCreator.abi, name: 'OrbitTokenBridgeCreated' }); const eventSelector = getEventSelector(abiItem); @@ -30,6 +37,13 @@ function findOrbitTokenBridgeCreatedEventLog(txReceipt: TransactionReceipt) { return log; } +/** + * Decodes the OrbitTokenBridgeCreated event log. + * + * @param {Log} log - The log to decode + * @returns {Object} - The decoded event log + * @throws {Error} - If the event name is not OrbitTokenBridgeCreated + */ function decodeOrbitTokenBridgeCreatedEventLog(log: Log) { const decodedEventLog = decodeEventLog({ ...log, abi: tokenBridgeCreator.abi }); @@ -42,21 +56,52 @@ function decodeOrbitTokenBridgeCreatedEventLog(log: Log) { return decodedEventLog; } +/** + * Represents a redeemed retryable ticket. + * + * @typedef {Object} RedeemedRetryableTicket + * @property {L1ToL2MessageStatus.REDEEMED} status - The status of the redeemed retryable ticket + * @property {EthersTransactionReceipt} l2TxReceipt - The L2 transaction receipt + */ type RedeemedRetryableTicket = { status: L1ToL2MessageStatus.REDEEMED; l2TxReceipt: EthersTransactionReceipt; }; +/** + * Parameters for waiting for retryables. + * + * @typedef {Object} WaitForRetryablesParameters + * @property {PublicClient} orbitPublicClient - The public client for the Orbit chain + */ export type WaitForRetryablesParameters = { orbitPublicClient: PublicClient; }; +/** + * Result of waiting for retryables. + * + * @typedef {Array} WaitForRetryablesResult + */ export type WaitForRetryablesResult = [TransactionReceipt, TransactionReceipt]; +/** + * Parameters for getting token bridge contracts. + * + * @typedef {Object} GetTokenBridgeContractsParameters + * @property {PublicClient} parentChainPublicClient - The public client for the parent chain + */ type GetTokenBridgeContractsParameters = { parentChainPublicClient: PublicClient; }; +/** + * Represents a transaction receipt with methods to wait for retryables and get token bridge contracts. + * + * @typedef {Object} CreateTokenBridgeTransactionReceipt + * @property {function(WaitForRetryablesParameters): Promise} waitForRetryables - Waits for retryables + * @property {function(GetTokenBridgeContractsParameters): Promise} getTokenBridgeContracts - Gets the token bridge contracts + */ export type CreateTokenBridgeTransactionReceipt = TransactionReceipt & { waitForRetryables(params: WaitForRetryablesParameters): Promise; getTokenBridgeContracts( @@ -64,11 +109,26 @@ export type CreateTokenBridgeTransactionReceipt = TransactionReceipt & { ): Promise; }; +/** + * Creates a transaction receipt with methods to wait for retryables and get + * token bridge contracts. + * + * @param {TransactionReceipt} txReceipt - The transaction receipt + * @returns {CreateTokenBridgeTransactionReceipt} - The created transaction receipt + */ export function createTokenBridgePrepareTransactionReceipt( txReceipt: TransactionReceipt, ): CreateTokenBridgeTransactionReceipt { return { ...txReceipt, + /** + * Waits for retryables to be redeemed. + * + * @param {WaitForRetryablesParameters} params - Parameters for waiting for retryables + * @param {PublicClient} params.orbitPublicClient - The public client for the Orbit chain + * @returns {Promise} - The result of waiting for retryables + * @throws {Error} - If an unexpected number of retryable tickets or unexpected status is found + */ waitForRetryables: async function ({ orbitPublicClient }) { const ethersTxReceipt = viemTransactionReceiptToEthersTransactionReceipt(txReceipt); const l1TxReceipt = new L1TransactionReceipt(ethersTxReceipt); @@ -97,6 +157,13 @@ export function createTokenBridgePrepareTransactionReceipt( ) as WaitForRetryablesResult ); }, + /** + * Gets the token bridge contracts. + * + * @param {GetTokenBridgeContractsParameters} params - Parameters for getting token bridge contracts + * @param {PublicClient} params.parentChainPublicClient - The public client for the parent chain + * @returns {Promise} - The token bridge contracts + */ getTokenBridgeContracts: async function ({ parentChainPublicClient }) { const eventLog = findOrbitTokenBridgeCreatedEventLog(txReceipt); const decodedEventLog = decodeOrbitTokenBridgeCreatedEventLog(eventLog); diff --git a/src/createTokenBridgePrepareTransactionRequest.ts b/src/createTokenBridgePrepareTransactionRequest.ts index 5bfd7546..f010d4cd 100644 --- a/src/createTokenBridgePrepareTransactionRequest.ts +++ b/src/createTokenBridgePrepareTransactionRequest.ts @@ -33,6 +33,33 @@ export type CreateTokenBridgePrepareTransactionRequestParams = Prettify< }> >; +/** + * Creates a transaction request to prepare token bridge creation on the parent + * chain. Returns the prepared transaction request along with the chain ID. + * + * @param {CreateTokenBridgePrepareTransactionRequestParams} createTokenBridgePrepareTransactionRequestParams - The parameters for preparing the transaction request. + * @param {Object} createTokenBridgePrepareTransactionRequestParams.params - The parameters for the token bridge creation. + * @param {Address} createTokenBridgePrepareTransactionRequestParams.params.rollup - The rollup address. + * @param {Address} createTokenBridgePrepareTransactionRequestParams.params.rollupOwner - The rollup owner address. + * @param {PublicClient} createTokenBridgePrepareTransactionRequestParams.parentChainPublicClient - The public client for the parent chain. + * @param {PublicClient} createTokenBridgePrepareTransactionRequestParams.orbitChainPublicClient - The public client for the orbit chain. + * @param {Address} createTokenBridgePrepareTransactionRequestParams.account - The account address. + * @param {TransactionRequestGasOverrides} [createTokenBridgePrepareTransactionRequestParams.gasOverrides] - Optional gas overrides for the transaction request. + * @param {TransactionRequestRetryableGasOverrides} [createTokenBridgePrepareTransactionRequestParams.retryableGasOverrides] - Optional gas overrides for retryable transactions. + * @param {Address} [createTokenBridgePrepareTransactionRequestParams.tokenBridgeCreatorAddressOverride] - Optional override for the token bridge creator address. + * + * @returns {Promise} The prepared transaction request and the chain ID. + * + * @example + * const { request, chainId } = await createTokenBridgePrepareTransactionRequest({ + * params: { rollup: '0x...', rollupOwner: '0x...' }, + * parentChainPublicClient, + * orbitChainPublicClient, + * account: '0x...', + * gasOverrides: { gasLimit: { base: 21000n, percentIncrease: 20 } }, + * retryableGasOverrides: { maxSubmissionCostForFactory: { base: 1000n, percentIncrease: 10 } }, + * }); + */ export async function createTokenBridgePrepareTransactionRequest({ params, parentChainPublicClient, diff --git a/src/decorators/arbAggregatorActions.ts b/src/decorators/arbAggregatorActions.ts index 2d699047..3f9f24f4 100644 --- a/src/decorators/arbAggregatorActions.ts +++ b/src/decorators/arbAggregatorActions.ts @@ -24,13 +24,31 @@ export type ArbAggregatorActions Promise & { chainId: number }>; }; +/** + * Returns an object with methods to interact with the ArbAggregator smart contract on the specified chain. + * + * @param {PublicClient} client - The public client to use for interacting with the blockchain. + * @returns {ArbAggregatorActions} An object containing methods to read from and prepare transaction requests for the ArbAggregator contract. + */ export function arbAggregatorActions< TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, >(client: PublicClient): ArbAggregatorActions { return { + /** + * Reads data from the ArbAggregator contract. + * + * @param {ArbAggregatorReadContractParameters} args - The parameters required to read from the contract. + * @returns {Promise} The data read from the contract. + */ arbAggregatorReadContract: (args) => arbAggregatorReadContract(client, args), + /** + * Prepares a transaction request for the ArbAggregator contract. + * + * @param {ArbAggregatorPrepareTransactionRequestParameters} args - The parameters required to prepare the transaction request. + * @returns {Promise} The prepared transaction request and chain ID. + */ arbAggregatorPrepareTransactionRequest: (args) => arbAggregatorPrepareTransactionRequest(client, args), }; diff --git a/src/decorators/arbGasInfoPublicActions.ts b/src/decorators/arbGasInfoPublicActions.ts index 972dbf4f..ee2f92ef 100644 --- a/src/decorators/arbGasInfoPublicActions.ts +++ b/src/decorators/arbGasInfoPublicActions.ts @@ -13,11 +13,26 @@ export type ArbGasInfoPublicActions Promise>; }; +/** + * Returns an object with a method `arbGasInfoReadContract` that allows for + * reading contract information related to gas costs on the Arbitrum network. + * + * @template TTransport - The type of transport used by the PublicClient. + * @template TChain - The type of chain, can be defined or undefined. + * @param {PublicClient} client - The public client for the specified transport and chain. + * @returns {ArbGasInfoPublicActions} An object containing the `arbGasInfoReadContract` method. + */ export function arbGasInfoPublicActions< TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, >(client: PublicClient): ArbGasInfoPublicActions { return { + /** + * Reads contract information related to gas costs on the Arbitrum network. + * + * @param {ArbGasInfoReadContractParameters} args - The parameters for reading the contract. + * @returns {Promise>} The result of the contract read operation. + */ arbGasInfoReadContract: (args) => arbGasInfoReadContract(client, args), }; } diff --git a/src/decorators/arbOwnerPublicActions.ts b/src/decorators/arbOwnerPublicActions.ts index 0776fb17..c1782d00 100644 --- a/src/decorators/arbOwnerPublicActions.ts +++ b/src/decorators/arbOwnerPublicActions.ts @@ -24,6 +24,30 @@ export type ArbOwnerPublicActions Promise & { chainId: number }>; }; +/** + * Returns an object with two functions: `arbOwnerReadContract` and + * `arbOwnerPrepareTransactionRequest`, which interact with the ArbOwner + * contract by reading contract data and preparing transaction requests, + * respectively. + * + * @param {PublicClient} client - The public client used to interact with the blockchain. + * + * @returns {ArbOwnerPublicActions} An object containing the functions to read contract data and prepare transaction requests. + * + * @example + * const publicClient = new PublicClient(...); + * const actions = arbOwnerPublicActions(publicClient); + * + * const readResult = await actions.arbOwnerReadContract({ + * functionName: 'someFunction', + * args: [...], + * }); + * + * const txRequest = await actions.arbOwnerPrepareTransactionRequest({ + * functionName: 'someOtherFunction', + * args: [...], + * }); + */ export function arbOwnerPublicActions< TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, diff --git a/src/decorators/rollupAdminLogicPublicActions.ts b/src/decorators/rollupAdminLogicPublicActions.ts index eee4a427..731750bc 100644 --- a/src/decorators/rollupAdminLogicPublicActions.ts +++ b/src/decorators/rollupAdminLogicPublicActions.ts @@ -32,15 +32,42 @@ export type RollupAdminLogicActions< TRollupAdminLogic extends Address | undefined, TChain extends Chain | undefined = Chain | undefined, > = { + /** + * Reads data from the Rollup Admin Logic smart contract. + * + * @param {RollupAdminLogicReadContractArgs} args - The arguments for reading the contract. + * @param {Address} [args.rollup] - The optional rollup address. + * @param {RollupAdminLogicFunctionName} args.functionName - The name of the function to call on the contract. + * @returns {Promise} - The data read from the contract. + */ rollupAdminLogicReadContract: ( args: RollupAdminLogicReadContractArgs, ) => Promise>; + /** + * Prepares a transaction request for the Rollup Admin Logic smart contract. + * + * @param {rollupAdminLogicPrepareTransactionRequestArgs} args - The arguments for preparing the transaction request. + * @param {Address} [args.rollup] - The optional rollup address. + * @param {RollupAdminLogicFunctionName} args.functionName - The name of the function to call on the contract. + * @returns {Promise} - The prepared transaction request. + */ rollupAdminLogicPrepareTransactionRequest: ( args: rollupAdminLogicPrepareTransactionRequestArgs, ) => Promise & { chainId: number }>; }; +/** + * The function rollupAdminLogicPublicActions returns a {@link + * RollupAdminLogicActions} object that contains two methods: + * rollupAdminLogicReadContract and rollupAdminLogicPrepareTransactionRequest. + * These methods allow interacting with the Rollup Admin Logic smart contract by + * reading contract data and preparing transaction requests. + * + * @param {Object} params - The parameters for the function. + * @param {Address} [params.rollup] - The optional rollup address. + * @returns {(client: PublicClient) => RollupAdminLogicActions} - A function that takes a PublicClient and returns RollupAdminLogicActions. + */ export function rollupAdminLogicPublicActions< TParams extends { rollup?: Address }, TTransport extends Transport = Transport, diff --git a/src/decorators/sequencerInboxActions.ts b/src/decorators/sequencerInboxActions.ts index b1586d7c..3ee5ceb6 100644 --- a/src/decorators/sequencerInboxActions.ts +++ b/src/decorators/sequencerInboxActions.ts @@ -32,10 +32,22 @@ export type SequencerInboxActions< TSequencerInbox extends Address | undefined, TChain extends Chain | undefined = Chain | undefined, > = { + /** + * Reads data from the sequencerInbox contract + * + * @param {SequencerInboxReadContractArgs} args - Arguments for reading the contract + * @returns {Promise>} - The data read from the contract + */ sequencerInboxReadContract: ( args: SequencerInboxReadContractArgs, ) => Promise>; + /** + * Prepares a transaction request for the sequencerInbox contract + * + * @param {SequencerInboxPrepareTransactionRequestArgs} args - Arguments for preparing the transaction request + * @returns {Promise & { chainId: number }>} - The prepared transaction request + */ sequencerInboxPrepareTransactionRequest: ( args: SequencerInboxPrepareTransactionRequestArgs, ) => Promise & { chainId: number }>; @@ -44,9 +56,8 @@ export type SequencerInboxActions< /** * Set of actions that can be performed on the sequencerInbox contract through wagmi public client * - * @param {Object} sequencerInbox - Address of the sequencerInbox core contract - * User can still overrides sequencerInbox address, - * by passing it as an argument to sequencerInboxReadContract/sequencerInboxPrepareTransactionRequest calls + * @param {Object} params - Parameters object + * @param {Address} params.sequencerInbox - Address of the sequencerInbox core contract * * @returns {Function} sequencerInboxActionsWithSequencerInbox - Function passed to client.extends() to extend the public client * @@ -67,7 +78,6 @@ export type SequencerInboxActions< * sequencerInbox: contractAddress.anotherSequencerInbox * }); */ - export function sequencerInboxActions< TParams extends { sequencerInbox?: Address }, TTransport extends Transport = Transport, @@ -77,6 +87,12 @@ export function sequencerInboxActions< client: PublicClient, ) { const sequencerInboxExtensions: SequencerInboxActions = { + /** + * Reads data from the sequencerInbox contract + * + * @param {SequencerInboxReadContractArgs} args - Arguments for reading the contract + * @returns {Promise>} - The data read from the contract + */ sequencerInboxReadContract: ( args: SequencerInboxReadContractArgs, ) => { @@ -85,6 +101,12 @@ export function sequencerInboxActions< sequencerInbox: args.sequencerInbox || sequencerInbox, } as SequencerInboxReadContractParameters); }, + /** + * Prepares a transaction request for the sequencerInbox contract + * + * @param {SequencerInboxPrepareTransactionRequestArgs} args - Arguments for preparing the transaction request + * @returns {Promise & { chainId: number }>} - The prepared transaction request + */ sequencerInboxPrepareTransactionRequest: ( args: SequencerInboxPrepareTransactionRequestArgs, ) => { diff --git a/src/ethers-compat/ethersTransactionReceiptToViemTransactionReceipt.ts b/src/ethers-compat/ethersTransactionReceiptToViemTransactionReceipt.ts index 3fb79a0a..a3b4cb76 100644 --- a/src/ethers-compat/ethersTransactionReceiptToViemTransactionReceipt.ts +++ b/src/ethers-compat/ethersTransactionReceiptToViemTransactionReceipt.ts @@ -10,6 +10,14 @@ import { TransactionReceipt as ViemTransactionReceipt, } from 'viem'; +/** + * Converts an Ethereum log (from `EthersLog`) to a Viem log (to `ViemLog`). + * This function maps the fields from the Ethereum log to the corresponding fields in the Viem log, + * including conversion of data types where necessary. + * + * @param {EthersLog} log - The Ethereum log to convert. + * @returns {ViemLog} The converted Viem log. + */ function ethersLogToViemLog(log: EthersLog): ViemLog { return { blockNumber: BigInt(log.blockNumber), @@ -24,6 +32,15 @@ function ethersLogToViemLog(log: EthersLog): ViemLog { }; } +/** + * Converts an Ethereum transaction receipt (from `EthersTransactionReceipt`) to + * a Viem transaction receipt (to `ViemTransactionReceipt`). This function maps + * the fields from the Ethereum receipt to the corresponding fields in the Viem + * receipt, including conversion of data types where necessary. + * + * @param {EthersTransactionReceipt} receipt - The Ethereum transaction receipt to convert. + * @returns {ViemTransactionReceipt} The converted Viem transaction receipt. + */ export function ethersTransactionReceiptToViemTransactionReceipt( receipt: EthersTransactionReceipt, ): ViemTransactionReceipt { diff --git a/src/ethers-compat/publicClientToProvider.ts b/src/ethers-compat/publicClientToProvider.ts index 0500696d..5192a210 100644 --- a/src/ethers-compat/publicClientToProvider.ts +++ b/src/ethers-compat/publicClientToProvider.ts @@ -1,7 +1,29 @@ import { PublicClient } from 'viem'; import { providers } from 'ethers'; -// based on https://wagmi.sh/react/ethers-adapters#reference-implementation +/** + * Converts a Viem PublicClient to an Ethers.js StaticJsonRpcProvider. + * + * This function takes a Viem PublicClient and transforms it into an Ethers.js + * StaticJsonRpcProvider. It ensures that the chain information is defined and + * constructs a network object which includes chainId, name, and optionally the + * ENS registry address. + * + * @param {PublicClient} publicClient - The Viem PublicClient instance to convert. + * @throws Will throw an error if the chain information is undefined. + * @returns {providers.StaticJsonRpcProvider} The corresponding Ethers.js StaticJsonRpcProvider. + * + * @example + * const viemClient = new PublicClient({ + * chain: { + * id: 1, + * name: 'mainnet', + * rpcUrls: { default: { http: ['https://mainnet.infura.io/v3/YOUR-PROJECT-ID'] } }, + * contracts: { ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' } } + * } + * }); + * const ethersProvider = publicClientToProvider(viemClient); + */ export function publicClientToProvider(publicClient: PublicClient) { const { chain } = publicClient; diff --git a/src/ethers-compat/viemTransactionReceiptToEthersTransactionReceipt.ts b/src/ethers-compat/viemTransactionReceiptToEthersTransactionReceipt.ts index 267b06f6..d4642d64 100644 --- a/src/ethers-compat/viemTransactionReceiptToEthersTransactionReceipt.ts +++ b/src/ethers-compat/viemTransactionReceiptToEthersTransactionReceipt.ts @@ -5,6 +5,12 @@ import { } from '@ethersproject/abstract-provider'; import { BigNumber } from 'ethers'; +/** + * Converts a Viem log to an Ethers log. + * + * @param {ViemLog} log - The log object from Viem. + * @returns {EthersLog} - The converted log object for Ethers. + */ function viemLogToEthersLog(log: ViemLog): EthersLog { return { blockNumber: Number(log.blockNumber), @@ -19,6 +25,12 @@ function viemLogToEthersLog(log: ViemLog): EthersLog { }; } +/** + * Converts a Viem transaction receipt to an Ethers transaction receipt. + * + * @param {ViemTransactionReceipt} receipt - The transaction receipt object from Viem. + * @returns {EthersTransactionReceipt} - The converted transaction receipt object for Ethers. + */ export function viemTransactionReceiptToEthersTransactionReceipt( receipt: ViemTransactionReceipt, ): EthersTransactionReceipt { diff --git a/src/getDefaultConfirmPeriodBlocks.ts b/src/getDefaultConfirmPeriodBlocks.ts index 99199368..d4d5545d 100644 --- a/src/getDefaultConfirmPeriodBlocks.ts +++ b/src/getDefaultConfirmPeriodBlocks.ts @@ -3,6 +3,13 @@ import { PublicClient } from 'viem'; import { ParentChainId, validateParentChain } from './types/ParentChain'; import { parentChainIsMainnet } from './parentChainIsMainnet'; +/** + * Returns the default number of confirmation blocks required for a transaction, + * based on the parent chain provided. + * + * @param {ParentChainId | PublicClient} parentChainIdOrPublicClient - The parent chain ID or the public client instance. + * @returns {bigint} - The default number of confirmation blocks. + */ export function getDefaultConfirmPeriodBlocks( parentChainIdOrPublicClient: ParentChainId | PublicClient, ): bigint { diff --git a/src/getDefaultSequencerInboxMaxTimeVariation.ts b/src/getDefaultSequencerInboxMaxTimeVariation.ts index 897f9e80..ecbb525a 100644 --- a/src/getDefaultSequencerInboxMaxTimeVariation.ts +++ b/src/getDefaultSequencerInboxMaxTimeVariation.ts @@ -9,6 +9,27 @@ export type SequencerInboxMaxTimeVariation = { futureSeconds: bigint; }; +/** + * Retrieves the default maximum time variation for the sequencer inbox. + * + * @param {ParentChainId | PublicClient} parentChainIdOrPublicClient - The parent chain ID or PublicClient. + * If a ParentChainId is provided, it will be validated. + * If a PublicClient is provided, it will be used to determine the parent chain ID. + * + * @returns {SequencerInboxMaxTimeVariation} - An object containing delayBlocks, futureBlocks, delaySeconds, and futureSeconds values. + * + * @example + * const parentChainId = 1n; // Example parent chain ID + * const timeVariation = getDefaultSequencerInboxMaxTimeVariation(parentChainId); + * console.log(timeVariation); + * // Output: + * // { + * // delayBlocks: 28800n, + * // futureBlocks: 300n, + * // delaySeconds: 345600n, + * // futureSeconds: 3600n + * // } + */ export function getDefaultSequencerInboxMaxTimeVariation( parentChainIdOrPublicClient: ParentChainId | PublicClient, ): SequencerInboxMaxTimeVariation { diff --git a/src/package.json b/src/package.json index 866429d3..bca2aa14 100644 --- a/src/package.json +++ b/src/package.json @@ -55,4 +55,4 @@ "@arbitrum/token-bridge-contracts": "^1.2.1", "ethers": "^5.7.2" } -} +} \ No newline at end of file diff --git a/src/parentChainIsMainnet.ts b/src/parentChainIsMainnet.ts index 25139a9e..8e691799 100644 --- a/src/parentChainIsMainnet.ts +++ b/src/parentChainIsMainnet.ts @@ -1,6 +1,12 @@ import * as chains from './chains'; import { ParentChainId } from './types/ParentChain'; +/** + * Checks if the given {@link ParentChainId} is a mainnet chain or not. + * + * @param {ParentChainId} parentChainId - The ID of the parent chain to check. + * @returns {boolean} - Returns true if the parent chain is a mainnet chain, otherwise false. + */ export function parentChainIsMainnet(parentChainId: ParentChainId): boolean { // doing switch here to make sure it's exhaustive when checking against `ParentChainId` switch (parentChainId) { diff --git a/src/prepareChainConfig.ts b/src/prepareChainConfig.ts index a32f48c8..fe473a83 100644 --- a/src/prepareChainConfig.ts +++ b/src/prepareChainConfig.ts @@ -1,5 +1,13 @@ import { ChainConfig, ChainConfigArbitrumParams } from './types/ChainConfig'; +/** + * The defaults object contains default values for various blockchain + * parameters, such as block numbers and configuration settings. It includes + * values for Ethereum mainnet hard forks like Homestead, Constantinople, and + * Istanbul, as well as specific settings for the Arbitrum layer 2 solution. The + * prepareChainConfig function utilizes these defaults to create a complete + * ChainConfig object with the specified parameters. + */ export const defaults = { homesteadBlock: 0, daoForkBlock: null, @@ -36,6 +44,37 @@ export type PrepareChainConfigParams = Pick & Partial>; }; +/** + * Merges the default chain configuration with the provided parameters. + * + * This function takes in specific configurations for the Clique and Arbitrum + * consensus algorithms and returns a complete {@link ChainConfig} object with + * the updated values. + * + * @param {PrepareChainConfigParams} params - The parameters to merge with defaults. + * @param {number} params.chainId - The chain ID. + * @param {Object} [params.clique] - Clique consensus parameters. + * @param {number} [params.clique.period] - The period of the clique consensus. + * @param {number} [params.clique.epoch] - The epoch of the clique consensus. + * @param {Object} params.arbitrum - Arbitrum-specific parameters. + * @param {string} params.arbitrum.InitialChainOwner - The initial chain owner for Arbitrum. + * @param {boolean} [params.arbitrum.EnableArbOS] - Enable ArbOS. + * @param {boolean} [params.arbitrum.AllowDebugPrecompiles] - Allow debug precompiles. + * @param {boolean} [params.arbitrum.DataAvailabilityCommittee] - Data availability committee. + * @param {number} [params.arbitrum.InitialArbOSVersion] - Initial ArbOS version. + * @param {number} [params.arbitrum.GenesisBlockNum] - Genesis block number. + * @param {number} [params.arbitrum.MaxCodeSize] - Maximum code size. + * @param {number} [params.arbitrum.MaxInitCodeSize] - Maximum initial code size. + * + * @returns {ChainConfig} The complete chain configuration object. + * + * @example + * const customConfig = prepareChainConfig({ + * chainId: 42161, + * clique: { period: 15, epoch: 30000 }, + * arbitrum: { InitialChainOwner: '0xYourAddressHere' }, + * }); + */ export function prepareChainConfig(params: PrepareChainConfigParams): ChainConfig { return { ...defaults, diff --git a/src/prepareKeyset.ts b/src/prepareKeyset.ts index 23b71643..65eab680 100644 --- a/src/prepareKeyset.ts +++ b/src/prepareKeyset.ts @@ -5,10 +5,23 @@ function uint64ToBigEndian(value: number): Uint8Array { view.setUint32(4, value % 0x100000000); return new Uint8Array(buffer); } + +/** + * Converts a byte to its hexadecimal string representation. + * + * @param {number} byte - The byte to convert. + * @returns {string} The hexadecimal string representation of the byte. + */ function byteToHex(byte: number): string { return byte.toString(16).padStart(2, '0'); } +/** + * Converts a 16-bit unsigned integer to a big-endian byte array. + * + * @param {number} value - The 16-bit unsigned integer to convert. + * @returns {Uint8Array} The big-endian byte array representation of the integer. + */ function uint16ToBigEndian(value: number): Uint8Array { const buffer = new ArrayBuffer(2); const view = new DataView(buffer); @@ -16,6 +29,20 @@ function uint16ToBigEndian(value: number): Uint8Array { return new Uint8Array(buffer); } +/** + * Prepares a keyset by encoding the assumed honest value, number of committee + * members, and public keys into a single hexadecimal string. + * + * @param {string[]} publicKeys - An array of base64-encoded public keys. + * @param {number} assumedHonest - The assumed honest value. + * @returns {`0x${string}`} The encoded keyset as a hexadecimal string. + * + * @example + * const publicKeys = ['base64Key1', 'base64Key2']; + * const assumedHonest = 5; + * const keyset = prepareKeyset(publicKeys, assumedHonest); + * console.log(keyset); // Outputs the encoded keyset + */ export function prepareKeyset(publicKeys: string[], assumedHonest: number): `0x${string}` { const numberOfMembers = publicKeys.length; const membersBuffer: Uint8Array[] = []; diff --git a/src/prepareNodeConfig.ts b/src/prepareNodeConfig.ts index 971fbcb2..33fda047 100644 --- a/src/prepareNodeConfig.ts +++ b/src/prepareNodeConfig.ts @@ -18,21 +18,40 @@ import { } from './chains'; import { getParentChainLayer } from './utils'; -// this is different from `sanitizePrivateKey` from utils, as this removes the 0x prefix -function sanitizePrivateKey(privateKey: string) { +/** + * Removes the '0x' prefix from a private key if it exists. + * @param {string} privateKey - The private key to sanitize. + * @returns {string} - The sanitized private key. + */ +function sanitizePrivateKey(privateKey: string): string { return privateKey.startsWith('0x') ? privateKey.slice(2) : privateKey; } +/** + * Converts NodeConfigChainInfoJson object to its JSON string representation. + * @param {NodeConfigChainInfoJson} infoJson - The info JSON object to stringify. + * @returns {string} - The JSON string representation of the info JSON object. + */ function stringifyInfoJson(infoJson: NodeConfigChainInfoJson): string { return JSON.stringify(infoJson); } +/** + * Converts NodeConfigDataAvailabilityRpcAggregatorBackendsJson object to its JSON string representation. + * @param {NodeConfigDataAvailabilityRpcAggregatorBackendsJson} backendsJson - The backends JSON object to stringify. + * @returns {string} - The JSON string representation of the backends JSON object. + */ function stringifyBackendsJson( backendsJson: NodeConfigDataAvailabilityRpcAggregatorBackendsJson, ): string { return JSON.stringify(backendsJson); } +/** + * Checks if the parent chain is an Arbitrum chain. + * @param {ParentChainId} parentChainId - The ID of the parent chain. + * @returns {boolean} - True if the parent chain is an Arbitrum chain, false otherwise. + */ function parentChainIsArbitrum(parentChainId: ParentChainId): boolean { // doing switch here to make sure it's exhaustive when checking against `ParentChainId` switch (parentChainId) { @@ -61,6 +80,39 @@ export type PrepareNodeConfigParams = { parentChainBeaconRpcUrl?: string; }; +/** + * Prepares the configuration object for a node based on the provided parameters. + * + * This function sets up various configurations such as chain information, parent chain details, + * HTTP settings, node features like sequencer and batch poster, execution parameters, and data + * availability settings if applicable. + * + * @param {PrepareNodeConfigParams} params - The parameters for preparing the node configuration. + * @param {string} params.chainName - The name of the chain. + * @param {ChainConfig} params.chainConfig - The chain configuration object. + * @param {CoreContracts} params.coreContracts - The core contracts for the chain. + * @param {string} params.batchPosterPrivateKey - The private key for the batch poster. + * @param {string} params.validatorPrivateKey - The private key for the validator. + * @param {ParentChainId} params.parentChainId - The ID of the parent chain. + * @param {string} params.parentChainRpcUrl - The RPC URL of the parent chain. + * @param {string} [params.parentChainBeaconRpcUrl] - The Beacon RPC URL of the parent chain, required for L2 Orbit chains. + * @returns {NodeConfig} - The prepared node configuration object. + * + * @throws Will throw an error if parentChainBeaconRpcUrl is not provided for L2 Orbit chains. + * + * @example + * const nodeConfig = prepareNodeConfig({ + * chainName: 'MyChain', + * chainConfig: myChainConfig, + * coreContracts: myCoreContracts, + * batchPosterPrivateKey: '0xabc123', + * validatorPrivateKey: '0xdef456', + * parentChainId: mainnet.id, + * parentChainRpcUrl: 'https://mainnet.infura.io/v3/YOUR-PROJECT-ID', + * parentChainBeaconRpcUrl: 'https://beacon-mainnet.infura.io/v3/YOUR-PROJECT-ID', + * }); + * console.log(nodeConfig); + */ export function prepareNodeConfig({ chainName, chainConfig, @@ -170,7 +222,7 @@ export function prepareNodeConfig({ { url: 'http://localhost:9876', pubkey: - 'YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==', + 'YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==', signermask: 1, }, ]), diff --git a/src/rollupAdminLogicPrepareTransactionRequest.ts b/src/rollupAdminLogicPrepareTransactionRequest.ts index 7cd63f8f..7456336b 100644 --- a/src/rollupAdminLogicPrepareTransactionRequest.ts +++ b/src/rollupAdminLogicPrepareTransactionRequest.ts @@ -19,6 +19,16 @@ type RollupAdminLogicEncodeFunctionDataParameters< TFunctionName extends RollupAdminLogicFunctionName, > = EncodeFunctionDataParameters; +/** + * Encodes the function data for a given Rollup Admin Logic function. + * + * @template TFunctionName - The name of the function to encode data for. + * @param {RollupAdminLogicEncodeFunctionDataParameters} params - The parameters for encoding the function data. + * @param {RollupAdminLogicAbi} params.abi - The ABI of the Rollup Admin Logic contract. + * @param {TFunctionName} params.functionName - The name of the function to encode data for. + * @param {Array} params.args - The arguments for the function. + * @returns {string} The encoded function data. + */ function rollupAdminLogicEncodeFunctionData({ abi, functionName, @@ -38,6 +48,19 @@ type RollupAdminLogicPrepareFunctionDataParameters< abi: RollupAdminLogicAbi; rollup: Address; }; + +/** + * Prepares the function data for a Rollup Admin Logic function. + * + * @template TFunctionName - The name of the function to prepare data for. + * @param {RollupAdminLogicPrepareFunctionDataParameters} params - The parameters for preparing the function data. + * @param {Address | false} params.upgradeExecutor - The address of the upgrade executor, or false if not applicable. + * @param {RollupAdminLogicAbi} params.abi - The ABI of the Rollup Admin Logic contract. + * @param {TFunctionName} params.functionName - The name of the function to prepare data for. + * @param {Array} params.args - The arguments for the function. + * @param {Address} params.rollup - The address of the rollup. + * @returns {Object} An object containing the target address, encoded function data, and value. + */ function rollupAdminLogicPrepareFunctionData( params: RollupAdminLogicPrepareFunctionDataParameters, ) { @@ -74,6 +97,22 @@ export type RollupAdminLogicPrepareTransactionRequestParameters< account: Address; }; +/** + * Prepares a transaction request for a Rollup Admin Logic function to be + * executed on a public client. + * + * @template TFunctionName - The name of the function to prepare a transaction request for. + * @template TTransport - The type of transport used by the public client. + * @template TChain - The type of chain the public client is connected to. + * @param {PublicClient} client - The public client to execute the transaction on. + * @param {RollupAdminLogicPrepareTransactionRequestParameters} params - The parameters for preparing the transaction request. + * @param {Address | false} params.upgradeExecutor - The address of the upgrade executor, or false if not applicable. + * @param {TFunctionName} params.functionName - The name of the function to prepare data for. + * @param {Array} params.args - The arguments for the function. + * @param {Address} params.rollup - The address of the rollup. + * @param {Address} params.account - The address of the account initiating the transaction. + * @returns {Promise} A promise that resolves to the prepared transaction request. + */ export async function rollupAdminLogicPrepareTransactionRequest< TFunctionName extends RollupAdminLogicFunctionName, TTransport extends Transport = Transport, diff --git a/src/rollupAdminLogicReadContract.ts b/src/rollupAdminLogicReadContract.ts index 8c0ae01f..d040e960 100644 --- a/src/rollupAdminLogicReadContract.ts +++ b/src/rollupAdminLogicReadContract.ts @@ -18,7 +18,13 @@ export type RollupAdminLogicFunctionName = GetFunctionName; export type RollupAdminLogicReadContractParameters< TFunctionName extends RollupAdminLogicFunctionName, > = { + /** + * The name of the function to call on the RollupAdminLogic contract + */ functionName: TFunctionName; + /** + * The address of the RollupAdminLogic contract + */ rollup: Address; } & GetFunctionArgs; @@ -26,6 +32,31 @@ export type RollupAdminLogicReadContractReturnType< TFunctionName extends RollupAdminLogicFunctionName, > = ReadContractReturnType; +/** + * Reads data from the RollupAdminLogic contract on the specified rollup chain + * and returns the result. + * + * @template TChain - The type of the chain (or undefined) + * @template TFunctionName - The name of the function to call + * + * @param {PublicClient} client - The public client to use for the read operation + * @param {RollupAdminLogicReadContractParameters} params - The parameters for the read operation + * @param {TFunctionName} params.functionName - The name of the function to call on the RollupAdminLogic contract + * @param {Address} params.rollup - The address of the RollupAdminLogic contract + * @param {Array} params.args - The arguments for the function call + * + * @returns {Promise>} - The result of the read operation + * + * @example + * const client = new PublicClient(...); + * const params = { + * functionName: 'getOwner', + * rollup: '0x1234567890abcdef1234567890abcdef12345678', + * args: [], + * }; + * const result = await rollupAdminLogicReadContract(client, params); + * console.log(result); + */ export function rollupAdminLogicReadContract< TChain extends Chain | undefined, TFunctionName extends RollupAdminLogicFunctionName, diff --git a/src/scripts/generateNodeConfigType.ts b/src/scripts/generateNodeConfigType.ts index c89883a9..60e38c8d 100644 --- a/src/scripts/generateNodeConfigType.ts +++ b/src/scripts/generateNodeConfigType.ts @@ -4,6 +4,11 @@ import { Project, WriterFunction, Writers } from 'ts-morph'; const { objectType } = Writers; +/** + * Retrieves the Nitro node image tag from command line arguments or returns the default tag. + * + * @returns {string} The Nitro node image tag. + */ function getNitroNodeImageTag(): string { const defaultNitroNodeTag = 'v2.3.3-6a1c1a7'; const argv = process.argv.slice(2); @@ -24,6 +29,11 @@ const nitroNodeHelpOutputFile = `${nitroNodeImage.replace('/', '-')}-help.txt`; console.log(`Using image "${nitroNodeImage}".`); +/** + * Generates a header comment for the output file. + * + * @returns {string} The header comment. + */ function generateHeader() { return [ `// ---`, @@ -37,12 +47,27 @@ function generateHeader() { ].join('\n'); } +/** + * Represents a CLI option. + * + * @typedef {Object} CliOption + * @property {string} name - The name of the CLI option. + * @property {string} type - The type of the CLI option. + * @property {string[]} docs - The documentation for the CLI option. + */ type CliOption = { name: string; type: string; docs: string[]; }; +/** + * Parses the CLI options from the help file contents. + * + * @param {string} fileContents - The contents of the help file. + * @returns {CliOption[]} The parsed CLI options. + * @throws Will throw an error if an unknown type is encountered. + */ function parseCliOptions(fileContents: string): CliOption[] { const types: Record = { string: 'string', @@ -112,10 +137,21 @@ function parseCliOptions(fileContents: string): CliOption[] { }); } +/** + * Represents a nested object of CLI options. + * + * @typedef {Object} CliOptionNestedObject + */ type CliOptionNestedObject = { [key: string]: CliOption | CliOptionNestedObject; }; +/** + * Creates a nested object of CLI options from a flat array of CLI options. + * + * @param {CliOption[]} options - The flat array of CLI options. + * @returns {CliOptionNestedObject} The nested object of CLI options. + */ function createCliOptionsNestedObject(options: CliOption[]): CliOptionNestedObject { const result: CliOptionNestedObject = {}; @@ -138,10 +174,22 @@ function createCliOptionsNestedObject(options: CliOption[]): CliOptionNestedObje return result; } +/** + * Checks if the given value is a CLI option. + * + * @param {CliOption | CliOptionNestedObject} value - The value to check. + * @returns {boolean} True if the value is a CLI option, false otherwise. + */ function isCliOption(value: CliOption | CliOptionNestedObject): value is CliOption { return 'type' in value; } +/** + * Retrieves the documentation for a given CLI option or nested object. + * + * @param {CliOption | CliOptionNestedObject} value - The value to retrieve documentation for. + * @returns {string[]} The documentation for the value. + */ function getDocs(value: CliOption | CliOptionNestedObject): string[] { if (isCliOption(value)) { return value.docs; @@ -151,6 +199,12 @@ function getDocs(value: CliOption | CliOptionNestedObject): string[] { return []; } +/** + * Recursively retrieves the type for a given CLI option or nested object. + * + * @param {CliOption | CliOptionNestedObject} value - The value to retrieve the type for. + * @returns {string | WriterFunction} The type of the value. + */ function getTypeRecursively(value: CliOption | CliOptionNestedObject): string | WriterFunction { // if we reached the "primitive" property, we can just return its type if (isCliOption(value)) { @@ -169,6 +223,9 @@ function getTypeRecursively(value: CliOption | CliOptionNestedObject): string | }); } +/** + * Main function to generate the NodeConfig type. + */ function main() { // run --help on the nitro binary and save the output to a file execSync(`docker run --rm ${nitroNodeImage} --help > ${nitroNodeHelpOutputFile} 2>&1`); diff --git a/src/sequencerInboxPrepareTransactionRequest.ts b/src/sequencerInboxPrepareTransactionRequest.ts index 241f430f..306ac9e1 100644 --- a/src/sequencerInboxPrepareTransactionRequest.ts +++ b/src/sequencerInboxPrepareTransactionRequest.ts @@ -18,6 +18,16 @@ export type SequencerInboxFunctionName = GetFunctionName; type SequencerInboxEncodeFunctionDataParameters = EncodeFunctionDataParameters; +/** + * Encodes function data for the Sequencer Inbox contract. + * + * @template TFunctionName - The name of the function to encode. + * @param {SequencerInboxEncodeFunctionDataParameters} params - The parameters for encoding the function data. + * @param {SequencerInboxAbi} params.abi - The ABI of the Sequencer Inbox contract. + * @param {TFunctionName} params.functionName - The name of the function to encode. + * @param {Array} params.args - The arguments for the function. + * @returns {string} The encoded function data. + */ function sequencerInboxEncodeFunctionData({ abi, functionName, @@ -36,6 +46,17 @@ type SequencerInboxPrepareFunctionDataParameters} params - The parameters for preparing the function data. + * @param {Address | false} params.upgradeExecutor - The address of the upgrade executor or false if not applicable. + * @param {SequencerInboxAbi} params.abi - The ABI of the Sequencer Inbox contract. + * @param {Address} params.sequencerInbox - The address of the Sequencer Inbox contract. + * @returns {Object} The prepared function data including the target address, data, and value. + */ function sequencerInboxPrepareFunctionData( params: SequencerInboxPrepareFunctionDataParameters, ) { @@ -72,6 +93,21 @@ export type SequencerInboxPrepareTransactionRequestParameters< account: Address; }; +/** + * Prepares a transaction request to interact with the Sequencer Inbox contract on a specified chain. + * + * @template TFunctionName - The name of the function to call on the Sequencer Inbox contract. + * @template TTransport - The transport type for the PublicClient. + * @template TChain - The chain type. + * @param {PublicClient} client - The public client to use for the transaction. + * @param {SequencerInboxPrepareTransactionRequestParameters} params - The parameters for the transaction request. + * @param {TFunctionName} params.functionName - The name of the function to call on the Sequencer Inbox contract. + * @param {Array} params.args - The arguments for the function call. + * @param {Address | false} params.upgradeExecutor - The address of the upgrade executor or false if not applicable. + * @param {Address} params.sequencerInbox - The address of the Sequencer Inbox contract. + * @param {Address} params.account - The account address to use for the transaction. + * @returns {Promise} The prepared transaction request object. + */ export async function sequencerInboxPrepareTransactionRequest< TFunctionName extends SequencerInboxFunctionName, TTransport extends Transport = Transport, diff --git a/src/sequencerInboxReadContract.ts b/src/sequencerInboxReadContract.ts index 7b2b607d..a3c1e871 100644 --- a/src/sequencerInboxReadContract.ts +++ b/src/sequencerInboxReadContract.ts @@ -23,6 +23,30 @@ export type SequencerInboxReadContractParameters = ReadContractReturnType; +/** + * Reads data from the sequencer inbox contract on a specified chain and returns + * the result. + * + * @template TChain - The type of the blockchain chain. + * @template TFunctionName - The name of the function to read from the contract. + * @param {PublicClient} client - The public client to interact with the blockchain. + * @param {SequencerInboxReadContractParameters} params - The parameters for reading the contract. + * @param {TFunctionName} params.functionName - The name of the function to read from the contract. + * @param {Address} params.sequencerInbox - The address of the sequencer inbox contract. + * @param {...any} params.args - The arguments to pass to the contract function. + * + * @returns {Promise>} - A promise that resolves to the result of the contract function. + * + * @example + * const client = new PublicClient(...); + * const params = { + * functionName: 'getInboxAccumulators', + * sequencerInbox: '0x1234...abcd', + * args: [], + * }; + * const result = await sequencerInboxReadContract(client, params); + * console.log(result); + */ export function sequencerInboxReadContract< TChain extends Chain | undefined, TFunctionName extends SequencerInboxFunctionName, diff --git a/src/setValidKeyset.ts b/src/setValidKeyset.ts index 167ae813..7286efec 100644 --- a/src/setValidKeyset.ts +++ b/src/setValidKeyset.ts @@ -12,6 +12,33 @@ export type SetValidKeysetParams = { walletClient: WalletClient; }; +/** + * Sets the valid keyset for a contract on the parent chain. + * + * @param {SetValidKeysetParams} setValidKeysetParams - The parameters for setting the valid keyset. + * @param {Object} setValidKeysetParams.coreContracts - The core contracts involved in the operation. + * @param {string} setValidKeysetParams.coreContracts.upgradeExecutor - The address of the upgrade executor contract. + * @param {string} setValidKeysetParams.coreContracts.sequencerInbox - The address of the sequencer inbox contract. + * @param {string} setValidKeysetParams.keyset - The keyset to be set, represented as a hex string. + * @param {PublicClient} setValidKeysetParams.publicClient - The public client for interacting with the blockchain. + * @param {WalletClient} setValidKeysetParams.walletClient - The wallet client for signing and sending transactions. + * + * @returns {Promise} The transaction receipt after setting the valid keyset. + * + * @throws Will throw an error if the account is undefined. + * + * @example + * const txReceipt = await setValidKeyset({ + * coreContracts: { + * upgradeExecutor: '0x123...456', + * sequencerInbox: '0x789...abc', + * }, + * keyset: '0xdef...012', + * publicClient, + * walletClient, + * }); + * console.log(txReceipt); + */ export async function setValidKeyset({ coreContracts, keyset, diff --git a/src/setValidKeysetEncodeFunctionData.ts b/src/setValidKeysetEncodeFunctionData.ts index 8094743d..6b89cfc4 100644 --- a/src/setValidKeysetEncodeFunctionData.ts +++ b/src/setValidKeysetEncodeFunctionData.ts @@ -1,5 +1,12 @@ import { encodeFunctionData, parseAbi } from 'viem'; +/** + * Encodes the function data for setting a valid keyset by parsing the ABI and + * encoding the function name and arguments. + * + * @param {string} keyset - The keyset in hexadecimal string format prefixed with '0x'. + * @returns {string} - The encoded function data for setting a valid keyset. + */ export function setValidKeysetEncodeFunctionData(keyset: `0x${string}`) { return encodeFunctionData({ abi: parseAbi(['function setValidKeyset(bytes keysetBytes)']), diff --git a/src/setValidKeysetPrepareTransactionRequest.ts b/src/setValidKeysetPrepareTransactionRequest.ts index 10811e8a..cd55a78b 100644 --- a/src/setValidKeysetPrepareTransactionRequest.ts +++ b/src/setValidKeysetPrepareTransactionRequest.ts @@ -12,6 +12,34 @@ export type SetValidKeysetPrepareTransactionRequestParams = Omit< account: Address; }; +/** + * Sets up a transaction request to upgrade the executor with a valid keyset. + * This function prepares the transaction request by encoding the necessary + * function data and validating the parent chain. It returns the prepared + * transaction request along with the chain ID. + * + * @param {Object} setValidKeysetPrepareTransactionRequestParams - Parameters for preparing the transaction request + * @param {Object} setValidKeysetPrepareTransactionRequestParams.coreContracts - Core contracts involved in the transaction + * @param {Object} setValidKeysetPrepareTransactionRequestParams.keyset - The keyset to be validated + * @param {string} setValidKeysetPrepareTransactionRequestParams.account - The account address initiating the transaction + * @param {Object} setValidKeysetPrepareTransactionRequestParams.publicClient - The public client used for the transaction + * + * @returns {Promise} - The prepared transaction request along with the chain ID + * + * @example + * const txRequest = await setValidKeysetPrepareTransactionRequest({ + * coreContracts: { + * upgradeExecutor: '0x...', + * sequencerInbox: '0x...', + * }, + * keyset: { + * keys: ['0x...'], + * threshold: 1, + * }, + * account: '0x...', + * publicClient, + * }); + */ export async function setValidKeysetPrepareTransactionRequest({ coreContracts, keyset, diff --git a/src/testHelpers.ts b/src/testHelpers.ts index fcf38377..4130aace 100644 --- a/src/testHelpers.ts +++ b/src/testHelpers.ts @@ -26,6 +26,11 @@ type NitroTestNodePrivateKeyAccounts = { // l3 token bridge deployer which holds custom gas token }; +/** + * Returns a collection of private key accounts for the Nitro test node, + * including deployer, L2 rollup owner, L3 rollup owner, L3 token bridge + * deployer, and L2 token bridge deployer. + */ export function getNitroTestnodePrivateKeyAccounts(): NitroTestNodePrivateKeyAccounts { if ( typeof process.env.NITRO_TESTNODE_DEPLOYER_PRIVATE_KEY === 'undefined' || @@ -89,6 +94,10 @@ type TestnodeInformation = { l3NativeToken: `0x${string}`; }; +/** + * Returns information about the testnode setup including addresses for the + * bridge, rollup, sequencer inbox, batch poster, and more. + */ export function getInformationFromTestnode(): TestnodeInformation { const containers = [ 'nitro_sequencer_1', @@ -135,6 +144,7 @@ export function getInformationFromTestnode(): TestnodeInformation { throw new Error('nitro-testnode sequencer not found'); } +/** Creates a rollup chain with specified deployment parameters and validators. */ export async function createRollupHelper({ deployer, batchPoster, diff --git a/src/types/ParentChain.ts b/src/types/ParentChain.ts index deebae74..e889c71b 100644 --- a/src/types/ParentChain.ts +++ b/src/types/ParentChain.ts @@ -21,6 +21,11 @@ function isValidParentChainId(parentChainId: number | undefined): parentChainId return ids.includes(Number(parentChainId)); } +/** + * Validates the provided parent chain ID to ensure it is supported by the + * system. If the parent chain ID is not valid, an error is thrown with a + * corresponding message. Returns the validated parent chain ID. + */ export function validateParentChain< TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, @@ -34,6 +39,11 @@ export function validateParentChain< return chainId; } +/** + * Validates the parent chain of a {@link PublicClient} to ensure it is + * supported. If the parent chain is not supported, an error is thrown. Returns + * a {@link ParentChainPublicClient}. + */ export function validateParentChainPublicClient< TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, diff --git a/src/upgradeExecutorEncodeFunctionData.ts b/src/upgradeExecutorEncodeFunctionData.ts index 9192e3d4..7482cf66 100644 --- a/src/upgradeExecutorEncodeFunctionData.ts +++ b/src/upgradeExecutorEncodeFunctionData.ts @@ -2,26 +2,53 @@ import { encodeFunctionData, EncodeFunctionDataParameters, keccak256, toHex } fr import { upgradeExecutor } from './contracts'; import { GetFunctionName, Prettify } from './types/utils'; -// Roles -// 0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775 +/** + * Roles + * @constant {string} UPGRADE_EXECUTOR_ROLE_ADMIN - Role hash for the admin role + * @constant {string} UPGRADE_EXECUTOR_ROLE_EXECUTOR - Role hash for the executor role + */ export const UPGRADE_EXECUTOR_ROLE_ADMIN = keccak256(toHex('ADMIN_ROLE')); -// 0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63 export const UPGRADE_EXECUTOR_ROLE_EXECUTOR = keccak256(toHex('EXECUTOR_ROLE')); + +/** + * @typedef {('UPGRADE_EXECUTOR_ROLE_ADMIN' | 'UPGRADE_EXECUTOR_ROLE_EXECUTOR')} UpgradeExecutorRole + * Type for upgrade executor roles. + */ export type UpgradeExecutorRole = | typeof UPGRADE_EXECUTOR_ROLE_ADMIN | typeof UPGRADE_EXECUTOR_ROLE_EXECUTOR; -// Types for upgradeExecutorEncodeFunctionData +/** + * @typedef {Object} UpgradeExecutorAbi - ABI of the upgrade executor contract + */ export type UpgradeExecutorAbi = typeof upgradeExecutor.abi; + +/** + * @typedef {string} UpgradeExecutorFunctionName - Function names in the upgrade executor contract + */ export type UpgradeExecutorFunctionName = GetFunctionName; + +/** + * @typedef {Object} UpgradeExecutorEncodeFunctionDataParameters - Parameters for encoding function data + * @property {UpgradeExecutorFunctionName} functionName - Name of the function to encode + * @property {Array} args - Arguments to encode with the function + */ export type UpgradeExecutorEncodeFunctionDataParameters< TFunctionName extends UpgradeExecutorFunctionName, > = Prettify, 'abi'>>; -// Encodes a function call to be sent through the UpgradeExecutor +/** + * Encodes a function call to be sent through the UpgradeExecutor + * + * @template TFunctionName + * @param {UpgradeExecutorEncodeFunctionDataParameters} params - Parameters for encoding function data + * @param {UpgradeExecutorFunctionName} params.functionName - Name of the function to encode + * @param {Array} params.args - Arguments to encode with the function + * @returns {string} Encoded function data + */ export function upgradeExecutorEncodeFunctionData< TFunctionName extends UpgradeExecutorFunctionName, ->({ functionName, args }: UpgradeExecutorEncodeFunctionDataParameters) { +>({ functionName, args }: UpgradeExecutorEncodeFunctionDataParameters): string { // @ts-ignore (todo: fix viem type issue) return encodeFunctionData({ abi: upgradeExecutor.abi, diff --git a/src/upgradeExecutorFetchPrivilegedAccounts.ts b/src/upgradeExecutorFetchPrivilegedAccounts.ts index 43f8b3fd..7cb275c9 100644 --- a/src/upgradeExecutorFetchPrivilegedAccounts.ts +++ b/src/upgradeExecutorFetchPrivilegedAccounts.ts @@ -92,7 +92,7 @@ const RoleRevokedEventAbi = { export async function upgradeExecutorFetchPrivilegedAccounts({ upgradeExecutorAddress, publicClient, -}: UpgradeExecutorFetchPrivilegedAccountsParams) { +}: UpgradeExecutorFetchPrivilegedAccountsParams): Promise { // 0. Initialize result object const upgradeExecutorPrivilegedAccounts: UpgradeExecutorPrivilegedAccounts = {}; @@ -149,3 +149,5 @@ export async function upgradeExecutorFetchPrivilegedAccounts({ return upgradeExecutorPrivilegedAccounts; } + + diff --git a/src/upgradeExecutorPrepareAddExecutorTransactionRequest.ts b/src/upgradeExecutorPrepareAddExecutorTransactionRequest.ts index 50887081..acef9acf 100644 --- a/src/upgradeExecutorPrepareAddExecutorTransactionRequest.ts +++ b/src/upgradeExecutorPrepareAddExecutorTransactionRequest.ts @@ -47,7 +47,7 @@ export async function upgradeExecutorPrepareAddExecutorTransactionRequest({ upgradeExecutorAddress, executorAccountAddress, publicClient, -}: UpgradeExecutorPrepareAddExecutorTransactionRequestParams) { +}: UpgradeExecutorPrepareAddExecutorTransactionRequestParams): Promise { const chainId = validateChain(publicClient); // 0. Verify that the account doesn't have the EXECUTOR role already diff --git a/src/upgradeExecutorPrepareRemoveExecutorTransactionRequest.ts b/src/upgradeExecutorPrepareRemoveExecutorTransactionRequest.ts index ab8b97d4..07952a15 100644 --- a/src/upgradeExecutorPrepareRemoveExecutorTransactionRequest.ts +++ b/src/upgradeExecutorPrepareRemoveExecutorTransactionRequest.ts @@ -47,7 +47,7 @@ export async function upgradeExecutorPrepareRemoveExecutorTransactionRequest({ upgradeExecutorAddress, executorAccountAddress, publicClient, -}: UpgradeExecutorPrepareRemoveExecutorTransactionRequestParams) { +}: UpgradeExecutorPrepareRemoveExecutorTransactionRequestParams): Promise { const chainId = validateChain(publicClient); // 0. Verify that the account doesn't have the EXECUTOR role already diff --git a/src/utils/erc20.ts b/src/utils/erc20.ts index bff145b7..c0a65a51 100644 --- a/src/utils/erc20.ts +++ b/src/utils/erc20.ts @@ -2,6 +2,14 @@ import { Address, PublicClient, WalletClient, encodeFunctionData } from 'viem'; import { erc20 } from '../contracts'; +/** + * Encodes the function data for approving a spender to use a specified amount of tokens. + * + * @param {Object} params - The parameters for encoding the function data. + * @param {Address} params.spender - The address of the spender. + * @param {bigint} params.amount - The amount of tokens to approve. + * @returns {string} The encoded function data. + */ function approveEncodeFunctionData({ spender, amount }: { spender: Address; amount: bigint }) { return encodeFunctionData({ abi: erc20.abi, @@ -18,6 +26,17 @@ export type ApprovePrepareTransactionRequestProps = { publicClient: PublicClient; }; +/** + * Prepares a transaction request to approve a specific amount of tokens for a spender. + * + * @param {ApprovePrepareTransactionRequestProps} props - The properties for preparing the transaction request. + * @param {Address} props.address - The address of the token contract. + * @param {Address} props.owner - The address of the token owner. + * @param {Address} props.spender - The address of the spender. + * @param {bigint} props.amount - The amount of tokens to approve. + * @param {PublicClient} props.publicClient - The public client to interact with the blockchain. + * @returns {Promise} The prepared transaction request. + */ export async function approvePrepareTransactionRequest({ address, owner, @@ -42,6 +61,17 @@ export type ApproveProps = { walletClient: WalletClient; }; +/** + * Approves the spending of a specified amount of tokens by a designated address. + * + * @param {ApproveProps} props - The properties for the approve function. + * @param {Address} props.address - The address of the token contract. + * @param {Address} props.spender - The address of the spender. + * @param {bigint} props.amount - The amount of tokens to approve. + * @param {PublicClient} props.publicClient - The public client to interact with the blockchain. + * @param {WalletClient} props.walletClient - The wallet client to sign and send the transaction. + * @returns {Promise} The transaction receipt. + */ export async function approve({ address, spender, @@ -74,6 +104,16 @@ export type FetchAllowanceProps = { publicClient: PublicClient; }; +/** + * Retrieves the allowance of tokens that the owner has approved to be spent by a specific spender. + * + * @param {FetchAllowanceProps} props - The properties for fetching the allowance. + * @param {Address} props.address - The address of the token contract. + * @param {Address} props.owner - The address of the token owner. + * @param {Address} props.spender - The address of the spender. + * @param {PublicClient} props.publicClient - The public client to interact with the blockchain. + * @returns {Promise} The allowance amount. + */ export async function fetchAllowance({ address, owner, @@ -88,6 +128,14 @@ export async function fetchAllowance({ }); } +/** + * Retrieves the number of decimals for a specified ERC20 token at the given address. + * + * @param {Object} params - The parameters for fetching the decimals. + * @param {Address} params.address - The address of the token contract. + * @param {PublicClient} params.publicClient - The public client to interact with the blockchain. + * @returns {Promise} The number of decimals. + */ export function fetchDecimals({ address, publicClient, @@ -101,3 +149,4 @@ export function fetchDecimals({ functionName: 'decimals', }); } + diff --git a/src/utils/gasOverrides.ts b/src/utils/gasOverrides.ts index a57d424d..64321275 100644 --- a/src/utils/gasOverrides.ts +++ b/src/utils/gasOverrides.ts @@ -7,12 +7,25 @@ export type TransactionRequestGasOverrides = { gasLimit?: GasOverrideOptions; }; +/** + * Calculates the gas limit with a percentage increase based on the provided base and percent increase values. + * + * @param {Object} params - The parameters for the gas limit calculation. + * @param {bigint} params.base - The base gas limit. + * @param {bigint} [params.percentIncrease=0n] - The percentage increase to apply to the base gas limit. + * + * @returns {bigint} - The calculated gas limit with the percentage increase applied. + * + * @example + * const gasLimit = applyPercentIncrease({ base: 1000n, percentIncrease: 20n }); + * console.log(gasLimit); // Outputs: 1200n + */ export function applyPercentIncrease({ base, percentIncrease = 0n, }: { base: bigint; percentIncrease?: bigint; -}) { +}): bigint { return base + (base * percentIncrease) / 100n; } diff --git a/src/utils/generateChainId.ts b/src/utils/generateChainId.ts index 49be9ed2..7483c7d2 100644 --- a/src/utils/generateChainId.ts +++ b/src/utils/generateChainId.ts @@ -1,3 +1,12 @@ +/** + * Generates a random chain ID as a number. + * + * @returns {number} A randomly generated chain ID. + * + * @example + * const chainId = generateChainId(); + * console.log(chainId); // Outputs a random chain ID + */ export function generateChainId() { return Math.floor(Math.random() * 100000000000) + 1; } diff --git a/src/utils/getArbOSVersion.ts b/src/utils/getArbOSVersion.ts index ec619577..a51e43ae 100644 --- a/src/utils/getArbOSVersion.ts +++ b/src/utils/getArbOSVersion.ts @@ -4,9 +4,9 @@ import { ARB_SYS_ADDRESS } from '@arbitrum/sdk/dist/lib/dataEntities/constants'; /** * Returns the the ArbOS version from the provider passed in parameter. * - * @param arbitrumPublicClient - viem public client + * @param {PublicClient} arbitrumPublicClient - viem public client * @throws if the provider is not an arbitrum chain - * @returns the ArbOS version + * @returns {Promise} the ArbOS version */ export async function getArbOSVersion(arbitrumPublicClient: PublicClient): Promise { const arbOSVersion = await arbitrumPublicClient.readContract({ diff --git a/src/utils/getClientVersion.ts b/src/utils/getClientVersion.ts index 796ef009..e3245cef 100644 --- a/src/utils/getClientVersion.ts +++ b/src/utils/getClientVersion.ts @@ -6,6 +6,13 @@ type JsonRpcResult = { result: string; }; +/** + * Returns the client version of the provided PublicClient or RPC URL. + * + * @param {PublicClient | string} publicClientOrRpcUrl - The PublicClient instance or RPC URL string. + * @returns {Promise} - A promise that resolves to the client version string. + * @throws {Error} - Throws an error if the RPC URL is invalid. + */ export async function getClientVersion( publicClientOrRpcUrl: PublicClient | string, ): Promise { diff --git a/src/utils/getParentChainLayer.ts b/src/utils/getParentChainLayer.ts index b9bafef9..8492d03b 100644 --- a/src/utils/getParentChainLayer.ts +++ b/src/utils/getParentChainLayer.ts @@ -10,6 +10,14 @@ import { } from '../chains'; import { ParentChainId } from '../types/ParentChain'; +/** + * Returns the layer of the parent chain identified by the provided + * ParentChainId. + * + * @param {ParentChainId} parentChainId - The identifier of the parent chain. + * + * @returns {number} - The layer of the parent chain (1 or 2). + */ export function getParentChainLayer(parentChainId: ParentChainId) { // doing switch here to make sure it's exhaustive when checking against `ParentChainId` switch (parentChainId) { diff --git a/src/utils/getters.ts b/src/utils/getters.ts index 07d2e253..40eece6b 100644 --- a/src/utils/getters.ts +++ b/src/utils/getters.ts @@ -3,6 +3,13 @@ import { Chain, PublicClient } from 'viem'; import { rollupCreator, tokenBridgeCreator } from '../contracts'; import { validateParentChain } from '../types/ParentChain'; +/** + * Returns the address of the rollup creator for a given public client. + * + * @param {PublicClient} client - The public client instance. + * @returns {string} - The address of the rollup creator. + * @throws {Error} - If the parent chain is not supported. + */ export function getRollupCreatorAddress(client: PublicClient) { const chainId = validateParentChain(client); @@ -13,6 +20,13 @@ export function getRollupCreatorAddress(client: PublicClient) { return rollupCreator.address[chainId]; } +/** + * Returns the address of the token bridge creator for a specific chain based on the provided PublicClient. + * + * @param {PublicClient} client - The public client instance. + * @returns {string} - The address of the token bridge creator. + * @throws {Error} - If the parent chain is not supported. + */ export function getTokenBridgeCreatorAddress(client: PublicClient) { const chainId = validateParentChain(client); @@ -23,6 +37,12 @@ export function getTokenBridgeCreatorAddress(client: PublicClient) { return tokenBridgeCreator.address[chainId]; } +/** + * Returns the URL of the block explorer for a given {@link Chain}. + * + * @param {Chain} chain - The chain instance. + * @returns {string | undefined} - The URL of the block explorer or undefined if not available. + */ export function getBlockExplorerUrl(chain: Chain) { return chain.blockExplorers?.default.url; } diff --git a/src/utils/isAnyTrustChainConfig.ts b/src/utils/isAnyTrustChainConfig.ts index a3d1d4c6..1b726d2a 100644 --- a/src/utils/isAnyTrustChainConfig.ts +++ b/src/utils/isAnyTrustChainConfig.ts @@ -1,5 +1,12 @@ import { ChainConfig } from '../types/ChainConfig'; -export function isAnyTrustChainConfig(chainConfig: ChainConfig) { +/** + * Checks if there is any trust chain configuration present in the given {@link + * ChainConfig} object. + * + * @param {ChainConfig} chainConfig - The chain configuration object to be checked. + * @returns {boolean} - Returns true if there is a Data Availability Committee configuration, false otherwise. + */ +export function isAnyTrustChainConfig(chainConfig: ChainConfig): boolean { return chainConfig.arbitrum.DataAvailabilityCommittee; } diff --git a/src/utils/isCustomFeeTokenAddress.ts b/src/utils/isCustomFeeTokenAddress.ts index 675e4b2f..070b22f4 100644 --- a/src/utils/isCustomFeeTokenAddress.ts +++ b/src/utils/isCustomFeeTokenAddress.ts @@ -1,5 +1,12 @@ import { Address, zeroAddress } from 'viem'; +/** + * Returns true if the provided address is not undefined and not equal to + * zeroAddress, indicating that it is a custom fee token address. + * + * @param {Address | undefined} nativeToken - The address to check. + * @returns {boolean} - True if the address is a custom fee token address, false otherwise. + */ export function isCustomFeeTokenAddress(nativeToken: Address | undefined): nativeToken is Address { return typeof nativeToken !== 'undefined' && nativeToken !== zeroAddress; } diff --git a/src/utils/isCustomFeeTokenChain.ts b/src/utils/isCustomFeeTokenChain.ts index 4fef44e9..9d25c81b 100644 --- a/src/utils/isCustomFeeTokenChain.ts +++ b/src/utils/isCustomFeeTokenChain.ts @@ -1,12 +1,31 @@ import { Address, PublicClient, parseAbi } from 'viem'; +/** + * Checks if the given rollup chain is a custom fee token chain by verifying the + * existence of a native token on the bridge contract. Returns true if it is a + * custom fee token chain, false otherwise. + * + * @param {Object} params - The parameters for the function + * @param {Address} params.rollup - The address of the rollup + * @param {PublicClient} params.parentChainPublicClient - The public client for the parent chain + * + * @returns {Promise} - Returns a promise that resolves to true if the rollup chain is a custom fee token chain, false otherwise + */ export async function isCustomFeeTokenChain({ rollup, parentChainPublicClient, }: { + /** + * The address of the rollup + * @type {Address} + */ rollup: Address; + /** + * The public client for the parent chain + * @type {PublicClient} + */ parentChainPublicClient: PublicClient; -}) { +}): Promise { const bridge = await parentChainPublicClient.readContract({ address: rollup, abi: parseAbi(['function bridge() view returns (address)']), diff --git a/src/utils/registerNewNetwork.ts b/src/utils/registerNewNetwork.ts index 3572237a..86d800a2 100644 --- a/src/utils/registerNewNetwork.ts +++ b/src/utils/registerNewNetwork.ts @@ -12,7 +12,15 @@ import { isArbitrumChain } from '@arbitrum/sdk/dist/lib/utils/lib'; import { arbitrum, arbitrumNova, arbitrumSepolia, mainnet, sepolia } from 'viem/chains'; import { nitroTestnodeL1, nitroTestnodeL2 } from '../chains'; -async function isNetworkRegistered(provider: JsonRpcProvider, { type }: { type: 'L1' | 'L2' }) { +/** + * Checks if a network is registered as either L1 or L2. + * + * @param {JsonRpcProvider} provider - The JSON RPC provider to use for the network. + * @param {Object} options - Options for the network type. + * @param {('L1'|'L2')} options.type - The type of network to check (L1 or L2). + * @returns {Promise} - Returns true if the network is registered, otherwise false. + */ +async function isNetworkRegistered(provider: JsonRpcProvider, { type }: { type: 'L1' | 'L2' }): Promise { try { if (type === 'L1') { await getL1Network(provider); @@ -26,7 +34,14 @@ async function isNetworkRegistered(provider: JsonRpcProvider, { type }: { type: } } -const parentChainIdFromChildChainId = (childChainId: number) => { +/** + * Returns the parent chain ID for a given child chain ID. + * + * @param {number} childChainId - The ID of the child chain. + * @returns {number} - The ID of the parent chain. + * @throws Will throw an error if the child chain ID is invalid. + */ +const parentChainIdFromChildChainId = (childChainId: number): number => { const parentChainId = { [arbitrum.id]: mainnet.id, [arbitrumNova.id]: mainnet.id, @@ -41,6 +56,16 @@ const parentChainIdFromChildChainId = (childChainId: number) => { return parentChainId; }; +/** + * Creates a child network based on the provided rollup address, parent provider, parent network, and child network. + * + * @param {Object} params - The parameters for creating the child network. + * @param {string} params.rollupAddress - The rollup address of the child network. + * @param {JsonRpcProvider} params.parentProvider - The JSON RPC provider for the parent network. + * @param {Network} params.parentNetwork - The parent network information. + * @param {Network} params.childNetwork - The child network information. + * @returns {Promise} - Returns the created child network as an L2Network. + */ async function createChildNetwork({ rollupAddress, parentProvider, @@ -93,6 +118,16 @@ async function createChildNetwork({ }; } +/** + * Creates a parent network based on the provided parent network, child network, and whether it is an Arbitrum network. + * + * @template TIsArbitrum - A boolean indicating if the network is an Arbitrum network. + * @param {Object} params - The parameters for creating the parent network. + * @param {Network} params.parentNetwork - The parent network information. + * @param {Network} params.childNetwork - The child network information. + * @param {TIsArbitrum} params.isArbitrum - A boolean indicating if the network is an Arbitrum network. + * @returns {Promise} - Returns the created parent network as an L1Network or L2Network. + */ async function createParentNetwork({ parentNetwork, childNetwork, @@ -163,6 +198,14 @@ async function createParentNetwork({ }; } +/** + * Registers a new network by creating parent and child networks based on the provided providers and rollup address. + * + * @param {JsonRpcProvider} parentProvider - The JSON RPC provider for the parent network. + * @param {JsonRpcProvider} childProvider - The JSON RPC provider for the child network. + * @param {string} rollupAddress - The rollup address of the child network. + * @returns {Promise<{parentNetwork: L1Network | L2Network, childNetwork: L2Network}>} - Returns an object containing the parent and child networks. + */ export const registerNewNetwork = async ( parentProvider: JsonRpcProvider, childProvider: JsonRpcProvider, @@ -171,9 +214,21 @@ export const registerNewNetwork = async ( parentNetwork: L1Network | L2Network; childNetwork: L2Network; }> => { + /** + * The variable `parentNetworkInfo` contains information about the parent + * network. + */ const parentNetworkInfo = await parentProvider.getNetwork(); + /** + * childNetworkInfo contains information about the child network obtained from + * the provided JsonRpcProvider. + */ const childNetworkInfo = await childProvider.getNetwork(); + /** + * childNetwork represents the child network for a given parent network. It is + * used to create and register L2 networks within the Arbitrum ecosystem. + */ const childNetwork = await createChildNetwork({ rollupAddress, parentProvider, @@ -183,7 +238,15 @@ export const registerNewNetwork = async ( // If the parent chain is an Arbitrum chain, we need to register parent and child chain both as L2 chains if (await isArbitrumChain(parentProvider)) { + /** Checks if the parent network is registered and returns a boolean value. */ + /** isParentNetworkRegistered checks if a parent network is registered. */ const isParentNetworkRegistered = await isNetworkRegistered(parentProvider, { type: 'L2' }); + /** Represents the parent network used for creating a child network. */ + /** + * The variable `parentNetwork` represents the parent network in the system. + * It is a {@link Network} that can be either an L1 or L2 network, depending + * on the context. + */ const parentNetwork = await createParentNetwork({ parentNetwork: parentNetworkInfo, childNetwork: childNetworkInfo, @@ -194,6 +257,8 @@ export const registerNewNetwork = async ( addCustomNetwork({ customL2Network: parentNetwork }); } + /** Checks if a child network is registered and returns a boolean value. */ + /** isChildNetworkRegistered checks if a child network is already registered. */ const isChildNetworkRegistered = await isNetworkRegistered(childProvider, { type: 'L2' }); if (!isChildNetworkRegistered) { addCustomNetwork({ customL2Network: childNetwork }); diff --git a/src/utils/sanitizePrivateKey.ts b/src/utils/sanitizePrivateKey.ts index c8d18700..e34f7b89 100644 --- a/src/utils/sanitizePrivateKey.ts +++ b/src/utils/sanitizePrivateKey.ts @@ -1,3 +1,13 @@ +/** + * Sanitizes a private key string by ensuring it starts with '0x'. + * + * @param {string} privateKey - The private key string to be sanitized. + * @returns {`0x${string}`} - The sanitized private key string. + * + * @example + * const sanitizedKey = sanitizePrivateKey('abcdef'); + * console.log(sanitizedKey); // Output: '0xabcdef' + */ export function sanitizePrivateKey(privateKey: string): `0x${string}` { if (!privateKey.startsWith('0x')) { return `0x${privateKey}`; diff --git a/src/utils/validateChain.ts b/src/utils/validateChain.ts index 539b6a3f..93db67f2 100644 --- a/src/utils/validateChain.ts +++ b/src/utils/validateChain.ts @@ -3,11 +3,25 @@ import { chains } from '../chains'; type ChainId = (typeof chains)[number]['id']; +/** + * Checks if the provided chain ID is valid. + * + * @param {number | undefined} chainId - The chain ID to validate. + * @returns {boolean} True if the chain ID is valid, otherwise false. + */ function isValidChainId(chainId: number | undefined): chainId is ChainId { const ids = chains.map((chain) => chain.id) as Number[]; return ids.includes(Number(chainId)); } +/** + * Validates the provided chain ID or PublicClient and ensures that it is a + * supported chain within the system. Returns a {@link ChainId}. + * + * @param {number | PublicClient} chainIdOrPublicClient - The chain ID or PublicClient to validate. + * @returns {ChainId} The validated chain ID. + * @throws {Error} If the chain ID is not supported. + */ export function validateChain(chainIdOrPublicClient: number | PublicClient): ChainId { const chainId = typeof chainIdOrPublicClient === 'number' diff --git a/tsconfig.json b/tsconfig.json index 995c3a66..594d5b31 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,28 @@ { - "include": ["./src/**/*"], - "exclude": ["./src/dist/**/*"], - "compilerOptions": { - "strict": true, - "incremental": true, + "compilerOptions": { + "strict": true, + "incremental": true, - "lib": ["ES2021"], - "target": "ES2021", + "lib": ["ES2021"], + "target": "ES2021", - "moduleResolution": "node", + "moduleResolution": "node", + "rootDir": "./src", - // JavaScript support - "allowJs": false, - "checkJs": false, + // JavaScript support + "allowJs": false, + "checkJs": false, - // Skip type checking for node modules - "skipLibCheck": true, - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, + // Skip type checking for node modules + "skipLibCheck": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, - // Show all keys in type without hiding in "... more ..." - // Enabling this option cause typescript performance - "noErrorTruncation": false - } + // Show all keys in type without hiding in "... more ..." + // Enabling this option cause typescript performance + "noErrorTruncation": false + }, + "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.js"] } diff --git a/yarn.lock b/yarn.lock index f35132cf..113c7c72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,39 +7,6 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== -"@arbitrum/nitro-contracts@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@arbitrum/nitro-contracts/-/nitro-contracts-1.1.1.tgz#2d8a2f9ab757bb7654562aebe435bff833c4b98d" - integrity sha512-4Tyk3XVHz+bm8UujUC78LYSw3xAxyYvBCxfEX4z3qE4/ww7Qck/rmce5gbHMzQjArEAzAP2YSfYIFuIFuRXtfg== - dependencies: - "@offchainlabs/upgrade-executor" "1.1.0-beta.0" - "@openzeppelin/contracts" "4.5.0" - "@openzeppelin/contracts-upgradeable" "4.5.2" - patch-package "^6.4.7" - -"@arbitrum/sdk@^3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-3.3.2.tgz#7560548c144bdefec9831502ccc6fdc1bb8eecfa" - integrity sha512-kK7Kt8yrSe/ArOBOawdiXWKhtsrGE70svAPLkQ8aouzwALkjbF0Gs/KpQxeQpq8k6kyuIRYfgv+yS0zjnghALQ== - dependencies: - "@ethersproject/address" "^5.0.8" - "@ethersproject/bignumber" "^5.1.1" - "@ethersproject/bytes" "^5.0.8" - async-mutex "^0.4.0" - ethers "^5.1.0" - -"@arbitrum/token-bridge-contracts@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@arbitrum/token-bridge-contracts/-/token-bridge-contracts-1.2.1.tgz#4838d70182bc0d6b36adfd733d7b4650e596c979" - integrity sha512-ngKeay/0O91QyVLCbcd2pyJIWtzKi2KsPm+O9q3xCfPkjuCZ0+MK5OdhYKCbvGc0jf39R7izRsvmUHE0qA603A== - dependencies: - "@arbitrum/nitro-contracts" "1.1.1" - "@offchainlabs/upgrade-executor" "1.1.0-beta.0" - "@openzeppelin/contracts" "4.8.3" - "@openzeppelin/contracts-upgradeable" "4.8.3" - optionalDependencies: - "@openzeppelin/upgrades-core" "^1.24.1" - "@esbuild/android-arm64@0.16.17": version "0.16.17" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz#cf91e86df127aa3d141744edafcba0abdc577d23" @@ -260,348 +227,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== -"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" - integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" - integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - -"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" - integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - -"@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.8", "@ethersproject/address@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" - integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - -"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" - integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== - dependencies: - "@ethersproject/bytes" "^5.7.0" - -"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" - integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - -"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.1.1", "@ethersproject/bignumber@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" - integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - bn.js "^5.2.1" - -"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.0.8", "@ethersproject/bytes@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" - integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" - integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - -"@ethersproject/contracts@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" - integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== - dependencies: - "@ethersproject/abi" "^5.7.0" - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - -"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" - integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" - integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/basex" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/pbkdf2" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wordlists" "^5.7.0" - -"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" - integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hdnode" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/pbkdf2" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - aes-js "3.0.0" - scrypt-js "3.0.1" - -"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" - integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - js-sha3 "0.8.0" - -"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" - integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== - -"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" - integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" - integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - -"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" - integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/providers@5.7.2": - version "5.7.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" - integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/basex" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - bech32 "1.1.4" - ws "7.4.6" - -"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" - integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" - integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" - integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - hash.js "1.1.7" - -"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" - integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - bn.js "^5.2.1" - elliptic "6.5.4" - hash.js "1.1.7" - -"@ethersproject/solidity@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" - integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" - integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" - integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - -"@ethersproject/units@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" - integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/wallet@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" - integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/hdnode" "^5.7.0" - "@ethersproject/json-wallets" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wordlists" "^5.7.0" - -"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" - integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== - dependencies: - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" - integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" @@ -652,58 +277,6 @@ resolved "https://registry.yarnpkg.com/@offchainlabs/prettier-config/-/prettier-config-0.2.1.tgz#e3b57e013935269d84bf6379cdc529b3bbca9ae5" integrity sha512-VjE4Hahx9ipTheXJVlt7tFtHeMVvlYUkKNT4uxnAK4i4qrLcqhlm/4GE9mueOS/Syi2/gzDKvNH0nk6+ts2IrA== -"@offchainlabs/upgrade-executor@1.1.0-beta.0": - version "1.1.0-beta.0" - resolved "https://registry.yarnpkg.com/@offchainlabs/upgrade-executor/-/upgrade-executor-1.1.0-beta.0.tgz#c4b1375176546a18aaef01a43956abfb58250e0a" - integrity sha512-mpn6PHjH/KDDjNX0pXHEKdyv8m6DVGQiI2nGzQn0JbM1nOSHJpWx6fvfjtH7YxHJ6zBZTcsKkqGkFKDtCfoSLw== - dependencies: - "@openzeppelin/contracts" "4.7.3" - "@openzeppelin/contracts-upgradeable" "4.7.3" - -"@openzeppelin/contracts-upgradeable@4.5.2": - version "4.5.2" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.5.2.tgz#90d9e47bacfd8693bfad0ac8a394645575528d05" - integrity sha512-xgWZYaPlrEOQo3cBj97Ufiuv79SPd8Brh4GcFYhPgb6WvAq4ppz8dWKL6h+jLAK01rUqMRp/TS9AdXgAeNvCLA== - -"@openzeppelin/contracts-upgradeable@4.7.3": - version "4.7.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.7.3.tgz#f1d606e2827d409053f3e908ba4eb8adb1dd6995" - integrity sha512-+wuegAMaLcZnLCJIvrVUDzA9z/Wp93f0Dla/4jJvIhijRrPabjQbZe6fWiECLaJyfn5ci9fqf9vTw3xpQOad2A== - -"@openzeppelin/contracts-upgradeable@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.3.tgz#6b076a7b751811b90fe3a172a7faeaa603e13a3f" - integrity sha512-SXDRl7HKpl2WDoJpn7CK/M9U4Z8gNXDHHChAKh0Iz+Wew3wu6CmFYBeie3je8V0GSXZAIYYwUktSrnW/kwVPtg== - -"@openzeppelin/contracts@4.5.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.5.0.tgz#3fd75d57de172b3743cdfc1206883f56430409cc" - integrity sha512-fdkzKPYMjrRiPK6K4y64e6GzULR7R7RwxSigHS8DDp7aWDeoReqsQI+cxHV1UuhAqX69L1lAaWDxenfP+xiqzA== - -"@openzeppelin/contracts@4.7.3": - version "4.7.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.3.tgz#939534757a81f8d69cc854c7692805684ff3111e" - integrity sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw== - -"@openzeppelin/contracts@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.3.tgz#cbef3146bfc570849405f59cba18235da95a252a" - integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== - -"@openzeppelin/upgrades-core@^1.24.1": - version "1.32.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.32.1.tgz#77d5590df6c3a4c8c9b6c47355a6f246ec47e1f5" - integrity sha512-LlaWp2UX5BYT6BXs6OxJc1eSGMR0pz7DOltj6WCAJ038NdqdEIoItP5p9VOrw7ZdUdvUYHKHY4IinLY+ITxaig== - dependencies: - cbor "^9.0.0" - chalk "^4.1.0" - compare-versions "^6.0.0" - debug "^4.1.1" - ethereumjs-util "^7.0.3" - minimist "^1.2.7" - proper-lockfile "^4.1.1" - solidity-ast "^0.4.51" - "@scure/base@~1.1.0", "@scure/base@~1.1.2": version "1.1.3" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f" @@ -741,13 +314,6 @@ mkdirp "^3.0.1" path-browserify "^1.0.1" -"@types/bn.js@^5.1.0": - version "5.1.5" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" - integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== - dependencies: - "@types/node" "*" - "@types/chai-subset@^1.3.3": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.5.tgz#3fc044451f26985f45625230a7f22284808b0a9a" @@ -760,27 +326,13 @@ resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.10.tgz#2ad2959d1767edee5b0e4efb1a0cd2b500747317" integrity sha512-of+ICnbqjmFCiixUnqRulbylyXQrPqIGf/B3Jax1wIF3DvSheysQxAWvqHhZiW3IQrycvokcLcFQlveGp+vyNg== -"@types/node@*", "@types/node@^20.9.0": +"@types/node@*": version "20.9.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.0.tgz#bfcdc230583aeb891cf51e73cfdaacdd8deae298" integrity sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw== dependencies: undici-types "~5.26.4" -"@types/pbkdf2@^3.0.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.2.tgz#2dc43808e9985a2c69ff02e2d2027bd4fe33e8dc" - integrity sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew== - dependencies: - "@types/node" "*" - -"@types/secp256k1@^4.0.1": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.6.tgz#d60ba2349a51c2cbc5e816dcd831a42029d376bf" - integrity sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ== - dependencies: - "@types/node" "*" - "@vitest/expect@0.34.6": version "0.34.6" resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.34.6.tgz#608a7b7a9aa3de0919db99b4cc087340a03ea77e" @@ -884,11 +436,6 @@ acorn@^8.10.0, acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== -aes-js@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" - integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== - ansi-regex@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" @@ -914,82 +461,26 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array.prototype.findlast@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.3.tgz#4e4b375de5adf4897fed155e2d2771564865cc3b" - integrity sha512-kcBubumjciBg4JKp5KTKtI7ec7tRefPk88yjkWJwaVKYd9QfTaxcsOxoMNKd7iBr447zCfDV0z1kOF47umv42g== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - get-intrinsic "^1.2.1" - -arraybuffer.prototype.slice@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" - integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== - dependencies: - array-buffer-byte-length "^1.0.0" - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" - is-array-buffer "^3.0.2" - is-shared-array-buffer "^1.0.2" - assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== -async-mutex@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.4.0.tgz#ae8048cd4d04ace94347507504b3cf15e631c25f" - integrity sha512-eJFZ1YhRR8UN8eBLoNzcDPcy/jqjsg6I1AP+KvWQX80BqOSW1oJPJXDylPUEeMr2ZQvHgnQ//Lp6f3RQ1zI7HA== - dependencies: - tslib "^2.4.0" - at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-x@^3.0.2: - version "3.0.9" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== - dependencies: - safe-buffer "^5.0.1" - base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -bech32@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" - integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -1004,21 +495,6 @@ bl@^5.0.0: inherits "^2.0.4" readable-stream "^3.4.0" -blakejs@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" - integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== - -bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1041,44 +517,6 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== - dependencies: - base-x "^3.0.2" - -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -1099,7 +537,7 @@ cac@^6.7.12, cac@^6.7.14: resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== -call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: +call-bind@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== @@ -1125,13 +563,6 @@ capital-case@^1.0.4: tslib "^2.0.3" upper-case-first "^2.0.2" -cbor@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-9.0.1.tgz#b16e393d4948d44758cd54ac6151379d443b37ae" - integrity sha512-/TQOWyamDxvVIv+DY9cOLNuABkoyz8K/F3QE56539pGVYohx0+MEA1f4lChFTX79dBTBS7R1PF6ovH7G+VtBfQ== - dependencies: - nofilter "^3.1.0" - chai@^4.3.10: version "4.3.10" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.10.tgz#d784cec635e3b7e2ffb66446a63b4e33bd390384" @@ -1145,7 +576,7 @@ chai@^4.3.10: pathval "^1.1.1" type-detect "^4.0.8" -chalk@^4.1.0, chalk@^4.1.2: +chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1198,24 +629,11 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - ci-info@^3.7.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - cli-cursor@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" @@ -1250,11 +668,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -compare-versions@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-6.1.0.tgz#3f2131e3ae93577df111dba133e6db876ffe127a" - integrity sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1269,40 +682,6 @@ constant-case@^3.0.4: tslib "^2.0.3" upper-case "^2.0.2" -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -1317,7 +696,7 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== -debug@^4.1.1, debug@^4.3.4: +debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1343,7 +722,7 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -define-data-property@^1.0.1, define-data-property@^1.1.1: +define-data-property@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== @@ -1352,15 +731,6 @@ define-data-property@^1.0.1, define-data-property@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" -define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" - integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== - dependencies: - define-data-property "^1.0.1" - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - detect-package-manager@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/detect-package-manager/-/detect-package-manager-2.0.1.tgz#6b182e3ae5e1826752bfef1de9a7b828cffa50d8" @@ -1398,89 +768,6 @@ dotenv@^16.0.3, dotenv@^16.3.1: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== -elliptic@6.5.4, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -es-abstract@^1.22.1: - version "1.22.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" - integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA== - dependencies: - array-buffer-byte-length "^1.0.0" - arraybuffer.prototype.slice "^1.0.2" - available-typed-arrays "^1.0.5" - call-bind "^1.0.5" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.6" - get-intrinsic "^1.2.2" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.12" - is-weakref "^1.0.2" - object-inspect "^1.13.1" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.5.1" - safe-array-concat "^1.0.1" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.8" - string.prototype.trimend "^1.0.7" - string.prototype.trimstart "^1.0.7" - typed-array-buffer "^1.0.0" - typed-array-byte-length "^1.0.0" - typed-array-byte-offset "^1.0.0" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.13" - -es-set-tostringtag@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9" - integrity sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q== - dependencies: - get-intrinsic "^1.2.2" - has-tostringtag "^1.0.0" - hasown "^2.0.0" - -es-shim-unscopables@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" - integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== - dependencies: - hasown "^2.0.0" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - esbuild@0.16.17: version "0.16.17" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.16.17.tgz#fc2c3914c57ee750635fee71b89f615f25065259" @@ -1537,87 +824,11 @@ esbuild@^0.18.10: "@esbuild/win32-ia32" "0.18.20" "@esbuild/win32-x64" "0.18.20" -ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereumjs-util@^7.0.3: - version "7.1.5" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" - integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== - dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - rlp "^2.2.4" - -ethers@^5.1.0, ethers@^5.7.2: - version "5.7.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== - dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" - event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -1696,13 +907,6 @@ find-yarn-workspace-root@^2.0.0: dependencies: micromatch "^4.0.2" -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - formdata-polyfill@^4.0.10: version "4.0.10" resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" @@ -1744,27 +948,12 @@ function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== -function.prototype.name@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" - integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - functions-have-names "^1.2.3" - -functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - get-func-name@^2.0.1, get-func-name@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== @@ -1779,14 +968,6 @@ get-stream@^6.0.0, get-stream@^6.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1806,13 +987,6 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - globby@^13.1.3: version "13.2.2" resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" @@ -1831,16 +1005,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.11, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -1858,35 +1027,11 @@ has-proto@^1.0.1: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - hasown@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" @@ -1902,15 +1047,6 @@ header-case@^2.0.4: capital-case "^1.0.4" tslib "^2.0.3" -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -1939,36 +1075,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: +inherits@2, inherits@^2.0.3, inherits@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -internal-slot@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.6.tgz#37e756098c4911c5e912b8edbf71ed3aa116f930" - integrity sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg== - dependencies: - get-intrinsic "^1.2.2" - hasown "^2.0.0" - side-channel "^1.0.4" - -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -1976,33 +1087,6 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== - dependencies: - ci-info "^2.0.0" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - is-docker@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" @@ -2025,38 +1109,11 @@ is-interactive@^2.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" @@ -2067,39 +1124,11 @@ is-stream@^3.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: - version "1.1.12" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" - integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== - dependencies: - which-typed-array "^1.1.11" - is-unicode-supported@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - is-wsl@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" @@ -2122,11 +1151,6 @@ isows@1.0.3: resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.3.tgz#93c1cf0575daf56e7120bab5c8c448b0809d0d74" integrity sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg== -js-sha3@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - json-stable-stringify@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz#43d39c7c8da34bfaf785a61a56808b0def9f747d" @@ -2156,15 +1180,6 @@ jsonify@^0.0.1: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== -keccak@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.4.tgz#edc09b89e633c0549da444432ecf062ffadee86d" - integrity sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - readable-stream "^3.6.0" - klaw-sync@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" @@ -2225,15 +1240,6 @@ magic-string@^0.30.1: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -2262,16 +1268,6 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -2286,7 +1282,7 @@ minimatch@^9.0.3: dependencies: brace-expansion "^2.0.1" -minimist@^1.2.6, minimist@^1.2.7: +minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -2316,11 +1312,6 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" @@ -2329,11 +1320,6 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - node-domexception@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" @@ -2348,16 +1334,6 @@ node-fetch@^3.3.0: fetch-blob "^3.1.4" formdata-polyfill "^4.0.10" -node-gyp-build@^4.2.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.7.1.tgz#cd7d2eb48e594874053150a9418ac85af83ca8f7" - integrity sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg== - -nofilter@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" - integrity sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g== - normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -2377,26 +1353,11 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" -object-inspect@^1.13.1, object-inspect@^1.9.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== - object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.4: - version "4.1.5" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" - integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== - dependencies: - call-bind "^1.0.5" - define-properties "^1.2.1" - has-symbols "^1.0.3" - object-keys "^1.1.1" - once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -2476,26 +1437,6 @@ pascal-case@^3.1.2: no-case "^3.0.4" tslib "^2.0.3" -patch-package@^6.4.7: - version "6.5.1" - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.5.1.tgz#3e5d00c16997e6160291fee06a521c42ac99b621" - integrity sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA== - dependencies: - "@yarnpkg/lockfile" "^1.1.0" - chalk "^4.1.2" - cross-spawn "^6.0.5" - find-yarn-workspace-root "^2.0.0" - fs-extra "^9.0.0" - is-ci "^2.0.0" - klaw-sync "^6.0.0" - minimist "^1.2.6" - open "^7.4.2" - rimraf "^2.6.3" - semver "^5.6.0" - slash "^2.0.0" - tmp "^0.0.33" - yaml "^1.10.2" - patch-package@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61" @@ -2540,11 +1481,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== - path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" @@ -2570,17 +1506,6 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -pbkdf2@^3.0.17: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -2628,33 +1553,17 @@ pretty-format@^29.5.0: ansi-styles "^5.0.0" react-is "^18.0.0" -proper-lockfile@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" - integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== - dependencies: - graceful-fs "^4.2.4" - retry "^0.12.0" - signal-exit "^3.0.2" - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@^3.4.0: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -2670,15 +1579,6 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -regexp.prototype.flags@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" - integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - set-function-name "^2.0.0" - restore-cursor@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" @@ -2687,11 +1587,6 @@ restore-cursor@^4.0.0: onetime "^5.1.0" signal-exit "^3.0.2" -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -2704,21 +1599,6 @@ rimraf@^2.6.3: dependencies: glob "^7.1.3" -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.2.4: - version "2.2.7" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" - integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== - dependencies: - bn.js "^5.2.0" - rollup@^3.27.1: version "3.29.4" resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.4.tgz#4d70c0f9834146df8705bfb69a9a19c9e1109981" @@ -2733,49 +1613,11 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-array-concat@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" - integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" - has-symbols "^1.0.3" - isarray "^2.0.5" - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -scrypt-js@3.0.1, scrypt-js@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -secp256k1@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" - integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -semver@^5.5.0, semver@^5.6.0: - version "5.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" @@ -2802,35 +1644,6 @@ set-function-length@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" -set-function-name@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" - integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== - dependencies: - define-data-property "^1.0.1" - functions-have-names "^1.2.3" - has-property-descriptors "^1.0.0" - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== - dependencies: - shebang-regex "^1.0.0" - shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2838,25 +1651,11 @@ shebang-command@^2.0.0: dependencies: shebang-regex "^3.0.0" -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - shebang-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - siginfo@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" @@ -2885,13 +1684,6 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -solidity-ast@^0.4.51: - version "0.4.55" - resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.55.tgz#00b685e6eefb2e8dfb67df1fe0afbe3b3bfb4b28" - integrity sha512-qeEU/r/K+V5lrAw8iswf2/yfWAnSGs3WKPHI+zAFKFjX0dIBVXEU/swQ8eJQYHf6PJWUZFO2uWV4V1wEOkeQbA== - dependencies: - array.prototype.findlast "^1.2.2" - source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" @@ -2914,33 +1706,6 @@ stdin-discarder@^0.1.0: dependencies: bl "^5.0.0" -string.prototype.trim@^1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" - integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -string.prototype.trimend@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" - integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -string.prototype.trimstart@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" - integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -3016,7 +1781,7 @@ ts-morph@^21.0.1: "@ts-morph/common" "~0.22.0" code-block-writer "^12.0.0" -tslib@^2.0.3, tslib@^2.4.0: +tslib@^2.0.3: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -3026,45 +1791,6 @@ type-detect@^4.0.0, type-detect@^4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -typed-array-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" - integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" - is-typed-array "^1.1.10" - -typed-array-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" - integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" - -typed-array-byte-offset@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" - integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" - -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - typescript@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" @@ -3075,16 +1801,6 @@ ufo@^1.3.0: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.1.tgz#e085842f4627c41d4c1b60ebea1f75cdab4ce86b" integrity sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw== -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" @@ -3193,35 +1909,6 @@ web-streams-polyfill@^3.0.3: resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-typed-array@^1.1.11, which-typed-array@^1.1.13: - version "1.1.13" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" - integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.4" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -3242,11 +1929,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@7.4.6: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== - ws@8.13.0: version "8.13.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" @@ -3257,11 +1939,6 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - yaml@^2.2.2: version "2.3.4" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2"