From 650478f4e2e1f45ce35bc5fccfe60f27d4fb9290 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Thu, 14 Sep 2023 13:47:45 +0000 Subject: [PATCH] init --- README.md | 6 + arb-bot.js | 4 + docs/html/curve.js.html | 5 +- docs/html/global.html | 74 +- docs/html/index.html | 2 +- docs/html/index.js.html | 9 +- docs/html/query.js.html | 2 +- docs/html/router.js.html | 21 +- docs/html/srouter.js.html | 25 +- docs/html/utils.js.html | 197 ++--- docs/html/zeroex.js.html | 2 +- example.env | 5 +- package-lock.json | 1441 +++++++++++-------------------------- package.json | 2 +- src/curve.js | 3 +- src/index.js | 7 +- src/router.js | 19 +- src/srouter.js | 23 +- src/utils.js | 195 ++--- test/srouter.test.js | 3 +- 20 files changed, 745 insertions(+), 1300 deletions(-) diff --git a/README.md b/README.md index 1eab0b84..7417ad16 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ Other optional arguments are: - `--sleep`, Seconds to wait between each arb round, default is 10, Will override the 'SLEPP' in env variables - `--max-profit`, Option to maximize profit for 'srouter' mode, comes at the cost of more RPC calls, Will override the 'MAX_PROFIT' in env variables - `--max-ratio`, Option to maximize maxIORatio for 'srouter' mode, Will override the 'MAX_RATIO' in env variables +- `--use-public-rpcs`, Option to use public rpcs as fallback option for 'srouter' and 'router' mode, Will override the 'USE_PUBLIC_RPCS' in env variables - `-V` or `--version`, output the version number - `-h` or `--help`, output usage information @@ -119,6 +120,7 @@ which will show: --sleep Seconds to wait between each arb round, default is 10, Will override the 'SLEPP' in env variables --max-profit Option to maximize profit for 'srouter' mode, comes at the cost of more RPC calls, Will override the 'MAX_PROFIT' in env variables --max-ratio Option to maximize maxIORatio for 'srouter' mode, Will override the 'MAX_RATIO' in env variables + --use-public-rpcs Option to use public rpcs as fallback option for 'srouter' and 'router' mode, Will override the 'USE_PUBLIC_RPCS' in env variables -V, --version output the version number -h, --help display help for command
@@ -184,6 +186,9 @@ SLEEP=10 # Option to maximize maxIORatio for 'srouter' mode MAX_RATIO="true" + +# Option to use public rpcs as fallback option for 'srouter' and 'router' mode +USE_PUBLIC_RPCS="true" ``` If both env variables and CLI argument are set, the CLI arguments will be prioritized and override the env variables. @@ -207,6 +212,7 @@ const configOptions = { hideSensitiveData : true, // set to true to hide sensitive data such as wallet private key or rpc url from apearing in logs maxProfit : true, // option to maximize profit for 'srouter' mode maxRatio : true // option to maximize the maxIORatio in "srouter" mode + usePublicRpcs : false // option to fallback to public rpcs liquidityProviders : [ // list of liquidity providers for "router" mode to get quotes from (optional) "sushiswapv2", "uniswapv2" diff --git a/arb-bot.js b/arb-bot.js index f3203c03..89f7580f 100755 --- a/arb-bot.js +++ b/arb-bot.js @@ -28,6 +28,7 @@ const DEFAULT_OPTIONS = { sleep : process?.env?.SLEEP, maxProfit : process?.env?.MAX_PROFIT?.toLowerCase() === "true" ? true : false, maxRatio : process?.env?.MAX_RATIO?.toLowerCase() === "true" ? true : false, + usePublicRpcs : process?.env?.USE_PUBLIC_RPCS?.toLowerCase() === "true" ? true : false, rpc : process?.env?.RPC_URL ? Array.from(process?.env?.RPC_URL.matchAll(/[^,\s]+/g)).map(v => v[0]) : undefined, @@ -57,6 +58,7 @@ const getOptions = async argv => { .option("--sleep ", "Seconds to wait between each arb round, default is 10, Will override the 'SLEPP' in env variables") .option("--max-profit", "Option to maximize profit for 'srouter' mode, comes at the cost of more RPC calls, Will override the 'MAX_PROFIT' in env variables") .option("--max-ratio", "Option to maximize maxIORatio for 'srouter' mode, Will override the 'MAX_RATIO' in env variables") + .option("--use-public-rpcs", "Option to use public rpcs as fallback option for 'srouter' and 'router' mode, Will override the 'USE_PUBLIC_RPCS' in env variables") .description([ "A NodeJS app to find and take arbitrage trades for Rain Orderbook orders against some DeFi liquidity providers, requires NodeJS v18 or higher.", "- Use \"node arb-bot [options]\" command alias for running the app from its repository workspace", @@ -86,6 +88,7 @@ const getOptions = async argv => { cmdOptions.monthlyRatelimit = cmdOptions.monthlyRatelimit || DEFAULT_OPTIONS.monthlyRatelimit; cmdOptions.maxProfit = cmdOptions.maxProfit || DEFAULT_OPTIONS.maxProfit; cmdOptions.maxRatio = cmdOptions.maxRatio || DEFAULT_OPTIONS.maxRatio; + cmdOptions.usePublicRpcs = cmdOptions.usePublicRpcs || DEFAULT_OPTIONS.usePublicRpcs; return cmdOptions; }; @@ -109,6 +112,7 @@ const arbRound = async options => { monthlyRatelimit : options.monthlyRatelimit, maxProfit : options.maxProfit, maxRatio : options.maxRatio, + usePublicRpcs : options.usePublicRpcs, hideSensitiveData : false, shortenLargeLogs : false, liquidityProviders : options.lps diff --git a/docs/html/curve.js.html b/docs/html/curve.js.html index 61092a76..9f54f2df 100644 --- a/docs/html/curve.js.html +++ b/docs/html/curve.js.html @@ -323,7 +323,7 @@

Source: curve.js

); const report = []; - const dataFetcher = getDataFetcher(config, processLps(config.lps)); + const dataFetcher = getDataFetcher(config, processLps(config.lps), !!config.usePublicRpc); for (let i = 0; i < bundledOrders.length; i++) { try { gasPrice = await signer.provider.getGasPrice(); @@ -693,7 +693,6 @@

Source: curve.js

console.log(error); } } - dataFetcher.stopDataFetching(); return report; }; @@ -715,7 +714,7 @@

Home

Global

  • diff --git a/docs/html/global.html b/docs/html/global.html index 577640fb..af4b25b2 100644 --- a/docs/html/global.html +++ b/docs/html/global.html @@ -328,7 +328,7 @@

    (constant) Source:
    @@ -624,7 +624,7 @@
    Parameters:
    Source:
    @@ -796,7 +796,7 @@
    Parameters:
    Source:
    @@ -989,7 +989,7 @@
    Parameters:
    Source:
    @@ -1205,7 +1205,7 @@
    Parameters:
    Source:
    @@ -1707,7 +1707,7 @@
    Parameters:
    Source:
    @@ -1923,7 +1923,7 @@
    Parameters:
    Source:
    @@ -2083,7 +2083,7 @@
    Parameters:
    Source:
    @@ -2253,7 +2253,7 @@
    Parameters:
    Source:
    @@ -2492,7 +2492,7 @@
    Parameters:
    Source:
    @@ -2891,7 +2891,7 @@
    Parameters:
    Source:
    @@ -3061,7 +3061,7 @@
    Parameters:
    Source:
    @@ -3290,7 +3290,7 @@
    Parameters:
    Source:
    @@ -3450,7 +3450,7 @@
    Parameters:
    Source:
    @@ -3666,7 +3666,7 @@
    Parameters:
    Source:
    @@ -3813,7 +3813,7 @@
    Parameters:
    Source:
    @@ -3950,7 +3950,7 @@
    Parameters:
    Source:
    @@ -4097,7 +4097,7 @@
    Parameters:
    Source:
    @@ -4621,7 +4621,7 @@
    Parameters:
    Source:
    @@ -5109,7 +5109,7 @@
    Parameters:
    Source:
    @@ -5385,7 +5385,7 @@
    Parameters:
    -

    (async) prepare(bundledOrders, lps, config, gasPrice, sort)

    +

    (async) prepare(bundledOrders, dataFetcher, config, gasPrice, sort)

    @@ -5459,13 +5459,13 @@
    Parameters:
    - lps + dataFetcher -Array.<string> +any @@ -5479,7 +5479,7 @@
    Parameters:
    - The list of liquidity providers + The DataFetcher instance @@ -5639,7 +5639,7 @@
    Parameters:
    -

    (async) prepare(bundledOrders, lps, config, gasPrice, sort)

    +

    (async) prepare(bundledOrders, dataFetcher, config, gasPrice, sort)

    @@ -5713,13 +5713,13 @@
    Parameters:
    - lps + dataFetcher -Array.<string> +any @@ -5733,7 +5733,7 @@
    Parameters:
    - The list of liquidity providers + The DataFetcher instance @@ -6194,7 +6194,7 @@
    Parameters:
    Source:
    @@ -6390,7 +6390,7 @@
    Parameters:
    Source:
    @@ -6630,7 +6630,7 @@
    Parameters:
    Source:
    @@ -6777,7 +6777,7 @@
    Parameters:
    Source:
    @@ -7006,7 +7006,7 @@
    Parameters:
    Source:
    @@ -7176,7 +7176,7 @@
    Parameters:
    Source:
    @@ -7323,7 +7323,7 @@
    Parameters:
    Source:
    @@ -7506,7 +7506,7 @@
    Parameters:
    Source:
    @@ -7796,7 +7796,7 @@

    Home

    Global

    • diff --git a/docs/html/index.html b/docs/html/index.html index 23ad98e1..b8f69248 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -56,7 +56,7 @@

      Home

      Global

      • diff --git a/docs/html/index.js.html b/docs/html/index.js.html index a28fd7d6..cc8d71da 100644 --- a/docs/html/index.js.html +++ b/docs/html/index.js.html @@ -71,7 +71,11 @@

        Source: index.js

        /** * Maximize maxIORatio for "srouter" mode */ - maxRatio: false + maxRatio: false, + /** + * Option to fallback to public rpcs + */ + usePublicRpcs: false }; /** @@ -209,6 +213,7 @@

        Source: index.js

        config.monthlyRatelimit = options?.monthlyRatelimit; config.maxProfit = !!options?.maxProfit; config.maxRatio = !!options?.maxRatio; + config.usePublicRpcs = !!options?.usePublicRpcs; return config; }; @@ -300,7 +305,7 @@

        Home

        Global

        • diff --git a/docs/html/query.js.html b/docs/html/query.js.html index e02a01b8..d357fb02 100644 --- a/docs/html/query.js.html +++ b/docs/html/query.js.html @@ -146,7 +146,7 @@

          Home

          Global

          • diff --git a/docs/html/router.js.html b/docs/html/router.js.html index 4e24e4b8..6b3ee032 100644 --- a/docs/html/router.js.html +++ b/docs/html/router.js.html @@ -47,12 +47,12 @@

            Source: router.js

            * bundled orders based on the best deals * * @param {any[]} bundledOrders - The bundled orders array - * @param {string[]} lps - The list of liquidity providers + * @param {any} dataFetcher - The DataFetcher instance * @param {any} config - The network config data * @param {ethers.BigNumber} gasPrice - The network gas price * @param {boolean} sort - (optional) Sort based on best deals or not */ -const prepare = async(bundledOrders, lps, config, gasPrice, sort = true) => { +const prepare = async(bundledOrders, dataFetcher, config, gasPrice, sort = true) => { for (let i = 0; i < bundledOrders.length; i++) { const bOrder = bundledOrders[i]; const pair = bOrder.buyTokenSymbol + "/" + bOrder.sellTokenSymbol; @@ -69,7 +69,6 @@

            Source: router.js

            address: bOrder.buyToken, symbol: bOrder.buyTokenSymbol }); - const dataFetcher = getDataFetcher(config, lps); await fetchPoolsForTokenWrapper(dataFetcher, fromToken, toToken); const pcMap = dataFetcher.getCurrentPoolCodeMap(fromToken, toToken); const route = Router.findBestRoute( @@ -89,7 +88,6 @@

            Source: router.js

            // const price = rateFixed.mul("1" + "0".repeat(18)).div(cumulativeAmountFixed); const price = route.amountOutBN.mul("1" + "0".repeat(18 - bOrder.buyTokenDecimals)); bOrder.initPrice = price; - bOrder.dataFetcher = dataFetcher; console.log(`Current market price for ${pair} for: ${ethers.utils.formatEther(price)}`); console.log("Current ratio of the orders in this token pair:"); @@ -143,7 +141,7 @@

            Source: router.js

            if (typeof prioritization !== "boolean") throw "invalid value for 'prioritization'"; const lps = processLps(config.lps); - const dataFetcher = getDataFetcher(config, lps); + const dataFetcher = getDataFetcher(config, lps, !!config.usePublicRpc); const signer = config.signer; const arbAddress = config.arbAddress; const orderbookAddress = config.orderbookAddress; @@ -175,7 +173,7 @@

            Source: router.js

            "------------------------- Getting Best Deals From RouteProcessor3 -------------------------", "\n" ); - bundledOrders = await prepare(bundledOrders, lps, config, gasPrice, prioritization); + bundledOrders = await prepare(bundledOrders, dataFetcher, config, gasPrice, prioritization); } else { console.log("No orders found, exiting...", "\n"); @@ -275,8 +273,8 @@

            Source: router.js

            symbol: bundledOrders[i].buyTokenSymbol }); - // await fetchPoolsForTokenWrapper(bundledOrders[i].dataFetcher, fromToken, toToken); - const pcMap = bundledOrders[i].dataFetcher.getCurrentPoolCodeMap(fromToken,toToken); + await fetchPoolsForTokenWrapper(dataFetcher, fromToken, toToken); + const pcMap = dataFetcher.getCurrentPoolCodeMap(fromToken,toToken); const route = Router.findBestRoute( pcMap, config.chainId, @@ -327,10 +325,10 @@

            Source: router.js

            // ); // if (route.status == "NoWay") throw "could not find any route for this token pair"; console.log(">>> Route portions: ", "\n"); - visualizeRoute(fromToken.address, toToken.address, route.legs).forEach( + visualizeRoute(fromToken, toToken, route.legs).forEach( v => console.log("\x1b[36m%s\x1b[0m", v) ); - console.log("\n"); + console.log(""); // console.log( // "\x1b[36m%s\x1b[0m", // visualizeRoute(fromToken.address, toToken.address, route.legs), @@ -580,7 +578,6 @@

            Source: router.js

            console.log(error); } } - dataFetcher.stopDataFetching(); return report; }; @@ -602,7 +599,7 @@

            Home

            Global

            • diff --git a/docs/html/srouter.js.html b/docs/html/srouter.js.html index ac0982cc..2e19ea7c 100644 --- a/docs/html/srouter.js.html +++ b/docs/html/srouter.js.html @@ -48,12 +48,12 @@

              Source: srouter.js

              * bundled orders based on the best deals * * @param {any[]} bundledOrders - The bundled orders array - * @param {string[]} lps - The list of liquidity providers + * @param {any} dataFetcher - The DataFetcher instance * @param {any} config - The network config data * @param {ethers.BigNumber} gasPrice - The network gas price * @param {boolean} sort - (optional) Sort based on best deals or not */ -const prepare = async(bundledOrders, lps, config, gasPrice, sort = true) => { +const prepare = async(bundledOrders, dataFetcher, config, gasPrice, sort = true) => { for (let i = 0; i < bundledOrders.length; i++) { const bOrder = bundledOrders[i]; const pair = bOrder.buyTokenSymbol + "/" + bOrder.sellTokenSymbol; @@ -70,7 +70,6 @@

              Source: srouter.js

              address: bOrder.buyToken, symbol: bOrder.buyTokenSymbol }); - const dataFetcher = getDataFetcher(config, lps); await fetchPoolsForTokenWrapper(dataFetcher, fromToken, toToken); const pcMap = dataFetcher.getCurrentPoolCodeMap(fromToken, toToken); const route = Router.findBestRoute( @@ -88,7 +87,6 @@

              Source: srouter.js

              const price = route.amountOutBN.mul("1" + "0".repeat(18 - bOrder.buyTokenDecimals)); bOrder.initPrice = price; - bOrder.dataFetcher = dataFetcher; console.log(`Current market price for ${pair} for: ${ethers.utils.formatEther(price)}`); console.log("Current ratio of the orders in this token pair:"); @@ -142,7 +140,7 @@

              Source: srouter.js

              if (typeof prioritization !== "boolean") throw "invalid value for 'prioritization'"; const lps = processLps(config.lps); - const dataFetcher = getDataFetcher(config, lps); + const dataFetcher = getDataFetcher(config, lps, !!config.usePublicRpc); const signer = config.signer; const arbAddress = config.arbAddress; const orderbookAddress = config.orderbookAddress; @@ -175,7 +173,7 @@

              Source: srouter.js

              "------------------------- Getting Best Deals From RouteProcessor3 -------------------------", "\n" ); - bundledOrders = await prepare(bundledOrders, lps, config, gasPrice, prioritization); + bundledOrders = await prepare(bundledOrders, dataFetcher, config, gasPrice, prioritization); } else { console.log("No orders found, exiting...", "\n"); @@ -244,7 +242,8 @@

              Source: srouter.js

              bundledOrders[i].sellTokenSymbol } as maximum input`); console.log(">>> Getting best route", "\n"); - const pcMap = bundledOrders[i].dataFetcher.getCurrentPoolCodeMap( + await fetchPoolsForTokenWrapper(dataFetcher, fromToken, toToken); + const pcMap = dataFetcher.getCurrentPoolCodeMap( fromToken, toToken ); @@ -269,14 +268,10 @@

              Source: srouter.js

              const price = rateFixed.mul("1" + "0".repeat(18)).div(maximumInputFixed); console.log(`Current best route price for this token pair: ${ethers.utils.formatEther(price)}`, "\n"); console.log(">>> Route portions: ", "\n"); - visualizeRoute(fromToken.address, toToken.address, route.legs).forEach( + visualizeRoute(fromToken, toToken, route.legs).forEach( v => console.log("\x1b[36m%s\x1b[0m", v) ); - console.log("\n"); - // console.log( - // "\x1b[36m%s\x1b[0m", - // "\n" - // ); + console.log(""); const rpParams = Router.routeProcessor2Params( pcMap, @@ -321,6 +316,7 @@

              Source: srouter.js

              gasLimit = await signer.estimateGas(rawtx); } catch { + // console.log(err); throw "nomatch"; } gasLimit = gasLimit.mul("11").div("10"); @@ -510,7 +506,6 @@

              Source: srouter.js

              console.log(error); } } - dataFetcher.stopDataFetching(); return report; }; @@ -532,7 +527,7 @@

              Home

              Global

              • diff --git a/docs/html/utils.js.html b/docs/html/utils.js.html index f666f623..9f2f4c2d 100644 --- a/docs/html/utils.js.html +++ b/docs/html/utils.js.html @@ -43,52 +43,49 @@

                Source: utils.js

                transport: http("https://nova.arbitrum.io/rpc"), }, [ChainId.ARBITRUM]: { - transport: fallback( - [ - http("https://lb.drpc.org/ogrpc?network=arbitrum&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), - http("https://rpc.ankr.com/arbitrum"), - http("https://arbitrum-one.public.blastapi.io"), - http("https://endpoints.omniatech.io/v1/arbitrum/one/public"), - http("https://arb1.croswap.com/rpc"), - http("https://1rpc.io/arb"), - http("https://arbitrum.blockpi.network/v1/rpc/public"), - http("https://arb-mainnet-public.unifra.io"), - ], - { rank: true } - ), + transport: [ + http("https://lb.drpc.org/ogrpc?network=arbitrum&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), + http("https://rpc.ankr.com/arbitrum"), + http("https://arbitrum-one.public.blastapi.io"), + http("https://endpoints.omniatech.io/v1/arbitrum/one/public"), + http("https://arb1.croswap.com/rpc"), + http("https://1rpc.io/arb"), + http("https://arbitrum.blockpi.network/v1/rpc/public"), + http("https://arb-mainnet-public.unifra.io"), + ], }, [ChainId.AVALANCHE]: { - transport: fallback([ + transport: [ http("https://api.avax.network/ext/bc/C/rpc"), http("https://rpc.ankr.com/avalanche") - ]), + ], }, [ChainId.BOBA]: { - transport: fallback([ + transport: [ http("https://mainnet.boba.network"), http("https://lightning-replica.boba.network") - ]), + ], }, [ChainId.BOBA_AVAX]: { - transport: fallback([ + transport: [ http("https://avax.boba.network"), http("https://replica.avax.boba.network") - ]), + ], }, [ChainId.BOBA_BNB]: { - transport: fallback([ + transport: [ http("https://bnb.boba.network"), http("https://replica.bnb.boba.network") - ]), + ], }, [ChainId.BSC]: { - transport: fallback([ + transport: [ http("https://rpc.ankr.com/bsc"), http("https://lb.drpc.org/ogrpc?network=bsc&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), http("https://bsc-dataseed.binance.org"), http("https://bsc-dataseed1.binance.org"), http("https://bsc-dataseed2.binance.org"), - ]), + ], }, [ChainId.BTTC]: { transport: http("https://rpc.bittorrentchain.io"), @@ -97,27 +94,24 @@

                Source: utils.js

                transport: http("https://forno.celo.org") }, [ChainId.ETHEREUM]: { - transport: fallback( - [ - http("https://lb.drpc.org/ogrpc?network=ethereum&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), - http("https://eth.llamarpc.com"), - // http('https://eth.rpc.blxrbdn.com'), - // http('https://virginia.rpc.blxrbdn.com'), - // http('https://singapore.rpc.blxrbdn.com'), - // http('https://uk.rpc.blxrbdn.com'), - http("https://1rpc.io/eth"), - http("https://ethereum.publicnode.com"), - http("https://cloudflare-eth.com"), - ], - { rank: true } - ), + transport: [ + http("https://lb.drpc.org/ogrpc?network=ethereum&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), + http("https://eth.llamarpc.com"), + // http('https://eth.rpc.blxrbdn.com'), + // http('https://virginia.rpc.blxrbdn.com'), + // http('https://singapore.rpc.blxrbdn.com'), + // http('https://uk.rpc.blxrbdn.com'), + http("https://1rpc.io/eth"), + http("https://ethereum.publicnode.com"), + http("https://cloudflare-eth.com"), + ] }, [ChainId.FANTOM]: { - transport: fallback([ + transport: [ http("https://rpc.ankr.com/fantom"), http("https://rpc.fantom.network"), http("https://rpc2.fantom.network"), - ]), + ], }, [ChainId.FUSE]: { transport: http("https://rpc.fuse.io"), @@ -126,76 +120,64 @@

                Source: utils.js

                transport: http("https://rpc.ankr.com/gnosis"), }, [ChainId.HARMONY]: { - transport: fallback([ + transport: [ http("https://api.harmony.one"), http("https://rpc.ankr.com/harmony") - ]), + ], }, [ChainId.KAVA]: { - transport: fallback([ + transport: [ http("https://evm.kava.io"), http("https://evm2.kava.io") - ]), + ], }, [ChainId.MOONBEAM]: { - transport: fallback([ + transport: [ http("https://rpc.api.moonbeam.network"), http("https://rpc.ankr.com/moonbeam") - ]), + ], }, [ChainId.MOONRIVER]: { transport: http("https://rpc.api.moonriver.moonbeam.network"), }, [ChainId.OPTIMISM]: { - transport: fallback( - [ - http("https://lb.drpc.org/ogrpc?network=optimism&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), - http("https://rpc.ankr.com/optimism"), - http("https://optimism-mainnet.public.blastapi.io"), - http("https://1rpc.io/op"), - http("https://optimism.blockpi.network/v1/rpc/public"), - http("https://mainnet.optimism.io"), - ], - { rank: true } - ), + transport: [ + http("https://lb.drpc.org/ogrpc?network=optimism&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), + http("https://rpc.ankr.com/optimism"), + http("https://optimism-mainnet.public.blastapi.io"), + http("https://1rpc.io/op"), + http("https://optimism.blockpi.network/v1/rpc/public"), + http("https://mainnet.optimism.io"), + ], }, [ChainId.POLYGON]: { - transport: fallback( - [ - http("https://polygon.llamarpc.com"), - // http('https://polygon.rpc.blxrbdn.com'), - http("https://polygon-mainnet.public.blastapi.io"), - http("https://polygon.blockpi.network/v1/rpc/public"), - http("https://polygon-rpc.com"), - http("https://rpc.ankr.com/polygon"), - http("https://matic-mainnet.chainstacklabs.com"), - http("https://polygon-bor.publicnode.com"), - http("https://rpc-mainnet.matic.quiknode.pro"), - http("https://rpc-mainnet.maticvigil.com"), - // ...polygon.rpcUrls.default.http.map((url) => http(url)), - ], - { rank: true } - ), + transport: [ + http("https://polygon.llamarpc.com"), + // http('https://polygon.rpc.blxrbdn.com'), + http("https://polygon-mainnet.public.blastapi.io"), + http("https://polygon.blockpi.network/v1/rpc/public"), + http("https://polygon-rpc.com"), + http("https://rpc.ankr.com/polygon"), + http("https://matic-mainnet.chainstacklabs.com"), + http("https://polygon-bor.publicnode.com"), + http("https://rpc-mainnet.matic.quiknode.pro"), + http("https://rpc-mainnet.maticvigil.com"), + // ...polygon.rpcUrls.default.http.map((url) => http(url)), + ], }, [ChainId.POLYGON_ZKEVM]: { - transport: fallback( - [ - http("https://zkevm-rpc.com"), - http("https://rpc.ankr.com/polygon_zkevm"), - http("https://rpc.polygon-zkevm.gateway.fm"), - ], - { rank: true } - ), + transport: [ + http("https://zkevm-rpc.com"), + http("https://rpc.ankr.com/polygon_zkevm"), + http("https://rpc.polygon-zkevm.gateway.fm"), + ], }, [ChainId.THUNDERCORE]: { - transport: fallback( - [ - http("https://mainnet-rpc.thundercore.com"), - http("https://mainnet-rpc.thundercore.io"), - http("https://mainnet-rpc.thundertoken.net"), - ], - { rank: true } - ), + transport: [ + http("https://mainnet-rpc.thundercore.com"), + http("https://mainnet-rpc.thundercore.io"), + http("https://mainnet-rpc.thundertoken.net"), + ], }, }; @@ -718,15 +700,20 @@

                Source: utils.js

                * @param {any} config - The network config data * @param {LiquidityProviders[]} liquidityProviders - Array of Liquidity Providers */ -const getDataFetcher = (config, liquidityProviders = []) => { +const getDataFetcher = (config, liquidityProviders = [], useFallbacks = false) => { try { const dataFetcher = new DataFetcher( config.chainId, createPublicClient({ chain: viemConfig[config.chainId]?.chain, transport: config.rpc && config.rpc !== "test" - ? http(config.rpc) - : fallbackTransports[config.chainId].transport, + ? useFallbacks + ? fallback( + [config.rpc, ...fallbackTransports[config.chainId].transport], + {rank: true} + ) + : http(config.rpc) + : fallback(fallbackTransports[config.chainId].transport, {rank: true}), // batch: { // multicall: { // batchSize: 512 @@ -735,9 +722,12 @@

                Source: utils.js

                // pollingInterval: 8_000, }) ); + + // start and immediately stop data fetching as we only want data fetching on demand dataFetcher.startDataFetching( !liquidityProviders.length ? undefined : liquidityProviders ); + dataFetcher.stopDataFetching(); return dataFetcher; } catch(error) { @@ -1249,20 +1239,31 @@

                Source: utils.js

                const visualizeRoute = (fromToken, toToken, legs) => { return [ ...legs.filter( - v => v.tokenTo.address.toLowerCase() === toToken.toLowerCase() && - v.tokenFrom.address.toLowerCase() === fromToken.toLowerCase() + v => v.tokenTo.address.toLowerCase() === toToken.address.toLowerCase() && + v.tokenFrom.address.toLowerCase() === fromToken.address.toLowerCase() && + v.tokenTo.symbol.toLowerCase() === toToken.symbol.toLowerCase() && + v.tokenFrom.symbol.toLowerCase() === fromToken.symbol.toLowerCase() ).map(v => [v]), ...legs.filter( - v => v.tokenFrom.address.toLowerCase() === fromToken.toLowerCase() && - v.tokenTo.address.toLowerCase() !== toToken.toLowerCase() + v => v.tokenFrom.address.toLowerCase() === fromToken.address.toLowerCase() && + v.tokenFrom.symbol.toLowerCase() === fromToken.symbol.toLowerCase() && + ( + v.tokenTo.address.toLowerCase() !== toToken.address.toLowerCase() || + v.tokenTo.symbol.toLowerCase() !== toToken.symbol.toLowerCase() + ) ).map(v => { const portoin = [v]; - while(portoin.at(-1).tokenTo.address.toLowerCase() !== toToken.toLowerCase()) { + while( + portoin.at(-1).tokenTo.address.toLowerCase() !== toToken.address.toLowerCase() || + portoin.at(-1).tokenTo.symbol.toLowerCase() !== toToken.symbol.toLowerCase() + ) { portoin.push( legs.find(e => e.tokenFrom.address.toLowerCase() === - portoin.at(-1).tokenTo.address.toLowerCase() + portoin.at(-1).tokenTo.address.toLowerCase() && + e.tokenFrom.symbol.toLowerCase() === + portoin.at(-1).tokenTo.symbol.toLowerCase() ) ); } @@ -1322,7 +1323,7 @@

                Home

                Global

                • diff --git a/docs/html/zeroex.js.html b/docs/html/zeroex.js.html index 08683b51..0910efba 100644 --- a/docs/html/zeroex.js.html +++ b/docs/html/zeroex.js.html @@ -667,7 +667,7 @@

                  Home

                  Global

                  • diff --git a/example.env b/example.env index 083e00a2..f527cf4f 100644 --- a/example.env +++ b/example.env @@ -59,4 +59,7 @@ MAX_PROFIT="true" SLEEP=10 # Option to maximize maxIORatio for 'srouter' mode -MAX_RATIO="true" \ No newline at end of file +MAX_RATIO="true" + +# Option to use public rpcs as fallback option for 'srouter' and 'router' mode +USE_PUBLIC_RPCS="true" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 43bf0f18..8ab4be1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.1.1", "license": "CAL-1.0", "dependencies": { - "@sushiswap/router": "^0.0.8", + "@sushiswap/router": "^0.0.13", "axios": "^1.3.4", "commander": "^11.0.0", "dotenv": "^16.0.3", @@ -44,31 +44,32 @@ "integrity": "sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==" }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.15.tgz", + "integrity": "sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", + "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", "dependencies": { "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -88,12 +89,12 @@ } }, "node_modules/@babel/runtime": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", - "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", + "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", "peer": true, "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -105,9 +106,9 @@ "integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==" }, "node_modules/@coinbase/wallet-sdk": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.7.1.tgz", - "integrity": "sha512-LjyoDCB+7p0waQXfK+fUgcAs3Ezk6S6e+LYaoFjpJ6c9VTop3NyZF40Pi7df4z7QJohCwzuIDjz0Rhtig6Y7Pg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.7.2.tgz", + "integrity": "sha512-lIGvXMsgpsQWci/XOMQIJ2nIZ8JUy/L+bvC0wkRaYarr0YylwpXrJ2gRM3hCXPS477pkyO7N/kSiAoRgEXUdJQ==", "peer": true, "dependencies": { "@metamask/safe-event-emitter": "2.0.0", @@ -1508,9 +1509,9 @@ } }, "node_modules/@ledgerhq/connect-kit-loader": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.0.tgz", - "integrity": "sha512-HUy12FEczoWY2FPubnsm1uOA8tkVWc0j90i47suThV3C9NL2xx69ZAIEU3Ytzs2bwLek9S1Q2S1VQJvA+3Ygkg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.2.tgz", + "integrity": "sha512-mscwGroSJQrCTjtNGBu+18FQbZYA4+q6Tyx6K7CXHl6AwgZKbWfZYdgP2F+fyZcRUdGRsMX8QtvU61VcGGtO1A==", "peer": true }, "node_modules/@lit-labs/ssr-dom-shim": { @@ -1520,9 +1521,9 @@ "peer": true }, "node_modules/@lit/reactive-element": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.2.tgz", - "integrity": "sha512-rDfl+QnCYjuIGf5xI2sVJWdYIi56CTCwWa+nidKYX6oIuBYwUbT/vX4qbUDlHiZKJ/3FRNQ/tWJui44p6/stSA==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", + "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", "peer": true, "dependencies": { "@lit-labs/ssr-dom-shim": "^1.0.0" @@ -1681,9 +1682,9 @@ } }, "node_modules/@metamask/utils/node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "peer": true, "dependencies": { "lru-cache": "^6.0.0" @@ -1723,9 +1724,9 @@ } }, "node_modules/@motionone/animation/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true }, "node_modules/@motionone/dom": { @@ -1743,9 +1744,9 @@ } }, "node_modules/@motionone/dom/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true }, "node_modules/@motionone/easing": { @@ -1759,9 +1760,9 @@ } }, "node_modules/@motionone/easing/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true }, "node_modules/@motionone/generators": { @@ -1776,9 +1777,9 @@ } }, "node_modules/@motionone/generators/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true }, "node_modules/@motionone/svelte": { @@ -1792,9 +1793,9 @@ } }, "node_modules/@motionone/svelte/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true }, "node_modules/@motionone/types": { @@ -1815,9 +1816,9 @@ } }, "node_modules/@motionone/utils/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true }, "node_modules/@motionone/vue": { @@ -1831,27 +1832,27 @@ } }, "node_modules/@motionone/vue/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true }, "node_modules/@noble/curves": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", - "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", "peer": true, "dependencies": { - "@noble/hashes": "1.3.1" + "@noble/hashes": "1.3.2" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@noble/hashes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", - "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", "engines": { "node": ">= 16" }, @@ -2402,25 +2403,6 @@ "node": "*" } }, - "node_modules/@nomiclabs/hardhat-docker/node_modules/node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/@nomiclabs/hardhat-docker/node_modules/pump": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", @@ -2817,12 +2799,12 @@ } }, "node_modules/@safe-global/safe-gateway-typescript-sdk": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.7.3.tgz", - "integrity": "sha512-O6JCgXNZWG0Vv8FnOEjKfcbsP0WxGvoPJk5ufqUrsyBlHup16It6oaLnn+25nXFLBZOHI1bz8429JlqAc2t2hg==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.12.0.tgz", + "integrity": "sha512-hExCo62lScVC9/ztVqYEYL2pFxcqLTvB8fj0WtdP5FWrvbtEgD0pbVolchzD5bf85pbzvEwdAxSVS7EdCZxTNw==", "peer": true, - "dependencies": { - "cross-fetch": "^3.1.5" + "engines": { + "node": ">=16" } }, "node_modules/@scure/base": { @@ -3000,32 +2982,32 @@ } }, "node_modules/@solana/web3.js": { - "version": "1.77.3", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.77.3.tgz", - "integrity": "sha512-PHaO0BdoiQRPpieC1p31wJsBaxwIOWLh8j2ocXNKX8boCQVldt26Jqm2tZE4KlrvnCIV78owPLv1pEUgqhxZ3w==", + "version": "1.78.5", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.78.5.tgz", + "integrity": "sha512-2ZHsDNqkKdglJQrIvJ3p2DmgS3cGnary3VJyqt9C1SPrpAtLYzcElr3xyXJOznyQTU/8AMw+GoF11lFoKbicKg==", "peer": true, "dependencies": { - "@babel/runtime": "^7.12.5", + "@babel/runtime": "^7.22.6", "@noble/curves": "^1.0.0", - "@noble/hashes": "^1.3.0", + "@noble/hashes": "^1.3.1", "@solana/buffer-layout": "^4.0.0", - "agentkeepalive": "^4.2.1", + "agentkeepalive": "^4.3.0", "bigint-buffer": "^1.1.5", - "bn.js": "^5.0.0", + "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.0", - "node-fetch": "^2.6.7", + "node-fetch": "^2.6.12", "rpc-websockets": "^7.5.1", "superstruct": "^0.14.2" } }, "node_modules/@solana/web3.js/node_modules/node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "peer": true, "dependencies": { "whatwg-url": "^5.0.0" @@ -3221,21 +3203,21 @@ "integrity": "sha512-J4zWyfZdFiDIBa28MV/yYmr9nmWDqX8CXVfUoLfg48RVUyqPsu57dKtEKiBqAO/xpl7d9ZciNcya0d09NXvm8w==" }, "node_modules/@sushiswap/amm": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@sushiswap/amm/-/amm-0.1.8.tgz", - "integrity": "sha512-rlrg8gK9DBFESR4PcK6Lr/KR+B0ED22Svnk9FPWISyVdPMk2LqRfr9tvSVkjry8OfaYGrMLA9p6HNj8u3cDnGw==", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/@sushiswap/amm/-/amm-0.1.13.tgz", + "integrity": "sha512-DADqfPmFXJ8jeg1GmdrKRvz2liCAKZM00uoNgouBonK0dyLcyxxBNkr2HEsaLv4PPmE+sx3xHAP5bKY2sb/DeQ==", "dependencies": { "@ethersproject/abi": "5.7.0", "@ethersproject/address": "5.7.0", "@ethersproject/bignumber": "5.7.0", "@ethersproject/solidity": "5.7.0", - "@sushiswap/chain": "0.1.1", - "@sushiswap/currency": "0.0.5", + "@sushiswap/chain": "0.1.2", + "@sushiswap/currency": "0.1.2", "@sushiswap/math": "0.1.0", - "@sushiswap/tines": "1.0.5", - "@sushiswap/trident-core": "1.0.4", + "@sushiswap/tines": "1.0.9", + "@sushiswap/trident-core": "1.0.8", "@sushiswap/types": "0.0.2", - "@sushiswap/v2-core": "1.0.4", + "@sushiswap/v2-sdk": "0.0.9", "tiny-invariant": "1.3.1", "tiny-warning": "1.0.3", "zod": "3.21.4" @@ -3247,19 +3229,18 @@ "integrity": "sha512-Wg3QVWie0YIVHch0oE0y6Dy+qpX/e5fsiF0MSaXgYNhTki1Uc5IPTcJ2wCISbkMjDpEP+HiLWivftNdc7gc+aw==" }, "node_modules/@sushiswap/chain": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@sushiswap/chain/-/chain-0.1.1.tgz", - "integrity": "sha512-P5C4mhgWd1v4ulDYRE+q4Uajw+X6JWTBpuGQ2KEToojrElUeTLQxa0dreodQ4wcFta/M5cFRmtmk3jgPOU1hVQ==", - "hasInstallScript": true + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@sushiswap/chain/-/chain-0.1.2.tgz", + "integrity": "sha512-A0S5fYxYxUZu3UQj3AwekCRgjDQ8hzLRjc1p9XwV9i+0r9ZxAdXafWFrpQufDoXS0lfKd/4XiFh50LsbhvWA8A==" }, "node_modules/@sushiswap/currency": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@sushiswap/currency/-/currency-0.0.5.tgz", - "integrity": "sha512-CKPAnh8NaTKPnMJvMr1XpGatQpE6QSCroaYPc/45MHrut8yWLEAeUTDMC0smRiorzugXQ8Ix4h+KSMhjj1vnlw==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@sushiswap/currency/-/currency-0.1.2.tgz", + "integrity": "sha512-GoJby3yURGkNY6wY2Ta45EeY8wR6AuQkUO/96eqLEYrshERrnTAlruNqSJlPINMNhXrv/QusRL/CdAy13VPneg==", "dependencies": { "@ethersproject/address": "5.7.0", "@ethersproject/units": "^5.7.0", - "@sushiswap/chain": "0.1.1", + "@sushiswap/chain": "0.1.2", "@sushiswap/math": "0.1.0", "lodash.flatmap": "4.5.0", "tiny-invariant": "1.3.1", @@ -3288,33 +3269,33 @@ } }, "node_modules/@sushiswap/router": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@sushiswap/router/-/router-0.0.8.tgz", - "integrity": "sha512-Uf8VJ8aAqIMPQRbt3nTu8g0Ti9NB0JnOrHebAR68QC+P7FUOpSENvGLTojb/px0qfK3H1/Xe6fkmInnGFALd/Q==", + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/@sushiswap/router/-/router-0.0.13.tgz", + "integrity": "sha512-S9wm4TbghkZq48nc+e2ETa484vg4/Kr8rprUY3qdqweoPtS/Po0oIh5seXPrHUSi29KaERnxjkDk2W62SBB6oQ==", "dependencies": { "@ethersproject/abi": "5.7.0", "@ethersproject/address": "5.7.0", "@ethersproject/bignumber": "5.7.0", "@ethersproject/solidity": "5.7.0", "@sushiswap/abi": "0.0.1", - "@sushiswap/amm": "0.1.8", + "@sushiswap/amm": "0.1.13", "@sushiswap/bentobox": "1.0.1", - "@sushiswap/chain": "0.1.1", - "@sushiswap/currency": "0.0.5", + "@sushiswap/chain": "0.1.2", + "@sushiswap/currency": "0.1.2", "@sushiswap/math": "0.1.0", - "@sushiswap/router-config": "1.0.0", - "@sushiswap/tines": "1.0.5", - "@sushiswap/trident-core": "1.0.4", - "@sushiswap/v2-core": "1.0.4", - "@sushiswap/v3-sdk": "1.0.5", - "@sushiswap/viem-config": "1.0.1", + "@sushiswap/router-config": "2.0.0", + "@sushiswap/tines": "1.0.9", + "@sushiswap/trident-core": "1.0.8", + "@sushiswap/v2-sdk": "0.0.9", + "@sushiswap/v3-sdk": "1.0.10", + "@sushiswap/viem-config": "1.0.2", "date-fns": "2.29.3", "ethers": "5.7.2", "lodash.flatmap": "^4.5.0", "node-fetch": "2.6.6", "tiny-invariant": "1.3.1", "tiny-warning": "1.0.3", - "viem": "0.3.29", + "viem": "1.0.2", "zod": "3.21.4" }, "peerDependencies": { @@ -3327,9 +3308,9 @@ } }, "node_modules/@sushiswap/router-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@sushiswap/router-config/-/router-config-1.0.0.tgz", - "integrity": "sha512-mSifisbE2OwgQDFOEVRJ54jFqepIQxTLMY+5a1GT1mgkj2MiyCNUgGc1iLowv6Gkg8/3lnIREJHYvJT2DSC1PQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sushiswap/router-config/-/router-config-2.0.0.tgz", + "integrity": "sha512-cVN20sur3EbC4GTxywuCVPovhXcuBh7hUMSFyhYhOQxhQGbvlPYot/+PX77UpYviTsJOTdo+ov2LyMT5AGdTHA==", "peerDependencies": { "@sushiswap/chain": "*", "@sushiswap/currency": "*" @@ -3390,36 +3371,25 @@ "@ethersproject/wordlists": "5.7.0" } }, - "node_modules/@sushiswap/router/node_modules/node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - } - }, "node_modules/@sushiswap/tines": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@sushiswap/tines/-/tines-1.0.5.tgz", - "integrity": "sha512-ZJEcaCsZ16THeSSucVG2MQ2HIkvBMI+VIBdRJd5CDdZJgZv00Jwhkm9o5qy/q0Ckb8fUzaOhuhlIBhoDd85B5Q==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@sushiswap/tines/-/tines-1.0.9.tgz", + "integrity": "sha512-P3r6VWT85yo4CJ1woX9i6aw9NADuNBFv8XllXaNoX24+TbkcSnlDwKzaoEyct2zHxF6sCT1A0NZwgfRph+BHOg==", "dependencies": { "@ethersproject/bignumber": "5.7.0", - "@sushiswap/currency": "0.0.5" + "@sushiswap/currency": "0.1.2" } }, "node_modules/@sushiswap/trident-core": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@sushiswap/trident-core/-/trident-core-1.0.4.tgz", - "integrity": "sha512-3ex7zXkv2LImfT7PMoWX49z+s89OoPhmv4LAEYrwrb6YQOVgtsMI+sHlEW6/fintQf/5qILL/RO4qD4VNEBPxg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@sushiswap/trident-core/-/trident-core-1.0.8.tgz", + "integrity": "sha512-0FCqu9/P/BnYZ1jME+PgEpbHSBQn8TY6N9izM2Jy4xpp0vFpI7HmO8wnycqzWcjT7xJ5uZC5XbSSKkjH7zP4gw==", "dependencies": { "@openzeppelin/contracts": "4.7.3", "@rari-capital/solmate": "6.2.0", "@sushiswap/bentobox": "1.0.1", - "@sushiswap/currency": "0.0.5", - "@sushiswap/hardhat-config": "0.1.2", + "@sushiswap/currency": "0.1.2", + "@sushiswap/hardhat-config": "0.1.3", "@sushiswap/types": "0.0.2" } }, @@ -3482,10 +3452,9 @@ } }, "node_modules/@sushiswap/trident-core/node_modules/@sushiswap/hardhat-config": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@sushiswap/hardhat-config/-/hardhat-config-0.1.2.tgz", - "integrity": "sha512-DcBKmueJqqixA1cZyI8wsv9HiWUkYAVQND3eo97ACyJO988JxEaNNVS0z5r+hAID5ltRxOgpruv4aCU/VPOYew==", - "hasInstallScript": true, + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@sushiswap/hardhat-config/-/hardhat-config-0.1.3.tgz", + "integrity": "sha512-lc+tPdmin2j3C/KtquoqsUZdQCIh7ibWThqfx0BMqixFwyBR3REp48JzN6hWmODKwQE8PKnYmldZ1GmZczKOMw==", "dependencies": { "@matterlabs/hardhat-zksync-deploy": "0.6.2", "@matterlabs/hardhat-zksync-solc": "0.3.14", @@ -3740,346 +3709,37 @@ "@wagmi/core": "0.10.11" } }, - "node_modules/@sushiswap/v2-core": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@sushiswap/v2-core/-/v2-core-1.0.4.tgz", - "integrity": "sha512-/OUlymSsyKHmAb3gkD2e+bmw6XSN0D4fpVNBfTGW1fxMziaK2BUUe4pM+ppLYy9cgmkwJ0SDRnsNybi3tZz1cQ==", - "dependencies": { - "@openzeppelin/contracts": "3.1.0", - "@sushiswap/chain": "0.1.1", - "@sushiswap/currency": "0.0.5", - "@sushiswap/hardhat-config": "0.1.2", - "@sushiswap/types": "0.0.2" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/@matterlabs/hardhat-zksync-deploy": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@matterlabs/hardhat-zksync-deploy/-/hardhat-zksync-deploy-0.6.2.tgz", - "integrity": "sha512-TRGbYXqFdLspaGRjNRWFcej0i8+OgYodDPFVRMg/3KJvC0QLViEEcBZ2cpBqC/R5fydsIql5KXe8ZVMz22AeqA==", - "dependencies": { - "chalk": "4.1.2" - }, - "peerDependencies": { - "ethers": "~5.7.2", - "hardhat": "^2.12.6", - "zksync-web3": "^0.13.4" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/@matterlabs/hardhat-zksync-deploy/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/@nomiclabs/hardhat-ethers": { - "name": "hardhat-deploy-ethers", - "version": "0.3.0-beta.13", - "resolved": "https://registry.npmjs.org/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.13.tgz", - "integrity": "sha512-PdWVcKB9coqWV1L7JTpfXRCI91Cgwsm7KLmBcwZ8f0COSm1xtABHZTyz3fvF6p42cTnz1VM0QnfDvMFlIRkSNw==", - "peerDependencies": { - "ethers": "^5.0.0", - "hardhat": "^2.0.0" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/@nomiclabs/hardhat-etherscan": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.3.tgz", - "integrity": "sha512-UeNO97j0lwOHqX7mrH6SfQQBdXq1Ng6eFr7uJKuQOrq2UVTWGD70lE5QO4fAFVPz9ao+xlNpMyIqSR7+OaDR+Q==", - "dependencies": { - "@ethersproject/abi": "^5.1.2", - "@ethersproject/address": "^5.0.2", - "cbor": "^8.1.0", - "chalk": "^2.4.2", - "debug": "^4.1.1", - "fs-extra": "^7.0.1", - "lodash": "^4.17.11", - "semver": "^6.3.0", - "table": "^6.8.0", - "undici": "^5.4.0" - }, - "peerDependencies": { - "hardhat": "^2.0.4" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/@openzeppelin/contracts": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.1.0.tgz", - "integrity": "sha512-dVXDnUKxrAKLzPdCRkz+N8qsVkK1XxJ6kk3zuI6zaQmcKxN7CkizoDP7lXxcs/Mi2I0mxceTRjJBqlzFffLJrQ==" - }, - "node_modules/@sushiswap/v2-core/node_modules/@sushiswap/hardhat-config": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@sushiswap/hardhat-config/-/hardhat-config-0.1.2.tgz", - "integrity": "sha512-DcBKmueJqqixA1cZyI8wsv9HiWUkYAVQND3eo97ACyJO988JxEaNNVS0z5r+hAID5ltRxOgpruv4aCU/VPOYew==", - "hasInstallScript": true, - "dependencies": { - "@matterlabs/hardhat-zksync-deploy": "0.6.2", - "@matterlabs/hardhat-zksync-solc": "0.3.14", - "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13", - "@nomiclabs/hardhat-etherscan": "3.1.3", - "@nomiclabs/hardhat-solhint": "2.0.1", - "@nomiclabs/hardhat-waffle": "2.0.3", - "@sushiswap/types": "0.0.2", - "@tenderly/hardhat-tenderly": "1.3.2", - "@typechain/ethers-v5": "10.1.1", - "@typechain/hardhat": "6.1.4", - "dotenv": "16.0.3", - "ethereum-waffle": "3.4.4", - "hardhat-deploy": "0.11.22", - "hardhat-deploy-ethers": "0.3.0-beta.13", - "typechain": "8.1.1" - }, - "peerDependencies": { - "ethers": "5.7.2", - "hardhat": "2.12.7" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/@typechain/ethers-v5": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.1.1.tgz", - "integrity": "sha512-o6nffJBxwmeX1ZiZpdnP/tqGd/7M7iYvQC88ZXaFFoyAGh7eYncynzVjOJV0XmaKzAc6puqyqZrnva+gJbk4sw==", - "dependencies": { - "lodash": "^4.17.15", - "ts-essentials": "^7.0.1" - }, - "peerDependencies": { - "@ethersproject/abi": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/providers": "^5.0.0", - "ethers": "^5.1.3", - "typechain": "^8.1.1", - "typescript": ">=4.3.0" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/@typechain/hardhat": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-6.1.4.tgz", - "integrity": "sha512-S8k5d1Rjc+plwKpkorlifmh72M7Ki0XNUOVVLtdbcA/vLaEkuqZSJFdddpBgS5QxiJP+6CbRa/yO6EVTE2+fMQ==", - "dependencies": { - "fs-extra": "^9.1.0" - }, - "peerDependencies": { - "@ethersproject/abi": "^5.4.7", - "@ethersproject/providers": "^5.4.7", - "@typechain/ethers-v5": "^10.1.1", - "ethers": "^5.4.7", - "hardhat": "^2.9.9", - "typechain": "^8.1.1" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/@typechain/hardhat/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/@sushiswap/v2-core/node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "peer": true, + "node_modules/@sushiswap/v2-sdk": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/@sushiswap/v2-sdk/-/v2-sdk-0.0.9.tgz", + "integrity": "sha512-5LavVghrvw1a4T+RoxoNTyULuGuMDuKU467074EwRmjRCAddiYMQwfD7wXFiHzzWDiBtHIYIWXrIKlFdUa/tbw==", "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" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/typechain": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.1.1.tgz", - "integrity": "sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ==", - "dependencies": { - "@types/prettier": "^2.1.1", - "debug": "^4.3.1", - "fs-extra": "^7.0.0", - "glob": "7.1.7", - "js-sha3": "^0.8.0", - "lodash": "^4.17.15", - "mkdirp": "^1.0.4", - "prettier": "^2.3.1", - "ts-command-line-args": "^2.2.0", - "ts-essentials": "^7.0.1" - }, - "bin": { - "typechain": "dist/cli/cli.js" - }, - "peerDependencies": { - "typescript": ">=4.3.0" - } - }, - "node_modules/@sushiswap/v2-core/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "engines": { - "node": ">= 10.0.0" + "@sushiswap/chain": "0.1.2", + "@sushiswap/currency": "0.1.2", + "@sushiswap/math": "0.1.0", + "tiny-invariant": "1.3.1", + "tiny-warning": "1.0.3", + "zod": "3.21.4" } }, "node_modules/@sushiswap/v3-sdk": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@sushiswap/v3-sdk/-/v3-sdk-1.0.5.tgz", - "integrity": "sha512-uyOx+MtxrYSeKpg//volAlZtdft9cTse1x/U1HW4ZYh7pK8huWb9WK8RNRA5Banx4oQra68fIYHPJmpqf8z7tA==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@sushiswap/v3-sdk/-/v3-sdk-1.0.10.tgz", + "integrity": "sha512-JLrjTEvdOgyDSzyZV0DJ5hWhI3C88j0ZAgbuldcz2CINFhqAslZ2yB+DIW4XjL9uJQ/K8uVXeVs1U1g6jJeONA==", "dependencies": { "@ethersproject/abi": "5.7.0", "@ethersproject/address": "5.7.0", "@ethersproject/bignumber": "5.7.0", "@ethersproject/solidity": "5.7.0", - "@sushiswap/amm": "0.1.8", - "@sushiswap/chain": "0.1.1", - "@sushiswap/currency": "0.0.5", + "@sushiswap/amm": "0.1.13", + "@sushiswap/chain": "0.1.2", + "@sushiswap/currency": "0.1.2", "@sushiswap/math": "0.1.0", - "@sushiswap/tines": "1.0.5", + "@sushiswap/tines": "1.0.9", "@uniswap/swap-router-contracts": "1.3.0", "@uniswap/v3-core": "1.0.1", "@uniswap/v3-periphery": "1.4.3", @@ -4090,11 +3750,11 @@ } }, "node_modules/@sushiswap/viem-config": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@sushiswap/viem-config/-/viem-config-1.0.1.tgz", - "integrity": "sha512-Wg72BCzElYETbGjf/Ep6DCK/kTDkh+SLCMjUCeiYGskPb21sFpNMmM1SJmj+I2cuiAY3VcZd9usHL88sCAtfYA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@sushiswap/viem-config/-/viem-config-1.0.2.tgz", + "integrity": "sha512-IpZ/vmgs67LeR4eqrfIF/Og/taFGD9NW3E12kzS2sFyJJ0uZQP/hpqLNtNmXTPg9oV6/JCtnTGL+6Ic0EUd+gA==", "dependencies": { - "@sushiswap/chain": "0.1.1" + "@sushiswap/chain": "0.1.2" }, "peerDependencies": { "viem": "*" @@ -4307,9 +3967,9 @@ } }, "node_modules/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "version": "3.4.36", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.36.tgz", + "integrity": "sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==", "peer": true, "dependencies": { "@types/node": "*" @@ -4483,9 +4143,9 @@ "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==" }, "node_modules/@types/trusted-types": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.3.tgz", - "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.4.tgz", + "integrity": "sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ==", "peer": true }, "node_modules/@types/underscore": { @@ -4886,9 +4546,9 @@ } }, "node_modules/@walletconnect/jsonrpc-ws-connection": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.11.tgz", - "integrity": "sha512-TiFJ6saasKXD+PwGkm5ZGSw0837nc6EeFmurSPgIT/NofnOV4Tv7CVJqGQN0rQYoJUSYu21cwHNYaFkzNpUN+w==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.13.tgz", + "integrity": "sha512-mfOM7uFH4lGtQxG+XklYuFBj6dwVvseTt5/ahOkkmpcAEgz2umuzu7fTR+h5EmjQBdrmYyEBOWADbeaFNxdySg==", "peer": true, "dependencies": { "@walletconnect/jsonrpc-utils": "^1.0.6", @@ -5358,13 +5018,11 @@ } }, "node_modules/agentkeepalive": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.3.0.tgz", - "integrity": "sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", "peer": true, "dependencies": { - "debug": "^4.1.0", - "depd": "^2.0.0", "humanize-ms": "^1.2.1" }, "engines": { @@ -5647,9 +5305,9 @@ } }, "node_modules/async-mutex/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true }, "node_modules/asynckit": { @@ -6788,9 +6446,9 @@ } }, "node_modules/cpu-features": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.8.tgz", - "integrity": "sha512-BbHBvtYhUhksqTjr6bhNOjGgMnhwhGTQmOoZGD+K7BCaQDCuZl/Ve1ZxUSMRwVC4D/rkCPQ2MAIeYzrWyK7eEg==", + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz", + "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==", "hasInstallScript": true, "optional": true, "dependencies": { @@ -6845,18 +6503,18 @@ "peer": true }, "node_modules/cross-fetch": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.6.tgz", - "integrity": "sha512-riRvo06crlE8HiqOwIpQhxwdOk4fOeR7FVM/wXoxchFEqMNUjvbs3bfo4OTgMEMHzppd4DxFBDbyySj8Cv781g==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "peer": true, "dependencies": { - "node-fetch": "^2.6.11" + "node-fetch": "^2.6.12" } }, "node_modules/cross-fetch/node_modules/node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "peer": true, "dependencies": { "whatwg-url": "^5.0.0" @@ -9092,9 +8750,9 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fast-redact": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.2.0.tgz", - "integrity": "sha512-zaTadChr+NekyzallAMXATXLOR8MNx3zqpZ0MUF2aGf4EathnG0f32VLODNlY8IuGY3HoRO2L6/6fSzNsLaHIw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz", + "integrity": "sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==", "peer": true, "engines": { "node": ">=6" @@ -19893,20 +19551,20 @@ } }, "node_modules/lit-element": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.2.tgz", - "integrity": "sha512-xXAeVWKGr4/njq0rGC9dethMnYCq5hpKYrgQZYTzawt9YQhMiXfD+T1RgrdY3NamOxwq2aXlb0vOI6e29CKgVQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", "peer": true, "dependencies": { "@lit-labs/ssr-dom-shim": "^1.1.0", "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.7.0" + "lit-html": "^2.8.0" } }, "node_modules/lit-html": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.7.4.tgz", - "integrity": "sha512-/Jw+FBpeEN+z8X6PJva5n7+0MzCVAH2yypN99qHYYkq8bI+j7I39GH+68Z/MZD6rGKDK9RpzBw7CocfmHfq6+g==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", "peer": true, "dependencies": { "@types/trusted-types": "^2.0.2" @@ -20520,9 +20178,9 @@ "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==" }, "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", "optional": true }, "node_modules/nanoid": { @@ -20599,6 +20257,17 @@ "semver": "bin/semver" } }, + "node_modules/node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, "node_modules/node-gyp-build": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", @@ -21350,9 +21019,9 @@ "hasInstallScript": true }, "node_modules/preact": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.15.1.tgz", - "integrity": "sha512-qs2ansoQEwzNiV5eAcRT1p1EC/dmEzaATVDJNiB3g2sRDWdA7b7MurXdJjB2+/WQktGWZwxvDrnuRFbWuIr64g==", + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", + "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==", "peer": true, "funding": { "type": "opencollective", @@ -21986,9 +21655,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "peer": true }, "node_modules/regexp.prototype.flags": { @@ -22304,9 +21973,9 @@ } }, "node_modules/rpc-websockets": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.5.1.tgz", - "integrity": "sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.6.0.tgz", + "integrity": "sha512-Jgcs8q6t8Go98dEulww1x7RysgTkzpCMelVxZW4hvuyFtOGpeUz9prpr2KjUa/usqxgFCd9Tu3+yhHEP9GVmiQ==", "peer": true, "dependencies": { "@babel/runtime": "^7.17.2", @@ -22324,9 +21993,9 @@ } }, "node_modules/rpc-websockets/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", + "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", "peer": true, "engines": { "node": ">=10.0.0" @@ -23034,9 +22703,9 @@ } }, "node_modules/solhint/node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -23116,9 +22785,9 @@ } }, "node_modules/solhint/node_modules/eslint/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -25490,17 +25159,17 @@ } }, "node_modules/viem": { - "version": "0.3.29", - "resolved": "https://registry.npmjs.org/viem/-/viem-0.3.29.tgz", - "integrity": "sha512-uFoEnUn4bEKneG2R2Ot2Jgk5LkMScPCanSZp0z5elqK5jFfgBKl7V5bJNL+EaPYKyxSa2A14rSE1IBVQHPYxlw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/viem/-/viem-1.0.2.tgz", + "integrity": "sha512-3Bn+CuInU8zsdKqqzFDWL018x4B9HDjPIISztReGcBjikY+04tP7CrQQCf1lbinK3wWrEoFU9VDiptCciNjUQA==", "dependencies": { "@adraffy/ens-normalize": "1.9.0", "@noble/curves": "1.0.0", "@noble/hashes": "1.3.0", "@scure/bip32": "1.3.0", "@scure/bip39": "1.2.0", - "@wagmi/chains": "0.2.16", - "abitype": "0.8.2", + "@wagmi/chains": "1.1.0", + "abitype": "0.8.7", "isomorphic-ws": "5.0.0", "ws": "8.12.0" } @@ -25531,9 +25200,9 @@ ] }, "node_modules/viem/node_modules/@wagmi/chains": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-0.2.16.tgz", - "integrity": "sha512-rkWaI2PxCnbD8G07ZZff5QXftnSkYL0h5f4DkHCG3fGYYr/ZDvmCL4bMae7j7A9sAif1csPPBmbCzHp3R5ogCQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-1.1.0.tgz", + "integrity": "sha512-pWZlxBk0Ql8E7DV8DwqlbBpOyUdaG9UDlQPBxJNALuEK1I0tbQ3AVvSDnlsEIt06UPmPo5o27gzs3hwPQ/A+UA==", "funding": [ { "type": "gitcoin", @@ -25545,7 +25214,7 @@ } ], "peerDependencies": { - "typescript": ">=4.9.4" + "typescript": ">=5.0.4" }, "peerDependenciesMeta": { "typescript": { @@ -25554,9 +25223,9 @@ } }, "node_modules/viem/node_modules/abitype": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.8.2.tgz", - "integrity": "sha512-B1ViNMGpfx/qjVQi0RTc2HEFHuR9uoCoTEkwELT5Y7pBPtBbctYijz9BK6+Kd0hQ3S70FhYTO2dWWk0QNUEXMA==", + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.8.7.tgz", + "integrity": "sha512-wQ7hV8Yg/yKmGyFpqrNZufCxbszDe5es4AZGYPBitocfSqXtjrTG9JMWFcc4N30ukl2ve48aBTwt7NJxVQdU3w==", "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.19.1" @@ -26049,9 +25718,9 @@ } }, "node_modules/zustand": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.3.8.tgz", - "integrity": "sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.4.1.tgz", + "integrity": "sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw==", "peer": true, "dependencies": { "use-sync-external-store": "1.2.0" @@ -26060,10 +25729,14 @@ "node": ">=12.7.0" }, "peerDependencies": { + "@types/react": ">=16.8", "immer": ">=9.0", "react": ">=16.8" }, "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, "immer": { "optional": true }, @@ -26080,25 +25753,26 @@ "integrity": "sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==" }, "@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "requires": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==" + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.15.tgz", + "integrity": "sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==" }, "@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", + "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", "requires": { "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, @@ -26109,12 +25783,12 @@ "dev": true }, "@babel/runtime": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", - "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", + "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", "peer": true, "requires": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" } }, "@balena/dockerignore": { @@ -26123,9 +25797,9 @@ "integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==" }, "@coinbase/wallet-sdk": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.7.1.tgz", - "integrity": "sha512-LjyoDCB+7p0waQXfK+fUgcAs3Ezk6S6e+LYaoFjpJ6c9VTop3NyZF40Pi7df4z7QJohCwzuIDjz0Rhtig6Y7Pg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.7.2.tgz", + "integrity": "sha512-lIGvXMsgpsQWci/XOMQIJ2nIZ8JUy/L+bvC0wkRaYarr0YylwpXrJ2gRM3hCXPS477pkyO7N/kSiAoRgEXUdJQ==", "peer": true, "requires": { "@metamask/safe-event-emitter": "2.0.0", @@ -27073,9 +26747,9 @@ } }, "@ledgerhq/connect-kit-loader": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.0.tgz", - "integrity": "sha512-HUy12FEczoWY2FPubnsm1uOA8tkVWc0j90i47suThV3C9NL2xx69ZAIEU3Ytzs2bwLek9S1Q2S1VQJvA+3Ygkg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.2.tgz", + "integrity": "sha512-mscwGroSJQrCTjtNGBu+18FQbZYA4+q6Tyx6K7CXHl6AwgZKbWfZYdgP2F+fyZcRUdGRsMX8QtvU61VcGGtO1A==", "peer": true }, "@lit-labs/ssr-dom-shim": { @@ -27085,9 +26759,9 @@ "peer": true }, "@lit/reactive-element": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.2.tgz", - "integrity": "sha512-rDfl+QnCYjuIGf5xI2sVJWdYIi56CTCwWa+nidKYX6oIuBYwUbT/vX4qbUDlHiZKJ/3FRNQ/tWJui44p6/stSA==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", + "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", "peer": true, "requires": { "@lit-labs/ssr-dom-shim": "^1.0.0" @@ -27217,9 +26891,9 @@ } }, "semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "peer": true, "requires": { "lru-cache": "^6.0.0" @@ -27252,9 +26926,9 @@ }, "dependencies": { "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true } } @@ -27274,9 +26948,9 @@ }, "dependencies": { "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true } } @@ -27292,9 +26966,9 @@ }, "dependencies": { "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true } } @@ -27311,9 +26985,9 @@ }, "dependencies": { "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true } } @@ -27329,9 +27003,9 @@ }, "dependencies": { "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true } } @@ -27354,9 +27028,9 @@ }, "dependencies": { "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true } } @@ -27372,26 +27046,26 @@ }, "dependencies": { "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true } } }, "@noble/curves": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", - "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", "peer": true, "requires": { - "@noble/hashes": "1.3.1" + "@noble/hashes": "1.3.2" } }, "@noble/hashes": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", - "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==" }, "@noble/secp256k1": { "version": "1.7.1", @@ -27759,14 +27433,6 @@ "through": ">=2.2.7 <3" } }, - "node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, "pump": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", @@ -28125,13 +27791,10 @@ } }, "@safe-global/safe-gateway-typescript-sdk": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.7.3.tgz", - "integrity": "sha512-O6JCgXNZWG0Vv8FnOEjKfcbsP0WxGvoPJk5ufqUrsyBlHup16It6oaLnn+25nXFLBZOHI1bz8429JlqAc2t2hg==", - "peer": true, - "requires": { - "cross-fetch": "^3.1.5" - } + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.12.0.tgz", + "integrity": "sha512-hExCo62lScVC9/ztVqYEYL2pFxcqLTvB8fj0WtdP5FWrvbtEgD0pbVolchzD5bf85pbzvEwdAxSVS7EdCZxTNw==", + "peer": true }, "@scure/base": { "version": "1.1.1", @@ -28256,32 +27919,32 @@ } }, "@solana/web3.js": { - "version": "1.77.3", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.77.3.tgz", - "integrity": "sha512-PHaO0BdoiQRPpieC1p31wJsBaxwIOWLh8j2ocXNKX8boCQVldt26Jqm2tZE4KlrvnCIV78owPLv1pEUgqhxZ3w==", + "version": "1.78.5", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.78.5.tgz", + "integrity": "sha512-2ZHsDNqkKdglJQrIvJ3p2DmgS3cGnary3VJyqt9C1SPrpAtLYzcElr3xyXJOznyQTU/8AMw+GoF11lFoKbicKg==", "peer": true, "requires": { - "@babel/runtime": "^7.12.5", + "@babel/runtime": "^7.22.6", "@noble/curves": "^1.0.0", - "@noble/hashes": "^1.3.0", + "@noble/hashes": "^1.3.1", "@solana/buffer-layout": "^4.0.0", - "agentkeepalive": "^4.2.1", + "agentkeepalive": "^4.3.0", "bigint-buffer": "^1.1.5", - "bn.js": "^5.0.0", + "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.0", - "node-fetch": "^2.6.7", + "node-fetch": "^2.6.12", "rpc-websockets": "^7.5.1", "superstruct": "^0.14.2" }, "dependencies": { "node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "peer": true, "requires": { "whatwg-url": "^5.0.0" @@ -28468,21 +28131,21 @@ "integrity": "sha512-J4zWyfZdFiDIBa28MV/yYmr9nmWDqX8CXVfUoLfg48RVUyqPsu57dKtEKiBqAO/xpl7d9ZciNcya0d09NXvm8w==" }, "@sushiswap/amm": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@sushiswap/amm/-/amm-0.1.8.tgz", - "integrity": "sha512-rlrg8gK9DBFESR4PcK6Lr/KR+B0ED22Svnk9FPWISyVdPMk2LqRfr9tvSVkjry8OfaYGrMLA9p6HNj8u3cDnGw==", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/@sushiswap/amm/-/amm-0.1.13.tgz", + "integrity": "sha512-DADqfPmFXJ8jeg1GmdrKRvz2liCAKZM00uoNgouBonK0dyLcyxxBNkr2HEsaLv4PPmE+sx3xHAP5bKY2sb/DeQ==", "requires": { "@ethersproject/abi": "5.7.0", "@ethersproject/address": "5.7.0", "@ethersproject/bignumber": "5.7.0", "@ethersproject/solidity": "5.7.0", - "@sushiswap/chain": "0.1.1", - "@sushiswap/currency": "0.0.5", + "@sushiswap/chain": "0.1.2", + "@sushiswap/currency": "0.1.2", "@sushiswap/math": "0.1.0", - "@sushiswap/tines": "1.0.5", - "@sushiswap/trident-core": "1.0.4", + "@sushiswap/tines": "1.0.9", + "@sushiswap/trident-core": "1.0.8", "@sushiswap/types": "0.0.2", - "@sushiswap/v2-core": "1.0.4", + "@sushiswap/v2-sdk": "0.0.9", "tiny-invariant": "1.3.1", "tiny-warning": "1.0.3", "zod": "3.21.4" @@ -28494,18 +28157,18 @@ "integrity": "sha512-Wg3QVWie0YIVHch0oE0y6Dy+qpX/e5fsiF0MSaXgYNhTki1Uc5IPTcJ2wCISbkMjDpEP+HiLWivftNdc7gc+aw==" }, "@sushiswap/chain": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@sushiswap/chain/-/chain-0.1.1.tgz", - "integrity": "sha512-P5C4mhgWd1v4ulDYRE+q4Uajw+X6JWTBpuGQ2KEToojrElUeTLQxa0dreodQ4wcFta/M5cFRmtmk3jgPOU1hVQ==" + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@sushiswap/chain/-/chain-0.1.2.tgz", + "integrity": "sha512-A0S5fYxYxUZu3UQj3AwekCRgjDQ8hzLRjc1p9XwV9i+0r9ZxAdXafWFrpQufDoXS0lfKd/4XiFh50LsbhvWA8A==" }, "@sushiswap/currency": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@sushiswap/currency/-/currency-0.0.5.tgz", - "integrity": "sha512-CKPAnh8NaTKPnMJvMr1XpGatQpE6QSCroaYPc/45MHrut8yWLEAeUTDMC0smRiorzugXQ8Ix4h+KSMhjj1vnlw==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@sushiswap/currency/-/currency-0.1.2.tgz", + "integrity": "sha512-GoJby3yURGkNY6wY2Ta45EeY8wR6AuQkUO/96eqLEYrshERrnTAlruNqSJlPINMNhXrv/QusRL/CdAy13VPneg==", "requires": { "@ethersproject/address": "5.7.0", "@ethersproject/units": "^5.7.0", - "@sushiswap/chain": "0.1.1", + "@sushiswap/chain": "0.1.2", "@sushiswap/math": "0.1.0", "lodash.flatmap": "4.5.0", "tiny-invariant": "1.3.1", @@ -28534,33 +28197,33 @@ } }, "@sushiswap/router": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@sushiswap/router/-/router-0.0.8.tgz", - "integrity": "sha512-Uf8VJ8aAqIMPQRbt3nTu8g0Ti9NB0JnOrHebAR68QC+P7FUOpSENvGLTojb/px0qfK3H1/Xe6fkmInnGFALd/Q==", + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/@sushiswap/router/-/router-0.0.13.tgz", + "integrity": "sha512-S9wm4TbghkZq48nc+e2ETa484vg4/Kr8rprUY3qdqweoPtS/Po0oIh5seXPrHUSi29KaERnxjkDk2W62SBB6oQ==", "requires": { "@ethersproject/abi": "5.7.0", "@ethersproject/address": "5.7.0", "@ethersproject/bignumber": "5.7.0", "@ethersproject/solidity": "5.7.0", "@sushiswap/abi": "0.0.1", - "@sushiswap/amm": "0.1.8", + "@sushiswap/amm": "0.1.13", "@sushiswap/bentobox": "1.0.1", - "@sushiswap/chain": "0.1.1", - "@sushiswap/currency": "0.0.5", + "@sushiswap/chain": "0.1.2", + "@sushiswap/currency": "0.1.2", "@sushiswap/math": "0.1.0", - "@sushiswap/router-config": "1.0.0", - "@sushiswap/tines": "1.0.5", - "@sushiswap/trident-core": "1.0.4", - "@sushiswap/v2-core": "1.0.4", - "@sushiswap/v3-sdk": "1.0.5", - "@sushiswap/viem-config": "1.0.1", + "@sushiswap/router-config": "2.0.0", + "@sushiswap/tines": "1.0.9", + "@sushiswap/trident-core": "1.0.8", + "@sushiswap/v2-sdk": "0.0.9", + "@sushiswap/v3-sdk": "1.0.10", + "@sushiswap/viem-config": "1.0.2", "date-fns": "2.29.3", "ethers": "5.7.2", "lodash.flatmap": "^4.5.0", "node-fetch": "2.6.6", "tiny-invariant": "1.3.1", "tiny-warning": "1.0.3", - "viem": "0.3.29", + "viem": "1.0.2", "zod": "3.21.4" }, "dependencies": { @@ -28600,42 +28263,34 @@ "@ethersproject/web": "5.7.1", "@ethersproject/wordlists": "5.7.0" } - }, - "node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", - "requires": { - "whatwg-url": "^5.0.0" - } } } }, "@sushiswap/router-config": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@sushiswap/router-config/-/router-config-1.0.0.tgz", - "integrity": "sha512-mSifisbE2OwgQDFOEVRJ54jFqepIQxTLMY+5a1GT1mgkj2MiyCNUgGc1iLowv6Gkg8/3lnIREJHYvJT2DSC1PQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sushiswap/router-config/-/router-config-2.0.0.tgz", + "integrity": "sha512-cVN20sur3EbC4GTxywuCVPovhXcuBh7hUMSFyhYhOQxhQGbvlPYot/+PX77UpYviTsJOTdo+ov2LyMT5AGdTHA==", "requires": {} }, "@sushiswap/tines": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@sushiswap/tines/-/tines-1.0.5.tgz", - "integrity": "sha512-ZJEcaCsZ16THeSSucVG2MQ2HIkvBMI+VIBdRJd5CDdZJgZv00Jwhkm9o5qy/q0Ckb8fUzaOhuhlIBhoDd85B5Q==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@sushiswap/tines/-/tines-1.0.9.tgz", + "integrity": "sha512-P3r6VWT85yo4CJ1woX9i6aw9NADuNBFv8XllXaNoX24+TbkcSnlDwKzaoEyct2zHxF6sCT1A0NZwgfRph+BHOg==", "requires": { "@ethersproject/bignumber": "5.7.0", - "@sushiswap/currency": "0.0.5" + "@sushiswap/currency": "0.1.2" } }, "@sushiswap/trident-core": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@sushiswap/trident-core/-/trident-core-1.0.4.tgz", - "integrity": "sha512-3ex7zXkv2LImfT7PMoWX49z+s89OoPhmv4LAEYrwrb6YQOVgtsMI+sHlEW6/fintQf/5qILL/RO4qD4VNEBPxg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@sushiswap/trident-core/-/trident-core-1.0.8.tgz", + "integrity": "sha512-0FCqu9/P/BnYZ1jME+PgEpbHSBQn8TY6N9izM2Jy4xpp0vFpI7HmO8wnycqzWcjT7xJ5uZC5XbSSKkjH7zP4gw==", "requires": { "@openzeppelin/contracts": "4.7.3", "@rari-capital/solmate": "6.2.0", "@sushiswap/bentobox": "1.0.1", - "@sushiswap/currency": "0.0.5", - "@sushiswap/hardhat-config": "0.1.2", + "@sushiswap/currency": "0.1.2", + "@sushiswap/hardhat-config": "0.1.3", "@sushiswap/types": "0.0.2" }, "dependencies": { @@ -28682,9 +28337,9 @@ } }, "@sushiswap/hardhat-config": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@sushiswap/hardhat-config/-/hardhat-config-0.1.2.tgz", - "integrity": "sha512-DcBKmueJqqixA1cZyI8wsv9HiWUkYAVQND3eo97ACyJO988JxEaNNVS0z5r+hAID5ltRxOgpruv4aCU/VPOYew==", + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@sushiswap/hardhat-config/-/hardhat-config-0.1.3.tgz", + "integrity": "sha512-lc+tPdmin2j3C/KtquoqsUZdQCIh7ibWThqfx0BMqixFwyBR3REp48JzN6hWmODKwQE8PKnYmldZ1GmZczKOMw==", "requires": { "@matterlabs/hardhat-zksync-deploy": "0.6.2", "@matterlabs/hardhat-zksync-solc": "0.3.14", @@ -28867,259 +28522,37 @@ "integrity": "sha512-Aa4MnBFq/SK/F4zZlRXNpLcqza2RsE0mLxxv4+8an1Dtr7l26lyWd+3PbVrtv1bA7OVmBXoqJhTrQKA8w3zEPA==", "requires": {} }, - "@sushiswap/v2-core": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@sushiswap/v2-core/-/v2-core-1.0.4.tgz", - "integrity": "sha512-/OUlymSsyKHmAb3gkD2e+bmw6XSN0D4fpVNBfTGW1fxMziaK2BUUe4pM+ppLYy9cgmkwJ0SDRnsNybi3tZz1cQ==", + "@sushiswap/v2-sdk": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/@sushiswap/v2-sdk/-/v2-sdk-0.0.9.tgz", + "integrity": "sha512-5LavVghrvw1a4T+RoxoNTyULuGuMDuKU467074EwRmjRCAddiYMQwfD7wXFiHzzWDiBtHIYIWXrIKlFdUa/tbw==", "requires": { - "@openzeppelin/contracts": "3.1.0", - "@sushiswap/chain": "0.1.1", - "@sushiswap/currency": "0.0.5", - "@sushiswap/hardhat-config": "0.1.2", - "@sushiswap/types": "0.0.2" - }, - "dependencies": { - "@matterlabs/hardhat-zksync-deploy": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@matterlabs/hardhat-zksync-deploy/-/hardhat-zksync-deploy-0.6.2.tgz", - "integrity": "sha512-TRGbYXqFdLspaGRjNRWFcej0i8+OgYodDPFVRMg/3KJvC0QLViEEcBZ2cpBqC/R5fydsIql5KXe8ZVMz22AeqA==", - "requires": { - "chalk": "4.1.2" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } - } - }, - "@nomiclabs/hardhat-ethers": { - "version": "npm:hardhat-deploy-ethers@0.3.0-beta.13", - "resolved": "https://registry.npmjs.org/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.13.tgz", - "integrity": "sha512-PdWVcKB9coqWV1L7JTpfXRCI91Cgwsm7KLmBcwZ8f0COSm1xtABHZTyz3fvF6p42cTnz1VM0QnfDvMFlIRkSNw==", - "requires": {} - }, - "@nomiclabs/hardhat-etherscan": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.3.tgz", - "integrity": "sha512-UeNO97j0lwOHqX7mrH6SfQQBdXq1Ng6eFr7uJKuQOrq2UVTWGD70lE5QO4fAFVPz9ao+xlNpMyIqSR7+OaDR+Q==", - "requires": { - "@ethersproject/abi": "^5.1.2", - "@ethersproject/address": "^5.0.2", - "cbor": "^8.1.0", - "chalk": "^2.4.2", - "debug": "^4.1.1", - "fs-extra": "^7.0.1", - "lodash": "^4.17.11", - "semver": "^6.3.0", - "table": "^6.8.0", - "undici": "^5.4.0" - } - }, - "@openzeppelin/contracts": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.1.0.tgz", - "integrity": "sha512-dVXDnUKxrAKLzPdCRkz+N8qsVkK1XxJ6kk3zuI6zaQmcKxN7CkizoDP7lXxcs/Mi2I0mxceTRjJBqlzFffLJrQ==" - }, - "@sushiswap/hardhat-config": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@sushiswap/hardhat-config/-/hardhat-config-0.1.2.tgz", - "integrity": "sha512-DcBKmueJqqixA1cZyI8wsv9HiWUkYAVQND3eo97ACyJO988JxEaNNVS0z5r+hAID5ltRxOgpruv4aCU/VPOYew==", - "requires": { - "@matterlabs/hardhat-zksync-deploy": "0.6.2", - "@matterlabs/hardhat-zksync-solc": "0.3.14", - "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13", - "@nomiclabs/hardhat-etherscan": "3.1.3", - "@nomiclabs/hardhat-solhint": "2.0.1", - "@nomiclabs/hardhat-waffle": "2.0.3", - "@sushiswap/types": "0.0.2", - "@tenderly/hardhat-tenderly": "1.3.2", - "@typechain/ethers-v5": "10.1.1", - "@typechain/hardhat": "6.1.4", - "dotenv": "16.0.3", - "ethereum-waffle": "3.4.4", - "hardhat-deploy": "0.11.22", - "hardhat-deploy-ethers": "0.3.0-beta.13", - "typechain": "8.1.1" - } - }, - "@typechain/ethers-v5": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.1.1.tgz", - "integrity": "sha512-o6nffJBxwmeX1ZiZpdnP/tqGd/7M7iYvQC88ZXaFFoyAGh7eYncynzVjOJV0XmaKzAc6puqyqZrnva+gJbk4sw==", - "requires": { - "lodash": "^4.17.15", - "ts-essentials": "^7.0.1" - } - }, - "@typechain/hardhat": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-6.1.4.tgz", - "integrity": "sha512-S8k5d1Rjc+plwKpkorlifmh72M7Ki0XNUOVVLtdbcA/vLaEkuqZSJFdddpBgS5QxiJP+6CbRa/yO6EVTE2+fMQ==", - "requires": { - "fs-extra": "^9.1.0" - }, - "dependencies": { - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - } - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" - }, - "ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "peer": true, - "requires": { - "@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" - } - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "typechain": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.1.1.tgz", - "integrity": "sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ==", - "requires": { - "@types/prettier": "^2.1.1", - "debug": "^4.3.1", - "fs-extra": "^7.0.0", - "glob": "7.1.7", - "js-sha3": "^0.8.0", - "lodash": "^4.17.15", - "mkdirp": "^1.0.4", - "prettier": "^2.3.1", - "ts-command-line-args": "^2.2.0", - "ts-essentials": "^7.0.1" - } - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - } + "@ethersproject/abi": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@sushiswap/chain": "0.1.2", + "@sushiswap/currency": "0.1.2", + "@sushiswap/math": "0.1.0", + "tiny-invariant": "1.3.1", + "tiny-warning": "1.0.3", + "zod": "3.21.4" } }, "@sushiswap/v3-sdk": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@sushiswap/v3-sdk/-/v3-sdk-1.0.5.tgz", - "integrity": "sha512-uyOx+MtxrYSeKpg//volAlZtdft9cTse1x/U1HW4ZYh7pK8huWb9WK8RNRA5Banx4oQra68fIYHPJmpqf8z7tA==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@sushiswap/v3-sdk/-/v3-sdk-1.0.10.tgz", + "integrity": "sha512-JLrjTEvdOgyDSzyZV0DJ5hWhI3C88j0ZAgbuldcz2CINFhqAslZ2yB+DIW4XjL9uJQ/K8uVXeVs1U1g6jJeONA==", "requires": { "@ethersproject/abi": "5.7.0", "@ethersproject/address": "5.7.0", "@ethersproject/bignumber": "5.7.0", "@ethersproject/solidity": "5.7.0", - "@sushiswap/amm": "0.1.8", - "@sushiswap/chain": "0.1.1", - "@sushiswap/currency": "0.0.5", + "@sushiswap/amm": "0.1.13", + "@sushiswap/chain": "0.1.2", + "@sushiswap/currency": "0.1.2", "@sushiswap/math": "0.1.0", - "@sushiswap/tines": "1.0.5", + "@sushiswap/tines": "1.0.9", "@uniswap/swap-router-contracts": "1.3.0", "@uniswap/v3-core": "1.0.1", "@uniswap/v3-periphery": "1.4.3", @@ -29130,11 +28563,11 @@ } }, "@sushiswap/viem-config": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@sushiswap/viem-config/-/viem-config-1.0.1.tgz", - "integrity": "sha512-Wg72BCzElYETbGjf/Ep6DCK/kTDkh+SLCMjUCeiYGskPb21sFpNMmM1SJmj+I2cuiAY3VcZd9usHL88sCAtfYA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@sushiswap/viem-config/-/viem-config-1.0.2.tgz", + "integrity": "sha512-IpZ/vmgs67LeR4eqrfIF/Og/taFGD9NW3E12kzS2sFyJJ0uZQP/hpqLNtNmXTPg9oV6/JCtnTGL+6Ic0EUd+gA==", "requires": { - "@sushiswap/chain": "0.1.1" + "@sushiswap/chain": "0.1.2" } }, "@tenderly/hardhat-tenderly": { @@ -29308,9 +28741,9 @@ } }, "@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "version": "3.4.36", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.36.tgz", + "integrity": "sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==", "peer": true, "requires": { "@types/node": "*" @@ -29483,9 +28916,9 @@ "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==" }, "@types/trusted-types": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.3.tgz", - "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.4.tgz", + "integrity": "sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ==", "peer": true }, "@types/underscore": { @@ -29792,9 +29225,9 @@ } }, "@walletconnect/jsonrpc-ws-connection": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.11.tgz", - "integrity": "sha512-TiFJ6saasKXD+PwGkm5ZGSw0837nc6EeFmurSPgIT/NofnOV4Tv7CVJqGQN0rQYoJUSYu21cwHNYaFkzNpUN+w==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.13.tgz", + "integrity": "sha512-mfOM7uFH4lGtQxG+XklYuFBj6dwVvseTt5/ahOkkmpcAEgz2umuzu7fTR+h5EmjQBdrmYyEBOWADbeaFNxdySg==", "peer": true, "requires": { "@walletconnect/jsonrpc-utils": "^1.0.6", @@ -30189,13 +29622,11 @@ } }, "agentkeepalive": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.3.0.tgz", - "integrity": "sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", "peer": true, "requires": { - "debug": "^4.1.0", - "depd": "^2.0.0", "humanize-ms": "^1.2.1" } }, @@ -30412,9 +29843,9 @@ }, "dependencies": { "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "peer": true } } @@ -31317,9 +30748,9 @@ } }, "cpu-features": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.8.tgz", - "integrity": "sha512-BbHBvtYhUhksqTjr6bhNOjGgMnhwhGTQmOoZGD+K7BCaQDCuZl/Ve1ZxUSMRwVC4D/rkCPQ2MAIeYzrWyK7eEg==", + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz", + "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==", "optional": true, "requires": { "buildcheck": "~0.0.6", @@ -31364,18 +30795,18 @@ "peer": true }, "cross-fetch": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.6.tgz", - "integrity": "sha512-riRvo06crlE8HiqOwIpQhxwdOk4fOeR7FVM/wXoxchFEqMNUjvbs3bfo4OTgMEMHzppd4DxFBDbyySj8Cv781g==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "peer": true, "requires": { - "node-fetch": "^2.6.11" + "node-fetch": "^2.6.12" }, "dependencies": { "node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "peer": true, "requires": { "whatwg-url": "^5.0.0" @@ -33116,9 +32547,9 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "fast-redact": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.2.0.tgz", - "integrity": "sha512-zaTadChr+NekyzallAMXATXLOR8MNx3zqpZ0MUF2aGf4EathnG0f32VLODNlY8IuGY3HoRO2L6/6fSzNsLaHIw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz", + "integrity": "sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==", "peer": true }, "fast-safe-stringify": { @@ -41144,20 +40575,20 @@ } }, "lit-element": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.2.tgz", - "integrity": "sha512-xXAeVWKGr4/njq0rGC9dethMnYCq5hpKYrgQZYTzawt9YQhMiXfD+T1RgrdY3NamOxwq2aXlb0vOI6e29CKgVQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", "peer": true, "requires": { "@lit-labs/ssr-dom-shim": "^1.1.0", "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.7.0" + "lit-html": "^2.8.0" } }, "lit-html": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.7.4.tgz", - "integrity": "sha512-/Jw+FBpeEN+z8X6PJva5n7+0MzCVAH2yypN99qHYYkq8bI+j7I39GH+68Z/MZD6rGKDK9RpzBw7CocfmHfq6+g==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", "peer": true, "requires": { "@types/trusted-types": "^2.0.2" @@ -41640,9 +41071,9 @@ "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==" }, "nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", "optional": true }, "nanoid": { @@ -41709,6 +41140,14 @@ } } }, + "node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, "node-gyp-build": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", @@ -42263,9 +41702,9 @@ "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==" }, "preact": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.15.1.tgz", - "integrity": "sha512-qs2ansoQEwzNiV5eAcRT1p1EC/dmEzaATVDJNiB3g2sRDWdA7b7MurXdJjB2+/WQktGWZwxvDrnuRFbWuIr64g==", + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", + "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==", "peer": true }, "prelude-ls": { @@ -42744,9 +42183,9 @@ } }, "regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "peer": true }, "regexp.prototype.flags": { @@ -42979,9 +42418,9 @@ } }, "rpc-websockets": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.5.1.tgz", - "integrity": "sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.6.0.tgz", + "integrity": "sha512-Jgcs8q6t8Go98dEulww1x7RysgTkzpCMelVxZW4hvuyFtOGpeUz9prpr2KjUa/usqxgFCd9Tu3+yhHEP9GVmiQ==", "peer": true, "requires": { "@babel/runtime": "^7.17.2", @@ -42993,9 +42432,9 @@ }, "dependencies": { "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", + "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", "peer": true, "requires": {} } @@ -43530,9 +42969,9 @@ }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" } } }, @@ -43585,9 +43024,9 @@ }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" } } }, @@ -45445,17 +44884,17 @@ } }, "viem": { - "version": "0.3.29", - "resolved": "https://registry.npmjs.org/viem/-/viem-0.3.29.tgz", - "integrity": "sha512-uFoEnUn4bEKneG2R2Ot2Jgk5LkMScPCanSZp0z5elqK5jFfgBKl7V5bJNL+EaPYKyxSa2A14rSE1IBVQHPYxlw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/viem/-/viem-1.0.2.tgz", + "integrity": "sha512-3Bn+CuInU8zsdKqqzFDWL018x4B9HDjPIISztReGcBjikY+04tP7CrQQCf1lbinK3wWrEoFU9VDiptCciNjUQA==", "requires": { "@adraffy/ens-normalize": "1.9.0", "@noble/curves": "1.0.0", "@noble/hashes": "1.3.0", "@scure/bip32": "1.3.0", "@scure/bip39": "1.2.0", - "@wagmi/chains": "0.2.16", - "abitype": "0.8.2", + "@wagmi/chains": "1.1.0", + "abitype": "0.8.7", "isomorphic-ws": "5.0.0", "ws": "8.12.0" }, @@ -45474,15 +44913,15 @@ "integrity": "sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==" }, "@wagmi/chains": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-0.2.16.tgz", - "integrity": "sha512-rkWaI2PxCnbD8G07ZZff5QXftnSkYL0h5f4DkHCG3fGYYr/ZDvmCL4bMae7j7A9sAif1csPPBmbCzHp3R5ogCQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@wagmi/chains/-/chains-1.1.0.tgz", + "integrity": "sha512-pWZlxBk0Ql8E7DV8DwqlbBpOyUdaG9UDlQPBxJNALuEK1I0tbQ3AVvSDnlsEIt06UPmPo5o27gzs3hwPQ/A+UA==", "requires": {} }, "abitype": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.8.2.tgz", - "integrity": "sha512-B1ViNMGpfx/qjVQi0RTc2HEFHuR9uoCoTEkwELT5Y7pBPtBbctYijz9BK6+Kd0hQ3S70FhYTO2dWWk0QNUEXMA==", + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-0.8.7.tgz", + "integrity": "sha512-wQ7hV8Yg/yKmGyFpqrNZufCxbszDe5es4AZGYPBitocfSqXtjrTG9JMWFcc4N30ukl2ve48aBTwt7NJxVQdU3w==", "requires": {} }, "isomorphic-ws": { @@ -45830,9 +45269,9 @@ "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==" }, "zustand": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.3.8.tgz", - "integrity": "sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.4.1.tgz", + "integrity": "sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw==", "peer": true, "requires": { "use-sync-external-store": "1.2.0" diff --git a/package.json b/package.json index 6ceb71c1..35511392 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "lint-fix": "eslint ./src ./test ./arb-bot.js --fix" }, "dependencies": { - "@sushiswap/router": "^0.0.8", + "@sushiswap/router": "^0.0.13", "axios": "^1.3.4", "commander": "^11.0.0", "dotenv": "^16.0.3", diff --git a/src/curve.js b/src/curve.js index bee4001f..f96e49ab 100644 --- a/src/curve.js +++ b/src/curve.js @@ -295,7 +295,7 @@ const curveClear = async( ); const report = []; - const dataFetcher = getDataFetcher(config, processLps(config.lps)); + const dataFetcher = getDataFetcher(config, processLps(config.lps), !!config.usePublicRpc); for (let i = 0; i < bundledOrders.length; i++) { try { gasPrice = await signer.provider.getGasPrice(); @@ -665,7 +665,6 @@ const curveClear = async( console.log(error); } } - dataFetcher.stopDataFetching(); return report; }; diff --git a/src/index.js b/src/index.js index 1c7c3c00..c7e2ee01 100644 --- a/src/index.js +++ b/src/index.js @@ -43,7 +43,11 @@ const configOptions = { /** * Maximize maxIORatio for "srouter" mode */ - maxRatio: false + maxRatio: false, + /** + * Option to fallback to public rpcs + */ + usePublicRpcs: false }; /** @@ -181,6 +185,7 @@ const getConfig = async( config.monthlyRatelimit = options?.monthlyRatelimit; config.maxProfit = !!options?.maxProfit; config.maxRatio = !!options?.maxRatio; + config.usePublicRpcs = !!options?.usePublicRpcs; return config; }; diff --git a/src/router.js b/src/router.js index 1c83e6ed..c68e21ef 100644 --- a/src/router.js +++ b/src/router.js @@ -19,12 +19,12 @@ const { * bundled orders based on the best deals * * @param {any[]} bundledOrders - The bundled orders array - * @param {string[]} lps - The list of liquidity providers + * @param {any} dataFetcher - The DataFetcher instance * @param {any} config - The network config data * @param {ethers.BigNumber} gasPrice - The network gas price * @param {boolean} sort - (optional) Sort based on best deals or not */ -const prepare = async(bundledOrders, lps, config, gasPrice, sort = true) => { +const prepare = async(bundledOrders, dataFetcher, config, gasPrice, sort = true) => { for (let i = 0; i < bundledOrders.length; i++) { const bOrder = bundledOrders[i]; const pair = bOrder.buyTokenSymbol + "/" + bOrder.sellTokenSymbol; @@ -41,7 +41,6 @@ const prepare = async(bundledOrders, lps, config, gasPrice, sort = true) => { address: bOrder.buyToken, symbol: bOrder.buyTokenSymbol }); - const dataFetcher = getDataFetcher(config, lps); await fetchPoolsForTokenWrapper(dataFetcher, fromToken, toToken); const pcMap = dataFetcher.getCurrentPoolCodeMap(fromToken, toToken); const route = Router.findBestRoute( @@ -61,7 +60,6 @@ const prepare = async(bundledOrders, lps, config, gasPrice, sort = true) => { // const price = rateFixed.mul("1" + "0".repeat(18)).div(cumulativeAmountFixed); const price = route.amountOutBN.mul("1" + "0".repeat(18 - bOrder.buyTokenDecimals)); bOrder.initPrice = price; - bOrder.dataFetcher = dataFetcher; console.log(`Current market price for ${pair} for: ${ethers.utils.formatEther(price)}`); console.log("Current ratio of the orders in this token pair:"); @@ -115,7 +113,7 @@ const routerClear = async( if (typeof prioritization !== "boolean") throw "invalid value for 'prioritization'"; const lps = processLps(config.lps); - const dataFetcher = getDataFetcher(config, lps); + const dataFetcher = getDataFetcher(config, lps, !!config.usePublicRpc); const signer = config.signer; const arbAddress = config.arbAddress; const orderbookAddress = config.orderbookAddress; @@ -147,7 +145,7 @@ const routerClear = async( "------------------------- Getting Best Deals From RouteProcessor3 -------------------------", "\n" ); - bundledOrders = await prepare(bundledOrders, lps, config, gasPrice, prioritization); + bundledOrders = await prepare(bundledOrders, dataFetcher, config, gasPrice, prioritization); } else { console.log("No orders found, exiting...", "\n"); @@ -247,8 +245,8 @@ const routerClear = async( symbol: bundledOrders[i].buyTokenSymbol }); - // await fetchPoolsForTokenWrapper(bundledOrders[i].dataFetcher, fromToken, toToken); - const pcMap = bundledOrders[i].dataFetcher.getCurrentPoolCodeMap(fromToken,toToken); + await fetchPoolsForTokenWrapper(dataFetcher, fromToken, toToken); + const pcMap = dataFetcher.getCurrentPoolCodeMap(fromToken,toToken); const route = Router.findBestRoute( pcMap, config.chainId, @@ -299,10 +297,10 @@ const routerClear = async( // ); // if (route.status == "NoWay") throw "could not find any route for this token pair"; console.log(">>> Route portions: ", "\n"); - visualizeRoute(fromToken.address, toToken.address, route.legs).forEach( + visualizeRoute(fromToken, toToken, route.legs).forEach( v => console.log("\x1b[36m%s\x1b[0m", v) ); - console.log("\n"); + console.log(""); // console.log( // "\x1b[36m%s\x1b[0m", // visualizeRoute(fromToken.address, toToken.address, route.legs), @@ -552,7 +550,6 @@ const routerClear = async( console.log(error); } } - dataFetcher.stopDataFetching(); return report; }; diff --git a/src/srouter.js b/src/srouter.js index bbb9903f..f046ae8d 100644 --- a/src/srouter.js +++ b/src/srouter.js @@ -20,12 +20,12 @@ const { * bundled orders based on the best deals * * @param {any[]} bundledOrders - The bundled orders array - * @param {string[]} lps - The list of liquidity providers + * @param {any} dataFetcher - The DataFetcher instance * @param {any} config - The network config data * @param {ethers.BigNumber} gasPrice - The network gas price * @param {boolean} sort - (optional) Sort based on best deals or not */ -const prepare = async(bundledOrders, lps, config, gasPrice, sort = true) => { +const prepare = async(bundledOrders, dataFetcher, config, gasPrice, sort = true) => { for (let i = 0; i < bundledOrders.length; i++) { const bOrder = bundledOrders[i]; const pair = bOrder.buyTokenSymbol + "/" + bOrder.sellTokenSymbol; @@ -42,7 +42,6 @@ const prepare = async(bundledOrders, lps, config, gasPrice, sort = true) => { address: bOrder.buyToken, symbol: bOrder.buyTokenSymbol }); - const dataFetcher = getDataFetcher(config, lps); await fetchPoolsForTokenWrapper(dataFetcher, fromToken, toToken); const pcMap = dataFetcher.getCurrentPoolCodeMap(fromToken, toToken); const route = Router.findBestRoute( @@ -60,7 +59,6 @@ const prepare = async(bundledOrders, lps, config, gasPrice, sort = true) => { const price = route.amountOutBN.mul("1" + "0".repeat(18 - bOrder.buyTokenDecimals)); bOrder.initPrice = price; - bOrder.dataFetcher = dataFetcher; console.log(`Current market price for ${pair} for: ${ethers.utils.formatEther(price)}`); console.log("Current ratio of the orders in this token pair:"); @@ -114,7 +112,7 @@ const srouterClear = async( if (typeof prioritization !== "boolean") throw "invalid value for 'prioritization'"; const lps = processLps(config.lps); - const dataFetcher = getDataFetcher(config, lps); + const dataFetcher = getDataFetcher(config, lps, !!config.usePublicRpc); const signer = config.signer; const arbAddress = config.arbAddress; const orderbookAddress = config.orderbookAddress; @@ -147,7 +145,7 @@ const srouterClear = async( "------------------------- Getting Best Deals From RouteProcessor3 -------------------------", "\n" ); - bundledOrders = await prepare(bundledOrders, lps, config, gasPrice, prioritization); + bundledOrders = await prepare(bundledOrders, dataFetcher, config, gasPrice, prioritization); } else { console.log("No orders found, exiting...", "\n"); @@ -216,7 +214,8 @@ const srouterClear = async( bundledOrders[i].sellTokenSymbol } as maximum input`); console.log(">>> Getting best route", "\n"); - const pcMap = bundledOrders[i].dataFetcher.getCurrentPoolCodeMap( + await fetchPoolsForTokenWrapper(dataFetcher, fromToken, toToken); + const pcMap = dataFetcher.getCurrentPoolCodeMap( fromToken, toToken ); @@ -241,14 +240,10 @@ const srouterClear = async( const price = rateFixed.mul("1" + "0".repeat(18)).div(maximumInputFixed); console.log(`Current best route price for this token pair: ${ethers.utils.formatEther(price)}`, "\n"); console.log(">>> Route portions: ", "\n"); - visualizeRoute(fromToken.address, toToken.address, route.legs).forEach( + visualizeRoute(fromToken, toToken, route.legs).forEach( v => console.log("\x1b[36m%s\x1b[0m", v) ); - console.log("\n"); - // console.log( - // "\x1b[36m%s\x1b[0m", - // "\n" - // ); + console.log(""); const rpParams = Router.routeProcessor2Params( pcMap, @@ -293,6 +288,7 @@ const srouterClear = async( gasLimit = await signer.estimateGas(rawtx); } catch { + // console.log(err); throw "nomatch"; } gasLimit = gasLimit.mul("11").div("10"); @@ -482,7 +478,6 @@ const srouterClear = async( console.log(error); } } - dataFetcher.stopDataFetching(); return report; }; diff --git a/src/utils.js b/src/utils.js index d128617c..40375779 100644 --- a/src/utils.js +++ b/src/utils.js @@ -15,52 +15,49 @@ const fallbackTransports = { transport: http("https://nova.arbitrum.io/rpc"), }, [ChainId.ARBITRUM]: { - transport: fallback( - [ - http("https://lb.drpc.org/ogrpc?network=arbitrum&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), - http("https://rpc.ankr.com/arbitrum"), - http("https://arbitrum-one.public.blastapi.io"), - http("https://endpoints.omniatech.io/v1/arbitrum/one/public"), - http("https://arb1.croswap.com/rpc"), - http("https://1rpc.io/arb"), - http("https://arbitrum.blockpi.network/v1/rpc/public"), - http("https://arb-mainnet-public.unifra.io"), - ], - { rank: true } - ), + transport: [ + http("https://lb.drpc.org/ogrpc?network=arbitrum&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), + http("https://rpc.ankr.com/arbitrum"), + http("https://arbitrum-one.public.blastapi.io"), + http("https://endpoints.omniatech.io/v1/arbitrum/one/public"), + http("https://arb1.croswap.com/rpc"), + http("https://1rpc.io/arb"), + http("https://arbitrum.blockpi.network/v1/rpc/public"), + http("https://arb-mainnet-public.unifra.io"), + ], }, [ChainId.AVALANCHE]: { - transport: fallback([ + transport: [ http("https://api.avax.network/ext/bc/C/rpc"), http("https://rpc.ankr.com/avalanche") - ]), + ], }, [ChainId.BOBA]: { - transport: fallback([ + transport: [ http("https://mainnet.boba.network"), http("https://lightning-replica.boba.network") - ]), + ], }, [ChainId.BOBA_AVAX]: { - transport: fallback([ + transport: [ http("https://avax.boba.network"), http("https://replica.avax.boba.network") - ]), + ], }, [ChainId.BOBA_BNB]: { - transport: fallback([ + transport: [ http("https://bnb.boba.network"), http("https://replica.bnb.boba.network") - ]), + ], }, [ChainId.BSC]: { - transport: fallback([ + transport: [ http("https://rpc.ankr.com/bsc"), http("https://lb.drpc.org/ogrpc?network=bsc&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), http("https://bsc-dataseed.binance.org"), http("https://bsc-dataseed1.binance.org"), http("https://bsc-dataseed2.binance.org"), - ]), + ], }, [ChainId.BTTC]: { transport: http("https://rpc.bittorrentchain.io"), @@ -69,27 +66,24 @@ const fallbackTransports = { transport: http("https://forno.celo.org") }, [ChainId.ETHEREUM]: { - transport: fallback( - [ - http("https://lb.drpc.org/ogrpc?network=ethereum&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), - http("https://eth.llamarpc.com"), - // http('https://eth.rpc.blxrbdn.com'), - // http('https://virginia.rpc.blxrbdn.com'), - // http('https://singapore.rpc.blxrbdn.com'), - // http('https://uk.rpc.blxrbdn.com'), - http("https://1rpc.io/eth"), - http("https://ethereum.publicnode.com"), - http("https://cloudflare-eth.com"), - ], - { rank: true } - ), + transport: [ + http("https://lb.drpc.org/ogrpc?network=ethereum&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), + http("https://eth.llamarpc.com"), + // http('https://eth.rpc.blxrbdn.com'), + // http('https://virginia.rpc.blxrbdn.com'), + // http('https://singapore.rpc.blxrbdn.com'), + // http('https://uk.rpc.blxrbdn.com'), + http("https://1rpc.io/eth"), + http("https://ethereum.publicnode.com"), + http("https://cloudflare-eth.com"), + ] }, [ChainId.FANTOM]: { - transport: fallback([ + transport: [ http("https://rpc.ankr.com/fantom"), http("https://rpc.fantom.network"), http("https://rpc2.fantom.network"), - ]), + ], }, [ChainId.FUSE]: { transport: http("https://rpc.fuse.io"), @@ -98,76 +92,64 @@ const fallbackTransports = { transport: http("https://rpc.ankr.com/gnosis"), }, [ChainId.HARMONY]: { - transport: fallback([ + transport: [ http("https://api.harmony.one"), http("https://rpc.ankr.com/harmony") - ]), + ], }, [ChainId.KAVA]: { - transport: fallback([ + transport: [ http("https://evm.kava.io"), http("https://evm2.kava.io") - ]), + ], }, [ChainId.MOONBEAM]: { - transport: fallback([ + transport: [ http("https://rpc.api.moonbeam.network"), http("https://rpc.ankr.com/moonbeam") - ]), + ], }, [ChainId.MOONRIVER]: { transport: http("https://rpc.api.moonriver.moonbeam.network"), }, [ChainId.OPTIMISM]: { - transport: fallback( - [ - http("https://lb.drpc.org/ogrpc?network=optimism&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), - http("https://rpc.ankr.com/optimism"), - http("https://optimism-mainnet.public.blastapi.io"), - http("https://1rpc.io/op"), - http("https://optimism.blockpi.network/v1/rpc/public"), - http("https://mainnet.optimism.io"), - ], - { rank: true } - ), + transport: [ + http("https://lb.drpc.org/ogrpc?network=optimism&dkey=Ak765fp4zUm6uVwKu4annC8M80dnCZkR7pAEsm6XXi_w"), + http("https://rpc.ankr.com/optimism"), + http("https://optimism-mainnet.public.blastapi.io"), + http("https://1rpc.io/op"), + http("https://optimism.blockpi.network/v1/rpc/public"), + http("https://mainnet.optimism.io"), + ], }, [ChainId.POLYGON]: { - transport: fallback( - [ - http("https://polygon.llamarpc.com"), - // http('https://polygon.rpc.blxrbdn.com'), - http("https://polygon-mainnet.public.blastapi.io"), - http("https://polygon.blockpi.network/v1/rpc/public"), - http("https://polygon-rpc.com"), - http("https://rpc.ankr.com/polygon"), - http("https://matic-mainnet.chainstacklabs.com"), - http("https://polygon-bor.publicnode.com"), - http("https://rpc-mainnet.matic.quiknode.pro"), - http("https://rpc-mainnet.maticvigil.com"), - // ...polygon.rpcUrls.default.http.map((url) => http(url)), - ], - { rank: true } - ), + transport: [ + http("https://polygon.llamarpc.com"), + // http('https://polygon.rpc.blxrbdn.com'), + http("https://polygon-mainnet.public.blastapi.io"), + http("https://polygon.blockpi.network/v1/rpc/public"), + http("https://polygon-rpc.com"), + http("https://rpc.ankr.com/polygon"), + http("https://matic-mainnet.chainstacklabs.com"), + http("https://polygon-bor.publicnode.com"), + http("https://rpc-mainnet.matic.quiknode.pro"), + http("https://rpc-mainnet.maticvigil.com"), + // ...polygon.rpcUrls.default.http.map((url) => http(url)), + ], }, [ChainId.POLYGON_ZKEVM]: { - transport: fallback( - [ - http("https://zkevm-rpc.com"), - http("https://rpc.ankr.com/polygon_zkevm"), - http("https://rpc.polygon-zkevm.gateway.fm"), - ], - { rank: true } - ), + transport: [ + http("https://zkevm-rpc.com"), + http("https://rpc.ankr.com/polygon_zkevm"), + http("https://rpc.polygon-zkevm.gateway.fm"), + ], }, [ChainId.THUNDERCORE]: { - transport: fallback( - [ - http("https://mainnet-rpc.thundercore.com"), - http("https://mainnet-rpc.thundercore.io"), - http("https://mainnet-rpc.thundertoken.net"), - ], - { rank: true } - ), + transport: [ + http("https://mainnet-rpc.thundercore.com"), + http("https://mainnet-rpc.thundercore.io"), + http("https://mainnet-rpc.thundertoken.net"), + ], }, }; @@ -690,15 +672,20 @@ const bundleTakeOrders = async(ordersDetails, orderbook, arb, _eval = true) => { * @param {any} config - The network config data * @param {LiquidityProviders[]} liquidityProviders - Array of Liquidity Providers */ -const getDataFetcher = (config, liquidityProviders = []) => { +const getDataFetcher = (config, liquidityProviders = [], useFallbacks = false) => { try { const dataFetcher = new DataFetcher( config.chainId, createPublicClient({ chain: viemConfig[config.chainId]?.chain, transport: config.rpc && config.rpc !== "test" - ? http(config.rpc) - : fallbackTransports[config.chainId].transport, + ? useFallbacks + ? fallback( + [config.rpc, ...fallbackTransports[config.chainId].transport], + {rank: true} + ) + : http(config.rpc) + : fallback(fallbackTransports[config.chainId].transport, {rank: true}), // batch: { // multicall: { // batchSize: 512 @@ -707,9 +694,12 @@ const getDataFetcher = (config, liquidityProviders = []) => { // pollingInterval: 8_000, }) ); + + // start and immediately stop data fetching as we only want data fetching on demand dataFetcher.startDataFetching( !liquidityProviders.length ? undefined : liquidityProviders ); + dataFetcher.stopDataFetching(); return dataFetcher; } catch(error) { @@ -1221,20 +1211,31 @@ const getRouteForTokens = async( const visualizeRoute = (fromToken, toToken, legs) => { return [ ...legs.filter( - v => v.tokenTo.address.toLowerCase() === toToken.toLowerCase() && - v.tokenFrom.address.toLowerCase() === fromToken.toLowerCase() + v => v.tokenTo.address.toLowerCase() === toToken.address.toLowerCase() && + v.tokenFrom.address.toLowerCase() === fromToken.address.toLowerCase() && + v.tokenTo.symbol.toLowerCase() === toToken.symbol.toLowerCase() && + v.tokenFrom.symbol.toLowerCase() === fromToken.symbol.toLowerCase() ).map(v => [v]), ...legs.filter( - v => v.tokenFrom.address.toLowerCase() === fromToken.toLowerCase() && - v.tokenTo.address.toLowerCase() !== toToken.toLowerCase() + v => v.tokenFrom.address.toLowerCase() === fromToken.address.toLowerCase() && + v.tokenFrom.symbol.toLowerCase() === fromToken.symbol.toLowerCase() && + ( + v.tokenTo.address.toLowerCase() !== toToken.address.toLowerCase() || + v.tokenTo.symbol.toLowerCase() !== toToken.symbol.toLowerCase() + ) ).map(v => { const portoin = [v]; - while(portoin.at(-1).tokenTo.address.toLowerCase() !== toToken.toLowerCase()) { + while( + portoin.at(-1).tokenTo.address.toLowerCase() !== toToken.address.toLowerCase() || + portoin.at(-1).tokenTo.symbol.toLowerCase() !== toToken.symbol.toLowerCase() + ) { portoin.push( legs.find(e => e.tokenFrom.address.toLowerCase() === - portoin.at(-1).tokenTo.address.toLowerCase() + portoin.at(-1).tokenTo.address.toLowerCase() && + e.tokenFrom.symbol.toLowerCase() === + portoin.at(-1).tokenTo.symbol.toLowerCase() ) ); } diff --git a/test/srouter.test.js b/test/srouter.test.js index df801fc7..688eb371 100644 --- a/test/srouter.test.js +++ b/test/srouter.test.js @@ -130,7 +130,6 @@ describe("Rain Arb Bot 'srouter' Mode Tests", async function () { await BUSD.connect(BUSDHolder).transfer(owners[i].address, "1000" + "0".repeat(BUSDDecimals)); await FRAX.connect(FRAXHolder).transfer(owners[i].address, "1000" + "0".repeat(FRAXDecimals)); } - console.log("hey"); }); it("should clear orders in 'srouter' mode", async function () { @@ -176,7 +175,7 @@ describe("Rain Arb Bot 'srouter' Mode Tests", async function () { // validate first cleared token pair orders assert.equal(reports[0].tokenPair, "USDT/USDC"); assert.equal(reports[0].clearedAmount, "200000000"); - // assert.equal(reports[0].clearedOrders.length, 2); + assert.equal(reports[0].clearedOrders.length, 2); // check vault balances for orders in cleared token pair USDT/USDC assert.equal(