From 44ab98ae7894a865e5d9538205ac8d0954889f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezin=CC=81ski?= Date: Tue, 19 Nov 2024 15:28:16 +0100 Subject: [PATCH 1/5] governance manfiest --- hooks/useGovernanceAssets.ts | 9 +- .../instructions/Manifest/PlaceLimitOrder.tsx | 161 +++++++ pages/dao/[symbol]/proposal/new.tsx | 2 + utils/uiTypes/proposalCreationTypes.ts | 88 ++-- yarn.lock | 448 ++---------------- 5 files changed, 266 insertions(+), 442 deletions(-) create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx diff --git a/hooks/useGovernanceAssets.ts b/hooks/useGovernanceAssets.ts index f0f320b68..7e5ad27ee 100644 --- a/hooks/useGovernanceAssets.ts +++ b/hooks/useGovernanceAssets.ts @@ -165,6 +165,9 @@ export default function useGovernanceAssets() { name: 'Mango Market v4', image: '/img/mango.png', }, + [PackageEnum.Manifest]: { + name: 'Manifest', + }, [PackageEnum.MeanFinance]: { name: 'Mean Finance', image: '/img/meanfinance.png', @@ -590,7 +593,11 @@ export default function useGovernanceAssets() { ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███████ ██ ██ ██ ████ ██ ██ ██ ████ ██ ██ ██ ████ ██████ ███████ */ - + [Instructions.PlaceLimitOrder]: { + name: 'Place limit order', + packageId: PackageEnum.Manifest, + isVisible: canUseAnyInstruction, + }, [Instructions.MeanCreateAccount]: { name: 'Payment Stream: New account', packageId: PackageEnum.MeanFinance, diff --git a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx new file mode 100644 index 000000000..1a1b1fc74 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx @@ -0,0 +1,161 @@ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import { useContext, useEffect, useState } from 'react' +import { PublicKey } from '@solana/web3.js' +import * as yup from 'yup' +import { isFormValid, validatePubkey } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import { NewProposalContext } from '../../../new' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import { AccountType, AssetAccount } from '@utils/uiTypes/assets' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import UseMangoV4 from '../../../../../../../hooks/useMangoV4' +import useWalletOnePointOh from '@hooks/useWalletOnePointOh' +import ProgramSelector from '@components/Mango/ProgramSelector' +import useProgramSelector from '@components/Mango/useProgramSelector' + +interface PlaceLimitOrderForm { + governedAccount: AssetAccount | null + index: number + addressLookupTable: string + holdupTime: number +} + +const PlaceLimitOrder = ({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) => { + const wallet = useWalletOnePointOh() + const programSelectorHook = useProgramSelector() + + const { mangoClient, mangoGroup } = UseMangoV4( + programSelectorHook.program?.val, + programSelectorHook.program?.group + ) + const { assetAccounts } = useGovernanceAssets() + const solAccounts = assetAccounts.filter( + (x) => + x.type === AccountType.SOL && + mangoGroup?.admin && + x.extensions.transferAddress?.equals(mangoGroup.admin) + ) + const shouldBeGoverned = !!(index !== 0 && governance) + const [form, setForm] = useState({ + governedAccount: null, + addressLookupTable: '', + index: 0, + holdupTime: 0, + }) + const [formErrors, setFormErrors] = useState({}) + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + setFormErrors(validationErrors) + return isValid + } + async function getInstruction(): Promise { + const isValid = await validateInstruction() + let serializedInstruction = '' + if ( + isValid && + form.governedAccount?.governance?.account && + wallet?.publicKey + ) { + const ix = await mangoClient!.program.methods + .altSet(Number(form.index)) + .accounts({ + group: mangoGroup!.publicKey, + admin: form.governedAccount.extensions.transferAddress, + addressLookupTable: new PublicKey(form.addressLookupTable), + }) + .instruction() + + serializedInstruction = serializeInstructionToBase64(ix) + } + const obj: UiInstruction = { + serializedInstruction: serializedInstruction, + isValid, + governance: form.governedAccount?.governance, + customHoldUpTime: form.holdupTime, + } + return obj + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + addressLookupTable: yup + .string() + .required() + .test('is-valid-address', 'Please enter a valid PublicKey', (value) => + value ? validatePubkey(value) : true + ), + index: yup.string().required(), + }) + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance: governance, + options: solAccounts, + }, + { + label: 'Instruction hold up time (days)', + initialValue: form.holdupTime, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'holdupTime', + }, + { + label: 'Address Lookup Table', + initialValue: form.addressLookupTable, + type: InstructionInputType.INPUT, + name: 'addressLookupTable', + }, + { + label: 'Index', + initialValue: form.index, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'index', + }, + ] + + return ( + <> + + {form && ( + + )} + + ) +} + +export default PlaceLimitOrder diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index 30fe0ba64..2121b9f1e 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -146,6 +146,7 @@ import SymmetryEditBasket from './components/instructions/Symmetry/SymmetryEditB import SymmetryDeposit from './components/instructions/Symmetry/SymmetryDeposit' import SymmetryWithdraw from './components/instructions/Symmetry/SymmetryWithdraw' import PythUpdatePoolAuthority from './components/instructions/Pyth/PythUpdatePoolAuthority' +import PlaceLimitOrder from './components/instructions/Manifest/PlaceLimitOrder' const TITLE_LENGTH_LIMIT = 130 // the true length limit is either at the tx size level, and maybe also the total account size level (I can't remember) @@ -551,6 +552,7 @@ const New = () => { [Instructions.WithdrawValidatorStake]: WithdrawValidatorStake, [Instructions.DelegateStake]: DelegateStake, [Instructions.RemoveStakeLock]: RemoveLockup, + [Instructions.PlaceLimitOrder]: PlaceLimitOrder, [Instructions.SplitStake]: SplitStake, [Instructions.DifferValidatorStake]: null, [Instructions.TransferDomainName]: TransferDomainName, diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index d0aaa9eaa..ddf96dbea 100644 --- a/utils/uiTypes/proposalCreationTypes.ts +++ b/utils/uiTypes/proposalCreationTypes.ts @@ -25,6 +25,7 @@ export enum PackageEnum { Serum, Solend, Symmetry, + Manifest, Squads, Switchboard, VsrPlugin, @@ -121,7 +122,8 @@ export interface ClawbackForm { holdupTime: number } -export interface SendTokenCompactViewForm extends Omit { +export interface SendTokenCompactViewForm + extends Omit { destinationAccount: string[] amount: (number | undefined)[] txDollarAmount: (string | undefined)[] @@ -329,6 +331,7 @@ export enum Instructions { DistributionFillVaults, DelegateStake, RemoveStakeLock, + PlaceLimitOrder, Grant, InitSolendObligationAccount, JoinDAO, @@ -397,7 +400,7 @@ export enum Instructions { SymmetryCreateBasket, SymmetryEditBasket, SymmetryDeposit, - SymmetryWithdraw + SymmetryWithdraw, } export interface ComponentInstructionData { @@ -556,57 +559,56 @@ export interface DualFinanceVoteDepositForm { } export interface SymmetryCreateBasketForm { - governedAccount?: AssetAccount, - basketType: number, - basketName: string, - basketSymbol: string, - basketMetadataUrl: string, + governedAccount?: AssetAccount + basketType: number + basketName: string + basketSymbol: string + basketMetadataUrl: string basketComposition: { - name: string, - symbol: string, - token: PublicKey; - weight: number; - }[], - rebalanceThreshold: number, - rebalanceSlippageTolerance: number, - depositFee: number, - feeCollectorAddress:string, - liquidityProvision: boolean, - liquidityProvisionRange: number, + name: string + symbol: string + token: PublicKey + weight: number + }[] + rebalanceThreshold: number + rebalanceSlippageTolerance: number + depositFee: number + feeCollectorAddress: string + liquidityProvision: boolean + liquidityProvisionRange: number } - export interface SymmetryEditBasketForm { - governedAccount?: AssetAccount, - basketAddress?: PublicKey, - basketType: number, - basketName: string, - basketSymbol: string, - basketMetadataUrl: string, + governedAccount?: AssetAccount + basketAddress?: PublicKey + basketType: number + basketName: string + basketSymbol: string + basketMetadataUrl: string basketComposition: { - name: string, - symbol: string, - token: PublicKey; - weight: number; - }[], - rebalanceThreshold: number, - rebalanceSlippageTolerance: number, - depositFee: number, - feeCollectorAddress:string, - liquidityProvision: boolean, - liquidityProvisionRange: number, + name: string + symbol: string + token: PublicKey + weight: number + }[] + rebalanceThreshold: number + rebalanceSlippageTolerance: number + depositFee: number + feeCollectorAddress: string + liquidityProvision: boolean + liquidityProvisionRange: number } export interface SymmetryDepositForm { - governedAccount?: AssetAccount, - basketAddress?: PublicKey, - depositToken?: PublicKey, - depositAmount: number, + governedAccount?: AssetAccount + basketAddress?: PublicKey + depositToken?: PublicKey + depositAmount: number } export interface SymmetryWithdrawForm { - governedAccount?: AssetAccount, - basketAddress?: PublicKey, - withdrawAmount: number, + governedAccount?: AssetAccount + basketAddress?: PublicKey + withdrawAmount: number withdrawType: number } diff --git a/yarn.lock b/yarn.lock index bc453b9b2..2a3b5ec72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1194,16 +1194,11 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.9.0": +"@eslint/js@9.9.0", "@eslint/js@^9.8.0": version "9.9.0" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.9.0.tgz#d8437adda50b3ed4401964517b64b4f59b0e2638" integrity sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug== -"@eslint/js@^9.8.0": - version "9.8.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.8.0.tgz#ae9bc14bb839713c5056f5018bcefa955556d3a4" - integrity sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA== - "@eslint/object-schema@^2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" @@ -3216,7 +3211,7 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== -"@pythnetwork/client@2.17.0", "@pythnetwork/client@^2.5.1": +"@pythnetwork/client@2.17.0": version "2.17.0" resolved "https://registry.yarnpkg.com/@pythnetwork/client/-/client-2.17.0.tgz#b155af06958f4b729bfee1c07130c556598cf168" integrity sha512-hv285vehmLH6N762Z4jqvPTM+hCYnXQaUp6DMgLUpDHvE0mTbwW9PvlxYoUJZGtyeCDkgn9HrTWXPtnaXTRr+Q== @@ -3225,7 +3220,7 @@ "@coral-xyz/borsh" "^0.26.0" buffer "^6.0.1" -"@pythnetwork/client@~2.21.1": +"@pythnetwork/client@^2.5.1", "@pythnetwork/client@~2.21.1": version "2.21.1" resolved "https://registry.yarnpkg.com/@pythnetwork/client/-/client-2.21.1.tgz#524a278432dcec14fcf8ba67dfd4720df19b5cc3" integrity sha512-nSpI1qjmbyrFTetfJSDqjzT+AAJYG3xUmDYFnExAFrnhiO5C8FPvMw1zkSYXWRvEwHFISKJLsn1sTIqU9ifaCA== @@ -4803,15 +4798,7 @@ "@solana/codecs" "2.0.0-preview.4" "@solana/spl-type-length-value" "0.1.0" -"@solana/spl-token-metadata@^0.1.2", "@solana/spl-token-metadata@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@solana/spl-token-metadata/-/spl-token-metadata-0.1.4.tgz#5cdc3b857a8c4a6877df24e24a8648c4132d22ba" - integrity sha512-N3gZ8DlW6NWDV28+vCCDJoTqaCZiF/jDUnk3o8GRkAFzHObiR60Bs1gXHBa8zCPdvOwiG6Z3dg5pg7+RW6XNsQ== - dependencies: - "@solana/codecs" "2.0.0-preview.2" - "@solana/spl-type-length-value" "0.1.0" - -"@solana/spl-token-metadata@^0.1.3": +"@solana/spl-token-metadata@^0.1.2", "@solana/spl-token-metadata@^0.1.3", "@solana/spl-token-metadata@^0.1.4": version "0.1.5" resolved "https://registry.yarnpkg.com/@solana/spl-token-metadata/-/spl-token-metadata-0.1.5.tgz#91616470d6862ec6b762e6cfcf882b8a8a24b1e8" integrity sha512-DSBlo7vjuLe/xvNn75OKKndDBkFxlqjLdWlq6rf40StnrhRn7TDntHGLZpry1cf3uzQFShqeLROGNPAJwvkPnA== @@ -5652,22 +5639,7 @@ dependencies: tslib "^2.4.0" -"@switchboard-xyz/common@^2.3.16": - version "2.4.4" - resolved "https://registry.yarnpkg.com/@switchboard-xyz/common/-/common-2.4.4.tgz#4896d526d67c10a8131e5ea4044a2e43a7a8b999" - integrity sha512-Pcny+VzenXPCuCOj1W8lBm/S7bDSc1CU6T35Tt0o2bTDnzHgVGtYJ/OLqgPhqGhZ/fjMwrRiCPPIkuavK0Ik3Q== - dependencies: - "@solana/web3.js" "^1.93.0" - axios "^1.7.2" - big.js "^6.2.1" - bn.js "^5.2.1" - bs58 "^5.0.0" - cron-validator "^1.3.1" - decimal.js "^10.4.3" - lodash "^4.17.21" - protobufjs "^7.2.6" - -"@switchboard-xyz/common@^2.4.4", "@switchboard-xyz/common@^2.4.7": +"@switchboard-xyz/common@^2.3.16", "@switchboard-xyz/common@^2.4.4", "@switchboard-xyz/common@^2.4.7": version "2.4.7" resolved "https://registry.yarnpkg.com/@switchboard-xyz/common/-/common-2.4.7.tgz#7b582e7cdd4c17a3d4e36beead520a5363f4f0a8" integrity sha512-gkUuy7n15gq+D0IKkqKsSqgWb1w5t3rfpjdTkJX0AAlL75QXZfi5fL4Ttwb22ALOWYLYuvYCD0uXFyczgMMkIQ== @@ -7250,18 +7222,7 @@ array-buffer-byte-length@^1.0.1: call-bind "^1.0.5" is-array-buffer "^3.0.4" -array-includes@^3.1.5: - version "3.1.6" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - is-string "^1.0.7" - -array-includes@^3.1.7, array-includes@^3.1.8: +array-includes@^3.1.5, array-includes@^3.1.7, array-includes@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== @@ -7489,12 +7450,7 @@ autoprefixer@^9.6.1: postcss "^7.0.32" postcss-value-parser "^4.1.0" -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -available-typed-arrays@^1.0.7: +available-typed-arrays@^1.0.5, available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== @@ -7551,16 +7507,7 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^1.1.3, axios@^1.3.6, axios@^1.4.0, axios@^1.6.2, axios@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" - integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -axios@^1.7.4: +axios@^1.1.3, axios@^1.3.6, axios@^1.4.0, axios@^1.6.2, axios@^1.7.2, axios@^1.7.4: version "1.7.5" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.5.tgz#21eed340eb5daf47d29b6e002424b3e88c8c54b1" integrity sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw== @@ -8057,15 +8004,7 @@ caip@~1.1.0: resolved "https://registry.yarnpkg.com/caip/-/caip-1.1.0.tgz#0ccd5bf1bff822459389ccec0a8555712a30c374" integrity sha512-yOO3Fu4ygyKYAdznuoaqschMKIZzcdgyMpBNtrIfrUhnOeaOWG+dh0c13wcOS6B/46IGGbncoyzJlio79jU7rw== -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" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== @@ -9315,15 +9254,7 @@ define-data-property@^1.0.1, define-data-property@^1.1.4: es-errors "^1.3.0" gopd "^1.0.1" -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" - integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -define-properties@^1.2.0, define-properties@^1.2.1: +define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -9723,7 +9654,7 @@ error-polyfill@^0.1.3: o3 "^1.0.3" u3 "^0.1.1" -es-abstract@^1.17.5, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: +es-abstract@^1.17.5, es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: version "1.23.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== @@ -9775,37 +9706,6 @@ es-abstract@^1.17.5, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23 unbox-primitive "^1.0.2" which-typed-array "^1.1.15" -es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.20.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.5.tgz#e6dc99177be37cacda5988e692c3fa8b218e95d2" - integrity sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" - get-symbol-description "^1.0.0" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-weakref "^1.0.2" - object-inspect "^1.12.2" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - unbox-primitive "^1.0.2" - es-define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" @@ -9868,14 +9768,7 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" -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" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-shim-unscopables@^1.0.2: +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== @@ -9975,16 +9868,11 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@9.1.0: +eslint-config-prettier@9.1.0, eslint-config-prettier@^9.0.0: version "9.1.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== -eslint-config-prettier@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f" - integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw== - eslint-import-resolver-node@^0.3.9: version "0.3.9" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" @@ -10074,12 +9962,7 @@ eslint-scope@^8.0.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== - -eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== @@ -10710,17 +10593,7 @@ function-bind@^1.1.1, function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -function.prototype.name@^1.1.6: +function.prototype.name@^1.1.5, function.prototype.name@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== @@ -10764,16 +10637,7 @@ get-func-name@^2.0.0, get-func-name@^2.0.2: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.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" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== @@ -10821,15 +10685,7 @@ get-stream@^8.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -get-symbol-description@^1.0.2: +get-symbol-description@^1.0.0, get-symbol-description@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== @@ -11015,14 +10871,7 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-property-descriptors@^1.0.2: +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== @@ -11039,14 +10888,7 @@ has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has-tostringtag@^1.0.2: +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== @@ -11082,14 +10924,7 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== - dependencies: - function-bind "^1.1.2" - -hasown@^2.0.1, hasown@^2.0.2: +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -11265,12 +11100,7 @@ iframe-resizer@^4.3.0: resolved "https://registry.yarnpkg.com/iframe-resizer/-/iframe-resizer-4.3.6.tgz#61d92c1adefe5d416bff4fbf80c7f1f74be70ec0" integrity sha512-wz0WodRIF6eP0oGQa5NIP1yrITAZ59ZJvVaVJqJRjaeCtfm461vy2C3us6CKx0e7pooqpIGLpVMSTzrfAjX9Sg== -ignore@^5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.1.tgz#c2b1f76cb999ede1502f3a226a9310fdfe88d46c" - integrity sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA== - -ignore@^5.3.1: +ignore@^5.2.0, ignore@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== @@ -11370,16 +11200,7 @@ inquirer@^8.2.0: through "^2.3.6" wrap-ansi "^7.0.0" -internal-slot@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.4.tgz#8551e7baf74a7a6ba5f749cfb16aa60722f0d6f3" - integrity sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - side-channel "^1.0.4" - -internal-slot@^1.0.7: +internal-slot@^1.0.3, internal-slot@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== @@ -11507,14 +11328,7 @@ is-color-stop@^1.1.0: rgb-regex "^1.0.1" rgba-regex "^1.0.0" -is-core-module@^2.13.0: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== - dependencies: - hasown "^2.0.0" - -is-core-module@^2.13.1: +is-core-module@^2.13.0, is-core-module@^2.13.1: version "2.15.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.0.tgz#71c72ec5442ace7e76b306e9d48db361f22699ea" integrity sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA== @@ -11605,12 +11419,7 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -is-map@^2.0.1, is-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" - integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== - -is-map@^2.0.3: +is-map@^2.0.1, is-map@^2.0.2, is-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== @@ -11623,12 +11432,7 @@ is-nan@^1.2.1: call-bind "^1.0.0" define-properties "^1.1.3" -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-negative-zero@^2.0.3: +is-negative-zero@^2.0.2, is-negative-zero@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== @@ -11702,24 +11506,12 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA== -is-set@^2.0.1, is-set@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" - integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== - -is-set@^2.0.3: +is-set@^2.0.1, is-set@^2.0.2, is-set@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-shared-array-buffer@^1.0.3: +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== @@ -11755,18 +11547,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.3: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -is-typed-array@^1.1.13: +is-typed-array@^1.1.10, is-typed-array@^1.1.13, is-typed-array@^1.1.3: version "1.1.13" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== @@ -11783,12 +11564,7 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-weakmap@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" - integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== - -is-weakmap@^2.0.2: +is-weakmap@^2.0.1, is-weakmap@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== @@ -11800,15 +11576,7 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-weakset@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" - integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -is-weakset@^2.0.3: +is-weakset@^2.0.1, is-weakset@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007" integrity sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ== @@ -12501,14 +12269,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -json5@^1.0.2: +json5@^1.0.1, json5@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== @@ -13970,12 +13731,7 @@ object-hash@^2.2.0: resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== -object-inspect@^1.12.2, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - -object-inspect@^1.13.1: +object-inspect@^1.12.2, object-inspect@^1.13.1, object-inspect@^1.9.0: version "1.13.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== @@ -13993,17 +13749,7 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.3, object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.assign@^4.1.5: +object.assign@^4.1.3, object.assign@^4.1.4, object.assign@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== @@ -15559,16 +15305,7 @@ regenerator-runtime@^0.14.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexp.prototype.flags@^1.5.2: +regexp.prototype.flags@^1.4.3, regexp.prototype.flags@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== @@ -15881,16 +15618,7 @@ safe-json-utils@^1.1.1: resolved "https://registry.yarnpkg.com/safe-json-utils/-/safe-json-utils-1.1.1.tgz#0e883874467d95ab914c3f511096b89bfb3e63b1" integrity sha512-SAJWGKDs50tAbiDXLf89PDwt9XYkWyANFWVzn4dTXl5QyI8t2o/bW5/OJl3lvc2WVU4MEpTo9Yz5NVFNsp+OJQ== -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -safe-regex-test@^1.0.3: +safe-regex-test@^1.0.0, safe-regex-test@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== @@ -15977,28 +15705,16 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== -semver@7.x, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, 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" - -semver@^6.0.0, 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.x, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.6.0: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -semver@^6.3.1: +semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.6.0: - version "7.6.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" - integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== - serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -16073,16 +15789,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -side-channel@^1.0.6: +side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== @@ -16406,16 +16113,7 @@ string.prototype.trim@^1.2.9: es-abstract "^1.23.0" es-object-atoms "^1.0.0" -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.8: +string.prototype.trimend@^1.0.6, string.prototype.trimend@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== @@ -16424,16 +16122,7 @@ string.prototype.trimend@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.8: +string.prototype.trimstart@^1.0.6, string.prototype.trimstart@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== @@ -17082,7 +16771,7 @@ ts-toolbelt@^6.15.1: resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz#cb3b43ed725cb63644782c64fbcad7d8f28c0a83" integrity sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A== -tsconfig-paths@3.14.1, tsconfig-paths@^3.5.0: +tsconfig-paths@3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== @@ -17092,7 +16781,7 @@ tsconfig-paths@3.14.1, tsconfig-paths@^3.5.0: minimist "^1.2.6" strip-bom "^3.0.0" -tsconfig-paths@^3.15.0: +tsconfig-paths@^3.15.0, tsconfig-paths@^3.5.0: version "3.15.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== @@ -17117,12 +16806,7 @@ tslib@2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" - integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== - -tslib@^2.6.2: +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== @@ -17808,17 +17492,7 @@ which-builtin-type@^1.1.3: which-collection "^1.0.2" which-typed-array "^1.1.15" -which-collection@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" - integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== - dependencies: - is-map "^2.0.1" - is-set "^2.0.1" - is-weakmap "^2.0.1" - is-weakset "^2.0.1" - -which-collection@^1.0.2: +which-collection@^1.0.1, which-collection@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== @@ -17833,7 +17507,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== -which-typed-array@^1.1.14, which-typed-array@^1.1.15: +which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2, which-typed-array@^1.1.8: version "1.1.15" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== @@ -17844,18 +17518,6 @@ which-typed-array@^1.1.14, which-typed-array@^1.1.15: gopd "^1.0.1" has-tostringtag "^1.0.2" -which-typed-array@^1.1.2, which-typed-array@^1.1.8: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -17875,16 +17537,11 @@ wonka@^6.0.0, wonka@^6.1.2: resolved "https://registry.yarnpkg.com/wonka/-/wonka-6.1.2.tgz#2c66fa5b26a12f002a03619b988258313d0b5352" integrity sha512-zNrXPMccg/7OEp9tSfFkMgTvhhowqasiSHdJ3eCZolXxVTV/aT6HUTofoZk9gwRbGoFey/Nss3JaZKUMKMbofg== -word-wrap@^1.2.5: +word-wrap@^1.2.5, word-wrap@~1.2.3: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -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== - workerpool@6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" @@ -17970,12 +17627,7 @@ ws@^7.2.0, ws@^7.3.1, ws@^7.4.0, ws@^7.5.1, ws@^7.5.10: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.11.0, ws@^8.16.0, ws@^8.5.0: - version "8.16.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" - integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== - -ws@^8.18.0: +ws@^8.11.0, ws@^8.16.0, ws@^8.18.0, ws@^8.5.0: version "8.18.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== From d177ce76a9023efe2d7090780eabdb93e0e34dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezin=CC=81ski?= Date: Wed, 27 Nov 2024 23:27:02 +0100 Subject: [PATCH 2/5] limit orders --- package.json | 1 + .../instructions/Manifest/PlaceLimitOrder.tsx | 161 +++--- yarn.lock | 469 +++++++++++++++++- 3 files changed, 564 insertions(+), 67 deletions(-) diff --git a/package.json b/package.json index 204878319..a8283d633 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ }, "dependencies": { "@blockworks-foundation/mango-mints-redemption": "0.0.11", + "@cks-systems/manifest-sdk": "0.1.71", "@blockworks-foundation/mango-v4": "0.33.7", "@blockworks-foundation/mango-v4-settings": "0.14.24", "@blockworks-foundation/mangolana": "0.0.18", diff --git a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx index 1a1b1fc74..574358e7d 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx @@ -9,19 +9,27 @@ import useGovernanceAssets from '@hooks/useGovernanceAssets' import { Governance } from '@solana/spl-governance' import { ProgramAccount } from '@solana/spl-governance' import { serializeInstructionToBase64 } from '@solana/spl-governance' -import { AccountType, AssetAccount } from '@utils/uiTypes/assets' +import { AssetAccount } from '@utils/uiTypes/assets' import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' -import UseMangoV4 from '../../../../../../../hooks/useMangoV4' import useWalletOnePointOh from '@hooks/useWalletOnePointOh' import ProgramSelector from '@components/Mango/ProgramSelector' import useProgramSelector from '@components/Mango/useProgramSelector' +import { ManifestClient, Market } from '@cks-systems/manifest-sdk' +import useLegacyConnectionContext from '@hooks/useLegacyConnectionContext' +import { useRealmProposalsQuery } from '@hooks/queries/proposal' +import tokenPriceService from '@utils/services/tokenPrice' +import { string } from 'superstruct' interface PlaceLimitOrderForm { governedAccount: AssetAccount | null - index: number - addressLookupTable: string - holdupTime: number + market: string + amount: string + price: string + side: { + name: string + value: string + } } const PlaceLimitOrder = ({ @@ -32,25 +40,34 @@ const PlaceLimitOrder = ({ governance: ProgramAccount | null }) => { const wallet = useWalletOnePointOh() - const programSelectorHook = useProgramSelector() - - const { mangoClient, mangoGroup } = UseMangoV4( - programSelectorHook.program?.val, - programSelectorHook.program?.group - ) + const connection = useLegacyConnectionContext() + const proposals = useRealmProposalsQuery().data const { assetAccounts } = useGovernanceAssets() - const solAccounts = assetAccounts.filter( - (x) => - x.type === AccountType.SOL && - mangoGroup?.admin && - x.extensions.transferAddress?.equals(mangoGroup.admin) - ) + const [availableMarkets, setAvailableMarkets] = useState< + { + name: string + value: string + quote: string + base: string + }[] + >([]) + const sideOptions = [ + { + name: 'Buy', + value: 'Buy', + }, + { + name: 'Sell', + value: 'Sell', + }, + ] const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, - addressLookupTable: '', - index: 0, - holdupTime: 0, + market: '', + amount: '0', + price: '0', + side: sideOptions[0], }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) @@ -68,26 +85,62 @@ const PlaceLimitOrder = ({ form.governedAccount?.governance?.account && wallet?.publicKey ) { - const ix = await mangoClient!.program.methods - .altSet(Number(form.index)) - .accounts({ - group: mangoGroup!.publicKey, - admin: form.governedAccount.extensions.transferAddress, - addressLookupTable: new PublicKey(form.addressLookupTable), - }) - .instruction() + const mClient = await ManifestClient.getClientForMarketNoPrivateKey( + connection.current, + PublicKey.default, + form.governedAccount.governance.nativeTreasuryAddress + ) + const ix = await mClient.placeOrderIx({ + numBaseTokens: Number(form.amount), + tokenPrice: Number(form.price), + isBid: form.side.value === 'Buy', + lastValidSlot: 0, + //Limit order is 0, there is import problem in sdk + orderType: 0, + clientOrderId: proposals!.length, + }) serializedInstruction = serializeInstructionToBase64(ix) } const obj: UiInstruction = { serializedInstruction: serializedInstruction, isValid, governance: form.governedAccount?.governance, - customHoldUpTime: form.holdupTime, + customHoldUpTime: 0, } return obj } + useEffect(() => { + const getMarkets = async () => { + const marketAccounts = await ManifestClient.getMarketProgramAccounts( + connection.current + ) + + const markets = marketAccounts + .map((x) => + Market.loadFromBuffer({ + address: x.pubkey, + buffer: x.account.data, + }) + ) + .sort((a, b) => Number(b.quoteVolume()) - Number(a.quoteVolume())) + .map((x) => ({ + name: `${ + tokenPriceService.getTokenInfo(x.baseMint().toBase58())?.name + }/${tokenPriceService.getTokenInfo(x.quoteMint().toBase58())?.name}`, + value: x.address.toBase58(), + quote: x.quoteMint().toBase58(), + base: x.baseMint().toBase58(), + })) + + setAvailableMarkets(markets) + } + if (connection && assetAccounts.length) { + getMarkets() + } + }, [connection, assetAccounts]) + useEffect(() => { handleSetInstructions( { governedAccount: form.governedAccount?.governance, getInstruction }, @@ -100,15 +153,25 @@ const PlaceLimitOrder = ({ .object() .nullable() .required('Program governed account is required'), - addressLookupTable: yup - .string() - .required() - .test('is-valid-address', 'Please enter a valid PublicKey', (value) => - value ? validatePubkey(value) : true - ), - index: yup.string().required(), }) const inputs: InstructionInput[] = [ + { + label: 'Market', + initialValue: form.market, + name: 'market', + type: InstructionInputType.SELECT, + options: availableMarkets, + }, + { + label: 'Side', + initialValue: form.side, + name: 'side', + type: InstructionInputType.SELECT, + options: sideOptions, + }, + //check quote and base + //check sell or buy + //validate if there is available quote or base in treasury { label: 'Governance', initialValue: form.governedAccount, @@ -116,35 +179,13 @@ const PlaceLimitOrder = ({ type: InstructionInputType.GOVERNED_ACCOUNT, shouldBeGoverned: shouldBeGoverned as any, governance: governance, - options: solAccounts, - }, - { - label: 'Instruction hold up time (days)', - initialValue: form.holdupTime, - type: InstructionInputType.INPUT, - inputType: 'number', - name: 'holdupTime', - }, - { - label: 'Address Lookup Table', - initialValue: form.addressLookupTable, - type: InstructionInputType.INPUT, - name: 'addressLookupTable', - }, - { - label: 'Index', - initialValue: form.index, - type: InstructionInputType.INPUT, - inputType: 'number', - name: 'index', + options: assetAccounts, + assetType: 'token', }, ] return ( <> - {form && ( =3.0.0", "@urql/core@^3.0.3": version "3.1.1" resolved "https://registry.yarnpkg.com/@urql/core/-/core-3.1.1.tgz#a49cd572360d01f2469a786b294fba2269a65e53" @@ -7096,7 +7215,7 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== -ansicolors@^0.3.2: +ansicolors@^0.3.2, ansicolors@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" integrity sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg== @@ -7618,6 +7737,11 @@ base-x@^4.0.0: resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== +base-x@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-5.0.0.tgz#6d835ceae379130e1a4cb846a70ac4746f28ea9b" + integrity sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ== + base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -7692,6 +7816,11 @@ bindings@^1.3.0, bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" +bintrees@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bintrees/-/bintrees-1.0.2.tgz#49f896d6e858a4a499df85c38fb399b9aff840f8" + integrity sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw== + bip39-light@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/bip39-light/-/bip39-light-1.0.7.tgz#06a72f251b89389a136d3f177f29b03342adc5ba" @@ -7896,6 +8025,13 @@ bs58@^5.0.0: dependencies: base-x "^4.0.0" +bs58@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-6.0.0.tgz#a2cda0130558535dd281a2f8697df79caaf425d8" + integrity sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw== + dependencies: + base-x "^5.0.0" + bs58check@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" @@ -8021,7 +8157,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0, camelcase@^6.2.0, camelcase@^6.3.0: +camelcase@^6.0.0, camelcase@^6.2.0, camelcase@^6.2.1, camelcase@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -8126,6 +8262,16 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +character-entities-html4@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz#1f1adb940c971a4b22ba39ddca6b618dc6e56b2b" + integrity sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA== + +character-entities-legacy@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz#76bc83a90738901d7bc223a9e93759fdd560125b" + integrity sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ== + character-entities@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.2.tgz#2d09c2e72cd9523076ccb21157dff66ad43fcc22" @@ -8416,6 +8562,11 @@ commander@^4.0.0, commander@^4.0.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + commander@^6.2.0: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" @@ -9358,6 +9509,13 @@ detective@^5.2.0: defined "^1.0.0" minimist "^1.2.6" +devlop@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/devlop/-/devlop-1.1.0.tgz#4db7c2ca4dc6e0e834c30be70c94bbc976dc7018" + integrity sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA== + dependencies: + dequal "^2.0.0" + did-resolver@^3.0.1, did-resolver@^3.2.0, did-resolver@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-3.2.2.tgz#6f4e252a810f785d1b28a10265fad6dffee25158" @@ -9561,6 +9719,11 @@ emittery@^0.13.1: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== +emoji-regex-xs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz#e8af22e5d9dbd7f7f22d280af3d19d2aab5b0724" + integrity sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -10435,6 +10598,15 @@ filter-obj@^1.1.0: resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== +find-process@^1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/find-process/-/find-process-1.4.7.tgz#8c76962259216c381ef1099371465b5b439ea121" + integrity sha512-/U4CYp1214Xrp3u3Fqr9yNynUrr5Le4y0SsJh2lMDDSbpwYSz3M2SMWQC+wqcx79cN8PQtHQIL8KnuY9M66fdg== + dependencies: + chalk "^4.0.0" + commander "^5.1.0" + debug "^4.1.1" + find-root@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" @@ -10718,7 +10890,7 @@ glob@7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^10.3.10: +glob@^10.3.10, glob@^10.3.7: version "10.4.5" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== @@ -10915,6 +11087,30 @@ hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: dependencies: function-bind "^1.1.2" +hast-util-to-html@^9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz#a9999a0ba6b4919576a9105129fead85d37f302b" + integrity sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg== + dependencies: + "@types/hast" "^3.0.0" + "@types/unist" "^3.0.0" + ccount "^2.0.0" + comma-separated-tokens "^2.0.0" + hast-util-whitespace "^3.0.0" + html-void-elements "^3.0.0" + mdast-util-to-hast "^13.0.0" + property-information "^6.0.0" + space-separated-tokens "^2.0.0" + stringify-entities "^4.0.0" + zwitch "^2.0.4" + +hast-util-whitespace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz#7778ed9d3c92dd9e8c5c8f648a49c21fc51cb621" + integrity sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw== + dependencies: + "@types/hast" "^3.0.0" + he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -10973,6 +11169,11 @@ html-tags@^3.1.0: resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.2.0.tgz#dbb3518d20b726524e4dd43de397eb0a95726961" integrity sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg== +html-void-elements@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-3.0.0.tgz#fc9dbd84af9e747249034d4d62602def6517f1d7" + integrity sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg== + http-errors@^1.7.2: version "1.8.1" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" @@ -12405,6 +12606,13 @@ 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== +linkify-it@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" + integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== + dependencies: + uc.micro "^2.0.0" + lint-staged@10.0.10: version "10.0.10" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.0.10.tgz#d14d33ee02a31a31ad36cf9aa7973fc156c461b5" @@ -12666,6 +12874,11 @@ lru-cache@^10.0.2, lru-cache@^10.2.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" @@ -12697,6 +12910,18 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" +markdown-it@^14.1.0: + version "14.1.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" + integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== + dependencies: + argparse "^2.0.1" + entities "^4.4.0" + linkify-it "^5.0.0" + mdurl "^2.0.0" + punycode.js "^2.3.1" + uc.micro "^2.1.0" + markdown-table@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.3.tgz#e6331d30e493127e031dd385488b5bd326e4a6bd" @@ -12827,6 +13052,21 @@ mdast-util-to-hast@^11.0.0: unist-util-position "^4.0.0" unist-util-visit "^4.0.0" +mdast-util-to-hast@^13.0.0: + version "13.2.0" + resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz#5ca58e5b921cc0a3ded1bc02eed79a4fe4fe41f4" + integrity sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA== + dependencies: + "@types/hast" "^3.0.0" + "@types/mdast" "^4.0.0" + "@ungap/structured-clone" "^1.0.0" + devlop "^1.0.0" + micromark-util-sanitize-uri "^2.0.0" + trim-lines "^3.0.0" + unist-util-position "^5.0.0" + unist-util-visit "^5.0.0" + vfile "^6.0.0" + mdast-util-to-markdown@^1.0.0, mdast-util-to-markdown@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/mdast-util-to-markdown/-/mdast-util-to-markdown-1.4.0.tgz#bb0153a865dbc022975f403a156fb6399c494ddf" @@ -12850,6 +13090,11 @@ mdurl@^1.0.0: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== +mdurl@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" + integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== + "memoize-one@>=3.1.1 <6": version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -13052,6 +13297,14 @@ micromark-util-character@^1.0.0: micromark-util-symbol "^1.0.0" micromark-util-types "^1.0.0" +micromark-util-character@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/micromark-util-character/-/micromark-util-character-2.1.1.tgz#2f987831a40d4c510ac261e89852c4e9703ccda6" + integrity sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q== + dependencies: + micromark-util-symbol "^2.0.0" + micromark-util-types "^2.0.0" + micromark-util-chunked@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz#5b40d83f3d53b84c4c6bce30ed4257e9a4c79d06" @@ -13098,6 +13351,11 @@ micromark-util-encode@^1.0.0: resolved "https://registry.yarnpkg.com/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz#2c1c22d3800870ad770ece5686ebca5920353383" integrity sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA== +micromark-util-encode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz#0d51d1c095551cfaac368326963cf55f15f540b8" + integrity sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw== + micromark-util-html-tag-name@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz#eb227118befd51f48858e879b7a419fc0df20497" @@ -13126,6 +13384,15 @@ micromark-util-sanitize-uri@^1.0.0: micromark-util-encode "^1.0.0" micromark-util-symbol "^1.0.0" +micromark-util-sanitize-uri@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz#ab89789b818a58752b73d6b55238621b7faa8fd7" + integrity sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ== + dependencies: + micromark-util-character "^2.0.0" + micromark-util-encode "^2.0.0" + micromark-util-symbol "^2.0.0" + micromark-util-subtokenize@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz#ff6f1af6ac836f8bfdbf9b02f40431760ad89105" @@ -13141,11 +13408,21 @@ micromark-util-symbol@^1.0.0: resolved "https://registry.yarnpkg.com/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz#b90344db62042ce454f351cf0bebcc0a6da4920e" integrity sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ== +micromark-util-symbol@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz#e5da494e8eb2b071a0d08fb34f6cefec6c0a19b8" + integrity sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q== + micromark-util-types@^1.0.0, micromark-util-types@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-1.0.2.tgz#f4220fdb319205812f99c40f8c87a9be83eded20" integrity sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w== +micromark-util-types@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-2.0.1.tgz#a3edfda3022c6c6b55bfb049ef5b75d70af50709" + integrity sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ== + micromark@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/micromark/-/micromark-3.1.0.tgz#eeba0fe0ac1c9aaef675157b52c166f125e89f62" @@ -13258,7 +13535,7 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.4: +minimatch@^9.0.4, minimatch@^9.0.5: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -13825,6 +14102,15 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +oniguruma-to-es@0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/oniguruma-to-es/-/oniguruma-to-es-0.4.1.tgz#112fbcd5fafe4f635983425a6db88f3e2de37107" + integrity sha512-rNcEohFz095QKGRovP/yqPIKc+nP+Sjs4YTHMv33nMePGKrq/r2eu9Yh4646M5XluGJsUnmwoXuiXE69KDs+fQ== + dependencies: + emoji-regex-xs "^1.0.0" + regex "^5.0.0" + regex-recursion "^4.2.1" + opener@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" @@ -14033,6 +14319,11 @@ pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: safe-buffer "^5.0.1" sha.js "^2.4.8" +percentile@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/percentile/-/percentile-1.6.0.tgz#c847b35a4d0a4e52235e16742aa3f317ce957293" + integrity sha512-8vSyjdzwxGDHHwH+cSGch3A9Uj2On3UpgOWxWXMKwUvoAbnujx6DaqmV1duWXNiH/oEWpyVd6nSQccix6DM3Ng== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -14529,6 +14820,11 @@ prettier@2.2.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== +prettier@^2.5.1: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + pretty-format@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" @@ -14573,6 +14869,14 @@ progress@^2.0.3: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +prom-client@^15.1.3: + version "15.1.3" + resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-15.1.3.tgz#69fa8de93a88bc9783173db5f758dc1c69fa8fc2" + integrity sha512-6ZiOBfCywsD4k1BN9IX0uZhF+tJkV8q8llP64G5Hajs4JOeVLPCwpPVcpXy3BwYiUGgyJzsJJQeOIv7+hDSq8g== + dependencies: + "@opentelemetry/api" "^1.4.0" + tdigest "^0.1.1" + promise-retry@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" @@ -14693,6 +14997,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode.js@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" + integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== + punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -15282,6 +15591,25 @@ regenerator-runtime@^0.14.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== +regex-recursion@^4.2.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/regex-recursion/-/regex-recursion-4.3.0.tgz#32c3a42a57d78bf2d0c83875074c2f7ebaf2a4f6" + integrity sha512-5LcLnizwjcQ2ALfOj95MjcatxyqF5RPySx9yT+PaXu3Gox2vyAtLDjHB8NTJLtMGkvyau6nI3CfpwFCjPUIs/A== + dependencies: + regex-utilities "^2.3.0" + +regex-utilities@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/regex-utilities/-/regex-utilities-2.3.0.tgz#87163512a15dce2908cf079c8960d5158ff43280" + integrity sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng== + +regex@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/regex/-/regex-5.0.2.tgz#291d960467e6499a79ceec022d20a4e0df67c54f" + integrity sha512-/pczGbKIQgfTMRV0XjABvc5RzLqQmwqxLHdQao2RTXPk+pmTXB2P0IaUHYdYyk412YLwUIkaeMd5T+RzVgTqnQ== + dependencies: + regex-utilities "^2.3.0" + regexp.prototype.flags@^1.4.3, regexp.prototype.flags@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" @@ -15460,6 +15788,13 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" +rimraf@^5.0.10: + version "5.0.10" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.10.tgz#23b9843d3dc92db71f96e1a2ce92e39fd2a8221c" + integrity sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ== + dependencies: + glob "^10.3.7" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -15766,6 +16101,18 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shiki@^1.16.2: + version "1.23.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.23.1.tgz#02f149e8f2592509e701f3a806fd4f3dd64d17e9" + integrity sha512-8kxV9TH4pXgdKGxNOkrSMydn1Xf6It8lsle0fiqxf7a1149K1WGtdOu3Zb91T5r1JpvRPxqxU3C2XdZZXQnrig== + dependencies: + "@shikijs/core" "1.23.1" + "@shikijs/engine-javascript" "1.23.1" + "@shikijs/engine-oniguruma" "1.23.1" + "@shikijs/types" "1.23.1" + "@shikijs/vscode-textmate" "^9.3.0" + "@types/hast" "^3.0.4" + side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" @@ -15911,6 +16258,14 @@ split2@^4.0.0: resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== +spok@^1.4.3: + version "1.5.5" + resolved "https://registry.yarnpkg.com/spok/-/spok-1.5.5.tgz#a51f7f290a53131d7b7a922dfedc461dda0aed72" + integrity sha512-IrJIXY54sCNFASyHPOY+jEirkiJ26JDqsGiI0Dvhwcnkl0PEWi1PSsrkYql0rzDw8LFVTcA7rdUCAJdE2HE+2Q== + dependencies: + ansicolors "~0.3.2" + find-process "^1.4.7" + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -16113,6 +16468,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +stringify-entities@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-4.0.4.tgz#b3b79ef5f277cc4ac73caeb0236c5ba939b3a4f3" + integrity sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg== + dependencies: + character-entities-html4 "^2.0.0" + character-entities-legacy "^3.0.0" + stringify-object@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" @@ -16419,6 +16782,13 @@ tar@^6.0.2: mkdirp "^1.0.3" yallist "^4.0.0" +tdigest@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/tdigest/-/tdigest-0.1.2.tgz#96c64bac4ff10746b910b0e23b515794e12faced" + integrity sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA== + dependencies: + bintrees "1.0.2" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -16611,6 +16981,11 @@ treeify@^1.1.0: resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" integrity sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A== +trim-lines@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-3.0.1.tgz#d802e332a07df861c48802c04321017b1bd87338" + integrity sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg== + trough@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/trough/-/trough-2.1.0.tgz#0f7b511a4fde65a46f18477ab38849b22c554876" @@ -16904,6 +17279,17 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" +typedoc@^0.26.3: + version "0.26.11" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.26.11.tgz#124b43a5637b7f3237b8c721691b44738c5c9dc9" + integrity sha512-sFEgRRtrcDl2FxVP58Ze++ZK2UQAEvtvvH8rRlig1Ja3o7dDaMHmaBfvJmdGnNEFaLTpQsN8dpvZaTqJSu/Ugw== + dependencies: + lunr "^2.3.9" + markdown-it "^14.1.0" + minimatch "^9.0.5" + shiki "^1.16.2" + yaml "^2.5.1" + typescript-collections@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/typescript-collections/-/typescript-collections-1.3.3.tgz#62d50d93c018c094d425eabee649f00ec5cc0fea" @@ -16934,6 +17320,11 @@ ua-parser-js@^1.0.2: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.32.tgz#786bf17df97de159d5b1c9d5e8e9e89806f8a030" integrity sha512-dXVsz3M4j+5tTiovFVyVqssXBu5HM47//YSOeZ9fQkdDKkfzv2v3PP1jmH6FUyPW+yCSn7aBVK1fGGKNhowdDA== +uc.micro@^2.0.0, uc.micro@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" + integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== + ufo@^1.3.0, ufo@^1.3.1, ufo@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.2.tgz#c7d719d0628a1c80c006d2240e0d169f6e3c0496" @@ -17017,6 +17408,13 @@ unist-util-is@^5.0.0: resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-5.1.1.tgz#e8aece0b102fa9bc097b0fef8f870c496d4a6236" integrity sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ== +unist-util-is@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-6.0.0.tgz#b775956486aff107a9ded971d996c173374be424" + integrity sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw== + dependencies: + "@types/unist" "^3.0.0" + unist-util-position@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-4.0.3.tgz#5290547b014f6222dff95c48d5c3c13a88fadd07" @@ -17024,6 +17422,13 @@ unist-util-position@^4.0.0: dependencies: "@types/unist" "^2.0.0" +unist-util-position@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-5.0.0.tgz#678f20ab5ca1207a97d7ea8a388373c9cf896be4" + integrity sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA== + dependencies: + "@types/unist" "^3.0.0" + unist-util-stringify-position@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-3.0.2.tgz#5c6aa07c90b1deffd9153be170dce628a869a447" @@ -17031,6 +17436,13 @@ unist-util-stringify-position@^3.0.0: dependencies: "@types/unist" "^2.0.0" +unist-util-stringify-position@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz#449c6e21a880e0855bf5aabadeb3a740314abac2" + integrity sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ== + dependencies: + "@types/unist" "^3.0.0" + unist-util-visit-parents@^5.0.0, unist-util-visit-parents@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-5.1.1.tgz#868f353e6fce6bf8fa875b251b0f4fec3be709bb" @@ -17039,6 +17451,14 @@ unist-util-visit-parents@^5.0.0, unist-util-visit-parents@^5.1.1: "@types/unist" "^2.0.0" unist-util-is "^5.0.0" +unist-util-visit-parents@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz#4d5f85755c3b8f0dc69e21eca5d6d82d22162815" + integrity sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw== + dependencies: + "@types/unist" "^3.0.0" + unist-util-is "^6.0.0" + unist-util-visit@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.1.tgz#1c4842d70bd3df6cc545276f5164f933390a9aad" @@ -17048,6 +17468,15 @@ unist-util-visit@^4.0.0: unist-util-is "^5.0.0" unist-util-visit-parents "^5.1.1" +unist-util-visit@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-5.0.0.tgz#a7de1f31f72ffd3519ea71814cccf5fd6a9217d6" + integrity sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg== + dependencies: + "@types/unist" "^3.0.0" + unist-util-is "^6.0.0" + unist-util-visit-parents "^6.0.0" + universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" @@ -17242,6 +17671,14 @@ vfile-message@^3.0.0: "@types/unist" "^2.0.0" unist-util-stringify-position "^3.0.0" +vfile-message@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-4.0.2.tgz#c883c9f677c72c166362fd635f21fc165a7d1181" + integrity sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw== + dependencies: + "@types/unist" "^3.0.0" + unist-util-stringify-position "^4.0.0" + vfile@^5.0.0: version "5.3.6" resolved "https://registry.yarnpkg.com/vfile/-/vfile-5.3.6.tgz#61b2e70690cc835a5d0d0fd135beae74e5a39546" @@ -17252,6 +17689,14 @@ vfile@^5.0.0: unist-util-stringify-position "^3.0.0" vfile-message "^3.0.0" +vfile@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/vfile/-/vfile-6.0.3.tgz#3652ab1c496531852bf55a6bac57af981ebc38ab" + integrity sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q== + dependencies: + "@types/unist" "^3.0.0" + vfile-message "^4.0.0" + victory-vendor@^36.6.8: version "36.6.8" resolved "https://registry.yarnpkg.com/victory-vendor/-/victory-vendor-36.6.8.tgz#5a1c555ca99a39fdb66a6c959c8426eb834893a2" @@ -17613,6 +18058,11 @@ yaml@^2.5.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.0.tgz#c6165a721cf8000e91c36490a41d7be25176cf5d" integrity sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw== +yaml@^2.5.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.6.1.tgz#42f2b1ba89203f374609572d5349fb8686500773" + integrity sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg== + yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" @@ -17738,12 +18188,17 @@ zod@^3.20.2, zod@^3.22.2: resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff" integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg== +zstddec@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/zstddec/-/zstddec-0.0.2.tgz#57e2f28dd1ff56b750e07d158a43f0611ad9eeb4" + integrity sha512-DCo0oxvcvOTGP/f5FA6tz2Z6wF+FIcEApSTu0zV5sQgn9hoT5lZ9YRAKUraxt9oP7l4e8TnNdi8IZTCX6WCkwA== + zustand@3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/zustand/-/zustand-3.7.2.tgz#7b44c4f4a5bfd7a8296a3957b13e1c346f42514d" integrity sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA== -zwitch@^2.0.0: +zwitch@^2.0.0, zwitch@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7" integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A== From 6d256c9ff32abc0682e40ee72df27d0145a02207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezin=CC=81ski?= Date: Sun, 1 Dec 2024 21:56:36 +0100 Subject: [PATCH 3/5] fix --- .../instructions/Manifest/PlaceLimitOrder.tsx | 147 +++++++++++++++--- 1 file changed, 125 insertions(+), 22 deletions(-) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx index 574358e7d..12a15a052 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx @@ -1,6 +1,11 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import { useContext, useEffect, useState } from 'react' -import { PublicKey } from '@solana/web3.js' +import { + Keypair, + PublicKey, + SystemProgram, + TransactionInstruction, +} from '@solana/web3.js' import * as yup from 'yup' import { isFormValid, validatePubkey } from '@utils/formValidation' import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' @@ -13,17 +18,28 @@ import { AssetAccount } from '@utils/uiTypes/assets' import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import useWalletOnePointOh from '@hooks/useWalletOnePointOh' -import ProgramSelector from '@components/Mango/ProgramSelector' -import useProgramSelector from '@components/Mango/useProgramSelector' -import { ManifestClient, Market } from '@cks-systems/manifest-sdk' +import { ManifestClient, Market, UiWrapper } from '@cks-systems/manifest-sdk' import useLegacyConnectionContext from '@hooks/useLegacyConnectionContext' import { useRealmProposalsQuery } from '@hooks/queries/proposal' import tokenPriceService from '@utils/services/tokenPrice' -import { string } from 'superstruct' +import { TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { WRAPPED_SOL_MINT } from '@metaplex-foundation/js' +import { + createAssociatedTokenAccountIdempotentInstruction, + createCloseAccountInstruction, + createSyncNativeInstruction, + getAssociatedTokenAddressSync, +} from '@solana/spl-token-new' +import { toNative } from '@blockworks-foundation/mango-v4' interface PlaceLimitOrderForm { governedAccount: AssetAccount | null - market: string + market: { + name: string + value: string + quote: string + base: string + } | null amount: string price: string side: { @@ -64,7 +80,7 @@ const PlaceLimitOrder = ({ const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, - market: '', + market: null, amount: '0', price: '0', side: sideOptions[0], @@ -79,34 +95,109 @@ const PlaceLimitOrder = ({ } async function getInstruction(): Promise { const isValid = await validateInstruction() - let serializedInstruction = '' + const ixes: string[] = [] + const signers: Keypair[] = [] + const prerequisiteInstructions: TransactionInstruction[] = [] if ( isValid && form.governedAccount?.governance?.account && wallet?.publicKey ) { - const mClient = await ManifestClient.getClientForMarketNoPrivateKey( + const isBid = form.side.value === 'Buy' + const owner = form.governedAccount.extensions.transferAddress! + const wrapper = await UiWrapper.fetchFirstUserWrapper( connection.current, - PublicKey.default, - form.governedAccount.governance.nativeTreasuryAddress + form.governedAccount.extensions.transferAddress! ) - - const ix = await mClient.placeOrderIx({ - numBaseTokens: Number(form.amount), - tokenPrice: Number(form.price), - isBid: form.side.value === 'Buy', - lastValidSlot: 0, - //Limit order is 0, there is import problem in sdk - orderType: 0, - clientOrderId: proposals!.length, + const market = await Market.loadFromAddress({ + connection: connection.current, + address: new PublicKey(form.market!.value), }) - serializedInstruction = serializeInstructionToBase64(ix) + let wrapperPk = wrapper?.pubkey + const needToCreateWSolAcc = !isBid + ? market.baseMint().equals(WRAPPED_SOL_MINT) + : market.quoteMint().equals(WRAPPED_SOL_MINT) + + if (needToCreateWSolAcc) { + const wsolAta = getAssociatedTokenAddressSync( + WRAPPED_SOL_MINT, + owner, + true + ) + const createPayerAtaIx = createAssociatedTokenAccountIdempotentInstruction( + owner, + wsolAta, + owner, + WRAPPED_SOL_MINT + ) + const solTransferIx = SystemProgram.transfer({ + fromPubkey: wallet.publicKey!, + toPubkey: wsolAta, + lamports: toNative( + Number( + !isBid ? form.amount : Number(form.amount) * Number(form.price) + ), + 9 + ).toNumber(), + }) + + const syncNative = createSyncNativeInstruction(wsolAta) + ixes.push( + serializeInstructionToBase64(createPayerAtaIx), + serializeInstructionToBase64(solTransferIx), + serializeInstructionToBase64(syncNative) + ) + } + + if (!wrapperPk) { + const setup = await UiWrapper.setupIxs( + connection.current, + owner, + wallet.publicKey + ) + wrapperPk = setup.signers[0].publicKey + } + const placeIx = await UiWrapper['placeIx_']( + market, + { + wrapper: wrapperPk!, + owner, + payer: owner, + baseTokenProgram: TOKEN_PROGRAM_ID, + quoteTokenProgram: TOKEN_PROGRAM_ID, + }, + { + isBid: isBid, + amount: Number(form.amount), + price: Number(form.price), + } + ) + ixes.push(...placeIx.ixs.map((x) => serializeInstructionToBase64(x))) + signers.push( + ...placeIx.signers.map((x) => Keypair.fromSecretKey(x.secretKey)) + ) + if (needToCreateWSolAcc) { + const wsolAta = getAssociatedTokenAddressSync( + WRAPPED_SOL_MINT, + owner, + true + ) + const solTransferIx = createCloseAccountInstruction( + wsolAta, + owner, + owner + ) + ixes.push(serializeInstructionToBase64(solTransferIx)) + } } const obj: UiInstruction = { - serializedInstruction: serializedInstruction, + serializedInstruction: '', + additionalSerializedInstructions: ixes, + prerequisiteInstructions: prerequisiteInstructions, isValid, governance: form.governedAccount?.governance, customHoldUpTime: 0, + chunkBy: 1, } return obj } @@ -182,6 +273,18 @@ const PlaceLimitOrder = ({ options: assetAccounts, assetType: 'token', }, + { + label: 'Amount', + initialValue: form.amount, + name: 'amount', + type: InstructionInputType.INPUT, + }, + { + label: 'Price', + initialValue: form.price, + name: 'price', + type: InstructionInputType.INPUT, + }, ] return ( From 9cae9aaee8ce455413dbc42cb1f1a5b31de1c005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezin=CC=81ski?= Date: Wed, 4 Dec 2024 14:15:53 +0400 Subject: [PATCH 4/5] settle orders --- package.json | 2 +- .../components/DryRunInstructionBtn.tsx | 6 +- .../instructions/Manifest/PlaceLimitOrder.tsx | 125 ++++++++++++++++-- pages/dao/[symbol]/proposal/new.tsx | 19 ++- utils/uiTypes/proposalCreationTypes.ts | 8 +- yarn.lock | 8 +- 6 files changed, 148 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index a8283d633..7e1184019 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "@blockworks-foundation/mango-mints-redemption": "0.0.11", - "@cks-systems/manifest-sdk": "0.1.71", + "@cks-systems/manifest-sdk": "0.1.72", "@blockworks-foundation/mango-v4": "0.33.7", "@blockworks-foundation/mango-v4-settings": "0.14.24", "@blockworks-foundation/mangolana": "0.0.18", diff --git a/pages/dao/[symbol]/proposal/components/DryRunInstructionBtn.tsx b/pages/dao/[symbol]/proposal/components/DryRunInstructionBtn.tsx index 207ac3092..c93d09a04 100644 --- a/pages/dao/[symbol]/proposal/components/DryRunInstructionBtn.tsx +++ b/pages/dao/[symbol]/proposal/components/DryRunInstructionBtn.tsx @@ -60,7 +60,11 @@ const DryRunInstructionBtn = ({ ? getInstructionDataFromBase64(instructionData?.serializedInstruction) : null, prerequisiteInstructionsToRun, - additionalInstructions?.map((x) => getInstructionDataFromBase64(x)) + additionalInstructions?.map((x) => + getInstructionDataFromBase64( + typeof x === 'string' ? x : x.serializedInstruction + ) + ) ) setResult(result) setIsOpen(true) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx index 12a15a052..0d4255067 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx @@ -26,11 +26,19 @@ import { TOKEN_PROGRAM_ID } from '@solana/spl-token' import { WRAPPED_SOL_MINT } from '@metaplex-foundation/js' import { createAssociatedTokenAccountIdempotentInstruction, + createAssociatedTokenAccountInstruction, createCloseAccountInstruction, createSyncNativeInstruction, getAssociatedTokenAddressSync, } from '@solana/spl-token-new' import { toNative } from '@blockworks-foundation/mango-v4' +import { utils, uiWrapper } from '@cks-systems/manifest-sdk' +const { getVaultAddress } = utils +const { createSettleFundsInstruction } = uiWrapper + +const MANIFEST_PROGRAM_ID = new PublicKey( + 'MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms' +) interface PlaceLimitOrderForm { governedAccount: AssetAccount | null @@ -46,6 +54,7 @@ interface PlaceLimitOrderForm { name: string value: string } + settlingHoldUp: number } const PlaceLimitOrder = ({ @@ -84,6 +93,7 @@ const PlaceLimitOrder = ({ amount: '0', price: '0', side: sideOptions[0], + settlingHoldUp: 0, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) @@ -95,7 +105,13 @@ const PlaceLimitOrder = ({ } async function getInstruction(): Promise { const isValid = await validateInstruction() - const ixes: string[] = [] + const ixes: ( + | string + | { + serializedInstruction: string + holdupTime: number + } + )[] = [] const signers: Keypair[] = [] const prerequisiteInstructions: TransactionInstruction[] = [] if ( @@ -104,19 +120,22 @@ const PlaceLimitOrder = ({ wallet?.publicKey ) { const isBid = form.side.value === 'Buy' - const owner = form.governedAccount.extensions.transferAddress! + const owner = form.governedAccount.extensions.token!.account.owner const wrapper = await UiWrapper.fetchFirstUserWrapper( connection.current, - form.governedAccount.extensions.transferAddress! + owner ) const market = await Market.loadFromAddress({ connection: connection.current, address: new PublicKey(form.market!.value), }) + const quoteMint = market.quoteMint() + const baseMint = market.baseMint() let wrapperPk = wrapper?.pubkey + const needToCreateWSolAcc = !isBid - ? market.baseMint().equals(WRAPPED_SOL_MINT) - : market.quoteMint().equals(WRAPPED_SOL_MINT) + ? baseMint.equals(WRAPPED_SOL_MINT) + : quoteMint.equals(WRAPPED_SOL_MINT) if (needToCreateWSolAcc) { const wsolAta = getAssociatedTokenAddressSync( @@ -131,7 +150,7 @@ const PlaceLimitOrder = ({ WRAPPED_SOL_MINT ) const solTransferIx = SystemProgram.transfer({ - fromPubkey: wallet.publicKey!, + fromPubkey: owner, toPubkey: wsolAta, lamports: toNative( Number( @@ -156,6 +175,11 @@ const PlaceLimitOrder = ({ wallet.publicKey ) wrapperPk = setup.signers[0].publicKey + + prerequisiteInstructions.push(...setup.ixs) + signers.push( + ...setup.signers.map((x) => Keypair.fromSecretKey(x.secretKey)) + ) } const placeIx = await UiWrapper['placeIx_']( market, @@ -173,9 +197,82 @@ const PlaceLimitOrder = ({ } ) ixes.push(...placeIx.ixs.map((x) => serializeInstructionToBase64(x))) - signers.push( - ...placeIx.signers.map((x) => Keypair.fromSecretKey(x.secretKey)) + + const traderTokenAccountBase = getAssociatedTokenAddressSync( + baseMint, + owner, + true, + TOKEN_PROGRAM_ID + ) + const traderTokenAccountQuote = getAssociatedTokenAddressSync( + quoteMint, + owner, + true, + TOKEN_PROGRAM_ID + ) + + const [baseAtaAccount, quoteAtaAccount] = await Promise.all([ + connection.current.getAccountInfo(traderTokenAccountBase), + connection.current.getAccountInfo(traderTokenAccountQuote), + ]) + + const doesTheBaseAtaExisits = + baseAtaAccount && baseAtaAccount?.lamports > 0 + const doesTheQuoteAtaExisits = + quoteAtaAccount && quoteAtaAccount?.lamports > 0 + + if (!doesTheQuoteAtaExisits) { + const quoteAtaCreateIx = createAssociatedTokenAccountInstruction( + owner, + traderTokenAccountQuote, + owner, + quoteMint, + TOKEN_PROGRAM_ID + ) + ixes.push({ + serializedInstruction: serializeInstructionToBase64(quoteAtaCreateIx), + holdupTime: form.settlingHoldUp, + }) + } + if (!doesTheBaseAtaExisits) { + const baseAtaCreateIx = createAssociatedTokenAccountInstruction( + owner, + traderTokenAccountBase, + owner, + baseMint, + TOKEN_PROGRAM_ID + ) + ixes.push({ + serializedInstruction: serializeInstructionToBase64(baseAtaCreateIx), + holdupTime: form.settlingHoldUp, + }) + } + + const settleOrderIx: TransactionInstruction = createSettleFundsInstruction( + { + wrapperState: wrapperPk, + owner: owner, + market: market.address, + manifestProgram: MANIFEST_PROGRAM_ID, + traderTokenAccountBase: traderTokenAccountBase, + traderTokenAccountQuote: traderTokenAccountQuote, + vaultBase: getVaultAddress(market.address, baseMint), + vaultQuote: getVaultAddress(market.address, quoteMint), + mintBase: baseMint, + mintQuote: quoteMint, + tokenProgramBase: TOKEN_PROGRAM_ID, + tokenProgramQuote: TOKEN_PROGRAM_ID, + platformTokenAccount: traderTokenAccountQuote, + }, + { + params: { feeMantissa: 0, platformFeePercent: 100 }, + } ) + ixes.push({ + serializedInstruction: serializeInstructionToBase64(settleOrderIx), + holdupTime: form.settlingHoldUp, + }) + if (needToCreateWSolAcc) { const wsolAta = getAssociatedTokenAddressSync( WRAPPED_SOL_MINT, @@ -187,13 +284,17 @@ const PlaceLimitOrder = ({ owner, owner ) - ixes.push(serializeInstructionToBase64(solTransferIx)) + ixes.push({ + serializedInstruction: serializeInstructionToBase64(solTransferIx), + holdupTime: form.settlingHoldUp, + }) } } const obj: UiInstruction = { serializedInstruction: '', additionalSerializedInstructions: ixes, prerequisiteInstructions: prerequisiteInstructions, + prerequisiteInstructionsSigners: signers, isValid, governance: form.governedAccount?.governance, customHoldUpTime: 0, @@ -285,6 +386,12 @@ const PlaceLimitOrder = ({ name: 'price', type: InstructionInputType.INPUT, }, + { + label: 'Settling holdup', + initialValue: form.settlingHoldUp, + name: 'settlingHoldUp', + type: InstructionInputType.INPUT, + }, ] return ( diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index 2121b9f1e..6983d843e 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -361,12 +361,23 @@ const New = () => { const additionalInstructions = instructions .flatMap((instruction) => instruction.additionalSerializedInstructions - ?.filter( - (value, index, self) => - index === self.findIndex((t) => t === value) + ?.filter((value, index, self) => + typeof value === 'string' + ? index === self.findIndex((t) => t === value) + : index === + self.findIndex((t) => + typeof t !== 'string' + ? t.serializedInstruction === + value.serializedInstruction + : -1 + ) ) .map((x) => ({ - data: x ? getInstructionDataFromBase64(x) : null, + data: x + ? getInstructionDataFromBase64( + typeof x === 'string' ? x : x.serializedInstruction + ) + : null, ...getDefaultInstructionProps(instruction, governance), })) ) diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index ddf96dbea..5c49fd5b2 100644 --- a/utils/uiTypes/proposalCreationTypes.ts +++ b/utils/uiTypes/proposalCreationTypes.ts @@ -33,7 +33,13 @@ export enum PackageEnum { export interface UiInstruction { serializedInstruction: string - additionalSerializedInstructions?: string[] + additionalSerializedInstructions?: ( + | string + | { + serializedInstruction: string + holdupTime: number + } + )[] isValid: boolean governance: ProgramAccount | undefined customHoldUpTime?: number diff --git a/yarn.lock b/yarn.lock index 2d0752be5..0ed7003f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -710,10 +710,10 @@ dependencies: ajv "^8.12.0" -"@cks-systems/manifest-sdk@0.1.71": - version "0.1.71" - resolved "https://registry.yarnpkg.com/@cks-systems/manifest-sdk/-/manifest-sdk-0.1.71.tgz#1d71f7d8675b91c8543f7707db3c2890883105c5" - integrity sha512-xoGkmhZd5VKicBQx/E1YKXmxZme2ki5coR5pTOSIfvFk3OKjKcGn8Uj24NEnji6HWw0Ry780YkLBeID8oLHplA== +"@cks-systems/manifest-sdk@0.1.72": + version "0.1.72" + resolved "https://registry.yarnpkg.com/@cks-systems/manifest-sdk/-/manifest-sdk-0.1.72.tgz#549d2b5fdbcc0407a518e7786293d220534d0ddf" + integrity sha512-1DMD0Vb+hRzovSCNLY55rhZFIj1hXjDclzhkmCC/2NpgVE9oZziG274HYbR9VJEJP5s0OaCMPu+NExDhobkzLQ== dependencies: "@metaplex-foundation/beet" "^0.7.1" "@metaplex-foundation/rustbin" "^0.3.1" From 4c117a039bf91677b9d438fb814f976147c05183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezin=CC=81ski?= Date: Fri, 6 Dec 2024 00:22:22 +0400 Subject: [PATCH 5/5] add cancel order --- actions/createProposal.ts | 1 + actions/executeTransaction.ts | 2 +- .../instructions/Manifest/PlaceLimitOrder.tsx | 43 +++++++++++++++---- pages/dao/[symbol]/proposal/new.tsx | 28 ++++++------ tools/sdk/units.ts | 5 +++ utils/uiTypes/proposalCreationTypes.ts | 2 +- 6 files changed, 54 insertions(+), 27 deletions(-) diff --git a/actions/createProposal.ts b/actions/createProposal.ts index 366c9f56c..e4493f524 100644 --- a/actions/createProposal.ts +++ b/actions/createProposal.ts @@ -197,6 +197,7 @@ export const createProposal = async ( ...instruction.prerequisiteInstructionsSigners ) } + console.log(instruction.holdUpTime, '@#@#@#@#') await withInsertTransaction( insertInstructions, programId, diff --git a/actions/executeTransaction.ts b/actions/executeTransaction.ts index 8cf2f3f7a..5801813f4 100644 --- a/actions/executeTransaction.ts +++ b/actions/executeTransaction.ts @@ -54,7 +54,7 @@ export const executeTransaction = async ( // Create proposal transaction const proposalTransaction = new Transaction().add( - ComputeBudgetProgram.setComputeUnitLimit({ units: 1000000 }), + ComputeBudgetProgram.setComputeUnitLimit({ units: 2000000 }), ...instructions ) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx index 0d4255067..bc85e2d1f 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Manifest/PlaceLimitOrder.tsx @@ -11,7 +11,7 @@ import { isFormValid, validatePubkey } from '@utils/formValidation' import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' import { NewProposalContext } from '../../../new' import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { Governance } from '@solana/spl-governance' +import { Governance, SYSTEM_PROGRAM_ID } from '@solana/spl-governance' import { ProgramAccount } from '@solana/spl-governance' import { serializeInstructionToBase64 } from '@solana/spl-governance' import { AssetAccount } from '@utils/uiTypes/assets' @@ -33,6 +33,7 @@ import { } from '@solana/spl-token-new' import { toNative } from '@blockworks-foundation/mango-v4' import { utils, uiWrapper } from '@cks-systems/manifest-sdk' +import { createCancelOrderInstruction } from '@cks-systems/manifest-sdk/dist/types/src/ui_wrapper' const { getVaultAddress } = utils const { createSettleFundsInstruction } = uiWrapper @@ -93,7 +94,7 @@ const PlaceLimitOrder = ({ amount: '0', price: '0', side: sideOptions[0], - settlingHoldUp: 0, + settlingHoldUp: 5, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) @@ -109,7 +110,7 @@ const PlaceLimitOrder = ({ | string | { serializedInstruction: string - holdupTime: number + holdUpTime: number } )[] = [] const signers: Keypair[] = [] @@ -119,6 +120,7 @@ const PlaceLimitOrder = ({ form.governedAccount?.governance?.account && wallet?.publicKey ) { + const orderId = Date.now() const isBid = form.side.value === 'Buy' const owner = form.governedAccount.extensions.token!.account.owner const wrapper = await UiWrapper.fetchFirstUserWrapper( @@ -194,6 +196,7 @@ const PlaceLimitOrder = ({ isBid: isBid, amount: Number(form.amount), price: Number(form.price), + orderId: orderId, } ) ixes.push(...placeIx.ixs.map((x) => serializeInstructionToBase64(x))) @@ -231,7 +234,7 @@ const PlaceLimitOrder = ({ ) ixes.push({ serializedInstruction: serializeInstructionToBase64(quoteAtaCreateIx), - holdupTime: form.settlingHoldUp, + holdUpTime: form.settlingHoldUp, }) } if (!doesTheBaseAtaExisits) { @@ -244,10 +247,32 @@ const PlaceLimitOrder = ({ ) ixes.push({ serializedInstruction: serializeInstructionToBase64(baseAtaCreateIx), - holdupTime: form.settlingHoldUp, + holdUpTime: form.settlingHoldUp, }) } + const mint = isBid ? quoteMint : baseMint + const cancelOrderIx: TransactionInstruction = createCancelOrderInstruction( + { + wrapperState: wrapperPk, + owner: owner, + traderTokenAccount: getAssociatedTokenAddressSync(mint, owner, true), + market: market.address, + vault: getVaultAddress(market.address, mint), + mint: mint, + systemProgram: SYSTEM_PROGRAM_ID, + tokenProgram: TOKEN_PROGRAM_ID, + manifestProgram: MANIFEST_PROGRAM_ID, + }, + { + params: { clientOrderId: orderId }, + } + ) + ixes.push({ + serializedInstruction: serializeInstructionToBase64(cancelOrderIx), + holdUpTime: form.settlingHoldUp, + }) + const settleOrderIx: TransactionInstruction = createSettleFundsInstruction( { wrapperState: wrapperPk, @@ -265,12 +290,12 @@ const PlaceLimitOrder = ({ platformTokenAccount: traderTokenAccountQuote, }, { - params: { feeMantissa: 0, platformFeePercent: 100 }, + params: { feeMantissa: 10 ** 9 * 0.0001, platformFeePercent: 100 }, } ) ixes.push({ serializedInstruction: serializeInstructionToBase64(settleOrderIx), - holdupTime: form.settlingHoldUp, + holdUpTime: form.settlingHoldUp, }) if (needToCreateWSolAcc) { @@ -286,7 +311,7 @@ const PlaceLimitOrder = ({ ) ixes.push({ serializedInstruction: serializeInstructionToBase64(solTransferIx), - holdupTime: form.settlingHoldUp, + holdUpTime: form.settlingHoldUp, }) } } @@ -387,7 +412,7 @@ const PlaceLimitOrder = ({ type: InstructionInputType.INPUT, }, { - label: 'Settling holdup', + label: 'Settling instruction holdup (minutes)', initialValue: form.settlingHoldUp, name: 'settlingHoldUp', type: InstructionInputType.INPUT, diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index 6983d843e..1a6244458 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -26,7 +26,7 @@ import useGovernanceAssets, { } from '@hooks/useGovernanceAssets' import useQueryContext from '@hooks/useQueryContext' import useRealm from '@hooks/useRealm' -import { getTimestampFromDays } from '@tools/sdk/units' +import { getTimestampFromDays, getTimestampFromMinutes } from '@tools/sdk/units' import { formValidation, isFormValid } from '@utils/formValidation' import { ComponentInstructionData, @@ -357,21 +357,11 @@ const New = () => { handleTurnOffLoaders() throw Error('No governance selected') } - + console.log(instructions) const additionalInstructions = instructions - .flatMap((instruction) => - instruction.additionalSerializedInstructions - ?.filter((value, index, self) => - typeof value === 'string' - ? index === self.findIndex((t) => t === value) - : index === - self.findIndex((t) => - typeof t !== 'string' - ? t.serializedInstruction === - value.serializedInstruction - : -1 - ) - ) + .flatMap((instruction) => { + return instruction.additionalSerializedInstructions + ?.filter((x) => x) .map((x) => ({ data: x ? getInstructionDataFromBase64( @@ -379,8 +369,14 @@ const New = () => { ) : null, ...getDefaultInstructionProps(instruction, governance), + holdUpTime: + typeof x === 'string' + ? instruction.customHoldUpTime + ? getTimestampFromDays(instruction.customHoldUpTime) + : governance?.account?.config.minInstructionHoldUpTime + : getTimestampFromMinutes(x.holdUpTime), })) - ) + }) .filter((x) => x) as InstructionDataWithHoldUpTime[] const instructionsData = [ diff --git a/tools/sdk/units.ts b/tools/sdk/units.ts index d01ba1d2b..b64b2055e 100644 --- a/tools/sdk/units.ts +++ b/tools/sdk/units.ts @@ -17,6 +17,11 @@ export function getTimestampFromDays(days: number) { return days * SECONDS_PER_DAY } +export function getTimestampFromMinutes(minutes: number) { + //seconds in minute + return minutes * 60 +} + export function getTimestampFromHours(hours: number) { return hours * 60 * 60 } diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index 5c49fd5b2..d916209fc 100644 --- a/utils/uiTypes/proposalCreationTypes.ts +++ b/utils/uiTypes/proposalCreationTypes.ts @@ -37,7 +37,7 @@ export interface UiInstruction { | string | { serializedInstruction: string - holdupTime: number + holdUpTime: number } )[] isValid: boolean