From b5c097d661d9ac43d31f067ab343cf21f9642bc3 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Fri, 24 Feb 2023 09:47:27 +0100 Subject: [PATCH] Upgrade next (#100) * upgrade to next 13 * WIP: adjust to app dir * add docker + wallet connector * fix: update the wallet connect component * tidy: format * wip: make the wallet balance fetcher work * fix balance retrieval * MP-2258: added estimateFee hook (#94) * Mp 2259 queries to api (#96) * update next config for build errors * Convert queries to API + remove config * tidy: save some bytes by adding constants/env.ts * tidy: added URL_ prefix to REST, RPC and GQL --------- Co-authored-by: Linkie Link * MP-2261: created useBroadcast hook for transactions (#95) * tidy: remove unneeded wallet images * Mp 2264 convert store (#97) * Merge stores into 1 * refactor codebase to use new store * fiex build and rename whitelisted to marketassets * tidy: import refactor * updated account navigation basics * feat: added loading component and fixed the disconnect button * fix: format * update new routing system * update config and dependencies * feat: create and delete credit account are restored * tidy: format * fix: fixed the deployment * update route structure (#98) * fix: creditAccountDeposit works again * fix: bugfixes * add apis, remove allowedCoins, get basic borrow tables (#99) Co-authored-by: bwvdhelm <34470358+bobthebuidlr@users.noreply.github.com> --------- Co-authored-by: bwvdhelm <34470358+bobthebuidlr@users.noreply.github.com> --- .env.example | 13 + .gitignore | 4 + .vscode/settings.json | 4 + Dockerfile | 59 + next.config.js | 37 +- package.json | 24 +- src/app/borrow/loading.tsx | 3 + src/app/borrow/page.tsx | 7 + src/app/council/page.tsx | 3 + src/app/earn/page.tsx | 3 + src/app/head.tsx | 30 + src/app/layout.tsx | 29 + src/app/page.tsx | 3 + src/app/portfolio/page.tsx | 3 + src/app/trade/page.tsx | 3 + .../accounts/[account]/borrow/loading.tsx | 3 + .../accounts/[account]/borrow/page.tsx | 31 + .../accounts/[account]/council/loading.tsx | 3 + .../accounts/[account]/council/page.tsx} | 7 +- .../accounts/[account]/earn/loading.tsx | 3 + .../accounts/[account]/earn/page.tsx} | 7 +- .../[wallet]/accounts/[account]/page.tsx | 3 + .../accounts/[account]/portfolio/error.tsx | 5 + .../accounts/[account]/portfolio/page.tsx | 15 + .../accounts/[account]/trade/loading.tsx | 3 + .../accounts/[account]/trade/page.tsx} | 12 +- .../wallets/[wallet]/borrow/council/page.tsx | 3 + src/app/wallets/[wallet]/borrow/earn/page.tsx | 3 + src/app/wallets/[wallet]/borrow/page.tsx | 3 + .../[wallet]/borrow/portfolio/page.tsx | 3 + .../wallets/[wallet]/borrow/trade/page.tsx | 3 + src/app/wallets/[wallet]/council/page.tsx | 3 + src/app/wallets/[wallet]/earn/page.tsx | 3 + src/app/wallets/[wallet]/layout.tsx | 21 + src/app/wallets/[wallet]/portfolio/page.tsx | 3 + src/app/wallets/[wallet]/trade/page.tsx | 3 + src/components/Account/AccountDetails.tsx | 39 +- .../Account/AccountManageOverlay.tsx | 49 +- src/components/Account/AccountNavigation.tsx | 210 +- src/components/Account/AccountStatus.tsx | 27 +- src/components/Account/ConfirmModal.tsx | 14 +- src/components/Account/FundAccountModal.tsx | 230 +- src/components/Account/RiskChart.tsx | 9 +- src/components/Account/WithdrawModal.tsx | 72 +- src/components/Account/index.ts | 10 - src/components/AccountDebtTable.tsx | 17 + src/components/Background.tsx | 21 + src/components/Borrow/AssetRow.tsx | 2 +- src/components/Borrow/BorrowTable.tsx | 2 +- src/components/Borrow/index.ts | 4 - src/components/BorrowCapacity.tsx | 8 +- src/components/BorrowModal.tsx | 53 +- src/components/BorrowTable.tsx | 13 + src/components/Button.tsx | 6 +- src/components/CircularProgress.tsx | 6 +- src/components/CookieConsent.tsx | 60 - src/components/FormattedNumber.tsx | 6 +- src/components/Gauge.tsx | 6 +- src/components/Icons/index.ts | 94 +- src/components/LabelValuePair.tsx | 3 +- src/components/Layout.tsx | 49 - src/components/Loading.tsx | 28 + src/components/Modal.tsx | 2 +- src/components/Modals.tsx | 7 +- .../Navigation/DesktopNavigation.tsx | 46 +- src/components/Navigation/NavLink.tsx | 25 +- src/components/Navigation/SearchInput.tsx | 12 - src/components/Navigation/index.ts | 6 - src/components/Navigation/menuTree.ts | 7 - src/components/Overlay/OverlayAction.tsx | 2 +- src/components/Overlay/index.ts | 4 - src/components/PositionsList.tsx | 3 +- src/components/RepayModal.tsx | 34 +- src/components/Toaster.tsx | 18 + src/components/Tooltip.tsx | 4 +- src/components/Trade/TradeActionModule.tsx | 63 +- src/components/Trade/index.ts | 3 - src/components/Wallet/ConnectButton.tsx | 10 +- src/components/Wallet/ConnectedButton.tsx | 85 +- src/components/Wallet/Wallet.tsx | 63 +- .../Wallet/WalletConnectProvider.tsx | 95 +- src/components/Wallet/index.ts | 6 - .../borrow.tsx => components/borrow_page.tsx} | 45 +- src/components/index.ts | 22 - src/config/osmo-test-4.ts | 68 - src/constants/assets.ts | 62 + src/constants/env.ts | 18 + src/constants/gas.ts | 2 + src/hooks/data/index.ts | 8 - src/hooks/data/useAccountStats.tsx | 8 +- src/hooks/data/useAnimations.tsx | 8 +- src/hooks/data/useBalances.tsx | 17 +- .../data/useCalculateMaxBorrowAmount.tsx | 21 +- src/hooks/data/useCalculateMaxTradeAmount.tsx | 14 +- .../data/useCalculateMaxWithdrawAmount.tsx | 19 +- src/hooks/mutations/index.ts | 9 - src/hooks/mutations/useBorrowFunds.tsx | 13 +- .../mutations/useCreateCreditAccount.tsx | 45 - .../mutations/useDeleteCreditAccount.tsx | 39 - .../mutations/useDepositCreditAccount.tsx | 62 - src/hooks/mutations/useRepayFunds.tsx | 15 +- src/hooks/mutations/useTradeAsset.tsx | 12 +- src/hooks/mutations/useWithdrawFunds.tsx | 14 +- src/hooks/queries/index.ts | 9 - src/hooks/queries/useAllBalances.tsx | 10 +- src/hooks/queries/useAllowedCoins.tsx | 9 +- src/hooks/queries/useBroadcast.tsx | 49 + .../queries/useCreditAccountPositions.tsx | 11 +- src/hooks/queries/useCreditAccounts.tsx | 17 +- src/hooks/queries/useEstimateFee.tsx | 53 + src/hooks/queries/useRedbankBalances.tsx | 9 +- src/hooks/queries/useTokenPrices.tsx | 17 +- src/hooks/useParams.ts | 26 + src/images/wallets/keplr-wallet-extension.png | Bin 8128 -> 0 bytes src/images/wallets/walletconnect-keplr.png | Bin 1220 -> 0 bytes src/pages/404.tsx | 19 - src/pages/_app.tsx | 68 - src/pages/_error.js | 39 - src/pages/api/accounts/[id]/debts.ts | 19 + src/pages/api/accounts/[id]/deposits.ts | 19 + src/pages/api/accounts/[id]/index.ts | 26 + src/pages/api/markets/balances.ts | 35 + src/pages/api/markets/borrow.ts | 43 + src/pages/api/markets/debts.ts | 59 + src/pages/api/markets/deposits.ts | 59 + src/pages/api/markets/index.ts | 44 + src/pages/api/markets/liquidity.ts | 42 + src/pages/api/prices/index.ts | 43 + src/pages/api/vaults/index.ts | 21 + src/pages/api/wallets/[address]/accounts.ts | 26 + src/pages/api/wallets/[address]/balances.ts | 21 + src/pages/portfolio.tsx | 121 - src/store/index.ts | 24 + src/store/slices/broadcast.ts | 144 + src/store/slices/common.ts | 23 + src/store/slices/wallet.ts | 79 + src/stores/index.ts | 7 - src/stores/useAccountDetailsStore.tsx | 11 - src/stores/useModalStore.tsx | 15 - src/stores/useNetworkConfigStore.tsx | 8 - src/stores/useSettingsStore.tsx | 9 - src/stores/useWalletStore.tsx | 91 - .../mars-account-nft/MarsAccountNft.client.ts | 115 +- .../MarsAccountNft.message-composer.ts | 98 +- .../MarsAccountNft.react-query.ts | 105 +- .../mars-account-nft/MarsAccountNft.types.ts | 37 +- .../generated/mars-account-nft/bundle.ts | 2 +- .../MarsCreditManager.client.ts | 181 +- .../MarsCreditManager.message-composer.ts | 77 +- .../MarsCreditManager.react-query.ts | 246 +- .../MarsCreditManager.types.ts | 216 +- .../generated/mars-credit-manager/bundle.ts | 2 +- .../MarsMockCreditManager.client.ts | 478 +++ .../MarsMockCreditManager.message-composer.ts | 159 + .../MarsMockCreditManager.react-query.ts | 659 ++++ .../MarsMockCreditManager.types.ts | 241 ++ .../mars-mock-credit-manager/bundle.ts | 14 + .../mars-mock-oracle/MarsMockOracle.client.ts | 2 +- .../MarsMockOracle.message-composer.ts | 2 +- .../MarsMockOracle.react-query.ts | 7 +- .../mars-mock-oracle/MarsMockOracle.types.ts | 2 +- .../generated/mars-mock-oracle/bundle.ts | 12 +- .../MarsMockRedBank.client.ts | 53 +- .../MarsMockRedBank.message-composer.ts | 39 +- .../MarsMockRedBank.react-query.ts | 50 +- .../MarsMockRedBank.types.ts | 35 +- .../generated/mars-mock-red-bank/bundle.ts | 12 +- .../mars-mock-vault/MarsMockVault.client.ts | 14 +- .../MarsMockVault.message-composer.ts | 6 +- .../MarsMockVault.react-query.ts | 20 +- .../mars-mock-vault/MarsMockVault.types.ts | 10 +- src/types/generated/mars-mock-vault/bundle.ts | 12 +- .../generated/mars-mock-zapper/bundle.ts | 14 - .../MarsOracleAdapter.client.ts | 151 - .../MarsOracleAdapter.react-query.ts | 199 -- .../MarsOracleAdapter.types.ts | 74 - .../generated/mars-oracle-adapter/bundle.ts | 14 - .../MarsRoverHealthComputer.client.ts | 32 + ...arsRoverHealthComputer.message-composer.ts | 32 + .../MarsRoverHealthComputer.react-query.ts | 33 + .../MarsRoverHealthComputer.types.ts | 118 + .../mars-rover-health-computer/bundle.ts | 14 + .../MarsRoverHealthTypes.client.ts | 126 + .../MarsRoverHealthTypes.message-composer.ts} | 49 +- .../MarsRoverHealthTypes.react-query.ts | 128 + .../MarsRoverHealthTypes.types.ts | 59 + .../mars-rover-health-types/bundle.ts | 14 + .../MarsSwapperBase.client.ts | 33 +- .../MarsSwapperBase.message-composer.ts | 29 +- .../MarsSwapperBase.react-query.ts | 37 +- .../MarsSwapperBase.types.ts | 26 +- .../generated/mars-swapper-base/bundle.ts | 12 +- .../MarsZapperBase.client.ts} | 42 +- .../MarsZapperBase.message-composer.ts} | 29 +- .../MarsZapperBase.react-query.ts} | 83 +- .../MarsZapperBase.types.ts} | 32 +- .../generated/mars-zapper-base/bundle.ts | 14 + src/types/interfaces/asset.d.ts | 4 +- src/types/interfaces/hooks/useBroadcast.d.ts | 7 + .../interfaces/hooks/useEstimateFee.d.ts | 6 + src/types/interfaces/networkConfig.d.ts | 1 + src/types/interfaces/pageParams.d.ts | 5 + src/types/interfaces/route.d.ts | 1 + src/types/query-keys-factory.ts | 4 +- src/utils/api.ts | 42 + src/utils/assets.ts | 17 + src/utils/balances.ts | 12 +- src/utils/broadcast.ts | 16 + src/utils/formatters.ts | 16 +- src/utils/query.ts | 6 + src/utils/route.ts | 60 + src/utils/tokens.ts | 20 +- tailwind.config.js | 3 +- tsconfig.json | 25 +- yarn.lock | 2681 ++++++++++++----- 215 files changed, 7613 insertions(+), 3357 deletions(-) create mode 100644 .env.example create mode 100644 .vscode/settings.json create mode 100644 Dockerfile create mode 100644 src/app/borrow/loading.tsx create mode 100644 src/app/borrow/page.tsx create mode 100644 src/app/council/page.tsx create mode 100644 src/app/earn/page.tsx create mode 100644 src/app/head.tsx create mode 100644 src/app/layout.tsx create mode 100644 src/app/page.tsx create mode 100644 src/app/portfolio/page.tsx create mode 100644 src/app/trade/page.tsx create mode 100644 src/app/wallets/[wallet]/accounts/[account]/borrow/loading.tsx create mode 100644 src/app/wallets/[wallet]/accounts/[account]/borrow/page.tsx create mode 100644 src/app/wallets/[wallet]/accounts/[account]/council/loading.tsx rename src/{pages/council.tsx => app/wallets/[wallet]/accounts/[account]/council/page.tsx} (60%) create mode 100644 src/app/wallets/[wallet]/accounts/[account]/earn/loading.tsx rename src/{pages/earn.tsx => app/wallets/[wallet]/accounts/[account]/earn/page.tsx} (74%) create mode 100644 src/app/wallets/[wallet]/accounts/[account]/page.tsx create mode 100644 src/app/wallets/[wallet]/accounts/[account]/portfolio/error.tsx create mode 100644 src/app/wallets/[wallet]/accounts/[account]/portfolio/page.tsx create mode 100644 src/app/wallets/[wallet]/accounts/[account]/trade/loading.tsx rename src/{pages/trade.tsx => app/wallets/[wallet]/accounts/[account]/trade/page.tsx} (73%) create mode 100644 src/app/wallets/[wallet]/borrow/council/page.tsx create mode 100644 src/app/wallets/[wallet]/borrow/earn/page.tsx create mode 100644 src/app/wallets/[wallet]/borrow/page.tsx create mode 100644 src/app/wallets/[wallet]/borrow/portfolio/page.tsx create mode 100644 src/app/wallets/[wallet]/borrow/trade/page.tsx create mode 100644 src/app/wallets/[wallet]/council/page.tsx create mode 100644 src/app/wallets/[wallet]/earn/page.tsx create mode 100644 src/app/wallets/[wallet]/layout.tsx create mode 100644 src/app/wallets/[wallet]/portfolio/page.tsx create mode 100644 src/app/wallets/[wallet]/trade/page.tsx delete mode 100644 src/components/Account/index.ts create mode 100644 src/components/AccountDebtTable.tsx create mode 100644 src/components/Background.tsx delete mode 100644 src/components/Borrow/index.ts create mode 100644 src/components/BorrowTable.tsx delete mode 100644 src/components/CookieConsent.tsx delete mode 100644 src/components/Layout.tsx create mode 100644 src/components/Loading.tsx delete mode 100644 src/components/Navigation/SearchInput.tsx delete mode 100644 src/components/Navigation/index.ts delete mode 100644 src/components/Navigation/menuTree.ts delete mode 100644 src/components/Overlay/index.ts create mode 100644 src/components/Toaster.tsx delete mode 100644 src/components/Trade/index.ts delete mode 100644 src/components/Wallet/index.ts rename src/{pages/borrow.tsx => components/borrow_page.tsx} (78%) delete mode 100644 src/components/index.ts delete mode 100644 src/config/osmo-test-4.ts create mode 100644 src/constants/assets.ts create mode 100644 src/constants/env.ts create mode 100644 src/constants/gas.ts delete mode 100644 src/hooks/data/index.ts delete mode 100644 src/hooks/mutations/index.ts delete mode 100644 src/hooks/mutations/useCreateCreditAccount.tsx delete mode 100644 src/hooks/mutations/useDeleteCreditAccount.tsx delete mode 100644 src/hooks/mutations/useDepositCreditAccount.tsx delete mode 100644 src/hooks/queries/index.ts create mode 100644 src/hooks/queries/useBroadcast.tsx create mode 100644 src/hooks/queries/useEstimateFee.tsx create mode 100644 src/hooks/useParams.ts delete mode 100644 src/images/wallets/keplr-wallet-extension.png delete mode 100644 src/images/wallets/walletconnect-keplr.png delete mode 100644 src/pages/404.tsx delete mode 100644 src/pages/_app.tsx delete mode 100644 src/pages/_error.js create mode 100644 src/pages/api/accounts/[id]/debts.ts create mode 100644 src/pages/api/accounts/[id]/deposits.ts create mode 100644 src/pages/api/accounts/[id]/index.ts create mode 100644 src/pages/api/markets/balances.ts create mode 100644 src/pages/api/markets/borrow.ts create mode 100644 src/pages/api/markets/debts.ts create mode 100644 src/pages/api/markets/deposits.ts create mode 100644 src/pages/api/markets/index.ts create mode 100644 src/pages/api/markets/liquidity.ts create mode 100644 src/pages/api/prices/index.ts create mode 100644 src/pages/api/vaults/index.ts create mode 100644 src/pages/api/wallets/[address]/accounts.ts create mode 100644 src/pages/api/wallets/[address]/balances.ts delete mode 100644 src/pages/portfolio.tsx create mode 100644 src/store/index.ts create mode 100644 src/store/slices/broadcast.ts create mode 100644 src/store/slices/common.ts create mode 100644 src/store/slices/wallet.ts delete mode 100644 src/stores/index.ts delete mode 100644 src/stores/useAccountDetailsStore.tsx delete mode 100644 src/stores/useModalStore.tsx delete mode 100644 src/stores/useNetworkConfigStore.tsx delete mode 100644 src/stores/useSettingsStore.tsx delete mode 100644 src/stores/useWalletStore.tsx create mode 100644 src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.client.ts create mode 100644 src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.message-composer.ts create mode 100644 src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.react-query.ts create mode 100644 src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.types.ts create mode 100644 src/types/generated/mars-mock-credit-manager/bundle.ts delete mode 100644 src/types/generated/mars-mock-zapper/bundle.ts delete mode 100644 src/types/generated/mars-oracle-adapter/MarsOracleAdapter.client.ts delete mode 100644 src/types/generated/mars-oracle-adapter/MarsOracleAdapter.react-query.ts delete mode 100644 src/types/generated/mars-oracle-adapter/MarsOracleAdapter.types.ts delete mode 100644 src/types/generated/mars-oracle-adapter/bundle.ts create mode 100644 src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.client.ts create mode 100644 src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.message-composer.ts create mode 100644 src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.react-query.ts create mode 100644 src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.types.ts create mode 100644 src/types/generated/mars-rover-health-computer/bundle.ts create mode 100644 src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.client.ts rename src/types/generated/{mars-oracle-adapter/MarsOracleAdapter.message-composer.ts => mars-rover-health-types/MarsRoverHealthTypes.message-composer.ts} (58%) create mode 100644 src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.react-query.ts create mode 100644 src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.types.ts create mode 100644 src/types/generated/mars-rover-health-types/bundle.ts rename src/types/generated/{mars-mock-zapper/MarsMockZapper.client.ts => mars-zapper-base/MarsZapperBase.client.ts} (81%) rename src/types/generated/{mars-mock-zapper/MarsMockZapper.message-composer.ts => mars-zapper-base/MarsZapperBase.message-composer.ts} (78%) rename src/types/generated/{mars-mock-zapper/MarsMockZapper.react-query.ts => mars-zapper-base/MarsZapperBase.react-query.ts} (56%) rename src/types/generated/{mars-mock-zapper/MarsMockZapper.types.ts => mars-zapper-base/MarsZapperBase.types.ts} (78%) create mode 100644 src/types/generated/mars-zapper-base/bundle.ts create mode 100644 src/types/interfaces/hooks/useBroadcast.d.ts create mode 100644 src/types/interfaces/hooks/useEstimateFee.d.ts create mode 100644 src/types/interfaces/pageParams.d.ts create mode 100644 src/types/interfaces/route.d.ts create mode 100644 src/utils/api.ts create mode 100644 src/utils/assets.ts create mode 100644 src/utils/broadcast.ts create mode 100644 src/utils/query.ts create mode 100644 src/utils/route.ts diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..731dcdf6 --- /dev/null +++ b/.env.example @@ -0,0 +1,13 @@ +NEXT_PUBLIC_NETWORK=testnet +NEXT_PUBLIC_CHAIN_ID=osmo-test-4 +NEXT_PUBLIC_RPC=https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-rpc-front/ +NEXT_PUBLIC_GQL=https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql +NEXT_PUBLIC_REST=https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-lcd-front/ +NEXT_PUBLIC_SWAP=https://testnet.osmosis.zone +NEXT_PUBLIC_WALLETS=keplr,cosmostation +NEXT_PUBLIC_ACCOUNT_NFT=osmo1l8c3g6zy7kjhuh8d2kqyvxkw0myn4puxv0tzcdf9nwxd386r9l7s3vlhzq +NEXT_PUBLIC_ORACLE=osmo1dqz2u3c8rs5e7w5fnchsr2mpzzsxew69wtdy0aq4jsd76w7upmsstqe0s8 +NEXT_PUBLIC_RED_BANK=osmo1g30recyv8pfy3qd4qn3dn7plc0rn5z68y5gn32j39e96tjhthzxsw3uvvu +NEXT_PUBLIC_CREDIT_MANAGER=osmo12hgn4jec4tftahm7spf7c2aqsqrxzzk50hkq60e89atumyu0zvys7vzxdc +NEXT_PUBLIC_ZAPPER=osmo1ua8dwc9v8qjh7n3qf8kg6xvrwjm5yu9xxln7yjvgmrvfzaxvzsuqfcdnjq +NEXT_PUBLIC_SWAPPER=osmo1uj6r9tu440wwp2mhtagh48yvmeyeaqt2xa7kdnlhyrqcuthlj4ss7ghg6n diff --git a/.gitignore b/.gitignore index e3923e68..794f3e24 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,7 @@ next-env.d.ts # Sentry .sentryclirc + +# Environment variables +.env.local +.env.production \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..d0679104 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..7f65997a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,59 @@ +FROM node:18-alpine AS base + +# Install dependencies only when needed +FROM base AS deps +# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. +RUN apk add --no-cache libc6-compat +WORKDIR /app + +# Install dependencies based on the preferred package manager +COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ +RUN \ + if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ + elif [ -f package-lock.json ]; then npm ci; \ + elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \ + else echo "Lockfile not found." && exit 1; \ + fi + + +# Rebuild the source code only when needed +FROM base AS builder +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY . . + +# Next.js collects completely anonymous telemetry data about general usage. +# Learn more here: https://nextjs.org/telemetry +# Uncomment the following line in case you want to disable telemetry during the build. +# ENV NEXT_TELEMETRY_DISABLED 1 + +RUN yarn build + +# If using npm comment out above and use below instead +# RUN npm run build + +# Production image, copy all the files and run next +FROM base AS runner +WORKDIR /app + +ENV NODE_ENV production +# Uncomment the following line in case you want to disable telemetry during runtime. +# ENV NEXT_TELEMETRY_DISABLED 1 + +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 nextjs + +COPY --from=builder /app/public ./public + +# Automatically leverage output traces to reduce image size +# https://nextjs.org/docs/advanced-features/output-file-tracing +COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static + +USER nextjs + +EXPOSE 3000 + +ENV PORT 3000 + +CMD ["node", "server.js"] \ No newline at end of file diff --git a/next.config.js b/next.config.js index c1b68c05..f4677528 100644 --- a/next.config.js +++ b/next.config.js @@ -1,11 +1,11 @@ -const { withSentryConfig } = require('@sentry/nextjs') /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: true, - sentry: { - hideSourceMaps: true, + output: 'standalone', + experimental: { + appDir: true, }, + reactStrictMode: true, async redirects() { return [ { @@ -13,9 +13,34 @@ const nextConfig = { destination: '/trade', permanent: true, }, + { + source: '/wallets', + destination: '/trade', + permanent: true, + }, + { + source: '/wallets/:wallet', + destination: '/wallets/:wallet/trade', + permanent: true, + }, + { + source: '/wallets/:wallet/accounts', + destination: '/wallets/:wallet/accounts/trade', + permanent: true, + }, ] }, - webpack(config) { + webpack(config, {isServer}) { + if (isServer) { + config.resolve.fallback = { + ...config.resolve.fallback, + 'utf-8-validate': false, + bufferutil: false, + './build/Release/ecdh': false, + eccrypto: false, + } + } + config.module.rules.push({ test: /\.svg$/i, issuer: /\.[jt]sx?$/, @@ -40,4 +65,4 @@ const sentryWebpackPluginOptions = { // Make sure adding Sentry options is the last code to run before exporting, to // ensure that your source maps include changes from all other Webpack plugins -module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions) +module.exports = nextConfig diff --git a/package.json b/package.json index b8834016..62ebc828 100644 --- a/package.json +++ b/package.json @@ -6,17 +6,16 @@ "build": "next build", "dev": "next dev", "lint": "eslint ./src/ && yarn prettier-check", + "index": "vscode-generate-index-standalone src/", "format": "yarn index && eslint ./src/ --fix && prettier --write ./src/", "prettier-check": "prettier --ignore-path .gitignore --check ./src/", - "start": "next start", - "index": "vscode-generate-index-standalone src/" + "start": "next start" }, "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.29.4", "@cosmjs/stargate": "^0.29.5", "@headlessui/react": "^1.7.0", - "@marsprotocol/wallet-connector": "^0.9.5", - "@metamask/detect-provider": "^1.2.0", + "@marsprotocol/wallet-connector": "^1.4.2", "@radix-ui/react-slider": "^1.0.0", "@sentry/nextjs": "^7.12.1", "@tanstack/react-query": "^4.3.4", @@ -30,14 +29,16 @@ "graphql": "^16.6.0", "graphql-request": "^5.0.0", "moment": "^2.29.4", - "next": "12.3.1", - "react": "18.2.0", - "react-dom": "18.2.0", + "next": "^13.1.6", + "react": "^18.2.0", + "react-device-detect": "^2.2.3", + "react-dom": "^18.2.0", "react-number-format": "^5.1.0", "react-spring": "^9.5.5", "react-toastify": "^9.0.8", "react-use-clipboard": "^1.0.9", "recharts": "^2.2.0", + "swr": "^2.0.3", "tailwindcss-border-gradient-radius": "^3.0.1", "use-local-storage-state": "^18.1.1", "zustand": "^4.1.4" @@ -49,13 +50,16 @@ "@types/react-dom": "18.0.9", "autoprefixer": "^10.4.13", "eslint": "8.30.0", - "eslint-config-next": "12.3.1", + "eslint-config-next": "^13.1.6", "eslint-plugin-import": "^2.26.0", "postcss": "^8.4.16", "prettier": "^2.7.1", "prettier-plugin-tailwindcss": "^0.1.13", "tailwindcss": "^3.2.1", - "typescript": "4.9.4", - "vscode-generate-index-standalone": "^1.6.0" + "typescript": "4.9.4" + }, + "resolutions": { + "@types/react": "18.0.26", + "@types/react-dom": "18.0.9" } } diff --git a/src/app/borrow/loading.tsx b/src/app/borrow/loading.tsx new file mode 100644 index 00000000..0597facd --- /dev/null +++ b/src/app/borrow/loading.tsx @@ -0,0 +1,3 @@ +export default function laoding() { + return '...isLoading' +} diff --git a/src/app/borrow/page.tsx b/src/app/borrow/page.tsx new file mode 100644 index 00000000..94d250b2 --- /dev/null +++ b/src/app/borrow/page.tsx @@ -0,0 +1,7 @@ +import { getBorrowData } from 'utils/api' + +export default async function page() { + const borrowData = await getBorrowData() + + return `You are a guest` +} diff --git a/src/app/council/page.tsx b/src/app/council/page.tsx new file mode 100644 index 00000000..8c592614 --- /dev/null +++ b/src/app/council/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a guest` +} diff --git a/src/app/earn/page.tsx b/src/app/earn/page.tsx new file mode 100644 index 00000000..8c592614 --- /dev/null +++ b/src/app/earn/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a guest` +} diff --git a/src/app/head.tsx b/src/app/head.tsx new file mode 100644 index 00000000..b632a7f4 --- /dev/null +++ b/src/app/head.tsx @@ -0,0 +1,30 @@ +export default function Head() { + return ( + <> + Mars Protocol V2 + + + + + + + + + + + + + + + + + + + ) +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx new file mode 100644 index 00000000..353e6cec --- /dev/null +++ b/src/app/layout.tsx @@ -0,0 +1,29 @@ +import Background from 'components/Background' +import { Modals } from 'components/Modals' +import DesktopNavigation from 'components/Navigation/DesktopNavigation' +import Toaster from 'components/Toaster' +import { WalletConnectProvider } from 'components/Wallet/WalletConnectProvider' +import 'react-toastify/dist/ReactToastify.min.css' +import 'styles/globals.css' + +export default function RootLayout({ children }: { children: React.ReactNode }) { + return ( + + + + +
+ + + + + + +
+
{children}
+
+
+ + + ) +} diff --git a/src/app/page.tsx b/src/app/page.tsx new file mode 100644 index 00000000..9fd04b1c --- /dev/null +++ b/src/app/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return 'Connect to your wallet' +} diff --git a/src/app/portfolio/page.tsx b/src/app/portfolio/page.tsx new file mode 100644 index 00000000..8c592614 --- /dev/null +++ b/src/app/portfolio/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a guest` +} diff --git a/src/app/trade/page.tsx b/src/app/trade/page.tsx new file mode 100644 index 00000000..8c592614 --- /dev/null +++ b/src/app/trade/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a guest` +} diff --git a/src/app/wallets/[wallet]/accounts/[account]/borrow/loading.tsx b/src/app/wallets/[wallet]/accounts/[account]/borrow/loading.tsx new file mode 100644 index 00000000..8c8208af --- /dev/null +++ b/src/app/wallets/[wallet]/accounts/[account]/borrow/loading.tsx @@ -0,0 +1,3 @@ +export default function Loading() { + return '...isLoading' +} diff --git a/src/app/wallets/[wallet]/accounts/[account]/borrow/page.tsx b/src/app/wallets/[wallet]/accounts/[account]/borrow/page.tsx new file mode 100644 index 00000000..1a636668 --- /dev/null +++ b/src/app/wallets/[wallet]/accounts/[account]/borrow/page.tsx @@ -0,0 +1,31 @@ +import { BorrowTable } from 'components/BorrowTable' +import { AccountDebtTable } from 'components/AccountDebtTable' +import { Card } from 'components/Card' +import Loading from 'components/Loading' +import { Text } from 'components/Text' +import { Suspense } from 'react' + +export default function page({ params }: { params: PageParams }) { + return ( +
+ + + Debt data + + }> + {/* @ts-expect-error Server Component */} + + + + + + Borrow data + + }> + {/* @ts-expect-error Server Component */} + + + +
+ ) +} diff --git a/src/app/wallets/[wallet]/accounts/[account]/council/loading.tsx b/src/app/wallets/[wallet]/accounts/[account]/council/loading.tsx new file mode 100644 index 00000000..94ffa4c7 --- /dev/null +++ b/src/app/wallets/[wallet]/accounts/[account]/council/loading.tsx @@ -0,0 +1,3 @@ +export default function loading() { + return '...isLoading' +} diff --git a/src/pages/council.tsx b/src/app/wallets/[wallet]/accounts/[account]/council/page.tsx similarity index 60% rename from src/pages/council.tsx rename to src/app/wallets/[wallet]/accounts/[account]/council/page.tsx index 7f088971..eed5dfc7 100644 --- a/src/pages/council.tsx +++ b/src/app/wallets/[wallet]/accounts/[account]/council/page.tsx @@ -1,6 +1,7 @@ -import { Card, Text } from 'components' +import { Card } from 'components/Card' +import { Text } from 'components/Text' -const Council = () => { +export default function page() { return (
@@ -11,5 +12,3 @@ const Council = () => {
) } - -export default Council diff --git a/src/app/wallets/[wallet]/accounts/[account]/earn/loading.tsx b/src/app/wallets/[wallet]/accounts/[account]/earn/loading.tsx new file mode 100644 index 00000000..94ffa4c7 --- /dev/null +++ b/src/app/wallets/[wallet]/accounts/[account]/earn/loading.tsx @@ -0,0 +1,3 @@ +export default function loading() { + return '...isLoading' +} diff --git a/src/pages/earn.tsx b/src/app/wallets/[wallet]/accounts/[account]/earn/page.tsx similarity index 74% rename from src/pages/earn.tsx rename to src/app/wallets/[wallet]/accounts/[account]/earn/page.tsx index bf2c6022..0f22c202 100644 --- a/src/pages/earn.tsx +++ b/src/app/wallets/[wallet]/accounts/[account]/earn/page.tsx @@ -1,6 +1,7 @@ -import { Card, Text } from 'components' +import { Card } from 'components/Card' +import { Text } from 'components/Text' -const Earn = () => { +export default function page() { return (
@@ -18,5 +19,3 @@ const Earn = () => {
) } - -export default Earn diff --git a/src/app/wallets/[wallet]/accounts/[account]/page.tsx b/src/app/wallets/[wallet]/accounts/[account]/page.tsx new file mode 100644 index 00000000..992d70d9 --- /dev/null +++ b/src/app/wallets/[wallet]/accounts/[account]/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return 'Trade page' +} diff --git a/src/app/wallets/[wallet]/accounts/[account]/portfolio/error.tsx b/src/app/wallets/[wallet]/accounts/[account]/portfolio/error.tsx new file mode 100644 index 00000000..7e85b0d2 --- /dev/null +++ b/src/app/wallets/[wallet]/accounts/[account]/portfolio/error.tsx @@ -0,0 +1,5 @@ +'use client' + +export default function page({ params }: { params: PageParams }) { + return 'error!' +} diff --git a/src/app/wallets/[wallet]/accounts/[account]/portfolio/page.tsx b/src/app/wallets/[wallet]/accounts/[account]/portfolio/page.tsx new file mode 100644 index 00000000..b388a253 --- /dev/null +++ b/src/app/wallets/[wallet]/accounts/[account]/portfolio/page.tsx @@ -0,0 +1,15 @@ +import { getCreditAccounts } from 'utils/api' + +export default async function page({ params }: { params: PageParams }) { + const creditAccounts = await getCreditAccounts(params.wallet) + + return ( +
+
    + {creditAccounts.map((account: string, index: number) => ( +
  • {account}
  • + ))} +
+
+ ) +} diff --git a/src/app/wallets/[wallet]/accounts/[account]/trade/loading.tsx b/src/app/wallets/[wallet]/accounts/[account]/trade/loading.tsx new file mode 100644 index 00000000..94ffa4c7 --- /dev/null +++ b/src/app/wallets/[wallet]/accounts/[account]/trade/loading.tsx @@ -0,0 +1,3 @@ +export default function loading() { + return '...isLoading' +} diff --git a/src/pages/trade.tsx b/src/app/wallets/[wallet]/accounts/[account]/trade/page.tsx similarity index 73% rename from src/pages/trade.tsx rename to src/app/wallets/[wallet]/accounts/[account]/trade/page.tsx index c90b599a..b073d940 100644 --- a/src/pages/trade.tsx +++ b/src/app/wallets/[wallet]/accounts/[account]/trade/page.tsx @@ -1,7 +1,7 @@ -import { Card, Text } from 'components' -import { TradeActionModule } from 'components/Trade' +import { Card } from 'components/Card' +import { Text } from 'components/Text' -const Trade = () => { +export default function page() { return (
@@ -11,9 +11,7 @@ const Trade = () => {
- - - + {/* */} Orderbook module (optional) @@ -29,5 +27,3 @@ const Trade = () => {
) } - -export default Trade diff --git a/src/app/wallets/[wallet]/borrow/council/page.tsx b/src/app/wallets/[wallet]/borrow/council/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/borrow/council/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/app/wallets/[wallet]/borrow/earn/page.tsx b/src/app/wallets/[wallet]/borrow/earn/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/borrow/earn/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/app/wallets/[wallet]/borrow/page.tsx b/src/app/wallets/[wallet]/borrow/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/borrow/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/app/wallets/[wallet]/borrow/portfolio/page.tsx b/src/app/wallets/[wallet]/borrow/portfolio/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/borrow/portfolio/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/app/wallets/[wallet]/borrow/trade/page.tsx b/src/app/wallets/[wallet]/borrow/trade/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/borrow/trade/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/app/wallets/[wallet]/council/page.tsx b/src/app/wallets/[wallet]/council/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/council/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/app/wallets/[wallet]/earn/page.tsx b/src/app/wallets/[wallet]/earn/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/earn/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/app/wallets/[wallet]/layout.tsx b/src/app/wallets/[wallet]/layout.tsx new file mode 100644 index 00000000..cb2bedf8 --- /dev/null +++ b/src/app/wallets/[wallet]/layout.tsx @@ -0,0 +1,21 @@ +import { AccountNavigation } from 'components/Account/AccountNavigation' +import { getCreditAccounts } from 'utils/api' + +export default async function RootLayout({ + children, + params, +}: { + children: React.ReactNode + params: PageParams +}) { + const creditAccounts = await getCreditAccounts(params.wallet) + + return ( + <> +
+ +
+ {children} + + ) +} diff --git a/src/app/wallets/[wallet]/portfolio/page.tsx b/src/app/wallets/[wallet]/portfolio/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/portfolio/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/app/wallets/[wallet]/trade/page.tsx b/src/app/wallets/[wallet]/trade/page.tsx new file mode 100644 index 00000000..200bf3c3 --- /dev/null +++ b/src/app/wallets/[wallet]/trade/page.tsx @@ -0,0 +1,3 @@ +export default function page() { + return `You are a viewer or a user` +} diff --git a/src/components/Account/AccountDetails.tsx b/src/components/Account/AccountDetails.tsx index 8b39a1a4..dd27b3d8 100644 --- a/src/components/Account/AccountDetails.tsx +++ b/src/components/Account/AccountDetails.tsx @@ -1,20 +1,27 @@ +'use client' + import classNames from 'classnames' import { useEffect, useState } from 'react' -import { Button, LabelValuePair, PositionsList } from 'components' -import { AccountManageOverlay, RiskChart } from 'components/Account' +import { AccountManageOverlay } from 'components/Account/AccountManageOverlay' +import { RiskChart } from 'components/Account/RiskChart' +import { Button } from 'components/Button' import { ArrowRightLine, ChevronDown, ChevronLeft } from 'components/Icons' -import { useAccountStats, useBalances } from 'hooks/data' -import { useAccountDetailsStore, useNetworkConfigStore, useSettingsStore } from 'stores' -import { lookup } from 'utils/formatters' +import { LabelValuePair } from 'components/LabelValuePair' +import { PositionsList } from 'components/PositionsList' +import { useAccountStats } from 'hooks/data/useAccountStats' +import { useBalances } from 'hooks/data/useBalances' +import { convertFromGwei } from 'utils/formatters' import { createRiskData } from 'utils/risk' +import useStore from 'store' +import { getBaseAsset, getMarketAssets } from 'utils/assets' export const AccountDetails = () => { - const enableAnimations = useSettingsStore((s) => s.enableAnimations) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) - const isOpen = useAccountDetailsStore((s) => s.isOpen) - const whitelistedAssets = useNetworkConfigStore((s) => s.assets.whitelist) - const baseAsset = useNetworkConfigStore((s) => s.assets.base) + const enableAnimations = useStore((s) => s.enableAnimations) + const selectedAccount = useStore((s) => s.selectedAccount) + const isOpen = useStore((s) => s.isOpen) + const marketAssets = getMarketAssets() + const baseAsset = getBaseAsset() const balances = useBalances() const accountStats = useAccountStats() @@ -36,7 +43,7 @@ export const AccountDetails = () => { > - ))} -
- {restCreditAccounts.length > 0 && ( - <> - - -
- {restCreditAccounts.map((account) => ( - - ))} -
-
- - )} -
-
- + async function createAccountHandler() { + const accountId = await createCreditAccount({ fee: hardcodedFee }) + if (!accountId) return + router.push(`/wallets/${params.wallet}/accounts/${accountId}`) + } - -
- + return ( +
+ <> + {hasCreditAccounts ? ( + <> + {firstCreditAccounts.map((account) => ( + + ))} +
+ {restCreditAccounts.length > 0 && ( + <> + + +
+ {restCreditAccounts.map((account) => ( + + ))} +
+
+ + )} +
+
+ + + +
+ + ) : ( + <>{address ? : ''} + )} + +
) } diff --git a/src/components/Account/AccountStatus.tsx b/src/components/Account/AccountStatus.tsx index 6d5aa009..b29771db 100644 --- a/src/components/Account/AccountStatus.tsx +++ b/src/components/Account/AccountStatus.tsx @@ -1,22 +1,25 @@ -import BigNumber from 'bignumber.js' -import { useEffect } from 'react' +'use client' + +import BigNumber from 'bignumber.js' -import { Button, FormattedNumber, Gauge, Text } from 'components' import { BorrowCapacity } from 'components/BorrowCapacity' -import { useAccountStats } from 'hooks/data' -import { useCreateCreditAccount } from 'hooks/mutations' -import { useCreditAccounts } from 'hooks/queries' -import { useModalStore, useNetworkConfigStore } from 'stores' +import { Button } from 'components/Button' +import { FormattedNumber } from 'components/FormattedNumber' +import { Gauge } from 'components/Gauge' +import { Text } from 'components/Text' +import { useAccountStats } from 'hooks/data/useAccountStats' +import { useCreditAccounts } from 'hooks/queries/useCreditAccounts' +import { getBaseAsset } from 'utils/assets' import { formatValue } from 'utils/formatters' export const AccountStatus = () => { - const baseAsset = useNetworkConfigStore((s) => s.assets.base) + const baseAsset = getBaseAsset() const accountStats = useAccountStats() const { data: creditAccountsList } = useCreditAccounts() - const { mutate: createCreditAccount, isLoading: isLoadingCreate } = useCreateCreditAccount() - useEffect(() => { - useModalStore.setState({ createAccountModal: isLoadingCreate }) - }, [isLoadingCreate]) + + const createCreditAccount = () => { + console.log('create credit account') + } const hasCreditAccounts = creditAccountsList && creditAccountsList.length > 0 diff --git a/src/components/Account/ConfirmModal.tsx b/src/components/Account/ConfirmModal.tsx index 2be37333..e33003ca 100644 --- a/src/components/Account/ConfirmModal.tsx +++ b/src/components/Account/ConfirmModal.tsx @@ -1,12 +1,16 @@ +'use client' + import classNames from 'classnames' -import { CircularProgress, Modal, Text } from 'components' +import { CircularProgress } from 'components/CircularProgress' import { MarsProtocol } from 'components/Icons' -import { useModalStore } from 'stores' +import { Modal } from 'components/Modal' +import { Text } from 'components/Text' +import useStore from 'store' export const ConfirmModal = () => { - const createOpen = useModalStore((s) => s.createAccountModal) - const deleteOpen = useModalStore((s) => s.deleteAccountModal) + const createOpen = useStore((s) => s.createAccountModal) + const deleteOpen = useStore((s) => s.deleteAccountModal) return ( @@ -23,7 +27,7 @@ export const ConfirmModal = () => {
{createOpen && - 'A small step for a Smart Contracts but a big leap for your financial freedom.'} + 'A small step for a Smart Contract but a big leap for your financial freedom.'} {deleteOpen && 'Some rovers have to be recycled once in a while...'}
diff --git a/src/components/Account/FundAccountModal.tsx b/src/components/Account/FundAccountModal.tsx index ff7a752a..804d250c 100644 --- a/src/components/Account/FundAccountModal.tsx +++ b/src/components/Account/FundAccountModal.tsx @@ -1,28 +1,36 @@ -import { Switch } from '@headlessui/react' -import BigNumber from 'bignumber.js' -import { useEffect, useMemo, useState } from 'react' -import { toast } from 'react-toastify' -import useLocalStorageState from 'use-local-storage-state' +'use client' -import { Button, CircularProgress, Modal, Slider, Text } from 'components' +import { Switch } from '@headlessui/react' +import { useEffect, useMemo, useState } from 'react' +import useSWR from 'swr' + +import { Button } from 'components/Button' +import { CircularProgress } from 'components/CircularProgress' import { MarsProtocol } from 'components/Icons' -import { useDepositCreditAccount } from 'hooks/mutations' -import { useAllBalances, useAllowedCoins } from 'hooks/queries' -import { useAccountDetailsStore, useModalStore, useNetworkConfigStore } from 'stores' +import { Modal } from 'components/Modal' +import { Slider } from 'components/Slider' +import { Text } from 'components/Text' +import useParams from 'hooks/useParams' +import useStore from 'store' +import { getMarketAssets } from 'utils/assets' +import { hardcodedFee } from 'utils/contants' +import { convertFromGwei, convertToGwei } from 'utils/formatters' import { getTokenDecimals, getTokenSymbol } from 'utils/tokens' +import { getAccountDeposits } from 'utils/api' export const FundAccountModal = () => { // --------------- // STORE // --------------- - const open = useModalStore((s) => s.fundAccountModal) - - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) - const whitelistedAssets = useNetworkConfigStore((s) => s.assets.whitelist) - const [lendAssets, setLendAssets] = useLocalStorageState(`lendAssets_${selectedAccount}`, { - defaultValue: false, - }) + const open = useStore((s) => s.fundAccountModal) + const params = useParams() + const depositCreditAccount = useStore((s) => s.depositCreditAccount) + const address = useStore((s) => s.client?.recentWallet.account?.address) + const { data: balancesData, isLoading: balanceIsLoading } = useSWR(address, getAccountDeposits) + const selectedAccount = useStore((s) => s.selectedAccount) + const marketAssets = getMarketAssets() + const [lendAssets, setLendAssets] = useState(false) // --------------- // LOCAL STATE // --------------- @@ -30,41 +38,45 @@ export const FundAccountModal = () => { const [selectedToken, setSelectedToken] = useState('') // --------------- - // EXTERNAL HOOKS + // FUNCTIONS // --------------- - const { data: balancesData } = useAllBalances() - const { data: allowedCoinsData, isLoading: isLoadingAllowedCoins } = useAllowedCoins() - const { mutate, isLoading } = useDepositCreditAccount( - selectedAccount || '', - selectedToken, - BigNumber(amount) - .times(10 ** getTokenDecimals(selectedToken, whitelistedAssets)) - .toNumber(), - { - onSuccess: () => { - setAmount(0) - toast.success( - `${amount} ${getTokenSymbol(selectedToken, whitelistedAssets)} successfully Deposited`, - ) - useModalStore.setState({ fundAccountModal: false }) - }, - }, - ) + async function depositAccountHandler() { + if (!selectedToken) return + const deposit = { + amount: convertToGwei(amount, selectedToken, marketAssets).toString(), + denom: selectedToken, + } + const isSuccess = await depositCreditAccount({ + fee: hardcodedFee, + accountId: params.account, + deposit, + }) + if (isSuccess) { + useStore.setState({ fundAccountModal: false }) + } + } useEffect(() => { - if (allowedCoinsData && allowedCoinsData.length > 0) { - // initialize selected token when allowedCoins fetch data is available - setSelectedToken(allowedCoinsData[0]) - } - }, [allowedCoinsData]) + if (!marketAssets || !balancesData || selectedToken !== '') return + let found = false + marketAssets.map((asset) => { + if (found) return + if (balancesData?.find((balance) => balance.denom === asset.denom)?.amount ?? 0 > 0) { + setSelectedToken(asset.denom) + found = true + } + }) + }, [marketAssets, balancesData]) + // --------------- + // VARIABLES + // --------------- const walletAmount = useMemo(() => { if (!selectedToken) return 0 - - return BigNumber(balancesData?.find((balance) => balance.denom === selectedToken)?.amount ?? 0) - .div(10 ** getTokenDecimals(selectedToken, whitelistedAssets)) - .toNumber() - }, [balancesData, selectedToken, whitelistedAssets]) + const walletAmount = + balancesData?.find((balance) => balance.denom === selectedToken)?.amount ?? 0 + return convertFromGwei(walletAmount, selectedToken, marketAssets) + }, [balancesData, selectedToken, marketAssets]) const handleValueChange = (value: number) => { if (value > walletAmount) { @@ -76,16 +88,15 @@ export const FundAccountModal = () => { } const setOpen = (open: boolean) => { - useModalStore.setState({ fundAccountModal: open }) + useStore.setState({ fundAccountModal: open }) } - const maxValue = walletAmount - const percentageValue = isNaN(amount) ? 0 : (amount * 100) / maxValue + const percentageValue = isNaN(amount) ? 0 : (amount * 100) / walletAmount return (
- {isLoading && ( + {balanceIsLoading && (
@@ -118,68 +129,69 @@ export const FundAccountModal = () => { have any assets in your osmosis wallet use the osmosis bridge to transfer funds to your osmosis wallet. - {isLoadingAllowedCoins ? ( -

Loading...

- ) : ( - <> -
-
- - Asset: - - { + setSelectedToken(e.target.value) - if (e.target.value !== selectedToken) setAmount(0) - }} - value={selectedToken} - > - {allowedCoinsData?.map((entry) => ( - - ))} - -
-
- - Amount: - - handleValueChange(e.target.valueAsNumber)} - onBlur={(e) => { - if (e.target.value === '') setAmount(0) - }} - /> -
+ if (e.target.value !== selectedToken) setAmount(0) + }} + value={selectedToken} + > + {/* {marketAssets?.map((entry) => { + const entrySymbol = getTokenSymbol(entry, marketAssets) + return ( + entrySymbol !== '' && ( + + ) + ) */} + {/* })} */} +
- - {`In wallet: ${walletAmount.toLocaleString()} ${getTokenSymbol( - selectedToken, - whitelistedAssets, - )}`} - - { - const decimal = value[0] / 100 - const tokenDecimals = getTokenDecimals(selectedToken, whitelistedAssets) - // limit decimal precision based on token contract decimals - const newAmount = Number((decimal * maxValue).toFixed(tokenDecimals)) +
+ + Amount: + + handleValueChange(e.target.valueAsNumber)} + onBlur={(e) => { + if (e.target.value === '') setAmount(0) + }} + /> +
+
+ + + {`In wallet: ${walletAmount.toLocaleString()} ${getTokenSymbol( + selectedToken, + marketAssets, + )}`} + + { + const decimal = value[0] / 100 + const tokenDecimals = getTokenDecimals(selectedToken, marketAssets) + // limit decimal precision based on token contract decimals + const newAmount = Number((decimal * walletAmount).toFixed(tokenDecimals)) - setAmount(newAmount) - }} - onMaxClick={() => setAmount(maxValue)} - /> - - )} + setAmount(newAmount) + }} + onMaxClick={() => setAmount(walletAmount)} + />
@@ -207,7 +219,7 @@ export const FundAccountModal = () => {
- - ) -} diff --git a/src/components/FormattedNumber.tsx b/src/components/FormattedNumber.tsx index 94b87a82..78b14cc7 100644 --- a/src/components/FormattedNumber.tsx +++ b/src/components/FormattedNumber.tsx @@ -1,8 +1,10 @@ +'use client' + import classNames from 'classnames' import React, { useEffect, useRef } from 'react' import { animated, useSpring } from 'react-spring' -import { useSettingsStore } from 'stores' +import useStore from 'store' import { formatValue } from 'utils/formatters' export const FormattedNumber = React.memo( @@ -18,7 +20,7 @@ export const FormattedNumber = React.memo( rounded = false, abbreviated = false, }: FormattedNumberProps) => { - const enableAnimations = useSettingsStore((s) => s.enableAnimations) + const enableAnimations = useStore((s) => s.enableAnimations) const prevAmountRef = useRef(0) useEffect(() => { diff --git a/src/components/Gauge.tsx b/src/components/Gauge.tsx index 1e0669b4..9c07fca6 100644 --- a/src/components/Gauge.tsx +++ b/src/components/Gauge.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames' import { ReactNode } from 'react' -import { Tooltip } from 'components' -import { useSettingsStore } from 'stores' +import { Tooltip } from 'components/Tooltip' +import useStore from 'store' interface Props { tooltip: string | ReactNode @@ -20,7 +20,7 @@ export const Gauge = ({ label, tooltip, }: Props) => { - const enableAnimations = useSettingsStore((s) => s.enableAnimations) + const enableAnimations = useStore((s) => s.enableAnimations) const percentage = value * 100 const percentageValue = percentage > 100 ? 100 : percentage < 0 ? 0 : percentage diff --git a/src/components/Icons/index.ts b/src/components/Icons/index.ts index 1c1b0662..ef272fd4 100644 --- a/src/components/Icons/index.ts +++ b/src/components/Icons/index.ts @@ -1,48 +1,48 @@ -// @index(['./*.svg'], f => `export { default as ${f.name} } from '${f.path}.svg'`) -export { default as Add } from './Add.svg' -export { default as ArrowBack } from './ArrowBack.svg' -export { default as ArrowDown } from './ArrowDown.svg' -export { default as ArrowLeftLine } from './ArrowLeftLine.svg' -export { default as ArrowRightLine } from './ArrowRightLine.svg' -export { default as ArrowsLeftRight } from './ArrowsLeftRight.svg' -export { default as ArrowsUpDown } from './ArrowsUpDown.svg' -export { default as ArrowUp } from './ArrowUp.svg' -export { default as BurgerMenu } from './BurgerMenu.svg' -export { default as Check } from './Check.svg' -export { default as ChevronDown } from './ChevronDown.svg' -export { default as ChevronLeft } from './ChevronLeft.svg' -export { default as ChevronRight } from './ChevronRight.svg' -export { default as ChevronUp } from './ChevronUp.svg' -export { default as Close } from './Close.svg' -export { default as Copy } from './Copy.svg' -export { default as Deposit } from './Deposit.svg' -export { default as Discord } from './Discord.svg' -export { default as Edit } from './Edit.svg' -export { default as Ellipsis } from './Ellipsis.svg' -export { default as ExternalLink } from './ExternalLink.svg' -export { default as Failed } from './Failed.svg' -export { default as Github } from './Github.svg' -export { default as Info } from './Info.svg' -export { default as Logo } from './Logo.svg' -export { default as MarsProtocol } from './MarsProtocol.svg' -export { default as Medium } from './Medium.svg' -export { default as Osmo } from './Osmo.svg' -export { default as Questionmark } from './Questionmark.svg' -export { default as Reddit } from './Reddit.svg' -export { default as Rubbish } from './Rubbish.svg' -export { default as Search } from './Search.svg' -export { default as SmallClose } from './SmallClose.svg' -export { default as SortAsc } from './SortAsc.svg' -export { default as SortDesc } from './SortDesc.svg' -export { default as SortNone } from './SortNone.svg' -export { default as Subtract } from './Subtract.svg' -export { default as Success } from './Success.svg' -export { default as Telegram } from './Telegram.svg' -export { default as TriangleDown } from './TriangleDown.svg' -export { default as Twitter } from './Twitter.svg' -export { default as Wallet } from './Wallet.svg' -export { default as WalletConnect } from './WalletConnect.svg' -export { default as Warning } from './Warning.svg' -export { default as Withdraw } from './Withdraw.svg' -export { default as YouTube } from './YouTube.svg' +// @index(['./*.svg'], f => `export { default as ${f.name} } from 'components/Icons/${f.name}.svg'`) +export { default as Add } from 'components/Icons/Add.svg' +export { default as ArrowBack } from 'components/Icons/ArrowBack.svg' +export { default as ArrowDown } from 'components/Icons/ArrowDown.svg' +export { default as ArrowLeftLine } from 'components/Icons/ArrowLeftLine.svg' +export { default as ArrowRightLine } from 'components/Icons/ArrowRightLine.svg' +export { default as ArrowsLeftRight } from 'components/Icons/ArrowsLeftRight.svg' +export { default as ArrowsUpDown } from 'components/Icons/ArrowsUpDown.svg' +export { default as ArrowUp } from 'components/Icons/ArrowUp.svg' +export { default as BurgerMenu } from 'components/Icons/BurgerMenu.svg' +export { default as Check } from 'components/Icons/Check.svg' +export { default as ChevronDown } from 'components/Icons/ChevronDown.svg' +export { default as ChevronLeft } from 'components/Icons/ChevronLeft.svg' +export { default as ChevronRight } from 'components/Icons/ChevronRight.svg' +export { default as ChevronUp } from 'components/Icons/ChevronUp.svg' +export { default as Close } from 'components/Icons/Close.svg' +export { default as Copy } from 'components/Icons/Copy.svg' +export { default as Deposit } from 'components/Icons/Deposit.svg' +export { default as Discord } from 'components/Icons/Discord.svg' +export { default as Edit } from 'components/Icons/Edit.svg' +export { default as Ellipsis } from 'components/Icons/Ellipsis.svg' +export { default as ExternalLink } from 'components/Icons/ExternalLink.svg' +export { default as Failed } from 'components/Icons/Failed.svg' +export { default as Github } from 'components/Icons/Github.svg' +export { default as Info } from 'components/Icons/Info.svg' +export { default as Logo } from 'components/Icons/Logo.svg' +export { default as MarsProtocol } from 'components/Icons/MarsProtocol.svg' +export { default as Medium } from 'components/Icons/Medium.svg' +export { default as Osmo } from 'components/Icons/Osmo.svg' +export { default as Questionmark } from 'components/Icons/Questionmark.svg' +export { default as Reddit } from 'components/Icons/Reddit.svg' +export { default as Rubbish } from 'components/Icons/Rubbish.svg' +export { default as Search } from 'components/Icons/Search.svg' +export { default as SmallClose } from 'components/Icons/SmallClose.svg' +export { default as SortAsc } from 'components/Icons/SortAsc.svg' +export { default as SortDesc } from 'components/Icons/SortDesc.svg' +export { default as SortNone } from 'components/Icons/SortNone.svg' +export { default as Subtract } from 'components/Icons/Subtract.svg' +export { default as Success } from 'components/Icons/Success.svg' +export { default as Telegram } from 'components/Icons/Telegram.svg' +export { default as TriangleDown } from 'components/Icons/TriangleDown.svg' +export { default as Twitter } from 'components/Icons/Twitter.svg' +export { default as Wallet } from 'components/Icons/Wallet.svg' +export { default as WalletConnect } from 'components/Icons/WalletConnect.svg' +export { default as Warning } from 'components/Icons/Warning.svg' +export { default as Withdraw } from 'components/Icons/Withdraw.svg' +export { default as YouTube } from 'components/Icons/YouTube.svg' // @endindex diff --git a/src/components/LabelValuePair.tsx b/src/components/LabelValuePair.tsx index 0e7d76f1..bd240bbf 100644 --- a/src/components/LabelValuePair.tsx +++ b/src/components/LabelValuePair.tsx @@ -1,6 +1,7 @@ import classNames from 'classnames' -import { FormattedNumber, Text } from 'components' +import { Text } from 'components/Text' +import { FormattedNumber } from 'components/FormattedNumber' interface ValueData extends FormattedNumberProps { format?: 'number' | 'string' diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx deleted file mode 100644 index 5730540c..00000000 --- a/src/components/Layout.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { useWallet, WalletConnectionStatus } from '@marsprotocol/wallet-connector' -import classNames from 'classnames' -import React, { useEffect } from 'react' - -import { AccountDetails } from 'components/Account' -import { DesktopNavigation } from 'components/Navigation' -import { useCreditAccounts } from 'hooks/queries' -import { useSettingsStore, useWalletStore } from 'stores' - -import { CookieConsent } from './CookieConsent' - -const filter = { - day: 'brightness-100 hue-rotate-0', - night: '-hue-rotate-82 brightness-30', -} - -export const Layout = ({ children }: { children: React.ReactNode }) => { - const enableAnimations = useSettingsStore((s) => s.enableAnimations) - - const { data: creditAccountsList } = useCreditAccounts() - const hasCreditAccounts = creditAccountsList && creditAccountsList.length > 0 - - const { status, signingCosmWasmClient, chainInfo, address, name } = useWallet() - const initialize = useWalletStore((s) => s.actions.initialize) - - useEffect(() => { - initialize(status, signingCosmWasmClient, address, name, chainInfo) - }, [status, signingCosmWasmClient, chainInfo, address, name, initialize]) - - const isConnected = status === WalletConnectionStatus.Connected - - const backgroundClasses = classNames( - isConnected ? filter.day : filter.night, - 'top-0 left-0 absolute block h-full w-full flex-col bg-body bg-mars bg-desktop bg-top bg-no-repeat filter', - enableAnimations && 'transition-background duration-3000 ease-linear', - ) - - return ( -
-
- -
-
{children}
- {hasCreditAccounts && } -
- -
- ) -} diff --git a/src/components/Loading.tsx b/src/components/Loading.tsx new file mode 100644 index 00000000..6322b116 --- /dev/null +++ b/src/components/Loading.tsx @@ -0,0 +1,28 @@ +import classNames from 'classnames' + +interface Props { + className?: string + count?: number + height?: number + width?: number +} + +export default function Loading(props: Props) { + return ( + <> + {Array.from({ length: props.count ?? 1 }, (_, i) => ( +
+ ))} + Loading... + + ) +} diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index 96ac42f9..a3f9660f 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames' import { ReactNode } from 'react' -import { Card } from 'components' import { Close } from 'components/Icons' +import { Card } from 'components/Card' interface Props { children?: ReactNode | string diff --git a/src/components/Modals.tsx b/src/components/Modals.tsx index c0ecde5e..7a0cb4af 100644 --- a/src/components/Modals.tsx +++ b/src/components/Modals.tsx @@ -1,9 +1,12 @@ -import { ConfirmModal, FundAccountModal, WithdrawModal } from './Account' +'use client' + +import { ConfirmModal } from 'components/Account/ConfirmModal' +import { FundAccountModal } from 'components/Account/FundAccountModal' export const Modals = () => ( <> - + {/* */} ) diff --git a/src/components/Navigation/DesktopNavigation.tsx b/src/components/Navigation/DesktopNavigation.tsx index 5c462c99..2b733b34 100644 --- a/src/components/Navigation/DesktopNavigation.tsx +++ b/src/components/Navigation/DesktopNavigation.tsx @@ -1,33 +1,36 @@ +'use client' + import Link from 'next/link' +import { usePathname } from 'next/navigation' -import { AccountNavigation, AccountStatus } from 'components/Account' import { Logo } from 'components/Icons' -import { menuTree, NavLink, SearchInput } from 'components/Navigation' -import { Wallet } from 'components/Wallet' -import { useCreditAccounts } from 'hooks/queries' -import { useAccountDetailsStore, useWalletStore } from 'stores' +import { NavLink } from 'components/Navigation/NavLink' +import Wallet from 'components/Wallet/Wallet' +import { getRoute } from 'utils/route' -export const DesktopNavigation = () => { - const address = useWalletStore((s) => s.address) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) +export const menuTree: { href: RouteSegment; label: string }[] = [ + { href: 'trade', label: 'Trade' }, + { href: 'earn', label: 'Earn' }, + { href: 'borrow', label: 'Borrow' }, + { href: 'portfolio', label: 'Portfolio' }, + { href: 'council', label: 'Council' }, +] - const { data: creditAccountsList } = useCreditAccounts() - - const isConnected = !!address - const hasCreditAccounts = creditAccountsList && creditAccountsList.length > 0 +export default function DesktopNavigation() { + const pathname = usePathname() || '' return (
- - + +
{menuTree.map((item, index) => ( - + {item.label} ))} @@ -35,19 +38,6 @@ export const DesktopNavigation = () => {
- {/* Sub navigation bar */} -
-
- - {isConnected && hasCreditAccounts && ( - - )} -
- {isConnected && } -
) } diff --git a/src/components/Navigation/NavLink.tsx b/src/components/Navigation/NavLink.tsx index 3ea7ec7f..7c8e8aef 100644 --- a/src/components/Navigation/NavLink.tsx +++ b/src/components/Navigation/NavLink.tsx @@ -1,5 +1,7 @@ +'use client' + import Link from 'next/link' -import { useRouter } from 'next/router' +import { usePathname } from 'next/navigation' import { ReactNode } from 'react' import classNames from 'classnames' @@ -9,19 +11,18 @@ interface Props { } export const NavLink = ({ href, children }: Props) => { - const router = useRouter() - const isActive = router.pathname === href + const pathname = usePathname() + const isActive = pathname === href return ( - - - {children} - + + {children} ) } diff --git a/src/components/Navigation/SearchInput.tsx b/src/components/Navigation/SearchInput.tsx deleted file mode 100644 index b5c10949..00000000 --- a/src/components/Navigation/SearchInput.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { Search } from 'components/Icons' -export const SearchInput = () => ( -
- - - - -
-) diff --git a/src/components/Navigation/index.ts b/src/components/Navigation/index.ts deleted file mode 100644 index 89a98d65..00000000 --- a/src/components/Navigation/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @index(['./*.ts*'], f => `export { ${f.name} } from '${f.path}'`) -export { DesktopNavigation } from './DesktopNavigation' -export { menuTree } from './menuTree' -export { NavLink } from './NavLink' -export { SearchInput } from './SearchInput' -// @endindex diff --git a/src/components/Navigation/menuTree.ts b/src/components/Navigation/menuTree.ts deleted file mode 100644 index 016d6a20..00000000 --- a/src/components/Navigation/menuTree.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const menuTree = [ - { href: '/trade', label: 'Trade' }, - { href: '/earn', label: 'Earn' }, - { href: '/borrow', label: 'Borrow' }, - { href: '/portfolio', label: 'Portfolio' }, - { href: '/council', label: 'Council' }, -] diff --git a/src/components/Overlay/OverlayAction.tsx b/src/components/Overlay/OverlayAction.tsx index 117340ea..2ef3a8bd 100644 --- a/src/components/Overlay/OverlayAction.tsx +++ b/src/components/Overlay/OverlayAction.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames' import { ReactNode } from 'react' -import { Button } from 'components' +import { Button } from 'components/Button' interface Props { className?: string diff --git a/src/components/Overlay/index.ts b/src/components/Overlay/index.ts deleted file mode 100644 index c35f4561..00000000 --- a/src/components/Overlay/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @index(['./*.tsx'], f => `export { ${f.name} } from '${f.path}'`) -export { Overlay } from './Overlay' -export { OverlayAction } from './OverlayAction' -// @endindex diff --git a/src/components/PositionsList.tsx b/src/components/PositionsList.tsx index 6b5f8db3..367df25f 100644 --- a/src/components/PositionsList.tsx +++ b/src/components/PositionsList.tsx @@ -1,6 +1,7 @@ import classNames from 'classnames' -import { FormattedNumber, Text } from 'components' +import { Text } from 'components/Text' +import { FormattedNumber } from 'components/FormattedNumber' interface Props { title: string diff --git a/src/components/RepayModal.tsx b/src/components/RepayModal.tsx index 58c011f8..e70d7fc2 100644 --- a/src/components/RepayModal.tsx +++ b/src/components/RepayModal.tsx @@ -5,12 +5,18 @@ import React, { useMemo, useState } from 'react' import { NumericFormat } from 'react-number-format' import { toast } from 'react-toastify' -import { Button, CircularProgress, ContainerSecondary, Slider } from 'components' -import { useRepayFunds } from 'hooks/mutations' -import { useAllBalances, useCreditAccountPositions, useTokenPrices } from 'hooks/queries' -import { useAccountDetailsStore, useNetworkConfigStore } from 'stores' +import { Button } from 'components/Button' +import { CircularProgress } from 'components/CircularProgress' +import { ContainerSecondary } from 'components/ContainerSecondary' +import { Slider } from 'components/Slider' +import { useRepayFunds } from 'hooks/mutations/useRepayFunds' +import { useAllBalances } from 'hooks/queries/useAllBalances' +import { useCreditAccountPositions } from 'hooks/queries/useCreditAccountPositions' +import { useTokenPrices } from 'hooks/queries/useTokenPrices' import { formatCurrency } from 'utils/formatters' import { getTokenDecimals, getTokenSymbol } from 'utils/tokens' +import { getMarketAssets } from 'utils/assets' +import useStore from 'store' // 0.001% buffer / slippage to avoid repay action from not fully repaying the debt amount const REPAY_BUFFER = 1.00001 @@ -24,11 +30,11 @@ type Props = { export const RepayModal = ({ show, onClose, tokenDenom }: Props) => { const [amount, setAmount] = useState(0) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) + const selectedAccount = useStore((s) => s.selectedAccount) const { data: positionsData } = useCreditAccountPositions(selectedAccount ?? '') - const whitelistedAssets = useNetworkConfigStore((s) => s.assets.whitelist) + const marketAssets = getMarketAssets() - const tokenSymbol = getTokenSymbol(tokenDenom, whitelistedAssets) + const tokenSymbol = getTokenSymbol(tokenDenom, marketAssets) const maxRepayAmount = useMemo(() => { const tokenDebtAmount = @@ -37,13 +43,13 @@ export const RepayModal = ({ show, onClose, tokenDenom }: Props) => { return BigNumber(tokenDebtAmount) .times(REPAY_BUFFER) .decimalPlaces(0) - .div(10 ** getTokenDecimals(tokenDenom, whitelistedAssets)) + .div(10 ** getTokenDecimals(tokenDenom, marketAssets)) .toNumber() - }, [positionsData, tokenDenom, whitelistedAssets]) + }, [positionsData, tokenDenom, marketAssets]) const { mutate, isLoading } = useRepayFunds( BigNumber(amount) - .times(10 ** getTokenDecimals(tokenDenom, whitelistedAssets)) + .times(10 ** getTokenDecimals(tokenDenom, marketAssets)) .toNumber(), tokenDenom, { @@ -63,9 +69,9 @@ export const RepayModal = ({ show, onClose, tokenDenom }: Props) => { const walletAmount = useMemo(() => { return BigNumber(balancesData?.find((balance) => balance.denom === tokenDenom)?.amount ?? 0) - .div(10 ** getTokenDecimals(tokenDenom, whitelistedAssets)) + .div(10 ** getTokenDecimals(tokenDenom, marketAssets)) .toNumber() - }, [balancesData, tokenDenom, whitelistedAssets]) + }, [balancesData, tokenDenom, marketAssets]) const tokenPrice = tokenPrices?.[tokenDenom] ?? 0 @@ -143,7 +149,7 @@ export const RepayModal = ({ show, onClose, tokenDenom }: Props) => { allowNegative={false} onValueChange={(v) => handleValueChange(v.floatValue || 0)} suffix={` ${tokenSymbol}`} - decimalScale={getTokenDecimals(tokenDenom, whitelistedAssets)} + decimalScale={getTokenDecimals(tokenDenom, marketAssets)} />
@@ -158,7 +164,7 @@ export const RepayModal = ({ show, onClose, tokenDenom }: Props) => { value={percentageValue} onChange={(value) => { const decimal = value[0] / 100 - const tokenDecimals = getTokenDecimals(tokenDenom, whitelistedAssets) + const tokenDecimals = getTokenDecimals(tokenDenom, marketAssets) // limit decimal precision based on token contract decimals const newAmount = Number((decimal * maxValue).toFixed(tokenDecimals)) diff --git a/src/components/Toaster.tsx b/src/components/Toaster.tsx new file mode 100644 index 00000000..f37dc8de --- /dev/null +++ b/src/components/Toaster.tsx @@ -0,0 +1,18 @@ +'use client' +import { Slide, ToastContainer } from 'react-toastify' + +import useStore from 'store' + +export default function Toaster() { + const enableAnimations = useStore((s) => s.enableAnimations) + + return ( + + ) +} diff --git a/src/components/Tooltip.tsx b/src/components/Tooltip.tsx index a8e1e55d..b552fe8b 100644 --- a/src/components/Tooltip.tsx +++ b/src/components/Tooltip.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames' import { ReactNode } from 'react' import { Questionmark } from 'components/Icons' -import { useSettingsStore } from 'stores' +import useStore from 'store' interface Props { children?: ReactNode | string @@ -22,7 +22,7 @@ export const Tooltip = ({ inderactive = false, underline = false, }: Props) => { - const enableAnimations = useSettingsStore((s) => s.enableAnimations) + const enableAnimations = useStore((s) => s.enableAnimations) return ( { - const whitelistedAssets = useNetworkConfigStore((s) => s.assets.whitelist) + const marketAssets = getMarketAssets() const [selectedTokenIn, setSelectedTokenIn] = useState('') const [selectedTokenOut, setSelectedTokenOut] = useState('') @@ -34,7 +37,7 @@ export const TradeActionModule = () => { const [isMarginEnabled, setIsMarginEnabled] = React.useState(false) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) + const selectedAccount = useStore((s) => s.selectedAccount) const { data: allowedCoinsData } = useAllowedCoins() const { data: balancesData } = useAllBalances() @@ -96,8 +99,8 @@ export const TradeActionModule = () => { toast.success( `${amountIn} ${getTokenSymbol( selectedTokenIn, - whitelistedAssets, - )} swapped for ${amountOut} ${getTokenSymbol(selectedTokenOut, whitelistedAssets)}`, + marketAssets, + )} swapped for ${amountOut} ${getTokenSymbol(selectedTokenOut, marketAssets)}`, ) resetAmounts() }, @@ -192,20 +195,20 @@ export const TradeActionModule = () => { > {allowedCoinsData?.map((entry) => ( ))} { const valueAsNumber = e.target.valueAsNumber const valueWithDecimals = - valueAsNumber * 10 ** getTokenDecimals(selectedTokenIn, whitelistedAssets) + valueAsNumber * 10 ** getTokenDecimals(selectedTokenIn, marketAssets) handleAmountChange(valueWithDecimals, 'in') }} @@ -232,20 +235,20 @@ export const TradeActionModule = () => { > {allowedCoinsData?.map((entry) => ( ))} { const valueAsNumber = e.target.valueAsNumber const valueWithDecimals = - valueAsNumber * 10 ** getTokenDecimals(selectedTokenOut, whitelistedAssets) + valueAsNumber * 10 ** getTokenDecimals(selectedTokenOut, marketAssets) handleAmountChange(valueWithDecimals, 'out') }} @@ -255,29 +258,29 @@ export const TradeActionModule = () => {
In Wallet:{' '} {BigNumber(walletAmount) - .dividedBy(10 ** getTokenDecimals(selectedTokenIn, whitelistedAssets)) + .dividedBy(10 ** getTokenDecimals(selectedTokenIn, marketAssets)) .toNumber() .toLocaleString(undefined, { - maximumFractionDigits: getTokenDecimals(selectedTokenIn, whitelistedAssets), + maximumFractionDigits: getTokenDecimals(selectedTokenIn, marketAssets), })}{' '} - {getTokenSymbol(selectedTokenIn, whitelistedAssets)} + {getTokenSymbol(selectedTokenIn, marketAssets)}
In Account:{' '} {BigNumber(accountAmount) - .dividedBy(10 ** getTokenDecimals(selectedTokenIn, whitelistedAssets)) + .dividedBy(10 ** getTokenDecimals(selectedTokenIn, marketAssets)) .toNumber() .toLocaleString(undefined, { - maximumFractionDigits: getTokenDecimals(selectedTokenIn, whitelistedAssets), + maximumFractionDigits: getTokenDecimals(selectedTokenIn, marketAssets), })}{' '} - {getTokenSymbol(selectedTokenIn, whitelistedAssets)} + {getTokenSymbol(selectedTokenIn, marketAssets)}
{ const decimal = value[0] / 100 - const tokenDecimals = getTokenDecimals(selectedTokenIn, whitelistedAssets) + const tokenDecimals = getTokenDecimals(selectedTokenIn, marketAssets) // limit decimal precision based on token contract decimals const newAmount = Number((decimal * maxAmount).toFixed(0)) @@ -313,10 +316,10 @@ export const TradeActionModule = () => {

{isMarginEnabled ? BigNumber(borrowAmount) - .dividedBy(10 ** getTokenDecimals(selectedTokenIn, whitelistedAssets)) + .dividedBy(10 ** getTokenDecimals(selectedTokenIn, marketAssets)) .toNumber() .toLocaleString(undefined, { - maximumFractionDigits: getTokenDecimals(selectedTokenIn, whitelistedAssets), + maximumFractionDigits: getTokenDecimals(selectedTokenIn, marketAssets), }) : '-'}

diff --git a/src/components/Trade/index.ts b/src/components/Trade/index.ts deleted file mode 100644 index 92560f88..00000000 --- a/src/components/Trade/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @index(['./*.tsx'], f => `export { ${f.name} } from '${f.path}'`) -export { TradeActionModule } from './TradeActionModule' -// @endindex diff --git a/src/components/Wallet/ConnectButton.tsx b/src/components/Wallet/ConnectButton.tsx index a38e39cd..69fc7a44 100644 --- a/src/components/Wallet/ConnectButton.tsx +++ b/src/components/Wallet/ConnectButton.tsx @@ -1,7 +1,7 @@ import { useWalletManager, WalletConnectionStatus } from '@marsprotocol/wallet-connector' import { ReactNode } from 'react' -import { CircularProgress } from 'components' +import { CircularProgress } from 'components/CircularProgress' import { Wallet } from 'components/Icons' interface Props { @@ -10,17 +10,17 @@ interface Props { status?: WalletConnectionStatus } -export const ConnectButton = ({ textOverride, disabled = false, status }: Props) => { +export default function ConnectButton(props: Props) { const { connect } = useWalletManager() return (
diff --git a/src/components/Wallet/ConnectedButton.tsx b/src/components/Wallet/ConnectedButton.tsx index a254a0b9..2da452e5 100644 --- a/src/components/Wallet/ConnectedButton.tsx +++ b/src/components/Wallet/ConnectedButton.tsx @@ -1,61 +1,69 @@ -import { ChainInfoID, SimpleChainInfoList, useWalletManager } from '@marsprotocol/wallet-connector' +import { Coin } from '@cosmjs/stargate' +import { + ChainInfoID, + SimpleChainInfoList, + useWallet, + useWalletManager, +} from '@marsprotocol/wallet-connector' import BigNumber from 'bignumber.js' import classNames from 'classnames' import { useCallback, useEffect, useState } from 'react' import useClipboard from 'react-use-clipboard' +import useSWR from 'swr' -import { Button, CircularProgress, FormattedNumber, Text } from 'components' -import { Check, Copy, ExternalLink, Osmo, Wallet } from 'components/Icons' -import { Overlay } from 'components/Overlay' -import { useAllBalances } from 'hooks/queries' -import { useNetworkConfigStore, useWalletStore } from 'stores' +import { Button } from 'components/Button' +import { CircularProgress } from 'components/CircularProgress' +import { FormattedNumber } from 'components/FormattedNumber' +import { Check, Copy, ExternalLink, Osmo } from 'components/Icons' +import { Overlay } from 'components/Overlay/Overlay' +import { Text } from 'components/Text' +import useStore from 'store' +import { getBaseAsset } from 'utils/assets' import { formatValue, truncate } from 'utils/formatters' +import { getWalletBalances } from 'utils/api' -export const ConnectedButton = () => { +export default function ConnectedButton() { // --------------- // EXTERNAL HOOKS // --------------- - const { disconnect } = useWalletManager() - const address = useWalletStore((s) => s.address) - const chainInfo = useWalletStore((s) => s.chainInfo) - const name = useWalletStore((s) => s.name) - const baseAsset = useNetworkConfigStore((s) => s.assets.base) + const { disconnect } = useWallet() + const { disconnect: terminate } = useWalletManager() + const address = useStore((s) => s.client?.recentWallet.account?.address) + const network = useStore((s) => s.client?.recentWallet.network) + const name = useStore((s) => s.name) + const baseAsset = getBaseAsset() - // --------------- - // LOCAL HOOKS - // --------------- - const { data } = useAllBalances() + const { data, isLoading } = useSWR(address, getWalletBalances) // --------------- // LOCAL STATE // --------------- - const [isLoading, setIsLoading] = useState(false) const [showDetails, setShowDetails] = useState(false) const [walletAmount, setWalletAmount] = useState(0) const [isCopied, setCopied] = useClipboard(address || '', { successDuration: 1000 * 5, }) - // --------------- // VARIABLES // --------------- - const explorerName = - chainInfo && SimpleChainInfoList[chainInfo.chainId as ChainInfoID].explorerName + const explorerName = network && SimpleChainInfoList[network.chainId as ChainInfoID].explorerName const viewOnFinder = useCallback(() => { - const explorerUrl = chainInfo && SimpleChainInfoList[chainInfo.chainId as ChainInfoID].explorer + const explorerUrl = network && SimpleChainInfoList[network.chainId as ChainInfoID].explorer - window.open(`${explorerUrl}account/${address}`, '_blank') - }, [chainInfo, address]) - - useEffect(() => { - const loading = !(address && name && chainInfo) - setIsLoading(loading) - }, [address, name, chainInfo]) + window.open(`${explorerUrl}/account/${address}`, '_blank') + }, [network, address]) + + const disconnectWallet = () => { + disconnect() + terminate() + useStore.setState({ client: undefined }) + } useEffect(() => { + if (!data || data.length === 0) return setWalletAmount( - BigNumber(data?.find((balance) => balance.denom === baseAsset.denom)?.amount ?? 0) + BigNumber(data?.find((coin: Coin) => coin.denom === baseAsset.denom)?.amount ?? 0) .div(10 ** baseAsset.decimals) .toNumber(), ) @@ -63,13 +71,13 @@ export const ConnectedButton = () => { return (
- {chainInfo?.chainId !== ChainInfoID.Osmosis1 && ( + {network?.chainId !== ChainInfoID.Osmosis1 && ( - {chainInfo?.chainId} + {network?.chainId} )} @@ -84,12 +92,7 @@ export const ConnectedButton = () => { }} > - {chainInfo?.chainId === ChainInfoID.Osmosis1 || - chainInfo?.chainId === ChainInfoID.OsmosisTestnet ? ( - - ) : ( - - )} + {name ? name : truncate(address, [2, 4])}
{ 'before:content-[" "] before:absolute before:top-1.5 before:bottom-1.5 before:left-0 before:h-[calc(100%-12px)] before:border-l before:border-white', )} > - {!isLoading ? ( - `${formatValue(walletAmount, 2, 2, true, false, ` ${baseAsset.symbol}`)}` - ) : ( + {isLoading ? ( + ) : ( + `${formatValue(walletAmount, 2, 2, true, false, ` ${baseAsset.symbol}`)}` )}
@@ -121,7 +124,7 @@ export const ConnectedButton = () => {
-
diff --git a/src/components/Wallet/Wallet.tsx b/src/components/Wallet/Wallet.tsx index 53cc5c01..fc428f64 100644 --- a/src/components/Wallet/Wallet.tsx +++ b/src/components/Wallet/Wallet.tsx @@ -1,18 +1,65 @@ -import { useWallet, WalletConnectionStatus } from '@marsprotocol/wallet-connector' +'use client' + +import { + getClient, + useWallet, + useWalletManager, + WalletConnectionStatus, +} from '@marsprotocol/wallet-connector' import { useEffect, useState } from 'react' +import { useRouter } from 'next/navigation' -import { ConnectButton, ConnectedButton } from 'components/Wallet' +import ConnectButton from 'components/Wallet/ConnectButton' +import ConnectedButton from 'components/Wallet/ConnectedButton' +import useParams from 'hooks/useParams' +import useStore from 'store' -export const Wallet = () => { - const { status } = useWallet() +export default function Wallet() { + const router = useRouter() + const params = useParams() + const { status } = useWalletManager() const [isConnected, setIsConnected] = useState(false) + const { recentWallet, simulate, sign, broadcast } = useWallet() + const client = useStore((s) => s.client) useEffect(() => { const connectedStatus = status === WalletConnectionStatus.Connected - if (connectedStatus !== isConnected) { - setIsConnected(connectedStatus) - } + if (connectedStatus === isConnected) return + setIsConnected(connectedStatus) }, [status, isConnected]) - return !isConnected ? : + useEffect(() => { + if (!isConnected && !params.wallet) { + router.push('/') + return + } + + const address = client?.recentWallet.account.address + if (!address || address === params.wallet) return + + router.push(`/wallets/${client.recentWallet.account.address}`) + }, [client, params, isConnected]) + + useEffect(() => { + if (!recentWallet) return + if (!client) { + const getCosmWasmClient = async () => { + const cosmClient = await getClient(recentWallet.network.rpc) + + const client = { + broadcast, + cosmWasmClient: cosmClient, + recentWallet, + sign, + simulate, + } + useStore.setState({ client }) + } + + getCosmWasmClient() + + return + } + }, [simulate, sign, recentWallet, broadcast]) + return isConnected ? : } diff --git a/src/components/Wallet/WalletConnectProvider.tsx b/src/components/Wallet/WalletConnectProvider.tsx index 20b1d77b..5071c368 100644 --- a/src/components/Wallet/WalletConnectProvider.tsx +++ b/src/components/Wallet/WalletConnectProvider.tsx @@ -1,89 +1,40 @@ -import { ChainInfoID, WalletManagerProvider, WalletType } from '@marsprotocol/wallet-connector' -import classNames from 'classnames' +'use client' + +import { WalletManagerProvider } from '@marsprotocol/wallet-connector' import { FC } from 'react' -import { CircularProgress } from 'components' -import { buttonColorClasses, buttonSizeClasses, buttonVariantClasses } from 'components/Button' -import { Close } from 'components/Icons' -// TODO: get networkConfig source dynamically -import { networkConfig } from 'config/osmo-test-4' -import KeplrImage from 'images/wallets/keplr-wallet-extension.png' -import WalletConnectImage from 'images/wallets/walletconnect-keplr.png' -import { useSettingsStore } from 'stores' +import { CircularProgress } from 'components/CircularProgress' +import { CHAIN_ID, ENV_MISSING_MESSAGE, URL_REST, URL_RPC, WALLETS } from 'constants/env' type Props = { children?: React.ReactNode } export const WalletConnectProvider: FC = ({ children }) => { - const enableAnimations = useSettingsStore((s) => s.enableAnimations) + if (!CHAIN_ID || !URL_REST || !URL_RPC || !WALLETS) { + console.error(ENV_MISSING_MESSAGE) + return null + } + + const chainInfoOverrides = { + rpc: URL_RPC, + rest: URL_REST, + chainID: CHAIN_ID, + } + const enabledWallets: string[] = WALLETS + return ( - - - } - defaultChainId={ChainInfoID.OsmosisTestnet} - enabledWalletTypes={[WalletType.Keplr, WalletType.WalletConnectKeplr]} - enablingMeta={{ - text: 'If nothing shows up in your wallet try to connect again, by clicking on the button below. Refresh the page if the problem persists.', - textClassName: 'block w-full text-center text-base text-white', - buttonText: 'Retry the Connection', - buttonClassName: classNames( - 'cursor-pointer appearance-none break-normal rounded-3xl outline-none', - enableAnimations && 'transition-colors', - buttonColorClasses.primary, - buttonSizeClasses.small, - buttonVariantClasses.solid, - ), - contentClassName: 'flex flex-wrap w-full justify-center', - }} - enablingStringOverride='connecting to wallet' - localStorageKey='walletConnection' + chainInfoOverrides={chainInfoOverrides} + // closeIcon={} + defaultChainId={chainInfoOverrides.chainID} + enabledWallets={enabledWallets} + persistent renderLoader={() => ( -
+
)} - walletConnectClientMeta={{ - name: 'Mars Protocol', - description: 'Mars V2 Description', - url: 'https://marsprotocol.io', - icons: ['https://marsprotocol.io/favicon.svg'], - }} - walletMetaOverride={{ - [WalletType.Keplr]: { - description: 'Keplr browser extension', - imageUrl: KeplrImage.src, - }, - [WalletType.WalletConnectKeplr]: { - name: 'Wallet Connect', - description: 'Keplr mobile WalletConnect', - imageUrl: WalletConnectImage.src, - }, - }} > {children} diff --git a/src/components/Wallet/index.ts b/src/components/Wallet/index.ts deleted file mode 100644 index 7d19ade0..00000000 --- a/src/components/Wallet/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @index(['./*.tsx'], f => `export { ${f.name} } from '${f.path}'`) -export { ConnectButton } from './ConnectButton' -export { ConnectedButton } from './ConnectedButton' -export { Wallet } from './Wallet' -export { WalletConnectProvider } from './WalletConnectProvider' -// @endindex diff --git a/src/pages/borrow.tsx b/src/components/borrow_page.tsx similarity index 78% rename from src/pages/borrow.tsx rename to src/components/borrow_page.tsx index 7f2f5626..ca23c7be 100644 --- a/src/pages/borrow.tsx +++ b/src/components/borrow_page.tsx @@ -1,17 +1,19 @@ import BigNumber from 'bignumber.js' import { useMemo, useRef, useState } from 'react' -import { BorrowModal, Card, RepayModal, Text } from 'components' -import { BorrowTable } from 'components/Borrow' -import { - useAllowedCoins, - useCreditAccountPositions, - useMarkets, - useRedbankBalances, - useTokenPrices, -} from 'hooks/queries' -import { useAccountDetailsStore, useNetworkConfigStore } from 'stores' +import { BorrowTable } from 'components/Borrow/BorrowTable' +import { BorrowModal } from 'components/BorrowModal' +import { Card } from 'components/Card' +import { RepayModal } from 'components/RepayModal' +import { useAllowedCoins } from 'hooks/queries/useAllowedCoins' +import { useCreditAccountPositions } from 'hooks/queries/useCreditAccountPositions' +import { useMarkets } from 'hooks/queries/useMarkets' +import { useRedbankBalances } from 'hooks/queries/useRedbankBalances' +import { useTokenPrices } from 'hooks/queries/useTokenPrices' +import { Text } from 'components/Text' import { getTokenDecimals, getTokenInfo } from 'utils/tokens' +import useStore from 'store' +import { getMarketAssets } from 'utils/assets' type ModalState = { show: 'borrow' | 'repay' | false @@ -21,14 +23,14 @@ type ModalState = { } const Borrow = () => { - const whitelistedAssets = useNetworkConfigStore((s) => s.assets.whitelist) + const marketAssets = getMarketAssets() const [modalState, setModalState] = useState({ show: false, data: { tokenDenom: '' }, }) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) + const selectedAccount = useStore((s) => s.selectedAccount) const { data: allowedCoinsData } = useAllowedCoins() const { data: positionsData } = useCreditAccountPositions(selectedAccount ?? '') @@ -55,17 +57,17 @@ const Borrow = () => { allowedCoinsData ?.filter((denom) => borrowedAssetsMap.has(denom)) .map((denom) => { - const { symbol, name, logo } = getTokenInfo(denom, whitelistedAssets) + const { symbol, name, logo } = getTokenInfo(denom, marketAssets) const borrowRate = Number(marketsData?.[denom].borrow_rate) || 0 const marketLiquidity = BigNumber( redbankBalances?.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase()) ?.amount || 0, ) - .div(10 ** getTokenDecimals(denom, whitelistedAssets)) + .div(10 ** getTokenDecimals(denom, marketAssets)) .toNumber() const borrowAmount = BigNumber(borrowedAssetsMap.get(denom) as string) - .div(10 ** getTokenDecimals(denom, whitelistedAssets)) + .div(10 ** getTokenDecimals(denom, marketAssets)) .toNumber() const borrowValue = borrowAmount * (tokenPrices?.[denom] ?? 0) @@ -88,13 +90,13 @@ const Borrow = () => { allowedCoinsData ?.filter((denom) => !borrowedAssetsMap.has(denom)) .map((denom) => { - const { symbol, name, logo } = getTokenInfo(denom, whitelistedAssets) + const { symbol, name, logo } = getTokenInfo(denom, marketAssets) const borrowRate = Number(marketsData?.[denom].borrow_rate) || 0 const marketLiquidity = BigNumber( redbankBalances?.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase()) ?.amount || 0, ) - .div(10 ** getTokenDecimals(denom, whitelistedAssets)) + .div(10 ** getTokenDecimals(denom, marketAssets)) .toNumber() const rowData = { @@ -110,14 +112,7 @@ const Borrow = () => { return rowData }) ?? [], } - }, [ - allowedCoinsData, - borrowedAssetsMap, - marketsData, - redbankBalances, - tokenPrices, - whitelistedAssets, - ]) + }, [allowedCoinsData, borrowedAssetsMap, marketsData, redbankBalances, tokenPrices, marketAssets]) const handleBorrowClick = (denom: string) => { setModalState({ show: 'borrow', data: { tokenDenom: denom } }) diff --git a/src/components/index.ts b/src/components/index.ts deleted file mode 100644 index 6cfdd217..00000000 --- a/src/components/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// @index(['./*.tsx'], f => `export { ${f.name} } from '${f.path}'`) -export { BorrowCapacity } from './BorrowCapacity' -export { BorrowModal } from './BorrowModal' -export { Button } from './Button' -export { Card } from './Card' -export { CircularProgress } from './CircularProgress' -export { ContainerSecondary } from './ContainerSecondary' -export { CookieConsent } from './CookieConsent' -export { FormattedNumber } from './FormattedNumber' -export { Gauge } from './Gauge' -export { LabelValuePair } from './LabelValuePair' -export { Layout } from './Layout' -export { Modal } from './Modal' -export { Modals } from './Modals' -export { PositionsList } from './PositionsList' -export { ProgressBar } from './ProgressBar' -export { RepayModal } from './RepayModal' -export { Slider } from './Slider' -export { Text } from './Text' -export { TextLink } from './TextLink' -export { Tooltip } from './Tooltip' -// @endindex diff --git a/src/config/osmo-test-4.ts b/src/config/osmo-test-4.ts deleted file mode 100644 index 858d1b37..00000000 --- a/src/config/osmo-test-4.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { ChainInfoID } from '@marsprotocol/wallet-connector' - -const Assets: { [key: string]: Asset } = { - osmo: { - symbol: 'OSMO', - name: 'Osmosis', - denom: 'uosmo', - color: '#9f1ab9', - decimals: 6, - hasOraclePrice: true, - logo: '/tokens/osmo.svg', - }, - atom: { - symbol: 'ATOM', - name: 'Atom', - denom: 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2', - color: '#6f7390', - logo: '/tokens/atom.svg', - decimals: 6, - hasOraclePrice: true, - }, - cro: { - symbol: 'CRO', - name: 'Cronos', - denom: 'ibc/E6931F78057F7CC5DA0FD6CEF82FF39373A6E0452BF1FD76910B93292CF356C1', - color: '#002D74', - logo: '/tokens/cro.svg', - decimals: 8, - hasOraclePrice: true, - }, -} - -const OtherAssets: { [key: string]: OtherAsset } = { - mars: { - symbol: 'MARS', - name: 'Mars', - denom: 'ibc/EA3E1640F9B1532AB129A571203A0B9F789A7F14BB66E350DCBFA18E1A1931F0', - //denom: 'ibc/1BF910A3C8A30C8E3331764FA0113B920AE14B913F487DF7E1989FD75EFE61FD' - color: '#a03b45', - logo: '/tokens/mars.svg', - decimals: 6, - hasOraclePrice: true, - poolId: 601, - }, -} - -export const networkConfig: NetworkConfig = { - name: ChainInfoID.OsmosisTestnet, - hiveUrl: 'https://osmosis-delphi-testnet-1.simply-vc.com.mt/XF32UOOU55CX/osmosis-hive/graphql', - rpcUrl: 'https://osmosis-delphi-testnet-1.simply-vc.com.mt/XF32UOOU55CX/osmosis-rpc', - restUrl: 'https://osmosis-delphi-testnet-1.simply-vc.com.mt/XF32UOOU55CX/osmosis-lcd', - contracts: { - accountNft: 'osmo1xvne7u9svgy9vtqtqnaet4nvn8zcpp984zzrlezfzgk4798tps8srkf5wa', - mockVault: 'osmo1yqgjaehalz0pv5j22fdnaaekuprlggd7hth8m66jmdxe58ztqs4sjqtrlk', - marsOracleAdapter: 'osmo1tlad2hj9rm7az7atx2qq8pdpl2007hrhpzua42j8wgxr0kc0ct4sahuyh7', - swapper: 'osmo15kxcpvjaqlrj8ezecnghf2qs2x87veqx0fcemye0jpdr8jq7qkvsnyvuuf', - mockZapper: 'osmo1axad429tgnvzvfax08s4ytmf7ndg0f9z4jy355zyh4m6nasgtnzs5aw8u7', - creditManager: 'osmo1krz37p6xkkyu0f240enyt4ccxk7ds69kfgc5pnldsmpmmuvn3vpsnmpjaf', - redBank: 'osmo1g30recyv8pfy3qd4qn3dn7plc0rn5z68y5gn32j39e96tjhthzxsw3uvvu', - oracle: 'osmo1hkkx42777dyfz7wc8acjjhfdh9x2ugcjvdt7shtft6ha9cn420cquz3u3j', - }, - assets: { - base: Assets.osmo, - whitelist: [Assets.osmo, Assets.atom, Assets.cro], - other: [OtherAssets.mars], - }, - appUrl: 'https://testnet.osmosis.zone', -} diff --git a/src/constants/assets.ts b/src/constants/assets.ts new file mode 100644 index 00000000..7a23cebb --- /dev/null +++ b/src/constants/assets.ts @@ -0,0 +1,62 @@ +import { IS_TESTNET } from 'constants/env' + +export const ASSETS: Asset[] = [ + { + symbol: 'OSMO', + name: 'Osmosis', + denom: 'uosmo', + color: '#9f1ab9', + decimals: 6, + hasOraclePrice: true, + logo: '/tokens/osmo.svg', + isEnabled: true, + isMarket: true, + }, + { + symbol: 'ATOM', + name: 'Atom', + denom: 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2', + color: '#6f7390', + logo: '/tokens/atom.svg', + decimals: 6, + hasOraclePrice: true, + isEnabled: IS_TESTNET ? true : false, + isMarket: true, + }, + { + symbol: 'CRO', + name: 'Cronos', + denom: 'ibc/E6931F78057F7CC5DA0FD6CEF82FF39373A6E0452BF1FD76910B93292CF356C1', + color: '#002D74', + logo: '/tokens/cro.svg', + decimals: 8, + hasOraclePrice: true, + isEnabled: false, + isMarket: true, + }, + { + symbol: 'MARS', + name: 'Mars', + denom: IS_TESTNET + ? 'ibc/ACA4C8A815A053CC027DB90D15915ADA31939FA331CE745862CDD00A2904FA17' + : 'ibc/573FCD90FACEE750F55A8864EF7D38265F07E5A9273FA0E8DAFD39951332B580', + color: '#dd5b65', + logo: '/tokens/mars.svg', + decimals: 6, + poolId: IS_TESTNET ? 768 : 907, + hasOraclePrice: true, + isMarket: false, + isEnabled: true, + }, + { + symbol: 'JUNO', + name: 'Juno', + denom: 'ibc/46B44899322F3CD854D2D46DEEF881958467CDD4B3B10086DA49296BBED94BED', + color: 'black', + logo: '/tokens/juno.svg', + decimals: 6, + hasOraclePrice: true, + isMarket: IS_TESTNET, + isEnabled: false, + }, +] diff --git a/src/constants/env.ts b/src/constants/env.ts new file mode 100644 index 00000000..00d52699 --- /dev/null +++ b/src/constants/env.ts @@ -0,0 +1,18 @@ +export const ADDRESS_ACCOUNT_NFT = process.env.NEXT_PUBLIC_ACCOUNT_NFT +export const ADDRESS_CREDIT_MANAGER = process.env.NEXT_PUBLIC_CREDIT_MANAGER +export const ADDRESS_INCENTIVES = process.env.NEXT_PUBLIC_INCENTIVES +export const ADDRESS_ORACLE = process.env.NEXT_PUBLIC_ORACLE +export const ADDRESS_RED_BANK = process.env.NEXT_PUBLIC_RED_BANK +export const ADDRESS_SWAPPER = process.env.NEXT_PUBLIC_SWAPPER +export const ADDRESS_ZAPPER = process.env.NEXT_PUBLIC_ZAPPER + +export const CHAIN_ID = process.env.NEXT_PUBLIC_CHAIN_ID +export const NETWORK = process.env.NEXT_PUBLIC_NETWORK +export const IS_TESTNET = NETWORK !== 'mainnet' +export const URL_GQL = process.env.NEXT_PUBLIC_GQL +export const URL_REST = process.env.NEXT_PUBLIC_REST +export const URL_RPC = process.env.NEXT_PUBLIC_RPC +export const URL_API = process.env.NEXT_PUBLIC_API +export const WALLETS = process.env.NEXT_PUBLIC_WALLETS?.split(',') ?? [] + +export const ENV_MISSING_MESSAGE = 'Environment variable missing' diff --git a/src/constants/gas.ts b/src/constants/gas.ts new file mode 100644 index 00000000..61d01e01 --- /dev/null +++ b/src/constants/gas.ts @@ -0,0 +1,2 @@ +export const GAS_ADJUSTMENT = 1.3 +export const GAS_PRICE = '0.025uosmo' diff --git a/src/hooks/data/index.ts b/src/hooks/data/index.ts deleted file mode 100644 index b46daceb..00000000 --- a/src/hooks/data/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -// @index(['./*.tsx'], f => `export { ${f.name} } from '${f.path}'`) -export { useAccountStats } from './useAccountStats' -export { useAnimations } from './useAnimations' -export { useBalances } from './useBalances' -export { useCalculateMaxBorrowAmount } from './useCalculateMaxBorrowAmount' -export { useCalculateMaxTradeAmount } from './useCalculateMaxTradeAmount' -export { useCalculateMaxWithdrawAmount } from './useCalculateMaxWithdrawAmount' -// @endindex diff --git a/src/hooks/data/useAccountStats.tsx b/src/hooks/data/useAccountStats.tsx index 712a8b23..5a4b763f 100644 --- a/src/hooks/data/useAccountStats.tsx +++ b/src/hooks/data/useAccountStats.tsx @@ -1,8 +1,10 @@ import BigNumber from 'bignumber.js' import { useMemo } from 'react' -import { useCreditAccountPositions, useMarkets, useTokenPrices } from 'hooks/queries' -import { useAccountDetailsStore } from 'stores' +import { useCreditAccountPositions } from 'hooks/queries/useCreditAccountPositions' +import { useMarkets } from 'hooks/queries/useMarkets' +import { useTokenPrices } from 'hooks/queries/useTokenPrices' +import useStore from 'store' // displaying 3 levels of risk based on the weighted average of liquidation LTVs // 0.85 -> 25% risk @@ -80,7 +82,7 @@ const calculateStatsFromAccountPositions = (assets: Asset[], debts: Debt[]) => { } export const useAccountStats = (actions?: AccountStatsAction[]) => { - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) + const selectedAccount = useStore((s) => s.selectedAccount) const { data: positionsData } = useCreditAccountPositions(selectedAccount ?? '') const { data: marketsData } = useMarkets() diff --git a/src/hooks/data/useAnimations.tsx b/src/hooks/data/useAnimations.tsx index 613f8cb2..a5afd9ff 100644 --- a/src/hooks/data/useAnimations.tsx +++ b/src/hooks/data/useAnimations.tsx @@ -1,19 +1,19 @@ import { useEffect } from 'react' -import { useSettingsStore } from 'stores' +import useStore from 'store' export const useAnimations = () => { - const enableAnimations = useSettingsStore((s) => s.enableAnimations) + const enableAnimations = useStore((s) => s.enableAnimations) const queryChangeHandler = (event: MediaQueryListEvent) => { - useSettingsStore.setState({ enableAnimations: !event?.matches ?? true }) + useStore.setState({ enableAnimations: !event?.matches ?? true }) } useEffect(() => { const mediaQuery: MediaQueryList = window.matchMedia('(prefers-reduced-motion: reduce)') if (mediaQuery) { - useSettingsStore.setState({ enableAnimations: !mediaQuery.matches }) + useStore.setState({ enableAnimations: !mediaQuery.matches }) mediaQuery.addEventListener('change', queryChangeHandler) return () => mediaQuery.removeEventListener('change', queryChangeHandler) } diff --git a/src/hooks/data/useBalances.tsx b/src/hooks/data/useBalances.tsx index d6d616f4..23eb2791 100644 --- a/src/hooks/data/useBalances.tsx +++ b/src/hooks/data/useBalances.tsx @@ -1,16 +1,19 @@ import { useEffect, useState } from 'react' -import { useCreditAccountPositions, useMarkets, useTokenPrices } from 'hooks/queries' -import { useAccountDetailsStore, useNetworkConfigStore } from 'stores' +import { useCreditAccountPositions } from 'hooks/queries/useCreditAccountPositions' +import { useMarkets } from 'hooks/queries/useMarkets' +import { useTokenPrices } from 'hooks/queries/useTokenPrices' import { formatBalances } from 'utils/balances' +import useStore from 'store' +import { getMarketAssets } from 'utils/assets' export const useBalances = () => { const [balanceData, setBalanceData] = useState() const { data: marketsData } = useMarkets() const { data: tokenPrices } = useTokenPrices() - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) - const whitelistedAssets = useNetworkConfigStore((s) => s.assets.whitelist) + const selectedAccount = useStore((s) => s.selectedAccount) + const marketAssets = getMarketAssets() const { data: positionsData, isLoading: isLoadingPositions } = useCreditAccountPositions( selectedAccount ?? '', @@ -19,15 +22,15 @@ export const useBalances = () => { useEffect(() => { const balances = positionsData?.coins && tokenPrices - ? formatBalances(positionsData.coins, tokenPrices, false, whitelistedAssets) + ? formatBalances(positionsData.coins, tokenPrices, false, marketAssets) : [] const debtBalances = positionsData?.debts && tokenPrices - ? formatBalances(positionsData.debts, tokenPrices, true, whitelistedAssets, marketsData) + ? formatBalances(positionsData.debts, tokenPrices, true, marketAssets, marketsData) : [] setBalanceData([...balances, ...debtBalances]) - }, [positionsData, marketsData, tokenPrices, whitelistedAssets]) + }, [positionsData, marketsData, tokenPrices, marketAssets]) return balanceData } diff --git a/src/hooks/data/useCalculateMaxBorrowAmount.tsx b/src/hooks/data/useCalculateMaxBorrowAmount.tsx index 8f1bfbad..2086d054 100644 --- a/src/hooks/data/useCalculateMaxBorrowAmount.tsx +++ b/src/hooks/data/useCalculateMaxBorrowAmount.tsx @@ -1,14 +1,13 @@ import BigNumber from 'bignumber.js' import { useCallback, useMemo } from 'react' -import { - useCreditAccountPositions, - useMarkets, - useRedbankBalances, - useTokenPrices, -} from 'hooks/queries' -import { useAccountDetailsStore, useNetworkConfigStore } from 'stores' +import { useCreditAccountPositions } from 'hooks/queries/useCreditAccountPositions' +import { useMarkets } from 'hooks/queries/useMarkets' +import { useRedbankBalances } from 'hooks/queries/useRedbankBalances' +import { useTokenPrices } from 'hooks/queries/useTokenPrices' import { getTokenDecimals } from 'utils/tokens' +import useStore from 'store' +import { getMarketAssets } from 'utils/assets' const getApproximateHourlyInterest = (amount: string, borrowAPY: string) => { const hourlyAPY = BigNumber(borrowAPY).div(24 * 365) @@ -17,8 +16,8 @@ const getApproximateHourlyInterest = (amount: string, borrowAPY: string) => { } export const useCalculateMaxBorrowAmount = (denom: string, isUnderCollateralized: boolean) => { - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) - const whitelistedAssets = useNetworkConfigStore((s) => s.assets.whitelist) + const selectedAccount = useStore((s) => s.selectedAccount) + const marketAssets = getMarketAssets() const { data: positionsData } = useCreditAccountPositions(selectedAccount ?? '') const { data: marketsData } = useMarkets() @@ -62,7 +61,7 @@ export const useCalculateMaxBorrowAmount = (denom: string, isUnderCollateralized }, 0) const borrowTokenPrice = tokenPrices[denom] - const tokenDecimals = getTokenDecimals(denom, whitelistedAssets) + const tokenDecimals = getTokenDecimals(denom, marketAssets) let maxAmountCapacity if (isUnderCollateralized) { @@ -100,6 +99,6 @@ export const useCalculateMaxBorrowAmount = (denom: string, isUnderCollateralized positionsData, redbankBalances, tokenPrices, - whitelistedAssets, + marketAssets, ]) } diff --git a/src/hooks/data/useCalculateMaxTradeAmount.tsx b/src/hooks/data/useCalculateMaxTradeAmount.tsx index 79954042..caf8fce3 100644 --- a/src/hooks/data/useCalculateMaxTradeAmount.tsx +++ b/src/hooks/data/useCalculateMaxTradeAmount.tsx @@ -1,13 +1,11 @@ import BigNumber from 'bignumber.js' import { useCallback, useMemo } from 'react' -import { - useCreditAccountPositions, - useMarkets, - useRedbankBalances, - useTokenPrices, -} from 'hooks/queries' -import { useAccountDetailsStore } from 'stores' +import { useCreditAccountPositions } from 'hooks/queries/useCreditAccountPositions' +import { useMarkets } from 'hooks/queries/useMarkets' +import { useRedbankBalances } from 'hooks/queries/useRedbankBalances' +import { useTokenPrices } from 'hooks/queries/useTokenPrices' +import useStore from 'store' const getApproximateHourlyInterest = (amount: string, borrowAPY: string) => { const hourlyAPY = BigNumber(borrowAPY).div(24 * 365) @@ -22,7 +20,7 @@ export const useCalculateMaxTradeAmount = ( tokenOut: string, isMargin: boolean, ) => { - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) + const selectedAccount = useStore((s) => s.selectedAccount) const { data: positionsData } = useCreditAccountPositions(selectedAccount ?? '') const { data: marketsData } = useMarkets() diff --git a/src/hooks/data/useCalculateMaxWithdrawAmount.tsx b/src/hooks/data/useCalculateMaxWithdrawAmount.tsx index 7a8000e5..bb9d05dd 100644 --- a/src/hooks/data/useCalculateMaxWithdrawAmount.tsx +++ b/src/hooks/data/useCalculateMaxWithdrawAmount.tsx @@ -1,14 +1,13 @@ import BigNumber from 'bignumber.js' import { useCallback, useMemo } from 'react' -import { - useCreditAccountPositions, - useMarkets, - useRedbankBalances, - useTokenPrices, -} from 'hooks/queries' -import { useAccountDetailsStore, useNetworkConfigStore } from 'stores' +import { useCreditAccountPositions } from 'hooks/queries/useCreditAccountPositions' +import { useMarkets } from 'hooks/queries/useMarkets' +import { useRedbankBalances } from 'hooks/queries/useRedbankBalances' +import { useTokenPrices } from 'hooks/queries/useTokenPrices' import { getTokenDecimals } from 'utils/tokens' +import useStore from 'store' +import { getMarketAssets } from 'utils/assets' const getApproximateHourlyInterest = (amount: string, borrowAPY: string) => { const hourlyAPY = BigNumber(borrowAPY).div(24 * 365) @@ -17,15 +16,15 @@ const getApproximateHourlyInterest = (amount: string, borrowAPY: string) => { } export const useCalculateMaxWithdrawAmount = (denom: string, borrow: boolean) => { - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) - const whitelistedAssets = useNetworkConfigStore((s) => s.assets.whitelist) + const selectedAccount = useStore((s) => s.selectedAccount) + const marketAssets = getMarketAssets() const { data: positionsData } = useCreditAccountPositions(selectedAccount ?? '') const { data: marketsData } = useMarkets() const { data: tokenPrices } = useTokenPrices() const { data: redbankBalances } = useRedbankBalances() - const tokenDecimals = getTokenDecimals(denom, whitelistedAssets) + const tokenDecimals = getTokenDecimals(denom, marketAssets) const getTokenValue = useCallback( (amount: string, denom: string) => { diff --git a/src/hooks/mutations/index.ts b/src/hooks/mutations/index.ts deleted file mode 100644 index 6efd700e..00000000 --- a/src/hooks/mutations/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @index(['./*.tsx'], f => `export { ${f.name} } from '${f.path}'`) -export { useBorrowFunds } from './useBorrowFunds' -export { useCreateCreditAccount } from './useCreateCreditAccount' -export { useDeleteCreditAccount } from './useDeleteCreditAccount' -export { useDepositCreditAccount } from './useDepositCreditAccount' -export { useRepayFunds } from './useRepayFunds' -export { useTradeAsset } from './useTradeAsset' -export { useWithdrawFunds } from './useWithdrawFunds' -// @endindex diff --git a/src/hooks/mutations/useBorrowFunds.tsx b/src/hooks/mutations/useBorrowFunds.tsx index ebfec481..66f20f4f 100644 --- a/src/hooks/mutations/useBorrowFunds.tsx +++ b/src/hooks/mutations/useBorrowFunds.tsx @@ -2,7 +2,7 @@ import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react import { useMemo } from 'react' import { toast } from 'react-toastify' -import { useAccountDetailsStore, useWalletStore } from 'stores' +import useStore from 'store' import { queryKeys } from 'types/query-keys-factory' import { hardcodedFee } from 'utils/contants' @@ -12,12 +12,10 @@ export const useBorrowFunds = ( withdraw = false, options: Omit, ) => { - const creditManagerClient = useWalletStore((s) => s.clients.creditManager) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount ?? '') - const address = useWalletStore((s) => s.address) - + const creditManagerClient = useStore((s) => s.clients.creditManager) + const selectedAccount = useStore((s) => s.selectedAccount ?? '') + const address = useStore((s) => s.address) const queryClient = useQueryClient() - const actions = useMemo(() => { if (!withdraw) { return [ @@ -29,7 +27,6 @@ export const useBorrowFunds = ( }, ] } - return [ { borrow: { @@ -45,7 +42,6 @@ export const useBorrowFunds = ( }, ] }, [withdraw, denom, amount]) - return useMutation( async () => await creditManagerClient?.updateCreditAccount( @@ -56,7 +52,6 @@ export const useBorrowFunds = ( onSettled: () => { queryClient.invalidateQueries(queryKeys.creditAccountsPositions(selectedAccount)) queryClient.invalidateQueries(queryKeys.redbankBalances()) - // if withdrawing to wallet, need to explicility invalidate balances queries if (withdraw) { queryClient.invalidateQueries(queryKeys.tokenBalance(address ?? '', denom)) diff --git a/src/hooks/mutations/useCreateCreditAccount.tsx b/src/hooks/mutations/useCreateCreditAccount.tsx deleted file mode 100644 index 342c6e94..00000000 --- a/src/hooks/mutations/useCreateCreditAccount.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query' -import { toast } from 'react-toastify' - -import { - useAccountDetailsStore, - useModalStore, - useNetworkConfigStore, - useWalletStore, -} from 'stores' -import { queryKeys } from 'types/query-keys-factory' -import { hardcodedFee } from 'utils/contants' - -// 200000 gas used -const executeMsg = { - create_credit_account: {}, -} - -export const useCreateCreditAccount = () => { - const signingClient = useWalletStore((s) => s.signingClient) - const address = useWalletStore((s) => s.address) - const creditManagerAddress = useNetworkConfigStore((s) => s.contracts.creditManager) - - const queryClient = useQueryClient() - - return useMutation( - async () => - await signingClient?.execute(address ?? '', creditManagerAddress, executeMsg, hardcodedFee), - { - onSettled: () => { - queryClient.invalidateQueries(queryKeys.creditAccounts(address ?? '')) - }, - onError: (err: Error) => { - toast.error(err.message) - }, - onSuccess: (data) => { - if (!data) return - - // TODO: is there some better way to parse response to extract token id??? - const createdID = data.logs[0].events[2].attributes[6].value - useAccountDetailsStore.setState({ selectedAccount: createdID }) - useModalStore.setState({ fundAccountModal: true }) - }, - }, - ) -} diff --git a/src/hooks/mutations/useDeleteCreditAccount.tsx b/src/hooks/mutations/useDeleteCreditAccount.tsx deleted file mode 100644 index 92248a27..00000000 --- a/src/hooks/mutations/useDeleteCreditAccount.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query' -import { toast } from 'react-toastify' - -import { useNetworkConfigStore, useWalletStore } from 'stores' -import { queryKeys } from 'types/query-keys-factory' -import { hardcodedFee } from 'utils/contants' - -export const useDeleteCreditAccount = (accountId: string) => { - const signingClient = useWalletStore((s) => s.signingClient) - const address = useWalletStore((s) => s.address) - const accountNftAddress = useNetworkConfigStore((s) => s.contracts.accountNft) - - const queryClient = useQueryClient() - - return useMutation( - async () => - await signingClient?.execute( - address ?? '', - accountNftAddress, - { - burn: { - token_id: accountId, - }, - }, - hardcodedFee, - ), - { - onSettled: () => { - queryClient.invalidateQueries(queryKeys.creditAccounts(address ?? '')) - }, - onError: (err: Error) => { - toast.error(err.message) - }, - onSuccess: () => { - toast.success('Credit Account Deleted') - }, - }, - ) -} diff --git a/src/hooks/mutations/useDepositCreditAccount.tsx b/src/hooks/mutations/useDepositCreditAccount.tsx deleted file mode 100644 index 7fca6bcc..00000000 --- a/src/hooks/mutations/useDepositCreditAccount.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query' -import { toast } from 'react-toastify' - -import { useNetworkConfigStore, useWalletStore } from 'stores' -import { queryKeys } from 'types/query-keys-factory' -import { hardcodedFee } from 'utils/contants' - -export const useDepositCreditAccount = ( - accountId: string, - denom: string, - amount: number, - options?: { - onSuccess?: () => void - }, -) => { - const signingClient = useWalletStore((s) => s.signingClient) - const address = useWalletStore((s) => s.address) - const creditManagerAddress = useNetworkConfigStore((s) => s.contracts.creditManager) - - const queryClient = useQueryClient() - - return useMutation( - async () => - await signingClient?.execute( - address ?? '', - creditManagerAddress, - { - update_credit_account: { - account_id: accountId, - actions: [ - { - deposit: { - denom, - amount: String(amount), - }, - }, - ], - }, - }, - hardcodedFee, - undefined, - [ - { - denom, - amount: String(amount), - }, - ], - ), - { - onError: (err: Error) => { - toast.error(err.message) - }, - onSuccess: () => { - queryClient.invalidateQueries(queryKeys.allBalances(address ?? '')) - queryClient.invalidateQueries(queryKeys.tokenBalance(address ?? '', denom)) - queryClient.invalidateQueries(queryKeys.creditAccountsPositions(accountId)) - - options?.onSuccess && options.onSuccess() - }, - }, - ) -} diff --git a/src/hooks/mutations/useRepayFunds.tsx b/src/hooks/mutations/useRepayFunds.tsx index f181c9da..7d375444 100644 --- a/src/hooks/mutations/useRepayFunds.tsx +++ b/src/hooks/mutations/useRepayFunds.tsx @@ -2,7 +2,7 @@ import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react import { useMemo } from 'react' import { toast } from 'react-toastify' -import { useAccountDetailsStore, useWalletStore } from 'stores' +import useStore from 'store' import { queryKeys } from 'types/query-keys-factory' import { hardcodedFee } from 'utils/contants' @@ -11,12 +11,10 @@ export const useRepayFunds = ( denom: string, options: Omit, ) => { - const creditManagerClient = useWalletStore((s) => s.clients.creditManager) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount ?? '') - const address = useWalletStore((s) => s.address) - + const creditManagerClient = useStore((s) => s.clients.creditManager) + const selectedAccount = useStore((s) => s.selectedAccount ?? '') + const address = useStore((s) => s.address) const queryClient = useQueryClient() - const actions = useMemo(() => { return [ { @@ -28,12 +26,13 @@ export const useRepayFunds = ( { repay: { denom: denom, - amount: String(amount), + amount: { + exact: String(amount), + }, }, }, ] }, [amount, denom]) - return useMutation( async () => await creditManagerClient?.updateCreditAccount( diff --git a/src/hooks/mutations/useTradeAsset.tsx b/src/hooks/mutations/useTradeAsset.tsx index e8bd13a1..f167b531 100644 --- a/src/hooks/mutations/useTradeAsset.tsx +++ b/src/hooks/mutations/useTradeAsset.tsx @@ -2,7 +2,7 @@ import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react import { useMemo } from 'react' import { toast } from 'react-toastify' -import { useAccountDetailsStore, useWalletStore } from 'stores' +import useStore from 'store' import { Action } from 'types/generated/mars-credit-manager/MarsCreditManager.types' import { queryKeys } from 'types/query-keys-factory' import { hardcodedFee } from 'utils/contants' @@ -16,11 +16,9 @@ export const useTradeAsset = ( slippage: number, options?: Omit, ) => { - const creditManagerClient = useWalletStore((s) => s.clients.creditManager) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount ?? '') - + const creditManagerClient = useStore((s) => s.clients.creditManager) + const selectedAccount = useStore((s) => s.selectedAccount ?? '') const queryClient = useQueryClient() - // actions need to be executed in order deposit -> borrow -> swap // first two are optional const actions = useMemo(() => { @@ -33,7 +31,6 @@ export const useTradeAsset = ( }, }, ] as Action[] - if (borrowAmount > 0) { actionsBase.unshift({ borrow: { @@ -42,7 +39,6 @@ export const useTradeAsset = ( }, }) } - if (depositAmount > 0) { actionsBase.unshift({ deposit: { @@ -51,10 +47,8 @@ export const useTradeAsset = ( }, }) } - return actionsBase }, [amount, tokenIn, tokenOut, slippage, borrowAmount, depositAmount]) - return useMutation( async () => await creditManagerClient?.updateCreditAccount( diff --git a/src/hooks/mutations/useWithdrawFunds.tsx b/src/hooks/mutations/useWithdrawFunds.tsx index 63170021..b9592a72 100644 --- a/src/hooks/mutations/useWithdrawFunds.tsx +++ b/src/hooks/mutations/useWithdrawFunds.tsx @@ -2,7 +2,7 @@ import { useMutation, useQueryClient } from '@tanstack/react-query' import { useMemo } from 'react' import { toast } from 'react-toastify' -import { useAccountDetailsStore, useWalletStore } from 'stores' +import useStore from 'store' import { queryKeys } from 'types/query-keys-factory' import { hardcodedFee } from 'utils/contants' @@ -14,12 +14,10 @@ export const useWithdrawFunds = ( onSuccess?: () => void }, ) => { - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount ?? '') - const address = useWalletStore((s) => s.address) - const creditManagerClient = useWalletStore((s) => s.clients.creditManager) - + const selectedAccount = useStore((s) => s.selectedAccount ?? '') + const address = useStore((s) => s.address) + const creditManagerClient = useStore((s) => s.clients.creditManager) const queryClient = useQueryClient() - const actions = useMemo(() => { if (borrowAmount > 0) { return [ @@ -37,7 +35,6 @@ export const useWithdrawFunds = ( }, ] } - return [ { withdraw: { @@ -47,9 +44,7 @@ export const useWithdrawFunds = ( }, ] }, [amount, borrowAmount, denom]) - const { onSuccess } = { ...options } - return useMutation( async () => creditManagerClient?.updateCreditAccount( @@ -62,7 +57,6 @@ export const useWithdrawFunds = ( queryClient.invalidateQueries(queryKeys.tokenBalance(address ?? '', denom)) queryClient.invalidateQueries(queryKeys.allBalances(address ?? '')) queryClient.invalidateQueries(queryKeys.redbankBalances()) - onSuccess && onSuccess() }, onError: (err: Error) => { diff --git a/src/hooks/queries/index.ts b/src/hooks/queries/index.ts deleted file mode 100644 index 6a6ee8a6..00000000 --- a/src/hooks/queries/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @index(['./*.tsx'], f => `export { ${f.name} } from '${f.path}'`) -export { useAllBalances } from './useAllBalances' -export { useAllowedCoins } from './useAllowedCoins' -export { useCreditAccountPositions } from './useCreditAccountPositions' -export { useCreditAccounts } from './useCreditAccounts' -export { useMarkets } from './useMarkets' -export { useRedbankBalances } from './useRedbankBalances' -export { useTokenPrices } from './useTokenPrices' -// @endindex diff --git a/src/hooks/queries/useAllBalances.tsx b/src/hooks/queries/useAllBalances.tsx index a4674e08..76efe365 100644 --- a/src/hooks/queries/useAllBalances.tsx +++ b/src/hooks/queries/useAllBalances.tsx @@ -3,7 +3,8 @@ import { useQuery } from '@tanstack/react-query' import request, { gql } from 'graphql-request' import { useMemo } from 'react' -import { useNetworkConfigStore, useWalletStore } from 'stores' +import { URL_GQL } from 'constants/env' +import useStore from 'store' import { queryKeys } from 'types/query-keys-factory' interface UserBalanceData { @@ -13,14 +14,13 @@ interface UserBalanceData { } export const useAllBalances = () => { - const address = useWalletStore((s) => s.address) - const hiveUrl = useNetworkConfigStore((s) => s.hiveUrl) + const address = useStore((s) => s.address) const result = useQuery( queryKeys.allBalances(address ?? ''), async () => { return await request( - hiveUrl!, + URL_GQL!, gql` query UserBalanceQuery { balance: bank { @@ -36,7 +36,7 @@ export const useAllBalances = () => { ) }, { - enabled: !!hiveUrl && !!address, + enabled: !!address, staleTime: 30000, refetchInterval: 30000, }, diff --git a/src/hooks/queries/useAllowedCoins.tsx b/src/hooks/queries/useAllowedCoins.tsx index becfa8a7..525e86d5 100644 --- a/src/hooks/queries/useAllowedCoins.tsx +++ b/src/hooks/queries/useAllowedCoins.tsx @@ -1,6 +1,7 @@ import { useQuery } from '@tanstack/react-query' -import { useNetworkConfigStore, useWalletStore } from 'stores' +import { ADDRESS_CREDIT_MANAGER } from 'constants/env' +import useStore from 'store' import { queryKeys } from 'types/query-keys-factory' type Result = string[] @@ -10,12 +11,12 @@ const queryMsg = { } export const useAllowedCoins = () => { - const client = useWalletStore((s) => s.signingClient) - const creditManagerAddress = useNetworkConfigStore((s) => s.contracts.creditManager) + const client = useStore((s) => s.signingClient) + const creditManagerAddress = ADDRESS_CREDIT_MANAGER const result = useQuery( queryKeys.allowedCoins(), - async () => client?.queryContractSmart(creditManagerAddress, queryMsg), + async () => client?.queryContractSmart(creditManagerAddress || '', queryMsg), { enabled: !!client, staleTime: Infinity, diff --git a/src/hooks/queries/useBroadcast.tsx b/src/hooks/queries/useBroadcast.tsx new file mode 100644 index 00000000..4ae3603e --- /dev/null +++ b/src/hooks/queries/useBroadcast.tsx @@ -0,0 +1,49 @@ +import { MsgExecuteContract } from '@marsprotocol/wallet-connector' +import { useQuery } from '@tanstack/react-query' +import { isMobile } from 'react-device-detect' + +import useStore from 'store' +import { queryKeys } from 'types/query-keys-factory' + +export const useBroadcast = (props: UseBroadcast) => { + const client = useStore((s) => s.client) + const userWalletAddress = useStore((s) => s.client?.recentWallet.account?.address) + const sender = props.sender ?? userWalletAddress + + return useQuery( + [queryKeys.broadcastMessages(), props.msg], + async () => { + if (!client || !props.contract || !props.msg || !props.fee || !sender) return + + try { + const broadcastOptions = { + messages: [ + new MsgExecuteContract({ + sender: sender, + contract: props.contract, + msg: props.msg, + funds: props.funds, + }), + ], + feeAmount: props.fee.amount[0].amount, + gasLimit: props.fee.gas, + memo: undefined, + wallet: client.recentWallet, + mobile: isMobile, + } + + const result = await client.broadcast(broadcastOptions) + + if (result.hash) { + return result + } + throw result.rawLogs + } catch (e) { + throw e + } + }, + { + enabled: !!sender && !!client && !!props.msg && !!props.contract && !!props.fee, + }, + ) +} diff --git a/src/hooks/queries/useCreditAccountPositions.tsx b/src/hooks/queries/useCreditAccountPositions.tsx index 4b678eda..5b6c659b 100644 --- a/src/hooks/queries/useCreditAccountPositions.tsx +++ b/src/hooks/queries/useCreditAccountPositions.tsx @@ -2,7 +2,8 @@ import { Coin } from '@cosmjs/stargate' import { useQuery } from '@tanstack/react-query' import { useMemo } from 'react' -import { useNetworkConfigStore, useWalletStore } from 'stores' +import { ADDRESS_CREDIT_MANAGER } from 'constants/env' +import useStore from 'store' import { queryKeys } from 'types/query-keys-factory' interface DebtAmount { @@ -24,14 +25,14 @@ interface Result { } export const useCreditAccountPositions = (accountId: string) => { - const address = useWalletStore((s) => s.address) - const client = useWalletStore((s) => s.signingClient) - const creditManagerAddress = useNetworkConfigStore((s) => s.contracts.creditManager) + const address = useStore((s) => s.address) + const client = useStore((s) => s.signingClient) + const creditManagerAddress = ADDRESS_CREDIT_MANAGER const result = useQuery( queryKeys.creditAccountsPositions(accountId), async () => - client?.queryContractSmart(creditManagerAddress, { + client?.queryContractSmart(creditManagerAddress || '', { positions: { account_id: accountId, }, diff --git a/src/hooks/queries/useCreditAccounts.tsx b/src/hooks/queries/useCreditAccounts.tsx index 307c9c8d..2cbc856d 100644 --- a/src/hooks/queries/useCreditAccounts.tsx +++ b/src/hooks/queries/useCreditAccounts.tsx @@ -1,7 +1,10 @@ +'use client' + import { useQuery } from '@tanstack/react-query' import { useMemo } from 'react' -import { useAccountDetailsStore, useNetworkConfigStore, useWalletStore } from 'stores' +import { ADDRESS_ACCOUNT_NFT } from 'constants/env' +import useStore from 'store' import { queryKeys } from 'types/query-keys-factory' type Result = { @@ -9,12 +12,12 @@ type Result = { } export const useCreditAccounts = () => { - const address = useWalletStore((s) => s.address) - const client = useWalletStore((s) => s.signingClient) - const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) - const accountNftAddress = useNetworkConfigStore((s) => s.contracts.accountNft) + const address = useStore((s) => s.address) + const client = useStore((s) => s.signingClient) + const selectedAccount = useStore((s) => s.selectedAccount) + const accountNftAddress = ADDRESS_ACCOUNT_NFT const setSelectedAccount = (account: string) => { - useAccountDetailsStore.setState({ selectedAccount: account }) + useStore.setState({ selectedAccount: account }) } const queryMsg = useMemo(() => { @@ -27,7 +30,7 @@ export const useCreditAccounts = () => { const result = useQuery( queryKeys.creditAccounts(address ?? ''), - async () => client?.queryContractSmart(accountNftAddress, queryMsg), + async () => client?.queryContractSmart(accountNftAddress || '', queryMsg), { staleTime: Infinity, enabled: !!address && !!client, diff --git a/src/hooks/queries/useEstimateFee.tsx b/src/hooks/queries/useEstimateFee.tsx new file mode 100644 index 00000000..fb242a05 --- /dev/null +++ b/src/hooks/queries/useEstimateFee.tsx @@ -0,0 +1,53 @@ +import { MsgExecuteContract } from '@marsprotocol/wallet-connector' +import { useQuery } from '@tanstack/react-query' +import BigNumber from 'bignumber.js' + +import { GAS_ADJUSTMENT } from 'constants/gas' +import useStore from 'store' +import { queryKeys } from 'types/query-keys-factory' + +export const useEstimateFee = (props: UseEstimateFee) => { + const client = useStore((s) => s.client) + const userWalletAddress = useStore((s) => s.client?.recentWallet.account?.address) + const sender = props.sender ?? userWalletAddress + + return useQuery( + [queryKeys.estimateFee(), props.msg], + async () => { + const gasAdjustment = GAS_ADJUSTMENT + + if (!client || !props.contract || !props.msg || !sender) return + + try { + const simulateOptions = { + messages: [ + new MsgExecuteContract({ + sender: sender, + contract: props.contract, + msg: props.msg, + funds: props.funds, + }), + ], + wallet: client.recentWallet, + } + + const result = await client.simulate(simulateOptions) + + if (result.success) { + return { + amount: result.fee ? result.fee.amount : [], + gas: new BigNumber(result.fee ? result.fee.gas : 0) + .multipliedBy(gasAdjustment) + .toFixed(0), + } + } + throw result.error + } catch (e) { + throw e + } + }, + { + enabled: !!sender && !!client && !!props.msg && !!props.contract, + }, + ) +} diff --git a/src/hooks/queries/useRedbankBalances.tsx b/src/hooks/queries/useRedbankBalances.tsx index 0b4fa38b..4ae5d3d2 100644 --- a/src/hooks/queries/useRedbankBalances.tsx +++ b/src/hooks/queries/useRedbankBalances.tsx @@ -3,7 +3,7 @@ import { useQuery } from '@tanstack/react-query' import request, { gql } from 'graphql-request' import { useMemo } from 'react' -import { useNetworkConfigStore } from 'stores' +import { ADDRESS_RED_BANK, URL_GQL } from 'constants/env' import { queryKeys } from 'types/query-keys-factory' interface Result { @@ -13,13 +13,12 @@ interface Result { } export const useRedbankBalances = () => { - const hiveUrl = useNetworkConfigStore((s) => s.hiveUrl) - const redBankAddress = useNetworkConfigStore((s) => s.contracts.redBank) + const redBankAddress = ADDRESS_RED_BANK const result = useQuery( queryKeys.redbankBalances(), async () => { return await request( - hiveUrl!, + URL_GQL!, gql` query RedbankBalances { bank { @@ -35,7 +34,7 @@ export const useRedbankBalances = () => { ) }, { - enabled: !!hiveUrl && !!redBankAddress, + enabled: !!redBankAddress, staleTime: 30000, refetchInterval: 30000, }, diff --git a/src/hooks/queries/useTokenPrices.tsx b/src/hooks/queries/useTokenPrices.tsx index 0720a389..d7d0cd92 100644 --- a/src/hooks/queries/useTokenPrices.tsx +++ b/src/hooks/queries/useTokenPrices.tsx @@ -2,20 +2,17 @@ import { useQuery } from '@tanstack/react-query' import { gql, request } from 'graphql-request' import { useMemo } from 'react' -import { useNetworkConfigStore } from 'stores' +import { ADDRESS_ORACLE, URL_GQL } from 'constants/env' import { queryKeys } from 'types/query-keys-factory' +import { getMarketAssets } from 'utils/assets' -const fetchTokenPrices = async ( - hiveUrl: string, - whitelistedTokens: Asset[], - oracleAddress: string, -) => { +const fetchTokenPrices = async (hiveUrl: string, marketAssets: Asset[], oracleAddress: string) => { return request( hiveUrl, gql` query PriceOracle { prices: wasm { - ${whitelistedTokens.map((token) => { + ${marketAssets.map((token) => { return `${token.symbol}: contractQuery( contractAddress: "${oracleAddress}" query: { @@ -32,12 +29,10 @@ const fetchTokenPrices = async ( } export const useTokenPrices = () => { - const hiveUrl = useNetworkConfigStore((s) => s.hiveUrl) - const whitelistedTokens = useNetworkConfigStore((s) => s.assets.whitelist) - const oracleAddress = useNetworkConfigStore((s) => s.contracts.oracle) + const marketAssets = getMarketAssets() const result = useQuery( queryKeys.tokenPrices(), - async () => await fetchTokenPrices(hiveUrl, whitelistedTokens, oracleAddress), + async () => await fetchTokenPrices(URL_GQL!, marketAssets, ADDRESS_ORACLE || ''), { refetchInterval: 30000, staleTime: Infinity, diff --git a/src/hooks/useParams.ts b/src/hooks/useParams.ts new file mode 100644 index 00000000..01e07adc --- /dev/null +++ b/src/hooks/useParams.ts @@ -0,0 +1,26 @@ +import { usePathname } from 'next/navigation' + +export default function useParams() { + const pathname = usePathname() + const params = { + wallet: '', + account: '', + page: '', + } + + if (!pathname) return params + + const segments = pathname.split('/') + + segments.forEach((segment, index) => { + if (segment === 'wallets' && segments[index + 1]) { + params.wallet = segments[index + 1] + } else if (segment === 'accounts' && segments[index + 1]) { + params.account = segments[index + 1] + } else if (index === 5) { + params.page = segment + } + }) + + return params +} diff --git a/src/images/wallets/keplr-wallet-extension.png b/src/images/wallets/keplr-wallet-extension.png deleted file mode 100644 index 44ccea794e8634a040272199cfbc221b2225d3ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8128 zcmV;xA3xxUP)>wE8Wr*lqQ*|&GjJ^QS^ z_FBL7`+nbJ?Nfy3cwF=KV=Hj($+wm%?5tFG62LMLtW+WbBJ6Eyt=v{lk^EiT-|eOS zV1LC**#G3u)PKB zVuiK#Zmo5GCzQ$U-~Pi(9)#y`;InCb&DW1C59cmj-9~T)QQgIp;Q>~Rzx!mWyrGVb zPLP4>pdh#Dz{+IgrGw$`WwN#w43wYi{~&UE{!~_WP|j<%6L)N&c>wU zxT8($##=t}<6ndy1)$g6`qb_=kky9OR#E_MiFrJoH3+ zsaFpt;l|eeP60&*=K}`Pc~CNELLVfyxi-@$V}^90iy;7x*yj_nHi@OS2(n)2p!;Vt zEOcNYULp4-?K(rNFdB5l99*>VR$8mmdf6?jKe=`$yvmtAyzbVcyN3<9qxHH|dl!s= z+)C28LhuY215-zjeRytFvuha=P*dOivd&DO7-?5}-~O45D_MnKTY0gN!t_xYpFy`t zupXh@QQCGK)gb_^45d8qYkU6VgYaAceeZXV?P(p|(7N3^(i^Z&qeVHiL{ z1_Q~kRRBXmFy^3U59yYqeZvf~jn!$~yvS-{1!(p1kN@YMg#dlu_m1ywUV7D7XAVei z5KJ4Hynu>60f6jKj9!=+Iz~`EHt1y0?2tw#OsdHeLy*|Lbeq6StKx{Dj>Xzqn|>Na zp=?q5HKjpU+K(;~q79zH;9Bd|EB<)1`HxKX`u#^%XgK=;)1n%)lvS@Z^5hP%d-8lo z4O?Iw#xMv~Q9^XnA9p);4t5W}R8n%V&nrZR4C-){h3;6qBLmLNnfc;` z5ch{cQ#S;NQ(}x7|9a9OQ%_)7dv}Z)_(KZ0L?MPn(z_L=K|6N+OG0g3Stpixi=H1^CFK^PA5Vh6)L zBtp~6Gitt3)0SK{g#@ zK<*DwLn7N!GNAp}Rk?=6Z* zl71#_N{?F*mM_?H?$r)xYjX`H2KY40srXp4<)r}LK&VwfL&(vU6fBfSMDEXgLh=u$ zWZrcyS!2qq7)?=6CjkpgA%73y2l_3{if$pRvc|3G>xwybE-DP9o zl+Uyi$aPeOdc+v%m;-f6r(FNcaV5W_x&`4xOhbuqmh3tNxuIz|!Z?mq#>9e|jiGm9 zi!&OtpTNk>8oPxL;uAz8+4ZQliaLvjH!ur>i3~j9xyO#bt${wgLFh-Cqa)d*T(?Lj zWqi|e#z@|(4L_wmnuDVaJ{8mQp{OD`6G0W+8bmPz33G6+5i)96L$3OeFx0RrMwOhI z%S<0@QI}?CEPm5>oa3m6=N<+gjY$>K*^|kuCjiqG#zf8CyyOfvrb}w;>M`{klg1B9Tf2`zcyf>IxpSV}e`UsiG%0ELUjASQO2hGtgUXGLlejb%kEQEv8_qX+ly zjB#UZK_6q`HR()kaqtH1EX`G}hqK71BU@Y5p5KYuAEg(G#tz^ReMh} zR!Hjf0tK&tfSZ~}J}x(ILCUsRaPJ3Z?SRLw{<>(a&X@>8Q7ZuMN|o)=yJ{+%Hix9r z$$;YGi%P&!DO>yNiVL#<$IHNPt8FpJAghAsqUhTa!V?WM(7@AJZ4{WRc?2W|aPq|J z{?H}G7^%afWISZ@E>L)!NiJiZKY$KUJJ-j=PKo1q#)r(47YLn|P>G#7Gf;`tK@B~s zDPkbFc%tC=HU;uFkDDlX{;eh#6BZjVP{DHSsPAQ27K!84zkZib8xn3Dqkr+<;4=OUVyVu zaw`;30+Rs|l%;ld0_5O;N(u=)Hc9Z@)k72Yrk(`p=LUeg4^rR0z~LS`1&o4U5$)E= z%Q$qc+P_ydFt7Z@<+=SId}0GWcGE*}^mqlIlRFyWcw2C{*~=>`+WLDZOr^39BQBzEzsFi zQ{1T)CHc=HW;EP|W71wtoIwS)AH`W{Ik9+(I|U{Mvr)T2P?u~~r2fxT1$h+jY4D5? zvQYJ=Ced?e@A|Foq2`4!Z6(-o{scbq<`>QFj=}u$Lk-NS_b+j$CSYn|8t9KrzKGLe z;5BGQ1zRNnEh^~8ApC_%Kanc)F3JUx5@?Kw&RH^p0nei>oix$xailHQ0w$lNBiJ4Q z%ObZvcWfE(6Tk6d26f)?nf-@g?cfRT18sOUsEL}xTS#K15SmIxfLggyHk)VU;9g~c zEFEP))#Q1hdacHvJK&msDsXTJA?7#^c)LmSV0+lmYidZ2evUxr07{nnMzkTO(La^) z;CaoBE(+$S_aB7s|KRD7$2I^YWL67gXD9gfp_eM2T`gHt3^15`7*7LwTq~LkmjAP3 z>b6;V)r9W$Kmd{rATkWkTp@B=;5s2#Ydr_LA7PB2cNB{vY9zdrq@;iRiMPFEAuw;g zd!26kwl>Hxdncp+ZA{j9m&+L&=xdXIy~q}5_E;JqjF_K{^o zeCXOI&p)YHFJSVNv<}iZuKa~%{+)N+{_ju1&37G9GY+#09TZ0=V3I$AktM0`#fOwh zaV9*uxF@T>qO;R#r=qJ914b$`X8N+M)lGr?VF8O2%ed?V9=}yd=?34{)$?->O9J@s zPV;v2%U^ZDLSTOX{-@zn`wx4FMnI;AUJw!UMF5HlS1~4|RO3Ckt76+J3jze+nB#7S zbiPpJ_!FFx)d@hHk8ikj&^*lK06lhQAu=J;OEK3f0Vv9(a8n}oj0cHxQ%i+czVsZp z_I2ClUiQGD6Y$wv4l#f#;u=q4m~kpTqisLwO~rxA+(G>Ss&E0DwuDZd6a$y)F#HB) zY2fZ?!k}pgp=H1nm%0Pw&)F%pzq>c9TB08`ML-{rITH`@0Tx0OeD!vmKfoXT>ijI| zP|MHv{LRB~?4+^{G$^n*vzqy%%9PCuU7}nTv=G8h*yBnv56S3tiZ<;pBODm7162M za3BK~q;fByY0M6;v*!5?T-ILjAQl%j_w$wze)qBq=Yn~(<>!09`UrJ~iXSBieS}~r z52*CG5F;FG&N96h6Zd2U-RWrNQy{!~fnfe1Q`5?ovRC803G#}`mkU64{&-MTI^(>O z|E}a=m4y*gkWyj4ffY;uJp0!DB+)0Bb6oSoIGe1Nto`smFf9Q~=6o;|nC=f86p{`cTX^SXRa(_V`|)%kc9ByAuZl(y)YyT7=W%@D)<@xA{^vMPY>+yNE|qKp+Vh*B9^3`HQ_^i#;hHQwf`v+CLAwl2_l-0zlD~mdQ4<7BbmcmO^Lc^U zozK7Cf3)d5pw@Pk`Z6IR$!Y{Z;T~$Cnt_b$P7XC%(MWsM9A5VAc=k&r*GOgW-78iK zU`b(>Fqky>oVFswRGmnpV;{WL2YEnMz~q(bubsL5cgkq?gpMDgE@UexTmPj7jY z)De4CjB5^RLkz4HjWwP!_8R*P^u8Qg&eM=lrZXr*ZU2djA`q5fTIwuSKPVA_RN8gr zC_R-X$rpzh%t-l6Sd6?Mk6u9bm`)0`#$XlEMT#Sj_AqG9@wx`;J1^VTHMDtC-X(wu ziSzCgo@kMrpXksWmRW5~RCWd{yXLWewsr!`1f$sD?La`CIEY2JL$oeh+<8g-?&7WA zb>*LK%2NS`<0j2_d3CMirPnct0GjIQuS&ttJ{#(MoB!Om9&Mmb=QV>j{oDoc)=Rev zgIJD0^K-7BGh3BaDhakTDN)M60Et9|}bq>G>u?RztA0zmauN+(m)GJ=Q3|CybmD$)ppw7~P ze>+3lgh{LC>g+qH69sC}@TQNgrHRO&HHsC)#9+})seKkIlI*$cc_QFp6PmY_Di^6~ zLvkp-AH?yI2Aj%MFQ$Nj%BIGQv^^@RvVfZWd_;TPd!%jk-moC3m%nan`&|~t2y7)9 z#!vvmKmwTKveyP~V_3Ut>K3PtN`rF@7K@|m(jf6?(FID`6SEb`&a*};h|V|#kG0WW zrIIA(49aK~d%NCC2j+QE+myM8G61cgBS$u1-%SVMu?0YVO9%D!7cf&1CBhgW9zF;& z6@UgUFPpwE6+~%Y{9228gpDjKG@waD#Ga_-^FjTxuv$xyU?6mGMf(^q)=`_r#vrY)Z@`~@?JyiWQRjmC<_7AeKXYEwYL1!NI3;{x8Gs(L zIb$n3FLaQ2A;ohSHDBM+Y;7k97~3J}eU#8y%$my#Emh;snP=5=vB7}k0*Z>Tre37l zDzcEB5_@}yqQ$&}W8TITW71R{QI;ubE0e{R+ij>Jp zd(`b@tYEtyw&S>f$)o5Mnw9|^ICu*F@~ekok>j10zYt#Y>MdX)l$ddgG8#NRVU93U7z!>4;ChL6UYrhk(Zu7_QC@G=!a0DF zJVjBA4OO!q688M_eMjlL|M0{@puX>#9q_`f6RvR%V%n^eJx-lqFm#ZoLReReSQzR3 zJ?D3agQ-kcVeE+V0x|1^dG35Xb|ej#I#BAkGGlqWAuUAcD~+5P%5$D`0M$p1rl5ON znEFF@IJe#TBz*7A`JkTDK)vqW7s2-B0WG#<06CLV_L1b{0wx1bUL4WaL5-YQtRUtz z)^*e+LAQ=V|G;(90(LElrP6~=pEx@j0jHpP1_c!@tC)MR6G^KM4l4JdSqjl@cRT@q zzW}Jq%L80{?M2MgfxrWI&6J$^W(88@C<0t~chaoMbM;|l;t5DQZ@Yn>%g=;LeV+pY zVAWOmcCR=R*%9@ize)yG%pqCyFy|n>hnssUund}o*#m30-TnmJ{f|%0?X!b=_3vzN zpboJeOuaf4EE{-tvr9q&E361xQKJ}<9t7}0i#sXp2WoiwD2~X!2F!Z;ltL;)Nu8GN zZ3B)X0=a=zx8?D`MdHvfC4E33c~sZ(7Eewz2>;Ih$KjrPj?V43gZi%bY=>E20kuX6n;bmMG3X3i$%A+Da-Nzvxu~-Sng&Hx zYCfV|wXu3a)!G0g$H3;MEEYD<-+p}^?ppxVtqs(-zvG47VToC@Ly`bZ%X4UX`(UO{ z$-`F|F*2Mjq`+Q`xdi*jL8Hvh4DhDFpZb%&sg$R2nMMd&Leqce0SZ1~D>h&aZ|m`& zP8Osf1Gj$r33%kd{95XcmrUTQ_iSsRqHkMx8L#>mWId&1jm46*F^VF-&=l;|uPdp^ zGXNMms=(E$NdP6YS0?H?k2A?M7Dnl()hp*6k|cDNV)P5~2#hlWEUgp(P97!t>%TbM zKs`109v3xGf2)C-gLDhvi#eR+&9UZeNWrW*{?s-)HW{})wNNb>hX{9EztF>%%`CO{ z!bdVKCaaScYjNg7f_Y&$zfb!`RV(8fh+}3)Yku+=(AU1S4v(+TuTWj|(h0oj?dNlD zY@kN$8ElLQATu#)01_3UhfMw4w4IzF#kP<+58HNzv{yLVG1Ny|0Cg*tz@9LX2WLqF zVZN-tY4cp4Ggnx(zA0&A@5Vg6KLY@m-b)|TzRC9C4?j$CN9hRB z&cqveeA!!$K=$3L1du;K3$byp-vBlS>Tu#qsiaT7kr%i7|0u1Z_-2bDxMJ%iH66Au zdx-}$<87_atOX3Z}+r)pS-RHs#u+v zD=7C(Rf;{q!+>LeWuVqE(D}aTKe{07QfRF|W4~^A;EahFAj(w<&Z>@@LK+Yft6es9 zq-g;5a8xlnGP49PRHLo9Ov08;9|+Sv>@gZvJ%nJLy_a&KvDhE}Le(hrdjJN@GMHKB z5*sr+ZR`dz^ima%0Rc$$Y`j!AQgGoXbKo zTXk*r-AgH&==Lon5N)agwu7P%Bh0e2D9{Ezru)Gr**G0=&eX(6pfT`Aak^HTMBQs% zoh*EEPpuEJ+W!+yy_qEe{gJzVzSv56CKch6g%ddp(JzRF*^FXdk%8{WjJ24mIY#`^ z)8`-aM7V3Dt-5*APa`U35_%+3_~$L40gmm}gJr zIf7BToi#PmQw(R@UN#yl?l0?ia=Q=hK5%<`*_9aYPf1zyV;4j62Bn~zHL9~Rdvlp2 zlL__WB}|C>w|jA60Y)CxwQ=+-OC$0up^iOTgYMJqS%1^ZLh)>p^@;AV%qfNWqc0TL zIZ6hvIOrEhc%Dabn%szYZsWF zlKygMQ|-vurVfY=%o(WHQ7{x?3;-FZ6=E?!tK*50y{!~lFtHT)z4vW;oPdG~$+5^a z1ERAqYv+i81S2cSpyoI?J0nm{Y4hI;E+y&s@CP2cr%iRI>7Iu?0GqNQjcZ&V{T!)B z0CC4zv%up)J&y?KF-bl*xZpziJ|%`m+N2=Zf(Dq1d`Wlo&&kgujh>MoNY2N62kBW# zUsx4~V6d%S_314a+nY#edb>J#ce`xe60`y_QOx?tuQXx=YN(SvqgS!Cl2vl(0qW%m zMjkesq{%>*3#gfW(T}spStXwj2~3=sOPKLkU-hdqs;BOKf_)b4^yB2I%QA)|KtK8U z9rw1u?HzevM-+k?1n!`mVVVW`#B(glixmrz>zh%W$YBdQaCy=OB;+r60gSXRhds_V z2Q!0YPG%Nx)c705z98$SV$%NngR8!k*%u*~hh(VPRgl6h38>Hz0D~HWIt0VEX*DZP5X9h9*GKaikdwCj)lxRi8b76=sgp z0_vb5?D3)a4Jln18dPuwKm#VdX3#ABut~6)IhYvvI;IJGUlFrvv11Gj#`&z1vHalS z+lZOm4#%L37Nb#F=HbH$ zp)yhi6($J^UN{bUh2$8<=beEwI_lsdj6fY}t)4Fyxx`$2y++ z=7YmiH}=E_7CfFcpmuaAXxg@`g+RN80xxd^Uum7K@H6hM+o3>YEGZ!OpxYU_*~~qF zhg6^dE52k$cp9)E%S8gP{hZ*(tK*teEpXltFxQUZbbX+5@1t<+zQ<3U_{P33T)YO) a;rKtbxTs`BGE7+j0000H6R8Lo zX#^6s5(^2JU?Yh)zPCTXO>S>zcHa_i_rBzDm%HWNyl>v$%nO`8?+wGq0|(IXG|F?7eNkC>jgp3-z<;h6w&9fyvcc0+4G-hf__7GL zo5ukrN;iguDSwfYKS1LtzT;#(A&s)=*j9uh4~XH+%P>Lmgd+l+I9Y@E8t=kH$+}hI zWC)By{Ea81!M4?cf zaPFV=s)M@o_H0r@)B%OUtG*hRkO)nHs_|s(jWj?TX8244X8pQiSEhuyh1G#PXkpWT zNM!uXotn^|5SoD5jRH)4^;SWK-)jXJyr%B9MCSZv0cO8r^*Hpt?&<9mbT)>|384v~ z0SiJkMc=jeDCYB0T4<~0v2HHo z34B%H1PN5CsAO@%C4rMz0&5>YBz(r^r?)wpHkJ}3g%u~132?JLCAF7*;p?!gkHAsV z+&*OYKxpYxB0w&6S1*MlLDmmn#_Q_y z^?j|Xi@yBB0Wqt4N*Ob-a>j7e8<~Wl#=DS7h+?NH zl3QbROU%B}$+LU2{oB5Gz`Ywps6HP62?r6tbFiQ?ktYI7NG_}=MZZCEu}%amL2|L| zJ}SEd$$V7qV#;}L{tYA#Gh}=9ad~>@93h#6)+v-eC~O i$LG6Hu0u?Y&;JKWUcgx3gdWfU0000 { - return ( -
- - - Oooops... - - Looks like this page doesn't exist! -
- -
-
-
- ) -} - -export default Error404 diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx deleted file mode 100644 index 371c9c63..00000000 --- a/src/pages/_app.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import 'react-toastify/dist/ReactToastify.min.css' -import '../styles/globals.css' - -import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import { ReactQueryDevtools } from '@tanstack/react-query-devtools' -import type { AppProps } from 'next/app' -import Head from 'next/head' -import { ToastContainer, Zoom } from 'react-toastify' - -import { Layout, Modals } from 'components' -import { WalletConnectProvider } from 'components/Wallet' -import { useAnimations } from 'hooks/data' - -const queryClient = new QueryClient() - -const App = ({ Component, pageProps }: AppProps) => { - const animations = useAnimations() - - return ( - <> - - Mars Protocol V2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) -} - -export default App diff --git a/src/pages/_error.js b/src/pages/_error.js deleted file mode 100644 index 66488b60..00000000 --- a/src/pages/_error.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * NOTE: This requires `@sentry/nextjs` version 7.3.0 or higher. - * - * NOTE: If using this with `next` version 12.2.0 or lower, uncomment the - * penultimate line in `CustomErrorComponent`. - * - * This page is loaded by Nextjs: - * - on the server, when data-fetching methods throw or reject - * - on the client, when `getInitialProps` throws or rejects - * - on the client, when a React lifecycle method throws or rejects, and it's - * caught by the built-in Nextjs error boundary - * - * See: - * - https://nextjs.org/docs/basic-features/data-fetching/overview - * - https://nextjs.org/docs/api-reference/data-fetching/get-initial-props - * - https://reactjs.org/docs/error-boundaries.html - */ - -import * as Sentry from '@sentry/nextjs' -import NextErrorComponent from 'next/error' - -const CustomErrorComponent = (props) => { - // If you're using a Nextjs version prior to 12.2.1, uncomment this to - // compensate for https://github.com/vercel/next.js/issues/8592 - // Sentry.captureUnderscoreErrorException(props); - - return -} - -CustomErrorComponent.getInitialProps = async (contextData) => { - // In case this is running in a serverless function, await this in order to give Sentry - // time to send the error before the lambda exits - await Sentry.captureUnderscoreErrorException(contextData) - - // This will contain the status code of the response - return NextErrorComponent.getInitialProps(contextData) -} - -export default CustomErrorComponent diff --git a/src/pages/api/accounts/[id]/debts.ts b/src/pages/api/accounts/[id]/debts.ts new file mode 100644 index 00000000..598dec1c --- /dev/null +++ b/src/pages/api/accounts/[id]/debts.ts @@ -0,0 +1,19 @@ +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_CREDIT_MANAGER, ENV_MISSING_MESSAGE, URL_API, URL_RPC } from 'constants/env' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_RPC || !ADDRESS_CREDIT_MANAGER || !URL_API) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const accountId = req.query.id + + const account = await (await fetch(`${URL_API}/accounts/${accountId}`)).json() + + if (account) { + return res.status(200).json(account.debts) + } + + return res.status(404) +} diff --git a/src/pages/api/accounts/[id]/deposits.ts b/src/pages/api/accounts/[id]/deposits.ts new file mode 100644 index 00000000..c057bfe7 --- /dev/null +++ b/src/pages/api/accounts/[id]/deposits.ts @@ -0,0 +1,19 @@ +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_CREDIT_MANAGER, ENV_MISSING_MESSAGE, URL_API, URL_RPC } from 'constants/env' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_RPC || !ADDRESS_CREDIT_MANAGER || !URL_API) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const accountId = req.query.id + + const account = await (await fetch(`${URL_API}/accounts/${accountId}`)).json() + + if (account) { + return res.status(200).json(account.deposits) + } + + return res.status(404) +} diff --git a/src/pages/api/accounts/[id]/index.ts b/src/pages/api/accounts/[id]/index.ts new file mode 100644 index 00000000..187bef1f --- /dev/null +++ b/src/pages/api/accounts/[id]/index.ts @@ -0,0 +1,26 @@ +import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate' +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_CREDIT_MANAGER, ENV_MISSING_MESSAGE, URL_RPC } from 'constants/env' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_RPC || !ADDRESS_CREDIT_MANAGER) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const accountId = req.query.id + + const client = await CosmWasmClient.connect(URL_RPC) + + const data = await client.queryContractSmart(ADDRESS_CREDIT_MANAGER, { + positions: { + account_id: accountId, + }, + }) + + if (data) { + return res.status(200).json(data) + } + + return res.status(404) +} diff --git a/src/pages/api/markets/balances.ts b/src/pages/api/markets/balances.ts new file mode 100644 index 00000000..0f71affd --- /dev/null +++ b/src/pages/api/markets/balances.ts @@ -0,0 +1,35 @@ +import { Coin } from '@cosmjs/stargate' +import { gql, request as gqlRequest } from 'graphql-request' +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_RED_BANK, ENV_MISSING_MESSAGE, URL_GQL } from 'constants/env' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_GQL || !ADDRESS_RED_BANK) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const result = await gqlRequest( + URL_GQL, + gql` + query RedbankBalances { + bank { + balance( + address: "${ADDRESS_RED_BANK}" + ) { + amount + denom + } + } + } + `, + ) + + return res.status(200).json(result.bank.balance) +} + +interface Result { + bank: { + balance: Coin[] + } +} diff --git a/src/pages/api/markets/borrow.ts b/src/pages/api/markets/borrow.ts new file mode 100644 index 00000000..1b358828 --- /dev/null +++ b/src/pages/api/markets/borrow.ts @@ -0,0 +1,43 @@ +import { NextApiRequest, NextApiResponse } from 'next' + +import { ENV_MISSING_MESSAGE, URL_API } from 'constants/env' +import { getMarketAssets } from 'utils/assets' +import { Coin } from '@cosmjs/stargate' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_API) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const marketAssets = getMarketAssets() + const $liquidity = fetch(`${URL_API}/markets/liquidity`) + const $markets = fetch(`${URL_API}/markets`) + + const borrow: BorrowData[] = await Promise.all([$liquidity, $markets]).then( + async ([$liquidity, $markets]) => { + const liquidity: Coin[] = await $liquidity.json() + const markets: Market[] = await $markets.json() + + return marketAssets.map((asset) => { + const currentMarket = markets.find((market) => market.denom === asset.denom) + return { + denom: asset.denom, + borrowRate: currentMarket?.borrow_rate ?? '0', + marketLiquidity: liquidity.find((coin) => coin.denom === asset.denom)?.amount ?? '0', + } + }) + }, + ) + + if (borrow) { + return res.status(200).json(borrow) + } + + return res.status(404) +} + +export interface BorrowData { + denom: string + borrowRate: string + marketLiquidity: string +} diff --git a/src/pages/api/markets/debts.ts b/src/pages/api/markets/debts.ts new file mode 100644 index 00000000..88b95616 --- /dev/null +++ b/src/pages/api/markets/debts.ts @@ -0,0 +1,59 @@ +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_RED_BANK, ENV_MISSING_MESSAGE, URL_API, URL_GQL } from 'constants/env' +import { gql, request as gqlRequest } from 'graphql-request' + +import { getContractQuery } from 'utils/query' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_API || !ADDRESS_RED_BANK || !URL_GQL) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const markets: Market[] = await (await fetch(`${URL_API}/markets`)).json() + + let query = '' + + markets.forEach((asset: any) => { + query += getContractQuery( + asset.denom, + ADDRESS_RED_BANK || '', + ` + { + underlying_debt_amount: { + denom: "${asset.denom}" + amount_scaled: "${asset.debt_total_scaled}" + } + }`, + ) + }) + + const result = await gqlRequest( + URL_GQL, + gql` + query RedbankBalances { + debts: wasm { + ${query} + } + } + `, + ) + + if (result) { + const debts = Object.keys(result.debts).map((key) => { + return { + denom: key, + amount: result.debts[key], + } + }) + return res.status(200).json(debts) + } + + return res.status(404) +} + +interface DebtsQuery { + debts: { + [key: string]: string + } +} diff --git a/src/pages/api/markets/deposits.ts b/src/pages/api/markets/deposits.ts new file mode 100644 index 00000000..ceec966c --- /dev/null +++ b/src/pages/api/markets/deposits.ts @@ -0,0 +1,59 @@ +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_RED_BANK, ENV_MISSING_MESSAGE, URL_API, URL_GQL, URL_RPC } from 'constants/env' +import { gql, request as gqlRequest } from 'graphql-request' + +import { getContractQuery } from 'utils/query' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_RPC || !ADDRESS_RED_BANK || !URL_GQL || !URL_API) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const markets = await (await fetch(`${URL_API}/markets`)).json() + + let query = '' + + markets.forEach((asset: any) => { + query += getContractQuery( + asset.denom, + ADDRESS_RED_BANK || '', + ` + { + underlying_liquidity_amount: { + denom: "${asset.denom}" + amount_scaled: "${asset.collateral_total_scaled}" + } + }`, + ) + }) + + const result = await gqlRequest( + URL_GQL, + gql` + query RedbankBalances { + deposits: wasm { + ${query} + } + } + `, + ) + + if (result) { + const deposits = Object.keys(result.deposits).map((key) => { + return { + denom: key, + amount: result.deposits[key], + } + }) + return res.status(200).json(deposits) + } + + return res.status(404) +} + +interface DepositsQuery { + deposits: { + [key: string]: string + } +} diff --git a/src/pages/api/markets/index.ts b/src/pages/api/markets/index.ts new file mode 100644 index 00000000..1ae673a8 --- /dev/null +++ b/src/pages/api/markets/index.ts @@ -0,0 +1,44 @@ +import { gql, request as gqlRequest } from 'graphql-request' +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_INCENTIVES, ADDRESS_RED_BANK, ENV_MISSING_MESSAGE, URL_GQL } from 'constants/env' +import { getMarketAssets } from 'utils/assets' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_GQL || !ADDRESS_RED_BANK || !ADDRESS_INCENTIVES) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const marketAssets = getMarketAssets() + + const marketQueries = marketAssets.map( + (asset: Asset) => + `${asset.denom}: contractQuery( + contractAddress: "${ADDRESS_RED_BANK}" + query: { market: { denom: "${asset.denom}" } } + )`, + ) + + const result = await gqlRequest( + URL_GQL, + gql` + query RedbankQuery { + rbwasmkey: wasm { + ${marketQueries} + } + } + `, + ) + + const markets = marketAssets.map((asset) => { + const market = result.rbwasmkey[`${asset.denom}`] + return market + }) + return res.status(200).json(markets) +} + +interface RedBankData { + rbwasmkey: { + [key: string]: Market + } +} diff --git a/src/pages/api/markets/liquidity.ts b/src/pages/api/markets/liquidity.ts new file mode 100644 index 00000000..cf5f688a --- /dev/null +++ b/src/pages/api/markets/liquidity.ts @@ -0,0 +1,42 @@ +import { NextApiRequest, NextApiResponse } from 'next' + +import { Coin } from '@cosmjs/stargate' +import { ENV_MISSING_MESSAGE, URL_API } from 'constants/env' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_API) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const $deposits = fetch(`${URL_API}/markets/deposits`) + const $debts = fetch(`${URL_API}/markets/debts`) + + const liquidity: Coin[] = await Promise.all([$deposits, $debts]).then( + async ([$deposits, $debts]) => { + const deposits: Coin[] = await $deposits.json() + const debts: Coin[] = await $debts.json() + + return deposits.map((deposit) => { + const debt = debts.find((debt) => debt.denom === deposit.denom) + + if (debt) { + return { + denom: deposit.denom, + amount: (Number(deposit.amount) - Number(debt.amount)).toString(), + } + } + + return { + denom: deposit.denom, + amount: '0', + } + }) + }, + ) + + if (liquidity) { + return res.status(200).json(liquidity) + } + + return res.status(404) +} diff --git a/src/pages/api/prices/index.ts b/src/pages/api/prices/index.ts new file mode 100644 index 00000000..ff4f20c5 --- /dev/null +++ b/src/pages/api/prices/index.ts @@ -0,0 +1,43 @@ +import { gql, request as gqlRequest } from 'graphql-request' +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_ORACLE, ENV_MISSING_MESSAGE, URL_GQL } from 'constants/env' +import { getMarketAssets } from 'utils/assets' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_GQL || !ADDRESS_ORACLE) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const marketAssets = getMarketAssets() + + const result = await gqlRequest( + URL_GQL, + gql` + query PriceOracle { + prices: wasm { + ${marketAssets.map((asset) => { + return `${asset.symbol}: contractQuery( + contractAddress: "${ADDRESS_ORACLE}" + query: { + price: { + denom: "${asset.denom}" + } + } + )` + })} + } + } + `, + ) + + const data = Object.values(result?.prices).reduce( + (acc, entry) => ({ + ...acc, + [entry.denom]: Number(entry.price), + }), + {}, + ) as { [key in string]: number } + + return res.status(200).json(data) +} diff --git a/src/pages/api/vaults/index.ts b/src/pages/api/vaults/index.ts new file mode 100644 index 00000000..7c4ecd8e --- /dev/null +++ b/src/pages/api/vaults/index.ts @@ -0,0 +1,21 @@ +import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate' +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_CREDIT_MANAGER, ENV_MISSING_MESSAGE, URL_RPC } from 'constants/env' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_RPC || !ADDRESS_CREDIT_MANAGER) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + const client = await CosmWasmClient.connect(URL_RPC) + + const data = await client.queryContractSmart(ADDRESS_CREDIT_MANAGER, { + vaults_info: { limit: 5, start_after: undefined }, + }) + + if (data) { + return res.status(200).json(data) + } + + return res.status(404) +} diff --git a/src/pages/api/wallets/[address]/accounts.ts b/src/pages/api/wallets/[address]/accounts.ts new file mode 100644 index 00000000..4a004d02 --- /dev/null +++ b/src/pages/api/wallets/[address]/accounts.ts @@ -0,0 +1,26 @@ +import { CosmWasmClient } from '@cosmjs/cosmwasm-stargate' +import { NextApiRequest, NextApiResponse } from 'next' + +import { ADDRESS_ACCOUNT_NFT, ENV_MISSING_MESSAGE, URL_RPC } from 'constants/env' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_RPC || !ADDRESS_ACCOUNT_NFT) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const address = req.query.address + + const client = await CosmWasmClient.connect(URL_RPC) + + const data = await client.queryContractSmart(ADDRESS_ACCOUNT_NFT, { + tokens: { + owner: address, + }, + }) + + if (data.tokens) { + return res.status(200).json(data.tokens) + } + + return res.status(404) +} diff --git a/src/pages/api/wallets/[address]/balances.ts b/src/pages/api/wallets/[address]/balances.ts new file mode 100644 index 00000000..a8528a60 --- /dev/null +++ b/src/pages/api/wallets/[address]/balances.ts @@ -0,0 +1,21 @@ +import { NextApiRequest, NextApiResponse } from 'next' + +import { ENV_MISSING_MESSAGE, URL_REST } from 'constants/env' + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (!URL_REST) { + return res.status(404).json(ENV_MISSING_MESSAGE) + } + + const address = req.query.address + const uri = '/cosmos/bank/v1beta1/balances/' + + const response = await fetch(`${URL_REST}${uri}${address}`) + + if (response.ok) { + const data = await response.json() + return res.status(200).json(data.balances) + } + + return res.status(404) +} diff --git a/src/pages/portfolio.tsx b/src/pages/portfolio.tsx deleted file mode 100644 index c0353bb5..00000000 --- a/src/pages/portfolio.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import { Card, FormattedNumber, Text } from 'components' - -const mockedAccounts = [ - { - id: 1, - label: 'Account 1', - networth: 100000, - totalPositionValue: 150000, - debt: 50000, - profit: 25000, - leverage: 3, - maxLeverage: 5, - }, - { - id: 2, - label: 'Account 2', - networth: 33000, - totalPositionValue: 11000, - debt: 20000, - profit: -11366, - leverage: 2, - maxLeverage: 10, - }, - { - id: 3, - label: 'Account 3', - networth: 0, - totalPositionValue: 12938129, - debt: 9999999999, - profit: -99999999, - leverage: 3, - maxLeverage: 5, - }, - { - id: 4, - label: 'Account 4', - networth: 33653.22, - totalPositionValue: 100000, - debt: 50001.9, - profit: 25000, - leverage: 3, - maxLeverage: 5, - }, -] - -const Portfolio = () => { - return ( -
- - - Portfolio Module - - -
- {mockedAccounts.map((account) => ( - - - {account.label} - -
-
- - - - - Net worth - -
-
- - - - - Total Position Value - -
-
- - - - - Debt - -
-
- 0 ? 'text-green-400' : 'text-red-500'}> - 0 ? '+$' : '$'} - /> - - - P&L - -
-
- - - - - Current Leverage - -
-
- - - - - Max Leverage - -
-
-
- ))} -
-
- ) -} - -export default Portfolio diff --git a/src/store/index.ts b/src/store/index.ts new file mode 100644 index 00000000..0e1525db --- /dev/null +++ b/src/store/index.ts @@ -0,0 +1,24 @@ +import create, { GetState, SetState, StoreApi, UseBoundStore } from 'zustand' +import { devtools } from 'zustand/middleware' + +import { BroadcastSlice, createBroadcastSlice } from 'store/slices/broadcast' +import { CommonSlice, createCommonSlice } from 'store/slices/common' +import { createWalletSlice, WalletSlice } from 'store/slices/wallet' + +export interface Store extends CommonSlice, WalletSlice, BroadcastSlice {} + +const store = (set: SetState, get: GetState) => ({ + ...createCommonSlice(set, get), + ...createWalletSlice(set, get), + ...createBroadcastSlice(set, get), +}) + +let useStore: UseBoundStore> + +if (process.env.NODE_ENV !== 'production') { + useStore = create(devtools(store)) +} else { + useStore = create(store) +} + +export default useStore diff --git a/src/store/slices/broadcast.ts b/src/store/slices/broadcast.ts new file mode 100644 index 00000000..9c890f0d --- /dev/null +++ b/src/store/slices/broadcast.ts @@ -0,0 +1,144 @@ +import { Coin, StdFee } from '@cosmjs/stargate' +import { MsgExecuteContract, TxBroadcastResult } from '@marsprotocol/wallet-connector' +import { isMobile } from 'react-device-detect' +import { toast } from 'react-toastify' +import { GetState, SetState } from 'zustand' + +import { ADDRESS_CREDIT_MANAGER, ENV_MISSING_MESSAGE } from 'constants/env' +import { Store } from 'store' +import { getMarketAssets } from 'utils/assets' +import { getSingleValueFromBroadcastResult } from 'utils/broadcast' +import { convertFromGwei } from 'utils/formatters' +import { getTokenSymbol } from 'utils/tokens' + +interface BroadcastResult { + result?: TxBroadcastResult + error?: string +} + +export interface BroadcastSlice { + executeMsg: (options: { + msg: Record + fee: StdFee + funds?: Coin[] + }) => Promise + createCreditAccount: (options: { fee: StdFee }) => Promise + deleteCreditAccount: (options: { fee: StdFee; accountId: string }) => Promise + depositCreditAccount: (options: { + fee: StdFee + accountId: string + deposit: Coin + }) => Promise +} + +export function createBroadcastSlice(set: SetState, get: GetState): BroadcastSlice { + const marketAssets = getMarketAssets() + return { + createCreditAccount: async (options: { fee: StdFee }) => { + const msg = { + create_credit_account: {}, + } + set({ createAccountModal: true }) + const response = await get().executeMsg({ msg, fee: options.fee }) + + if (response.result) { + set({ createAccountModal: false }) + const id = getSingleValueFromBroadcastResult(response.result, 'wasm', 'token_id') + toast.success(`Account ${id} Created`) + set({ fundAccountModal: true }) + return id + } else { + set({ createAccountModal: false }) + toast.error(response.error) + return null + } + }, + deleteCreditAccount: async (options: { fee: StdFee; accountId: string }) => { + const msg = { + burn: { + token_id: options.accountId, + }, + } + set({ deleteAccountModal: true }) + const response = await get().executeMsg({ msg, fee: options.fee }) + + set({ deleteAccountModal: false }) + if (response.result) { + toast.success(`Account ${options.accountId} deleted`) + } else { + toast.error(response.error) + } + return !!response.result + }, + depositCreditAccount: async (options: { fee: StdFee; accountId: string; deposit: Coin }) => { + const deposit = { + denom: options.deposit.denom, + amount: String(options.deposit.amount), + } + const msg = { + update_credit_account: { + account_id: options.accountId, + actions: [ + { + deposit: deposit, + }, + ], + }, + } + const funds = [deposit] + + const response = await get().executeMsg({ msg, fee: options.fee, funds }) + if (response.result) { + toast.success( + `Deposited ${convertFromGwei( + deposit.amount, + deposit.denom, + marketAssets, + )} ${getTokenSymbol(deposit.denom, marketAssets)} to Account ${options.accountId}`, + ) + } else { + toast.error(response.error) + } + return !!response.result + }, + executeMsg: async (options: { + fee: StdFee + msg: Record + funds?: Coin[] + }): Promise => { + const funds = options.funds ?? [] + + try { + const client = get().client + if (!ADDRESS_CREDIT_MANAGER) return { error: ENV_MISSING_MESSAGE } + if (!client) return { error: 'no client detected' } + + const broadcastOptions = { + messages: [ + new MsgExecuteContract({ + sender: client.recentWallet.account.address, + contract: ADDRESS_CREDIT_MANAGER, + msg: options.msg, + funds, + }), + ], + feeAmount: options.fee.amount[0].amount, + gasLimit: options.fee.gas, + memo: undefined, + wallet: client.recentWallet, + mobile: isMobile, + } + + const result = await client.broadcast(broadcastOptions) + + if (result.hash) { + return { result } + } + return { result: undefined, error: 'broadcast failed' } + } catch (e: unknown) { + const error = typeof e === 'string' ? e : 'broadcast failed' + return { result: undefined, error } + } + }, + } +} diff --git a/src/store/slices/common.ts b/src/store/slices/common.ts new file mode 100644 index 00000000..28e15fc0 --- /dev/null +++ b/src/store/slices/common.ts @@ -0,0 +1,23 @@ +import { GetState, SetState } from 'zustand' + +export interface CommonSlice { + createAccountModal: boolean + deleteAccountModal: boolean + enableAnimations: boolean + fundAccountModal: boolean + isOpen: boolean + selectedAccount: string | null + withdrawModal: boolean +} + +export function createCommonSlice(set: SetState, get: GetState) { + return { + createAccountModal: false, + deleteAccountModal: false, + enableAnimations: true, + fundAccountModal: false, + isOpen: true, + selectedAccount: null, + withdrawModal: false, + } +} diff --git a/src/store/slices/wallet.ts b/src/store/slices/wallet.ts new file mode 100644 index 00000000..8d002818 --- /dev/null +++ b/src/store/slices/wallet.ts @@ -0,0 +1,79 @@ +import { WalletClient, WalletConnectionStatus } from '@marsprotocol/wallet-connector' +import { GetState, SetState } from 'zustand' +import { SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate' + +import { MarsAccountNftClient } from 'types/generated/mars-account-nft/MarsAccountNft.client' +import { MarsCreditManagerClient } from 'types/generated/mars-credit-manager/MarsCreditManager.client' +import { MarsSwapperBaseClient } from 'types/generated/mars-swapper-base/MarsSwapperBase.client' +import { ADDRESS_ACCOUNT_NFT, ADDRESS_CREDIT_MANAGER, ADDRESS_SWAPPER } from 'constants/env' + +export interface WalletSlice { + address?: string + client?: WalletClient + name?: string + status: WalletConnectionStatus + signingClient?: SigningCosmWasmClient + clients: { + accountNft?: MarsAccountNftClient + creditManager?: MarsCreditManagerClient + swapperBase?: MarsSwapperBaseClient + } + actions: { + initClients: (address: string, signingClient: SigningCosmWasmClient) => void + initialize: ( + status: WalletConnectionStatus, + signingCosmWasmClient?: SigningCosmWasmClient, + address?: string, + name?: string, + ) => void + } +} + +export function createWalletSlice(set: SetState, get: GetState) { + return { + status: WalletConnectionStatus.Unconnected, + clients: {}, + actions: { + // TODO: work with slices in one global store instead + initClients: (address: string, signingClient: SigningCosmWasmClient) => { + if (!signingClient) return + const accountNft = new MarsAccountNftClient( + signingClient, + address, + ADDRESS_ACCOUNT_NFT || '', + ) + const creditManager = new MarsCreditManagerClient( + signingClient, + address, + ADDRESS_CREDIT_MANAGER || '', + ) + const swapperBase = new MarsSwapperBaseClient(signingClient, address, ADDRESS_SWAPPER || '') + + set(() => ({ + clients: { + accountNft, + creditManager, + swapperBase, + }, + })) + }, + initialize: async ( + status: WalletConnectionStatus, + signingCosmWasmClient?: SigningCosmWasmClient, + address?: string, + name?: string, + ) => { + if (address && signingCosmWasmClient) { + get().actions.initClients(address, signingCosmWasmClient) + } + + set({ + signingClient: signingCosmWasmClient, + address, + status, + name, + }) + }, + }, + } +} diff --git a/src/stores/index.ts b/src/stores/index.ts deleted file mode 100644 index b1c798ee..00000000 --- a/src/stores/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @index(['./*.tsx'], f => `export { ${f.name} } from '${f.path}'`) -export { useAccountDetailsStore } from './useAccountDetailsStore' -export { useModalStore } from './useModalStore' -export { useNetworkConfigStore } from './useNetworkConfigStore' -export { useSettingsStore } from './useSettingsStore' -export { useWalletStore } from './useWalletStore' -// @endindex diff --git a/src/stores/useAccountDetailsStore.tsx b/src/stores/useAccountDetailsStore.tsx deleted file mode 100644 index b945602c..00000000 --- a/src/stores/useAccountDetailsStore.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import create from 'zustand' - -interface AccountDetailsStore { - isOpen: boolean - selectedAccount: string | null -} - -export const useAccountDetailsStore = create()(() => ({ - isOpen: true, - selectedAccount: null, -})) diff --git a/src/stores/useModalStore.tsx b/src/stores/useModalStore.tsx deleted file mode 100644 index 19183bb6..00000000 --- a/src/stores/useModalStore.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import create from 'zustand' - -interface AccountDetailsStore { - fundAccountModal: boolean - withdrawModal: boolean - createAccountModal: boolean - deleteAccountModal: boolean -} - -export const useModalStore = create()(() => ({ - fundAccountModal: false, - withdrawModal: false, - createAccountModal: false, - deleteAccountModal: false, -})) diff --git a/src/stores/useNetworkConfigStore.tsx b/src/stores/useNetworkConfigStore.tsx deleted file mode 100644 index 5a1198d9..00000000 --- a/src/stores/useNetworkConfigStore.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import create from 'zustand' - -import { networkConfig } from 'config/osmo-test-4' - -// TODO: Create dynamic network import -export const useNetworkConfigStore = create()(() => { - return networkConfig -}) diff --git a/src/stores/useSettingsStore.tsx b/src/stores/useSettingsStore.tsx deleted file mode 100644 index 3887d21d..00000000 --- a/src/stores/useSettingsStore.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import create from 'zustand' - -interface SettingsStore { - enableAnimations: boolean -} - -export const useSettingsStore = create()(() => ({ - enableAnimations: true, -})) diff --git a/src/stores/useWalletStore.tsx b/src/stores/useWalletStore.tsx deleted file mode 100644 index 28439c10..00000000 --- a/src/stores/useWalletStore.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { - WalletChainInfo, - WalletConnectionStatus, - WalletSigningCosmWasmClient, -} from '@marsprotocol/wallet-connector' -import create from 'zustand' - -import { networkConfig } from 'config/osmo-test-4' -import { MarsAccountNftClient } from 'types/generated/mars-account-nft/MarsAccountNft.client' -import { MarsCreditManagerClient } from 'types/generated/mars-credit-manager/MarsCreditManager.client' -import { MarsSwapperBaseClient } from 'types/generated/mars-swapper-base/MarsSwapperBase.client' - -interface WalletStore { - address?: string - chainInfo?: WalletChainInfo - metamaskInstalled: boolean - name?: string - status: WalletConnectionStatus - signingClient?: WalletSigningCosmWasmClient - clients: { - accountNft?: MarsAccountNftClient - creditManager?: MarsCreditManagerClient - swapperBase?: MarsSwapperBaseClient - } - actions: { - initClients: (address: string, signingClient: WalletSigningCosmWasmClient) => void - initialize: ( - status: WalletConnectionStatus, - signingCosmWasmClient?: WalletSigningCosmWasmClient, - address?: string, - name?: string, - chainInfo?: WalletChainInfo, - ) => void - setMetamaskInstalledStatus: (value: boolean) => void - } -} - -export const useWalletStore = create()((set, get) => ({ - metamaskInstalled: false, - status: WalletConnectionStatus.ReadyForConnection, - clients: {}, - actions: { - // TODO: work with slices in one global store instead - initClients: (address, signingClient) => { - if (!signingClient) return - const accountNft = new MarsAccountNftClient( - signingClient, - address, - networkConfig.contracts.accountNft, - ) - const creditManager = new MarsCreditManagerClient( - signingClient, - address, - networkConfig.contracts.creditManager, - ) - const swapperBase = new MarsSwapperBaseClient( - signingClient, - address, - networkConfig.contracts.swapper, - ) - - set(() => ({ - clients: { - accountNft, - creditManager, - swapperBase, - }, - })) - }, - initialize: async ( - status: WalletConnectionStatus, - signingCosmWasmClient?: WalletSigningCosmWasmClient, - address?: string, - name?: string, - chainInfo?: WalletChainInfo, - ) => { - if (address && signingCosmWasmClient) { - get().actions.initClients(address, signingCosmWasmClient) - } - - set({ - signingClient: signingCosmWasmClient, - address, - status, - name, - chainInfo, - }) - }, - setMetamaskInstalledStatus: (value: boolean) => set(() => ({ metamaskInstalled: value })), - }, -})) diff --git a/src/types/generated/mars-account-nft/MarsAccountNft.client.ts b/src/types/generated/mars-account-nft/MarsAccountNft.client.ts index f0240173..eae631ba 100644 --- a/src/types/generated/mars-account-nft/MarsAccountNft.client.ts +++ b/src/types/generated/mars-account-nft/MarsAccountNft.client.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -20,19 +20,22 @@ import { Expiration, InstantiateMsg, MinterResponse, + NftConfigBaseForString, + NftConfigUpdates, NftInfoResponseForEmpty, NumTokensResponse, OperatorsResponse, OwnerOfResponse, QueryMsg, - String, Timestamp, TokensResponse, + Uint128, Uint64, } from './MarsAccountNft.types' export interface MarsAccountNftReadOnlyInterface { contractAddress: string - proposedNewOwner: () => Promise + config: () => Promise + nextId: () => Promise ownerOf: ({ includeExpired, tokenId, @@ -102,7 +105,8 @@ export class MarsAccountNftQueryClient implements MarsAccountNftReadOnlyInterfac constructor(client: CosmWasmClient, contractAddress: string) { this.client = client this.contractAddress = contractAddress - this.proposedNewOwner = this.proposedNewOwner.bind(this) + this.config = this.config.bind(this) + this.nextId = this.nextId.bind(this) this.ownerOf = this.ownerOf.bind(this) this.approval = this.approval.bind(this) this.approvals = this.approvals.bind(this) @@ -116,9 +120,14 @@ export class MarsAccountNftQueryClient implements MarsAccountNftReadOnlyInterfac this.minter = this.minter.bind(this) } - proposedNewOwner = async (): Promise => { + config = async (): Promise => { return this.client.queryContractSmart(this.contractAddress, { - proposed_new_owner: {}, + config: {}, + }) + } + nextId = async (): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + next_id: {}, }) } ownerOf = async ({ @@ -257,17 +266,17 @@ export class MarsAccountNftQueryClient implements MarsAccountNftReadOnlyInterfac export interface MarsAccountNftInterface extends MarsAccountNftReadOnlyInterface { contractAddress: string sender: string - proposeNewOwner: ( + updateConfig: ( { - newOwner, + updates, }: { - newOwner: string + updates: NftConfigUpdates }, fee?: number | StdFee | 'auto', memo?: string, funds?: Coin[], ) => Promise - acceptOwnership: ( + acceptMinterRole: ( fee?: number | StdFee | 'auto', memo?: string, funds?: Coin[], @@ -282,6 +291,16 @@ export interface MarsAccountNftInterface extends MarsAccountNftReadOnlyInterface memo?: string, funds?: Coin[], ) => Promise + burn: ( + { + tokenId, + }: { + tokenId: string + }, + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise transferNft: ( { recipient, @@ -356,16 +375,6 @@ export interface MarsAccountNftInterface extends MarsAccountNftReadOnlyInterface memo?: string, funds?: Coin[], ) => Promise - burn: ( - { - tokenId, - }: { - tokenId: string - }, - fee?: number | StdFee | 'auto', - memo?: string, - funds?: Coin[], - ) => Promise } export class MarsAccountNftClient extends MarsAccountNftQueryClient @@ -380,23 +389,23 @@ export class MarsAccountNftClient this.client = client this.sender = sender this.contractAddress = contractAddress - this.proposeNewOwner = this.proposeNewOwner.bind(this) - this.acceptOwnership = this.acceptOwnership.bind(this) + this.updateConfig = this.updateConfig.bind(this) + this.acceptMinterRole = this.acceptMinterRole.bind(this) this.mint = this.mint.bind(this) + this.burn = this.burn.bind(this) this.transferNft = this.transferNft.bind(this) this.sendNft = this.sendNft.bind(this) this.approve = this.approve.bind(this) this.revoke = this.revoke.bind(this) this.approveAll = this.approveAll.bind(this) this.revokeAll = this.revokeAll.bind(this) - this.burn = this.burn.bind(this) } - proposeNewOwner = async ( + updateConfig = async ( { - newOwner, + updates, }: { - newOwner: string + updates: NftConfigUpdates }, fee: number | StdFee | 'auto' = 'auto', memo?: string, @@ -406,8 +415,8 @@ export class MarsAccountNftClient this.sender, this.contractAddress, { - propose_new_owner: { - new_owner: newOwner, + update_config: { + updates, }, }, fee, @@ -415,7 +424,7 @@ export class MarsAccountNftClient funds, ) } - acceptOwnership = async ( + acceptMinterRole = async ( fee: number | StdFee | 'auto' = 'auto', memo?: string, funds?: Coin[], @@ -424,7 +433,7 @@ export class MarsAccountNftClient this.sender, this.contractAddress, { - accept_ownership: {}, + accept_minter_role: {}, }, fee, memo, @@ -454,6 +463,29 @@ export class MarsAccountNftClient funds, ) } + burn = async ( + { + tokenId, + }: { + tokenId: string + }, + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + burn: { + token_id: tokenId, + }, + }, + fee, + memo, + funds, + ) + } transferNft = async ( { recipient, @@ -613,27 +645,4 @@ export class MarsAccountNftClient funds, ) } - burn = async ( - { - tokenId, - }: { - tokenId: string - }, - fee: number | StdFee | 'auto' = 'auto', - memo?: string, - funds?: Coin[], - ): Promise => { - return await this.client.execute( - this.sender, - this.contractAddress, - { - burn: { - token_id: tokenId, - }, - }, - fee, - memo, - funds, - ) - } } diff --git a/src/types/generated/mars-account-nft/MarsAccountNft.message-composer.ts b/src/types/generated/mars-account-nft/MarsAccountNft.message-composer.ts index de58e069..2368d7b2 100644 --- a/src/types/generated/mars-account-nft/MarsAccountNft.message-composer.ts +++ b/src/types/generated/mars-account-nft/MarsAccountNft.message-composer.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -22,28 +22,30 @@ import { Expiration, InstantiateMsg, MinterResponse, + NftConfigBaseForString, + NftConfigUpdates, NftInfoResponseForEmpty, NumTokensResponse, OperatorsResponse, OwnerOfResponse, QueryMsg, - String, Timestamp, TokensResponse, + Uint128, Uint64, } from './MarsAccountNft.types' export interface MarsAccountNftMessage { contractAddress: string sender: string - proposeNewOwner: ( + updateConfig: ( { - newOwner, + updates, }: { - newOwner: string + updates: NftConfigUpdates }, funds?: Coin[], ) => MsgExecuteContractEncodeObject - acceptOwnership: (funds?: Coin[]) => MsgExecuteContractEncodeObject + acceptMinterRole: (funds?: Coin[]) => MsgExecuteContractEncodeObject mint: ( { user, @@ -52,6 +54,14 @@ export interface MarsAccountNftMessage { }, funds?: Coin[], ) => MsgExecuteContractEncodeObject + burn: ( + { + tokenId, + }: { + tokenId: string + }, + funds?: Coin[], + ) => MsgExecuteContractEncodeObject transferNft: ( { recipient, @@ -114,14 +124,6 @@ export interface MarsAccountNftMessage { }, funds?: Coin[], ) => MsgExecuteContractEncodeObject - burn: ( - { - tokenId, - }: { - tokenId: string - }, - funds?: Coin[], - ) => MsgExecuteContractEncodeObject } export class MarsAccountNftMessageComposer implements MarsAccountNftMessage { sender: string @@ -130,23 +132,23 @@ export class MarsAccountNftMessageComposer implements MarsAccountNftMessage { constructor(sender: string, contractAddress: string) { this.sender = sender this.contractAddress = contractAddress - this.proposeNewOwner = this.proposeNewOwner.bind(this) - this.acceptOwnership = this.acceptOwnership.bind(this) + this.updateConfig = this.updateConfig.bind(this) + this.acceptMinterRole = this.acceptMinterRole.bind(this) this.mint = this.mint.bind(this) + this.burn = this.burn.bind(this) this.transferNft = this.transferNft.bind(this) this.sendNft = this.sendNft.bind(this) this.approve = this.approve.bind(this) this.revoke = this.revoke.bind(this) this.approveAll = this.approveAll.bind(this) this.revokeAll = this.revokeAll.bind(this) - this.burn = this.burn.bind(this) } - proposeNewOwner = ( + updateConfig = ( { - newOwner, + updates, }: { - newOwner: string + updates: NftConfigUpdates }, funds?: Coin[], ): MsgExecuteContractEncodeObject => { @@ -157,8 +159,8 @@ export class MarsAccountNftMessageComposer implements MarsAccountNftMessage { contract: this.contractAddress, msg: toUtf8( JSON.stringify({ - propose_new_owner: { - new_owner: newOwner, + update_config: { + updates, }, }), ), @@ -166,7 +168,7 @@ export class MarsAccountNftMessageComposer implements MarsAccountNftMessage { }), } } - acceptOwnership = (funds?: Coin[]): MsgExecuteContractEncodeObject => { + acceptMinterRole = (funds?: Coin[]): MsgExecuteContractEncodeObject => { return { typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', value: MsgExecuteContract.fromPartial({ @@ -174,7 +176,7 @@ export class MarsAccountNftMessageComposer implements MarsAccountNftMessage { contract: this.contractAddress, msg: toUtf8( JSON.stringify({ - accept_ownership: {}, + accept_minter_role: {}, }), ), funds, @@ -205,6 +207,30 @@ export class MarsAccountNftMessageComposer implements MarsAccountNftMessage { }), } } + burn = ( + { + tokenId, + }: { + tokenId: string + }, + funds?: Coin[], + ): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + burn: { + token_id: tokenId, + }, + }), + ), + funds, + }), + } + } transferNft = ( { recipient, @@ -370,28 +396,4 @@ export class MarsAccountNftMessageComposer implements MarsAccountNftMessage { }), } } - burn = ( - { - tokenId, - }: { - tokenId: string - }, - funds?: Coin[], - ): MsgExecuteContractEncodeObject => { - return { - typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', - value: MsgExecuteContract.fromPartial({ - sender: this.sender, - contract: this.contractAddress, - msg: toUtf8( - JSON.stringify({ - burn: { - token_id: tokenId, - }, - }), - ), - funds, - }), - } - } } diff --git a/src/types/generated/mars-account-nft/MarsAccountNft.react-query.ts b/src/types/generated/mars-account-nft/MarsAccountNft.react-query.ts index 29534412..2d9f8b27 100644 --- a/src/types/generated/mars-account-nft/MarsAccountNft.react-query.ts +++ b/src/types/generated/mars-account-nft/MarsAccountNft.react-query.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -21,14 +21,16 @@ import { Expiration, InstantiateMsg, MinterResponse, + NftConfigBaseForString, + NftConfigUpdates, NftInfoResponseForEmpty, NumTokensResponse, OperatorsResponse, OwnerOfResponse, QueryMsg, - String, Timestamp, TokensResponse, + Uint128, Uint64, } from './MarsAccountNft.types' import { MarsAccountNftClient, MarsAccountNftQueryClient } from './MarsAccountNft.client' @@ -40,14 +42,10 @@ export const marsAccountNftQueryKeys = { ] as const, address: (contractAddress: string | undefined) => [{ ...marsAccountNftQueryKeys.contract[0], address: contractAddress }] as const, - proposedNewOwner: (contractAddress: string | undefined, args?: Record) => - [ - { - ...marsAccountNftQueryKeys.address(contractAddress)[0], - method: 'proposed_new_owner', - args, - }, - ] as const, + config: (contractAddress: string | undefined, args?: Record) => + [{ ...marsAccountNftQueryKeys.address(contractAddress)[0], method: 'config', args }] as const, + nextId: (contractAddress: string | undefined, args?: Record) => + [{ ...marsAccountNftQueryKeys.address(contractAddress)[0], method: 'next_id', args }] as const, ownerOf: (contractAddress: string | undefined, args?: Record) => [{ ...marsAccountNftQueryKeys.address(contractAddress)[0], method: 'owner_of', args }] as const, approval: (contractAddress: string | undefined, args?: Record) => @@ -326,38 +324,27 @@ export function useMarsAccountNftOwnerOfQuery({ { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } -export interface MarsAccountNftProposedNewOwnerQuery - extends MarsAccountNftReactQuery {} -export function useMarsAccountNftProposedNewOwnerQuery({ +export interface MarsAccountNftNextIdQuery extends MarsAccountNftReactQuery {} +export function useMarsAccountNftNextIdQuery({ client, options, -}: MarsAccountNftProposedNewOwnerQuery) { - return useQuery( - marsAccountNftQueryKeys.proposedNewOwner(client?.contractAddress), - () => (client ? client.proposedNewOwner() : Promise.reject(new Error('Invalid client'))), +}: MarsAccountNftNextIdQuery) { + return useQuery( + marsAccountNftQueryKeys.nextId(client?.contractAddress), + () => (client ? client.nextId() : Promise.reject(new Error('Invalid client'))), { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } -export interface MarsAccountNftBurnMutation { - client: MarsAccountNftClient - msg: { - tokenId: string - } - args?: { - fee?: number | StdFee | 'auto' - memo?: string - funds?: Coin[] - } -} -export function useMarsAccountNftBurnMutation( - options?: Omit< - UseMutationOptions, - 'mutationFn' - >, -) { - return useMutation( - ({ client, msg, args: { fee, memo, funds } = {} }) => client.burn(msg, fee, memo, funds), - options, +export interface MarsAccountNftConfigQuery + extends MarsAccountNftReactQuery {} +export function useMarsAccountNftConfigQuery({ + client, + options, +}: MarsAccountNftConfigQuery) { + return useQuery( + marsAccountNftQueryKeys.config(client?.contractAddress), + () => (client ? client.config() : Promise.reject(new Error('Invalid client'))), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } export interface MarsAccountNftRevokeAllMutation { @@ -499,6 +486,28 @@ export function useMarsAccountNftTransferNftMutation( options, ) } +export interface MarsAccountNftBurnMutation { + client: MarsAccountNftClient + msg: { + tokenId: string + } + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsAccountNftBurnMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => client.burn(msg, fee, memo, funds), + options, + ) +} export interface MarsAccountNftMintMutation { client: MarsAccountNftClient msg: { @@ -521,7 +530,7 @@ export function useMarsAccountNftMintMutation( options, ) } -export interface MarsAccountNftAcceptOwnershipMutation { +export interface MarsAccountNftAcceptMinterRoleMutation { client: MarsAccountNftClient args?: { fee?: number | StdFee | 'auto' @@ -529,21 +538,21 @@ export interface MarsAccountNftAcceptOwnershipMutation { funds?: Coin[] } } -export function useMarsAccountNftAcceptOwnershipMutation( +export function useMarsAccountNftAcceptMinterRoleMutation( options?: Omit< - UseMutationOptions, + UseMutationOptions, 'mutationFn' >, ) { - return useMutation( - ({ client, args: { fee, memo, funds } = {} }) => client.acceptOwnership(fee, memo, funds), + return useMutation( + ({ client, args: { fee, memo, funds } = {} }) => client.acceptMinterRole(fee, memo, funds), options, ) } -export interface MarsAccountNftProposeNewOwnerMutation { +export interface MarsAccountNftUpdateConfigMutation { client: MarsAccountNftClient msg: { - newOwner: string + updates: NftConfigUpdates } args?: { fee?: number | StdFee | 'auto' @@ -551,15 +560,15 @@ export interface MarsAccountNftProposeNewOwnerMutation { funds?: Coin[] } } -export function useMarsAccountNftProposeNewOwnerMutation( +export function useMarsAccountNftUpdateConfigMutation( options?: Omit< - UseMutationOptions, + UseMutationOptions, 'mutationFn' >, ) { - return useMutation( + return useMutation( ({ client, msg, args: { fee, memo, funds } = {} }) => - client.proposeNewOwner(msg, fee, memo, funds), + client.updateConfig(msg, fee, memo, funds), options, ) } diff --git a/src/types/generated/mars-account-nft/MarsAccountNft.types.ts b/src/types/generated/mars-account-nft/MarsAccountNft.types.ts index 062be620..54dd22b6 100644 --- a/src/types/generated/mars-account-nft/MarsAccountNft.types.ts +++ b/src/types/generated/mars-account-nft/MarsAccountNft.types.ts @@ -1,29 +1,37 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ +export type Uint128 = string export interface InstantiateMsg { + health_contract?: string | null + max_value_for_burn: Uint128 minter: string name: string symbol: string } export type ExecuteMsg = | { - propose_new_owner: { - new_owner: string + update_config: { + updates: NftConfigUpdates } } | { - accept_ownership: {} + accept_minter_role: {} } | { mint: { user: string } } + | { + burn: { + token_id: string + } + } | { transfer_nft: { recipient: string @@ -61,11 +69,6 @@ export type ExecuteMsg = operator: string } } - | { - burn: { - token_id: string - } - } export type Binary = string export type Expiration = | { @@ -79,9 +82,17 @@ export type Expiration = } export type Timestamp = Uint64 export type Uint64 = string +export interface NftConfigUpdates { + health_contract_addr?: string | null + max_value_for_burn?: Uint128 | null + proposed_new_minter?: string | null +} export type QueryMsg = | { - proposed_new_owner: {} + config: {} + } + | { + next_id: {} } | { owner_of: { @@ -174,6 +185,11 @@ export interface ApprovalResponse { export interface ApprovalsResponse { approvals: Approval[] } +export interface NftConfigBaseForString { + health_contract_addr?: string | null + max_value_for_burn: Uint128 + proposed_new_minter?: string | null +} export interface ContractInfoResponse { name: string symbol: string @@ -184,4 +200,3 @@ export interface MinterResponse { export interface NumTokensResponse { count: number } -export type String = string diff --git a/src/types/generated/mars-account-nft/bundle.ts b/src/types/generated/mars-account-nft/bundle.ts index b6237eba..3fef9c89 100644 --- a/src/types/generated/mars-account-nft/bundle.ts +++ b/src/types/generated/mars-account-nft/bundle.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ diff --git a/src/types/generated/mars-credit-manager/MarsCreditManager.client.ts b/src/types/generated/mars-credit-manager/MarsCreditManager.client.ts index 0a8c10e0..0a9c7e3f 100644 --- a/src/types/generated/mars-credit-manager/MarsCreditManager.client.ts +++ b/src/types/generated/mars-credit-manager/MarsCreditManager.client.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -10,28 +10,36 @@ import { StdFee } from '@cosmjs/amino' import { Action, + ActionAmount, + ActionCoin, Addr, ArrayOfCoin, ArrayOfCoinBalanceResponseItem, ArrayOfDebtShares, + ArrayOfLentShares, ArrayOfSharesResponseItem, ArrayOfString, - ArrayOfVaultInstantiateConfig, + ArrayOfVaultInfoResponse, ArrayOfVaultPositionResponseItem, ArrayOfVaultWithBalance, CallbackMsg, Coin, CoinBalanceResponseItem, + CoinValue, ConfigResponse, ConfigUpdates, DebtAmount, DebtShares, Decimal, ExecuteMsg, - HealthResponse, + HealthContractBaseForString, InstantiateMsg, + LentAmount, + LentShares, LockingVaultAmount, + NftConfigUpdates, OracleBaseForString, + OwnerUpdate, Positions, QueryMsg, RedBankBaseForString, @@ -44,10 +52,13 @@ import { VaultBaseForAddr, VaultBaseForString, VaultConfig, + VaultInfoResponse, VaultInstantiateConfig, VaultPosition, VaultPositionAmount, VaultPositionResponseItem, + VaultPositionType, + VaultPositionValue, VaultUnlockingPosition, VaultWithBalance, ZapperBaseForString, @@ -55,13 +66,14 @@ import { export interface MarsCreditManagerReadOnlyInterface { contractAddress: string config: () => Promise - vaultConfigs: ({ + vaultInfo: ({ vault }: { vault: VaultBaseForString }) => Promise + vaultsInfo: ({ limit, startAfter, }: { limit?: number startAfter?: VaultBaseForString - }) => Promise + }) => Promise allowedCoins: ({ limit, startAfter, @@ -70,7 +82,6 @@ export interface MarsCreditManagerReadOnlyInterface { startAfter?: string }) => Promise positions: ({ accountId }: { accountId: string }) => Promise - health: ({ accountId }: { accountId: string }) => Promise allCoinBalances: ({ limit, startAfter, @@ -93,6 +104,21 @@ export interface MarsCreditManagerReadOnlyInterface { limit?: number startAfter?: string }) => Promise + allLentShares: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }) => Promise + totalLentShares: () => Promise + allTotalLentShares: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string + }) => Promise allVaultPositions: ({ limit, startAfter, @@ -116,6 +142,11 @@ export interface MarsCreditManagerReadOnlyInterface { lpTokenOut: string }) => Promise estimateWithdrawLiquidity: ({ lpToken }: { lpToken: Coin }) => Promise + vaultPositionValue: ({ + vaultPosition, + }: { + vaultPosition: VaultPosition + }) => Promise } export class MarsCreditManagerQueryClient implements MarsCreditManagerReadOnlyInterface { client: CosmWasmClient @@ -125,19 +156,23 @@ export class MarsCreditManagerQueryClient implements MarsCreditManagerReadOnlyIn this.client = client this.contractAddress = contractAddress this.config = this.config.bind(this) - this.vaultConfigs = this.vaultConfigs.bind(this) + this.vaultInfo = this.vaultInfo.bind(this) + this.vaultsInfo = this.vaultsInfo.bind(this) this.allowedCoins = this.allowedCoins.bind(this) this.positions = this.positions.bind(this) - this.health = this.health.bind(this) this.allCoinBalances = this.allCoinBalances.bind(this) this.allDebtShares = this.allDebtShares.bind(this) this.totalDebtShares = this.totalDebtShares.bind(this) this.allTotalDebtShares = this.allTotalDebtShares.bind(this) + this.allLentShares = this.allLentShares.bind(this) + this.totalLentShares = this.totalLentShares.bind(this) + this.allTotalLentShares = this.allTotalLentShares.bind(this) this.allVaultPositions = this.allVaultPositions.bind(this) this.totalVaultCoinBalance = this.totalVaultCoinBalance.bind(this) this.allTotalVaultCoinBalances = this.allTotalVaultCoinBalances.bind(this) this.estimateProvideLiquidity = this.estimateProvideLiquidity.bind(this) this.estimateWithdrawLiquidity = this.estimateWithdrawLiquidity.bind(this) + this.vaultPositionValue = this.vaultPositionValue.bind(this) } config = async (): Promise => { @@ -145,15 +180,22 @@ export class MarsCreditManagerQueryClient implements MarsCreditManagerReadOnlyIn config: {}, }) } - vaultConfigs = async ({ + vaultInfo = async ({ vault }: { vault: VaultBaseForString }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + vault_info: { + vault, + }, + }) + } + vaultsInfo = async ({ limit, startAfter, }: { limit?: number startAfter?: VaultBaseForString - }): Promise => { + }): Promise => { return this.client.queryContractSmart(this.contractAddress, { - vault_configs: { + vaults_info: { limit, start_after: startAfter, }, @@ -180,13 +222,6 @@ export class MarsCreditManagerQueryClient implements MarsCreditManagerReadOnlyIn }, }) } - health = async ({ accountId }: { accountId: string }): Promise => { - return this.client.queryContractSmart(this.contractAddress, { - health: { - account_id: accountId, - }, - }) - } allCoinBalances = async ({ limit, startAfter, @@ -234,6 +269,39 @@ export class MarsCreditManagerQueryClient implements MarsCreditManagerReadOnlyIn }, }) } + allLentShares = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_lent_shares: { + limit, + start_after: startAfter, + }, + }) + } + totalLentShares = async (): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + total_lent_shares: {}, + }) + } + allTotalLentShares = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_total_lent_shares: { + limit, + start_after: startAfter, + }, + }) + } allVaultPositions = async ({ limit, startAfter, @@ -290,6 +358,17 @@ export class MarsCreditManagerQueryClient implements MarsCreditManagerReadOnlyIn }, }) } + vaultPositionValue = async ({ + vaultPosition, + }: { + vaultPosition: VaultPosition + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + vault_position_value: { + vault_position: vaultPosition, + }, + }) + } } export interface MarsCreditManagerInterface extends MarsCreditManagerReadOnlyInterface { contractAddress: string @@ -313,9 +392,24 @@ export interface MarsCreditManagerInterface extends MarsCreditManagerReadOnlyInt ) => Promise updateConfig: ( { - newConfig, + updates, }: { - newConfig: ConfigUpdates + updates: ConfigUpdates + }, + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise + updateOwner: ( + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise + updateNftConfig: ( + { + updates, + }: { + updates: NftConfigUpdates }, fee?: number | StdFee | 'auto', memo?: string, @@ -343,6 +437,8 @@ export class MarsCreditManagerClient this.createCreditAccount = this.createCreditAccount.bind(this) this.updateCreditAccount = this.updateCreditAccount.bind(this) this.updateConfig = this.updateConfig.bind(this) + this.updateOwner = this.updateOwner.bind(this) + this.updateNftConfig = this.updateNftConfig.bind(this) this.callback = this.callback.bind(this) } @@ -390,9 +486,9 @@ export class MarsCreditManagerClient } updateConfig = async ( { - newConfig, + updates, }: { - newConfig: ConfigUpdates + updates: ConfigUpdates }, fee: number | StdFee | 'auto' = 'auto', memo?: string, @@ -403,7 +499,46 @@ export class MarsCreditManagerClient this.contractAddress, { update_config: { - new_config: newConfig, + updates, + }, + }, + fee, + memo, + funds, + ) + } + updateOwner = async ( + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + update_owner: {}, + }, + fee, + memo, + funds, + ) + } + updateNftConfig = async ( + { + updates, + }: { + updates: NftConfigUpdates + }, + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + update_nft_config: { + updates, }, }, fee, diff --git a/src/types/generated/mars-credit-manager/MarsCreditManager.message-composer.ts b/src/types/generated/mars-credit-manager/MarsCreditManager.message-composer.ts index 2d9a7314..a42bb2f8 100644 --- a/src/types/generated/mars-credit-manager/MarsCreditManager.message-composer.ts +++ b/src/types/generated/mars-credit-manager/MarsCreditManager.message-composer.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -11,28 +11,36 @@ import { toUtf8 } from '@cosmjs/encoding' import { Action, + ActionAmount, + ActionCoin, Addr, ArrayOfCoin, ArrayOfCoinBalanceResponseItem, ArrayOfDebtShares, + ArrayOfLentShares, ArrayOfSharesResponseItem, ArrayOfString, - ArrayOfVaultInstantiateConfig, + ArrayOfVaultInfoResponse, ArrayOfVaultPositionResponseItem, ArrayOfVaultWithBalance, CallbackMsg, Coin, CoinBalanceResponseItem, + CoinValue, ConfigResponse, ConfigUpdates, DebtAmount, DebtShares, Decimal, ExecuteMsg, - HealthResponse, + HealthContractBaseForString, InstantiateMsg, + LentAmount, + LentShares, LockingVaultAmount, + NftConfigUpdates, OracleBaseForString, + OwnerUpdate, Positions, QueryMsg, RedBankBaseForString, @@ -45,10 +53,13 @@ import { VaultBaseForAddr, VaultBaseForString, VaultConfig, + VaultInfoResponse, VaultInstantiateConfig, VaultPosition, VaultPositionAmount, VaultPositionResponseItem, + VaultPositionType, + VaultPositionValue, VaultUnlockingPosition, VaultWithBalance, ZapperBaseForString, @@ -69,9 +80,18 @@ export interface MarsCreditManagerMessage { ) => MsgExecuteContractEncodeObject updateConfig: ( { - newConfig, + updates, }: { - newConfig: ConfigUpdates + updates: ConfigUpdates + }, + funds?: Coin[], + ) => MsgExecuteContractEncodeObject + updateOwner: (funds?: Coin[]) => MsgExecuteContractEncodeObject + updateNftConfig: ( + { + updates, + }: { + updates: NftConfigUpdates }, funds?: Coin[], ) => MsgExecuteContractEncodeObject @@ -87,6 +107,8 @@ export class MarsCreditManagerMessageComposer implements MarsCreditManagerMessag this.createCreditAccount = this.createCreditAccount.bind(this) this.updateCreditAccount = this.updateCreditAccount.bind(this) this.updateConfig = this.updateConfig.bind(this) + this.updateOwner = this.updateOwner.bind(this) + this.updateNftConfig = this.updateNftConfig.bind(this) this.callback = this.callback.bind(this) } @@ -134,9 +156,9 @@ export class MarsCreditManagerMessageComposer implements MarsCreditManagerMessag } updateConfig = ( { - newConfig, + updates, }: { - newConfig: ConfigUpdates + updates: ConfigUpdates }, funds?: Coin[], ): MsgExecuteContractEncodeObject => { @@ -148,7 +170,46 @@ export class MarsCreditManagerMessageComposer implements MarsCreditManagerMessag msg: toUtf8( JSON.stringify({ update_config: { - new_config: newConfig, + updates, + }, + }), + ), + funds, + }), + } + } + updateOwner = (funds?: Coin[]): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + update_owner: {}, + }), + ), + funds, + }), + } + } + updateNftConfig = ( + { + updates, + }: { + updates: NftConfigUpdates + }, + funds?: Coin[], + ): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + update_nft_config: { + updates, }, }), ), diff --git a/src/types/generated/mars-credit-manager/MarsCreditManager.react-query.ts b/src/types/generated/mars-credit-manager/MarsCreditManager.react-query.ts index 062ed033..907f8a1d 100644 --- a/src/types/generated/mars-credit-manager/MarsCreditManager.react-query.ts +++ b/src/types/generated/mars-credit-manager/MarsCreditManager.react-query.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -11,28 +11,36 @@ import { StdFee } from '@cosmjs/amino' import { Action, + ActionAmount, + ActionCoin, Addr, ArrayOfCoin, ArrayOfCoinBalanceResponseItem, ArrayOfDebtShares, + ArrayOfLentShares, ArrayOfSharesResponseItem, ArrayOfString, - ArrayOfVaultInstantiateConfig, + ArrayOfVaultInfoResponse, ArrayOfVaultPositionResponseItem, ArrayOfVaultWithBalance, CallbackMsg, Coin, CoinBalanceResponseItem, + CoinValue, ConfigResponse, ConfigUpdates, DebtAmount, DebtShares, Decimal, ExecuteMsg, - HealthResponse, + HealthContractBaseForString, InstantiateMsg, + LentAmount, + LentShares, LockingVaultAmount, + NftConfigUpdates, OracleBaseForString, + OwnerUpdate, Positions, QueryMsg, RedBankBaseForString, @@ -45,10 +53,13 @@ import { VaultBaseForAddr, VaultBaseForString, VaultConfig, + VaultInfoResponse, VaultInstantiateConfig, VaultPosition, VaultPositionAmount, VaultPositionResponseItem, + VaultPositionType, + VaultPositionValue, VaultUnlockingPosition, VaultWithBalance, ZapperBaseForString, @@ -66,9 +77,13 @@ export const marsCreditManagerQueryKeys = { [ { ...marsCreditManagerQueryKeys.address(contractAddress)[0], method: 'config', args }, ] as const, - vaultConfigs: (contractAddress: string | undefined, args?: Record) => + vaultInfo: (contractAddress: string | undefined, args?: Record) => [ - { ...marsCreditManagerQueryKeys.address(contractAddress)[0], method: 'vault_configs', args }, + { ...marsCreditManagerQueryKeys.address(contractAddress)[0], method: 'vault_info', args }, + ] as const, + vaultsInfo: (contractAddress: string | undefined, args?: Record) => + [ + { ...marsCreditManagerQueryKeys.address(contractAddress)[0], method: 'vaults_info', args }, ] as const, allowedCoins: (contractAddress: string | undefined, args?: Record) => [ @@ -78,10 +93,6 @@ export const marsCreditManagerQueryKeys = { [ { ...marsCreditManagerQueryKeys.address(contractAddress)[0], method: 'positions', args }, ] as const, - health: (contractAddress: string | undefined, args?: Record) => - [ - { ...marsCreditManagerQueryKeys.address(contractAddress)[0], method: 'health', args }, - ] as const, allCoinBalances: (contractAddress: string | undefined, args?: Record) => [ { @@ -114,6 +125,30 @@ export const marsCreditManagerQueryKeys = { args, }, ] as const, + allLentShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_lent_shares', + args, + }, + ] as const, + totalLentShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsCreditManagerQueryKeys.address(contractAddress)[0], + method: 'total_lent_shares', + args, + }, + ] as const, + allTotalLentShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_total_lent_shares', + args, + }, + ] as const, allVaultPositions: (contractAddress: string | undefined, args?: Record) => [ { @@ -160,6 +195,14 @@ export const marsCreditManagerQueryKeys = { args, }, ] as const, + vaultPositionValue: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsCreditManagerQueryKeys.address(contractAddress)[0], + method: 'vault_position_value', + args, + }, + ] as const, } export interface MarsCreditManagerReactQuery { client: MarsCreditManagerQueryClient | undefined @@ -170,6 +213,28 @@ export interface MarsCreditManagerReactQuery { initialData?: undefined } } +export interface MarsCreditManagerVaultPositionValueQuery + extends MarsCreditManagerReactQuery { + args: { + vaultPosition: VaultPosition + } +} +export function useMarsCreditManagerVaultPositionValueQuery({ + client, + args, + options, +}: MarsCreditManagerVaultPositionValueQuery) { + return useQuery( + marsCreditManagerQueryKeys.vaultPositionValue(client?.contractAddress, args), + () => + client + ? client.vaultPositionValue({ + vaultPosition: args.vaultPosition, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} export interface MarsCreditManagerEstimateWithdrawLiquidityQuery extends MarsCreditManagerReactQuery { args: { @@ -282,6 +347,66 @@ export function useMarsCreditManagerAllVaultPositionsQuery< { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } +export interface MarsCreditManagerAllTotalLentSharesQuery + extends MarsCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string + } +} +export function useMarsCreditManagerAllTotalLentSharesQuery({ + client, + args, + options, +}: MarsCreditManagerAllTotalLentSharesQuery) { + return useQuery( + marsCreditManagerQueryKeys.allTotalLentShares(client?.contractAddress, args), + () => + client + ? client.allTotalLentShares({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsCreditManagerTotalLentSharesQuery + extends MarsCreditManagerReactQuery {} +export function useMarsCreditManagerTotalLentSharesQuery({ + client, + options, +}: MarsCreditManagerTotalLentSharesQuery) { + return useQuery( + marsCreditManagerQueryKeys.totalLentShares(client?.contractAddress), + () => (client ? client.totalLentShares() : Promise.reject(new Error('Invalid client'))), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsCreditManagerAllLentSharesQuery + extends MarsCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string[][] + } +} +export function useMarsCreditManagerAllLentSharesQuery({ + client, + args, + options, +}: MarsCreditManagerAllLentSharesQuery) { + return useQuery( + marsCreditManagerQueryKeys.allLentShares(client?.contractAddress, args), + () => + client + ? client.allLentShares({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} export interface MarsCreditManagerAllTotalDebtSharesQuery extends MarsCreditManagerReactQuery { args: { @@ -366,28 +491,6 @@ export function useMarsCreditManagerAllCoinBalancesQuery - extends MarsCreditManagerReactQuery { - args: { - accountId: string - } -} -export function useMarsCreditManagerHealthQuery({ - client, - args, - options, -}: MarsCreditManagerHealthQuery) { - return useQuery( - marsCreditManagerQueryKeys.health(client?.contractAddress, args), - () => - client - ? client.health({ - accountId: args.accountId, - }) - : Promise.reject(new Error('Invalid client')), - { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, - ) -} export interface MarsCreditManagerPositionsQuery extends MarsCreditManagerReactQuery { args: { @@ -434,23 +537,23 @@ export function useMarsCreditManagerAllowedCoinsQuery({ { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } -export interface MarsCreditManagerVaultConfigsQuery - extends MarsCreditManagerReactQuery { +export interface MarsCreditManagerVaultsInfoQuery + extends MarsCreditManagerReactQuery { args: { limit?: number startAfter?: VaultBaseForString } } -export function useMarsCreditManagerVaultConfigsQuery({ +export function useMarsCreditManagerVaultsInfoQuery({ client, args, options, -}: MarsCreditManagerVaultConfigsQuery) { - return useQuery( - marsCreditManagerQueryKeys.vaultConfigs(client?.contractAddress, args), +}: MarsCreditManagerVaultsInfoQuery) { + return useQuery( + marsCreditManagerQueryKeys.vaultsInfo(client?.contractAddress, args), () => client - ? client.vaultConfigs({ + ? client.vaultsInfo({ limit: args.limit, startAfter: args.startAfter, }) @@ -458,6 +561,28 @@ export function useMarsCreditManagerVaultConfigsQuery + extends MarsCreditManagerReactQuery { + args: { + vault: VaultBaseForString + } +} +export function useMarsCreditManagerVaultInfoQuery({ + client, + args, + options, +}: MarsCreditManagerVaultInfoQuery) { + return useQuery( + marsCreditManagerQueryKeys.vaultInfo(client?.contractAddress, args), + () => + client + ? client.vaultInfo({ + vault: args.vault, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} export interface MarsCreditManagerConfigQuery extends MarsCreditManagerReactQuery {} export function useMarsCreditManagerConfigQuery({ @@ -472,7 +597,6 @@ export function useMarsCreditManagerConfigQuery({ } export interface MarsCreditManagerCallbackMutation { client: MarsCreditManagerClient - msg: CallbackMsg args?: { fee?: number | StdFee | 'auto' memo?: string @@ -490,10 +614,52 @@ export function useMarsCreditManagerCallbackMutation( options, ) } +export interface MarsCreditManagerUpdateNftConfigMutation { + client: MarsCreditManagerClient + msg: { + updates: NftConfigUpdates + } + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsCreditManagerUpdateNftConfigMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => + client.updateNftConfig(msg, fee, memo, funds), + options, + ) +} +export interface MarsCreditManagerUpdateOwnerMutation { + client: MarsCreditManagerClient + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsCreditManagerUpdateOwnerMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => client.updateOwner(msg, fee, memo, funds), + options, + ) +} export interface MarsCreditManagerUpdateConfigMutation { client: MarsCreditManagerClient msg: { - newConfig: ConfigUpdates + updates: ConfigUpdates } args?: { fee?: number | StdFee | 'auto' diff --git a/src/types/generated/mars-credit-manager/MarsCreditManager.types.ts b/src/types/generated/mars-credit-manager/MarsCreditManager.types.ts index 5cefad83..db115e1c 100644 --- a/src/types/generated/mars-credit-manager/MarsCreditManager.types.ts +++ b/src/types/generated/mars-credit-manager/MarsCreditManager.types.ts @@ -1,25 +1,27 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ -export type Uint128 = string +export type HealthContractBaseForString = string export type Decimal = string +export type Uint128 = string export type OracleBaseForString = string export type RedBankBaseForString = string export type SwapperBaseForString = string export type ZapperBaseForString = string export interface InstantiateMsg { allowed_coins: string[] - allowed_vaults: VaultInstantiateConfig[] + health_contract: HealthContractBaseForString max_close_factor: Decimal - max_liquidation_bonus: Decimal + max_unlocking_positions: Uint128 oracle: OracleBaseForString owner: string red_bank: RedBankBaseForString swapper: SwapperBaseForString + vault_configs: VaultInstantiateConfig[] zapper: ZapperBaseForString } export interface VaultInstantiateConfig { @@ -52,7 +54,15 @@ export type ExecuteMsg = } | { update_config: { - new_config: ConfigUpdates + updates: ConfigUpdates + } + } + | { + update_owner: OwnerUpdate + } + | { + update_nft_config: { + updates: NftConfigUpdates } } | { @@ -69,12 +79,14 @@ export type Action = borrow: Coin } | { - repay: Coin + lend: Coin + } + | { + repay: ActionCoin } | { enter_vault: { - amount?: Uint128 | null - denom: string + coin: ActionCoin vault: VaultBaseForString } } @@ -107,31 +119,47 @@ export type Action = liquidate_vault: { debt_coin: Coin liquidatee_account_id: string + position_type: VaultPositionType request_vault: VaultBaseForString } } | { swap_exact_in: { - coin_in: Coin + coin_in: ActionCoin denom_out: string slippage: Decimal } } | { provide_liquidity: { - coins_in: Coin[] + coins_in: ActionCoin[] lp_token_out: string minimum_receive: Uint128 } } | { withdraw_liquidity: { - lp_token: Coin + lp_token: ActionCoin } } | { refund_all_coin_balances: {} } +export type ActionAmount = + | 'account_balance' + | { + exact: Uint128 + } +export type VaultPositionType = 'u_n_l_o_c_k_e_d' | 'l_o_c_k_e_d' | 'u_n_l_o_c_k_i_n_g' +export type OwnerUpdate = + | { + propose_new_owner: { + proposed: string + } + } + | 'clear_proposed' + | 'accept_proposed' + | 'abolish_owner_role' export type CallbackMsg = | { withdraw: { @@ -148,20 +176,26 @@ export type CallbackMsg = } | { repay: { + account_id: string + coin: ActionCoin + } + } + | { + lend: { account_id: string coin: Coin } } | { - assert_below_max_l_t_v: { + assert_max_ltv: { account_id: string + prev_max_ltv_health_factor?: Decimal | null } } | { enter_vault: { account_id: string - amount?: Uint128 | null - denom: string + coin: ActionCoin vault: VaultBaseForAddr } } @@ -179,13 +213,6 @@ export type CallbackMsg = vault: VaultBaseForAddr } } - | { - force_exit_vault: { - account_id: string - amount: Uint128 - vault: VaultBaseForAddr - } - } | { request_vault_unlock: { account_id: string @@ -213,13 +240,14 @@ export type CallbackMsg = debt_coin: Coin liquidatee_account_id: string liquidator_account_id: string + position_type: VaultPositionType request_vault: VaultBaseForAddr } } | { swap_exact_in: { account_id: string - coin_in: Coin + coin_in: ActionCoin denom_out: string slippage: Decimal } @@ -233,7 +261,7 @@ export type CallbackMsg = | { provide_liquidity: { account_id: string - coins_in: Coin[] + coins_in: ActionCoin[] lp_token_out: string minimum_receive: Uint128 } @@ -241,12 +269,7 @@ export type CallbackMsg = | { withdraw_liquidity: { account_id: string - lp_token: Coin - } - } - | { - assert_one_vault_position_only: { - account_id: string + lp_token: ActionCoin } } | { @@ -255,18 +278,26 @@ export type CallbackMsg = } } export type Addr = string +export interface ActionCoin { + amount: ActionAmount + denom: string +} export interface ConfigUpdates { account_nft?: string | null allowed_coins?: string[] | null + health_contract?: HealthContractBaseForString | null max_close_factor?: Decimal | null - max_liquidation_bonus?: Decimal | null + max_unlocking_positions?: Uint128 | null oracle?: OracleBaseForString | null - owner?: string | null - red_bank?: RedBankBaseForString | null swapper?: SwapperBaseForString | null vault_configs?: VaultInstantiateConfig[] | null zapper?: ZapperBaseForString | null } +export interface NftConfigUpdates { + health_contract_addr?: string | null + max_value_for_burn?: Uint128 | null + proposed_new_minter?: string | null +} export interface VaultBaseForAddr { address: Addr } @@ -275,7 +306,12 @@ export type QueryMsg = config: {} } | { - vault_configs: { + vault_info: { + vault: VaultBaseForString + } + } + | { + vaults_info: { limit?: number | null start_after?: VaultBaseForString | null } @@ -291,11 +327,6 @@ export type QueryMsg = account_id: string } } - | { - health: { - account_id: string - } - } | { all_coin_balances: { limit?: number | null @@ -317,6 +348,21 @@ export type QueryMsg = start_after?: string | null } } + | { + all_lent_shares: { + limit?: number | null + start_after?: [string, string] | null + } + } + | { + total_lent_shares: string + } + | { + all_total_lent_shares: { + limit?: number | null + start_after?: string | null + } + } | { all_vault_positions: { limit?: number | null @@ -345,6 +391,33 @@ export type QueryMsg = lp_token: Coin } } + | { + vault_position_value: { + vault_position: VaultPosition + } + } +export type VaultPositionAmount = + | { + unlocked: VaultAmount + } + | { + locking: LockingVaultAmount + } +export type VaultAmount = string +export type VaultAmount1 = string +export type UnlockingPositions = VaultUnlockingPosition[] +export interface VaultPosition { + amount: VaultPositionAmount + vault: VaultBaseForAddr +} +export interface LockingVaultAmount { + locked: VaultAmount1 + unlocking: UnlockingPositions +} +export interface VaultUnlockingPosition { + coin: Coin + id: number +} export type ArrayOfCoinBalanceResponseItem = CoinBalanceResponseItem[] export interface CoinBalanceResponseItem { account_id: string @@ -362,64 +435,40 @@ export interface DebtShares { denom: string shares: Uint128 } +export type ArrayOfLentShares = LentShares[] +export interface LentShares { + denom: string + shares: Uint128 +} export type ArrayOfVaultWithBalance = VaultWithBalance[] export interface VaultWithBalance { balance: Uint128 vault: VaultBaseForAddr } -export type VaultPositionAmount = - | { - unlocked: VaultAmount - } - | { - locking: LockingVaultAmount - } -export type VaultAmount = string -export type VaultAmount1 = string -export type UnlockingPositions = VaultUnlockingPosition[] export type ArrayOfVaultPositionResponseItem = VaultPositionResponseItem[] export interface VaultPositionResponseItem { account_id: string position: VaultPosition } -export interface VaultPosition { - amount: VaultPositionAmount - vault: VaultBaseForAddr -} -export interface LockingVaultAmount { - locked: VaultAmount1 - unlocking: UnlockingPositions -} -export interface VaultUnlockingPosition { - coin: Coin - id: number -} export type ArrayOfString = string[] export interface ConfigResponse { account_nft?: string | null + health_contract: string max_close_factor: Decimal - max_liquidation_bonus: Decimal + max_unlocking_positions: Uint128 oracle: string - owner: string + owner?: string | null + proposed_new_owner?: string | null red_bank: string swapper: string zapper: string } export type ArrayOfCoin = Coin[] -export interface HealthResponse { - above_max_ltv: boolean - liquidatable: boolean - liquidation_health_factor?: Decimal | null - liquidation_threshold_adjusted_collateral: Decimal - max_ltv_adjusted_collateral: Decimal - max_ltv_health_factor?: Decimal | null - total_collateral_value: Decimal - total_debt_value: Decimal -} export interface Positions { account_id: string - coins: Coin[] debts: DebtAmount[] + deposits: Coin[] + lends: LentAmount[] vaults: VaultPosition[] } export interface DebtAmount { @@ -427,4 +476,23 @@ export interface DebtAmount { denom: string shares: Uint128 } -export type ArrayOfVaultInstantiateConfig = VaultInstantiateConfig[] +export interface LentAmount { + amount: Uint128 + denom: string + shares: Uint128 +} +export interface VaultInfoResponse { + config: VaultConfig + utilization: Coin + vault: VaultBaseForString +} +export interface VaultPositionValue { + base_coin: CoinValue + vault_coin: CoinValue +} +export interface CoinValue { + amount: Uint128 + denom: string + value: Uint128 +} +export type ArrayOfVaultInfoResponse = VaultInfoResponse[] diff --git a/src/types/generated/mars-credit-manager/bundle.ts b/src/types/generated/mars-credit-manager/bundle.ts index 5878326c..fbcf26e0 100644 --- a/src/types/generated/mars-credit-manager/bundle.ts +++ b/src/types/generated/mars-credit-manager/bundle.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ diff --git a/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.client.ts b/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.client.ts new file mode 100644 index 00000000..d72a2220 --- /dev/null +++ b/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.client.ts @@ -0,0 +1,478 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import { CosmWasmClient, ExecuteResult, SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate' +import { StdFee } from '@cosmjs/amino' + +import { + Addr, + ArrayOfCoin, + ArrayOfCoinBalanceResponseItem, + ArrayOfDebtShares, + ArrayOfLentShares, + ArrayOfSharesResponseItem, + ArrayOfString, + ArrayOfVaultInfoResponse, + ArrayOfVaultPositionResponseItem, + ArrayOfVaultWithBalance, + Coin, + CoinBalanceResponseItem, + CoinValue, + ConfigResponse, + DebtAmount, + DebtShares, + Decimal, + ExecuteMsg, + InstantiateMsg, + LentAmount, + LentShares, + LockingVaultAmount, + Positions, + QueryMsg, + SharesResponseItem, + Uint128, + UnlockingPositions, + VaultAmount, + VaultAmount1, + VaultBaseForAddr, + VaultBaseForString, + VaultConfig, + VaultInfoResponse, + VaultPosition, + VaultPositionAmount, + VaultPositionResponseItem, + VaultPositionValue, + VaultUnlockingPosition, + VaultWithBalance, +} from './MarsMockCreditManager.types' +export interface MarsMockCreditManagerReadOnlyInterface { + contractAddress: string + config: () => Promise + vaultInfo: ({ vault }: { vault: VaultBaseForString }) => Promise + vaultsInfo: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: VaultBaseForString + }) => Promise + allowedCoins: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string + }) => Promise + positions: ({ accountId }: { accountId: string }) => Promise + allCoinBalances: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }) => Promise + allDebtShares: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }) => Promise + totalDebtShares: () => Promise + allTotalDebtShares: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string + }) => Promise + allLentShares: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }) => Promise + totalLentShares: () => Promise + allTotalLentShares: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string + }) => Promise + allVaultPositions: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }) => Promise + totalVaultCoinBalance: ({ vault }: { vault: VaultBaseForString }) => Promise + allTotalVaultCoinBalances: ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: VaultBaseForString + }) => Promise + estimateProvideLiquidity: ({ + coinsIn, + lpTokenOut, + }: { + coinsIn: Coin[] + lpTokenOut: string + }) => Promise + estimateWithdrawLiquidity: ({ lpToken }: { lpToken: Coin }) => Promise + vaultPositionValue: ({ + vaultPosition, + }: { + vaultPosition: VaultPosition + }) => Promise +} +export class MarsMockCreditManagerQueryClient implements MarsMockCreditManagerReadOnlyInterface { + client: CosmWasmClient + contractAddress: string + + constructor(client: CosmWasmClient, contractAddress: string) { + this.client = client + this.contractAddress = contractAddress + this.config = this.config.bind(this) + this.vaultInfo = this.vaultInfo.bind(this) + this.vaultsInfo = this.vaultsInfo.bind(this) + this.allowedCoins = this.allowedCoins.bind(this) + this.positions = this.positions.bind(this) + this.allCoinBalances = this.allCoinBalances.bind(this) + this.allDebtShares = this.allDebtShares.bind(this) + this.totalDebtShares = this.totalDebtShares.bind(this) + this.allTotalDebtShares = this.allTotalDebtShares.bind(this) + this.allLentShares = this.allLentShares.bind(this) + this.totalLentShares = this.totalLentShares.bind(this) + this.allTotalLentShares = this.allTotalLentShares.bind(this) + this.allVaultPositions = this.allVaultPositions.bind(this) + this.totalVaultCoinBalance = this.totalVaultCoinBalance.bind(this) + this.allTotalVaultCoinBalances = this.allTotalVaultCoinBalances.bind(this) + this.estimateProvideLiquidity = this.estimateProvideLiquidity.bind(this) + this.estimateWithdrawLiquidity = this.estimateWithdrawLiquidity.bind(this) + this.vaultPositionValue = this.vaultPositionValue.bind(this) + } + + config = async (): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + config: {}, + }) + } + vaultInfo = async ({ vault }: { vault: VaultBaseForString }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + vault_info: { + vault, + }, + }) + } + vaultsInfo = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: VaultBaseForString + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + vaults_info: { + limit, + start_after: startAfter, + }, + }) + } + allowedCoins = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + allowed_coins: { + limit, + start_after: startAfter, + }, + }) + } + positions = async ({ accountId }: { accountId: string }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + positions: { + account_id: accountId, + }, + }) + } + allCoinBalances = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_coin_balances: { + limit, + start_after: startAfter, + }, + }) + } + allDebtShares = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_debt_shares: { + limit, + start_after: startAfter, + }, + }) + } + totalDebtShares = async (): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + total_debt_shares: {}, + }) + } + allTotalDebtShares = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_total_debt_shares: { + limit, + start_after: startAfter, + }, + }) + } + allLentShares = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_lent_shares: { + limit, + start_after: startAfter, + }, + }) + } + totalLentShares = async (): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + total_lent_shares: {}, + }) + } + allTotalLentShares = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_total_lent_shares: { + limit, + start_after: startAfter, + }, + }) + } + allVaultPositions = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: string[][] + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_vault_positions: { + limit, + start_after: startAfter, + }, + }) + } + totalVaultCoinBalance = async ({ vault }: { vault: VaultBaseForString }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + total_vault_coin_balance: { + vault, + }, + }) + } + allTotalVaultCoinBalances = async ({ + limit, + startAfter, + }: { + limit?: number + startAfter?: VaultBaseForString + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + all_total_vault_coin_balances: { + limit, + start_after: startAfter, + }, + }) + } + estimateProvideLiquidity = async ({ + coinsIn, + lpTokenOut, + }: { + coinsIn: Coin[] + lpTokenOut: string + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + estimate_provide_liquidity: { + coins_in: coinsIn, + lp_token_out: lpTokenOut, + }, + }) + } + estimateWithdrawLiquidity = async ({ lpToken }: { lpToken: Coin }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + estimate_withdraw_liquidity: { + lp_token: lpToken, + }, + }) + } + vaultPositionValue = async ({ + vaultPosition, + }: { + vaultPosition: VaultPosition + }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + vault_position_value: { + vault_position: vaultPosition, + }, + }) + } +} +export interface MarsMockCreditManagerInterface extends MarsMockCreditManagerReadOnlyInterface { + contractAddress: string + sender: string + setPositionsResponse: ( + { + accountId, + positions, + }: { + accountId: string + positions: Positions + }, + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise + setAllowedCoins: ( + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise + setVaultConfig: ( + { + address, + config, + }: { + address: string + config: VaultConfig + }, + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise +} +export class MarsMockCreditManagerClient + extends MarsMockCreditManagerQueryClient + implements MarsMockCreditManagerInterface +{ + client: SigningCosmWasmClient + sender: string + contractAddress: string + + constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) { + super(client, contractAddress) + this.client = client + this.sender = sender + this.contractAddress = contractAddress + this.setPositionsResponse = this.setPositionsResponse.bind(this) + this.setAllowedCoins = this.setAllowedCoins.bind(this) + this.setVaultConfig = this.setVaultConfig.bind(this) + } + + setPositionsResponse = async ( + { + accountId, + positions, + }: { + accountId: string + positions: Positions + }, + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + set_positions_response: { + account_id: accountId, + positions, + }, + }, + fee, + memo, + funds, + ) + } + setAllowedCoins = async ( + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + set_allowed_coins: {}, + }, + fee, + memo, + funds, + ) + } + setVaultConfig = async ( + { + address, + config, + }: { + address: string + config: VaultConfig + }, + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + set_vault_config: { + address, + config, + }, + }, + fee, + memo, + funds, + ) + } +} diff --git a/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.message-composer.ts b/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.message-composer.ts new file mode 100644 index 00000000..11f60322 --- /dev/null +++ b/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.message-composer.ts @@ -0,0 +1,159 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import { MsgExecuteContractEncodeObject } from 'cosmwasm' +import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx' +import { toUtf8 } from '@cosmjs/encoding' + +import { + Addr, + ArrayOfCoin, + ArrayOfCoinBalanceResponseItem, + ArrayOfDebtShares, + ArrayOfLentShares, + ArrayOfSharesResponseItem, + ArrayOfString, + ArrayOfVaultInfoResponse, + ArrayOfVaultPositionResponseItem, + ArrayOfVaultWithBalance, + Coin, + CoinBalanceResponseItem, + CoinValue, + ConfigResponse, + DebtAmount, + DebtShares, + Decimal, + ExecuteMsg, + InstantiateMsg, + LentAmount, + LentShares, + LockingVaultAmount, + Positions, + QueryMsg, + SharesResponseItem, + Uint128, + UnlockingPositions, + VaultAmount, + VaultAmount1, + VaultBaseForAddr, + VaultBaseForString, + VaultConfig, + VaultInfoResponse, + VaultPosition, + VaultPositionAmount, + VaultPositionResponseItem, + VaultPositionValue, + VaultUnlockingPosition, + VaultWithBalance, +} from './MarsMockCreditManager.types' +export interface MarsMockCreditManagerMessage { + contractAddress: string + sender: string + setPositionsResponse: ( + { + accountId, + positions, + }: { + accountId: string + positions: Positions + }, + funds?: Coin[], + ) => MsgExecuteContractEncodeObject + setAllowedCoins: (funds?: Coin[]) => MsgExecuteContractEncodeObject + setVaultConfig: ( + { + address, + config, + }: { + address: string + config: VaultConfig + }, + funds?: Coin[], + ) => MsgExecuteContractEncodeObject +} +export class MarsMockCreditManagerMessageComposer implements MarsMockCreditManagerMessage { + sender: string + contractAddress: string + + constructor(sender: string, contractAddress: string) { + this.sender = sender + this.contractAddress = contractAddress + this.setPositionsResponse = this.setPositionsResponse.bind(this) + this.setAllowedCoins = this.setAllowedCoins.bind(this) + this.setVaultConfig = this.setVaultConfig.bind(this) + } + + setPositionsResponse = ( + { + accountId, + positions, + }: { + accountId: string + positions: Positions + }, + funds?: Coin[], + ): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + set_positions_response: { + account_id: accountId, + positions, + }, + }), + ), + funds, + }), + } + } + setAllowedCoins = (funds?: Coin[]): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + set_allowed_coins: {}, + }), + ), + funds, + }), + } + } + setVaultConfig = ( + { + address, + config, + }: { + address: string + config: VaultConfig + }, + funds?: Coin[], + ): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + set_vault_config: { + address, + config, + }, + }), + ), + funds, + }), + } + } +} diff --git a/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.react-query.ts b/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.react-query.ts new file mode 100644 index 00000000..7a80faca --- /dev/null +++ b/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.react-query.ts @@ -0,0 +1,659 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import { useMutation, UseMutationOptions, useQuery, UseQueryOptions } from '@tanstack/react-query' +import { ExecuteResult } from '@cosmjs/cosmwasm-stargate' +import { StdFee } from '@cosmjs/amino' + +import { + Addr, + ArrayOfCoin, + ArrayOfCoinBalanceResponseItem, + ArrayOfDebtShares, + ArrayOfLentShares, + ArrayOfSharesResponseItem, + ArrayOfString, + ArrayOfVaultInfoResponse, + ArrayOfVaultPositionResponseItem, + ArrayOfVaultWithBalance, + Coin, + CoinBalanceResponseItem, + CoinValue, + ConfigResponse, + DebtAmount, + DebtShares, + Decimal, + ExecuteMsg, + InstantiateMsg, + LentAmount, + LentShares, + LockingVaultAmount, + Positions, + QueryMsg, + SharesResponseItem, + Uint128, + UnlockingPositions, + VaultAmount, + VaultAmount1, + VaultBaseForAddr, + VaultBaseForString, + VaultConfig, + VaultInfoResponse, + VaultPosition, + VaultPositionAmount, + VaultPositionResponseItem, + VaultPositionValue, + VaultUnlockingPosition, + VaultWithBalance, +} from './MarsMockCreditManager.types' +import { + MarsMockCreditManagerClient, + MarsMockCreditManagerQueryClient, +} from './MarsMockCreditManager.client' +export const marsMockCreditManagerQueryKeys = { + contract: [ + { + contract: 'marsMockCreditManager', + }, + ] as const, + address: (contractAddress: string | undefined) => + [{ ...marsMockCreditManagerQueryKeys.contract[0], address: contractAddress }] as const, + config: (contractAddress: string | undefined, args?: Record) => + [ + { ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], method: 'config', args }, + ] as const, + vaultInfo: (contractAddress: string | undefined, args?: Record) => + [ + { ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], method: 'vault_info', args }, + ] as const, + vaultsInfo: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'vaults_info', + args, + }, + ] as const, + allowedCoins: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'allowed_coins', + args, + }, + ] as const, + positions: (contractAddress: string | undefined, args?: Record) => + [ + { ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], method: 'positions', args }, + ] as const, + allCoinBalances: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_coin_balances', + args, + }, + ] as const, + allDebtShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_debt_shares', + args, + }, + ] as const, + totalDebtShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'total_debt_shares', + args, + }, + ] as const, + allTotalDebtShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_total_debt_shares', + args, + }, + ] as const, + allLentShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_lent_shares', + args, + }, + ] as const, + totalLentShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'total_lent_shares', + args, + }, + ] as const, + allTotalLentShares: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_total_lent_shares', + args, + }, + ] as const, + allVaultPositions: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_vault_positions', + args, + }, + ] as const, + totalVaultCoinBalance: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'total_vault_coin_balance', + args, + }, + ] as const, + allTotalVaultCoinBalances: ( + contractAddress: string | undefined, + args?: Record, + ) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'all_total_vault_coin_balances', + args, + }, + ] as const, + estimateProvideLiquidity: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'estimate_provide_liquidity', + args, + }, + ] as const, + estimateWithdrawLiquidity: ( + contractAddress: string | undefined, + args?: Record, + ) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'estimate_withdraw_liquidity', + args, + }, + ] as const, + vaultPositionValue: (contractAddress: string | undefined, args?: Record) => + [ + { + ...marsMockCreditManagerQueryKeys.address(contractAddress)[0], + method: 'vault_position_value', + args, + }, + ] as const, +} +export interface MarsMockCreditManagerReactQuery { + client: MarsMockCreditManagerQueryClient | undefined + options?: Omit< + UseQueryOptions, + "'queryKey' | 'queryFn' | 'initialData'" + > & { + initialData?: undefined + } +} +export interface MarsMockCreditManagerVaultPositionValueQuery + extends MarsMockCreditManagerReactQuery { + args: { + vaultPosition: VaultPosition + } +} +export function useMarsMockCreditManagerVaultPositionValueQuery({ + client, + args, + options, +}: MarsMockCreditManagerVaultPositionValueQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.vaultPositionValue(client?.contractAddress, args), + () => + client + ? client.vaultPositionValue({ + vaultPosition: args.vaultPosition, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerEstimateWithdrawLiquidityQuery + extends MarsMockCreditManagerReactQuery { + args: { + lpToken: Coin + } +} +export function useMarsMockCreditManagerEstimateWithdrawLiquidityQuery({ + client, + args, + options, +}: MarsMockCreditManagerEstimateWithdrawLiquidityQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.estimateWithdrawLiquidity(client?.contractAddress, args), + () => + client + ? client.estimateWithdrawLiquidity({ + lpToken: args.lpToken, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerEstimateProvideLiquidityQuery + extends MarsMockCreditManagerReactQuery { + args: { + coinsIn: Coin[] + lpTokenOut: string + } +} +export function useMarsMockCreditManagerEstimateProvideLiquidityQuery({ + client, + args, + options, +}: MarsMockCreditManagerEstimateProvideLiquidityQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.estimateProvideLiquidity(client?.contractAddress, args), + () => + client + ? client.estimateProvideLiquidity({ + coinsIn: args.coinsIn, + lpTokenOut: args.lpTokenOut, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerAllTotalVaultCoinBalancesQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: VaultBaseForString + } +} +export function useMarsMockCreditManagerAllTotalVaultCoinBalancesQuery< + TData = ArrayOfVaultWithBalance, +>({ client, args, options }: MarsMockCreditManagerAllTotalVaultCoinBalancesQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.allTotalVaultCoinBalances(client?.contractAddress, args), + () => + client + ? client.allTotalVaultCoinBalances({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerTotalVaultCoinBalanceQuery + extends MarsMockCreditManagerReactQuery { + args: { + vault: VaultBaseForString + } +} +export function useMarsMockCreditManagerTotalVaultCoinBalanceQuery({ + client, + args, + options, +}: MarsMockCreditManagerTotalVaultCoinBalanceQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.totalVaultCoinBalance(client?.contractAddress, args), + () => + client + ? client.totalVaultCoinBalance({ + vault: args.vault, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerAllVaultPositionsQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string[][] + } +} +export function useMarsMockCreditManagerAllVaultPositionsQuery< + TData = ArrayOfVaultPositionResponseItem, +>({ client, args, options }: MarsMockCreditManagerAllVaultPositionsQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.allVaultPositions(client?.contractAddress, args), + () => + client + ? client.allVaultPositions({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerAllTotalLentSharesQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string + } +} +export function useMarsMockCreditManagerAllTotalLentSharesQuery({ + client, + args, + options, +}: MarsMockCreditManagerAllTotalLentSharesQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.allTotalLentShares(client?.contractAddress, args), + () => + client + ? client.allTotalLentShares({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerTotalLentSharesQuery + extends MarsMockCreditManagerReactQuery {} +export function useMarsMockCreditManagerTotalLentSharesQuery({ + client, + options, +}: MarsMockCreditManagerTotalLentSharesQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.totalLentShares(client?.contractAddress), + () => (client ? client.totalLentShares() : Promise.reject(new Error('Invalid client'))), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerAllLentSharesQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string[][] + } +} +export function useMarsMockCreditManagerAllLentSharesQuery({ + client, + args, + options, +}: MarsMockCreditManagerAllLentSharesQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.allLentShares(client?.contractAddress, args), + () => + client + ? client.allLentShares({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerAllTotalDebtSharesQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string + } +} +export function useMarsMockCreditManagerAllTotalDebtSharesQuery({ + client, + args, + options, +}: MarsMockCreditManagerAllTotalDebtSharesQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.allTotalDebtShares(client?.contractAddress, args), + () => + client + ? client.allTotalDebtShares({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerTotalDebtSharesQuery + extends MarsMockCreditManagerReactQuery {} +export function useMarsMockCreditManagerTotalDebtSharesQuery({ + client, + options, +}: MarsMockCreditManagerTotalDebtSharesQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.totalDebtShares(client?.contractAddress), + () => (client ? client.totalDebtShares() : Promise.reject(new Error('Invalid client'))), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerAllDebtSharesQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string[][] + } +} +export function useMarsMockCreditManagerAllDebtSharesQuery({ + client, + args, + options, +}: MarsMockCreditManagerAllDebtSharesQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.allDebtShares(client?.contractAddress, args), + () => + client + ? client.allDebtShares({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerAllCoinBalancesQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string[][] + } +} +export function useMarsMockCreditManagerAllCoinBalancesQuery< + TData = ArrayOfCoinBalanceResponseItem, +>({ client, args, options }: MarsMockCreditManagerAllCoinBalancesQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.allCoinBalances(client?.contractAddress, args), + () => + client + ? client.allCoinBalances({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerPositionsQuery + extends MarsMockCreditManagerReactQuery { + args: { + accountId: string + } +} +export function useMarsMockCreditManagerPositionsQuery({ + client, + args, + options, +}: MarsMockCreditManagerPositionsQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.positions(client?.contractAddress, args), + () => + client + ? client.positions({ + accountId: args.accountId, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerAllowedCoinsQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: string + } +} +export function useMarsMockCreditManagerAllowedCoinsQuery({ + client, + args, + options, +}: MarsMockCreditManagerAllowedCoinsQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.allowedCoins(client?.contractAddress, args), + () => + client + ? client.allowedCoins({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerVaultsInfoQuery + extends MarsMockCreditManagerReactQuery { + args: { + limit?: number + startAfter?: VaultBaseForString + } +} +export function useMarsMockCreditManagerVaultsInfoQuery({ + client, + args, + options, +}: MarsMockCreditManagerVaultsInfoQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.vaultsInfo(client?.contractAddress, args), + () => + client + ? client.vaultsInfo({ + limit: args.limit, + startAfter: args.startAfter, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerVaultInfoQuery + extends MarsMockCreditManagerReactQuery { + args: { + vault: VaultBaseForString + } +} +export function useMarsMockCreditManagerVaultInfoQuery({ + client, + args, + options, +}: MarsMockCreditManagerVaultInfoQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.vaultInfo(client?.contractAddress, args), + () => + client + ? client.vaultInfo({ + vault: args.vault, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerConfigQuery + extends MarsMockCreditManagerReactQuery {} +export function useMarsMockCreditManagerConfigQuery({ + client, + options, +}: MarsMockCreditManagerConfigQuery) { + return useQuery( + marsMockCreditManagerQueryKeys.config(client?.contractAddress), + () => (client ? client.config() : Promise.reject(new Error('Invalid client'))), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsMockCreditManagerSetVaultConfigMutation { + client: MarsMockCreditManagerClient + msg: { + address: string + config: VaultConfig + } + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsMockCreditManagerSetVaultConfigMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => + client.setVaultConfig(msg, fee, memo, funds), + options, + ) +} +export interface MarsMockCreditManagerSetAllowedCoinsMutation { + client: MarsMockCreditManagerClient + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsMockCreditManagerSetAllowedCoinsMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, args: { fee, memo, funds } = {} }) => client.setAllowedCoins(fee, memo, funds), + options, + ) +} +export interface MarsMockCreditManagerSetPositionsResponseMutation { + client: MarsMockCreditManagerClient + msg: { + accountId: string + positions: Positions + } + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsMockCreditManagerSetPositionsResponseMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => + client.setPositionsResponse(msg, fee, memo, funds), + options, + ) +} diff --git a/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.types.ts b/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.types.ts new file mode 100644 index 00000000..029ddf5e --- /dev/null +++ b/src/types/generated/mars-mock-credit-manager/MarsMockCreditManager.types.ts @@ -0,0 +1,241 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +export interface InstantiateMsg { + [k: string]: unknown +} +export type ExecuteMsg = + | { + set_positions_response: { + account_id: string + positions: Positions + } + } + | { + set_allowed_coins: string[] + } + | { + set_vault_config: { + address: string + config: VaultConfig + } + } +export type Uint128 = string +export type VaultPositionAmount = + | { + unlocked: VaultAmount + } + | { + locking: LockingVaultAmount + } +export type VaultAmount = string +export type VaultAmount1 = string +export type UnlockingPositions = VaultUnlockingPosition[] +export type Addr = string +export type Decimal = string +export interface Positions { + account_id: string + debts: DebtAmount[] + deposits: Coin[] + lends: LentAmount[] + vaults: VaultPosition[] +} +export interface DebtAmount { + amount: Uint128 + denom: string + shares: Uint128 +} +export interface Coin { + amount: Uint128 + denom: string + [k: string]: unknown +} +export interface LentAmount { + amount: Uint128 + denom: string + shares: Uint128 +} +export interface VaultPosition { + amount: VaultPositionAmount + vault: VaultBaseForAddr +} +export interface LockingVaultAmount { + locked: VaultAmount1 + unlocking: UnlockingPositions +} +export interface VaultUnlockingPosition { + coin: Coin + id: number +} +export interface VaultBaseForAddr { + address: Addr +} +export interface VaultConfig { + deposit_cap: Coin + liquidation_threshold: Decimal + max_ltv: Decimal + whitelisted: boolean +} +export type QueryMsg = + | { + config: {} + } + | { + vault_info: { + vault: VaultBaseForString + } + } + | { + vaults_info: { + limit?: number | null + start_after?: VaultBaseForString | null + } + } + | { + allowed_coins: { + limit?: number | null + start_after?: string | null + } + } + | { + positions: { + account_id: string + } + } + | { + all_coin_balances: { + limit?: number | null + start_after?: [string, string] | null + } + } + | { + all_debt_shares: { + limit?: number | null + start_after?: [string, string] | null + } + } + | { + total_debt_shares: string + } + | { + all_total_debt_shares: { + limit?: number | null + start_after?: string | null + } + } + | { + all_lent_shares: { + limit?: number | null + start_after?: [string, string] | null + } + } + | { + total_lent_shares: string + } + | { + all_total_lent_shares: { + limit?: number | null + start_after?: string | null + } + } + | { + all_vault_positions: { + limit?: number | null + start_after?: [string, string] | null + } + } + | { + total_vault_coin_balance: { + vault: VaultBaseForString + } + } + | { + all_total_vault_coin_balances: { + limit?: number | null + start_after?: VaultBaseForString | null + } + } + | { + estimate_provide_liquidity: { + coins_in: Coin[] + lp_token_out: string + } + } + | { + estimate_withdraw_liquidity: { + lp_token: Coin + } + } + | { + vault_position_value: { + vault_position: VaultPosition + } + } +export interface VaultBaseForString { + address: string +} +export type ArrayOfCoinBalanceResponseItem = CoinBalanceResponseItem[] +export interface CoinBalanceResponseItem { + account_id: string + amount: Uint128 + denom: string +} +export type ArrayOfSharesResponseItem = SharesResponseItem[] +export interface SharesResponseItem { + account_id: string + denom: string + shares: Uint128 +} +export type ArrayOfDebtShares = DebtShares[] +export interface DebtShares { + denom: string + shares: Uint128 +} +export type ArrayOfLentShares = LentShares[] +export interface LentShares { + denom: string + shares: Uint128 +} +export type ArrayOfVaultWithBalance = VaultWithBalance[] +export interface VaultWithBalance { + balance: Uint128 + vault: VaultBaseForAddr +} +export type ArrayOfVaultPositionResponseItem = VaultPositionResponseItem[] +export interface VaultPositionResponseItem { + account_id: string + position: VaultPosition +} +export type ArrayOfString = string[] +export interface ConfigResponse { + account_nft?: string | null + health_contract: string + max_close_factor: Decimal + max_unlocking_positions: Uint128 + oracle: string + owner?: string | null + proposed_new_owner?: string | null + red_bank: string + swapper: string + zapper: string +} +export type ArrayOfCoin = Coin[] +export interface VaultInfoResponse { + config: VaultConfig + utilization: Coin + vault: VaultBaseForString +} +export interface VaultPositionValue { + base_coin: CoinValue + vault_coin: CoinValue +} +export interface CoinValue { + amount: Uint128 + denom: string + value: Uint128 +} +export type ArrayOfVaultInfoResponse = VaultInfoResponse[] diff --git a/src/types/generated/mars-mock-credit-manager/bundle.ts b/src/types/generated/mars-mock-credit-manager/bundle.ts new file mode 100644 index 00000000..e6069a3a --- /dev/null +++ b/src/types/generated/mars-mock-credit-manager/bundle.ts @@ -0,0 +1,14 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import * as _8 from './MarsMockCreditManager.types' +import * as _9 from './MarsMockCreditManager.client' +import * as _10 from './MarsMockCreditManager.message-composer' +import * as _11 from './MarsMockCreditManager.react-query' +export namespace contracts { + export const MarsMockCreditManager = { ..._8, ..._9, ..._10, ..._11 } +} diff --git a/src/types/generated/mars-mock-oracle/MarsMockOracle.client.ts b/src/types/generated/mars-mock-oracle/MarsMockOracle.client.ts index 82b97ffa..8615b086 100644 --- a/src/types/generated/mars-mock-oracle/MarsMockOracle.client.ts +++ b/src/types/generated/mars-mock-oracle/MarsMockOracle.client.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ diff --git a/src/types/generated/mars-mock-oracle/MarsMockOracle.message-composer.ts b/src/types/generated/mars-mock-oracle/MarsMockOracle.message-composer.ts index 66ca0801..0753198c 100644 --- a/src/types/generated/mars-mock-oracle/MarsMockOracle.message-composer.ts +++ b/src/types/generated/mars-mock-oracle/MarsMockOracle.message-composer.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ diff --git a/src/types/generated/mars-mock-oracle/MarsMockOracle.react-query.ts b/src/types/generated/mars-mock-oracle/MarsMockOracle.react-query.ts index 0f199306..e8ce1fa9 100644 --- a/src/types/generated/mars-mock-oracle/MarsMockOracle.react-query.ts +++ b/src/types/generated/mars-mock-oracle/MarsMockOracle.react-query.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -62,7 +62,10 @@ export function useMarsMockOraclePriceQuery({ } export interface MarsMockOracleChangePriceMutation { client: MarsMockOracleClient - msg: CoinPrice + msg: { + denom: string + price: Decimal + } args?: { fee?: number | StdFee | 'auto' memo?: string diff --git a/src/types/generated/mars-mock-oracle/MarsMockOracle.types.ts b/src/types/generated/mars-mock-oracle/MarsMockOracle.types.ts index 56d42aa7..8e19a4f8 100644 --- a/src/types/generated/mars-mock-oracle/MarsMockOracle.types.ts +++ b/src/types/generated/mars-mock-oracle/MarsMockOracle.types.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ diff --git a/src/types/generated/mars-mock-oracle/bundle.ts b/src/types/generated/mars-mock-oracle/bundle.ts index 9077d952..c42be8ba 100644 --- a/src/types/generated/mars-mock-oracle/bundle.ts +++ b/src/types/generated/mars-mock-oracle/bundle.ts @@ -1,14 +1,14 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ -import * as _8 from './MarsMockOracle.types' -import * as _9 from './MarsMockOracle.client' -import * as _10 from './MarsMockOracle.message-composer' -import * as _11 from './MarsMockOracle.react-query' +import * as _12 from './MarsMockOracle.types' +import * as _13 from './MarsMockOracle.client' +import * as _14 from './MarsMockOracle.message-composer' +import * as _15 from './MarsMockOracle.react-query' export namespace contracts { - export const MarsMockOracle = { ..._8, ..._9, ..._10, ..._11 } + export const MarsMockOracle = { ..._12, ..._13, ..._14, ..._15 } } diff --git a/src/types/generated/mars-mock-red-bank/MarsMockRedBank.client.ts b/src/types/generated/mars-mock-red-bank/MarsMockRedBank.client.ts index 01e5fd94..51eac2fc 100644 --- a/src/types/generated/mars-mock-red-bank/MarsMockRedBank.client.ts +++ b/src/types/generated/mars-mock-red-bank/MarsMockRedBank.client.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -14,7 +14,7 @@ import { ArrayOfUserCollateralResponse, ArrayOfUserDebtResponse, CoinMarketInfo, - ConfigForString, + ConfigResponse, CreateOrUpdateConfig, Decimal, ExecuteMsg, @@ -22,6 +22,7 @@ import { InstantiateMsg, InterestRateModel, Market, + OwnerUpdate, QueryMsg, Uint128, UncollateralizedLoanLimitResponse, @@ -32,7 +33,7 @@ import { } from './MarsMockRedBank.types' export interface MarsMockRedBankReadOnlyInterface { contractAddress: string - config: () => Promise + config: () => Promise market: ({ denom }: { denom: string }) => Promise markets: ({ limit, @@ -124,7 +125,7 @@ export class MarsMockRedBankQueryClient implements MarsMockRedBankReadOnlyInterf this.underlyingDebtAmount = this.underlyingDebtAmount.bind(this) } - config = async (): Promise => { + config = async (): Promise => { return this.client.queryContractSmart(this.contractAddress, { config: {}, }) @@ -310,6 +311,16 @@ export class MarsMockRedBankQueryClient implements MarsMockRedBankReadOnlyInterf export interface MarsMockRedBankInterface extends MarsMockRedBankReadOnlyInterface { contractAddress: string sender: string + updateOwner: ( + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise + updateEmergencyOwner: ( + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise updateConfig: ( { config, @@ -446,6 +457,8 @@ export class MarsMockRedBankClient this.client = client this.sender = sender this.contractAddress = contractAddress + this.updateOwner = this.updateOwner.bind(this) + this.updateEmergencyOwner = this.updateEmergencyOwner.bind(this) this.updateConfig = this.updateConfig.bind(this) this.initAsset = this.initAsset.bind(this) this.updateAsset = this.updateAsset.bind(this) @@ -458,6 +471,38 @@ export class MarsMockRedBankClient this.updateAssetCollateralStatus = this.updateAssetCollateralStatus.bind(this) } + updateOwner = async ( + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + update_owner: {}, + }, + fee, + memo, + funds, + ) + } + updateEmergencyOwner = async ( + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + update_emergency_owner: {}, + }, + fee, + memo, + funds, + ) + } updateConfig = async ( { config, diff --git a/src/types/generated/mars-mock-red-bank/MarsMockRedBank.message-composer.ts b/src/types/generated/mars-mock-red-bank/MarsMockRedBank.message-composer.ts index 2239bec6..be72a38d 100644 --- a/src/types/generated/mars-mock-red-bank/MarsMockRedBank.message-composer.ts +++ b/src/types/generated/mars-mock-red-bank/MarsMockRedBank.message-composer.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -16,7 +16,7 @@ import { ArrayOfUserCollateralResponse, ArrayOfUserDebtResponse, CoinMarketInfo, - ConfigForString, + ConfigResponse, CreateOrUpdateConfig, Decimal, ExecuteMsg, @@ -24,6 +24,7 @@ import { InstantiateMsg, InterestRateModel, Market, + OwnerUpdate, QueryMsg, Uint128, UncollateralizedLoanLimitResponse, @@ -35,6 +36,8 @@ import { export interface MarsMockRedBankMessage { contractAddress: string sender: string + updateOwner: (funds?: Coin[]) => MsgExecuteContractEncodeObject + updateEmergencyOwner: (funds?: Coin[]) => MsgExecuteContractEncodeObject updateConfig: ( { config, @@ -145,6 +148,8 @@ export class MarsMockRedBankMessageComposer implements MarsMockRedBankMessage { constructor(sender: string, contractAddress: string) { this.sender = sender this.contractAddress = contractAddress + this.updateOwner = this.updateOwner.bind(this) + this.updateEmergencyOwner = this.updateEmergencyOwner.bind(this) this.updateConfig = this.updateConfig.bind(this) this.initAsset = this.initAsset.bind(this) this.updateAsset = this.updateAsset.bind(this) @@ -157,6 +162,36 @@ export class MarsMockRedBankMessageComposer implements MarsMockRedBankMessage { this.updateAssetCollateralStatus = this.updateAssetCollateralStatus.bind(this) } + updateOwner = (funds?: Coin[]): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + update_owner: {}, + }), + ), + funds, + }), + } + } + updateEmergencyOwner = (funds?: Coin[]): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + update_emergency_owner: {}, + }), + ), + funds, + }), + } + } updateConfig = ( { config, diff --git a/src/types/generated/mars-mock-red-bank/MarsMockRedBank.react-query.ts b/src/types/generated/mars-mock-red-bank/MarsMockRedBank.react-query.ts index 02383ac8..31e76458 100644 --- a/src/types/generated/mars-mock-red-bank/MarsMockRedBank.react-query.ts +++ b/src/types/generated/mars-mock-red-bank/MarsMockRedBank.react-query.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -15,7 +15,7 @@ import { ArrayOfUserCollateralResponse, ArrayOfUserDebtResponse, CoinMarketInfo, - ConfigForString, + ConfigResponse, CreateOrUpdateConfig, Decimal, ExecuteMsg, @@ -23,6 +23,7 @@ import { InstantiateMsg, InterestRateModel, Market, + OwnerUpdate, QueryMsg, Uint128, UncollateralizedLoanLimitResponse, @@ -444,12 +445,12 @@ export function useMarsMockRedBankMarketQuery({ ) } export interface MarsMockRedBankConfigQuery - extends MarsMockRedBankReactQuery {} -export function useMarsMockRedBankConfigQuery({ + extends MarsMockRedBankReactQuery {} +export function useMarsMockRedBankConfigQuery({ client, options, }: MarsMockRedBankConfigQuery) { - return useQuery( + return useQuery( marsMockRedBankQueryKeys.config(client?.contractAddress), () => (client ? client.config() : Promise.reject(new Error('Invalid client'))), { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, @@ -693,3 +694,42 @@ export function useMarsMockRedBankUpdateConfigMutation( options, ) } +export interface MarsMockRedBankUpdateEmergencyOwnerMutation { + client: MarsMockRedBankClient + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsMockRedBankUpdateEmergencyOwnerMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => + client.updateEmergencyOwner(msg, fee, memo, funds), + options, + ) +} +export interface MarsMockRedBankUpdateOwnerMutation { + client: MarsMockRedBankClient + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsMockRedBankUpdateOwnerMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => client.updateOwner(msg, fee, memo, funds), + options, + ) +} diff --git a/src/types/generated/mars-mock-red-bank/MarsMockRedBank.types.ts b/src/types/generated/mars-mock-red-bank/MarsMockRedBank.types.ts index d3227a84..8a083bee 100644 --- a/src/types/generated/mars-mock-red-bank/MarsMockRedBank.types.ts +++ b/src/types/generated/mars-mock-red-bank/MarsMockRedBank.types.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -11,10 +11,17 @@ export interface InstantiateMsg { } export interface CoinMarketInfo { denom: string + liquidation_bonus: Decimal liquidation_threshold: Decimal max_ltv: Decimal } export type ExecuteMsg = + | { + update_owner: OwnerUpdate + } + | { + update_emergency_owner: OwnerUpdate + } | { update_config: { config: CreateOrUpdateConfig @@ -76,17 +83,24 @@ export type ExecuteMsg = enable: boolean } } +export type OwnerUpdate = + | { + propose_new_owner: { + proposed: string + } + } + | 'clear_proposed' + | 'accept_proposed' + | 'abolish_owner_role' export type Uint128 = string export interface CreateOrUpdateConfig { address_provider?: string | null close_factor?: Decimal | null - owner?: string | null } export interface InitOrUpdateAssetParams { borrow_enabled?: boolean | null deposit_cap?: Uint128 | null deposit_enabled?: boolean | null - initial_borrow_rate?: Decimal | null interest_rate_model?: InterestRateModel | null liquidation_bonus?: Decimal | null liquidation_threshold?: Decimal | null @@ -182,10 +196,13 @@ export type QueryMsg = denom: string } } -export interface ConfigForString { +export interface ConfigResponse { address_provider: string close_factor: Decimal - owner: string + emergency_owner?: string | null + owner?: string | null + proposed_new_emergency_owner?: string | null + proposed_new_owner?: string | null } export interface Market { borrow_enabled: boolean @@ -235,8 +252,8 @@ export type UserHealthStatus = } export interface UserPositionResponse { health_status: UserHealthStatus - total_collateralized_debt: Decimal - total_enabled_collateral: Decimal - weighted_liquidation_threshold_collateral: Decimal - weighted_max_ltv_collateral: Decimal + total_collateralized_debt: Uint128 + total_enabled_collateral: Uint128 + weighted_liquidation_threshold_collateral: Uint128 + weighted_max_ltv_collateral: Uint128 } diff --git a/src/types/generated/mars-mock-red-bank/bundle.ts b/src/types/generated/mars-mock-red-bank/bundle.ts index 2fa1eefe..97c04638 100644 --- a/src/types/generated/mars-mock-red-bank/bundle.ts +++ b/src/types/generated/mars-mock-red-bank/bundle.ts @@ -1,14 +1,14 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ -import * as _12 from './MarsMockRedBank.types' -import * as _13 from './MarsMockRedBank.client' -import * as _14 from './MarsMockRedBank.message-composer' -import * as _15 from './MarsMockRedBank.react-query' +import * as _16 from './MarsMockRedBank.types' +import * as _17 from './MarsMockRedBank.client' +import * as _18 from './MarsMockRedBank.message-composer' +import * as _19 from './MarsMockRedBank.react-query' export namespace contracts { - export const MarsMockRedBank = { ..._12, ..._13, ..._14, ..._15 } + export const MarsMockRedBank = { ..._16, ..._17, ..._18, ..._19 } } diff --git a/src/types/generated/mars-mock-vault/MarsMockVault.client.ts b/src/types/generated/mars-mock-vault/MarsMockVault.client.ts index 12d7faa7..c07c9528 100644 --- a/src/types/generated/mars-mock-vault/MarsMockVault.client.ts +++ b/src/types/generated/mars-mock-vault/MarsMockVault.client.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -21,13 +21,13 @@ import { OracleBaseForString, QueryMsg, Uint128, - VaultInfo, - VaultStandardInfo, + VaultInfoResponse, + VaultStandardInfoResponse, } from './MarsMockVault.types' export interface MarsMockVaultReadOnlyInterface { contractAddress: string - vaultStandardInfo: () => Promise - info: () => Promise + vaultStandardInfo: () => Promise + info: () => Promise previewDeposit: ({ amount }: { amount: Uint128 }) => Promise previewRedeem: ({ amount }: { amount: Uint128 }) => Promise totalAssets: () => Promise @@ -54,12 +54,12 @@ export class MarsMockVaultQueryClient implements MarsMockVaultReadOnlyInterface this.vaultExtension = this.vaultExtension.bind(this) } - vaultStandardInfo = async (): Promise => { + vaultStandardInfo = async (): Promise => { return this.client.queryContractSmart(this.contractAddress, { vault_standard_info: {}, }) } - info = async (): Promise => { + info = async (): Promise => { return this.client.queryContractSmart(this.contractAddress, { info: {}, }) diff --git a/src/types/generated/mars-mock-vault/MarsMockVault.message-composer.ts b/src/types/generated/mars-mock-vault/MarsMockVault.message-composer.ts index 6d760762..614b2dc1 100644 --- a/src/types/generated/mars-mock-vault/MarsMockVault.message-composer.ts +++ b/src/types/generated/mars-mock-vault/MarsMockVault.message-composer.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -23,8 +23,8 @@ import { OracleBaseForString, QueryMsg, Uint128, - VaultInfo, - VaultStandardInfo, + VaultInfoResponse, + VaultStandardInfoResponse, } from './MarsMockVault.types' export interface MarsMockVaultMessage { contractAddress: string diff --git a/src/types/generated/mars-mock-vault/MarsMockVault.react-query.ts b/src/types/generated/mars-mock-vault/MarsMockVault.react-query.ts index 5250ae1b..b8cd52c5 100644 --- a/src/types/generated/mars-mock-vault/MarsMockVault.react-query.ts +++ b/src/types/generated/mars-mock-vault/MarsMockVault.react-query.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -22,8 +22,8 @@ import { OracleBaseForString, QueryMsg, Uint128, - VaultInfo, - VaultStandardInfo, + VaultInfoResponse, + VaultStandardInfoResponse, } from './MarsMockVault.types' import { MarsMockVaultClient, MarsMockVaultQueryClient } from './MarsMockVault.client' export const marsMockVaultQueryKeys = { @@ -210,24 +210,25 @@ export function useMarsMockVaultPreviewDepositQuery({ { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } -export interface MarsMockVaultInfoQuery extends MarsMockVaultReactQuery {} -export function useMarsMockVaultInfoQuery({ +export interface MarsMockVaultInfoQuery + extends MarsMockVaultReactQuery {} +export function useMarsMockVaultInfoQuery({ client, options, }: MarsMockVaultInfoQuery) { - return useQuery( + return useQuery( marsMockVaultQueryKeys.info(client?.contractAddress), () => (client ? client.info() : Promise.reject(new Error('Invalid client'))), { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } export interface MarsMockVaultVaultStandardInfoQuery - extends MarsMockVaultReactQuery {} -export function useMarsMockVaultVaultStandardInfoQuery({ + extends MarsMockVaultReactQuery {} +export function useMarsMockVaultVaultStandardInfoQuery({ client, options, }: MarsMockVaultVaultStandardInfoQuery) { - return useQuery( + return useQuery( marsMockVaultQueryKeys.vaultStandardInfo(client?.contractAddress), () => (client ? client.vaultStandardInfo() : Promise.reject(new Error('Invalid client'))), { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, @@ -235,7 +236,6 @@ export function useMarsMockVaultVaultStandardInfoQuery Promise - priceableUnderlying: ({ coin }: { coin: Coin }) => Promise - config: () => Promise - pricingInfo: ({ denom }: { denom: string }) => Promise - allPricingInfo: ({ - limit, - startAfter, - }: { - limit?: number - startAfter?: string - }) => Promise -} -export class MarsOracleAdapterQueryClient implements MarsOracleAdapterReadOnlyInterface { - client: CosmWasmClient - contractAddress: string - - constructor(client: CosmWasmClient, contractAddress: string) { - this.client = client - this.contractAddress = contractAddress - this.price = this.price.bind(this) - this.priceableUnderlying = this.priceableUnderlying.bind(this) - this.config = this.config.bind(this) - this.pricingInfo = this.pricingInfo.bind(this) - this.allPricingInfo = this.allPricingInfo.bind(this) - } - - price = async ({ denom }: { denom: string }): Promise => { - return this.client.queryContractSmart(this.contractAddress, { - price: { - denom, - }, - }) - } - priceableUnderlying = async ({ coin }: { coin: Coin }): Promise => { - return this.client.queryContractSmart(this.contractAddress, { - priceable_underlying: { - coin, - }, - }) - } - config = async (): Promise => { - return this.client.queryContractSmart(this.contractAddress, { - config: {}, - }) - } - pricingInfo = async ({ denom }: { denom: string }): Promise => { - return this.client.queryContractSmart(this.contractAddress, { - pricing_info: { - denom, - }, - }) - } - allPricingInfo = async ({ - limit, - startAfter, - }: { - limit?: number - startAfter?: string - }): Promise => { - return this.client.queryContractSmart(this.contractAddress, { - all_pricing_info: { - limit, - start_after: startAfter, - }, - }) - } -} -export interface MarsOracleAdapterInterface extends MarsOracleAdapterReadOnlyInterface { - contractAddress: string - sender: string - updateConfig: ( - { - newConfig, - }: { - newConfig: ConfigUpdates - }, - fee?: number | StdFee | 'auto', - memo?: string, - funds?: Coin[], - ) => Promise -} -export class MarsOracleAdapterClient - extends MarsOracleAdapterQueryClient - implements MarsOracleAdapterInterface -{ - client: SigningCosmWasmClient - sender: string - contractAddress: string - - constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) { - super(client, contractAddress) - this.client = client - this.sender = sender - this.contractAddress = contractAddress - this.updateConfig = this.updateConfig.bind(this) - } - - updateConfig = async ( - { - newConfig, - }: { - newConfig: ConfigUpdates - }, - fee: number | StdFee | 'auto' = 'auto', - memo?: string, - funds?: Coin[], - ): Promise => { - return await this.client.execute( - this.sender, - this.contractAddress, - { - update_config: { - new_config: newConfig, - }, - }, - fee, - memo, - funds, - ) - } -} diff --git a/src/types/generated/mars-oracle-adapter/MarsOracleAdapter.react-query.ts b/src/types/generated/mars-oracle-adapter/MarsOracleAdapter.react-query.ts deleted file mode 100644 index e9c4b546..00000000 --- a/src/types/generated/mars-oracle-adapter/MarsOracleAdapter.react-query.ts +++ /dev/null @@ -1,199 +0,0 @@ -// @ts-nocheck -/** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. - * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, - * and run the @cosmwasm/ts-codegen generate command to regenerate this file. - */ - -import { useMutation, UseMutationOptions, useQuery, UseQueryOptions } from '@tanstack/react-query' -import { ExecuteResult } from '@cosmjs/cosmwasm-stargate' -import { StdFee } from '@cosmjs/amino' - -import { - Addr, - ArrayOfCoin, - ArrayOfVaultPricingInfo, - Coin, - ConfigResponse, - ConfigUpdates, - Decimal, - ExecuteMsg, - InstantiateMsg, - OracleBaseForAddr, - OracleBaseForString, - PriceResponse, - PricingMethod, - QueryMsg, - Uint128, - VaultPricingInfo, -} from './MarsOracleAdapter.types' -import { MarsOracleAdapterClient, MarsOracleAdapterQueryClient } from './MarsOracleAdapter.client' -export const marsOracleAdapterQueryKeys = { - contract: [ - { - contract: 'marsOracleAdapter', - }, - ] as const, - address: (contractAddress: string | undefined) => - [{ ...marsOracleAdapterQueryKeys.contract[0], address: contractAddress }] as const, - price: (contractAddress: string | undefined, args?: Record) => - [{ ...marsOracleAdapterQueryKeys.address(contractAddress)[0], method: 'price', args }] as const, - priceableUnderlying: (contractAddress: string | undefined, args?: Record) => - [ - { - ...marsOracleAdapterQueryKeys.address(contractAddress)[0], - method: 'priceable_underlying', - args, - }, - ] as const, - config: (contractAddress: string | undefined, args?: Record) => - [ - { ...marsOracleAdapterQueryKeys.address(contractAddress)[0], method: 'config', args }, - ] as const, - pricingInfo: (contractAddress: string | undefined, args?: Record) => - [ - { ...marsOracleAdapterQueryKeys.address(contractAddress)[0], method: 'pricing_info', args }, - ] as const, - allPricingInfo: (contractAddress: string | undefined, args?: Record) => - [ - { - ...marsOracleAdapterQueryKeys.address(contractAddress)[0], - method: 'all_pricing_info', - args, - }, - ] as const, -} -export interface MarsOracleAdapterReactQuery { - client: MarsOracleAdapterQueryClient | undefined - options?: Omit< - UseQueryOptions, - "'queryKey' | 'queryFn' | 'initialData'" - > & { - initialData?: undefined - } -} -export interface MarsOracleAdapterAllPricingInfoQuery - extends MarsOracleAdapterReactQuery { - args: { - limit?: number - startAfter?: string - } -} -export function useMarsOracleAdapterAllPricingInfoQuery({ - client, - args, - options, -}: MarsOracleAdapterAllPricingInfoQuery) { - return useQuery( - marsOracleAdapterQueryKeys.allPricingInfo(client?.contractAddress, args), - () => - client - ? client.allPricingInfo({ - limit: args.limit, - startAfter: args.startAfter, - }) - : Promise.reject(new Error('Invalid client')), - { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, - ) -} -export interface MarsOracleAdapterPricingInfoQuery - extends MarsOracleAdapterReactQuery { - args: { - denom: string - } -} -export function useMarsOracleAdapterPricingInfoQuery({ - client, - args, - options, -}: MarsOracleAdapterPricingInfoQuery) { - return useQuery( - marsOracleAdapterQueryKeys.pricingInfo(client?.contractAddress, args), - () => - client - ? client.pricingInfo({ - denom: args.denom, - }) - : Promise.reject(new Error('Invalid client')), - { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, - ) -} -export interface MarsOracleAdapterConfigQuery - extends MarsOracleAdapterReactQuery {} -export function useMarsOracleAdapterConfigQuery({ - client, - options, -}: MarsOracleAdapterConfigQuery) { - return useQuery( - marsOracleAdapterQueryKeys.config(client?.contractAddress), - () => (client ? client.config() : Promise.reject(new Error('Invalid client'))), - { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, - ) -} -export interface MarsOracleAdapterPriceableUnderlyingQuery - extends MarsOracleAdapterReactQuery { - args: { - coin: Coin - } -} -export function useMarsOracleAdapterPriceableUnderlyingQuery({ - client, - args, - options, -}: MarsOracleAdapterPriceableUnderlyingQuery) { - return useQuery( - marsOracleAdapterQueryKeys.priceableUnderlying(client?.contractAddress, args), - () => - client - ? client.priceableUnderlying({ - coin: args.coin, - }) - : Promise.reject(new Error('Invalid client')), - { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, - ) -} -export interface MarsOracleAdapterPriceQuery - extends MarsOracleAdapterReactQuery { - args: { - denom: string - } -} -export function useMarsOracleAdapterPriceQuery({ - client, - args, - options, -}: MarsOracleAdapterPriceQuery) { - return useQuery( - marsOracleAdapterQueryKeys.price(client?.contractAddress, args), - () => - client - ? client.price({ - denom: args.denom, - }) - : Promise.reject(new Error('Invalid client')), - { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, - ) -} -export interface MarsOracleAdapterUpdateConfigMutation { - client: MarsOracleAdapterClient - msg: { - newConfig: ConfigUpdates - } - args?: { - fee?: number | StdFee | 'auto' - memo?: string - funds?: Coin[] - } -} -export function useMarsOracleAdapterUpdateConfigMutation( - options?: Omit< - UseMutationOptions, - 'mutationFn' - >, -) { - return useMutation( - ({ client, msg, args: { fee, memo, funds } = {} }) => - client.updateConfig(msg, fee, memo, funds), - options, - ) -} diff --git a/src/types/generated/mars-oracle-adapter/MarsOracleAdapter.types.ts b/src/types/generated/mars-oracle-adapter/MarsOracleAdapter.types.ts deleted file mode 100644 index 3072f9a6..00000000 --- a/src/types/generated/mars-oracle-adapter/MarsOracleAdapter.types.ts +++ /dev/null @@ -1,74 +0,0 @@ -// @ts-nocheck -/** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. - * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, - * and run the @cosmwasm/ts-codegen generate command to regenerate this file. - */ - -export type OracleBaseForString = string -export type Addr = string -export type PricingMethod = 'preview_redeem' -export interface InstantiateMsg { - oracle: OracleBaseForString - owner: string - vault_pricing: VaultPricingInfo[] -} -export interface VaultPricingInfo { - addr: Addr - base_denom: string - method: PricingMethod - vault_coin_denom: string -} -export type ExecuteMsg = { - update_config: { - new_config: ConfigUpdates - } -} -export interface ConfigUpdates { - oracle?: OracleBaseForString | null - owner?: string | null - vault_pricing?: VaultPricingInfo[] | null -} -export type QueryMsg = - | { - price: { - denom: string - } - } - | { - priceable_underlying: { - coin: Coin - } - } - | { - config: {} - } - | { - pricing_info: { - denom: string - } - } - | { - all_pricing_info: { - limit?: number | null - start_after?: string | null - } - } -export type Uint128 = string -export interface Coin { - amount: Uint128 - denom: string - [k: string]: unknown -} -export type ArrayOfVaultPricingInfo = VaultPricingInfo[] -export type OracleBaseForAddr = string -export interface ConfigResponse { - oracle: OracleBaseForAddr - owner: Addr -} -export type Decimal = string -export interface PriceResponse { - denom: string - price: Decimal -} -export type ArrayOfCoin = Coin[] diff --git a/src/types/generated/mars-oracle-adapter/bundle.ts b/src/types/generated/mars-oracle-adapter/bundle.ts deleted file mode 100644 index 63503f7f..00000000 --- a/src/types/generated/mars-oracle-adapter/bundle.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @ts-nocheck -/** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. - * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, - * and run the @cosmwasm/ts-codegen generate command to regenerate this file. - */ - -import * as _24 from './MarsOracleAdapter.types' -import * as _25 from './MarsOracleAdapter.client' -import * as _26 from './MarsOracleAdapter.message-composer' -import * as _27 from './MarsOracleAdapter.react-query' -export namespace contracts { - export const MarsOracleAdapter = { ..._24, ..._25, ..._26, ..._27 } -} diff --git a/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.client.ts b/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.client.ts new file mode 100644 index 00000000..317b82a2 --- /dev/null +++ b/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.client.ts @@ -0,0 +1,32 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import { + Addr, + Coin, + CoinValue, + DebtAmount, + Decimal, + DenomsData, + HealthComputer, + InterestRateModel, + LentAmount, + LockingVaultAmount, + Market, + Positions, + Uint128, + UnlockingPositions, + VaultAmount, + VaultAmount1, + VaultBaseForAddr, + VaultConfig, + VaultPosition, + VaultPositionAmount, + VaultPositionValue, + VaultsData, + VaultUnlockingPosition, +} from './MarsRoverHealthComputer.types' diff --git a/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.message-composer.ts b/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.message-composer.ts new file mode 100644 index 00000000..317b82a2 --- /dev/null +++ b/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.message-composer.ts @@ -0,0 +1,32 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import { + Addr, + Coin, + CoinValue, + DebtAmount, + Decimal, + DenomsData, + HealthComputer, + InterestRateModel, + LentAmount, + LockingVaultAmount, + Market, + Positions, + Uint128, + UnlockingPositions, + VaultAmount, + VaultAmount1, + VaultBaseForAddr, + VaultConfig, + VaultPosition, + VaultPositionAmount, + VaultPositionValue, + VaultsData, + VaultUnlockingPosition, +} from './MarsRoverHealthComputer.types' diff --git a/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.react-query.ts b/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.react-query.ts new file mode 100644 index 00000000..abe25853 --- /dev/null +++ b/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.react-query.ts @@ -0,0 +1,33 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import { + Addr, + Coin, + CoinValue, + DebtAmount, + Decimal, + DenomsData, + HealthComputer, + InterestRateModel, + LentAmount, + LockingVaultAmount, + Market, + Positions, + Uint128, + UnlockingPositions, + VaultAmount, + VaultAmount1, + VaultBaseForAddr, + VaultConfig, + VaultPosition, + VaultPositionAmount, + VaultPositionValue, + VaultsData, + VaultUnlockingPosition, +} from './MarsRoverHealthComputer.types' +import './MarsRoverHealthComputer.client' diff --git a/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.types.ts b/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.types.ts new file mode 100644 index 00000000..00293fc7 --- /dev/null +++ b/src/types/generated/mars-rover-health-computer/MarsRoverHealthComputer.types.ts @@ -0,0 +1,118 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +export type Decimal = string +export type Uint128 = string +export type VaultPositionAmount = + | { + unlocked: VaultAmount + } + | { + locking: LockingVaultAmount + } +export type VaultAmount = string +export type VaultAmount1 = string +export type UnlockingPositions = VaultUnlockingPosition[] +export type Addr = string +export interface HealthComputer { + allowed_coins: string[] + denoms_data: DenomsData + positions: Positions + vaults_data: VaultsData +} +export interface DenomsData { + markets: { + [k: string]: Market + } + prices: { + [k: string]: Decimal + } +} +export interface Market { + borrow_enabled: boolean + borrow_index: Decimal + borrow_rate: Decimal + collateral_total_scaled: Uint128 + debt_total_scaled: Uint128 + denom: string + deposit_cap: Uint128 + deposit_enabled: boolean + indexes_last_updated: number + interest_rate_model: InterestRateModel + liquidation_bonus: Decimal + liquidation_threshold: Decimal + liquidity_index: Decimal + liquidity_rate: Decimal + max_loan_to_value: Decimal + reserve_factor: Decimal +} +export interface InterestRateModel { + base: Decimal + optimal_utilization_rate: Decimal + slope_1: Decimal + slope_2: Decimal +} +export interface Positions { + account_id: string + debts: DebtAmount[] + deposits: Coin[] + lends: LentAmount[] + vaults: VaultPosition[] +} +export interface DebtAmount { + amount: Uint128 + denom: string + shares: Uint128 +} +export interface Coin { + amount: Uint128 + denom: string + [k: string]: unknown +} +export interface LentAmount { + amount: Uint128 + denom: string + shares: Uint128 +} +export interface VaultPosition { + amount: VaultPositionAmount + vault: VaultBaseForAddr +} +export interface LockingVaultAmount { + locked: VaultAmount1 + unlocking: UnlockingPositions +} +export interface VaultUnlockingPosition { + coin: Coin + id: number +} +export interface VaultBaseForAddr { + address: Addr +} +export interface VaultsData { + vault_configs: { + [k: string]: VaultConfig + } + vault_values: { + [k: string]: VaultPositionValue + } +} +export interface VaultConfig { + deposit_cap: Coin + liquidation_threshold: Decimal + max_ltv: Decimal + whitelisted: boolean +} +export interface VaultPositionValue { + base_coin: CoinValue + vault_coin: CoinValue +} +export interface CoinValue { + amount: Uint128 + denom: string + value: Uint128 +} diff --git a/src/types/generated/mars-rover-health-computer/bundle.ts b/src/types/generated/mars-rover-health-computer/bundle.ts new file mode 100644 index 00000000..4304094d --- /dev/null +++ b/src/types/generated/mars-rover-health-computer/bundle.ts @@ -0,0 +1,14 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import * as _24 from './MarsRoverHealthComputer.types' +import * as _25 from './MarsRoverHealthComputer.client' +import * as _26 from './MarsRoverHealthComputer.message-composer' +import * as _27 from './MarsRoverHealthComputer.react-query' +export namespace contracts { + export const MarsRoverHealthComputer = { ..._24, ..._25, ..._26, ..._27 } +} diff --git a/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.client.ts b/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.client.ts new file mode 100644 index 00000000..9d443962 --- /dev/null +++ b/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.client.ts @@ -0,0 +1,126 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import { CosmWasmClient, ExecuteResult, SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate' +import { Coin, StdFee } from '@cosmjs/amino' + +import { + ConfigResponse, + Decimal, + ExecuteMsg, + HealthResponse, + InstantiateMsg, + OwnerResponse, + OwnerUpdate, + QueryMsg, + Uint128, +} from './MarsRoverHealthTypes.types' +export interface MarsRoverHealthTypesReadOnlyInterface { + contractAddress: string + health: ({ accountId }: { accountId: string }) => Promise + config: () => Promise +} +export class MarsRoverHealthTypesQueryClient implements MarsRoverHealthTypesReadOnlyInterface { + client: CosmWasmClient + contractAddress: string + + constructor(client: CosmWasmClient, contractAddress: string) { + this.client = client + this.contractAddress = contractAddress + this.health = this.health.bind(this) + this.config = this.config.bind(this) + } + + health = async ({ accountId }: { accountId: string }): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + health: { + account_id: accountId, + }, + }) + } + config = async (): Promise => { + return this.client.queryContractSmart(this.contractAddress, { + config: {}, + }) + } +} +export interface MarsRoverHealthTypesInterface extends MarsRoverHealthTypesReadOnlyInterface { + contractAddress: string + sender: string + updateOwner: ( + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise + updateConfig: ( + { + creditManager, + }: { + creditManager: string + }, + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise +} +export class MarsRoverHealthTypesClient + extends MarsRoverHealthTypesQueryClient + implements MarsRoverHealthTypesInterface +{ + client: SigningCosmWasmClient + sender: string + contractAddress: string + + constructor(client: SigningCosmWasmClient, sender: string, contractAddress: string) { + super(client, contractAddress) + this.client = client + this.sender = sender + this.contractAddress = contractAddress + this.updateOwner = this.updateOwner.bind(this) + this.updateConfig = this.updateConfig.bind(this) + } + + updateOwner = async ( + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + update_owner: {}, + }, + fee, + memo, + funds, + ) + } + updateConfig = async ( + { + creditManager, + }: { + creditManager: string + }, + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + update_config: { + credit_manager: creditManager, + }, + }, + fee, + memo, + funds, + ) + } +} diff --git a/src/types/generated/mars-oracle-adapter/MarsOracleAdapter.message-composer.ts b/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.message-composer.ts similarity index 58% rename from src/types/generated/mars-oracle-adapter/MarsOracleAdapter.message-composer.ts rename to src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.message-composer.ts index 08b593b1..08bfeab5 100644 --- a/src/types/generated/mars-oracle-adapter/MarsOracleAdapter.message-composer.ts +++ b/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.message-composer.ts @@ -1,59 +1,70 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ +import { Coin } from '@cosmjs/amino' import { MsgExecuteContractEncodeObject } from 'cosmwasm' import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx' import { toUtf8 } from '@cosmjs/encoding' import { - Addr, - ArrayOfCoin, - ArrayOfVaultPricingInfo, - Coin, ConfigResponse, - ConfigUpdates, Decimal, ExecuteMsg, + HealthResponse, InstantiateMsg, - OracleBaseForAddr, - OracleBaseForString, - PriceResponse, - PricingMethod, + OwnerResponse, + OwnerUpdate, QueryMsg, Uint128, - VaultPricingInfo, -} from './MarsOracleAdapter.types' -export interface MarsOracleAdapterMessage { +} from './MarsRoverHealthTypes.types' +export interface MarsRoverHealthTypesMessage { contractAddress: string sender: string + updateOwner: (funds?: Coin[]) => MsgExecuteContractEncodeObject updateConfig: ( { - newConfig, + creditManager, }: { - newConfig: ConfigUpdates + creditManager: string }, funds?: Coin[], ) => MsgExecuteContractEncodeObject } -export class MarsOracleAdapterMessageComposer implements MarsOracleAdapterMessage { +export class MarsRoverHealthTypesMessageComposer implements MarsRoverHealthTypesMessage { sender: string contractAddress: string constructor(sender: string, contractAddress: string) { this.sender = sender this.contractAddress = contractAddress + this.updateOwner = this.updateOwner.bind(this) this.updateConfig = this.updateConfig.bind(this) } + updateOwner = (funds?: Coin[]): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + update_owner: {}, + }), + ), + funds, + }), + } + } updateConfig = ( { - newConfig, + creditManager, }: { - newConfig: ConfigUpdates + creditManager: string }, funds?: Coin[], ): MsgExecuteContractEncodeObject => { @@ -65,7 +76,7 @@ export class MarsOracleAdapterMessageComposer implements MarsOracleAdapterMessag msg: toUtf8( JSON.stringify({ update_config: { - new_config: newConfig, + credit_manager: creditManager, }, }), ), diff --git a/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.react-query.ts b/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.react-query.ts new file mode 100644 index 00000000..80e6beec --- /dev/null +++ b/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.react-query.ts @@ -0,0 +1,128 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import { useMutation, UseMutationOptions, useQuery, UseQueryOptions } from '@tanstack/react-query' +import { ExecuteResult } from '@cosmjs/cosmwasm-stargate' +import { Coin, StdFee } from '@cosmjs/amino' + +import { + ConfigResponse, + Decimal, + ExecuteMsg, + HealthResponse, + InstantiateMsg, + OwnerResponse, + OwnerUpdate, + QueryMsg, + Uint128, +} from './MarsRoverHealthTypes.types' +import { + MarsRoverHealthTypesClient, + MarsRoverHealthTypesQueryClient, +} from './MarsRoverHealthTypes.client' +export const marsRoverHealthTypesQueryKeys = { + contract: [ + { + contract: 'marsRoverHealthTypes', + }, + ] as const, + address: (contractAddress: string | undefined) => + [{ ...marsRoverHealthTypesQueryKeys.contract[0], address: contractAddress }] as const, + health: (contractAddress: string | undefined, args?: Record) => + [ + { ...marsRoverHealthTypesQueryKeys.address(contractAddress)[0], method: 'health', args }, + ] as const, + config: (contractAddress: string | undefined, args?: Record) => + [ + { ...marsRoverHealthTypesQueryKeys.address(contractAddress)[0], method: 'config', args }, + ] as const, +} +export interface MarsRoverHealthTypesReactQuery { + client: MarsRoverHealthTypesQueryClient | undefined + options?: Omit< + UseQueryOptions, + "'queryKey' | 'queryFn' | 'initialData'" + > & { + initialData?: undefined + } +} +export interface MarsRoverHealthTypesConfigQuery + extends MarsRoverHealthTypesReactQuery {} +export function useMarsRoverHealthTypesConfigQuery({ + client, + options, +}: MarsRoverHealthTypesConfigQuery) { + return useQuery( + marsRoverHealthTypesQueryKeys.config(client?.contractAddress), + () => (client ? client.config() : Promise.reject(new Error('Invalid client'))), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsRoverHealthTypesHealthQuery + extends MarsRoverHealthTypesReactQuery { + args: { + accountId: string + } +} +export function useMarsRoverHealthTypesHealthQuery({ + client, + args, + options, +}: MarsRoverHealthTypesHealthQuery) { + return useQuery( + marsRoverHealthTypesQueryKeys.health(client?.contractAddress, args), + () => + client + ? client.health({ + accountId: args.accountId, + }) + : Promise.reject(new Error('Invalid client')), + { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, + ) +} +export interface MarsRoverHealthTypesUpdateConfigMutation { + client: MarsRoverHealthTypesClient + msg: { + creditManager: string + } + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsRoverHealthTypesUpdateConfigMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => + client.updateConfig(msg, fee, memo, funds), + options, + ) +} +export interface MarsRoverHealthTypesUpdateOwnerMutation { + client: MarsRoverHealthTypesClient + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsRoverHealthTypesUpdateOwnerMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => client.updateOwner(msg, fee, memo, funds), + options, + ) +} diff --git a/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.types.ts b/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.types.ts new file mode 100644 index 00000000..bf8a8c4b --- /dev/null +++ b/src/types/generated/mars-rover-health-types/MarsRoverHealthTypes.types.ts @@ -0,0 +1,59 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +export interface InstantiateMsg { + owner: string +} +export type ExecuteMsg = + | { + update_owner: OwnerUpdate + } + | { + update_config: { + credit_manager: string + } + } +export type OwnerUpdate = + | { + propose_new_owner: { + proposed: string + } + } + | 'clear_proposed' + | 'accept_proposed' + | 'abolish_owner_role' +export type QueryMsg = + | { + health: { + account_id: string + } + } + | { + config: {} + } +export interface ConfigResponse { + credit_manager_addr?: string | null + owner_response: OwnerResponse +} +export interface OwnerResponse { + abolished: boolean + initialized: boolean + owner?: string | null + proposed?: string | null +} +export type Decimal = string +export type Uint128 = string +export interface HealthResponse { + above_max_ltv: boolean + liquidatable: boolean + liquidation_health_factor?: Decimal | null + liquidation_threshold_adjusted_collateral: Uint128 + max_ltv_adjusted_collateral: Uint128 + max_ltv_health_factor?: Decimal | null + total_collateral_value: Uint128 + total_debt_value: Uint128 +} diff --git a/src/types/generated/mars-rover-health-types/bundle.ts b/src/types/generated/mars-rover-health-types/bundle.ts new file mode 100644 index 00000000..26a907af --- /dev/null +++ b/src/types/generated/mars-rover-health-types/bundle.ts @@ -0,0 +1,14 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import * as _28 from './MarsRoverHealthTypes.types' +import * as _29 from './MarsRoverHealthTypes.client' +import * as _30 from './MarsRoverHealthTypes.message-composer' +import * as _31 from './MarsRoverHealthTypes.react-query' +export namespace contracts { + export const MarsRoverHealthTypes = { ..._28, ..._29, ..._30, ..._31 } +} diff --git a/src/types/generated/mars-swapper-base/MarsSwapperBase.client.ts b/src/types/generated/mars-swapper-base/MarsSwapperBase.client.ts index bc65dbea..6b4de7e2 100644 --- a/src/types/generated/mars-swapper-base/MarsSwapperBase.client.ts +++ b/src/types/generated/mars-swapper-base/MarsSwapperBase.client.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -12,19 +12,20 @@ import { Addr, ArrayOfRouteResponseForEmpty, Coin, - ConfigForString, Decimal, Empty, EstimateExactInSwapResponse, ExecuteMsg, InstantiateMsg, + OwnerResponse, + OwnerUpdate, QueryMsg, RouteResponseForEmpty, Uint128, } from './MarsSwapperBase.types' export interface MarsSwapperBaseReadOnlyInterface { contractAddress: string - config: () => Promise + owner: () => Promise route: ({ denomIn, denomOut, @@ -54,15 +55,15 @@ export class MarsSwapperBaseQueryClient implements MarsSwapperBaseReadOnlyInterf constructor(client: CosmWasmClient, contractAddress: string) { this.client = client this.contractAddress = contractAddress - this.config = this.config.bind(this) + this.owner = this.owner.bind(this) this.route = this.route.bind(this) this.routes = this.routes.bind(this) this.estimateExactInSwap = this.estimateExactInSwap.bind(this) } - config = async (): Promise => { + owner = async (): Promise => { return this.client.queryContractSmart(this.contractAddress, { - config: {}, + owner: {}, }) } route = async ({ @@ -111,12 +112,7 @@ export class MarsSwapperBaseQueryClient implements MarsSwapperBaseReadOnlyInterf export interface MarsSwapperBaseInterface extends MarsSwapperBaseReadOnlyInterface { contractAddress: string sender: string - updateConfig: ( - { - owner, - }: { - owner?: string - }, + updateOwner: ( fee?: number | StdFee | 'auto', memo?: string, funds?: Coin[], @@ -177,18 +173,13 @@ export class MarsSwapperBaseClient this.client = client this.sender = sender this.contractAddress = contractAddress - this.updateConfig = this.updateConfig.bind(this) + this.updateOwner = this.updateOwner.bind(this) this.setRoute = this.setRoute.bind(this) this.swapExactIn = this.swapExactIn.bind(this) this.transferResult = this.transferResult.bind(this) } - updateConfig = async ( - { - owner, - }: { - owner?: string - }, + updateOwner = async ( fee: number | StdFee | 'auto' = 'auto', memo?: string, funds?: Coin[], @@ -197,9 +188,7 @@ export class MarsSwapperBaseClient this.sender, this.contractAddress, { - update_config: { - owner, - }, + update_owner: {}, }, fee, memo, diff --git a/src/types/generated/mars-swapper-base/MarsSwapperBase.message-composer.ts b/src/types/generated/mars-swapper-base/MarsSwapperBase.message-composer.ts index ef4b0b68..aaa4aad3 100644 --- a/src/types/generated/mars-swapper-base/MarsSwapperBase.message-composer.ts +++ b/src/types/generated/mars-swapper-base/MarsSwapperBase.message-composer.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -13,12 +13,13 @@ import { Addr, ArrayOfRouteResponseForEmpty, Coin, - ConfigForString, Decimal, Empty, EstimateExactInSwapResponse, ExecuteMsg, InstantiateMsg, + OwnerResponse, + OwnerUpdate, QueryMsg, RouteResponseForEmpty, Uint128, @@ -26,14 +27,7 @@ import { export interface MarsSwapperBaseMessage { contractAddress: string sender: string - updateConfig: ( - { - owner, - }: { - owner?: string - }, - funds?: Coin[], - ) => MsgExecuteContractEncodeObject + updateOwner: (funds?: Coin[]) => MsgExecuteContractEncodeObject setRoute: ( { denomIn, @@ -78,20 +72,13 @@ export class MarsSwapperBaseMessageComposer implements MarsSwapperBaseMessage { constructor(sender: string, contractAddress: string) { this.sender = sender this.contractAddress = contractAddress - this.updateConfig = this.updateConfig.bind(this) + this.updateOwner = this.updateOwner.bind(this) this.setRoute = this.setRoute.bind(this) this.swapExactIn = this.swapExactIn.bind(this) this.transferResult = this.transferResult.bind(this) } - updateConfig = ( - { - owner, - }: { - owner?: string - }, - funds?: Coin[], - ): MsgExecuteContractEncodeObject => { + updateOwner = (funds?: Coin[]): MsgExecuteContractEncodeObject => { return { typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', value: MsgExecuteContract.fromPartial({ @@ -99,9 +86,7 @@ export class MarsSwapperBaseMessageComposer implements MarsSwapperBaseMessage { contract: this.contractAddress, msg: toUtf8( JSON.stringify({ - update_config: { - owner, - }, + update_owner: {}, }), ), funds, diff --git a/src/types/generated/mars-swapper-base/MarsSwapperBase.react-query.ts b/src/types/generated/mars-swapper-base/MarsSwapperBase.react-query.ts index 69ddc9ed..8d9ceb1d 100644 --- a/src/types/generated/mars-swapper-base/MarsSwapperBase.react-query.ts +++ b/src/types/generated/mars-swapper-base/MarsSwapperBase.react-query.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -13,12 +13,13 @@ import { Addr, ArrayOfRouteResponseForEmpty, Coin, - ConfigForString, Decimal, Empty, EstimateExactInSwapResponse, ExecuteMsg, InstantiateMsg, + OwnerResponse, + OwnerUpdate, QueryMsg, RouteResponseForEmpty, Uint128, @@ -32,8 +33,8 @@ export const marsSwapperBaseQueryKeys = { ] as const, address: (contractAddress: string | undefined) => [{ ...marsSwapperBaseQueryKeys.contract[0], address: contractAddress }] as const, - config: (contractAddress: string | undefined, args?: Record) => - [{ ...marsSwapperBaseQueryKeys.address(contractAddress)[0], method: 'config', args }] as const, + owner: (contractAddress: string | undefined, args?: Record) => + [{ ...marsSwapperBaseQueryKeys.address(contractAddress)[0], method: 'owner', args }] as const, route: (contractAddress: string | undefined, args?: Record) => [{ ...marsSwapperBaseQueryKeys.address(contractAddress)[0], method: 'route', args }] as const, routes: (contractAddress: string | undefined, args?: Record) => @@ -128,15 +129,15 @@ export function useMarsSwapperBaseRouteQuery({ { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } -export interface MarsSwapperBaseConfigQuery - extends MarsSwapperBaseReactQuery {} -export function useMarsSwapperBaseConfigQuery({ +export interface MarsSwapperBaseOwnerQuery + extends MarsSwapperBaseReactQuery {} +export function useMarsSwapperBaseOwnerQuery({ client, options, -}: MarsSwapperBaseConfigQuery) { - return useQuery( - marsSwapperBaseQueryKeys.config(client?.contractAddress), - () => (client ? client.config() : Promise.reject(new Error('Invalid client'))), +}: MarsSwapperBaseOwnerQuery) { + return useQuery( + marsSwapperBaseQueryKeys.owner(client?.contractAddress), + () => (client ? client.owner() : Promise.reject(new Error('Invalid client'))), { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } @@ -213,26 +214,22 @@ export function useMarsSwapperBaseSetRouteMutation( options, ) } -export interface MarsSwapperBaseUpdateConfigMutation { +export interface MarsSwapperBaseUpdateOwnerMutation { client: MarsSwapperBaseClient - msg: { - owner?: string - } args?: { fee?: number | StdFee | 'auto' memo?: string funds?: Coin[] } } -export function useMarsSwapperBaseUpdateConfigMutation( +export function useMarsSwapperBaseUpdateOwnerMutation( options?: Omit< - UseMutationOptions, + UseMutationOptions, 'mutationFn' >, ) { - return useMutation( - ({ client, msg, args: { fee, memo, funds } = {} }) => - client.updateConfig(msg, fee, memo, funds), + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => client.updateOwner(msg, fee, memo, funds), options, ) } diff --git a/src/types/generated/mars-swapper-base/MarsSwapperBase.types.ts b/src/types/generated/mars-swapper-base/MarsSwapperBase.types.ts index 1d2483af..2524e475 100644 --- a/src/types/generated/mars-swapper-base/MarsSwapperBase.types.ts +++ b/src/types/generated/mars-swapper-base/MarsSwapperBase.types.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -10,9 +10,7 @@ export interface InstantiateMsg { } export type ExecuteMsg = | { - update_config: { - owner?: string | null - } + update_owner: OwnerUpdate } | { set_route: { @@ -35,6 +33,15 @@ export type ExecuteMsg = recipient: Addr } } +export type OwnerUpdate = + | { + propose_new_owner: { + proposed: string + } + } + | 'clear_proposed' + | 'accept_proposed' + | 'abolish_owner_role' export type Uint128 = string export type Decimal = string export type Addr = string @@ -48,7 +55,7 @@ export interface Coin { } export type QueryMsg = | { - config: {} + owner: {} } | { route: { @@ -68,12 +75,15 @@ export type QueryMsg = denom_out: string } } -export interface ConfigForString { - owner: string -} export interface EstimateExactInSwapResponse { amount: Uint128 } +export interface OwnerResponse { + abolished: boolean + initialized: boolean + owner?: string | null + proposed?: string | null +} export interface RouteResponseForEmpty { denom_in: string denom_out: string diff --git a/src/types/generated/mars-swapper-base/bundle.ts b/src/types/generated/mars-swapper-base/bundle.ts index b3664011..0e9e9246 100644 --- a/src/types/generated/mars-swapper-base/bundle.ts +++ b/src/types/generated/mars-swapper-base/bundle.ts @@ -1,14 +1,14 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ -import * as _28 from './MarsSwapperBase.types' -import * as _29 from './MarsSwapperBase.client' -import * as _30 from './MarsSwapperBase.message-composer' -import * as _31 from './MarsSwapperBase.react-query' +import * as _32 from './MarsSwapperBase.types' +import * as _33 from './MarsSwapperBase.client' +import * as _34 from './MarsSwapperBase.message-composer' +import * as _35 from './MarsSwapperBase.react-query' export namespace contracts { - export const MarsSwapperBase = { ..._28, ..._29, ..._30, ..._31 } + export const MarsSwapperBase = { ..._32, ..._33, ..._34, ..._35 } } diff --git a/src/types/generated/mars-mock-zapper/MarsMockZapper.client.ts b/src/types/generated/mars-zapper-base/MarsZapperBase.client.ts similarity index 81% rename from src/types/generated/mars-mock-zapper/MarsMockZapper.client.ts rename to src/types/generated/mars-zapper-base/MarsZapperBase.client.ts index 89701c4d..df016e2a 100644 --- a/src/types/generated/mars-mock-zapper/MarsMockZapper.client.ts +++ b/src/types/generated/mars-zapper-base/MarsZapperBase.client.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -9,16 +9,16 @@ import { CosmWasmClient, ExecuteResult, SigningCosmWasmClient } from '@cosmjs/co import { StdFee } from '@cosmjs/amino' import { + Addr, ArrayOfCoin, + CallbackMsg, Coin, ExecuteMsg, InstantiateMsg, - LpConfig, - OracleBaseForString, QueryMsg, Uint128, -} from './MarsMockZapper.types' -export interface MarsMockZapperReadOnlyInterface { +} from './MarsZapperBase.types' +export interface MarsZapperBaseReadOnlyInterface { contractAddress: string estimateProvideLiquidity: ({ coinsIn, @@ -29,7 +29,7 @@ export interface MarsMockZapperReadOnlyInterface { }) => Promise estimateWithdrawLiquidity: ({ coinIn }: { coinIn: Coin }) => Promise } -export class MarsMockZapperQueryClient implements MarsMockZapperReadOnlyInterface { +export class MarsZapperBaseQueryClient implements MarsZapperBaseReadOnlyInterface { client: CosmWasmClient contractAddress: string @@ -62,7 +62,7 @@ export class MarsMockZapperQueryClient implements MarsMockZapperReadOnlyInterfac }) } } -export interface MarsMockZapperInterface extends MarsMockZapperReadOnlyInterface { +export interface MarsZapperBaseInterface extends MarsZapperBaseReadOnlyInterface { contractAddress: string sender: string provideLiquidity: ( @@ -89,10 +89,15 @@ export interface MarsMockZapperInterface extends MarsMockZapperReadOnlyInterface memo?: string, funds?: Coin[], ) => Promise + callback: ( + fee?: number | StdFee | 'auto', + memo?: string, + funds?: Coin[], + ) => Promise } -export class MarsMockZapperClient - extends MarsMockZapperQueryClient - implements MarsMockZapperInterface +export class MarsZapperBaseClient + extends MarsZapperBaseQueryClient + implements MarsZapperBaseInterface { client: SigningCosmWasmClient sender: string @@ -105,6 +110,7 @@ export class MarsMockZapperClient this.contractAddress = contractAddress this.provideLiquidity = this.provideLiquidity.bind(this) this.withdrawLiquidity = this.withdrawLiquidity.bind(this) + this.callback = this.callback.bind(this) } provideLiquidity = async ( @@ -159,4 +165,20 @@ export class MarsMockZapperClient funds, ) } + callback = async ( + fee: number | StdFee | 'auto' = 'auto', + memo?: string, + funds?: Coin[], + ): Promise => { + return await this.client.execute( + this.sender, + this.contractAddress, + { + callback: {}, + }, + fee, + memo, + funds, + ) + } } diff --git a/src/types/generated/mars-mock-zapper/MarsMockZapper.message-composer.ts b/src/types/generated/mars-zapper-base/MarsZapperBase.message-composer.ts similarity index 78% rename from src/types/generated/mars-mock-zapper/MarsMockZapper.message-composer.ts rename to src/types/generated/mars-zapper-base/MarsZapperBase.message-composer.ts index 262093fb..b577993a 100644 --- a/src/types/generated/mars-mock-zapper/MarsMockZapper.message-composer.ts +++ b/src/types/generated/mars-zapper-base/MarsZapperBase.message-composer.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -10,16 +10,16 @@ import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx' import { toUtf8 } from '@cosmjs/encoding' import { + Addr, ArrayOfCoin, + CallbackMsg, Coin, ExecuteMsg, InstantiateMsg, - LpConfig, - OracleBaseForString, QueryMsg, Uint128, -} from './MarsMockZapper.types' -export interface MarsMockZapperMessage { +} from './MarsZapperBase.types' +export interface MarsZapperBaseMessage { contractAddress: string sender: string provideLiquidity: ( @@ -42,8 +42,9 @@ export interface MarsMockZapperMessage { }, funds?: Coin[], ) => MsgExecuteContractEncodeObject + callback: (funds?: Coin[]) => MsgExecuteContractEncodeObject } -export class MarsMockZapperMessageComposer implements MarsMockZapperMessage { +export class MarsZapperBaseMessageComposer implements MarsZapperBaseMessage { sender: string contractAddress: string @@ -52,6 +53,7 @@ export class MarsMockZapperMessageComposer implements MarsMockZapperMessage { this.contractAddress = contractAddress this.provideLiquidity = this.provideLiquidity.bind(this) this.withdrawLiquidity = this.withdrawLiquidity.bind(this) + this.callback = this.callback.bind(this) } provideLiquidity = ( @@ -108,4 +110,19 @@ export class MarsMockZapperMessageComposer implements MarsMockZapperMessage { }), } } + callback = (funds?: Coin[]): MsgExecuteContractEncodeObject => { + return { + typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract', + value: MsgExecuteContract.fromPartial({ + sender: this.sender, + contract: this.contractAddress, + msg: toUtf8( + JSON.stringify({ + callback: {}, + }), + ), + funds, + }), + } + } } diff --git a/src/types/generated/mars-mock-zapper/MarsMockZapper.react-query.ts b/src/types/generated/mars-zapper-base/MarsZapperBase.react-query.ts similarity index 56% rename from src/types/generated/mars-mock-zapper/MarsMockZapper.react-query.ts rename to src/types/generated/mars-zapper-base/MarsZapperBase.react-query.ts index 0d7a0bdb..d4cd28ff 100644 --- a/src/types/generated/mars-mock-zapper/MarsMockZapper.react-query.ts +++ b/src/types/generated/mars-zapper-base/MarsZapperBase.react-query.ts @@ -1,6 +1,6 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ @@ -10,28 +10,28 @@ import { ExecuteResult } from '@cosmjs/cosmwasm-stargate' import { StdFee } from '@cosmjs/amino' import { + Addr, ArrayOfCoin, + CallbackMsg, Coin, ExecuteMsg, InstantiateMsg, - LpConfig, - OracleBaseForString, QueryMsg, Uint128, -} from './MarsMockZapper.types' -import { MarsMockZapperClient, MarsMockZapperQueryClient } from './MarsMockZapper.client' -export const marsMockZapperQueryKeys = { +} from './MarsZapperBase.types' +import { MarsZapperBaseClient, MarsZapperBaseQueryClient } from './MarsZapperBase.client' +export const marsZapperBaseQueryKeys = { contract: [ { - contract: 'marsMockZapper', + contract: 'marsZapperBase', }, ] as const, address: (contractAddress: string | undefined) => - [{ ...marsMockZapperQueryKeys.contract[0], address: contractAddress }] as const, + [{ ...marsZapperBaseQueryKeys.contract[0], address: contractAddress }] as const, estimateProvideLiquidity: (contractAddress: string | undefined, args?: Record) => [ { - ...marsMockZapperQueryKeys.address(contractAddress)[0], + ...marsZapperBaseQueryKeys.address(contractAddress)[0], method: 'estimate_provide_liquidity', args, }, @@ -42,14 +42,14 @@ export const marsMockZapperQueryKeys = { ) => [ { - ...marsMockZapperQueryKeys.address(contractAddress)[0], + ...marsZapperBaseQueryKeys.address(contractAddress)[0], method: 'estimate_withdraw_liquidity', args, }, ] as const, } -export interface MarsMockZapperReactQuery { - client: MarsMockZapperQueryClient | undefined +export interface MarsZapperBaseReactQuery { + client: MarsZapperBaseQueryClient | undefined options?: Omit< UseQueryOptions, "'queryKey' | 'queryFn' | 'initialData'" @@ -57,19 +57,19 @@ export interface MarsMockZapperReactQuery { initialData?: undefined } } -export interface MarsMockZapperEstimateWithdrawLiquidityQuery - extends MarsMockZapperReactQuery { +export interface MarsZapperBaseEstimateWithdrawLiquidityQuery + extends MarsZapperBaseReactQuery { args: { coinIn: Coin } } -export function useMarsMockZapperEstimateWithdrawLiquidityQuery({ +export function useMarsZapperBaseEstimateWithdrawLiquidityQuery({ client, args, options, -}: MarsMockZapperEstimateWithdrawLiquidityQuery) { +}: MarsZapperBaseEstimateWithdrawLiquidityQuery) { return useQuery( - marsMockZapperQueryKeys.estimateWithdrawLiquidity(client?.contractAddress, args), + marsZapperBaseQueryKeys.estimateWithdrawLiquidity(client?.contractAddress, args), () => client ? client.estimateWithdrawLiquidity({ @@ -79,20 +79,20 @@ export function useMarsMockZapperEstimateWithdrawLiquidityQuery - extends MarsMockZapperReactQuery { +export interface MarsZapperBaseEstimateProvideLiquidityQuery + extends MarsZapperBaseReactQuery { args: { coinsIn: Coin[] lpTokenOut: string } } -export function useMarsMockZapperEstimateProvideLiquidityQuery({ +export function useMarsZapperBaseEstimateProvideLiquidityQuery({ client, args, options, -}: MarsMockZapperEstimateProvideLiquidityQuery) { +}: MarsZapperBaseEstimateProvideLiquidityQuery) { return useQuery( - marsMockZapperQueryKeys.estimateProvideLiquidity(client?.contractAddress, args), + marsZapperBaseQueryKeys.estimateProvideLiquidity(client?.contractAddress, args), () => client ? client.estimateProvideLiquidity({ @@ -103,8 +103,27 @@ export function useMarsMockZapperEstimateProvideLiquidityQuery( { ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true) }, ) } -export interface MarsMockZapperWithdrawLiquidityMutation { - client: MarsMockZapperClient +export interface MarsZapperBaseCallbackMutation { + client: MarsZapperBaseClient + args?: { + fee?: number | StdFee | 'auto' + memo?: string + funds?: Coin[] + } +} +export function useMarsZapperBaseCallbackMutation( + options?: Omit< + UseMutationOptions, + 'mutationFn' + >, +) { + return useMutation( + ({ client, msg, args: { fee, memo, funds } = {} }) => client.callback(msg, fee, memo, funds), + options, + ) +} +export interface MarsZapperBaseWithdrawLiquidityMutation { + client: MarsZapperBaseClient msg: { recipient?: string } @@ -114,20 +133,20 @@ export interface MarsMockZapperWithdrawLiquidityMutation { funds?: Coin[] } } -export function useMarsMockZapperWithdrawLiquidityMutation( +export function useMarsZapperBaseWithdrawLiquidityMutation( options?: Omit< - UseMutationOptions, + UseMutationOptions, 'mutationFn' >, ) { - return useMutation( + return useMutation( ({ client, msg, args: { fee, memo, funds } = {} }) => client.withdrawLiquidity(msg, fee, memo, funds), options, ) } -export interface MarsMockZapperProvideLiquidityMutation { - client: MarsMockZapperClient +export interface MarsZapperBaseProvideLiquidityMutation { + client: MarsZapperBaseClient msg: { lpTokenOut: string minimumReceive: Uint128 @@ -139,13 +158,13 @@ export interface MarsMockZapperProvideLiquidityMutation { funds?: Coin[] } } -export function useMarsMockZapperProvideLiquidityMutation( +export function useMarsZapperBaseProvideLiquidityMutation( options?: Omit< - UseMutationOptions, + UseMutationOptions, 'mutationFn' >, ) { - return useMutation( + return useMutation( ({ client, msg, args: { fee, memo, funds } = {} }) => client.provideLiquidity(msg, fee, memo, funds), options, diff --git a/src/types/generated/mars-mock-zapper/MarsMockZapper.types.ts b/src/types/generated/mars-zapper-base/MarsZapperBase.types.ts similarity index 78% rename from src/types/generated/mars-mock-zapper/MarsMockZapper.types.ts rename to src/types/generated/mars-zapper-base/MarsZapperBase.types.ts index 64b08650..478ca253 100644 --- a/src/types/generated/mars-mock-zapper/MarsMockZapper.types.ts +++ b/src/types/generated/mars-zapper-base/MarsZapperBase.types.ts @@ -1,19 +1,11 @@ // @ts-nocheck /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.20.0. + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ -export type OracleBaseForString = string -export interface InstantiateMsg { - lp_configs: LpConfig[] - oracle: OracleBaseForString -} -export interface LpConfig { - lp_pair_denoms: [string, string] - lp_token_denom: string -} +export interface InstantiateMsg {} export type ExecuteMsg = | { provide_liquidity: { @@ -27,7 +19,22 @@ export type ExecuteMsg = recipient?: string | null } } + | { + callback: CallbackMsg + } export type Uint128 = string +export type CallbackMsg = { + return_coin: { + balance_before: Coin + recipient: Addr + } +} +export type Addr = string +export interface Coin { + amount: Uint128 + denom: string + [k: string]: unknown +} export type QueryMsg = | { estimate_provide_liquidity: { @@ -40,9 +47,4 @@ export type QueryMsg = coin_in: Coin } } -export interface Coin { - amount: Uint128 - denom: string - [k: string]: unknown -} export type ArrayOfCoin = Coin[] diff --git a/src/types/generated/mars-zapper-base/bundle.ts b/src/types/generated/mars-zapper-base/bundle.ts new file mode 100644 index 00000000..4dbe416d --- /dev/null +++ b/src/types/generated/mars-zapper-base/bundle.ts @@ -0,0 +1,14 @@ +// @ts-nocheck +/** + * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run the @cosmwasm/ts-codegen generate command to regenerate this file. + */ + +import * as _36 from './MarsZapperBase.types' +import * as _37 from './MarsZapperBase.client' +import * as _38 from './MarsZapperBase.message-composer' +import * as _39 from './MarsZapperBase.react-query' +export namespace contracts { + export const MarsZapperBase = { ..._36, ..._37, ..._38, ..._39 } +} diff --git a/src/types/interfaces/asset.d.ts b/src/types/interfaces/asset.d.ts index cbcfe064..ac44e635 100644 --- a/src/types/interfaces/asset.d.ts +++ b/src/types/interfaces/asset.d.ts @@ -2,12 +2,14 @@ interface Asset { color: string name: string denom: string - symbol: 'OSMO' | 'ATOM' | 'CRO' + symbol: 'OSMO' | 'ATOM' | 'CRO' | 'MARS' | 'JUNO' contract_addr?: string logo: string decimals: number hasOraclePrice: boolean poolId?: number + isEnabled: boolean + isMarket: boolean } interface OtherAsset extends Omit { diff --git a/src/types/interfaces/hooks/useBroadcast.d.ts b/src/types/interfaces/hooks/useBroadcast.d.ts new file mode 100644 index 00000000..1cab7711 --- /dev/null +++ b/src/types/interfaces/hooks/useBroadcast.d.ts @@ -0,0 +1,7 @@ +interface UseBroadcast { + msg: Record + funds?: import('@cosmjs/stargate').Coin[] + contract: string + fee: import('@cosmjs/stargate').StdFee + sender?: string +} diff --git a/src/types/interfaces/hooks/useEstimateFee.d.ts b/src/types/interfaces/hooks/useEstimateFee.d.ts new file mode 100644 index 00000000..fb7cfb95 --- /dev/null +++ b/src/types/interfaces/hooks/useEstimateFee.d.ts @@ -0,0 +1,6 @@ +interface UseEstimateFee { + msg?: Record + funds?: import('@cosmjs/stargate').Coin[] + contract?: string + sender?: string +} diff --git a/src/types/interfaces/networkConfig.d.ts b/src/types/interfaces/networkConfig.d.ts index 83e61c09..250df5b6 100644 --- a/src/types/interfaces/networkConfig.d.ts +++ b/src/types/interfaces/networkConfig.d.ts @@ -19,4 +19,5 @@ interface NetworkConfig { other: OtherAsset[] } appUrl: string + wallets: import('@marsprotocol/wallet-connector').WalletID[] } diff --git a/src/types/interfaces/pageParams.d.ts b/src/types/interfaces/pageParams.d.ts new file mode 100644 index 00000000..d29641ed --- /dev/null +++ b/src/types/interfaces/pageParams.d.ts @@ -0,0 +1,5 @@ +interface PageParams { + wallet: string + account: string + page: string +} diff --git a/src/types/interfaces/route.d.ts b/src/types/interfaces/route.d.ts new file mode 100644 index 00000000..ac7ef883 --- /dev/null +++ b/src/types/interfaces/route.d.ts @@ -0,0 +1 @@ +type RouteSegment = 'trade' | 'borrow' | 'earn' | 'portfolio' | 'council' diff --git a/src/types/query-keys-factory.ts b/src/types/query-keys-factory.ts index e77f9096..60ed3025 100644 --- a/src/types/query-keys-factory.ts +++ b/src/types/query-keys-factory.ts @@ -1,9 +1,11 @@ export const queryKeys = { allBalances: (address: string) => ['allBalances', address], allowedCoins: () => ['allowedCoins'], - redbankBalances: () => ['redbankBalances'], + broadcastMessages: () => ['broadcastMessages'], + estimateFee: () => ['estimateFee'], creditAccounts: (address: string) => ['creditAccounts', address], creditAccountsPositions: (accountId: string) => ['creditAccountPositions', accountId], + redbankBalances: () => ['redbankBalances'], tokenBalance: (address: string, denom: string) => ['tokenBalance', address, denom], tokenPrices: () => ['tokenPrices'], } diff --git a/src/utils/api.ts b/src/utils/api.ts new file mode 100644 index 00000000..232ee776 --- /dev/null +++ b/src/utils/api.ts @@ -0,0 +1,42 @@ +import { Coin } from '@cosmjs/stargate' +import { URL_API } from 'constants/env' +import { BorrowData } from 'pages/api/markets/borrow' + +export async function callAPI(endpoint: string): Promise { + const response = await fetch(`${URL_API}${endpoint}`, { + cache: 'no-store', + }) + + return response.json() as T +} + +export async function getBorrowData() { + return callAPI('/markets/borrow') +} + +export async function getCreditAccounts(address: string) { + return callAPI(`/wallets/${address}/accounts`) +} + +export async function getMarkets() { + return callAPI(`/markets`) +} + +export async function getPrices() { + return callAPI(`/prices`) +} + +export async function getVaults() { + return callAPI(`/vaults`) +} + +export async function getAccountDebts(account: string) { + return callAPI(`/accounts/${account}/debts`) +} + +export async function getAccountDeposits(account: string) { + return callAPI(`/accounts/${account}/deposits`) +} +export async function getWalletBalances(wallet: string) { + return callAPI(`/wallets/${wallet}/balances`) +} diff --git a/src/utils/assets.ts b/src/utils/assets.ts new file mode 100644 index 00000000..524365d6 --- /dev/null +++ b/src/utils/assets.ts @@ -0,0 +1,17 @@ +import { ASSETS } from 'constants/assets' + +export function getAssetByDenom(denom: string) { + return ASSETS.find((asset) => asset.denom === denom) +} + +export function getAssetBySymbol(symbol: string) { + return ASSETS.find((asset) => asset.symbol === symbol) +} + +export function getMarketAssets(): Asset[] { + return ASSETS.filter((asset) => asset.isEnabled && asset.isMarket) +} + +export function getBaseAsset() { + return ASSETS.find((asset) => asset.denom === 'uosmo')! +} diff --git a/src/utils/balances.ts b/src/utils/balances.ts index 50ff59bd..4e814b4d 100644 --- a/src/utils/balances.ts +++ b/src/utils/balances.ts @@ -1,13 +1,13 @@ import { Coin } from '@cosmjs/stargate' -import { getTokenTotalUSDValue, lookup } from './formatters' -import { getTokenSymbol } from './tokens' +import { convertFromGwei, getTokenTotalUSDValue } from 'utils/formatters' +import { getTokenSymbol } from 'utils/tokens' export const formatBalances = ( positionData: Coin[], tokenPrices: KeyValuePair, debt: boolean, - whitelistedAssets: Asset[], + marketAssets: Asset[], marketsData?: MarketData, ): PositionsData[] => { const balances: PositionsData[] = [] @@ -15,16 +15,16 @@ export const formatBalances = ( positionData.forEach((coin) => { const dataEntry: PositionsData = { asset: { - amount: getTokenSymbol(coin.denom, whitelistedAssets), + amount: getTokenSymbol(coin.denom, marketAssets), type: debt ? 'debt' : undefined, }, value: { - amount: getTokenTotalUSDValue(coin.amount, coin.denom, whitelistedAssets, tokenPrices), + amount: getTokenTotalUSDValue(coin.amount, coin.denom, marketAssets, tokenPrices), format: 'number', prefix: '$', }, size: { - amount: lookup(coin.amount, coin.denom, whitelistedAssets), + amount: convertFromGwei(coin.amount, coin.denom, marketAssets), format: 'number', maxDecimals: 4, minDecimals: 0, diff --git a/src/utils/broadcast.ts b/src/utils/broadcast.ts new file mode 100644 index 00000000..5e7e5d10 --- /dev/null +++ b/src/utils/broadcast.ts @@ -0,0 +1,16 @@ +import { TxBroadcastResult } from '@marsprotocol/wallet-connector' + +export function getSingleValueFromBroadcastResult( + response: TxBroadcastResult, + messageType: string, + messageKey: string, +): string | null { + const value = response?.response.events + .filter((msg: Record) => msg.type === messageType) + .map((msg: Record) => msg.attributes) + .flat() + .find((msg: Record) => msg.key === messageKey)?.value + + if (!value) return null + return value +} diff --git a/src/utils/formatters.ts b/src/utils/formatters.ts index 2d9eac5b..4c7d2b65 100644 --- a/src/utils/formatters.ts +++ b/src/utils/formatters.ts @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js' -import { getTokenDecimals } from './tokens' +import { getTokenDecimals } from 'utils/tokens' export function truncate(text = '', [h, t]: [number, number] = [6, 6]): string { const head = text.slice(0, h) @@ -20,21 +20,27 @@ export const formatCurrency = (value: string | number) => { export const getTokenTotalUSDValue = ( amount: string, denom: string, - whitelistedAssets: Asset[], + marketAssets: Asset[], tokenPrices?: KeyValuePair, ) => { if (!tokenPrices) return 0 return ( BigNumber(amount) - .div(10 ** getTokenDecimals(denom, whitelistedAssets)) + .div(10 ** getTokenDecimals(denom, marketAssets)) .toNumber() * tokenPrices[denom] ) } -export const lookup = (amount: string | number, denom: string, whitelistedAssets: Asset[]) => { +export const convertFromGwei = (amount: string | number, denom: string, marketAssets: Asset[]) => { return BigNumber(amount) - .div(10 ** getTokenDecimals(denom, whitelistedAssets)) + .div(10 ** getTokenDecimals(denom, marketAssets)) + .toNumber() +} + +export const convertToGwei = (amount: string | number, denom: string, marketAssets: Asset[]) => { + return BigNumber(amount) + .times(10 ** getTokenDecimals(denom, marketAssets)) .toNumber() } diff --git a/src/utils/query.ts b/src/utils/query.ts new file mode 100644 index 00000000..7a9befb0 --- /dev/null +++ b/src/utils/query.ts @@ -0,0 +1,6 @@ +export function getContractQuery(key: string, contractAddress: string, query: string) { + const contractKey = key.length > 0 ? `${key}: ` : `` + return ` + ${contractKey}contractQuery(contractAddress: "${contractAddress}", query: ${query}) + ` +} diff --git a/src/utils/route.ts b/src/utils/route.ts new file mode 100644 index 00000000..dad1d79f --- /dev/null +++ b/src/utils/route.ts @@ -0,0 +1,60 @@ +export function getRouteParams(url: string | null): PageParams { + const segments = (url || location.href).split('/') + + const params = { + wallet: '', + account: '', + page: '', + } + + segments.forEach((segment, index) => { + if (segment === 'wallets' && segments[index + 1]) { + params.wallet = segments[index + 1] + } else if (segment === 'accounts' && segments[index + 1]) { + params.account = segments[index + 1] + } else if (index === 5) { + params.page = segment + } + }) + + return params +} + +export function getRoute( + url: string, + overrides?: { + wallet?: string + account?: string + page?: RouteSegment + }, +) { + const params = getRouteParams(url) + + let nextUrl = '' + let wallet = '' + let account = '' + let page = '' + + if (params.wallet) wallet = params.wallet + if (overrides?.wallet) wallet = overrides.wallet + + if (params.account) account = params.account + if (overrides?.account) account = overrides.account + + if (params.page) page = params.page + if (overrides?.page) page = overrides.page + + if (wallet) { + nextUrl += `/wallets/${wallet}` + + if (account) { + nextUrl += `/accounts/${account}` + } + } + + if (page) { + nextUrl += `/${page}` + } + + return nextUrl +} diff --git a/src/utils/tokens.ts b/src/utils/tokens.ts index de5fd6b0..55d6631b 100644 --- a/src/utils/tokens.ts +++ b/src/utils/tokens.ts @@ -1,15 +1,13 @@ -import { networkConfig } from 'config/osmo-test-4' +import { getBaseAsset } from 'utils/assets' -export const getTokenSymbol = (denom: string, whitelistedAssets: Asset[]) => - whitelistedAssets.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase())?.symbol || '' +export const getTokenSymbol = (denom: string, marketAssets: Asset[]) => + marketAssets.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase())?.symbol || '' -export const getTokenDecimals = (denom: string, whitelistedAssets: Asset[]) => - whitelistedAssets.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase())?.decimals || - 6 +export const getTokenDecimals = (denom: string, marketAssets: Asset[]) => + marketAssets.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase())?.decimals || 6 -export const getTokenIcon = (denom: string, whitelistedAssets: Asset[]) => - whitelistedAssets.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase())?.logo || '' +export const getTokenIcon = (denom: string, marketAssets: Asset[]) => + marketAssets.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase())?.logo || '' -export const getTokenInfo = (denom: string, whitelistedAssets: Asset[]) => - whitelistedAssets.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase()) || - networkConfig.assets.base +export const getTokenInfo = (denom: string, marketAssets: Asset[]) => + marketAssets.find((asset) => asset.denom.toLowerCase() === denom.toLowerCase()) || getBaseAsset() diff --git a/tailwind.config.js b/tailwind.config.js index 1a3d2e3f..791a9c4c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,7 +2,7 @@ const plugin = require('tailwindcss/plugin') module.exports = { - content: ['./src/pages/**/*.{js,ts,jsx,tsx}', './src//components/**/*.{js,ts,jsx,tsx}'], + content: ['./src/app/**/*.{js,ts,jsx,tsx}', './src/components/**/*.{js,ts,jsx,tsx}'], safelist: [ 'h-15', 'text-3xs', @@ -150,6 +150,7 @@ module.exports = { }, width: { 15: '60px', + 30: '120px', }, }, }, diff --git a/tsconfig.json b/tsconfig.json index 8f916607..b007475d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, @@ -16,8 +20,21 @@ "noEmit": true, "jsx": "preserve", "incremental": true, - "baseUrl": "src" + "baseUrl": "src", + "plugins": [ + { + "name": "next" + } + ] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "src/types/custom.d.ts"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + "src/types/custom.d.ts", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] } diff --git a/yarn.lock b/yarn.lock index 2c55db08..67bbd497 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,6 +10,25 @@ "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" +"@apollo/client@^3.5.8": + version "3.7.8" + resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.7.8.tgz#e1c8dfd02cbbe1baf9b18fa86918904efd9cc580" + integrity sha512-o1NxF4ytET2w9HSVMLwYUEEdv6H3XPpbh9M+ABVGnUVT0s6T9pgqRtYO4pFP1TmeDmb1pbRfVhFwh3gC167j5Q== + dependencies: + "@graphql-typed-document-node/core" "^3.1.1" + "@wry/context" "^0.7.0" + "@wry/equality" "^0.5.0" + "@wry/trie" "^0.3.0" + graphql-tag "^2.12.6" + hoist-non-react-statics "^3.3.2" + optimism "^0.16.1" + prop-types "^15.7.2" + response-iterator "^0.2.6" + symbol-observable "^4.0.0" + ts-invariant "^0.10.3" + tslib "^2.3.0" + zen-observable-ts "^1.2.5" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" @@ -951,7 +970,7 @@ core-js-pure "^3.25.1" regenerator-runtime "^0.13.11" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.13.10", "@babel/runtime@^7.18.9", "@babel/runtime@^7.8.4": +"@babel/runtime@7.20.6", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.13.10", "@babel/runtime@^7.18.9", "@babel/runtime@^7.8.4": version "7.20.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.6.tgz#facf4879bfed9b5326326273a64220f099b0fce3" integrity sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA== @@ -1000,6 +1019,16 @@ "@noble/hashes" "^1.0.0" protobufjs "^6.8.8" +"@cosmjs/amino@0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.27.1.tgz#0910256b5aecd794420bb5f7319d98fc63252fa1" + integrity sha512-w56ar/nK9+qlvWDpBPRmD0Blk2wfkkLqRi1COs1x7Ll1LF0AtkIBUjbRKplENLbNovK0T3h+w8bHiFm+GBGQOA== + dependencies: + "@cosmjs/crypto" "0.27.1" + "@cosmjs/encoding" "0.27.1" + "@cosmjs/math" "0.27.1" + "@cosmjs/utils" "0.27.1" + "@cosmjs/amino@^0.29.4", "@cosmjs/amino@^0.29.5": version "0.29.5" resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.29.5.tgz#053b4739a90b15b9e2b781ccd484faf64bd49aec" @@ -1027,6 +1056,39 @@ long "^4.0.0" pako "^2.0.2" +"@cosmjs/cosmwasm-stargate@^0.29.5": + version "0.29.5" + resolved "https://registry.yarnpkg.com/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.29.5.tgz#3f257da682658833e0f4eb9e8ff758e4d927663a" + integrity sha512-TNdSvm2tEE3XMCuxHxquzls56t40hC8qnLeYJWHsY2ECZmRK3KrnpRReEr7N7bLtODToK7X/riYrV0JaYxjrYA== + dependencies: + "@cosmjs/amino" "^0.29.5" + "@cosmjs/crypto" "^0.29.5" + "@cosmjs/encoding" "^0.29.5" + "@cosmjs/math" "^0.29.5" + "@cosmjs/proto-signing" "^0.29.5" + "@cosmjs/stargate" "^0.29.5" + "@cosmjs/tendermint-rpc" "^0.29.5" + "@cosmjs/utils" "^0.29.5" + cosmjs-types "^0.5.2" + long "^4.0.0" + pako "^2.0.2" + +"@cosmjs/crypto@0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.27.1.tgz#271c853089a3baf3acd6cf0b2122fd49f8815743" + integrity sha512-vbcxwSt99tIYJg8Spp00wc3zx72qx+pY3ozGuBN8gAvySnagK9dQ/jHwtWQWdammmdD6oW+75WfIHZ+gNa+Ybg== + dependencies: + "@cosmjs/encoding" "0.27.1" + "@cosmjs/math" "0.27.1" + "@cosmjs/utils" "0.27.1" + bip39 "^3.0.2" + bn.js "^5.2.0" + elliptic "^6.5.3" + js-sha3 "^0.8.0" + libsodium-wrappers "^0.7.6" + ripemd160 "^2.0.2" + sha.js "^2.4.11" + "@cosmjs/crypto@^0.29.4": version "0.29.4" resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.29.4.tgz#2198e1d2da9eb310df9ed8b8609dbf1a370e900b" @@ -1053,10 +1115,10 @@ elliptic "^6.5.4" libsodium-wrappers "^0.7.6" -"@cosmjs/encoding@^0.20.0": - version "0.20.1" - resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.20.1.tgz#1d1162b3eca51b7244cd45102e313612cea77281" - integrity sha512-aBp153iq2LD4GwDGwodDWZk/eyAUZ8J8bbiqZ1uK8rrylzm9Rdw84aa6JxykezJe+uBPtoI4lx9eH7VQXCGDXw== +"@cosmjs/encoding@0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.27.1.tgz#3cd5bc0af743485eb2578cdb08cfa84c86d610e1" + integrity sha512-rayLsA0ojHeniaRfWWcqSsrE/T1rl1gl0OXVNtXlPwLJifKBeLEefGbOUiAQaT0wgJ8VNGBazVtAZBpJidfDhw== dependencies: base64-js "^1.3.0" bech32 "^1.1.4" @@ -1079,12 +1141,25 @@ "@cosmjs/stream" "^0.29.5" xstream "^11.14.0" -"@cosmjs/math@^0.20.0": - version "0.20.1" - resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.20.1.tgz#c3c2be821b8b5dbbb9b2c0401bd9f1472e821f2a" - integrity sha512-xt7BmpSw2OVGM2+JhlJvKv9OJs9+3DqgVL6+byUDC355CSISrZhFjJg9GFko1EFssDXz5YgvBZR5FkifC0xazw== +"@cosmjs/launchpad@^0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/launchpad/-/launchpad-0.27.1.tgz#b6f1995748be96560f5f01e84d3ff907477dda77" + integrity sha512-DcFwGD/z5PK8CzO2sojDxa+Be9EIEtRZb2YawgVnw2Ht/p5FlNv+OVo8qlishpBdalXEN7FvQ1dVeDFEe9TuJw== dependencies: - bn.js "^4.11.8" + "@cosmjs/amino" "0.27.1" + "@cosmjs/crypto" "0.27.1" + "@cosmjs/encoding" "0.27.1" + "@cosmjs/math" "0.27.1" + "@cosmjs/utils" "0.27.1" + axios "^0.21.2" + fast-deep-equal "^3.1.3" + +"@cosmjs/math@0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.27.1.tgz#be78857b008ffc6b1ed6fecaa1c4cd5bc38c07d7" + integrity sha512-cHWVjmfIjtRc7f80n7x+J5k8pe+vTVTQ0lA82tIxUgqUvgS6rogPP/TmGtTiZ4+NxWxd11DUISY6gVpr18/VNQ== + dependencies: + bn.js "^5.2.0" "@cosmjs/math@^0.29.4", "@cosmjs/math@^0.29.5": version "0.29.5" @@ -1157,16 +1232,51 @@ readonly-date "^1.0.0" xstream "^11.14.0" -"@cosmjs/utils@^0.20.0": - version "0.20.1" - resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.20.1.tgz#4d239b7d93c15523cdf109f225cbf61326fb69cd" - integrity sha512-xl9YnIrAAaBd6nFffwFbyrnKjqjD9zKGP8OBKxzyglxamHfqAS+PcJPEiaEpt+oUt7HAIOyhL3KK75Dh52hGvA== +"@cosmjs/utils@0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.27.1.tgz#1c8efde17256346ef142a3bd15158ee4055470e2" + integrity sha512-VG7QPDiMUzVPxRdJahDV8PXxVdnuAHiIuG56hldV4yPnOz/si/DLNd7VAUUA5923b6jS1Hhev0Hr6AhEkcxBMg== "@cosmjs/utils@^0.29.4", "@cosmjs/utils@^0.29.5": version "0.29.5" resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.29.5.tgz#3fed1b3528ae8c5f1eb5d29b68755bebfd3294ee" integrity sha512-m7h+RXDUxOzEOGt4P+3OVPX7PuakZT3GBmaM/Y2u+abN3xZkziykD/NvedYFvvCCdQo714XcGl33bwifS9FZPQ== +"@delphi-labs/shuttle@^2.3.9": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@delphi-labs/shuttle/-/shuttle-2.5.0.tgz#b30b3a9bd667478a6bad6075d73bae3b765ecc08" + integrity sha512-185ZJ/uYRbx2SUSs1h40/W4HXc7RTrRw+m4Vklb/+zM5pYdLi2JhtXLl3Xy9fFZzU/EtaUdNretRwjsH+LtXdA== + dependencies: + "@cosmjs/amino" "^0.29.5" + "@cosmjs/cosmwasm-stargate" "^0.29.5" + "@cosmjs/encoding" "^0.29.5" + "@cosmjs/launchpad" "^0.27.1" + "@cosmjs/proto-signing" "^0.29.5" + "@cosmjs/stargate" "^0.29.5" + "@injectivelabs/sdk-ts" "^1.0.360" + "@injectivelabs/ts-types" "^1.0.28" + "@injectivelabs/utils" "^1.0.60" + "@keplr-wallet/cosmos" "^0.11.38" + "@keplr-wallet/proto-types" "^0.11.38" + "@metamask/eth-sig-util" "^5.0.2" + "@walletconnect/client" "^1.8.0" + "@walletconnect/core" "^1.8.0" + "@walletconnect/iso-crypto" "^1.8.0" + "@walletconnect/utils" "^1.8.0" + cosmjs-types "^0.6.1" + ethereumjs-util "^7.1.5" + isomorphic-ws "^5.0.0" + secp256k1 "^5.0.0" + tslib "^2.4.0" + use-local-storage-state "^18.1.2" + ws "^8.12.0" + zustand "^4.3.1" + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + "@eslint/eslintrc@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.0.tgz#8ec64e0df3e7a1971ee1ff5158da87389f167a63" @@ -1182,7 +1292,37 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@ethersproject/abi@^5.5.0": +"@ethereumjs/common@^2.6.4": + version "2.6.5" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" + integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.5" + +"@ethereumjs/rlp@^4.0.0-beta.2": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.0.tgz#66719891bd727251a7f233f9ca80212d1994f8c8" + integrity sha512-LM4jS5n33bJN60fM5EC8VeyhUgga6/DjCPBV2vWjnfVtobqtOiNC4SQ1MRFqyBSmJGGdB533JZWewyvlcdJtkQ== + +"@ethereumjs/tx@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.2.tgz#197b9b6299582ad84f9527ca961466fce2296c1c" + integrity sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw== + dependencies: + "@ethereumjs/common" "^2.6.4" + ethereumjs-util "^7.1.5" + +"@ethereumjs/util@^8.0.0": + version "8.0.3" + resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.0.3.tgz#410c2dc8c6d519b29f1a471aa9b9df9952e41239" + integrity sha512-0apCbwc8xAaie6W7q6QyogfyRS2BMU816a8KwpnpRw9Qrc6Bws+l7J3LfCLMt2iL6Wi8CYb0B29AeIr2N4vHnw== + dependencies: + "@ethereumjs/rlp" "^4.0.0-beta.2" + async "^3.2.4" + ethereum-cryptography "^1.1.2" + +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== @@ -1197,7 +1337,7 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/abstract-provider@^5.7.0": +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== @@ -1210,7 +1350,7 @@ "@ethersproject/transactions" "^5.7.0" "@ethersproject/web" "^5.7.0" -"@ethersproject/abstract-signer@^5.7.0": +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== @@ -1221,7 +1361,7 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/address@^5.6.0", "@ethersproject/address@^5.7.0": +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.6.0", "@ethersproject/address@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== @@ -1232,14 +1372,14 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/rlp" "^5.7.0" -"@ethersproject/base64@^5.7.0": +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== dependencies: "@ethersproject/bytes" "^5.7.0" -"@ethersproject/basex@^5.7.0": +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== @@ -1247,7 +1387,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/bignumber@^5.7.0": +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== @@ -1256,21 +1396,37 @@ "@ethersproject/logger" "^5.7.0" bn.js "^5.2.1" -"@ethersproject/bytes@^5.7.0": +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/constants@^5.7.0": +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== dependencies: "@ethersproject/bignumber" "^5.7.0" -"@ethersproject/hash@^5.7.0": +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== @@ -1285,7 +1441,7 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/hdnode@^5.7.0": +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== @@ -1303,7 +1459,7 @@ "@ethersproject/transactions" "^5.7.0" "@ethersproject/wordlists" "^5.7.0" -"@ethersproject/json-wallets@^5.7.0": +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== @@ -1322,7 +1478,7 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@^5.5.0", "@ethersproject/keccak256@^5.7.0": +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.5.0", "@ethersproject/keccak256@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== @@ -1330,19 +1486,19 @@ "@ethersproject/bytes" "^5.7.0" js-sha3 "0.8.0" -"@ethersproject/logger@^5.7.0": +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== -"@ethersproject/networks@^5.7.0": +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": version "5.7.1" resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/pbkdf2@^5.7.0": +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== @@ -1350,14 +1506,40 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/sha2" "^5.7.0" -"@ethersproject/properties@^5.7.0": +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/random@^5.7.0": +"@ethersproject/providers@5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== @@ -1365,7 +1547,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/rlp@^5.5.0", "@ethersproject/rlp@^5.7.0": +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== @@ -1373,7 +1555,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/sha2@^5.7.0": +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== @@ -1382,7 +1564,7 @@ "@ethersproject/logger" "^5.7.0" hash.js "1.1.7" -"@ethersproject/signing-key@^5.7.0": +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== @@ -1394,7 +1576,19 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/strings@^5.7.0": +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== @@ -1403,7 +1597,7 @@ "@ethersproject/constants" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/transactions@^5.7.0": +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== @@ -1418,7 +1612,16 @@ "@ethersproject/rlp" "^5.7.0" "@ethersproject/signing-key" "^5.7.0" -"@ethersproject/wallet@^5.7.0": +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== @@ -1439,7 +1642,7 @@ "@ethersproject/transactions" "^5.7.0" "@ethersproject/wordlists" "^5.7.0" -"@ethersproject/web@^5.7.0": +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": version "5.7.1" resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== @@ -1450,7 +1653,7 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/wordlists@^5.7.0": +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== @@ -1466,18 +1669,6 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052" integrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg== -"@hapi/hoek@^9.0.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" - integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== - -"@hapi/topo@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" - integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== - dependencies: - "@hapi/hoek" "^9.0.0" - "@headlessui/react@^1.7.0": version "1.7.4" resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.7.4.tgz#ba7f50fda20667276ee84fcd4c2a459aa26187e3" @@ -1504,47 +1695,164 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@iov/crypto@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@iov/crypto/-/crypto-2.1.0.tgz#10e91b6692e154958c11626dfd096a80e8a481a4" - integrity sha512-jnb4XuK50admolm7fBxOcxfAW2TO+wYrZlhDWiMETItY/Y5gNNa1zaDSO2wNIjjfGng+8nQ1yqnNhqy7busV2Q== - dependencies: - "@iov/encoding" "^2.1.0" - bip39 "^3.0.2" - bn.js "^4.11.8" - elliptic "^6.4.0" - js-sha3 "^0.8.0" - libsodium-wrappers "^0.7.6" - pbkdf2 "^3.0.16" - ripemd160 "^2.0.2" - sha.js "^2.4.11" - type-tagger "^1.0.0" - unorm "^1.5.0" +"@improbable-eng/grpc-web-node-http-transport@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web-node-http-transport/-/grpc-web-node-http-transport-0.15.0.tgz#5a064472ef43489cbd075a91fb831c2abeb09d68" + integrity sha512-HLgJfVolGGpjc9DWPhmMmXJx8YGzkek7jcCFO1YYkSOoO81MWRZentPOd/JiKiZuU08wtc4BG+WNuGzsQB5jZA== -"@iov/encoding@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@iov/encoding/-/encoding-2.1.0.tgz#434203c39874c68bc1d96e1278251f0feb23be07" - integrity sha512-5IOdLO7Xg/uRykuiCqeMYghQ3IjWDtGxv7NTWXkgpHuna0aewx43mRpT2NPCpOZd1tpuorDtQ7/zbDNRaIIF/w== - dependencies: - base64-js "^1.3.0" - bech32 "^1.1.3" - bn.js "^4.11.8" - readonly-date "^1.0.0" +"@improbable-eng/grpc-web-react-native-transport@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web-react-native-transport/-/grpc-web-react-native-transport-0.15.0.tgz#f630b9022f6ba2bb0258b0b040cca746084c8bc6" + integrity sha512-Xk+abATz3eacJ0gA5sRYpyMCA+z/37ht4u6AsbtfcE3SXLYIPbTQ2iLQYyELAoyUWgAyEQxZ3iTs6OpR4z06FQ== -"@iov/encoding@^2.1.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@iov/encoding/-/encoding-2.5.0.tgz#9612e529f45e63633b2375c13db28b9330ce6293" - integrity sha512-HGHLlQEvD23rFjW5PQrxD2B/6LiBHVSxqX6gjOz9KfcmIMIftRA0qROrTITfjjjUr/yZZEeNk4qjuBls9TaYcA== +"@improbable-eng/grpc-web@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web/-/grpc-web-0.13.0.tgz#289e6fc4dafc00b1af8e2b93b970e6892299014d" + integrity sha512-vaxxT+Qwb7GPqDQrBV4vAAfH0HywgOLw6xGIKXd9Q8hcV63CQhmS3p4+pZ9/wVvt4Ph3ZDK9fdC983b9aGMUFg== dependencies: - "@cosmjs/encoding" "^0.20.0" - "@cosmjs/math" "^0.20.0" - "@cosmjs/utils" "^0.20.0" - readonly-date "^1.0.0" + browser-headers "^0.4.0" -"@iov/utils@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@iov/utils/-/utils-2.0.2.tgz#3527f376d26100e07ac823bf87bebd0f24680d1c" - integrity sha512-4D8MEvTcFc/DVy5q25vHxRItmgJyeX85dixMH+MxdKr+yy71h3sYk+sVBEIn70uqGP7VqAJkGOPNFs08/XYELw== +"@improbable-eng/grpc-web@^0.14.0": + version "0.14.1" + resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz#f4662f64dc89c0f956a94bb8a3b576556c74589c" + integrity sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw== + dependencies: + browser-headers "^0.4.1" + +"@improbable-eng/grpc-web@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz#3e47e9fdd90381a74abd4b7d26e67422a2a04bef" + integrity sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg== + dependencies: + browser-headers "^0.4.1" + +"@injectivelabs/chain-api@1.9.6": + version "1.9.6" + resolved "https://registry.yarnpkg.com/@injectivelabs/chain-api/-/chain-api-1.9.6.tgz#30693275c6131ea822b7f4c60bfc582e76573a7f" + integrity sha512-Z17SsI816TEDiRLiswUZE+8n/nCUTyat9WPxsaccB7mmsjFtC7jVzVBgLKE3pTIsON1CkJhhWAO3ApHddyCWlg== + dependencies: + "@improbable-eng/grpc-web" "^0.13.0" + google-protobuf "^3.13.0" + +"@injectivelabs/exceptions@^1.0.55": + version "1.0.55" + resolved "https://registry.yarnpkg.com/@injectivelabs/exceptions/-/exceptions-1.0.55.tgz#9f39b53c9fd94e00822f2a06920350ee6a5b4eb9" + integrity sha512-v0qpNVqK4lb5x3kQqAUKK/Fanctwu3HTwxUzothC1AXVurJObuSeHKAaJtCReeSj0xq3hpO9ijDiRf+0YQQF9Q== + dependencies: + "@improbable-eng/grpc-web" "^0.15.0" + "@injectivelabs/ts-types" "^1.0.29" + http-status-codes "^2.2.0" + link-module-alias "^1.2.0" + shx "^0.3.2" + +"@injectivelabs/indexer-api@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@injectivelabs/indexer-api/-/indexer-api-1.9.3.tgz#dfd87c8b776c4206f38a11732718680abc605ba9" + integrity sha512-JNZ7Ga0TznbKDSKbTAKrHI/EAhkBF0mZQm6wOlVUNJUXQvk9npPaOZA69c9m96p1c++G3yrLgnoXylonSTWw0Q== + dependencies: + "@improbable-eng/grpc-web" "^0.14.0" + google-protobuf "^3.14.0" + +"@injectivelabs/networks@^1.0.91": + version "1.0.91" + resolved "https://registry.yarnpkg.com/@injectivelabs/networks/-/networks-1.0.91.tgz#7720310cbf4807d890af32f30d58fec5769b4cca" + integrity sha512-EJ6wmNCeigMSDpUoQaoYVRNZA/oy3x+uezQOeY6ZIT1Jx7U8a6LZJjpMjphQMLYeO01V6ub1W6u/wbEFYzL10Q== + dependencies: + "@injectivelabs/exceptions" "^1.0.55" + "@injectivelabs/ts-types" "^1.0.29" + "@injectivelabs/utils" "^1.0.79" + link-module-alias "^1.2.0" + shx "^0.3.2" + +"@injectivelabs/ninja-api@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@injectivelabs/ninja-api/-/ninja-api-1.0.11.tgz#71d4aacfc2fbef30e05abae2fca441bb2f60dde5" + integrity sha512-idNPJMTBgTgfq7epsuOKCjoNTCqRWsGzZvt88H81UjrrsRZpLwpnfCHNc/aTE6VR19RZ27gk9CwI9vH/j4kq9w== + dependencies: + "@improbable-eng/grpc-web" "^0.14.0" + google-protobuf "^3.14.0" + +"@injectivelabs/sdk-ts@^1.0.360": + version "1.0.446" + resolved "https://registry.yarnpkg.com/@injectivelabs/sdk-ts/-/sdk-ts-1.0.446.tgz#20c6a4eb06d3b6720aebe2d1e7a46ec984a8407e" + integrity sha512-NfSDyQ1ypVB581gMkV/VsBQOAM89/HxiYwMBAeMKbxGtHnH1kyhX4KWe1vs42eEyNXGi4qVEh33PBtr7E7CICQ== + dependencies: + "@apollo/client" "^3.5.8" + "@cosmjs/amino" "^0.29.5" + "@cosmjs/proto-signing" "^0.29.5" + "@cosmjs/stargate" "^0.29.5" + "@cosmjs/tendermint-rpc" "^0.29.5" + "@ethersproject/bytes" "^5.7.0" + "@improbable-eng/grpc-web" "^0.15.0" + "@improbable-eng/grpc-web-node-http-transport" "^0.15.0" + "@improbable-eng/grpc-web-react-native-transport" "^0.15.0" + "@injectivelabs/chain-api" "1.9.6" + "@injectivelabs/exceptions" "^1.0.55" + "@injectivelabs/indexer-api" "1.9.3" + "@injectivelabs/networks" "^1.0.91" + "@injectivelabs/ninja-api" "^1.0.11" + "@injectivelabs/token-metadata" "^1.0.167" + "@injectivelabs/ts-types" "^1.0.29" + "@injectivelabs/utils" "^1.0.79" + "@metamask/eth-sig-util" "^4.0.0" + "@types/google-protobuf" "^3.15.5" + axios "^0.27.2" + bech32 "^2.0.0" + bip39 "^3.0.4" + eth-crypto "^2.3.0" + ethereumjs-abi "^0.6.8" + ethereumjs-util "^7.1.4" + ethers "^5.6.4" + ethjs-util "^0.1.6" + google-protobuf "^3.21.0" + graphql "^16.3.0" + http-status-codes "^2.2.0" + jscrypto "^1.0.3" + keccak256 "^1.0.6" + link-module-alias "^1.2.0" + secp256k1 "^4.0.3" + shx "^0.3.2" + snakecase-keys "^5.4.1" + +"@injectivelabs/token-metadata@^1.0.167": + version "1.0.167" + resolved "https://registry.yarnpkg.com/@injectivelabs/token-metadata/-/token-metadata-1.0.167.tgz#daaf4b87b41adf0aa058635674b57eb2d435f0e4" + integrity sha512-W21zZO5iOSkln8NYRIM2WImrk/BmLJRjbgHw88xXAk+7Mqsec3hWZt+U05Kekotjw0UpiCSEA/xHabB2xQx2dQ== + dependencies: + "@injectivelabs/exceptions" "^1.0.55" + "@injectivelabs/networks" "^1.0.91" + "@injectivelabs/ts-types" "^1.0.29" + "@injectivelabs/utils" "^1.0.79" + "@types/lodash.values" "^4.3.6" + copyfiles "^2.4.1" + jsonschema "^1.4.0" + link-module-alias "^1.2.0" + lodash "^4.17.21" + lodash.values "^4.3.0" + shx "^0.3.2" + +"@injectivelabs/ts-types@^1.0.28", "@injectivelabs/ts-types@^1.0.29": + version "1.0.29" + resolved "https://registry.yarnpkg.com/@injectivelabs/ts-types/-/ts-types-1.0.29.tgz#c73b3e2f3cacb45fe483a957fefd788fe9922e8c" + integrity sha512-6pfh/KqBA/rFLzBI+hzahj74WnEsqfyOjUSkrRmWLpw7/mIDVGDCVqi9Zbb+2oLrhNafgYFslH4LTOml2s7BEg== + dependencies: + link-module-alias "^1.2.0" + shx "^0.3.2" + +"@injectivelabs/utils@^1.0.60", "@injectivelabs/utils@^1.0.79": + version "1.0.79" + resolved "https://registry.yarnpkg.com/@injectivelabs/utils/-/utils-1.0.79.tgz#801e07b992e45da008555eadaf0657a2d10fdfbf" + integrity sha512-lYF0Kwv3JUVMryeihGMfzPpzdCXwTBIfR+NkFzBLLAAU79S5IHpsGZAtM5gBRG+10m5ddSy5Lw1rdvHg4ZdUyw== + dependencies: + "@injectivelabs/exceptions" "^1.0.55" + "@injectivelabs/ts-types" "^1.0.29" + axios "^0.21.1" + bignumber.js "^9.0.1" + http-status-codes "^2.2.0" + link-module-alias "^1.2.0" + shx "^0.3.2" + snakecase-keys "^5.1.2" + store2 "^2.12.0" "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" @@ -1554,7 +1862,7 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/gen-mapping@^0.3.2": +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== @@ -1573,12 +1881,20 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/source-map@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" + integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.14" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.14", "@jridgewell/trace-mapping@^0.3.9": version "0.3.17" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== @@ -1586,83 +1902,36 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@keplr-wallet/background@0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/background/-/background-0.11.21.tgz#b607f46f87abb56b98c0707c7fe08029ef08ce95" - integrity sha512-DT9vb7aBxiUOfN3+IXXApRckiwK853MbR7N6BUbeG+jAQplxOXZ5hSgWWvlE1zTEjOvcYV/nkNYMOPKU4rGatA== +"@keplr-wallet/common@0.11.41": + version "0.11.41" + resolved "https://registry.yarnpkg.com/@keplr-wallet/common/-/common-0.11.41.tgz#431d03c265410d5ac8c20a34f80aa3a451699f62" + integrity sha512-uGhYtscZIGVp0IerAu6eBn0BKi+NVlZNfdoCrt/eNwNeOa6zCd3uv6aPwAv/0hYm7tXhKA3USnRJr4oLMKTq1Q== dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wallet" "^5.7.0" - "@keplr-wallet/chain-validator" "0.11.21" - "@keplr-wallet/common" "0.11.21" - "@keplr-wallet/cosmos" "0.11.21" - "@keplr-wallet/crypto" "0.11.21" - "@keplr-wallet/popup" "0.11.21" - "@keplr-wallet/proto-types" "0.11.21" - "@keplr-wallet/router" "0.11.21" - "@keplr-wallet/types" "0.11.21" - "@keplr-wallet/unit" "0.11.21" - "@ledgerhq/hw-app-eth" "^6.29.3" - "@ledgerhq/hw-transport" "^6.20.0" - "@ledgerhq/hw-transport-webhid" "^6.20.0" - "@ledgerhq/hw-transport-webusb" "^6.20.0" - aes-js "^3.1.2" - axios "^0.27.2" - big-integer "^1.6.48" - bip39 "^3.0.2" - buffer "^6.0.3" - delay "^4.4.0" - joi "^17.5.0" - ledger-cosmos-js "^2.1.8" - long "^4.0.0" - pbkdf2 "^3.1.2" - secp256k1 "^4.0.2" - secretjs "0.17.7" - utility-types "^3.10.0" - -"@keplr-wallet/chain-validator@0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/chain-validator/-/chain-validator-0.11.21.tgz#367d185aeb74b1427992c0dfbbacb9c31fdc42b7" - integrity sha512-1AK6ZmG75wNT7PYPFLSzpDjcImY6ez+WW/EWCGXEV2+r3uPrC0kpiVS4/q4X7LrCeiAn2jOHTzWQNp4tZJ+mtA== - dependencies: - "@keplr-wallet/cosmos" "0.11.21" - "@keplr-wallet/types" "0.11.21" - axios "^0.27.2" - joi "^17.5.0" - utility-types "^3.10.0" - -"@keplr-wallet/common@0.11.21", "@keplr-wallet/common@^0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/common/-/common-0.11.21.tgz#a5a08f033a4a3402285b397f56d9c8b8aa910c9a" - integrity sha512-uu9U+U92knHe3sJzngk/iSVzTQddF2F5ipj0D4pd/YrL8VJpTe4vYzBAGDCoBaWdlBRcWHzEOeh9eh3/Eh/Iuw== - dependencies: - "@keplr-wallet/crypto" "0.11.21" + "@keplr-wallet/crypto" "0.11.41" buffer "^6.0.3" delay "^4.4.0" -"@keplr-wallet/cosmos@0.11.21", "@keplr-wallet/cosmos@^0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/cosmos/-/cosmos-0.11.21.tgz#44eb32113607f08ff627a661d4c6ef59e399a2bb" - integrity sha512-4cF2A2MnCbgEIy6eR+PlWlFJbuY6HHabtQknAad1aWiIWaQN37rteHiGHZ+lhI4GIxXUuvlNuABdP94zaLaOrA== +"@keplr-wallet/cosmos@^0.11.38": + version "0.11.41" + resolved "https://registry.yarnpkg.com/@keplr-wallet/cosmos/-/cosmos-0.11.41.tgz#a327d67d4128670c3f84c931f499bc9f21a3361e" + integrity sha512-/rS3hvJXOVNYZ/2EBJjSBctZcDqYQj1L9e851+DRR2dw3e989lAgUUOzKqCFYWgNRuWgLTK49XW+MQNnwBB0ag== dependencies: "@ethersproject/address" "^5.6.0" - "@keplr-wallet/common" "0.11.21" - "@keplr-wallet/crypto" "0.11.21" - "@keplr-wallet/proto-types" "0.11.21" - "@keplr-wallet/types" "0.11.21" - "@keplr-wallet/unit" "0.11.21" + "@keplr-wallet/common" "0.11.41" + "@keplr-wallet/crypto" "0.11.41" + "@keplr-wallet/proto-types" "0.11.41" + "@keplr-wallet/types" "0.11.41" + "@keplr-wallet/unit" "0.11.41" axios "^0.27.2" bech32 "^1.1.4" buffer "^6.0.3" long "^4.0.0" protobufjs "^6.11.2" -"@keplr-wallet/crypto@0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/crypto/-/crypto-0.11.21.tgz#c3bb293aefa05ec6d0e9cf1cd5e327ea34a66942" - integrity sha512-pthSy8tf+tk4ANaKwpP5zPlGUpJz82Rx7bQQnWpFsgYVy0fOmr519PCoOLmyW+HaE5WBQedZ2Giv4MAQyLXjgA== +"@keplr-wallet/crypto@0.11.41": + version "0.11.41" + resolved "https://registry.yarnpkg.com/@keplr-wallet/crypto/-/crypto-0.11.41.tgz#9e385a20c1af49f1f73978b6480a2ef0c8cac073" + integrity sha512-9H3Rm8OXrHy2Tc2YIoqhZa7PpEaXhOfUDCNM3r2p3ol/5G90r/WmvENqodciWs7t0/PJEvu54KFFT1N3Czy9Cg== dependencies: "@ethersproject/keccak256" "^5.5.0" bip32 "^2.0.6" @@ -1673,291 +1942,164 @@ elliptic "^6.5.3" sha.js "^2.4.11" -"@keplr-wallet/popup@0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/popup/-/popup-0.11.21.tgz#e8926f54eb7a622be878eb873ad891d0722137fe" - integrity sha512-Y7TuAiXTKo1ypqin0ItTKw6pRBGMorXK+JZthj3gx1a2a0AClHYRI1AQ7tnetPtNq76F2rhhJDchMALZcy7g/w== - -"@keplr-wallet/proto-types@0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/proto-types/-/proto-types-0.11.21.tgz#c674b965ffe181ae366b238d9bdd4d2dd123d186" - integrity sha512-gSh3dQqdAkahnN8hD1Cb7AtUmAgGSszwIeBHxtIpwKRfc1sTwxnROWDHm/SKqxV/RfRN8apFW6EUXvREFfUdjA== +"@keplr-wallet/proto-types@0.11.41", "@keplr-wallet/proto-types@^0.11.38": + version "0.11.41" + resolved "https://registry.yarnpkg.com/@keplr-wallet/proto-types/-/proto-types-0.11.41.tgz#a9589acf2f5b012e985cc398f469a4dbf1193c55" + integrity sha512-Caewn0rHdBsZ0HrHU4c0P3VrIuLima0J8NhjVI/foD3B5GxMZpF6Prq6s3JtIPPW0uZuespPRNx7HWuI6+kC1w== dependencies: long "^4.0.0" protobufjs "^6.11.2" -"@keplr-wallet/provider@^0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/provider/-/provider-0.11.21.tgz#80fe0bbc4d2d70997938a0d17ca3c50ae2ad7680" - integrity sha512-DzrIJExGi24d3DYELanZvrnpcJXp5SRNRhl4OHZhoN1jBg8mQXh3GmLEfnThObdmBb813YpsJdm6DENUQLw8kg== - dependencies: - "@keplr-wallet/router" "0.11.21" - "@keplr-wallet/types" "0.11.21" - buffer "^6.0.3" - deepmerge "^4.2.2" - long "^4.0.0" - secretjs "0.17.7" - -"@keplr-wallet/router@0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/router/-/router-0.11.21.tgz#d82971ac3f427ef82e00d5fc29807da84d20f9cb" - integrity sha512-f9c2mj5IwcWvZCzxWgFyDb2XBgOUVq512hPwDR7pLrBVG5JuV0MrtofpMqAY0WGlGazJtm7guiY0NWfBRaYnrQ== - -"@keplr-wallet/stores@^0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/stores/-/stores-0.11.21.tgz#93adcb096aaf2e1736848193d8a6848bcbe42bd5" - integrity sha512-wV+gpyjvZ3BtJiaiOCxknPsQ7P/IKP7RZNSKGb6WIEoQoWiw4icMVl7/yXt1pbo6oEQH63Kihzuc4hI3PCU1Wg== - dependencies: - "@keplr-wallet/background" "0.11.21" - "@keplr-wallet/common" "0.11.21" - "@keplr-wallet/cosmos" "0.11.21" - "@keplr-wallet/crypto" "0.11.21" - "@keplr-wallet/proto-types" "0.11.21" - "@keplr-wallet/router" "0.11.21" - "@keplr-wallet/types" "0.11.21" - "@keplr-wallet/unit" "0.11.21" - axios "^0.27.2" - buffer "^6.0.3" - deepmerge "^4.2.2" - eventemitter3 "^4.0.7" - mobx "^6.1.7" - mobx-utils "^6.0.3" - p-queue "^6.6.2" - utility-types "^3.10.0" - -"@keplr-wallet/types@0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.11.21.tgz#42527d05d39178f469a619f01df1f539844d8d97" - integrity sha512-oSv8SBBxTQz3hahOWVZmrb3ll0kXVuiUfqnM9q6aWGNOqSiXg8etKQd5c6hSFEYX8iuaAsHa48/NZA0cn+TAgA== +"@keplr-wallet/types@0.11.41": + version "0.11.41" + resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.11.41.tgz#eb92325b346143f8db17035ce7d72accd80e335a" + integrity sha512-Zu69Iutu3Q/tUKizeHZSkvkfluBFQJxYyrQgytOi3iIMEAfIG5HS4dfJVXnXGVE2TjPvLX2sEFWCOlodMOAqbg== dependencies: axios "^0.27.2" long "^4.0.0" - secretjs "0.17.7" -"@keplr-wallet/unit@0.11.21": - version "0.11.21" - resolved "https://registry.yarnpkg.com/@keplr-wallet/unit/-/unit-0.11.21.tgz#845ae7df30e5f069c53b6de3889329611bcbdd70" - integrity sha512-YGqLLXjVSFDBXBTuZ4ETYy0HG5nXlB+Zrw4b/eso2MGQa9O+yc14TyP6xu3ni/XlWeMVhsPAydbmNqI52Ew9sQ== +"@keplr-wallet/unit@0.11.41": + version "0.11.41" + resolved "https://registry.yarnpkg.com/@keplr-wallet/unit/-/unit-0.11.41.tgz#6afa8622d7b1e5a62af48ee013032c877623a290" + integrity sha512-IVPeRF/+HQMwYMKDQCbh/SSN/jowbhMrPlQH/rHnKULM3TpVEmPkz/ldBniEQApKXIhMKnrpvb4Zt9j40qT6gA== dependencies: - "@keplr-wallet/types" "0.11.21" + "@keplr-wallet/types" "0.11.41" big-integer "^1.6.48" utility-types "^3.10.0" -"@ledgerhq/cryptoassets@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/cryptoassets/-/cryptoassets-7.0.0.tgz#9f700ef022e65c25b73377ac2513cd012e6aebfb" - integrity sha512-mjx5rcmYtZdgHGQlSy8KVKGUNWwmdFeFWDkyBluvXX9/lruuAXrUMai2eAz4EaZ2S48bPpxWpLKloEA1KEo4Yw== +"@marsprotocol/wallet-connector@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@marsprotocol/wallet-connector/-/wallet-connector-1.4.2.tgz#9dfeaf82242e821d2beef276c23e7f60313ae079" + integrity sha512-rHVCbKHvAXHzmU5tZo9mV81Y4WclY6oDtO35nQqlh4X+DtIF/8j71hJRXCpGF+IuN1xwp3I8hcKAIqb08KOa5w== dependencies: - invariant "2" + "@cosmjs/cosmwasm-stargate" "^0.29.5" + "@cosmjs/encoding" "^0.29.5" + "@cosmjs/stargate" "^0.29.5" + "@delphi-labs/shuttle" "^2.3.9" + "@keplr-wallet/cosmos" "^0.11.38" + axios "^1.3.2" + react-device-detect "^2.2.3" + react-modal "^3.16.1" + react-qr-code "^2.0.11" + webpack "^5.75.0" + webpack-cli "^5.0.1" + webpack-node-externals "^3.0.0" -"@ledgerhq/devices@^5.51.1": - version "5.51.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.51.1.tgz#d741a4a5d8f17c2f9d282fd27147e6fe1999edb7" - integrity sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA== +"@metamask/eth-sig-util@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" + integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== dependencies: - "@ledgerhq/errors" "^5.50.0" - "@ledgerhq/logs" "^5.50.0" - rxjs "6" - semver "^7.3.5" + ethereumjs-abi "^0.6.8" + ethereumjs-util "^6.2.1" + ethjs-util "^0.1.6" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.1" -"@ledgerhq/devices@^7.0.0", "@ledgerhq/devices@^7.0.5": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-7.0.5.tgz#2b3f69b84d4bccb2c4b1d34e534444da862f4880" - integrity sha512-2o2zD2Yv1Hgd3+R2aLCvlyT7NxBz2nltawTCPSXaf3+8MDIyZbiJlXi43hLEISRFBG3u3bYwAQuiOisimN9C6Q== +"@metamask/eth-sig-util@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-5.0.2.tgz#c518279a6e17a88135a13d53a0b970f145ff8bce" + integrity sha512-RU6fG/H6/UlBol221uBkq5C7w3TwLK611nEZliO2u+kO0vHKGBXnIPlhI0tzKUigjhUeOd9mhCNbNvhh0LKt9Q== dependencies: - "@ledgerhq/errors" "^6.12.1" - "@ledgerhq/logs" "^6.10.1" - rxjs "6" - semver "^7.3.5" + "@ethereumjs/util" "^8.0.0" + bn.js "^4.11.8" + ethereum-cryptography "^1.1.2" + ethjs-util "^0.1.6" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.1" -"@ledgerhq/errors@^5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.50.0.tgz#e3a6834cb8c19346efca214c1af84ed28e69dad9" - integrity sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow== +"@next/env@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/env/-/env-13.1.6.tgz#c4925609f16142ded1a5cb833359ab17359b7a93" + integrity sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg== -"@ledgerhq/errors@^6.12.1": - version "6.12.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.12.1.tgz#99ad10bd528942bdfde0ef3d4d0dce658f6f4405" - integrity sha512-2qeUSUCpQbMhV9eLJDLI8wycFwTcWszP8g3cJycBt9Jf1VczC5MRERwAQv5AYhPa4rcy+jLKBOVZYxc35r5l7g== - -"@ledgerhq/hw-app-eth@^6.29.3": - version "6.30.2" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-6.30.2.tgz#bcc43d2483dcd525701de3596e31a8497d7f6981" - integrity sha512-2Bs6aaeSiMvSGhGCepz4YwitlBMwSZPw+4SX62hrU3rTfMTALlI6yUnrn6M7Ld70Rbw9g1pLzY1heR5al6SVLQ== - dependencies: - "@ethersproject/abi" "^5.5.0" - "@ethersproject/rlp" "^5.5.0" - "@ledgerhq/cryptoassets" "^7.0.0" - "@ledgerhq/errors" "^6.12.1" - "@ledgerhq/hw-transport" "^6.27.8" - "@ledgerhq/hw-transport-mocker" "^6.27.8" - "@ledgerhq/logs" "^6.10.1" - axios "^0.26.1" - bignumber.js "^9.1.0" - crypto-js "^4.1.1" - -"@ledgerhq/hw-transport-mocker@^6.27.8": - version "6.27.8" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-mocker/-/hw-transport-mocker-6.27.8.tgz#33a08d0853bd7972296770f9202e4f2ab893a6e8" - integrity sha512-I9/TMQK0+3rgvm5+AZVFFB84wyEREqVpVVmkwhuYZj084g0Z+WRINOlr1ep3d21E67li4tzxFtkG1dzfVPD45w== - dependencies: - "@ledgerhq/hw-transport" "^6.27.8" - "@ledgerhq/logs" "^6.10.1" - -"@ledgerhq/hw-transport-webhid@^6.20.0": - version "6.27.8" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.8.tgz#9af7b980d93b69ec166a4c8eb92df09d137d1059" - integrity sha512-UmpZEnVsojmJMKS+IdkzSBvs3d3uz2Bj7R+zvDXNHjWX89gcqyGOyATkYP5mm/EWE/7YLjgvF49WzCIqbEcTdQ== - dependencies: - "@ledgerhq/devices" "^7.0.5" - "@ledgerhq/errors" "^6.12.1" - "@ledgerhq/hw-transport" "^6.27.8" - "@ledgerhq/logs" "^6.10.1" - -"@ledgerhq/hw-transport-webusb@^6.20.0": - version "6.27.8" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.27.8.tgz#d7933cae3e63ee66c752e535eca7ef6e785583a3" - integrity sha512-WU0Vz0jbACDUd31knHp38b4EQk02Zs4G5UVaw2Q3j45ZQsABvSBNzEEjXELdZDNMirvSBxE/YTAg8MLO1SFIvA== - dependencies: - "@ledgerhq/devices" "^7.0.5" - "@ledgerhq/errors" "^6.12.1" - "@ledgerhq/hw-transport" "^6.27.8" - "@ledgerhq/logs" "^6.10.1" - -"@ledgerhq/hw-transport@^5.25.0": - version "5.51.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz#8dd14a8e58cbee4df0c29eaeef983a79f5f22578" - integrity sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw== - dependencies: - "@ledgerhq/devices" "^5.51.1" - "@ledgerhq/errors" "^5.50.0" - events "^3.3.0" - -"@ledgerhq/hw-transport@^6.20.0", "@ledgerhq/hw-transport@^6.27.8": - version "6.27.8" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.27.8.tgz#57ece7e2b726216df698767de6828478fbe461e1" - integrity sha512-WSUgF1W3tAikSnAfeNAT2e2dgTdEQd5Vi/095C2mR5Fr0/POCSl9X4T9rlBhK5NSVD+nGXI0rN2ISj08zai8HQ== - dependencies: - "@ledgerhq/devices" "^7.0.5" - "@ledgerhq/errors" "^6.12.1" - events "^3.3.0" - -"@ledgerhq/logs@^5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.50.0.tgz#29c6419e8379d496ab6d0426eadf3c4d100cd186" - integrity sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA== - -"@ledgerhq/logs@^6.10.1": - version "6.10.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.10.1.tgz#5bd16082261d7364eabb511c788f00937dac588d" - integrity sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w== - -"@marsprotocol/wallet-connector@^0.9.5": - version "0.9.5" - resolved "https://registry.yarnpkg.com/@marsprotocol/wallet-connector/-/wallet-connector-0.9.5.tgz#9b17817f7458e9faeece63fe977b99bd14f4c6ab" - integrity sha512-uNgs0GXMtptWinZG8aJAn9Zzfd4k7+1ZrdmkbaE8oAt2RALd+yHZt8CFGhmOZcNmYdxyYi8JPeI3xvHJ5ayR7A== - dependencies: - "@cosmjs/cosmwasm-stargate" "^0.29.4" - "@cosmjs/stargate" "^0.29.4" - "@keplr-wallet/common" "^0.11.21" - "@keplr-wallet/cosmos" "^0.11.21" - "@keplr-wallet/provider" "^0.11.21" - "@keplr-wallet/stores" "^0.11.21" - "@ledgerhq/devices" "^7.0.0" - "@walletconnect/client" "^1.8.0" - "@walletconnect/utils" "^1.8.0" - axios "^0.27.2" - core-js "3" - qrcode.react "^3.1.0" - react-modal "^3.15.1" - -"@metamask/detect-provider@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@metamask/detect-provider/-/detect-provider-1.2.0.tgz#3667a7531f2a682e3c3a43eaf3a1958bdb42a696" - integrity sha512-ocA76vt+8D0thgXZ7LxFPyqw3H7988qblgzddTDA6B8a/yU0uKV42QR/DhA+Jh11rJjxW0jKvwb5htA6krNZDQ== - -"@next/env@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/env/-/env-12.3.1.tgz#18266bd92de3b4aa4037b1927aa59e6f11879260" - integrity sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg== - -"@next/eslint-plugin-next@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.1.tgz#b821f27b0f175954d8d18e5d323fce040ecc79a6" - integrity sha512-sw+lTf6r6P0j+g/n9y4qdWWI2syPqZx+uc0+B/fRENqfR3KpSid6MIKqc9gNwGhJASazEQ5b3w8h4cAET213jw== +"@next/eslint-plugin-next@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-13.1.6.tgz#ad8be22dd3d8aee9a9bd9a2507e2c55a2f7ebdd9" + integrity sha512-o7cauUYsXjzSJkay8wKjpKJf2uLzlggCsGUkPu3lP09Pv97jYlekTC20KJrjQKmSv5DXV0R/uks2ZXhqjNkqAw== dependencies: glob "7.1.7" -"@next/swc-android-arm-eabi@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.1.tgz#b15ce8ad376102a3b8c0f3c017dde050a22bb1a3" - integrity sha512-i+BvKA8tB//srVPPQxIQN5lvfROcfv4OB23/L1nXznP+N/TyKL8lql3l7oo2LNhnH66zWhfoemg3Q4VJZSruzQ== +"@next/swc-android-arm-eabi@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.6.tgz#d766dfc10e27814d947b20f052067c239913dbcc" + integrity sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ== -"@next/swc-android-arm64@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.3.1.tgz#85d205f568a790a137cb3c3f720d961a2436ac9c" - integrity sha512-CmgU2ZNyBP0rkugOOqLnjl3+eRpXBzB/I2sjwcGZ7/Z6RcUJXK5Evz+N0ucOxqE4cZ3gkTeXtSzRrMK2mGYV8Q== +"@next/swc-android-arm64@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.1.6.tgz#f37a98d5f18927d8c9970d750d516ac779465176" + integrity sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw== -"@next/swc-darwin-arm64@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz#b105457d6760a7916b27e46c97cb1a40547114ae" - integrity sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg== +"@next/swc-darwin-arm64@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.6.tgz#ec1b90fd9bf809d8b81004c5182e254dced4ad96" + integrity sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw== -"@next/swc-darwin-x64@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.1.tgz#6947b39082271378896b095b6696a7791c6e32b1" - integrity sha512-9S6EVueCVCyGf2vuiLiGEHZCJcPAxglyckTZcEwLdJwozLqN0gtS0Eq0bQlGS3dH49Py/rQYpZ3KVWZ9BUf/WA== +"@next/swc-darwin-x64@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.6.tgz#e869ac75d16995eee733a7d1550322d9051c1eb4" + integrity sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA== -"@next/swc-freebsd-x64@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.1.tgz#2b6c36a4d84aae8b0ea0e0da9bafc696ae27085a" - integrity sha512-qcuUQkaBZWqzM0F1N4AkAh88lLzzpfE6ImOcI1P6YeyJSsBmpBIV8o70zV+Wxpc26yV9vpzb+e5gCyxNjKJg5Q== +"@next/swc-freebsd-x64@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.6.tgz#84a7b2e423a2904afc2edca21c2f1ba6b53fa4c1" + integrity sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw== -"@next/swc-linux-arm-gnueabihf@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.1.tgz#6e421c44285cfedac1f4631d5de330dd60b86298" - integrity sha512-diL9MSYrEI5nY2wc/h/DBewEDUzr/DqBjIgHJ3RUNtETAOB3spMNHvJk2XKUDjnQuluLmFMloet9tpEqU2TT9w== +"@next/swc-linux-arm-gnueabihf@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.6.tgz#980eed1f655ff8a72187d8a6ef9e73ac39d20d23" + integrity sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw== -"@next/swc-linux-arm64-gnu@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.1.tgz#8863f08a81f422f910af126159d2cbb9552ef717" - integrity sha512-o/xB2nztoaC7jnXU3Q36vGgOolJpsGG8ETNjxM1VAPxRwM7FyGCPHOMk1XavG88QZSQf+1r+POBW0tLxQOJ9DQ== +"@next/swc-linux-arm64-gnu@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.6.tgz#87a71db21cded3f7c63d1d19079845c59813c53d" + integrity sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ== -"@next/swc-linux-arm64-musl@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.1.tgz#0038f07cf0b259d70ae0c80890d826dfc775d9f3" - integrity sha512-2WEasRxJzgAmP43glFNhADpe8zB7kJofhEAVNbDJZANp+H4+wq+/cW1CdDi8DqjkShPEA6/ejJw+xnEyDID2jg== +"@next/swc-linux-arm64-musl@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.6.tgz#c5aac8619331b9fd030603bbe2b36052011e11de" + integrity sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ== -"@next/swc-linux-x64-gnu@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.1.tgz#c66468f5e8181ffb096c537f0dbfb589baa6a9c1" - integrity sha512-JWEaMyvNrXuM3dyy9Pp5cFPuSSvG82+yABqsWugjWlvfmnlnx9HOQZY23bFq3cNghy5V/t0iPb6cffzRWylgsA== +"@next/swc-linux-x64-gnu@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.6.tgz#9513d36d540bbfea575576746736054c31aacdea" + integrity sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q== -"@next/swc-linux-x64-musl@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.1.tgz#c6269f3e96ac0395bc722ad97ce410ea5101d305" - integrity sha512-xoEWQQ71waWc4BZcOjmatuvPUXKTv6MbIFzpm4LFeCHsg2iwai0ILmNXf81rJR+L1Wb9ifEke2sQpZSPNz1Iyg== +"@next/swc-linux-x64-musl@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.6.tgz#d61fc6884899f5957251f4ce3f522e34a2c479b7" + integrity sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ== -"@next/swc-win32-arm64-msvc@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.1.tgz#83c639ee969cee36ce247c3abd1d9df97b5ecade" - integrity sha512-hswVFYQYIeGHE2JYaBVtvqmBQ1CppplQbZJS/JgrVI3x2CurNhEkmds/yqvDONfwfbttTtH4+q9Dzf/WVl3Opw== +"@next/swc-win32-arm64-msvc@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.6.tgz#fac2077a8ae9768e31444c9ae90807e64117cda7" + integrity sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ== -"@next/swc-win32-ia32-msvc@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.1.tgz#52995748b92aa8ad053440301bc2c0d9fbcf27c2" - integrity sha512-Kny5JBehkTbKPmqulr5i+iKntO5YMP+bVM8Hf8UAmjSMVo3wehyLVc9IZkNmcbxi+vwETnQvJaT5ynYBkJ9dWA== +"@next/swc-win32-ia32-msvc@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.6.tgz#498bc11c91b4c482a625bf4b978f98ae91111e46" + integrity sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w== -"@next/swc-win32-x64-msvc@12.3.1": - version "12.3.1" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.1.tgz#27d71a95247a9eaee03d47adee7e3bd594514136" - integrity sha512-W1ijvzzg+kPEX6LAc+50EYYSEo0FVu7dmTE+t+DM4iOLqgGHoW9uYSz9wCVdkXOEEMP9xhXfGpcSxsfDucyPkA== +"@next/swc-win32-x64-msvc@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.6.tgz#17ed919c723426b7d0ce1cd73d40ce3dcd342089" + integrity sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA== + +"@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== "@noble/hashes@^1", "@noble/hashes@^1.0.0": version "1.1.4" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.4.tgz#2611ebf5764c1bf754da7c7794de4fb30512336d" integrity sha512-+PYsVPrTSqtVjatKt2A/Proukn2Yrz61OBThOCKErc5w2/r1Fh37vbDv0Eah7pyNltrmacjwTvdw3JoR+WE4TA== +"@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1979,6 +2121,18 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@pkgr/utils@^2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.3.1.tgz#0a9b06ffddee364d6642b3cd562ca76f55b34a03" + integrity sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw== + dependencies: + cross-spawn "^7.0.3" + is-glob "^4.0.3" + open "^8.4.0" + picocolors "^1.0.0" + tiny-glob "^0.2.9" + tslib "^2.4.0" + "@popperjs/core@^2.9.0": version "2.11.6" resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45" @@ -2266,6 +2420,28 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz#8be36a1f66f3265389e90b5f9c9962146758f728" integrity sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg== +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.5": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" + integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== + dependencies: + "@noble/hashes" "~1.2.0" + "@noble/secp256k1" "~1.7.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" + integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== + dependencies: + "@noble/hashes" "~1.2.0" + "@scure/base" "~1.1.0" + "@sentry/browser@7.24.0": version "7.24.0" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.24.0.tgz#3e657f8032322d07f98486f44e048fcdbc3aaff7" @@ -2382,23 +2558,6 @@ "@sentry/cli" "^1.74.6" webpack-sources "^2.0.0 || ^3.0.0" -"@sideway/address@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" - integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@sideway/formula@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" - integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== - -"@sideway/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" - integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== - "@svgr/babel-plugin-add-jsx-attribute@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.5.1.tgz#74a5d648bd0347bda99d82409d87b8ca80b9a1ba" @@ -2505,10 +2664,10 @@ "@svgr/plugin-jsx" "^6.5.1" "@svgr/plugin-svgo" "^6.5.1" -"@swc/helpers@0.4.11": - version "0.4.11" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.11.tgz#db23a376761b3d31c26502122f349a21b592c8de" - integrity sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw== +"@swc/helpers@0.4.14": + version "0.4.14" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74" + integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw== dependencies: tslib "^2.4.0" @@ -2565,13 +2724,20 @@ resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== -"@types/bn.js@^5.1.0": +"@types/bn.js@5.1.1", "@types/bn.js@^5.1.0": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== dependencies: "@types/node" "*" +"@types/bn.js@^4.11.3": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + "@types/d3-color@^2": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-2.0.3.tgz#8bc4589073c80e33d126345542f588056511fe82" @@ -2608,11 +2774,59 @@ resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-2.1.1.tgz#743fdc821c81f86537cbfece07093ac39b4bc342" integrity sha512-9MVYlmIgmRR31C5b4FVSWtuMmBHh2mOWQYfl7XAYOa8dsnb7iEmUmRSWSFgXFtkjxO65d7hTUHQC+RhR/9IWFg== +"@types/eslint-scope@^3.7.3": + version "3.7.4" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" + integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "8.21.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.21.1.tgz#110b441a210d53ab47795124dbc3e9bb993d1e7c" + integrity sha512-rc9K8ZpVjNcLs8Fp0dkozd5Pt2Apk1glO4Vgz8ix1u6yFByxfqo5Yavpy65o+93TAe24jr7v+eSBtFLvOQtCRQ== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" + integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== + +"@types/estree@^0.0.51": + version "0.0.51" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" + integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== + +"@types/google-protobuf@^3.15.5": + version "3.15.6" + resolved "https://registry.yarnpkg.com/@types/google-protobuf/-/google-protobuf-3.15.6.tgz#674a69493ef2c849b95eafe69167ea59079eb504" + integrity sha512-pYVNNJ+winC4aek+lZp93sIKxnXt5qMkuKmaqS3WGuTq0Bw1ZDYNBgzG5kkdtwcv+GmYJGo3yEg6z2cKKAiEdw== + +"@types/json-schema@*", "@types/json-schema@^7.0.8": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/lodash.values@^4.3.6": + version "4.3.7" + resolved "https://registry.yarnpkg.com/@types/lodash.values/-/lodash.values-4.3.7.tgz#9da9c6cf5941ff8b8f98bde9cb9f2cf7fd64eceb" + integrity sha512-Moex9/sWxtKEa+BKiH5zvmhfcieDlcz4wRxMhO/oJ2qOKUdujoU6dQjUTxWA8jwEREpHXmiY4HCwNRpycW8JQA== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.14.191" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa" + integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ== + "@types/long@^4.0.1": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" @@ -2683,48 +2897,48 @@ dependencies: "@types/node" "*" -"@typescript-eslint/parser@^5.21.0": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.45.1.tgz#6440ec283fa1373a12652d4e2fef4cb6e7b7e8c6" - integrity sha512-JQ3Ep8bEOXu16q0ztsatp/iQfDCtvap7sp/DKo7DWltUquj5AfCOpX2zSzJ8YkAVnrQNqQ5R62PBz2UtrfmCkA== +"@typescript-eslint/parser@^5.42.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.51.0.tgz#2d74626652096d966ef107f44b9479f02f51f271" + integrity sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA== dependencies: - "@typescript-eslint/scope-manager" "5.45.1" - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/typescript-estree" "5.45.1" + "@typescript-eslint/scope-manager" "5.51.0" + "@typescript-eslint/types" "5.51.0" + "@typescript-eslint/typescript-estree" "5.51.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.45.1.tgz#5b87d025eec7035d879b99c260f03be5c247883c" - integrity sha512-D6fCileR6Iai7E35Eb4Kp+k0iW7F1wxXYrOhX/3dywsOJpJAQ20Fwgcf+P/TDtvQ7zcsWsrJaglaQWDhOMsspQ== +"@typescript-eslint/scope-manager@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.51.0.tgz#ad3e3c2ecf762d9a4196c0fbfe19b142ac498990" + integrity sha512-gNpxRdlx5qw3yaHA0SFuTjW4rxeYhpHxt491PEcKF8Z6zpq0kMhe0Tolxt0qjlojS+/wArSDlj/LtE69xUJphQ== dependencies: - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/visitor-keys" "5.45.1" + "@typescript-eslint/types" "5.51.0" + "@typescript-eslint/visitor-keys" "5.51.0" -"@typescript-eslint/types@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.45.1.tgz#8e1883041cee23f1bb7e1343b0139f97f6a17c14" - integrity sha512-HEW3U0E5dLjUT+nk7b4lLbOherS1U4ap+b9pfu2oGsW3oPu7genRaY9dDv3nMczC1rbnRY2W/D7SN05wYoGImg== +"@typescript-eslint/types@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.51.0.tgz#e7c1622f46c7eea7e12bbf1edfb496d4dec37c90" + integrity sha512-SqOn0ANn/v6hFn0kjvLwiDi4AzR++CBZz0NV5AnusT2/3y32jdc0G4woXPWHCumWtUXZKPAS27/9vziSsC9jnw== -"@typescript-eslint/typescript-estree@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.1.tgz#b3dc37f0c4f0fe73e09917fc735e6f96eabf9ba4" - integrity sha512-76NZpmpCzWVrrb0XmYEpbwOz/FENBi+5W7ipVXAsG3OoFrQKJMiaqsBMbvGRyLtPotGqUfcY7Ur8j0dksDJDng== +"@typescript-eslint/typescript-estree@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.51.0.tgz#0ec8170d7247a892c2b21845b06c11eb0718f8de" + integrity sha512-TSkNupHvNRkoH9FMA3w7TazVFcBPveAAmb7Sz+kArY6sLT86PA5Vx80cKlYmd8m3Ha2SwofM1KwraF24lM9FvA== dependencies: - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/visitor-keys" "5.45.1" + "@typescript-eslint/types" "5.51.0" + "@typescript-eslint/visitor-keys" "5.51.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.1.tgz#204428430ad6a830d24c5ac87c71366a1cfe1948" - integrity sha512-cy9ln+6rmthYWjH9fmx+5FU/JDpjQb586++x2FZlveq7GdGuLLW9a2Jcst2TGekH82bXpfmRNSwP9tyEs6RjvQ== +"@typescript-eslint/visitor-keys@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.51.0.tgz#c0147dd9a36c0de758aaebd5b48cae1ec59eba87" + integrity sha512-Oh2+eTdjHjOFjKA27sxESlA87YPSOJafGCR0md5oeMdh1ZcCfAGCIOL216uTBAkAIptvLIfKQhl7lHxMJet4GQ== dependencies: - "@typescript-eslint/types" "5.45.1" + "@typescript-eslint/types" "5.51.0" eslint-visitor-keys "^3.3.0" "@walletconnect/browser-utils@^1.8.0": @@ -2872,6 +3086,178 @@ dependencies: "@walletconnect/window-getters" "^1.0.0" +"@webassemblyjs/ast@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" + integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + +"@webassemblyjs/floating-point-hex-parser@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" + integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== + +"@webassemblyjs/helper-api-error@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" + integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== + +"@webassemblyjs/helper-buffer@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" + integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== + +"@webassemblyjs/helper-numbers@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" + integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.1" + "@webassemblyjs/helper-api-error" "1.11.1" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" + integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== + +"@webassemblyjs/helper-wasm-section@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" + integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + +"@webassemblyjs/ieee754@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" + integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" + integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" + integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== + +"@webassemblyjs/wasm-edit@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" + integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/helper-wasm-section" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/wasm-opt" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + "@webassemblyjs/wast-printer" "1.11.1" + +"@webassemblyjs/wasm-gen@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" + integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/ieee754" "1.11.1" + "@webassemblyjs/leb128" "1.11.1" + "@webassemblyjs/utf8" "1.11.1" + +"@webassemblyjs/wasm-opt@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" + integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-buffer" "1.11.1" + "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + +"@webassemblyjs/wasm-parser@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" + integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/helper-api-error" "1.11.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/ieee754" "1.11.1" + "@webassemblyjs/leb128" "1.11.1" + "@webassemblyjs/utf8" "1.11.1" + +"@webassemblyjs/wast-printer@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" + integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== + dependencies: + "@webassemblyjs/ast" "1.11.1" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.0.1.tgz#a69720f6c9bad6aef54a8fa6ba9c3533e7ef4c7f" + integrity sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A== + +"@webpack-cli/info@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.1.tgz#eed745799c910d20081e06e5177c2b2569f166c0" + integrity sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA== + +"@webpack-cli/serve@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.1.tgz#34bdc31727a1889198855913db2f270ace6d7bf8" + integrity sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw== + +"@wry/context@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.7.0.tgz#be88e22c0ddf62aeb0ae9f95c3d90932c619a5c8" + integrity sha512-LcDAiYWRtwAoSOArfk7cuYvFXytxfVrdX7yxoUmK7pPITLk5jYh2F8knCwS7LjgYL8u1eidPlKKV6Ikqq0ODqQ== + dependencies: + tslib "^2.3.0" + +"@wry/equality@^0.5.0": + version "0.5.3" + resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.5.3.tgz#fafebc69561aa2d40340da89fa7dc4b1f6fb7831" + integrity sha512-avR+UXdSrsF2v8vIqIgmeTY0UR91UT+IyablCyKe/uk22uOJ8fusKZnH9JH9e1/EtLeNJBtagNmL3eJdnOV53g== + dependencies: + tslib "^2.3.0" + +"@wry/trie@^0.3.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.3.2.tgz#a06f235dc184bd26396ba456711f69f8c35097e6" + integrity sha512-yRTyhWSls2OY/pYLfwff867r8ekooZ4UI+/gxot5Wj8EFwSf2rG+n+Mo/6LoLQm1TKA4GRj2+LCpbfS937dClQ== + dependencies: + tslib "^2.3.0" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +acorn-import-assertions@^1.7.6: + version "1.8.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" + integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -2891,11 +3277,21 @@ acorn-walk@^7.0.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== +acorn@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" + integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== + acorn@^7.0.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.5.0, acorn@^8.7.1: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + acorn@^8.8.0: version "8.8.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" @@ -2918,7 +3314,12 @@ agent-base@6: dependencies: debug "4" -ajv@^6.10.0, ajv@^6.12.4: +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2945,7 +3346,7 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -3048,6 +3449,11 @@ ast-types-flow@^0.0.7: resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== +async@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" + integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -3070,27 +3476,13 @@ axe-core@^4.4.3: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.5.2.tgz#823fdf491ff717ac3c58a52631d4206930c1d9f7" integrity sha512-u2MVsXfew5HBvjsczCv+xlwdNnB1oQR9HlAcsejZttNjKKSkeDNVwB1vMThIUIFI9GoT57Vtk8iQLwqOfAkboA== -axios@0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== - dependencies: - follow-redirects "^1.10.0" - -axios@^0.21.2: +axios@^0.21.1, axios@^0.21.2: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: follow-redirects "^1.14.0" -axios@^0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" - integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== - dependencies: - follow-redirects "^1.14.8" - axios@^0.27.2: version "0.27.2" resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" @@ -3099,6 +3491,15 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" +axios@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.3.tgz#e7011384ba839b885007c9c9fae1ff23dceb295b" + integrity sha512-eYq77dYIFS77AQlhzEL937yUBSepBfPIe8FcgEDN35vMNZKMrs81pgnyrQpwfy4NF4b4XWX1Zgx7yX+25w8QJA== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axobject-query@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" @@ -3140,12 +3541,12 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" -base64-js@^1.0.2, base64-js@^1.3.0, base64-js@^1.3.1: +base64-js@^1.3.0, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -bech32@^1.1.3, bech32@^1.1.4: +bech32@1.1.4, bech32@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== @@ -3160,7 +3561,7 @@ big-integer@^1.6.48: resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== -bignumber.js@^9.1.0: +bignumber.js@^9.0.1, bignumber.js@^9.1.0: version "9.1.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== @@ -3170,7 +3571,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bindings@^1.3.0: +bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -3190,7 +3591,7 @@ bip32@^2.0.6: typeforce "^1.11.5" wif "^2.0.6" -bip39@^3.0.2, bip39@^3.0.3: +bip39@^3.0.2, bip39@^3.0.3, bip39@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.4.tgz#5b11fed966840b5e1b8539f0f54ab6392969b2a0" integrity sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw== @@ -3200,6 +3601,13 @@ bip39@^3.0.2, bip39@^3.0.3: pbkdf2 "^3.0.9" randombytes "^2.0.1" +bip66@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" + integrity sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw== + dependencies: + safe-buffer "^5.0.1" + blakejs@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" @@ -3210,7 +3618,7 @@ bn.js@4.11.8: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -bn.js@^4.11.8, bn.js@^4.11.9: +bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== @@ -3245,7 +3653,12 @@ brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browserify-aes@^1.2.0: +browser-headers@^0.4.0, browser-headers@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/browser-headers/-/browser-headers-0.4.1.tgz#4308a7ad3b240f4203dbb45acedb38dc2d65dd02" + integrity sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg== + +browserify-aes@^1.0.6, browserify-aes@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== @@ -3257,6 +3670,16 @@ browserify-aes@^1.2.0: inherits "^2.0.1" safe-buffer "^5.0.1" +browserslist@^4.14.5: + version "4.21.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" + integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== + dependencies: + caniuse-lite "^1.0.30001449" + electron-to-chromium "^1.4.284" + node-releases "^2.0.8" + update-browserslist-db "^1.0.10" + browserslist@^4.21.3, browserslist@^4.21.4: version "4.21.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" @@ -3283,12 +3706,17 @@ bs58check@<3.0.0, bs58check@^2.1.1, bs58check@^2.1.2: create-hash "^1.1.0" safe-buffer "^5.1.2" +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== -buffer@6.0.3, buffer@^6.0.3: +buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -3296,14 +3724,6 @@ buffer@6.0.3, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@~5.4.3: - version "5.4.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.4.3.tgz#3fbc9c69eb713d323e3fc1a895eee0710c072115" - integrity sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -3332,6 +3752,11 @@ caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.300014 resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz#22d7cbdbbbb60cdc4ca1030ccd6dea9f5de4848b" integrity sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg== +caniuse-lite@^1.0.30001449: + version "1.0.30001453" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001453.tgz#6d3a1501622bf424a3cee5ad9550e640b0de3de8" + integrity sha512-R9o/uySW38VViaTrOtwfbFEiBFUh7ST3uIG4OEymIG3/uKdHDO4xk/FaqfUw0d+irSUyFPy3dZszf9VvSTPnsA== + chalk@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -3340,7 +3765,7 @@ chalk@3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^2.0.0: +chalk@^2.0.0, chalk@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -3357,11 +3782,6 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -charenc@~0.0.1: - version "0.0.2" - resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" - integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== - chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -3377,6 +3797,11 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -3390,11 +3815,29 @@ classnames@^2.2.5, classnames@^2.3.2: resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924" integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== -client-only@^0.0.1: +client-only@0.0.1, client-only@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + clsx@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" @@ -3445,6 +3888,11 @@ color@^3.1.2: color-convert "^1.9.3" color-string "^1.6.0" +colorette@^2.0.14: + version "2.0.19" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -3452,6 +3900,11 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commander@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" @@ -3462,6 +3915,11 @@ commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +commander@^9.4.1: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -3496,6 +3954,19 @@ copy-to-clipboard@^3.3.1: dependencies: toggle-selection "^1.0.6" +copyfiles@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5" + integrity sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg== + dependencies: + glob "^7.0.5" + minimatch "^3.0.3" + mkdirp "^1.0.4" + noms "0.0.0" + through2 "^2.0.1" + untildify "^4.0.0" + yargs "^16.1.0" + core-js-compat@^3.25.1: version "3.26.1" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.26.1.tgz#0e710b09ebf689d719545ac36e49041850f943df" @@ -3508,11 +3979,6 @@ core-js-pure@^3.25.1: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.26.1.tgz#653f4d7130c427820dcecd3168b594e8bb095a33" integrity sha512-VVXcDpp/xJ21KdULRq/lXdLzQAtX7+37LzpyfFM973il0tWSsDEoyzG38G14AjTpK9VTfiNM9jnFauq/CpaWGQ== -core-js@3: - version "3.26.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.1.tgz#7a9816dabd9ee846c1c0fe0e8fcad68f3709134e" - integrity sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA== - core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -3537,6 +4003,19 @@ cosmjs-types@^0.5.2: long "^4.0.0" protobufjs "~6.11.2" +cosmjs-types@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.6.1.tgz#4944e83d0fa87880243a11813bdff0e313d39a68" + integrity sha512-fRz6yzElHHBULDyLArF/G1UkkTWW4r3RondBUGnmSsZWYI5NpfDn32MVa5aRmpaaf4tJI2cbnXHs9fykwU7Ttg== + dependencies: + long "^4.0.0" + protobufjs "~6.11.2" + +crc-32@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -3567,7 +4046,7 @@ cross-fetch@^3.1.5: dependencies: node-fetch "2.6.7" -cross-spawn@^7.0.2: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3576,12 +4055,7 @@ cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" -crypt@~0.0.1: - version "0.0.2" - resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" - integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== - -crypto-js@^4.0.0, crypto-js@^4.1.1: +crypto-js@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf" integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== @@ -3632,11 +4106,6 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9" integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== -curve25519-js@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/curve25519-js/-/curve25519-js-0.0.4.tgz#e6ad967e8cd284590d657bbfc90d8b50e49ba060" - integrity sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w== - d3-array@2, d3-array@^2.3.0: version "2.12.1" resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81" @@ -3744,6 +4213,11 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" @@ -3854,12 +4328,46 @@ domutils@^2.8.0: domelementtype "^2.2.0" domhandler "^4.2.0" +dot-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" + integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +drbg.js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" + integrity sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g== + dependencies: + browserify-aes "^1.0.6" + create-hash "^1.1.2" + create-hmac "^1.1.4" + +eccrypto@1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/eccrypto/-/eccrypto-1.1.6.tgz#846bd1222323036f7a3515613704386399702bd3" + integrity sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A== + dependencies: + acorn "7.1.1" + elliptic "6.5.4" + es6-promise "4.2.8" + nan "2.14.0" + optionalDependencies: + secp256k1 "3.7.1" + electron-to-chromium@^1.4.251: version "1.4.284" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4: +electron-to-chromium@^1.4.284: + version "1.4.299" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.299.tgz#faa2069cd4879a73e540e533178db5c618768d41" + integrity sha512-lQ7ijJghH6pCGbfWXr6EY+KYCMaRSjgsY925r1p/TlpSfVM1VjHTcn1gAc15VM4uwti283X6QtjPTXdpoSGiZQ== + +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -3882,6 +4390,14 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== +enhanced-resolve@^5.10.0: + version "5.12.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" + integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -3892,6 +4408,11 @@ entities@^4.4.0: resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== +envinfo@^7.7.3: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -3929,6 +4450,11 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: string.prototype.trimstart "^1.0.5" unbox-primitive "^1.0.2" +es-module-lexer@^0.9.0: + version "0.9.3" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" + integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" @@ -3945,6 +4471,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es6-promise@4.2.8: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -3960,16 +4491,16 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-next@12.3.1: - version "12.3.1" - resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-12.3.1.tgz#5d4eb0b7903cea81fd0d5106601d3afb0a453ff4" - integrity sha512-EN/xwKPU6jz1G0Qi6Bd/BqMnHLyRAL0VsaQaWA7F3KkjAgZHi4f1uL1JKGWNxdQpHTW/sdGONBd0bzxUka/DJg== +eslint-config-next@^13.1.6: + version "13.1.6" + resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-13.1.6.tgz#ab6894fe5b80080f1e9b9306d1c4b0003230620e" + integrity sha512-0cg7h5wztg/SoLAlxljZ0ZPUQ7i6QKqRiP4M2+MgTZtxWwNKb2JSwNc18nJ6/kXBI6xYvPraTbQSIhAuVw6czw== dependencies: - "@next/eslint-plugin-next" "12.3.1" + "@next/eslint-plugin-next" "13.1.6" "@rushstack/eslint-patch" "^1.1.3" - "@typescript-eslint/parser" "^5.21.0" + "@typescript-eslint/parser" "^5.42.0" eslint-import-resolver-node "^0.3.6" - eslint-import-resolver-typescript "^2.7.1" + eslint-import-resolver-typescript "^3.5.2" eslint-plugin-import "^2.26.0" eslint-plugin-jsx-a11y "^6.5.1" eslint-plugin-react "^7.31.7" @@ -3983,16 +4514,18 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" -eslint-import-resolver-typescript@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.7.1.tgz#a90a4a1c80da8d632df25994c4c5fdcdd02b8751" - integrity sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ== +eslint-import-resolver-typescript@^3.5.2: + version "3.5.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.3.tgz#db5ed9e906651b7a59dd84870aaef0e78c663a05" + integrity sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ== dependencies: debug "^4.3.4" - glob "^7.2.0" + enhanced-resolve "^5.10.0" + get-tsconfig "^4.2.0" + globby "^13.1.2" + is-core-module "^2.10.0" is-glob "^4.0.3" - resolve "^1.22.0" - tsconfig-paths "^3.14.1" + synckit "^0.8.4" eslint-module-utils@^2.7.3: version "2.7.4" @@ -4065,6 +4598,14 @@ eslint-plugin-react@^7.31.7: semver "^6.3.0" string.prototype.matchall "^4.0.8" +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + eslint-scope@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" @@ -4158,6 +4699,11 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" @@ -4173,6 +4719,19 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +eth-crypto@^2.3.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/eth-crypto/-/eth-crypto-2.5.0.tgz#3ed7279a3a77bcca499266d4eb33ba2a8bd3004b" + integrity sha512-5WA3ebUs38ssNtU/U9FPzehFZnkdAwAFXq+bPF2Fcp4izV+A7bjW6489N8AB7fiQgHi1XkfnTcO64189SJil5A== + dependencies: + "@babel/runtime" "7.20.6" + "@ethereumjs/tx" "3.5.2" + "@types/bn.js" "5.1.1" + eccrypto "1.1.6" + ethereumjs-util "7.1.5" + ethers "5.7.2" + secp256k1 "4.0.3" + ethereum-cryptography@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" @@ -4194,7 +4753,25 @@ ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" -ethereumjs-util@^7.1.5: +ethereum-cryptography@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz#5ccfa183e85fdaf9f9b299a79430c044268c9b3a" + integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== + dependencies: + "@noble/hashes" "1.2.0" + "@noble/secp256k1" "1.7.1" + "@scure/bip32" "1.1.5" + "@scure/bip39" "1.1.1" + +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@7.1.5, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: version "7.1.5" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== @@ -4205,12 +4782,69 @@ ethereumjs-util@^7.1.5: ethereum-cryptography "^0.1.3" rlp "^2.2.4" -eventemitter3@^4.0.1, eventemitter3@^4.0.4, eventemitter3@^4.0.7: +ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethers@5.7.2, ethers@^5.6.4: + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.1" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.2" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.1" + "@ethersproject/wordlists" "5.7.0" + +ethjs-util@0.1.6, ethjs-util@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +eventemitter3@^4.0.1: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@^3.3.0: +events@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -4233,11 +4867,6 @@ extract-files@^9.0.0: resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== -fast-deep-equal@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" - integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -4248,7 +4877,7 @@ fast-equals@^2.0.0: resolved "https://registry.yarnpkg.com/fast-equals/-/fast-equals-2.0.4.tgz#3add9410585e2d7364c2deeb6a707beadb24b927" integrity sha512-caj/ZmjHljPrZtbzJ3kfH5ia/k4mTJe/qSiXAGzxZWRZgsgDV0cvNaQULqUX8t0/JVlzzEdYOwCN5DmzTxoD4w== -fast-glob@^3.2.12, fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== @@ -4269,6 +4898,11 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + fastq@^1.6.0: version "1.14.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.14.0.tgz#107f69d7295b11e0fccc264e1fc6389f623731ce" @@ -4295,6 +4929,14 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -4316,7 +4958,7 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -follow-redirects@^1.10.0, follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.14.9: +follow-redirects@^1.14.0, follow-redirects@^1.14.9, follow-redirects@^1.15.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -4393,6 +5035,11 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" @@ -4410,6 +5057,11 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-tsconfig@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.4.0.tgz#64eee64596668a81b8fce18403f94f245ee0d4e5" + integrity sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ== + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -4424,6 +5076,11 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + glob@7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -4448,7 +5105,7 @@ glob@7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3, glob@^7.2.0: +glob@^7.0.0, glob@^7.0.5, glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -4479,6 +5136,11 @@ globalthis@^1.0.1: dependencies: define-properties "^1.1.3" +globalyzer@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" + integrity sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q== + globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -4491,6 +5153,32 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +globby@^13.1.2: + version "13.1.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.3.tgz#f62baf5720bcb2c1330c8d4ef222ee12318563ff" + integrity sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.2.11" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^4.0.0" + +globrex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== + +google-protobuf@^3.13.0, google-protobuf@^3.14.0, google-protobuf@^3.21.0: + version "3.21.2" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.21.2.tgz#4580a2bea8bbb291ee579d1fefb14d6fa3070ea4" + integrity sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA== + +graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + grapheme-splitter@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" @@ -4506,7 +5194,14 @@ graphql-request@^5.0.0: extract-files "^9.0.0" form-data "^3.0.0" -graphql@^16.6.0: +graphql-tag@^2.12.6: + version "2.12.6" + resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1" + integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg== + dependencies: + tslib "^2.1.0" + +graphql@^16.3.0, graphql@^16.6.0: version "16.6.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.6.0.tgz#c2dcffa4649db149f6282af726c8c83f1c7c5fdb" integrity sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw== @@ -4566,7 +5261,7 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7, hash.js@~1.1.7: +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== @@ -4590,6 +5285,11 @@ hoist-non-react-statics@^3.3.2: dependencies: react-is "^16.7.0" +http-status-codes@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/http-status-codes/-/http-status-codes-2.2.0.tgz#bb2efe63d941dfc2be18e15f703da525169622be" + integrity sha512-feERVo9iWxvnejp3SEfm/+oNG517npqL2/PIA8ORjyOZjGC7TwCRQsZylciLS64i6pJ0wRYz3rkXLRwbtFa8Ng== + https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -4598,7 +5298,7 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -ieee754@^1.1.4, ieee754@^1.2.1: +ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -4621,6 +5321,14 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -4634,7 +5342,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4653,12 +5361,15 @@ internmap@^1.0.0: resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.1.tgz#0017cc8a3b99605f0302f2b198d272e015e5df95" integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw== -invariant@2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== is-arrayish@^0.2.1: version "0.2.1" @@ -4692,17 +5403,12 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-buffer@~1.1.1: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.10.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== @@ -4716,6 +5422,11 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -4740,6 +5451,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== + is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -4762,6 +5478,13 @@ is-path-inside@^3.0.3: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -4808,6 +5531,18 @@ is-what@^4.1.8: resolved "https://registry.yarnpkg.com/is-what/-/is-what-4.1.8.tgz#0e2a8807fda30980ddb2571c79db3d209b14cbe4" integrity sha512-yq8gMao5upkPoGEU9LsB2P+K3Kt8Q3fQFCGyNCWOAnJAMzEXVV9drYb0TXr42TTliLLhKIBvulgAXgtLLnwzGA== +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -4818,67 +5553,29 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + isomorphic-ws@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== -joi@^17.5.0: - version "17.7.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.7.0.tgz#591a33b1fe1aca2bc27f290bcad9b9c1c570a6b3" - integrity sha512-1/ugc8djfn93rTE3WRKdCzGGt/EtiYKxITMO4Wiv6q5JL1gl9ePt4kBsl1S499nbosspfctIQTpYIhSmHA3WAg== +isomorphic-ws@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" + integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.0" - "@sideway/pinpoint" "^2.0.0" - -js-crypto-env@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/js-crypto-env/-/js-crypto-env-0.3.2.tgz#02195723469da14449338ca2789fd7ff6784c533" - integrity sha512-F1uHiCkSOo36qBuuZABA4sBf+xeFBzhJZ0Sd7af8FAruszIhm1Xxv+Zr5Ne90Zlh7/fnxCsrdkj0N8f0a3lVlQ== - -js-crypto-hash@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/js-crypto-hash/-/js-crypto-hash-0.6.3.tgz#748e3e1853f69dad714636db3290736825506641" - integrity sha512-SG8c9tM8y3sUb4k7WvpVfu5vU7zfPvX+eaYR5578TvehkehdaQbqAc+y+1FwxnqQ3WZ0gsYoOKp/mW+mqtNoWA== - dependencies: - buffer "~5.4.3" - hash.js "~1.1.7" - js-crypto-env "^0.3.2" - md5 "~2.2.1" - sha3 "~2.1.0" - -js-crypto-hkdf@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/js-crypto-hkdf/-/js-crypto-hkdf-0.7.3.tgz#537c394a2e65bca80032daa07d2ffe7e4f78d32f" - integrity sha512-eAaVArAjS2GCacWGXY4hjBiexrLQYlI0PMOcbwtrSEj84XU3kUfMYZm9bpTyaTXgdHC/eQoXe/Of6biG+RSEaQ== - dependencies: - js-crypto-env "^0.3.2" - js-crypto-hmac "^0.6.3" - js-crypto-random "^0.4.3" - js-encoding-utils "0.5.6" - -js-crypto-hmac@^0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/js-crypto-hmac/-/js-crypto-hmac-0.6.3.tgz#c33352c1ee6076b17b8f4cb0e2167814b2b77d6d" - integrity sha512-T0pKOaHACOSG6Xs6/06G8RDDeZouQwIQNBq9L/zoUGsd4F67gAjpT3q2lGigAGpUd1hiyy7vnhvLpz7VDt6DbA== - dependencies: - js-crypto-env "^0.3.2" - js-crypto-hash "^0.6.3" - -js-crypto-random@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/js-crypto-random/-/js-crypto-random-0.4.3.tgz#898c2d91991eead02b4e461005e878fa9827fd74" - integrity sha512-C3gzphPPfw9jfQ9Q/LjhJMZxQNp3AaoVRDvyZkiB+zYltfs8tKQPsskWkXACpg1Nzh01PtSRUvVijjptd2qGHQ== - dependencies: - js-crypto-env "^0.3.2" - -js-encoding-utils@0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/js-encoding-utils/-/js-encoding-utils-0.5.6.tgz#517351d8f4a85b2ad121183d41df8319981bee03" - integrity sha512-qnAGsUIWrmzh5n+3AXqbxX1KsB9hkQmJZf3aA9DLAS7GpL/NEHCBreFFbW+imramoU+Q0TDyvkwhRbBRH1TVkg== + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" js-sdsl@^4.1.4: version "4.2.0" @@ -4902,6 +5599,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jscrypto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/jscrypto/-/jscrypto-1.0.3.tgz#598febca2a939d6f679c54f56e1fe364cef30cc9" + integrity sha512-lryZl0flhodv4SZHOqyb1bx5sKcJxj0VBo0Kzb4QMAg3L021IC9uGpl0RCZa+9KJwlRGSK2C80ITcwbe19OKLQ== + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4912,7 +5614,7 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== -json-parse-even-better-errors@^2.3.0: +json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== @@ -4939,6 +5641,11 @@ json5@^2.2.1: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +jsonschema@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.2: version "3.3.3" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" @@ -4947,6 +5654,15 @@ json5@^2.2.1: array-includes "^3.1.5" object.assign "^4.1.3" +keccak256@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/keccak256/-/keccak256-1.0.6.tgz#dd32fb771558fed51ce4e45a035ae7515573da58" + integrity sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw== + dependencies: + bn.js "^5.2.0" + buffer "^6.0.3" + keccak "^3.0.2" + keccak@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" @@ -4956,11 +5672,25 @@ keccak@^3.0.0: node-gyp-build "^4.2.0" readable-stream "^3.6.0" +keccak@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" + integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + keyvaluestorage-interface@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz#13ebdf71f5284ad54be94bd1ad9ed79adad515ff" integrity sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g== +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + language-subtag-registry@^0.3.20: version "0.3.22" resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz#2e1500861b2e457eba7e7ae86877cbd08fa1fd1d" @@ -4973,16 +5703,6 @@ language-tags@^1.0.5: dependencies: language-subtag-registry "^0.3.20" -ledger-cosmos-js@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/ledger-cosmos-js/-/ledger-cosmos-js-2.1.8.tgz#b409ecd1e77f630e6fb212a9f602fe5c6e8f054b" - integrity sha512-Gl7SWMq+3R9OTkF1hLlg5+1geGOmcHX9OdS+INDsGNxSiKRWlsWCvQipGoDnRIQ6CPo2i/Ze58Dw0Mt/l3UYyA== - dependencies: - "@babel/runtime" "^7.11.2" - "@ledgerhq/hw-transport" "^5.25.0" - bech32 "^1.1.4" - ripemd160 "^2.0.2" - levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -5020,6 +5740,18 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +link-module-alias@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/link-module-alias/-/link-module-alias-1.2.0.tgz#6a3b7b014cfe18b2759a1222fffce6a40fc120e4" + integrity sha512-ahPjXepbSVKbahTB6LxR//VHm8HPfI+QQygCH+E82spBY4HR5VPJTvlhKBc9F7muVxnS6C1rRfoPOXAbWO/fyw== + dependencies: + chalk "^2.4.1" + +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + localforage@^1.8.1: version "1.10.0" resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" @@ -5027,6 +5759,13 @@ localforage@^1.8.1: dependencies: lie "3.1.1" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -5044,6 +5783,11 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.values@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-4.3.0.tgz#a3a6c2b0ebecc5c2cba1c17e6e620fe81b53d347" + integrity sha512-r0RwvdCv8id9TUblb/O7rYPwVy6lerCbcawrfdo9iC/1t1wsNMJknO79WNBgwkH0hIeJ08jmvvESbFpNb4jH0Q== + lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -5061,6 +5805,13 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -5073,6 +5824,11 @@ lru_map@^0.3.3: resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== +map-obj@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -5082,20 +5838,16 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" -md5@~2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9" - integrity sha512-PlGG4z5mBANDGCKsYQe0CaUYHdZYZt8ZPZLmEt+Urf0W4GlpTX4HescwHU+dc9+Z/G/vZKYZYFrwgm9VxK6QOQ== - dependencies: - charenc "~0.0.1" - crypt "~0.0.1" - is-buffer "~1.1.1" - mdn-data@2.0.14: version "2.0.14" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -5114,7 +5866,7 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12: +mime-types@^2.1.12, mime-types@^2.1.27: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -5131,7 +5883,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -5143,10 +5895,10 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== -miscreant@0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/miscreant/-/miscreant-0.3.2.tgz#a91c046566cca70bd6b5e9fbdd3f67617fa85034" - integrity sha512-fL9KxsQz9BJB2KGPMHFrReioywkiomBiuaLk6EuChijK0BsJsIKJXdVomR+/bPj5mvbFD6wM0CM3bZio9g7OHA== +minimist@^1.2.3: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mkdirp@^0.5.5: version "0.5.6" @@ -5155,15 +5907,10 @@ mkdirp@^0.5.5: dependencies: minimist "^1.2.6" -mobx-utils@^6.0.3: - version "6.0.5" - resolved "https://registry.yarnpkg.com/mobx-utils/-/mobx-utils-6.0.5.tgz#0cce9afb07fbba1fb559f959f8cea1f44baa7252" - integrity sha512-QOduwicYedD4mwYZRl8+c3BalljFDcubg+PUGqBkn8tOuBoj2q7GhjXBP6JXM9J+Zh+2mePK8IoToeLfqr3Z/w== - -mobx@^6.1.7: - version "6.7.0" - resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.7.0.tgz#2d805610fee1801fd015c54fd5400d2601aa3768" - integrity sha512-1kBLBdSNG2bA522HQdbsTvwAwYf9hq9FWxmlhX7wTsJUAI54907J+ozfGW+LoYUo06vjit748g6QH1AAGLNebw== +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== moment@^2.29.4: version "2.29.4" @@ -5194,7 +5941,12 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nan@^2.13.2: +nan@2.14.0: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + +nan@^2.13.2, nan@^2.14.0: version "2.17.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== @@ -5209,37 +5961,54 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -next@12.3.1: - version "12.3.1" - resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1" - integrity sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw== +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +next@^13.1.6: + version "13.1.6" + resolved "https://registry.yarnpkg.com/next/-/next-13.1.6.tgz#054babe20b601f21f682f197063c9b0b32f1a27c" + integrity sha512-hHlbhKPj9pW+Cymvfzc15lvhaOZ54l+8sXDXJWm3OBNBzgrVj6hwGPmqqsXg40xO1Leq+kXpllzRPuncpC0Phw== dependencies: - "@next/env" "12.3.1" - "@swc/helpers" "0.4.11" + "@next/env" "13.1.6" + "@swc/helpers" "0.4.14" caniuse-lite "^1.0.30001406" postcss "8.4.14" - styled-jsx "5.0.7" - use-sync-external-store "1.2.0" + styled-jsx "5.1.1" optionalDependencies: - "@next/swc-android-arm-eabi" "12.3.1" - "@next/swc-android-arm64" "12.3.1" - "@next/swc-darwin-arm64" "12.3.1" - "@next/swc-darwin-x64" "12.3.1" - "@next/swc-freebsd-x64" "12.3.1" - "@next/swc-linux-arm-gnueabihf" "12.3.1" - "@next/swc-linux-arm64-gnu" "12.3.1" - "@next/swc-linux-arm64-musl" "12.3.1" - "@next/swc-linux-x64-gnu" "12.3.1" - "@next/swc-linux-x64-musl" "12.3.1" - "@next/swc-win32-arm64-msvc" "12.3.1" - "@next/swc-win32-ia32-msvc" "12.3.1" - "@next/swc-win32-x64-msvc" "12.3.1" + "@next/swc-android-arm-eabi" "13.1.6" + "@next/swc-android-arm64" "13.1.6" + "@next/swc-darwin-arm64" "13.1.6" + "@next/swc-darwin-x64" "13.1.6" + "@next/swc-freebsd-x64" "13.1.6" + "@next/swc-linux-arm-gnueabihf" "13.1.6" + "@next/swc-linux-arm64-gnu" "13.1.6" + "@next/swc-linux-arm64-musl" "13.1.6" + "@next/swc-linux-x64-gnu" "13.1.6" + "@next/swc-linux-x64-musl" "13.1.6" + "@next/swc-win32-arm64-msvc" "13.1.6" + "@next/swc-win32-ia32-msvc" "13.1.6" + "@next/swc-win32-x64-msvc" "13.1.6" + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" node-addon-api@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== +node-addon-api@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.1.0.tgz#49da1ca055e109a23d537e9de43c09cca21eb762" + integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA== + node-fetch@2.6.7, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -5257,6 +6026,19 @@ node-releases@^2.0.6: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== +node-releases@^2.0.8: + version "2.0.10" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" + integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== + +noms@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859" + integrity sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow== + dependencies: + inherits "^2.0.1" + readable-stream "~1.0.31" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -5361,6 +6143,23 @@ once@^1.3.0: dependencies: wrappy "1" +open@^8.4.0: + version "8.4.1" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.1.tgz#2ab3754c07f5d1f99a7a8d6a82737c95e3101cff" + integrity sha512-/4b7qZNhv6Uhd7jjnREh1NjnPxlTq+XNWPG88Ydkj5AILcA5m3ajvcg57pB24EQjKv0dK62XnDqk9c/hkIG5Kg== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +optimism@^0.16.1: + version "0.16.2" + resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.16.2.tgz#519b0c78b3b30954baed0defe5143de7776bf081" + integrity sha512-zWNbgWj+3vLEjZNIh/okkY2EUfX+vB9TJopzIZwT1xxaMqC5hRLLraePod4c5n4He08xuXNH+zhKFFCu390wiQ== + dependencies: + "@wry/context" "^0.7.0" + "@wry/trie" "^0.3.0" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -5373,10 +6172,12 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" p-limit@^3.0.2: version "3.1.0" @@ -5385,6 +6186,13 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + p-locate@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" @@ -5392,25 +6200,10 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-queue@^6.6.2: - version "6.6.2" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" - integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ== - dependencies: - eventemitter3 "^4.0.4" - p-timeout "^3.2.0" - -p-timeout@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" - integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - dependencies: - p-finally "^1.0.0" - -pako@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== pako@^2.0.2: version "2.1.0" @@ -5459,7 +6252,7 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pbkdf2@^3.0.16, pbkdf2@^3.0.17, pbkdf2@^3.0.9, pbkdf2@^3.1.2: +pbkdf2@^3.0.17, pbkdf2@^3.0.9: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -5490,6 +6283,13 @@ pirates@^4.0.1: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + postcss-import@^14.1.0: version "14.1.0" resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-14.1.0.tgz#a7333ffe32f0b8795303ee9e40215dac922781f0" @@ -5591,7 +6391,7 @@ prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" -protobufjs@6.11.3, protobufjs@^6.11.2, protobufjs@^6.8.8, protobufjs@~6.11.2, protobufjs@~6.11.3: +protobufjs@^6.11.2, protobufjs@^6.8.8, protobufjs@~6.11.2, protobufjs@~6.11.3: version "6.11.3" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== @@ -5620,10 +6420,10 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qrcode.react@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/qrcode.react/-/qrcode.react-3.1.0.tgz#5c91ddc0340f768316fbdb8fff2765134c2aecd8" - integrity sha512-oyF+Urr3oAMUG/OiOuONL3HXM+53wvuH3mtIWQrYmsXoAq0DkvZp2RYUWFSMFtbdOpuS++9v+WAkzNVkMlNW6Q== +qr.js@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/qr.js/-/qr.js-0.0.0.tgz#cace86386f59a0db8050fa90d9b6b0e88a1e364f" + integrity sha512-c4iYnWb+k2E+vYpRimHqSu575b1/wKl4XFeJGpFmrJQz5I88v9aY2czh7s0w36srfCM1sXgC/xpoJz5dJfq+OQ== query-string@6.13.5: version "6.13.5" @@ -5651,7 +6451,14 @@ randombytes@^2.0.1, randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -react-dom@18.2.0: +react-device-detect@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/react-device-detect/-/react-device-detect-2.2.3.tgz#97a7ae767cdd004e7c3578260f48cf70c036e7ca" + integrity sha512-buYY3qrCnQVlIFHrC5UcUoAj7iANs/+srdkwsnNjI7anr3Tt7UY6MqNxtMLlr0tMBied0O49UZVK8XKs3ZIiPw== + dependencies: + ua-parser-js "^1.0.33" + +react-dom@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== @@ -5669,7 +6476,7 @@ react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4: resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-modal@^3.15.1: +react-modal@^3.16.1: version "3.16.1" resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.16.1.tgz#34018528fc206561b1a5467fc3beeaddafb39b2b" integrity sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg== @@ -5686,6 +6493,14 @@ react-number-format@^5.1.0: dependencies: prop-types "^15.7.2" +react-qr-code@^2.0.11: + version "2.0.11" + resolved "https://registry.yarnpkg.com/react-qr-code/-/react-qr-code-2.0.11.tgz#444c759a2100424972e17135fbe0e32eaffa19e8" + integrity sha512-P7mvVM5vk9NjGdHMt4Z0KWeeJYwRAtonHTghZT2r+AASinLUUKQ9wfsGH2lPKsT++gps7hXmaiMGRvwTDEL9OA== + dependencies: + prop-types "^15.8.1" + qr.js "0.0.0" + react-resize-detector@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/react-resize-detector/-/react-resize-detector-7.1.2.tgz#8ef975dd8c3d56f9a5160ac382ef7136dcd2d86c" @@ -5737,7 +6552,7 @@ react-use-clipboard@^1.0.9: dependencies: copy-to-clipboard "^3.3.1" -react@18.2.0: +react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== @@ -5751,7 +6566,7 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" -readable-stream@^2.0.6: +readable-stream@^2.0.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -5773,6 +6588,16 @@ readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@~1.0.31: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -5812,6 +6637,20 @@ recharts@^2.2.0: recharts-scale "^0.4.4" reduce-css-calc "^2.1.8" +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== + dependencies: + resolve "^1.1.6" + +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + reduce-css-calc@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-2.1.8.tgz#7ef8761a28d614980dc0c982f772c93f7a99de03" @@ -5887,12 +6726,29 @@ remove-accents@0.4.2: resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.4.2.tgz#0a43d3aaae1e80db919e07ae254b285d9e1c7bb5" integrity sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA== +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.1.7, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1: +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -5910,6 +6766,11 @@ resolve@^2.0.0-next.3: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +response-iterator@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/response-iterator/-/response-iterator-0.2.6.tgz#249005fb14d2e4eeb478a3f735a28fd8b4c9f3da" + integrity sha512-pVzEEzrsg23Sh053rmDUvLSkGXluZio0qu8VT6ukrYuvtjVfCbDZH9d6PGXb8HZfzdNZt8feXv/jvUzlhRgLnw== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -5930,7 +6791,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: hash-base "^3.0.0" inherits "^2.0.1" -rlp@^2.2.4: +rlp@^2.2.3, rlp@^2.2.4: version "2.2.7" resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== @@ -5951,13 +6812,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@6: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -5984,12 +6838,35 @@ scheduler@^0.23.0: dependencies: loose-envify "^1.1.0" +schema-utils@^3.1.0, schema-utils@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + scrypt-js@3.0.1, scrypt-js@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== -secp256k1@^4.0.1, secp256k1@^4.0.2: +secp256k1@3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.7.1.tgz#12e473e0e9a7c2f2d4d4818e722ad0e14cc1e2f1" + integrity sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g== + dependencies: + bindings "^1.5.0" + bip66 "^1.1.5" + bn.js "^4.11.8" + create-hash "^1.2.0" + drbg.js "^1.0.1" + elliptic "^6.4.1" + nan "^2.14.0" + safe-buffer "^5.1.2" + +secp256k1@4.0.3, secp256k1@^4.0.1, secp256k1@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== @@ -5998,40 +6875,34 @@ secp256k1@^4.0.1, secp256k1@^4.0.2: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -secretjs@0.17.7: - version "0.17.7" - resolved "https://registry.yarnpkg.com/secretjs/-/secretjs-0.17.7.tgz#a1aef5866a35cf673be9ddd717d20729afd056ac" - integrity sha512-j39l9+vR2A8067QBqDDejS7LmRLgdkG4uRw2Ar6HMfzDGo26eTh7cIXVlVu/yHBumxtQzKun20epOXwuYHXjQg== +secp256k1@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-5.0.0.tgz#be6f0c8c7722e2481e9773336d351de8cddd12f7" + integrity sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA== dependencies: - "@iov/crypto" "2.1.0" - "@iov/encoding" "2.1.0" - "@iov/utils" "2.0.2" - axios "0.21.1" - curve25519-js "0.0.4" - fast-deep-equal "3.1.1" - js-crypto-hkdf "0.7.3" - miscreant "0.3.2" - pako "1.0.11" - protobufjs "6.11.3" - secure-random "1.1.2" - -secure-random@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/secure-random/-/secure-random-1.1.2.tgz#ed103b460a851632d420d46448b2a900a41e7f7c" - integrity sha512-H2bdSKERKdBV1SwoqYm6C0y+9EA94v6SUBOWO8kDndc4NoUih7Dv6Tsgma7zO1lv27wIvjlD0ZpMQk7um5dheQ== + elliptic "^6.5.4" + node-addon-api "^5.0.0" + node-gyp-build "^4.2.0" semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.5, semver@^7.3.7: +semver@^7.3.7: version "7.3.8" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== dependencies: lru-cache "^6.0.0" +serialize-javascript@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + dependencies: + randombytes "^2.1.0" + set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -6050,12 +6921,12 @@ sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -sha3@~2.1.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f" - integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg== +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== dependencies: - buffer "6.0.3" + kind-of "^6.0.2" shebang-command@^2.0.0: version "2.0.0" @@ -6069,6 +6940,23 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shelljs@^0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +shx@^0.3.2: + version "0.3.4" + resolved "https://registry.yarnpkg.com/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02" + integrity sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g== + dependencies: + minimist "^1.2.3" + shelljs "^0.8.5" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -6095,12 +6983,42 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + +snake-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" + integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== + dependencies: + dot-case "^3.0.4" + tslib "^2.0.3" + +snakecase-keys@^5.1.2, snakecase-keys@^5.4.1: + version "5.4.5" + resolved "https://registry.yarnpkg.com/snakecase-keys/-/snakecase-keys-5.4.5.tgz#1d452c1557faf8d68f17f04a4991ccfd27afa239" + integrity sha512-qSQVcgcWk8mQUN1miVGnRMAUye1dbj9+F9PVkR7wZUXNCidQwrl/kOKmoYf+WbH2ju6c9pXnlmbS2he7pb2/9A== + dependencies: + map-obj "^4.1.0" + snake-case "^3.0.4" + type-fest "^2.5.2" + source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map@^0.6.1: +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -6115,6 +7033,11 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== +store2@^2.12.0: + version "2.14.2" + resolved "https://registry.yarnpkg.com/store2/-/store2-2.14.2.tgz#56138d200f9fe5f582ad63bc2704dbc0e4a45068" + integrity sha512-siT1RiqlfQnGqgT/YzXVUNsom9S0H1OX+dpdGN1xkyYATo4I6sep5NmsRD/40s3IIOvlCq6akxkqG82urIZW1w== + strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" @@ -6129,7 +7052,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2 || 3 || 4": +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -6177,6 +7100,11 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -6191,7 +7119,7 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@^6.0.1: +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -6203,15 +7131,24 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== + dependencies: + is-hex-prefixed "1.0.0" + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -styled-jsx@5.0.7: - version "5.0.7" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.7.tgz#be44afc53771b983769ac654d355ca8d019dff48" - integrity sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA== +styled-jsx@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" + integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== + dependencies: + client-only "0.0.1" sucrase@^3.20.0: version "3.29.0" @@ -6246,6 +7183,13 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -6269,11 +7213,31 @@ svgo@^2.8.0: picocolors "^1.0.0" stable "^0.1.8" +swr@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/swr/-/swr-2.0.3.tgz#9fe59a17f55b0fdddccd76b7b2f723f9f8e2263e" + integrity sha512-sGvQDok/AHEWTPfhUWXEHBVEXmgGnuahyhmRQbjl9XBYxT/MSlAzvXEKQpyM++bMPaI52vcWS2HiKNaW7+9OFw== + dependencies: + use-sync-external-store "^1.2.0" + symbol-observable@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.3.tgz#5b521d3d07a43c351055fa43b8355b62d33fd16a" integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA== +symbol-observable@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" + integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== + +synckit@^0.8.4: + version "0.8.5" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" + integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== + dependencies: + "@pkgr/utils" "^2.3.1" + tslib "^2.5.0" + tailwindcss-border-gradient-radius@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/tailwindcss-border-gradient-radius/-/tailwindcss-border-gradient-radius-3.0.1.tgz#314180bcee52603b2afe30aa832c6d33574a19f1" @@ -6311,6 +7275,32 @@ tailwindcss@^3.2.1: quick-lru "^5.1.1" resolve "^1.22.1" +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.1.3: + version "5.3.6" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz#5590aec31aa3c6f771ce1b1acca60639eab3195c" + integrity sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ== + dependencies: + "@jridgewell/trace-mapping" "^0.3.14" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.0" + terser "^5.14.1" + +terser@^5.14.1: + version "5.16.3" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.3.tgz#3266017a9b682edfe019b8ecddd2abaae7b39c6b" + integrity sha512-v8wWLaS/xt3nE9dgKEWhNUFP6q4kngO5B8eYFUuebsu7Dw/UNAnpUod6UHo04jSSkv8TzKHjZDSd7EXdDQAl8Q== + dependencies: + "@jridgewell/source-map" "^0.3.2" + acorn "^8.5.0" + commander "^2.20.0" + source-map-support "~0.5.20" + text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -6330,6 +7320,22 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +through2@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +tiny-glob@^0.2.9: + version "0.2.9" + resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2" + integrity sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg== + dependencies: + globalyzer "0.1.0" + globrex "^0.1.2" + tiny-secp256k1@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz#7e224d2bee8ab8283f284e40e6b4acb74ffe047c" @@ -6375,6 +7381,13 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== +ts-invariant@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.10.3.tgz#3e048ff96e91459ffca01304dbc7f61c1f642f6c" + integrity sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ== + dependencies: + tslib "^2.1.0" + tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" @@ -6385,11 +7398,16 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + tslib@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" @@ -6402,6 +7420,16 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" +tweetnacl-util@^0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -6414,10 +7442,10 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-tagger@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/type-tagger/-/type-tagger-1.0.0.tgz#dc6297e52e17097c1b92b42c16816a18f631e7f4" - integrity sha512-FIPqqpmDgdaulCnRoKv1/d3U4xVBUrYn42QXWNP3XYmgfPUDuBUsgFOb9ntT0aIe0UsUP+lknpQ5d9Kn36RssA== +type-fest@^2.5.2: + version "2.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== typedarray-to-buffer@3.1.5: version "3.1.5" @@ -6436,6 +7464,11 @@ typescript@4.9.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== +ua-parser-js@^1.0.33: + version "1.0.33" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.33.tgz#f21f01233e90e7ed0f059ceab46eb190ff17f8f4" + integrity sha512-RqshF7TPTE0XLYAqmjlu5cLLuGdKrNu9O1KLA/qp39QtbZwuzwv1dT46DZSopoUMsYgXpB3Cv8a03FI8b74oFQ== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -6469,12 +7502,12 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== -unorm@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" - integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== -update-browserslist-db@^1.0.9: +update-browserslist-db@^1.0.10, update-browserslist-db@^1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== @@ -6494,6 +7527,11 @@ use-local-storage-state@^18.1.1: resolved "https://registry.yarnpkg.com/use-local-storage-state/-/use-local-storage-state-18.1.1.tgz#40e535aebed7770258e0a3a7b6923a86d9c0c52f" integrity sha512-09bl6q3mkSlkEt8KeBPCmdPEWEojWYF70Qbz+7wkfQX1feaFITM9m84+h0Jr6Cnf/IvpahkFh7UbX2VNN3ioTQ== +use-local-storage-state@^18.1.2: + version "18.1.2" + resolved "https://registry.yarnpkg.com/use-local-storage-state/-/use-local-storage-state-18.1.2.tgz#f131c0aa3803742ca261c547cdfd9d61e848581d" + integrity sha512-V+kYQNC5R0N/JDpsg6b4ED5UaItKJcSvbne68DwJDZWHxGMQBiF41ATktFIOyet3PIq30d2qtzVp/2aB6hQ8Bg== + use-sync-external-store@1.2.0, use-sync-external-store@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" @@ -6509,13 +7547,6 @@ utility-types@^3.10.0: resolved "https://registry.yarnpkg.com/utility-types/-/utility-types-3.10.0.tgz#ea4148f9a741015f05ed74fd615e1d20e6bed82b" integrity sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg== -vscode-generate-index-standalone@^1.6.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/vscode-generate-index-standalone/-/vscode-generate-index-standalone-1.7.1.tgz#de16fb3300f62281554bacd70ccc34d75b866179" - integrity sha512-N0lwDq5v0d6ghhXiZ3zGLVzZ66yyVeCf2YwxaX70t2G2J5KA9RRPAu8p5uuokXYThxubDiw+cNNXkFqiwh2/1w== - optionalDependencies: - fsevents "~2.3.2" - warning@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" @@ -6523,16 +7554,86 @@ warning@^4.0.3: dependencies: loose-envify "^1.0.0" +watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -"webpack-sources@^2.0.0 || ^3.0.0": +webpack-cli@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.0.1.tgz#95fc0495ac4065e9423a722dec9175560b6f2d9a" + integrity sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.0.1" + "@webpack-cli/info" "^2.0.1" + "@webpack-cli/serve" "^2.0.1" + colorette "^2.0.14" + commander "^9.4.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + +webpack-merge@^5.7.3: + version "5.8.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" + integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== + dependencies: + clone-deep "^4.0.1" + wildcard "^2.0.0" + +webpack-node-externals@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-3.0.0.tgz#1a3407c158d547a9feb4229a9e3385b7b60c9917" + integrity sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ== + +"webpack-sources@^2.0.0 || ^3.0.0", webpack-sources@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== +webpack@^5.75.0: + version "5.75.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.75.0.tgz#1e440468647b2505860e94c9ff3e44d5b582c152" + integrity sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^0.0.51" + "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/wasm-edit" "1.11.1" + "@webassemblyjs/wasm-parser" "1.11.1" + acorn "^8.7.1" + acorn-import-assertions "^1.7.6" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.10.0" + es-module-lexer "^0.9.0" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.1.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.1.3" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -6573,16 +7674,35 @@ wif@^2.0.6: dependencies: bs58check "<3.0.0" +wildcard@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" + integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + word-wrap@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + ws@7.5.3: version "7.5.3" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" @@ -6593,6 +7713,11 @@ ws@^7: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== +ws@^8.12.0: + version "8.12.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.1.tgz#c51e583d79140b5e42e39be48c934131942d4a8f" + integrity sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew== + xstream@^11.14.0: version "11.14.0" resolved "https://registry.yarnpkg.com/xstream/-/xstream-11.14.0.tgz#2c071d26b18310523b6877e86b4e54df068a9ae5" @@ -6601,11 +7726,16 @@ xstream@^11.14.0: globalthis "^1.0.1" symbol-observable "^2.0.3" -xtend@^4.0.2: +xtend@^4.0.2, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" @@ -6616,14 +7746,51 @@ yaml@^1.10.0, yaml@^1.10.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs@^16.1.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +zen-observable-ts@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz#6c6d9ea3d3a842812c6e9519209365a122ba8b58" + integrity sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg== + dependencies: + zen-observable "0.8.15" + +zen-observable@0.8.15: + version "0.8.15" + resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" + integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== + zustand@^4.1.4: version "4.1.5" resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.1.5.tgz#7402b511f5b23ccb0f9ba6d20ae01ec817e16eb6" integrity sha512-PsdRT8Bvq22Yyh1tvpgdHNE7OAeFKqJXUxtJvj1Ixw2B9O2YZ1M34ImQ+xyZah4wZrR4lENMoDUutKPpyXCQ/Q== dependencies: use-sync-external-store "1.2.0" + +zustand@^4.3.1: + version "4.3.3" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.3.tgz#c9113499074dde2d6d99c1b5f591e9329572c224" + integrity sha512-x2jXq8S0kfLGNwGh87nhRfEc2eZy37tSatpSoSIN+O6HIaBhgQHSONV/F9VNrNcBcKQu/E80K1DeHDYQC/zCrQ== + dependencies: + use-sync-external-store "1.2.0"