From da9b06ed2c783b1b8ba88a9a71da2072d6ba5c90 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:08:55 +0200 Subject: [PATCH 01/11] refactor: Remove SpokePoolClient oldestTime lookup (#752) The oldestTime attribute is only needed for a very specific check when validating block ranges in the dataworker. Removing it from the standard SpokePoolClient update flow is a simplification for non-dataworker use-cases - i.e. relayer, monitor, finalizer. The dataworker can instead resolve the timestamp of the searchConfig fromBlock on demand. The underlying motivation for this change is to simplify the interface between the relayer and the external SpokePool listener processes in order to make way for additional updates. --- src/clients/SpokePoolClient.ts | 36 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/clients/SpokePoolClient.ts b/src/clients/SpokePoolClient.ts index b462ce76..a1d67ac4 100644 --- a/src/clients/SpokePoolClient.ts +++ b/src/clients/SpokePoolClient.ts @@ -1,15 +1,21 @@ +import assert from "assert"; import { Contract, EventFilter } from "ethers"; import winston from "winston"; import { AnyObject, BigNumber, bnZero, + bnUint32Max, DefaultLogLevels, EventSearchConfig, + getBlockRangeForDepositId, + getDepositIdAtBlock, + getNetworkName, + getRelayDataHash, MAX_BIG_INT, MakeOptional, + relayFillStatus, assign, - getRelayDataHash, isDefined, toBN, } from "../utils"; @@ -36,8 +42,6 @@ import { TokensBridged, } from "../interfaces"; import { SpokePool } from "../typechain"; -import { getNetworkName } from "../utils/NetworkUtils"; -import { getBlockRangeForDepositId, getDepositIdAtBlock, relayFillStatus } from "../utils/SpokeUtils"; import { BaseAbstractClient, isUpdateFailureReason, UpdateFailureReason } from "./BaseAbstractClient"; import { HubPoolClient } from "./HubPoolClient"; import { AcrossConfigStoreClient } from "./AcrossConfigStoreClient"; @@ -45,7 +49,6 @@ import { AcrossConfigStoreClient } from "./AcrossConfigStoreClient"; type SpokePoolUpdateSuccess = { success: true; currentTime: number; - oldestTime: number; firstDepositId: number; latestDepositId: number; events: Log[][]; @@ -63,7 +66,7 @@ export type SpokePoolUpdate = SpokePoolUpdateSuccess | SpokePoolUpdateFailure; */ export class SpokePoolClient extends BaseAbstractClient { protected currentTime = 0; - protected oldestTime = 0; + protected timestamps: { [blockNumber: number]: number } = {}; protected depositHashes: { [depositHash: string]: DepositWithBlock } = {}; protected depositHashesToFills: { [depositHash: string]: FillWithBlock[] } = {}; protected speedUps: { [depositorAddress: string]: { [depositId: number]: SpeedUpWithBlock[] } } = {}; @@ -508,12 +511,11 @@ export class SpokePoolClient extends BaseAbstractClient { const timerStart = Date.now(); const multicallFunctions = ["getCurrentTime", "numberOfDeposits"]; - const [multicallOutput, oldestTime, ...events] = await Promise.all([ + const [multicallOutput, ...events] = await Promise.all([ spokePool.callStatic.multicall( multicallFunctions.map((f) => spokePool.interface.encodeFunctionData(f)), { blockTag: searchConfig.toBlock } ), - this.spokePool.getCurrentTime({ blockTag: Math.max(searchConfig.fromBlock, this.deploymentBlock) }), ...eventSearchConfigs.map((config) => paginatedEventQuery(this.spokePool, config.filter, config.searchConfig)), ]); this.log("debug", `Time to query new events from RPC for ${this.chainId}: ${Date.now() - timerStart} ms`); @@ -535,7 +537,6 @@ export class SpokePoolClient extends BaseAbstractClient { return { success: true, currentTime: currentTime.toNumber(), // uint32 - oldestTime: oldestTime.toNumber(), firstDepositId, latestDepositId: Math.max(numberOfDeposits - 1, 0), searchEndBlock: searchConfig.toBlock, @@ -560,7 +561,7 @@ export class SpokePoolClient extends BaseAbstractClient { if (!update.success) { return; } - const { events: queryResults, currentTime, oldestTime, searchEndBlock } = update; + const { events: queryResults, currentTime, searchEndBlock } = update; if (eventsToQuery.includes("TokensBridged")) { for (const event of queryResults[eventsToQuery.indexOf("TokensBridged")]) { @@ -708,7 +709,6 @@ export class SpokePoolClient extends BaseAbstractClient { // Next iteration should start off from where this one ended. this.currentTime = currentTime; - if (this.oldestTime === 0) this.oldestTime = oldestTime; // Set oldest time only after the first update. this.firstDepositIdForSpokePool = update.firstDepositId; this.latestBlockSearched = searchEndBlock; this.lastDepositIdForSpokePool = update.latestDepositId; @@ -798,11 +798,19 @@ export class SpokePoolClient extends BaseAbstractClient { } /** - * Retrieves the oldest time searched on the SpokePool contract. - * @returns The oldest time searched, which will be 0 if there has been no update() yet. + * Retrieves the time from the SpokePool contract at a particular block. + * @returns The time at the specified block tag. */ - public getOldestTime(): number { - return this.oldestTime; + public async getTimeAt(blockNumber: number): Promise { + assert(blockNumber < this.latestBlockSearched); + + const resolve = async () => { + const currentTime = await this.spokePool.getCurrentTime({ blockTag: blockNumber }); + assert(BigNumber.isBigNumber(currentTime) && currentTime.lt(bnUint32Max)); + return currentTime.toNumber(); + }; + + return (this.timestamps[blockNumber] ??= await resolve()); } async findDeposit(depositId: number, destinationChainId: number): Promise { From 2af16fa52a6af49afebc31798acf227b8871b0f4 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:39:32 +0200 Subject: [PATCH 02/11] fix: Bump package version (#754) Forgot to bump on the previous PR. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 638ac1dd..d6efef84 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@across-protocol/sdk", "author": "UMA Team", - "version": "3.2.9", + "version": "3.2.10", "license": "AGPL-3.0", "homepage": "https://docs.across.to/reference/sdk", "files": [ From 8303bc45e929bdca804956da16b83b814ea4a82c Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:57:06 +0200 Subject: [PATCH 03/11] Revert "refactor: Remove SpokePoolClient oldestTime lookup (#752)" (#756) The removal of oldestTime exposes a test issue in the relayer. The removal itself is fine, but the test logic is tricky to unpick, so back this out for now. This reverts commit da9b06e. --- src/clients/SpokePoolClient.ts | 36 +++++++++++++--------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/src/clients/SpokePoolClient.ts b/src/clients/SpokePoolClient.ts index a1d67ac4..b462ce76 100644 --- a/src/clients/SpokePoolClient.ts +++ b/src/clients/SpokePoolClient.ts @@ -1,21 +1,15 @@ -import assert from "assert"; import { Contract, EventFilter } from "ethers"; import winston from "winston"; import { AnyObject, BigNumber, bnZero, - bnUint32Max, DefaultLogLevels, EventSearchConfig, - getBlockRangeForDepositId, - getDepositIdAtBlock, - getNetworkName, - getRelayDataHash, MAX_BIG_INT, MakeOptional, - relayFillStatus, assign, + getRelayDataHash, isDefined, toBN, } from "../utils"; @@ -42,6 +36,8 @@ import { TokensBridged, } from "../interfaces"; import { SpokePool } from "../typechain"; +import { getNetworkName } from "../utils/NetworkUtils"; +import { getBlockRangeForDepositId, getDepositIdAtBlock, relayFillStatus } from "../utils/SpokeUtils"; import { BaseAbstractClient, isUpdateFailureReason, UpdateFailureReason } from "./BaseAbstractClient"; import { HubPoolClient } from "./HubPoolClient"; import { AcrossConfigStoreClient } from "./AcrossConfigStoreClient"; @@ -49,6 +45,7 @@ import { AcrossConfigStoreClient } from "./AcrossConfigStoreClient"; type SpokePoolUpdateSuccess = { success: true; currentTime: number; + oldestTime: number; firstDepositId: number; latestDepositId: number; events: Log[][]; @@ -66,7 +63,7 @@ export type SpokePoolUpdate = SpokePoolUpdateSuccess | SpokePoolUpdateFailure; */ export class SpokePoolClient extends BaseAbstractClient { protected currentTime = 0; - protected timestamps: { [blockNumber: number]: number } = {}; + protected oldestTime = 0; protected depositHashes: { [depositHash: string]: DepositWithBlock } = {}; protected depositHashesToFills: { [depositHash: string]: FillWithBlock[] } = {}; protected speedUps: { [depositorAddress: string]: { [depositId: number]: SpeedUpWithBlock[] } } = {}; @@ -511,11 +508,12 @@ export class SpokePoolClient extends BaseAbstractClient { const timerStart = Date.now(); const multicallFunctions = ["getCurrentTime", "numberOfDeposits"]; - const [multicallOutput, ...events] = await Promise.all([ + const [multicallOutput, oldestTime, ...events] = await Promise.all([ spokePool.callStatic.multicall( multicallFunctions.map((f) => spokePool.interface.encodeFunctionData(f)), { blockTag: searchConfig.toBlock } ), + this.spokePool.getCurrentTime({ blockTag: Math.max(searchConfig.fromBlock, this.deploymentBlock) }), ...eventSearchConfigs.map((config) => paginatedEventQuery(this.spokePool, config.filter, config.searchConfig)), ]); this.log("debug", `Time to query new events from RPC for ${this.chainId}: ${Date.now() - timerStart} ms`); @@ -537,6 +535,7 @@ export class SpokePoolClient extends BaseAbstractClient { return { success: true, currentTime: currentTime.toNumber(), // uint32 + oldestTime: oldestTime.toNumber(), firstDepositId, latestDepositId: Math.max(numberOfDeposits - 1, 0), searchEndBlock: searchConfig.toBlock, @@ -561,7 +560,7 @@ export class SpokePoolClient extends BaseAbstractClient { if (!update.success) { return; } - const { events: queryResults, currentTime, searchEndBlock } = update; + const { events: queryResults, currentTime, oldestTime, searchEndBlock } = update; if (eventsToQuery.includes("TokensBridged")) { for (const event of queryResults[eventsToQuery.indexOf("TokensBridged")]) { @@ -709,6 +708,7 @@ export class SpokePoolClient extends BaseAbstractClient { // Next iteration should start off from where this one ended. this.currentTime = currentTime; + if (this.oldestTime === 0) this.oldestTime = oldestTime; // Set oldest time only after the first update. this.firstDepositIdForSpokePool = update.firstDepositId; this.latestBlockSearched = searchEndBlock; this.lastDepositIdForSpokePool = update.latestDepositId; @@ -798,19 +798,11 @@ export class SpokePoolClient extends BaseAbstractClient { } /** - * Retrieves the time from the SpokePool contract at a particular block. - * @returns The time at the specified block tag. + * Retrieves the oldest time searched on the SpokePool contract. + * @returns The oldest time searched, which will be 0 if there has been no update() yet. */ - public async getTimeAt(blockNumber: number): Promise { - assert(blockNumber < this.latestBlockSearched); - - const resolve = async () => { - const currentTime = await this.spokePool.getCurrentTime({ blockTag: blockNumber }); - assert(BigNumber.isBigNumber(currentTime) && currentTime.lt(bnUint32Max)); - return currentTime.toNumber(); - }; - - return (this.timestamps[blockNumber] ??= await resolve()); + public getOldestTime(): number { + return this.oldestTime; } async findDeposit(depositId: number, destinationChainId: number): Promise { From 8bc5f011a8bf34f281e3bdab7ce48809f73ef798 Mon Sep 17 00:00:00 2001 From: "James Morris, MS" <96435344+james-a-morris@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:26:34 -0400 Subject: [PATCH 04/11] nit: remove unneeded null coalesce (#759) --- src/utils/NetworkUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/NetworkUtils.ts b/src/utils/NetworkUtils.ts index 452c6882..229341de 100644 --- a/src/utils/NetworkUtils.ts +++ b/src/utils/NetworkUtils.ts @@ -57,7 +57,7 @@ export function chainIsMatic(chainId: number): boolean { * @returns True if chainId is an OP stack, otherwise false. */ export function chainIsOPStack(chainId: number): boolean { - return PUBLIC_NETWORKS[chainId]?.family === ChainFamily.OP_STACK ?? false; + return PUBLIC_NETWORKS[chainId]?.family === ChainFamily.OP_STACK; } /** From b55e13a3ee9a5e2426d4a7f341e97476d98111da Mon Sep 17 00:00:00 2001 From: nicholaspai <9457025+nicholaspai@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:26:38 -0400 Subject: [PATCH 05/11] improve: Remove FilledRelay and FundsDeposited related functions (#762) --- .../BundleDataClient/utils/DataworkerUtils.ts | 2 +- src/clients/SpokePoolClient.ts | 2 +- src/clients/mocks/MockSpokePoolClient.ts | 2 - src/utils/SpokeUtils.ts | 2 +- test/SpokePoolClient.fills.ts | 2 +- test/SpokePoolClient.v3Events.ts | 4 +- test/utils/utils.ts | 218 ------------------ 7 files changed, 6 insertions(+), 226 deletions(-) diff --git a/src/clients/BundleDataClient/utils/DataworkerUtils.ts b/src/clients/BundleDataClient/utils/DataworkerUtils.ts index 7a940553..16d080c8 100644 --- a/src/clients/BundleDataClient/utils/DataworkerUtils.ts +++ b/src/clients/BundleDataClient/utils/DataworkerUtils.ts @@ -138,7 +138,7 @@ export function _buildPoolRebalanceRoot( // Realized LP fees are keyed the same as running balances and represent the amount of LP fees that should be paid // to LP's for each running balance. - // For each FilledRelay group, identified by { repaymentChainId, L1TokenAddress }, initialize a "running balance" + // For each FilledV3Relay group, identified by { repaymentChainId, L1TokenAddress }, initialize a "running balance" // to the total refund amount for that group. const runningBalances: RunningBalances = {}; const realizedLpFees: RunningBalances = {}; diff --git a/src/clients/SpokePoolClient.ts b/src/clients/SpokePoolClient.ts index b462ce76..948e516c 100644 --- a/src/clients/SpokePoolClient.ts +++ b/src/clients/SpokePoolClient.ts @@ -411,7 +411,7 @@ export class SpokePoolClient extends BaseAbstractClient { * @note // We want to find the block range that satisfies these conditions: * // - the low block has deposit count <= targetDepositId * // - the high block has a deposit count > targetDepositId. - * // This way the caller can search for a FundsDeposited event between [low, high] that will always + * // This way the caller can search for a V3FundsDeposited event between [low, high] that will always * // contain the event emitted when deposit ID was incremented to targetDepositId + 1. This is the same transaction * // where the deposit with deposit ID = targetDepositId was created. */ diff --git a/src/clients/mocks/MockSpokePoolClient.ts b/src/clients/mocks/MockSpokePoolClient.ts index 6af40254..7e9f2ed9 100644 --- a/src/clients/mocks/MockSpokePoolClient.ts +++ b/src/clients/mocks/MockSpokePoolClient.ts @@ -114,8 +114,6 @@ export class MockSpokePoolClient extends SpokePoolClient { // Event signatures. Not strictly required, but they make generated events more recognisable. public readonly eventSignatures: Record = { EnabledDepositRoute: "address,uint256,bool", - FilledRelay: "uint256,uint256,uint256,int64,uint32,uint32,address,address,address,bytes", - FundsDeposited: "uint256,uint256,uint256,int64,uint32,uint32,address,address,address,bytes", }; depositV3(deposit: DepositWithBlock): Log { diff --git a/src/utils/SpokeUtils.ts b/src/utils/SpokeUtils.ts index cca38583..2b4ad8a1 100644 --- a/src/utils/SpokeUtils.ts +++ b/src/utils/SpokeUtils.ts @@ -65,7 +65,7 @@ export function populateV3Relay( * @note // We want to find the block range that satisfies these conditions: * // - the low block has deposit count <= targetDepositId * // - the high block has a deposit count > targetDepositId. - * // This way the caller can search for a FundsDeposited event between [low, high] that will always + * // This way the caller can search for a V3FundsDeposited event between [low, high] that will always * // contain the event emitted when deposit ID was incremented to targetDepositId + 1. This is the same transaction * // where the deposit with deposit ID = targetDepositId was created. */ diff --git a/test/SpokePoolClient.fills.ts b/test/SpokePoolClient.fills.ts index ff924a77..742dddf9 100644 --- a/test/SpokePoolClient.fills.ts +++ b/test/SpokePoolClient.fills.ts @@ -114,7 +114,7 @@ describe("SpokePoolClient: Fills", function () { expect(fillBlock).to.equal(targetFillBlock); }); - it("FilledRelay block search: bounds checking", async function () { + it("FilledV3Relay block search: bounds checking", async function () { const nBlocks = 100; const startBlock = await spokePool.provider.getBlockNumber(); for (let i = 0; i < nBlocks; ++i) { diff --git a/test/SpokePoolClient.v3Events.ts b/test/SpokePoolClient.v3Events.ts index b322e88d..14229dd5 100644 --- a/test/SpokePoolClient.v3Events.ts +++ b/test/SpokePoolClient.v3Events.ts @@ -20,9 +20,9 @@ import { type EventSearchConfig = sdkUtils.EventSearchConfig; describe("SpokePoolClient: Event Filtering", function () { - const fundsDepositedEvents = ["FundsDeposited", "V3FundsDeposited"]; + const fundsDepositedEvents = ["V3FundsDeposited"]; const slowFillRequestedEvents = ["RequestedV3SlowFill"]; - const filledRelayEvents = ["FilledRelay", "FilledV3Relay"]; + const filledRelayEvents = ["FilledV3Relay"]; let owner: SignerWithAddress; let chainIds: number[]; diff --git a/test/utils/utils.ts b/test/utils/utils.ts index 7a2c8df3..569b37a3 100644 --- a/test/utils/utils.ts +++ b/test/utils/utils.ts @@ -12,7 +12,6 @@ import { V3Deposit, V3DepositWithBlock, V3FillWithBlock, - V2Fill, } from "../../src/interfaces"; import { BigNumber, @@ -29,9 +28,6 @@ import { utf8ToHex, } from "../../src/utils"; import { - amountToDeposit, - depositRelayerFeePct, - destinationChainId as defaultDestinationChainId, MAX_L1_TOKENS_PER_POOL_REBALANCE_LEAF, MAX_REFUNDS_PER_RELAYER_REFUND_LEAF, sampleRateModel, @@ -55,7 +51,6 @@ export const { buildPoolRebalanceLeafTree, buildPoolRebalanceLeaves, deploySpokePool, - depositV2, enableRoutes, getContractFactory, getDepositParams, @@ -250,37 +245,6 @@ export async function enableRoutesOnHubPool( } } -export async function simpleDeposit( - spokePool: utils.Contract, - token: utils.Contract, - recipient: utils.SignerWithAddress, - depositor: utils.SignerWithAddress, - destinationChainId = defaultDestinationChainId, - amount = amountToDeposit, - relayerFeePct = depositRelayerFeePct -): Promise { - const depositObject = await utils.depositV2( - spokePool, - token, - recipient, - depositor, - destinationChainId, - amount, - relayerFeePct - ); - // Sanity Check: Ensure that the deposit was successful. - expect(depositObject).to.not.be.null; - if (!depositObject) { - throw new Error("Deposit object is null"); - } - return { - ...depositObject, - realizedLpFeePct: toBNWei("0"), - destinationToken: zeroAddress, - message: "0x", - }; -} - /** * Takes as input a body and returns a new object with the body and a message property. Used to appease the typescript * compiler when we want to return a type that doesn't have a message property. @@ -507,188 +471,6 @@ export async function fillV3Relay( }; } -// @note To be deprecated post-v3. -export async function buildDeposit( - hubPoolClient: HubPoolClient, - spokePool: Contract, - tokenToDeposit: Contract, - recipientAndDepositor: SignerWithAddress, - destinationChainId: number, - _amountToDeposit = amountToDeposit, - relayerFeePct = depositRelayerFeePct -): Promise { - const _deposit = await utils.depositV2( - spokePool, - tokenToDeposit, - recipientAndDepositor, - recipientAndDepositor, - destinationChainId, - _amountToDeposit, - relayerFeePct - ); - // Sanity Check: Ensure that the deposit was successful. - expect(_deposit).to.not.be.null; - const deposit: Omit = { - depositId: Number(_deposit!.depositId), - originChainId: Number(_deposit!.originChainId), - destinationChainId: Number(_deposit!.destinationChainId), - depositor: String(_deposit!.depositor), - recipient: String(_deposit!.recipient), - originToken: String(_deposit!.originToken), - amount: toBN(_deposit!.amount), - message: EMPTY_MESSAGE, - relayerFeePct: toBN(_deposit!.relayerFeePct), - quoteTimestamp: Number(_deposit!.quoteTimestamp), - }; - - return await buildV2DepositStruct(deposit, hubPoolClient); -} - -// Submits a fillRelay transaction and returns the Fill struct that that clients will interact with. -export async function buildFill( - spokePool: Contract, - destinationToken: Contract, - recipientAndDepositor: SignerWithAddress, - relayer: SignerWithAddress, - deposit: V2Deposit, - pctOfDepositToFill: number, - repaymentChainId?: number -): Promise { - // Sanity Check: ensure realizedLpFeePct is defined - expect(deposit.realizedLpFeePct).to.not.be.undefined; - if (!deposit.realizedLpFeePct) { - throw new Error("realizedLpFeePct is undefined"); - } - - await spokePool.connect(relayer).fillRelay( - ...utils.getFillRelayParams( - utils.getRelayHash( - recipientAndDepositor.address, - recipientAndDepositor.address, - deposit.depositId, - deposit.originChainId, - deposit.destinationChainId, - destinationToken.address, - deposit.amount, - deposit.realizedLpFeePct, - deposit.relayerFeePct - ).relayData, - deposit.amount - .mul(toBNWei(1).sub(deposit.realizedLpFeePct.add(deposit.relayerFeePct))) - .mul(toBNWei(pctOfDepositToFill)) - .div(toBNWei(1)) - .div(toBNWei(1)), - repaymentChainId ?? deposit.destinationChainId - ) - ); - const [events, destinationChainId] = await Promise.all([ - spokePool.queryFilter(spokePool.filters.FilledRelay()), - spokePool.chainId(), - ]); - const lastEvent = events[events.length - 1]; - if (!lastEvent?.args) { - throw new Error("No FilledRelay event emitted"); - } - return { - amount: lastEvent.args.amount, - totalFilledAmount: lastEvent.args.totalFilledAmount, - fillAmount: lastEvent.args.fillAmount, - repaymentChainId: Number(lastEvent.args.repaymentChainId), - originChainId: Number(lastEvent.args.originChainId), - relayerFeePct: lastEvent.args.relayerFeePct, - realizedLpFeePct: lastEvent.args.realizedLpFeePct, - depositId: lastEvent.args.depositId, - destinationToken: lastEvent.args.destinationToken, - relayer: lastEvent.args.relayer, - depositor: lastEvent.args.depositor, - recipient: lastEvent.args.recipient, - message: lastEvent.args.message, - updatableRelayData: { - recipient: lastEvent.args.updatableRelayData[0], - message: lastEvent.args.updatableRelayData[1], - relayerFeePct: toBN(lastEvent.args.updatableRelayData[2]), - isSlowRelay: lastEvent.args.updatableRelayData[3], - payoutAdjustmentPct: toBN(lastEvent.args.updatableRelayData[4]), - }, - destinationChainId: Number(destinationChainId), - }; -} - -export async function buildModifiedFill( - spokePool: Contract, - depositor: SignerWithAddress, - relayer: SignerWithAddress, - fillToBuildFrom: V2Fill, - multipleOfOriginalRelayerFeePct: number, - pctOfDepositToFill: number, - newRecipient?: string, - newMessage?: string -): Promise { - const relayDataFromFill = { - depositor: fillToBuildFrom.depositor, - recipient: fillToBuildFrom.recipient, - destinationToken: fillToBuildFrom.destinationToken, - amount: fillToBuildFrom.amount, - originChainId: fillToBuildFrom.originChainId.toString(), - destinationChainId: fillToBuildFrom.destinationChainId.toString(), - realizedLpFeePct: fillToBuildFrom.realizedLpFeePct, - relayerFeePct: fillToBuildFrom.relayerFeePct, - depositId: fillToBuildFrom.depositId.toString(), - message: fillToBuildFrom.message, - }; - - const { signature } = await utils.modifyRelayHelper( - fillToBuildFrom.relayerFeePct.mul(multipleOfOriginalRelayerFeePct), - fillToBuildFrom.depositId.toString(), - fillToBuildFrom.originChainId.toString(), - depositor, - newRecipient ?? relayDataFromFill.recipient, - newMessage ?? relayDataFromFill.message - ); - const updatedRelayerFeePct = fillToBuildFrom.relayerFeePct.mul(multipleOfOriginalRelayerFeePct); - await spokePool.connect(relayer).fillRelayWithUpdatedDeposit( - ...utils.getFillRelayUpdatedFeeParams( - relayDataFromFill, - fillToBuildFrom.amount - .mul(toBNWei(1).sub(fillToBuildFrom.realizedLpFeePct.add(updatedRelayerFeePct))) - .mul(toBNWei(pctOfDepositToFill)) - .div(toBNWei(1)) - .div(toBNWei(1)), - updatedRelayerFeePct, - signature, - Number(relayDataFromFill.destinationChainId), - newRecipient ?? relayDataFromFill.recipient, - newMessage ?? relayDataFromFill.message - ) - ); - const [events, destinationChainId] = await Promise.all([ - spokePool.queryFilter(spokePool.filters.FilledRelay()), - spokePool.chainId(), - ]); - const lastEvent = events[events.length - 1]; - if (lastEvent.args) { - return { - amount: lastEvent.args.amount, - totalFilledAmount: lastEvent.args.totalFilledAmount, - fillAmount: lastEvent.args.fillAmount, - repaymentChainId: Number(lastEvent.args.repaymentChainId), - originChainId: Number(lastEvent.args.originChainId), - relayerFeePct: lastEvent.args.relayerFeePct, - realizedLpFeePct: lastEvent.args.realizedLpFeePct, - depositId: lastEvent.args.depositId, - destinationToken: lastEvent.args.destinationToken, - relayer: lastEvent.args.relayer, - message: lastEvent.args.message, - depositor: lastEvent.args.depositor, - recipient: lastEvent.args.recipient, - updatableRelayData: lastEvent.args.updatableRelayData, - destinationChainId: Number(destinationChainId), - }; - } else { - return null; - } -} - /** * Grabs the latest block number from the hardhat provider. * @returns The latest block number. From 2df703e4f66fdcd2a8bb823f80119f4422f51b7e Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:51:18 +0100 Subject: [PATCH 06/11] fix(RetryProvider): Avoid unnecessary promise reassignment (#761) Debug logging has shown that the existing logic unconditionally completes the for() loop this.retries times for each RPC query. This doesn't seem to submit this.retries queries but does result in a lot of unnecessary promise reassignment. The structure of the change here is made in anticipation of a follow-up commit to introduce some intelligence into the retry loop to avoid retries when the failure was actually "legitimate" (i.e. eth_call revert). Without this change it was proving very difficult to bail out of the retry loop due to the promise chaining that implies the use of closures. --- src/providers/retryProvider.ts | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/providers/retryProvider.ts b/src/providers/retryProvider.ts index 97c9896e..35df7b2e 100644 --- a/src/providers/retryProvider.ts +++ b/src/providers/retryProvider.ts @@ -260,12 +260,24 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider { return response; } - _trySend(provider: ethers.providers.StaticJsonRpcProvider, method: string, params: Array): Promise { - let promise = this._sendAndValidate(provider, method, params); - for (let i = 0; i < this.retries; i++) { - promise = promise.catch(() => delay(this.delay).then(() => this._sendAndValidate(provider, method, params))); + async _trySend( + provider: ethers.providers.StaticJsonRpcProvider, + method: string, + params: Array + ): Promise { + let { retries } = this; + + // eslint-disable-next-line no-constant-condition + while (true) { + const [settled] = await Promise.allSettled([this._sendAndValidate(provider, method, params)]); + if (settled.status === "fulfilled") { + return settled.value; + } + if (retries-- <= 0) { + throw settled.reason; + } + await delay(this.delay); } - return promise; } _getQuorum(method: string, params: Array): number { From b43acb896801647dce6bdea82dfad90b908f7224 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Fri, 1 Nov 2024 22:01:40 +0100 Subject: [PATCH 07/11] improve(retryProvider): Avoid retry on eth_call & eth_estimateGas reverts (#757) eth_call and eth_estimateGas requests where the provider returns a response indicating revert have a near-zero chance of succeeding against another RPC provider. Instead of wasting time rotating through the list of RPC providers, just throw immediately and let the upper layers handle it. This will potentially save quite a bit of time in the relayer in cases where it unsuccessfully performs a static call to determine whether a fill would complete and should also notably reduce RPC consumption across secondary and tertiary providers. --- package.json | 2 +- src/providers/retryProvider.ts | 33 ++++++++++++++++++++++++++++++--- src/providers/types.ts | 21 +++++++++++++++++++++ 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d6efef84..e9caa713 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@across-protocol/sdk", "author": "UMA Team", - "version": "3.2.10", + "version": "3.2.11", "license": "AGPL-3.0", "homepage": "https://docs.across.to/reference/sdk", "files": [ diff --git a/src/providers/retryProvider.ts b/src/providers/retryProvider.ts index 35df7b2e..fbd273a6 100644 --- a/src/providers/retryProvider.ts +++ b/src/providers/retryProvider.ts @@ -5,6 +5,7 @@ import { getOriginFromURL } from "../utils/NetworkUtils"; import { CacheProvider } from "./cachedProvider"; import { compareRpcResults, createSendErrorWithMessage, formatProviderError } from "./utils"; import { PROVIDER_CACHE_TTL } from "./constants"; +import { JsonRpcError, RpcError } from "./types"; import { Logger } from "winston"; export class RetryProvider extends ethers.providers.StaticJsonRpcProvider { @@ -88,9 +89,10 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider { ): Promise<[ethers.providers.StaticJsonRpcProvider, unknown]> => { return this._trySend(provider, method, params) .then((result): [ethers.providers.StaticJsonRpcProvider, unknown] => [provider, result]) - .catch((err) => { + .catch((err: unknown) => { // Append the provider and error to the error array. - errors.push([provider, err?.stack || err?.toString()]); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + errors.push([provider, (err as any)?.stack || err?.toString()]); // If there are no new fallback providers to use, terminate the recursion by throwing an error. // Otherwise, we can try to call another provider. @@ -98,6 +100,11 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider { throw err; } + // If one RPC provider reverted, others likely will too. Skip them. + if (quorumThreshold === 1 && this.callReverted(method, err)) { + throw err; + } + // This line does two things: // 1. Removes a fallback provider from the array so it cannot be used as a fallback for another required // provider. @@ -260,6 +267,25 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider { return response; } + // For an error emitted in response to an eth_call or eth_estimateGas request, determine whether the response body + // indicates that the call reverted during execution. The exact RPC responses returned can vary, but `error.body` has + // reliably included both the code (typically 3 on revert) and the error message indicating "execution reverted". + // This is consistent with section 5.1 of the JSON-RPC spec (https://www.jsonrpc.org/specification). + protected callReverted(method: string, error: unknown): boolean { + if (!(method === "eth_call" || method === "eth_estimateGas") || !RpcError.is(error)) { + return false; + } + + let response: unknown; + try { + response = JSON.parse(error.body); + } catch { + return false; + } + + return JsonRpcError.is(response) && response.error.message.toLowerCase().includes("revert"); + } + async _trySend( provider: ethers.providers.StaticJsonRpcProvider, method: string, @@ -273,7 +299,8 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider { if (settled.status === "fulfilled") { return settled.value; } - if (retries-- <= 0) { + + if (retries-- <= 0 || this.callReverted(method, settled.reason)) { throw settled.reason; } await delay(this.delay); diff --git a/src/providers/types.ts b/src/providers/types.ts index b61305a0..f37a0c1d 100644 --- a/src/providers/types.ts +++ b/src/providers/types.ts @@ -1,2 +1,23 @@ +import { any, literal, nullable, number, string, type, union } from "superstruct"; + export type RPCProvider = "ALCHEMY" | "DRPC" | "INFURA" | "INFURA_DIN"; export type RPCTransport = "https" | "wss"; + +// JSON-RPC 2.0 Error object +// See JSON-RPC 2.0 Specification section 5 Reponse object +// https://www.jsonrpc.org/specification +export const JsonRpcError = type({ + jsonrpc: literal("2.0"), + id: union([number(), string()]), + error: type({ + code: number(), + message: string(), + data: nullable(any()), + }), +}); + +// Generic/unknown RPC error (may embed a JsonRpcError). +export const RpcError = type({ + reason: string(), + body: string(), +}); From 0a5be3b6f9e6c319da626a9f4d5948feb59eafa5 Mon Sep 17 00:00:00 2001 From: nicholaspai <9457025+nicholaspai@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:31:27 -0500 Subject: [PATCH 08/11] fix(BlockUtils): Fix averageBlockTime (#766) Co-authored-by: Paul <108695806+pxrl@users.noreply.github.com> --- package.json | 2 +- src/utils/BlockUtils.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index e9caa713..e1dd3741 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@across-protocol/sdk", "author": "UMA Team", - "version": "3.2.11", + "version": "3.2.12", "license": "AGPL-3.0", "homepage": "https://docs.across.to/reference/sdk", "files": [ diff --git a/src/utils/BlockUtils.ts b/src/utils/BlockUtils.ts index 646586d1..876d1b2a 100644 --- a/src/utils/BlockUtils.ts +++ b/src/utils/BlockUtils.ts @@ -51,11 +51,7 @@ export async function averageBlockTime( const { chainId } = await provider.getNetwork(); // OP stack chains inherit Optimism block times, but can be overridden. - // prettier-ignore - const cache = blockTimes[chainId] - ?? chainIsOPStack(chainId) - ? blockTimes[CHAIN_IDs.OPTIMISM] - : undefined; + const cache = blockTimes[chainId] ?? (chainIsOPStack(chainId) ? blockTimes[CHAIN_IDs.OPTIMISM] : undefined); const now = getCurrentTime(); if (isDefined(cache) && now < cache.timestamp + cacheTTL) { From 96f5ec06cd744d15517781fac0aaffa5482d476d Mon Sep 17 00:00:00 2001 From: nicholaspai <9457025+nicholaspai@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:33:23 -0500 Subject: [PATCH 09/11] improve: Update across/constants version (#767) --- package.json | 2 +- yarn.lock | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e1dd3741..e6d5de07 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ }, "dependencies": { "@across-protocol/across-token": "^1.0.0", - "@across-protocol/constants": "^3.1.16", + "@across-protocol/constants": "^3.1.19", "@across-protocol/contracts": "^3.0.11", "@eth-optimism/sdk": "^3.3.1", "@ethersproject/bignumber": "^5.7.0", diff --git a/yarn.lock b/yarn.lock index 5594cd0e..11d4d53d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,6 +21,11 @@ resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.16.tgz#c126085d29d4d051fd02a04c833d804d37c3c219" integrity sha512-+U+AecGWnfY4b4sSfKBvsDj/+yXKEqpTXcZgI8GVVmUTkUhs1efA0kN4q3q10yy5TXI5TtagaG7R9yZg1zgKKg== +"@across-protocol/constants@^3.1.19": + version "3.1.19" + resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.19.tgz#3c29b52ec5f2eece93a6abd50d580668b03dd7b3" + integrity sha512-XOFF+o64TDn57xNfUB38kWy8lYyE9lB7PBdyoMOadsXx00HC3KMznFi/paLRKT1iZ50vDwHp00tNZbr7Z7umzA== + "@across-protocol/contracts@^0.1.4": version "0.1.4" resolved "https://registry.yarnpkg.com/@across-protocol/contracts/-/contracts-0.1.4.tgz#64b3d91e639d2bb120ea94ddef3d160967047fa5" From 8af81937acb959e35e61f84aa6f0634b8cef01c2 Mon Sep 17 00:00:00 2001 From: Melisa Guevara Date: Fri, 8 Nov 2024 14:58:51 -0500 Subject: [PATCH 10/11] feat: support Aleph Zero (#758) Signed-off-by: james-a-morris Co-authored-by: James Morris, MS <96435344+james-a-morris@users.noreply.github.com> --- package.json | 2 +- src/gasPriceOracle/oracle.ts | 1 + src/interfaces/SpokePool.ts | 4 +- src/providers/drpc.ts | 1 + .../chain-queries/alephZero.ts | 48 ++ .../chain-queries/factory.ts | 17 +- src/typechain.ts | 3 - src/utils/Multicall.ts | 1 + src/utils/NetworkUtils.ts | 18 + yarn.lock | 491 +++++++++++++++++- 10 files changed, 556 insertions(+), 30 deletions(-) create mode 100644 src/relayFeeCalculator/chain-queries/alephZero.ts diff --git a/package.json b/package.json index e6d5de07..764e267c 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "dependencies": { "@across-protocol/across-token": "^1.0.0", "@across-protocol/constants": "^3.1.19", - "@across-protocol/contracts": "^3.0.11", + "@across-protocol/contracts": "^3.0.16", "@eth-optimism/sdk": "^3.3.1", "@ethersproject/bignumber": "^5.7.0", "@pinata/sdk": "^2.1.0", diff --git a/src/gasPriceOracle/oracle.ts b/src/gasPriceOracle/oracle.ts index fc05f6d4..c16c17f2 100644 --- a/src/gasPriceOracle/oracle.ts +++ b/src/gasPriceOracle/oracle.ts @@ -24,6 +24,7 @@ export async function getGasPriceEstimate( } const gasPriceFeeds: { [chainId: number]: GasPriceFeed } = { + [CHAIN_IDs.ALEPH_ZERO]: arbitrum.eip1559, [CHAIN_IDs.ARBITRUM]: arbitrum.eip1559, [CHAIN_IDs.BASE]: ethereum.eip1559, [CHAIN_IDs.BOBA]: ethereum.legacy, diff --git a/src/interfaces/SpokePool.ts b/src/interfaces/SpokePool.ts index 4058f71e..9bccb894 100644 --- a/src/interfaces/SpokePool.ts +++ b/src/interfaces/SpokePool.ts @@ -1,10 +1,10 @@ import { SortableEvent } from "./Common"; -import { FilledRelayEvent, FilledV3RelayEvent, FundsDepositedEvent, V3FundsDepositedEvent } from "../typechain"; +import { FilledV3RelayEvent, V3FundsDepositedEvent } from "../typechain"; import { SpokePoolClient } from "../clients"; import { BigNumber } from "../utils"; import { RelayerRefundLeaf } from "./HubPool"; -export type { FilledRelayEvent, FilledV3RelayEvent, FundsDepositedEvent, V3FundsDepositedEvent }; +export type { FilledV3RelayEvent, V3FundsDepositedEvent }; export interface RelayData { originChainId: number; diff --git a/src/providers/drpc.ts b/src/providers/drpc.ts index 1b68793b..690a052d 100644 --- a/src/providers/drpc.ts +++ b/src/providers/drpc.ts @@ -3,6 +3,7 @@ import { RPCTransport } from "./types"; // Chain-specific overrides for when the endpoint name does not match the canonical chain name. const endpoints: { [chainId: string]: string } = { + [CHAIN_IDs.ALEPH_ZERO]: "alephzero", [CHAIN_IDs.ARBITRUM]: "arbitrum", [CHAIN_IDs.MAINNET]: "ethereum", }; diff --git a/src/relayFeeCalculator/chain-queries/alephZero.ts b/src/relayFeeCalculator/chain-queries/alephZero.ts new file mode 100644 index 00000000..5f6ce699 --- /dev/null +++ b/src/relayFeeCalculator/chain-queries/alephZero.ts @@ -0,0 +1,48 @@ +import assert from "assert"; +import { getDeployedAddress } from "../../utils/DeploymentUtils"; +import { DEFAULT_LOGGER, Logger } from "../relayFeeCalculator"; +import { providers } from "ethers"; +import { CHAIN_IDs, DEFAULT_SIMULATED_RELAYER_ADDRESS, TOKEN_SYMBOLS_MAP } from "../../constants"; +import { Coingecko } from "../../coingecko/Coingecko"; +import { isDefined } from "../../utils"; +import { QueryBase } from "./baseQuery"; + +export class AlephZeroQueries extends QueryBase { + constructor( + provider: providers.Provider, + symbolMapping = TOKEN_SYMBOLS_MAP, + spokePoolAddress = getDeployedAddress("SpokePool", CHAIN_IDs.ALEPH_ZERO), + simulatedRelayerAddress = DEFAULT_SIMULATED_RELAYER_ADDRESS, + coingeckoProApiKey?: string, + logger: Logger = DEFAULT_LOGGER, + gasMarkup = 0 + ) { + assert(isDefined(spokePoolAddress)); + super( + provider, + symbolMapping, + spokePoolAddress, + simulatedRelayerAddress, + gasMarkup, + logger, + coingeckoProApiKey, + undefined, + "usd" + ); + } + + override async getTokenPrice(tokenSymbol: string): Promise { + if (!this.symbolMapping[tokenSymbol]) throw new Error(`${tokenSymbol} does not exist in mapping`); + const coingeckoInstance = Coingecko.get(this.logger, this.coingeckoProApiKey); + const [, tokenPrice] = await coingeckoInstance.getCurrentPriceByContract( + this.symbolMapping[tokenSymbol].addresses[CHAIN_IDs.MAINNET], + "usd" + ); + + const [, alephZeroPrice] = await coingeckoInstance.getCurrentPriceByContract( + this.symbolMapping["AZERO"].addresses[CHAIN_IDs.MAINNET], + "usd" + ); + return Number((tokenPrice / alephZeroPrice).toFixed(this.symbolMapping["AZERO"].decimals)); + } +} diff --git a/src/relayFeeCalculator/chain-queries/factory.ts b/src/relayFeeCalculator/chain-queries/factory.ts index f3bd2e9a..00a1051f 100644 --- a/src/relayFeeCalculator/chain-queries/factory.ts +++ b/src/relayFeeCalculator/chain-queries/factory.ts @@ -4,10 +4,11 @@ import { getDeployedAddress } from "@across-protocol/contracts"; import { asL2Provider } from "@eth-optimism/sdk"; import { providers } from "ethers"; import { DEFAULT_SIMULATED_RELAYER_ADDRESS } from "../../constants"; -import { chainIsMatic, chainIsOPStack, isDefined } from "../../utils"; +import { chainIsAlephZero, chainIsMatic, chainIsOPStack, isDefined } from "../../utils"; import { QueryBase } from "./baseQuery"; import { PolygonQueries } from "./polygon"; import { DEFAULT_LOGGER, Logger } from "../relayFeeCalculator"; +import { AlephZeroQueries } from "./alephZero"; /** * Some chains have a fixed gas price that is applied to the gas estimates. We should override @@ -31,7 +32,6 @@ export class QueryBase__factory { ): QueryBase { assert(isDefined(spokePoolAddress)); - // Currently the only chain that has a custom query class is Polygon if (chainIsMatic(chainId)) { return new PolygonQueries( provider, @@ -43,6 +43,19 @@ export class QueryBase__factory { gasMarkup ); } + + if (chainIsAlephZero(chainId)) { + return new AlephZeroQueries( + provider, + symbolMapping, + spokePoolAddress, + simulatedRelayerAddress, + coingeckoProApiKey, + logger, + gasMarkup + ); + } + // For OPStack chains, we need to wrap the provider in an L2Provider provider = chainIsOPStack(chainId) ? asL2Provider(provider) : provider; diff --git a/src/typechain.ts b/src/typechain.ts index cf79a5a0..d2a067e0 100644 --- a/src/typechain.ts +++ b/src/typechain.ts @@ -28,9 +28,6 @@ export type { HubPool, HubPoolInterface } from "@across-protocol/contracts/dist/ export type { SpokePool, SpokePoolInterface, - FundsDepositedEvent, - FilledRelayEvent, - RequestedSpeedUpDepositEvent, V3FundsDepositedEvent, FilledV3RelayEvent, } from "@across-protocol/contracts/dist/typechain/contracts/SpokePool"; diff --git a/src/utils/Multicall.ts b/src/utils/Multicall.ts index 173abe03..96aaec97 100644 --- a/src/utils/Multicall.ts +++ b/src/utils/Multicall.ts @@ -17,6 +17,7 @@ export type Call3 = { const DETERMINISTIC_MULTICALL_ADDRESS = "0xcA11bde05977b3631167028862bE2a173976CA11"; const NON_DETERMINISTIC_MULTICALL_ADDRESSES = { + [CHAIN_IDs.ALEPH_ZERO]: "0x3CA11702f7c0F28e0b4e03C31F7492969862C569", [CHAIN_IDs.ZK_SYNC]: "0xF9cda624FBC7e059355ce98a31693d299FACd963", }; diff --git a/src/utils/NetworkUtils.ts b/src/utils/NetworkUtils.ts index 229341de..9adb4db9 100644 --- a/src/utils/NetworkUtils.ts +++ b/src/utils/NetworkUtils.ts @@ -60,6 +60,15 @@ export function chainIsOPStack(chainId: number): boolean { return PUBLIC_NETWORKS[chainId]?.family === ChainFamily.OP_STACK; } +/** + * Determines whether a chain ID is an Arbitrum Orbit implementation. + * @param chainId Chain ID to evaluate. + * @returns True if chainId is an Orbit chain, otherwise false. + */ +export function chainIsOrbit(chainId: number): boolean { + return PUBLIC_NETWORKS[chainId]?.family === ChainFamily.ORBIT; +} + /** * Determines whether a chain ID is an Arbitrum implementation. * @param chainId Chain ID to evaluate. @@ -69,6 +78,15 @@ export function chainIsArbitrum(chainId: number): boolean { return [CHAIN_IDs.ARBITRUM, CHAIN_IDs.ARBITRUM_SEPOLIA].includes(chainId); } +/** + * Determines whether a chain ID is an Aleph0 implementation + * @param chainId Chain ID to evaluate + * @returns True if chainId is an Aleph0 chain, otherwise false. + */ +export function chainIsAlephZero(chainId: number): boolean { + return [CHAIN_IDs.ALEPH_ZERO].includes(chainId); +} + /** * Determines whether a chain ID is a Linea implementation. * @param chainId Chain ID to evaluate. diff --git a/yarn.lock b/yarn.lock index 11d4d53d..0177ad55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,11 +16,6 @@ "@uma/common" "^2.17.0" hardhat "^2.9.3" -"@across-protocol/constants@^3.1.16": - version "3.1.16" - resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.16.tgz#c126085d29d4d051fd02a04c833d804d37c3c219" - integrity sha512-+U+AecGWnfY4b4sSfKBvsDj/+yXKEqpTXcZgI8GVVmUTkUhs1efA0kN4q3q10yy5TXI5TtagaG7R9yZg1zgKKg== - "@across-protocol/constants@^3.1.19": version "3.1.19" resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.19.tgz#3c29b52ec5f2eece93a6abd50d580668b03dd7b3" @@ -35,12 +30,13 @@ "@openzeppelin/contracts" "4.1.0" "@uma/core" "^2.18.0" -"@across-protocol/contracts@^3.0.11": - version "3.0.11" - resolved "https://registry.yarnpkg.com/@across-protocol/contracts/-/contracts-3.0.11.tgz#d010e2a1a44a7ac8184848a54bb9c7b2d41875b0" - integrity sha512-T2C8jOetkcqFDbp8fqI894Dd9qm7D9X7h1kqsI7rYu9paXdaqAUVSR/XcMTq2aHhNAVgb0OlKY/do982ujd0xw== +"@across-protocol/contracts@^3.0.16": + version "3.0.16" + resolved "https://registry.yarnpkg.com/@across-protocol/contracts/-/contracts-3.0.16.tgz#22eb0c1dcdb01e8ca504dc2351d46513d9f71cc6" + integrity sha512-vwg+PmWaenlrx7kTHZdjDTTj1PwXWFU3rMlFyfKM8xBXbPWhIfMQCKCYOwFrGmZw2nRTYgoyhoKN/f6rUs/snw== dependencies: - "@across-protocol/constants" "^3.1.16" + "@across-protocol/constants" "^3.1.19" + "@coral-xyz/anchor" "^0.30.1" "@defi-wonderland/smock" "^2.3.4" "@eth-optimism/contracts" "^0.5.40" "@ethersproject/abstract-provider" "5.7.0" @@ -49,10 +45,17 @@ "@openzeppelin/contracts" "4.9.6" "@openzeppelin/contracts-upgradeable" "4.9.6" "@scroll-tech/contracts" "^0.1.0" + "@solana-developers/helpers" "^2.4.0" + "@solana/spl-token" "^0.4.6" + "@solana/web3.js" "^1.31.0" + "@types/yargs" "^17.0.33" "@uma/common" "^2.34.0" "@uma/contracts-node" "^0.4.17" "@uma/core" "^2.56.0" axios "^1.7.4" + bs58 "^6.0.0" + prettier-plugin-rust "^0.1.9" + yargs "^17.7.2" zksync-web3 "^0.14.3" "@apollo/protobufjs@1.2.6": @@ -331,6 +334,13 @@ dependencies: regenerator-runtime "^0.13.11" +"@babel/runtime@^7.25.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -406,6 +416,40 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== +"@coral-xyz/anchor-errors@^0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz#bdfd3a353131345244546876eb4afc0e125bec30" + integrity sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ== + +"@coral-xyz/anchor@^0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.30.1.tgz#17f3e9134c28cd0ea83574c6bab4e410bcecec5d" + integrity sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ== + dependencies: + "@coral-xyz/anchor-errors" "^0.30.1" + "@coral-xyz/borsh" "^0.30.1" + "@noble/hashes" "^1.3.1" + "@solana/web3.js" "^1.68.0" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^6.3.0" + cross-fetch "^3.1.5" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + pako "^2.0.3" + snake-case "^3.0.4" + superstruct "^0.15.4" + toml "^3.0.0" + +"@coral-xyz/borsh@^0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.30.1.tgz#869d8833abe65685c72e9199b8688477a4f6b0e3" + integrity sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ== + dependencies: + bn.js "^5.1.2" + buffer-layout "^1.2.0" + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" @@ -1476,6 +1520,13 @@ dependencies: "@noble/hashes" "1.3.1" +"@noble/curves@^1.4.2": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b" + integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== + dependencies: + "@noble/hashes" "1.5.0" + "@noble/ed25519@^1.6.1": version "1.7.3" resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.7.3.tgz#57e1677bf6885354b466c38e2b620c62f45a7123" @@ -1491,6 +1542,11 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== +"@noble/hashes@1.5.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" + integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== + "@noble/hashes@~1.1.1": version "1.1.3" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.3.tgz#360afc77610e0a61f3417e497dcf36862e4f8111" @@ -2315,6 +2371,122 @@ dependencies: tslib "^2.5.0" +"@solana-developers/helpers@^2.4.0": + version "2.5.6" + resolved "https://registry.yarnpkg.com/@solana-developers/helpers/-/helpers-2.5.6.tgz#2af7613ea6848ce087c0dec7cf38e6f172abcbd4" + integrity sha512-NPWZblVMl4LuVVSJOZG0ZF0VYnrMUjCyMNTiGwNUXPK2WWYJCqpuDyzs/PMqwvM4gMTjk4pEToBX8N2UxDvZkQ== + dependencies: + "@solana/spl-token" "^0.4.8" + "@solana/spl-token-metadata" "^0.1.4" + "@solana/web3.js" "^1.95.2" + bs58 "^6.0.0" + dotenv "^16.4.5" + +"@solana/buffer-layout-utils@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" + integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/web3.js" "^1.32.0" + bigint-buffer "^1.1.5" + bignumber.js "^9.0.1" + +"@solana/buffer-layout@^4.0.0", "@solana/buffer-layout@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" + integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== + dependencies: + buffer "~6.0.3" + +"@solana/codecs-core@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz#1a2d76b9c7b9e7b7aeb3bd78be81c2ba21e3ce22" + integrity sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ== + dependencies: + "@solana/errors" "2.0.0-rc.1" + +"@solana/codecs-data-structures@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz#d47b2363d99fb3d643f5677c97d64a812982b888" + integrity sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + +"@solana/codecs-numbers@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz#f34978ddf7ea4016af3aaed5f7577c1d9869a614" + integrity sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + +"@solana/codecs-strings@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz#e1d9167075b8c5b0b60849f8add69c0f24307018" + integrity sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + +"@solana/codecs@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-rc.1.tgz#146dc5db58bd3c28e04b4c805e6096c2d2a0a875" + integrity sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-data-structures" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/codecs-strings" "2.0.0-rc.1" + "@solana/options" "2.0.0-rc.1" + +"@solana/errors@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.1.tgz#3882120886eab98a37a595b85f81558861b29d62" + integrity sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + +"@solana/options@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-rc.1.tgz#06924ba316dc85791fc46726a51403144a85fc4d" + integrity sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA== + dependencies: + "@solana/codecs-core" "2.0.0-rc.1" + "@solana/codecs-data-structures" "2.0.0-rc.1" + "@solana/codecs-numbers" "2.0.0-rc.1" + "@solana/codecs-strings" "2.0.0-rc.1" + "@solana/errors" "2.0.0-rc.1" + +"@solana/spl-token-group@^0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@solana/spl-token-group/-/spl-token-group-0.0.7.tgz#83c00f0cd0bda33115468cd28b89d94f8ec1fee4" + integrity sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug== + dependencies: + "@solana/codecs" "2.0.0-rc.1" + +"@solana/spl-token-metadata@^0.1.4", "@solana/spl-token-metadata@^0.1.6": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@solana/spl-token-metadata/-/spl-token-metadata-0.1.6.tgz#d240947aed6e7318d637238022a7b0981b32ae80" + integrity sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA== + dependencies: + "@solana/codecs" "2.0.0-rc.1" + +"@solana/spl-token@^0.4.6", "@solana/spl-token@^0.4.8": + version "0.4.9" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.4.9.tgz#24d032d2935f237925c3b058ba6bb1e1ece5428c" + integrity sha512-g3wbj4F4gq82YQlwqhPB0gHFXfgsC6UmyGMxtSLf/BozT/oKd59465DbnlUK8L8EcimKMavxsVAMoLcEdeCicg== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/buffer-layout-utils" "^0.2.0" + "@solana/spl-token-group" "^0.0.7" + "@solana/spl-token-metadata" "^0.1.6" + buffer "^6.0.3" + "@solana/wallet-adapter-base@^0.9.2": version "0.9.23" resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.23.tgz#3b17c28afd44e173f44f658bf9700fd637e12a11" @@ -2333,6 +2505,27 @@ "@wallet-standard/base" "^1.0.1" "@wallet-standard/features" "^1.0.3" +"@solana/web3.js@^1.31.0", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.68.0", "@solana/web3.js@^1.95.2": + version "1.95.4" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.95.4.tgz#771603f60d75cf7556ad867e1fd2efae32f9ad09" + integrity sha512-sdewnNEA42ZSMxqkzdwEWi6fDgzwtJHaQa5ndUGEJYtoOnM6X5cvPmjoTUp7/k7bRrVAxfBgDnvQQHD6yhlLYw== + dependencies: + "@babel/runtime" "^7.25.0" + "@noble/curves" "^1.4.2" + "@noble/hashes" "^1.4.0" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" + bigint-buffer "^1.1.5" + bn.js "^5.2.1" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.3" + fast-stable-stringify "^1.0.0" + jayson "^4.1.1" + node-fetch "^2.7.0" + rpc-websockets "^9.0.2" + superstruct "^2.0.2" + "@solidity-parser/parser@^0.14.0": version "0.14.1" resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.1.tgz#179afb29f4e295a77cc141151f26b3848abc3c46" @@ -2347,6 +2540,13 @@ dependencies: antlr4ts "^0.5.0-alpha.4" +"@swc/helpers@^0.5.11": + version "0.5.13" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.13.tgz#33e63ff3cd0cade557672bd7888a39ce7d115a8c" + integrity sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w== + dependencies: + tslib "^2.4.0" + "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" @@ -2725,7 +2925,7 @@ dependencies: "@types/node" "*" -"@types/connect@*": +"@types/connect@*", "@types/connect@^3.4.33": version "3.4.38" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== @@ -3013,6 +3213,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== +"@types/node@^12.12.54": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + "@types/node@^12.12.6": version "12.20.47" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.47.tgz#ca9237d51f2a2557419688511dab1c8daf475188" @@ -3126,6 +3331,11 @@ resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.11.4.tgz#62e393f8bc4bd8a06154d110c7d042a93751def3" integrity sha512-uO4CD2ELOjw8tasUrAhvnn2W4A0ZECOvMjCivJr4gA9pGgjv+qxKWY9GLTMVEK8ej85BxQOocUyE7hImmSQYcg== +"@types/uuid@^8.3.4": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + "@types/web3@1.0.19": version "1.0.19" resolved "https://registry.yarnpkg.com/@types/web3/-/web3-1.0.19.tgz#46b85d91d398ded9ab7c85a5dd57cb33ac558924" @@ -3134,11 +3344,32 @@ "@types/bn.js" "*" "@types/underscore" "*" +"@types/ws@^7.4.4": + version "7.4.7" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" + integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== + dependencies: + "@types/node" "*" + +"@types/ws@^8.2.2": + version "8.5.13" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.13.tgz#6414c280875e2691d0d1e080b05addbf5cb91e20" + integrity sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "21.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== +"@types/yargs@^17.0.33": + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + dependencies: + "@types/yargs-parser" "*" + "@types/yargs@^17.0.8": version "17.0.24" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902" @@ -3409,6 +3640,14 @@ resolved "https://registry.yarnpkg.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz#fb50ffabc6c7c66a0c96b4c03e3d9be74864b70b" integrity sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA== +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -3554,7 +3793,7 @@ agent-base@6, agent-base@^6.0.2: dependencies: debug "4" -agentkeepalive@^4.1.3: +agentkeepalive@^4.1.3, agentkeepalive@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== @@ -4221,6 +4460,11 @@ base-x@^3.0.2, base-x@^3.0.8: dependencies: safe-buffer "^5.0.1" +base-x@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-5.0.0.tgz#6d835ceae379130e1a4cb846a70ac4746f28ea9b" + integrity sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ== + base64-js@^1.0.2, base64-js@^1.3.0, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -4268,6 +4512,13 @@ big.js@^6.0.3: resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.1.1.tgz#63b35b19dc9775c94991ee5db7694880655d5537" integrity sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg== +bigint-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" + integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== + dependencies: + bindings "^1.3.0" + bigint-crypto-utils@^3.0.23: version "3.1.7" resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.1.7.tgz#c4c1b537c7c1ab7aadfaecf3edfd45416bf2c651" @@ -4300,7 +4551,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bindings@^1.5.0: +bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -4399,6 +4650,15 @@ borc@^2.1.2: json-text-sequence "~0.1.0" readable-stream "^3.6.0" +borsh@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" + integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== + dependencies: + bn.js "^5.2.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" + bplist-parser@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" @@ -4531,6 +4791,13 @@ bs58@^4.0.0, bs58@^4.0.1: dependencies: base-x "^3.0.2" +bs58@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-6.0.0.tgz#a2cda0130558535dd281a2f8697df79caaf425d8" + integrity sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw== + dependencies: + base-x "^5.0.0" + bs58check@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" @@ -4555,6 +4822,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer-layout@^1.2.0, buffer-layout@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" + integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== + buffer-reverse@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" @@ -4586,7 +4858,7 @@ buffer@4.9.2: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.2, buffer@^6.0.3: +buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.2, buffer@^6.0.3, buffer@~6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -4744,7 +5016,7 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: +camelcase@^6.0.0, camelcase@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -4851,6 +5123,11 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2, chalk@^4.x: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + change-case@3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" @@ -5297,6 +5574,11 @@ commander@3.0.2: resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== + commander@^2.15.0, commander@^2.19.0, commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -5545,6 +5827,11 @@ crypto-browserify@3.12.0: randombytes "^2.0.0" randomfill "^1.0.3" +crypto-hash@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/crypto-hash/-/crypto-hash-1.3.0.tgz#b402cb08f4529e9f4f09346c3e275942f845e247" + integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== + crypto-js@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" @@ -5769,6 +6056,11 @@ define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, de has-property-descriptors "^1.0.0" object-keys "^1.1.1" +delay@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" + integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -5938,11 +6230,24 @@ dot-case@^2.1.0: dependencies: no-case "^2.2.0" +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + dotenv@*, dotenv@^16.0.0: version "16.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.0.tgz#c619001253be89ebb638d027b609c75c26e47411" integrity sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q== +dotenv@^16.4.5: + version "16.4.5" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== + dotenv@^9.0.0: version "9.0.2" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-9.0.2.tgz#dacc20160935a37dea6364aa1bef819fb9b6ab05" @@ -6247,11 +6552,18 @@ es6-iterator@~0.1.3: es5-ext "~0.10.5" es6-symbol "~2.0.1" -es6-promise@4.2.8, es6-promise@^4.2.8: +es6-promise@4.2.8, es6-promise@^4.0.3, es6-promise@^4.2.8: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + es6-symbol@^3.1.1, es6-symbol@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" @@ -7167,6 +7479,11 @@ eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + events@^3.0.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -7292,6 +7609,11 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== +eyes@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== + fake-merkle-patricia-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" @@ -7352,6 +7674,11 @@ fast-safe-stringify@^2.0.6: resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== +fast-stable-stringify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" + integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== + fast-text-encoding@^1.0.0, fast-text-encoding@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz#ec02ac8e01ab8a319af182dae2681213cfe9ce53" @@ -9290,6 +9617,11 @@ isomorphic-unfetch@^3.0.0: node-fetch "^2.6.1" unfetch "^4.2.0" +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -9381,6 +9713,24 @@ it-to-stream@^1.0.0: p-fifo "^1.0.0" readable-stream "^3.6.0" +jayson@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.1.2.tgz#443c26a8658703e0b2e881117b09395d88b6982e" + integrity sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA== + dependencies: + "@types/connect" "^3.4.33" + "@types/node" "^12.12.54" + "@types/ws" "^7.4.4" + JSONStream "^1.3.5" + commander "^2.20.3" + delay "^5.0.0" + es6-promisify "^5.0.0" + eyes "^0.1.8" + isomorphic-ws "^4.0.1" + json-stringify-safe "^5.0.1" + uuid "^8.3.2" + ws "^7.5.10" + jest-util@^29.0.0: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.6.3.tgz#e15c3eac8716440d1ed076f09bc63ace1aebca63" @@ -9393,6 +9743,11 @@ jest-util@^29.0.0: graceful-fs "^4.2.9" picomatch "^2.2.3" +jinx-rust@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/jinx-rust/-/jinx-rust-0.1.6.tgz#c7bce55d97bfbad76a9b930c01fe6a8629a170d7" + integrity sha512-qP+wtQL1PrDDFwtPKhNGtjWOmijCrKdfUHWTV2G/ikxfjrh+cjdvkQTmny9RAsVF0jiui9m+F0INWu4cuRcZeQ== + js-cookie@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" @@ -9563,7 +9918,7 @@ json-stable-stringify@^1.0.1: dependencies: jsonify "~0.0.0" -json-stringify-safe@5, json-stringify-safe@~5.0.1: +json-stringify-safe@5, json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= @@ -9615,6 +9970,11 @@ jsonify@~0.0.0: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + jsonschema@^1.2.4: version "1.4.0" resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.0.tgz#1afa34c4bc22190d8e42271ec17ac8b3404f87b2" @@ -10277,6 +10637,13 @@ lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" @@ -11180,6 +11547,14 @@ no-case@^2.2.0, no-case@^2.3.2: dependencies: lower-case "^1.1.1" +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + node-abi@^3.3.0: version "3.54.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.54.0.tgz#f6386f7548817acac6434c6cba02999c9aebcc69" @@ -11234,7 +11609,7 @@ node-environment-flags@1.0.6: object.getownpropertydescriptors "^2.0.3" semver "^5.7.0" -node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: +node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -11719,6 +12094,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +pako@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + param-case@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" @@ -12029,7 +12409,15 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.3.1: +prettier-plugin-rust@^0.1.9: + version "0.1.9" + resolved "https://registry.yarnpkg.com/prettier-plugin-rust/-/prettier-plugin-rust-0.1.9.tgz#1a93b035743fa02a006b4980a1035a260ea9e501" + integrity sha512-n1DTTJQaHMdnoG/+nKUvBm3EKsMVWsYES2UPCiOPiZdBrmuAO/pX++m7L3+Hz3uuhtddpH0HRKHB2F3jbtJBOQ== + dependencies: + jinx-rust "0.1.6" + prettier "^2.7.1" + +prettier@^2.3.1, prettier@^2.7.1: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== @@ -12480,6 +12868,11 @@ regenerator-runtime@^0.13.11: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + regexp.prototype.flags@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" @@ -12736,6 +13129,22 @@ rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4, rlp@^2.2.7: dependencies: bn.js "^5.2.0" +rpc-websockets@^9.0.2: + version "9.0.4" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.0.4.tgz#9d8ee82533b5d1e13d9ded729e3e38d0d8fa083f" + integrity sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ== + dependencies: + "@swc/helpers" "^0.5.11" + "@types/uuid" "^8.3.4" + "@types/ws" "^8.2.2" + buffer "^6.0.3" + eventemitter3 "^5.0.1" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + run-applescript@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" @@ -13246,6 +13655,14 @@ snake-case@^2.1.0: dependencies: no-case "^2.2.0" +snake-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" + integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + socks-proxy-agent@^6.0.0: version "6.2.1" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz#2687a31f9d7185e38d530bef1944fe1f1496d6ce" @@ -13728,6 +14145,11 @@ superstruct@^0.15.4: resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.15.4.tgz#e3381dd84ca07e704e19f69eda74eee1a5efb1f9" integrity sha512-eOoMeSbP9ZJChNOm/9RYjE+F36rYR966AAqeG3xhQB02j2sfAUXDp4EQ/7bAOqnlJnuFDB8yvOu50SocvKpUEw== +superstruct@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-2.0.2.tgz#3f6d32fbdc11c357deff127d591a39b996300c54" + integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== + supports-color@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" @@ -13920,6 +14342,11 @@ testrpc@0.0.1: resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== +text-encoding-utf-8@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" + integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== + text-hex@1.0.x: version "1.0.0" resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" @@ -13947,10 +14374,10 @@ then-request@^6.0.0: promise "^8.0.0" qs "^6.4.0" -through@2, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1: +through@2, "through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== tildify@2.0.0: version "2.0.0" @@ -14034,6 +14461,11 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +toml@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" + integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== + touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" @@ -14153,6 +14585,11 @@ tslib@^1.11.1, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.0.3: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.0, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" @@ -15331,6 +15768,16 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== +ws@^7.5.10: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + +ws@^8.5.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + xhr-request-promise@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" @@ -15512,7 +15959,7 @@ yargs@16.2.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.5.1: +yargs@^17.5.1, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From 952bb0c1cf78b4e0d4512f8b619c1ca1e4c6b7de Mon Sep 17 00:00:00 2001 From: "James Morris, MS" <96435344+james-a-morris@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:29:06 -0500 Subject: [PATCH 11/11] improve: relax >0 timestamp constraint (#769) Signed-off-by: james-a-morris --- package.json | 2 +- src/clients/BundleDataClient/BundleDataClient.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 764e267c..94cab29f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@across-protocol/sdk", "author": "UMA Team", - "version": "3.2.12", + "version": "3.2.13", "license": "AGPL-3.0", "homepage": "https://docs.across.to/reference/sdk", "files": [ diff --git a/src/clients/BundleDataClient/BundleDataClient.ts b/src/clients/BundleDataClient/BundleDataClient.ts index f825c1c2..123d753a 100644 --- a/src/clients/BundleDataClient/BundleDataClient.ts +++ b/src/clients/BundleDataClient/BundleDataClient.ts @@ -1316,7 +1316,10 @@ export class BundleDataClient { ]; // Sanity checks: assert(endTime >= startTime, "End time should be greater than start time."); - assert(startTime > 0, "Start time should be greater than 0."); + assert( + startBlockForChain === 0 || startTime > 0, + "Start timestamp must be greater than 0 if the start block is greater than 0." + ); return [chainId, [startTime, endTime]]; }) ).filter(isDefined)