diff --git a/actions/createProposal.ts b/actions/createProposal.ts index ce87703175..2c44713b74 100644 --- a/actions/createProposal.ts +++ b/actions/createProposal.ts @@ -209,7 +209,6 @@ export const createProposal = async ( sendingMessage: `creating ${notificationTitle}`, successMessage: `${notificationTitle} created`, }) - await sendTransaction({ transaction: transaction2, wallet, diff --git a/hooks/useGovernanceAssets.ts b/hooks/useGovernanceAssets.ts index 857e79d8f9..82f4ba8b20 100644 --- a/hooks/useGovernanceAssets.ts +++ b/hooks/useGovernanceAssets.ts @@ -292,15 +292,30 @@ export default function useGovernanceAssets() { isVisible: canUseProgramUpgradeInstruction && symbol === 'MNGO', }, { - id: Instructions.DepositIntoCastle, - name: 'Castle: Deposit into Vault', + id: Instructions.Mint, + name: 'Mint Tokens', + isVisible: canUseMintInstruction, + }, + { + id: Instructions.CreateAssociatedTokenAccount, + name: 'Create Associated Token Account', isVisible: canUseAnyInstruction, }, { - id: Instructions.WithrawFromCastle, - name: 'Castle: Withdraw from Vault', + id: Instructions.Base64, + name: 'Execute Custom Instruction', isVisible: canUseAnyInstruction, }, + { + id: Instructions.VotingMintConfig, + name: 'Vote Escrowed Tokens: Configure Voting Mint', + isVisible: canUseAuthorityInstruction, + }, + { + id: Instructions.CreateVsrRegistrar, + name: 'Vote Escrowed Tokens: Create Registrar', + isVisible: canUseAuthorityInstruction, + }, { id: Instructions.DepositIntoVolt, name: 'Friktion: Deposit into Volt', @@ -311,6 +326,26 @@ export default function useGovernanceAssets() { name: 'Friktion: Withdraw from Volt', isVisible: canUseAnyInstruction, }, + { + id: Instructions.ClaimPendingDeposit, + name: 'Friktion: Claim Volt Tokens', + isVisible: canUseAnyInstruction, + }, + { + id: Instructions.ClaimPendingWithdraw, + name: 'Friktion: Claim Pending Withdraw', + isVisible: canUseAnyInstruction, + }, + { + id: Instructions.DepositIntoCastle, + name: 'Castle: Deposit into Vault', + isVisible: canUseAnyInstruction, + }, + { + id: Instructions.WithrawFromCastle, + name: 'Castle: Withdraw from Vault', + isVisible: canUseAnyInstruction, + }, { id: Instructions.DepositIntoGoblinGold, name: 'GoblinGold: Deposit into GoblinGold', diff --git a/package.json b/package.json index 7ba553f340..928b01cea2 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "@dialectlabs/react-ui": "0.8.2", "@emotion/react": "^11.9.0", "@emotion/styled": "^11.8.1", + "@friktion-labs/friktion-sdk": "^1.1.118", "@foresight-tmp/foresight-sdk": "^0.1.44", - "@friktion-labs/friktion-sdk": "^1.1.25", "@headlessui/react": "^1.5.0", "@heroicons/react": "^1.0.1", "@marinade.finance/marinade-ts-sdk": "^2.0.9", @@ -54,7 +54,7 @@ "@solana/governance-program-library": "^0.15.2", "@solana/spl-governance": "^0.0.34", "@solana/spl-token": "0.1.8", - "@solana/spl-token-registry": "^0.2.3470", + "@solana/spl-token-registry": "^0.2.3775", "@solana/wallet-adapter-base": "^0.9.5", "@solana/wallet-adapter-glow": "^0.1.1", "@solana/wallet-adapter-phantom": "^0.9.3", @@ -98,15 +98,15 @@ "@types/react": "^17.0.44", "@typescript-eslint/eslint-plugin": "^5.21.0", "@typescript-eslint/parser": "^5.18.0", - "eslint": "^8.12.0", - "eslint-config-prettier": "^8.3.0", + "eslint": "^8.14.0", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-react": "^7.29.4", - "eslint-plugin-react-hooks": "^4.3.0", + "eslint-plugin-react-hooks": "^4.5.0", "husky": "^6.0.0", "jest": "^27.4.5", "lint-staged": "^10.0.10", "next-router-mock": "^0.6.7", - "postcss": "^8.2.12", + "postcss": "^8.4.12", "postcss-preset-env": "^6.7.0", "prettier": "^2.0.2", "tailwindcss": "^3.0.23", @@ -117,5 +117,8 @@ "twin": { "preset": "emotion" } + }, + "resolutions": { + "port-sdk/@saberhq/token-utils": "1.12.53" } } diff --git a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingDeposit.tsx b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingDeposit.tsx new file mode 100644 index 0000000000..bba354e60b --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingDeposit.tsx @@ -0,0 +1,144 @@ +import React, { useContext, useEffect, useState } from 'react' +import useRealm from '@hooks/useRealm' +import { PublicKey } from '@solana/web3.js' +import useWalletStore from 'stores/useWalletStore' +import { + FriktionClaimPendingDepositForm, + UiInstruction, +} from '@utils/uiTypes/proposalCreationTypes' +import { NewProposalContext } from '../../../new' +import { getFriktionClaimPendingDepositSchema } from '@utils/validations' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import GovernedAccountSelect from '../../GovernedAccountSelect' +import { getFriktionClaimPendingDepositInstruction } from '@utils/instructions/Friktion' +import Select from '@components/inputs/Select' +import { FriktionSnapshot, VoltSnapshot } from '@friktion-labs/friktion-sdk' + +const FriktionClaimPendingDeposit = ({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) => { + const connection = useWalletStore((s) => s.connection) + const wallet = useWalletStore((s) => s.current) + const { realmInfo } = useRealm() + const { governedTokenAccountsWithoutNfts } = useGovernanceAssets() + const shouldBeGoverned = index !== 0 && governance + const programId: PublicKey | undefined = realmInfo?.programId + const [form, setForm] = useState({ + governedTokenAccount: undefined, + voltVaultId: '', + programId: programId?.toString(), + mintInfo: undefined, + }) + // eslint-disable-next-line @typescript-eslint/ban-types + const [friktionVolts, setFriktionVolts] = useState( + null + ) + const [governedAccount, setGovernedAccount] = useState< + ProgramAccount | undefined + >(undefined) + const [formErrors, setFormErrors] = useState({}) + const { handleSetInstructions } = useContext(NewProposalContext) + const handleSetForm = ({ propertyName, value }) => { + setFormErrors({}) + setForm({ ...form, [propertyName]: value }) + } + const setMintInfo = (value) => { + setForm({ ...form, mintInfo: value }) + } + + async function getInstruction(): Promise { + return getFriktionClaimPendingDepositInstruction({ + schema, + form, + programId, + connection, + wallet, + setFormErrors, + }) + } + useEffect(() => { + // call for the mainnet friktion volts + const callfriktionRequest = async () => { + const response = await fetch( + 'https://friktion-labs.github.io/mainnet-tvl-snapshots/friktionSnapshot.json' + ) + const parsedResponse = (await response.json()) as FriktionSnapshot + setFriktionVolts(parsedResponse.allMainnetVolts as VoltSnapshot[]) + } + + callfriktionRequest() + }, []) + + useEffect(() => { + handleSetForm({ + propertyName: 'programId', + value: programId?.toString(), + }) + }, [realmInfo?.programId]) + useEffect(() => { + handleSetInstructions( + { governedAccount: governedAccount, getInstruction }, + index + ) + }, [form]) + useEffect(() => { + setGovernedAccount(form.governedTokenAccount?.governance) + setMintInfo(form.governedTokenAccount?.extensions.mint?.account) + }, [form.governedTokenAccount]) + const schema = getFriktionClaimPendingDepositSchema() + + return ( + <> + { + handleSetForm({ value, propertyName: 'governedTokenAccount' }) + }} + value={form.governedTokenAccount} + error={formErrors['governedTokenAccount']} + shouldBeGoverned={shouldBeGoverned} + governance={governance} + > + + + ) +} + +export default FriktionClaimPendingDeposit diff --git a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingWithdraw.tsx b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingWithdraw.tsx new file mode 100644 index 0000000000..eb8fc04adb --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingWithdraw.tsx @@ -0,0 +1,144 @@ +import React, { useContext, useEffect, useState } from 'react' +import useRealm from '@hooks/useRealm' +import { PublicKey } from '@solana/web3.js' +import useWalletStore from 'stores/useWalletStore' +import { + FriktionClaimPendingWithdrawForm, + UiInstruction, +} from '@utils/uiTypes/proposalCreationTypes' +import { NewProposalContext } from '../../../new' +import { getFriktionClaimPendingWithdrawSchema } from '@utils/validations' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import GovernedAccountSelect from '../../GovernedAccountSelect' +import { getFriktionClaimPendingWithdrawInstruction } from '@utils/instructions/Friktion' +import Select from '@components/inputs/Select' +import { FriktionSnapshot, VoltSnapshot } from '@friktion-labs/friktion-sdk' + +const FriktionClaimPendingWithdraw = ({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) => { + const connection = useWalletStore((s) => s.connection) + const wallet = useWalletStore((s) => s.current) + const { realmInfo } = useRealm() + const { governedTokenAccountsWithoutNfts } = useGovernanceAssets() + const shouldBeGoverned = index !== 0 && governance + const programId: PublicKey | undefined = realmInfo?.programId + const [form, setForm] = useState({ + governedTokenAccount: undefined, + voltVaultId: '', + programId: programId?.toString(), + mintInfo: undefined, + }) + // eslint-disable-next-line @typescript-eslint/ban-types + const [friktionVolts, setFriktionVolts] = useState( + null + ) + const [governedAccount, setGovernedAccount] = useState< + ProgramAccount | undefined + >(undefined) + const [formErrors, setFormErrors] = useState({}) + const { handleSetInstructions } = useContext(NewProposalContext) + const handleSetForm = ({ propertyName, value }) => { + setFormErrors({}) + setForm({ ...form, [propertyName]: value }) + } + const setMintInfo = (value) => { + setForm({ ...form, mintInfo: value }) + } + + async function getInstruction(): Promise { + return getFriktionClaimPendingWithdrawInstruction({ + schema, + form, + programId, + connection, + wallet, + setFormErrors, + }) + } + useEffect(() => { + // call for the mainnet friktion volts + const callfriktionRequest = async () => { + const response = await fetch( + 'https://friktion-labs.github.io/mainnet-tvl-snapshots/friktionSnapshot.json' + ) + const parsedResponse = (await response.json()) as FriktionSnapshot + setFriktionVolts(parsedResponse.allMainnetVolts as VoltSnapshot[]) + } + + callfriktionRequest() + }, []) + + useEffect(() => { + handleSetForm({ + propertyName: 'programId', + value: programId?.toString(), + }) + }, [realmInfo?.programId]) + useEffect(() => { + handleSetInstructions( + { governedAccount: governedAccount, getInstruction }, + index + ) + }, [form]) + useEffect(() => { + setGovernedAccount(form.governedTokenAccount?.governance) + setMintInfo(form.governedTokenAccount?.extensions.mint?.account) + }, [form.governedTokenAccount]) + const schema = getFriktionClaimPendingWithdrawSchema() + + return ( + <> + { + handleSetForm({ value, propertyName: 'governedTokenAccount' }) + }} + value={form.governedTokenAccount} + error={formErrors['governedTokenAccount']} + shouldBeGoverned={shouldBeGoverned} + governance={governance} + > + + + ) +} + +export default FriktionClaimPendingWithdraw diff --git a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionDeposit.tsx b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionDeposit.tsx index 817f5646d1..606c2f1e6f 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionDeposit.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionDeposit.tsx @@ -79,7 +79,6 @@ const FriktionDeposit = ({ propertyName: 'amount', }) } - async function getInstruction(): Promise { return getFriktionDepositInstruction({ schema, diff --git a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionWithdraw.tsx b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionWithdraw.tsx index 77f71255d7..f570e7dd9d 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionWithdraw.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionWithdraw.tsx @@ -36,7 +36,6 @@ const FriktionWithdraw = ({ amount: undefined, governedTokenAccount: undefined, voltVaultId: '', - depositTokenMint: undefined, programId: programId?.toString(), mintInfo: undefined, }) @@ -140,15 +139,9 @@ const FriktionWithdraw = ({ label="Friktion Volt" value={form.voltVaultId} placeholder="Please select..." - onChange={(value) => { - const volt = friktionVolts?.find((x) => x.voltVaultId === value) - setFormErrors({}) - setForm({ - ...form, - voltVaultId: value, - depositTokenMint: volt?.depositTokenMint, - }) - }} + onChange={(value) => + handleSetForm({ value, propertyName: 'voltVaultId' }) + } error={formErrors['voltVaultId']} > {friktionVolts diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index d45f2bcd89..8ac491047c 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -54,6 +54,8 @@ import CreateNftPluginRegistrar from './components/instructions/NftVotingPlugin/ import CreateNftPluginMaxVoterWeightRecord from './components/instructions/NftVotingPlugin/CreateMaxVoterWeightRecord' import ConfigureNftPluginCollection from './components/instructions/NftVotingPlugin/ConfigureCollection' import FriktionWithdraw from './components/instructions/Friktion/FriktionWithdraw' +import FriktionClaimPendingDeposit from './components/instructions/Friktion/FriktionClaimPendingDeposit' +import FriktionClaimPendingWithdraw from './components/instructions/Friktion/FriktionClaimPendingWithdraw' import MakeChangePerpMarket from './components/instructions/Mango/MakeChangePerpMarket' import MakeAddOracle from './components/instructions/Mango/MakeAddOracle' import MakeAddSpotMarket from './components/instructions/Mango/MakeAddSpotMarket' @@ -320,18 +322,27 @@ const New = () => { return case Instructions.None: return - case Instructions.DepositIntoCastle: - return - case Instructions.WithrawFromCastle: - return case Instructions.DepositIntoVolt: return case Instructions.WithdrawFromVolt: return + case Instructions.ClaimPendingDeposit: + return ( + + ) + case Instructions.ClaimPendingWithdraw: + return ( + + ) + case Instructions.DepositIntoCastle: + return + case Instructions.WithrawFromCastle: + return case Instructions.DepositIntoGoblinGold: return case Instructions.WithdrawFromGoblinGold: return + case Instructions.CreateSolendObligationAccount: return case Instructions.InitSolendObligationAccount: diff --git a/utils/instructions/Friktion/index.ts b/utils/instructions/Friktion/index.ts index fc326f64f7..2bf1c24892 100644 --- a/utils/instructions/Friktion/index.ts +++ b/utils/instructions/Friktion/index.ts @@ -20,12 +20,10 @@ import { PublicKey, TransactionInstruction, } from '@solana/web3.js' - import type { ConnectionContext } from 'utils/connection' import { getATA } from '../../ataTools' import { UiInstruction } from '../../uiTypes/proposalCreationTypes' import { validateInstruction } from '@utils/instructionTools' -import BN from 'bn.js' import { AssetAccount } from '@utils/uiTypes/assets' export async function getFriktionDepositInstruction({ @@ -69,12 +67,10 @@ export async function getFriktionDepositInstruction({ const cVoltSDK = new ConnectedVoltSDK( connection.current, wallet.publicKey as PublicKey, - await sdk.loadVoltByKey(voltVaultId), - undefined, + await sdk.loadVoltAndExtraDataByKey(voltVaultId), governedTokenAccount.governance.pubkey ) - const voltVault = cVoltSDK.voltVault const vaultMint = cVoltSDK.voltVault.vaultMint //we find true receiver address if its wallet and we need to create ATA the ata address will be the receiver @@ -99,36 +95,6 @@ export async function getFriktionDepositInstruction({ ) } - let pendingDepositInfo - try { - const key = ( - await VoltSDK.findPendingDepositInfoAddress( - voltVaultId, - governedTokenAccount.governance.pubkey, - cVoltSDK.sdk.programs.Volt.programId - ) - )[0] - const acct = await cVoltSDK.sdk.programs.Volt.account.pendingDeposit.fetch( - key - ) - pendingDepositInfo = { - ...acct, - key: key, - } as PendingDepositWithKey - } catch (err) { - pendingDepositInfo = null - } - - if ( - pendingDepositInfo && - pendingDepositInfo.roundNumber.lt(voltVault.roundNumber) && - pendingDepositInfo?.numUnderlyingDeposited?.gtn(0) - ) { - prerequisiteInstructions.push( - await cVoltSDK.claimPending(receiverAddress) - ) - } - let depositTokenAccountKey: PublicKey | null if (governedTokenAccount.isSol) { @@ -171,22 +137,35 @@ export async function getFriktionDepositInstruction({ } const depositIx = governedTokenAccount.isSol - ? await cVoltSDK.depositWithTransfer( + ? await cVoltSDK.depositWithClaim( new Decimal(amount), depositTokenAccountKey, receiverAddress, + true, governedTokenAccount.extensions.transferAddress!, governedTokenAccount.governance.pubkey, decimals ) - : await cVoltSDK.deposit( + : await cVoltSDK.depositWithClaim( new Decimal(amount), depositTokenAccountKey, receiverAddress, + false, + undefined, governedTokenAccount.governance.pubkey, decimals ) + if (governedTokenAccount.isSol) { + const transferAddressIndex = depositIx.keys.findIndex( + (k) => + k.pubkey.toString() === + governedTokenAccount.extensions.transferAddress?.toString() + ) + depositIx.keys[transferAddressIndex].isSigner = true + depositIx.keys[transferAddressIndex].isWritable = true + } + const governedAccountIndex = depositIx.keys.findIndex( (k) => k.pubkey.toString() === @@ -234,7 +213,6 @@ export async function getFriktionWithdrawInstruction({ const prerequisiteInstructions: TransactionInstruction[] = [] const governedTokenAccount = form.governedTokenAccount as AssetAccount const voltVaultId = new PublicKey(form.voltVaultId as string) - const depositTokenMint = new PublicKey(form.depositTokenMint as string) const signers: Keypair[] = [] if ( isValid && @@ -254,12 +232,10 @@ export async function getFriktionWithdrawInstruction({ const cVoltSDK = new ConnectedVoltSDK( connection.current, wallet.publicKey as PublicKey, - await sdk.loadVoltByKey(voltVaultId), - undefined, + await sdk.loadVoltAndExtraDataByKey(voltVaultId), governedTokenAccount.governance.pubkey ) - const voltVault = cVoltSDK.voltVault const vaultMint = cVoltSDK.voltVault.vaultMint try { @@ -293,15 +269,102 @@ export async function getFriktionWithdrawInstruction({ } //we find true receiver address if its wallet and we need to create ATA the ata address will be the receiver - const { - currentAddress: vaultTokenAccount, - needToCreateAta, - } = await getATA({ + const { currentAddress: vaultTokenAccount } = await getATA({ connection: connection, receiverAddress: governedTokenAccount.governance.pubkey, mintPK: vaultMint, wallet, }) + + const withdrawIx = await cVoltSDK.withdrawHumanAmount( + new Decimal(amount), + vaultTokenAccount, + depositTokenDest, + governedTokenAccount.governance.pubkey, + undefined, + true + ) + + const governedAccountIndex = withdrawIx.keys.findIndex( + (k) => + k.pubkey.toString() === + governedTokenAccount.governance?.pubkey.toString() + ) + withdrawIx.keys[governedAccountIndex].isSigner = true + + serializedInstruction = serializeInstructionToBase64(withdrawIx) + } catch (e) { + if (e instanceof Error) { + throw new Error('Error: ' + e.message) + } + throw e + } + } + const obj: UiInstruction = { + serializedInstruction, + isValid, + governance: governedTokenAccount?.governance, + prerequisiteInstructions: prerequisiteInstructions, + signers, + shouldSplitIntoSeparateTxs: true, + } + return obj +} + +export async function getFriktionClaimPendingDepositInstruction({ + schema, + form, + connection, + wallet, + setFormErrors, +}: { + schema: any + form: any + programId: PublicKey | undefined + connection: ConnectionContext + wallet: WalletAdapter | undefined + setFormErrors: any +}): Promise { + const isValid = await validateInstruction({ schema, form, setFormErrors }) + let serializedInstruction = '' + const prerequisiteInstructions: TransactionInstruction[] = [] + const governedTokenAccount = form.governedTokenAccount as AssetAccount + const voltVaultId = new PublicKey(form.voltVaultId as string) + const signers: Keypair[] = [] + if ( + isValid && + governedTokenAccount?.extensions.token?.publicKey && + governedTokenAccount?.extensions.token && + governedTokenAccount?.extensions.mint?.account && + governedTokenAccount?.governance && + wallet + ) { + const sdk = new FriktionSDK({ + provider: { + connection: connection.current, + wallet: (wallet as unknown) as AnchorWallet, + }, + }) + const cVoltSDK = new ConnectedVoltSDK( + connection.current, + wallet.publicKey as PublicKey, + await sdk.loadVoltAndExtraDataByKey(voltVaultId), + governedTokenAccount.governance.pubkey + ) + + const voltVault = cVoltSDK.voltVault + const vaultMint = cVoltSDK.voltVault.vaultMint + + try { + //we find true receiver address if its wallet and we need to create ATA the ata address will be the receiver + const { currentAddress: receiverAddress, needToCreateAta } = await getATA( + { + connection: connection, + receiverAddress: governedTokenAccount.governance.pubkey, + mintPK: vaultMint, + wallet, + } + ) //we push this createATA instruction to transactions to create right before creating proposal //we don't want to create ata only when instruction is serialized if (needToCreateAta) { @@ -310,90 +373,154 @@ export async function getFriktionWithdrawInstruction({ ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID vaultMint, // mint - vaultTokenAccount, // ata + receiverAddress, // ata governedTokenAccount.governance.pubkey, // owner of token account wallet.publicKey! // fee payer ) ) } - let pendingDepositInfo - try { - const key = ( - await VoltSDK.findPendingDepositInfoAddress( - voltVaultId, - governedTokenAccount.governance.pubkey, - cVoltSDK.sdk.programs.Volt.programId - ) - )[0] - const acct = await cVoltSDK.sdk.programs.Volt.account.pendingDeposit.fetch( - key + const key = ( + await VoltSDK.findPendingDepositInfoAddress( + voltVaultId, + governedTokenAccount.governance.pubkey, + cVoltSDK.sdk.programs.Volt.programId ) - pendingDepositInfo = { - ...acct, - key: key, - } as PendingDepositWithKey - } catch (err) { - pendingDepositInfo = null - } + )[0] + const acct = await cVoltSDK.sdk.programs.Volt.account.pendingDeposit.fetch( + key + ) + const pendingDepositInfo = { + ...acct, + key: key, + } as PendingDepositWithKey if ( pendingDepositInfo && pendingDepositInfo.roundNumber.lt(voltVault.roundNumber) && pendingDepositInfo?.numUnderlyingDeposited?.gtn(0) ) { - prerequisiteInstructions.push( - await cVoltSDK.claimPending(vaultTokenAccount) - ) + const ix = await cVoltSDK.claimPending(receiverAddress) + serializedInstruction = serializeInstructionToBase64(ix) + } else { + throw new Error('No pending deposit to claim') + } + } catch (e) { + if (e instanceof Error) { + throw new Error('Error: ' + e.message) } + throw e + } + } + const obj: UiInstruction = { + serializedInstruction, + isValid, + governance: governedTokenAccount?.governance, + prerequisiteInstructions: prerequisiteInstructions, + signers, + shouldSplitIntoSeparateTxs: true, + } + return obj +} + +export async function getFriktionClaimPendingWithdrawInstruction({ + schema, + form, + connection, + wallet, + setFormErrors, +}: { + schema: any + form: any + programId: PublicKey | undefined + connection: ConnectionContext + wallet: WalletAdapter | undefined + setFormErrors: any +}): Promise { + const isValid = await validateInstruction({ schema, form, setFormErrors }) + let serializedInstruction = '' + const prerequisiteInstructions: TransactionInstruction[] = [] + const governedTokenAccount = form.governedTokenAccount as AssetAccount + const voltVaultId = new PublicKey(form.voltVaultId as string) + const signers: Keypair[] = [] + if ( + isValid && + governedTokenAccount?.extensions.token?.publicKey && + governedTokenAccount?.extensions.token && + governedTokenAccount?.extensions.mint?.account && + governedTokenAccount?.governance && + wallet + ) { + const sdk = new FriktionSDK({ + provider: { + connection: connection.current, + wallet: (wallet as unknown) as AnchorWallet, + }, + }) + const cVoltSDK = new ConnectedVoltSDK( + connection.current, + wallet.publicKey as PublicKey, + await sdk.loadVoltAndExtraDataByKey(voltVaultId), + governedTokenAccount.governance.pubkey + ) - let pendingWithdrawalInfo + const voltVault = cVoltSDK.voltVault - try { - const key = ( - await VoltSDK.findPendingWithdrawalInfoAddress( - voltVaultId, - governedTokenAccount.governance.pubkey, - cVoltSDK.sdk.programs.Volt.programId + try { + let depositTokenDest: PublicKey | null + + if (governedTokenAccount.isSol) { + const { + currentAddress: receiverAddress, + needToCreateAta, + } = await getATA({ + connection: connection, + receiverAddress: governedTokenAccount.governance.pubkey, + mintPK: new PublicKey(WSOL_MINT), + wallet, + }) + if (needToCreateAta) { + prerequisiteInstructions.push( + Token.createAssociatedTokenAccountInstruction( + ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID + TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID + new PublicKey(WSOL_MINT), // mint + receiverAddress, // ata + governedTokenAccount.governance.pubkey, // owner of token account + wallet.publicKey! // fee payer + ) ) - )[0] - const acct = await this.sdk.programs.Volt.account.pendingWithdrawal.fetch( - key - ) - pendingWithdrawalInfo = { - ...acct, - key: key, } - } catch (err) { - pendingWithdrawalInfo = null + depositTokenDest = receiverAddress + } else { + depositTokenDest = governedTokenAccount.extensions.transferAddress! } + + const key = ( + await VoltSDK.findPendingWithdrawalInfoAddress( + voltVaultId, + governedTokenAccount.governance.pubkey, + cVoltSDK.sdk.programs.Volt.programId + ) + )[0] + const acct = await this.sdk.programs.Volt.account.pendingWithdrawal.fetch( + key + ) + const pendingWithdrawalInfo = { + ...acct, + key: key, + } + if ( pendingWithdrawalInfo && pendingWithdrawalInfo.roundNumber.lt(voltVault.roundNumber) && pendingWithdrawalInfo?.numVoltRedeemed?.gtn(0) ) { - prerequisiteInstructions.push( - await cVoltSDK.claimPendingWithdrawal(depositTokenDest) - ) + const ix = await cVoltSDK.claimPendingWithdrawal(depositTokenDest) + serializedInstruction = serializeInstructionToBase64(ix) + } else { + throw new Error('No pending withdrawal to claim') } - - const withdrawIx = await cVoltSDK.withdrawHumanAmount( - new BN(amount), - depositTokenMint, - vaultTokenAccount, - null, - depositTokenDest, - governedTokenAccount.governance.pubkey - ) - - const governedAccountIndex = withdrawIx.keys.findIndex( - (k) => - k.pubkey.toString() === - governedTokenAccount.governance?.pubkey.toString() - ) - withdrawIx.keys[governedAccountIndex].isSigner = true - - serializedInstruction = serializeInstructionToBase64(withdrawIx) } catch (e) { if (e instanceof Error) { throw new Error('Error: ' + e.message) diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index 107a8afa15..9af5559dc5 100644 --- a/utils/uiTypes/proposalCreationTypes.ts +++ b/utils/uiTypes/proposalCreationTypes.ts @@ -59,7 +59,20 @@ export interface FriktionWithdrawForm { amount: number | undefined governedTokenAccount: AssetAccount | undefined voltVaultId: string - depositTokenMint: string | undefined + programId: string | undefined + mintInfo: MintInfo | undefined +} + +export interface FriktionClaimPendingDepositForm { + governedTokenAccount: AssetAccount | undefined + voltVaultId: string + programId: string | undefined + mintInfo: MintInfo | undefined +} + +export interface FriktionClaimPendingWithdrawForm { + governedTokenAccount: AssetAccount | undefined + voltVaultId: string programId: string | undefined mintInfo: MintInfo | undefined } @@ -307,10 +320,12 @@ export enum Instructions { Grant, Clawback, CreateAssociatedTokenAccount, - DepositIntoCastle, - WithrawFromCastle, DepositIntoVolt, WithdrawFromVolt, + ClaimPendingDeposit, + ClaimPendingWithdraw, + DepositIntoCastle, + WithrawFromCastle, DepositIntoGoblinGold, WithdrawFromGoblinGold, CreateSolendObligationAccount, diff --git a/utils/validations.tsx b/utils/validations.tsx index b4fb85dfda..5fa9d7b511 100644 --- a/utils/validations.tsx +++ b/utils/validations.tsx @@ -344,6 +344,18 @@ export const getGoblinGoldWithdrawSchema = () => { }) } +export const getFriktionClaimPendingDepositSchema = () => { + return yup.object().shape({ + governedTokenAccount: yup.object().required('Source account is required'), + }) +} + +export const getFriktionClaimPendingWithdrawSchema = () => { + return yup.object().shape({ + governedTokenAccount: yup.object().required('Source account is required'), + }) +} + export const getTokenTransferSchema = ({ form, connection, diff --git a/yarn.lock b/yarn.lock index f1f6fe1885..9b344c9caa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -511,6 +511,24 @@ version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" +"@blockworks-foundation/mango-client@3.4.5": + version "3.4.5" + resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-3.4.5.tgz#9ba8e8450e7a834c4067885eef2c21dc1a7d4fb7" + integrity sha512-RQ8WAcUMKtV72TGZ3qLFqcZW17WbDyDMcnCZrzSHp0rWpuThXcKb17/YBJY7TugVRvc6JnV1aJtlibI/oF15Gw== + dependencies: + "@project-serum/anchor" "^0.21.0" + "@project-serum/serum" "0.13.55" + "@project-serum/sol-wallet-adapter" "^0.2.0" + "@solana/spl-token" "^0.1.6" + "@solana/web3.js" "^1.31.0" + big.js "^6.1.1" + bn.js "^5.1.0" + buffer-layout "^1.2.1" + cross-fetch "^3.1.5" + dotenv "^10.0.0" + toformat "^2.0.0" + yargs "^17.0.1" + "@blockworks-foundation/mango-client@^3.5.0": version "3.5.0" resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-3.5.0.tgz#485e7762bc39d08a22afdea8d9ae9aeae381dd30" @@ -807,19 +825,19 @@ version "0.2.5" resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz" -"@eslint/eslintrc@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.1.tgz#8b5e1c49f4077235516bc9ec7d41378c0f69b8c6" - integrity sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ== +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.3.1" - globals "^13.9.0" + espree "^9.3.2" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" - minimatch "^3.0.4" + minimatch "^3.1.2" strip-json-comments "^3.1.1" "@ethersproject/bytes@^5.5.0": @@ -882,10 +900,10 @@ lodash "^4.17.21" process "^0.11.10" -"@friktion-labs/entropy-client@^1.0.0": - version "1.4.78" - resolved "https://registry.yarnpkg.com/@friktion-labs/entropy-client/-/entropy-client-1.4.78.tgz#e50220243d29d27266fb2d1ab92a64ecad8f21ae" - integrity sha512-OgXTwyrqAMY0uSSZIqCFn5F7+l7ComNiOq9xqadkoKBRoytnP54qafCLmDVQy5o92JzsXIFyC1ULZcpF4f9Mow== +"@friktion-labs/entropy-client@^1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@friktion-labs/entropy-client/-/entropy-client-1.7.3.tgz#741dc326e646df126ac7752f93bccd7f29551f81" + integrity sha512-vpDhYmNG7f+n1u5NNYXhAUproy1X5l05YMPqSCzOx8INyEjyVmMgK45CHCnVJFnIPGxWmChzAmwP7Pd6adUvyQ== dependencies: "@project-serum/anchor" "^0.16.2" "@project-serum/borsh" "^0.2.3" @@ -901,28 +919,28 @@ dotenv-expand "^6.0.1" yargs "^17.0.1" -"@friktion-labs/friktion-sdk@^1.1.25": - version "1.1.25" - resolved "https://registry.yarnpkg.com/@friktion-labs/friktion-sdk/-/friktion-sdk-1.1.25.tgz#9233d3252cf38f04dc8cf8e5afef5047507c9291" - integrity sha512-RMnXNngfizYipSLBE+1fpSoptL940NYZTDv9vlDP+YdDVOyvAWc06pa2KLdKFyXQg/3pvcRRkaM12/+FgJtCWg== +"@friktion-labs/friktion-sdk@^1.1.118": + version "1.1.118" + resolved "https://registry.yarnpkg.com/@friktion-labs/friktion-sdk/-/friktion-sdk-1.1.118.tgz#8c7258f4317780e4c6bcffbf8a973ecf87a60cbf" + integrity sha512-fZTqpl6qKsWIQWp+QrHfYP4/f0IbqCuujhJBrH2JjUzXsVjzDKZDFuOv6jOFis4YNPqu5P6Ne2jRJr6OHtrQ8Q== dependencies: - "@friktion-labs/entropy-client" "^1.0.0" + "@blockworks-foundation/mango-client" "3.4.5" + "@friktion-labs/entropy-client" "^1.7.3" "@oclif/command" "^1.8.16" - "@project-serum/anchor" "^0.22.1" + "@project-serum/anchor" "^0.25.0-beta.1" + "@project-serum/common" "^0.0.1-beta.3" "@project-serum/serum" "^0.13.61" - "@saberhq/anchor-contrib" "^1.11.3" - "@saberhq/chai-solana" "^1.11.3" - "@saberhq/solana-contrib" "^1.11.3" - "@saberhq/token-utils" "^1.11.3" + "@saberhq/anchor-contrib" "1.12.53" + "@saberhq/solana-contrib" "1.12.53" + "@saberhq/token-utils" "1.12.53" "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "1.31.0" + "@solana/web3.js" "^1.42.0" "@switchboard-xyz/switchboard-v2" "^0.0.34" - bn.js "^5.2.0" - chalk "^5.0.0" + bn.js "^5.2.1" csv-parse "^5.0.4" decimal.js "^10.3.1" fast-csv "^4.3.6" - jsbi "^4.1.0" + superagent "^7.1.3" "@gar/promisify@^1.0.1": version "1.1.3" @@ -1938,13 +1956,13 @@ snake-case "^3.0.4" toml "^3.0.0" -"@project-serum/anchor@^0.22.1": - version "0.22.1" - resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.22.1.tgz#698a9620f94691de0a12bbc650a5c8380e2f0e8a" - integrity sha512-5pHeyvQhzLahIQ8aZymmDMZJAJFklN0joZdI+YIqFkK2uU/mlKr6rBLQjxysf/j1mLLiNG00tdyLfUtTAdQz7w== +"@project-serum/anchor@^0.25.0-beta.1": + version "0.25.0-beta.1" + resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.25.0-beta.1.tgz#7b113fb6604483d6740c8da9c6d86e9a5d5f6cf7" + integrity sha512-edesFlclgQzIluD2mC0xrGPnABBllKvbGd6MOtNZMCauUnx1Xbu073um8O6mrCeuZrz4PG9AhwAp1y5cOl3R4A== dependencies: "@project-serum/borsh" "^0.2.5" - "@solana/web3.js" "^1.17.0" + "@solana/web3.js" "^1.36.0" base64-js "^1.5.1" bn.js "^5.1.2" bs58 "^4.0.1" @@ -1953,10 +1971,10 @@ cross-fetch "^3.1.5" crypto-hash "^1.3.0" eventemitter3 "^4.0.7" - find "^0.3.0" js-sha256 "^0.9.0" pako "^2.0.3" snake-case "^3.0.4" + superstruct "^0.15.4" toml "^3.0.0" "@project-serum/borsh@^0.2.2", "@project-serum/borsh@^0.2.3", "@project-serum/borsh@^0.2.4", "@project-serum/borsh@^0.2.5": @@ -2217,35 +2235,30 @@ "@react-spring/shared" "~9.4.0" "@react-spring/types" "~9.4.0" -"@saberhq/anchor-contrib@^1.11.3", "@saberhq/anchor-contrib@^1.12.48": - version "1.12.48" - resolved "https://registry.npmjs.org/@saberhq/anchor-contrib/-/anchor-contrib-1.12.48.tgz" - integrity sha512-UPITsnMazZXfCv4rI3Zx5aAxXZc2wPX09j2Bf5M6zVT1wYTbTEGp0yNLY4f926LBda+EngMkc19SrOYu94ODfw== +"@saberhq/anchor-contrib@1.12.53": + version "1.12.53" + resolved "https://registry.yarnpkg.com/@saberhq/anchor-contrib/-/anchor-contrib-1.12.53.tgz#4cc46fdf0639315db73573b3190a1d6d5b942412" + integrity sha512-RYLHKYVxE3Oz0BeNgi6nIXH1kfGYYE4cYLgEAgBwbi4fFA3bFWNXVgXMiBDHBDBwx3wdKpKj/USDGz7xOcbtFw== dependencies: - "@saberhq/solana-contrib" "^1.12.48" + "@saberhq/solana-contrib" "^1.12.53" eventemitter3 "^4.0.7" lodash.camelcase "^4.3.0" lodash.mapvalues "^4.6.0" tslib "^2.3.1" -"@saberhq/chai-solana@^1.11.3": - version "1.12.48" - resolved "https://registry.npmjs.org/@saberhq/chai-solana/-/chai-solana-1.12.48.tgz" - integrity sha512-hqJXzMjYoRTc4eTwwb28181dNVJn1IYIkDn6oHOtl1VCZPVe0A0t4smT4OPW5hRZpIaWJDf2UPNwF7Tcyu2TXg== - dependencies: - "@saberhq/anchor-contrib" "^1.12.48" - "@saberhq/solana-contrib" "^1.12.48" - "@saberhq/token-utils" "^1.12.48" - "@types/chai" "^4.3.0" - "@types/chai-as-promised" "^7.1.5" +"@saberhq/solana-contrib@1.12.53": + version "1.12.53" + resolved "https://registry.yarnpkg.com/@saberhq/solana-contrib/-/solana-contrib-1.12.53.tgz#1a946e55ce9a63ceffe4485ec9c31cd9fc890f52" + integrity sha512-DpAKOYc2DucUpbnR6rV2P0vvlCexkMBpRYR24Y3ZMc1mgNPK/PCmV6nCm/xDYiOutQ29LeNv0jbUqlg5tdz69Q== + dependencies: "@types/promise-retry" "^1.1.3" - chai "=4.3.4" - chai-as-promised "^7.1.1" - chai-bn "^0.3.1" - colors "^1.4.0" + "@types/retry" "^0.12.1" + promise-retry "^2.0.1" + retry "^0.13.1" + tiny-invariant "^1.2.0" tslib "^2.3.1" -"@saberhq/solana-contrib@^1.11.3", "@saberhq/solana-contrib@^1.12.23", "@saberhq/solana-contrib@^1.12.26", "@saberhq/solana-contrib@^1.12.35", "@saberhq/solana-contrib@^1.12.48": +"@saberhq/solana-contrib@^1.12.23", "@saberhq/solana-contrib@^1.12.26", "@saberhq/solana-contrib@^1.12.35": version "1.12.48" resolved "https://registry.yarnpkg.com/@saberhq/solana-contrib/-/solana-contrib-1.12.48.tgz#313df4afbd6903997b15a551b99b5186a5f8ba9d" integrity sha512-aI6KjByqJK7/rzB8joIqpCMxQ554vQcDN3jX5iyd6HncNj03I6hyGoniOWGySxvftgwcZQC2x4/NmiIvxJ460g== @@ -2270,12 +2283,12 @@ tiny-invariant "^1.2.0" tslib "^2.4.0" -"@saberhq/token-utils@^1.11.3", "@saberhq/token-utils@^1.12.48": - version "1.12.48" - resolved "https://registry.npmjs.org/@saberhq/token-utils/-/token-utils-1.12.48.tgz" - integrity sha512-l99NNmuw+JUHLb+51DmyKZo1caH07Nir3QNj44CWzYU08F22zDPlD7kUXDjmHSYH+BzzGB5/EDR/5IIL9Rh9Zg== +"@saberhq/token-utils@1.12.53": + version "1.12.53" + resolved "https://registry.yarnpkg.com/@saberhq/token-utils/-/token-utils-1.12.53.tgz#405cebd330e68e537b4ce5ffc21462eced22cba7" + integrity sha512-r7tCdHZV+ANY2H53xjUJEVpXn27a7fZTpLZKRx7HVeG9/cTwccV0vec1f28Vfu1LNYdnIMeKSaCLk1I7CK05cg== dependencies: - "@saberhq/solana-contrib" "^1.12.48" + "@saberhq/solana-contrib" "^1.12.53" "@solana/buffer-layout" "^4.0.0" "@solana/spl-token" "^0.1.8" "@ubeswap/token-math" "^4.4.4" @@ -2569,10 +2582,10 @@ dependencies: cross-fetch "3.0.6" -"@solana/spl-token-registry@^0.2.3470": - version "0.2.3636" - resolved "https://registry.yarnpkg.com/@solana/spl-token-registry/-/spl-token-registry-0.2.3636.tgz#cb5b8eb4317735f71df301e198be821ddcb982b7" - integrity sha512-uMhW/A9HKCsDXATXq+CJ0UVYzfbls/TXz9cYJosCzNJL8rl1yFTKXdpqLx09WyGn07VYDInvu+svRb/KyTvaqw== +"@solana/spl-token-registry@^0.2.3775": + version "0.2.4389" + resolved "https://registry.yarnpkg.com/@solana/spl-token-registry/-/spl-token-registry-0.2.4389.tgz#e3bbc16e4360bd6bebd3ecdb3349e0aec6d626fa" + integrity sha512-AGcyMr0wphSMDzL6stPV1V2lLIYGPtPhr1L3HC1NeTB+wAojcQFDr8ngHAWoAH5TDWnYxIpH2LN3Viggf/eNag== dependencies: cross-fetch "3.0.6" @@ -2741,26 +2754,6 @@ process "^0.11.10" stream-browserify "^3.0.0" -"@solana/web3.js@1.31.0": - version "1.31.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.31.0.tgz#7a313d4c1a90b77f27ddbfe845a10d6883e06452" - integrity sha512-7nHHx1JNFnrt15e9y8m38I/EJCbaB+bFC3KZVM1+QhybCikFxGMtGA5r7PDC3GEL1R2RZA8yKoLkDKo3vzzqnw== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^3.0.0" - bn.js "^5.0.0" - borsh "^0.4.0" - bs58 "^4.0.1" - buffer "6.0.1" - cross-fetch "^3.1.4" - jayson "^3.4.4" - js-sha3 "^0.8.0" - rpc-websockets "^7.4.2" - secp256k1 "^4.0.2" - superstruct "^0.14.2" - tweetnacl "^1.0.0" - "@solana/web3.js@1.38.0": version "1.38.0" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.38.0.tgz#5752409fae912ca2dc470ef45636f4fd3a0e1956" @@ -3196,18 +3189,6 @@ dependencies: base-x "^3.0.6" -"@types/chai-as-promised@^7.1.5": - version "7.1.5" - resolved "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz" - integrity sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ== - dependencies: - "@types/chai" "*" - -"@types/chai@*", "@types/chai@^4.3.0": - version "4.3.0" - resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz" - integrity sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw== - "@types/connect@^3.4.33": version "3.4.35" resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz" @@ -3570,18 +3551,7 @@ "@typescript-eslint/types" "5.21.0" eslint-visitor-keys "^3.0.0" -"@ubeswap/token-math@^4.4.4": - version "4.4.4" - resolved "https://registry.npmjs.org/@ubeswap/token-math/-/token-math-4.4.4.tgz" - integrity sha512-AbcyDhKVPaFQOuzak1UPyBPNbo6IHCKY4C2xq5DOcW6qmlI+4EaxI9mU2jpG/joYAtqPYrx2BbLizU+TfB6bmg== - dependencies: - big.js "^6.1.1" - decimal.js-light "^2.5.1" - tiny-invariant "^1.2.0" - toformat "^2.0.0" - tslib "^2.3.1" - -"@ubeswap/token-math@^4.4.8": +"@ubeswap/token-math@^4.4.4", "@ubeswap/token-math@^4.4.8": version "4.4.8" resolved "https://registry.yarnpkg.com/@ubeswap/token-math/-/token-math-4.4.8.tgz#7530627c6d11ecfb3a8159b66567764256352f9e" integrity sha512-/j8fld29BlWUA3hfBgFPuVorzOkhvnUyORk053pPJX0m9zhoFieRIT65A2sOGgF5Cffxj/OjN1ycAatD8vv6xg== @@ -3624,9 +3594,10 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-jsx@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz" +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-node@^1.6.1: version "1.8.2" @@ -3652,11 +3623,16 @@ acorn@^7.0.0, acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.7.0: +acorn@^8.0.4, acorn@^8.2.4, acorn@^8.4.1: version "8.7.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== +acorn@^8.7.1: + version "8.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" + integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== + agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" @@ -3946,11 +3922,6 @@ assert@^2.0.0: object-is "^1.0.1" util "^0.12.0" -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz" @@ -4269,6 +4240,11 @@ bn.js@^5.0.0, bn.js@^5.1.0, bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0: resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + body-parser@1.19.1: version "1.19.1" resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz" @@ -4585,30 +4561,6 @@ ccount@^2.0.0: resolved "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz" integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== -chai-as-promised@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz" - integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== - dependencies: - check-error "^1.0.2" - -chai-bn@^0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/chai-bn/-/chai-bn-0.3.1.tgz" - integrity sha512-vuzEy0Cb+k8zqi2SHOmvZdRSbKcSOJfS1Nv8+6YDJIyCzfxkTCHLNRyjRIoRJ3WJtYb/c7OHjrvLoGeyO4A/gA== - -chai@=4.3.4: - version "4.3.4" - resolved "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz" - integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.1" - type-detect "^4.0.5" - chalk@^2.0.0: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -4641,11 +4593,6 @@ chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz" - integrity sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ== - chan@^0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/chan/-/chan-0.6.1.tgz" @@ -4670,11 +4617,6 @@ character-reference-invalid@^2.0.0: resolved "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.0.tgz" integrity sha512-pE3Z15lLRxDzWJy7bBHBopRwfI20sbrMVLQTC7xsPglCHf4Wv1e167OgYAFP78co2XlhojDyAqA+IAJse27//g== -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= - check-more-types@2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" @@ -4966,9 +4908,9 @@ common-ancestor-path@^1.0.1: resolved "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz" integrity sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w== -component-emitter@^1.2.1: +component-emitter@^1.2.1, component-emitter@^1.3.0: version "1.3.0" - resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== compressible@~2.0.16: @@ -5039,6 +4981,11 @@ cookie@^0.4.1: resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +cookiejar@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.3.tgz#fc7a6216e408e74414b90230050842dacda75acc" + integrity sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ== + copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz" @@ -5395,7 +5342,7 @@ debug@^4.2.0: dependencies: ms "2.1.2" -debug@^4.3.3, debug@~4.3.1, debug@~4.3.2: +debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -5438,13 +5385,6 @@ dedent@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" - deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz" @@ -5579,7 +5519,7 @@ detective@^5.2.0: defined "^1.0.0" minimist "^1.1.1" -dezalgo@^1.0.0: +dezalgo@1.0.3, dezalgo@^1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz" integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= @@ -5927,15 +5867,15 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^8.3.0: - version "8.3.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz" - integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== -eslint-plugin-react-hooks@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz" - integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA== +eslint-plugin-react-hooks@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz#5f762dfedf8b2cf431c689f533c9d3fa5dcf25ad" + integrity sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw== eslint-plugin-react@^7.29.4: version "7.29.4" @@ -5989,12 +5929,12 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^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@^8.12.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.12.0.tgz#c7a5bd1cfa09079aae64c9076c07eada66a46e8e" - integrity sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q== +eslint@^8.14.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.17.0.tgz#1cfc4b6b6912f77d24b874ca1506b0fe09328c21" + integrity sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw== dependencies: - "@eslint/eslintrc" "^1.2.1" + "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" @@ -6005,14 +5945,14 @@ eslint@^8.12.0: eslint-scope "^7.1.1" eslint-utils "^3.0.0" eslint-visitor-keys "^3.3.0" - espree "^9.3.1" + espree "^9.3.2" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" - globals "^13.6.0" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -6021,7 +5961,7 @@ eslint@^8.12.0: json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.1" regexpp "^3.2.0" @@ -6030,13 +5970,13 @@ eslint@^8.12.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^9.3.1: - version "9.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.1.tgz#8793b4bc27ea4c778c19908e0719e7b8f4115bcd" - integrity sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ== +espree@^9.3.2: + version "9.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" + integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== dependencies: - acorn "^8.7.0" - acorn-jsx "^5.3.1" + acorn "^8.7.1" + acorn-jsx "^5.3.2" eslint-visitor-keys "^3.3.0" esprima@^4.0.0, esprima@^4.0.1: @@ -6541,6 +6481,16 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +formidable@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/formidable/-/formidable-2.0.1.tgz#4310bc7965d185536f9565184dee74fbb75557ff" + integrity sha512-rjTMNbp2BpfQShhFbR3Ruk3qk2y9jKpvMW78nJgx8QKtxjDVrwbZG+wvDOmVbifHyOUOQJXxqEy6r0faRrPzTQ== + dependencies: + dezalgo "1.0.3" + hexoid "1.0.0" + once "1.4.0" + qs "6.9.3" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" @@ -6673,11 +6623,6 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= - get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz" @@ -6806,16 +6751,10 @@ globals@^11.1.0: version "11.12.0" resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" -globals@^13.6.0: - version "13.8.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz" - dependencies: - type-fest "^0.20.2" - -globals@^13.9.0: - version "13.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz" - integrity sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg== +globals@^13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" + integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== dependencies: type-fest "^0.20.2" @@ -7012,6 +6951,11 @@ hex-color-regex@^1.1.0: resolved "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz" integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== +hexoid@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18" + integrity sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g== + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" @@ -9137,10 +9081,10 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -methods@~1.1.2: +methods@^1.1.2, methods@~1.1.2: version "1.1.2" - resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== micromark-core-commonmark@^1.0.0: version "1.0.6" @@ -9521,9 +9465,9 @@ mime@1.6.0: resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.4.4: +mime@2.6.0, mime@^2.4.4: version "2.6.0" - resolved "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== mimic-fn@^2.1.0: @@ -9737,6 +9681,11 @@ nanoid@^3.3.1: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz" @@ -10273,7 +10222,7 @@ on-headers@~1.0.2: resolved "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@1.4.0, once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -10528,11 +10477,6 @@ path-type@^4.0.0: resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" @@ -10956,7 +10900,7 @@ postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0. picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.1.6, postcss@^8.1.8, postcss@^8.2.12, postcss@^8.3.5, postcss@^8.4.6: +postcss@^8.1.6, postcss@^8.1.8, postcss@^8.3.5, postcss@^8.4.6: version "8.4.12" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905" integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg== @@ -10965,6 +10909,15 @@ postcss@^8.1.6, postcss@^8.1.8, postcss@^8.2.12, postcss@^8.3.5, postcss@^8.4.6: picocolors "^1.0.0" source-map-js "^1.0.2" +postcss@^8.4.12: + version "8.4.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" @@ -11193,11 +11146,23 @@ qrcode-terminal@^0.12.0: resolved "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz" integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== +qs@6.9.3: + version "6.9.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e" + integrity sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw== + qs@6.9.6: version "6.9.6" resolved "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz" integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ== +qs@^6.10.3: + version "6.10.5" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4" + integrity sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ== + dependencies: + side-channel "^1.0.4" + qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -11972,6 +11937,13 @@ semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: dependencies: lru-cache "^6.0.0" +semver@^7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + send@0.17.2: version "0.17.2" resolved "https://registry.npmjs.org/send/-/send-0.17.2.tgz" @@ -12643,6 +12615,23 @@ stylis@4.0.13: resolved "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz" integrity sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag== +superagent@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/superagent/-/superagent-7.1.6.tgz#64f303ed4e4aba1e9da319f134107a54cacdc9c6" + integrity sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g== + dependencies: + component-emitter "^1.3.0" + cookiejar "^2.1.3" + debug "^4.3.4" + fast-safe-stringify "^2.1.1" + form-data "^4.0.0" + formidable "^2.0.1" + methods "^1.1.2" + mime "2.6.0" + qs "^6.10.3" + readable-stream "^3.6.0" + semver "^7.3.7" + superstruct@0.8.3: version "0.8.3" resolved "https://registry.npmjs.org/superstruct/-/superstruct-0.8.3.tgz" @@ -13145,7 +13134,7 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5: +type-detect@4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==