diff --git a/@types/buffer-layout.d.ts b/@types/buffer-layout.d.ts deleted file mode 100644 index a9dd43d306..0000000000 --- a/@types/buffer-layout.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -declare module 'buffer-layout' { - export class Layout { - span: number - property?: string - - constructor(span: number, property?: string) - - decode(b: Buffer, offset?: number): T - encode(src: T, b: Buffer, offset?: number): number - getSpan(b: Buffer, offset?: number): number - replicate(name: string): this - } - - export interface EnumLayout extends Layout { - registry: Record> - } - - export class Structure extends Layout { - span: any - } - export function greedy( - elementSpan?: number, - property?: string - ): Layout - export function offset( - layout: Layout, - offset?: number, - property?: string - ): Layout - export function u8(property?: string): Layout - export function u16(property?: string): Layout - export function u24(property?: string): Layout - export function u32(property?: string): Layout - export function u40(property?: string): Layout - export function u48(property?: string): Layout - export function nu64(property?: string): Layout - export function u16be(property?: string): Layout - export function u24be(property?: string): Layout - export function u32be(property?: string): Layout - export function u40be(property?: string): Layout - export function u48be(property?: string): Layout - export function nu64be(property?: string): Layout - export function s8(property?: string): Layout - export function s16(property?: string): Layout - export function s24(property?: string): Layout - export function s32(property?: string): Layout - export function s40(property?: string): Layout - export function s48(property?: string): Layout - export function ns64(property?: string): Layout - export function s16be(property?: string): Layout - export function s24be(property?: string): Layout - export function s32be(property?: string): Layout - export function s40be(property?: string): Layout - export function s48be(property?: string): Layout - export function ns64be(property?: string): Layout - export function f32(property?: string): Layout - export function f32be(property?: string): Layout - export function f64(property?: string): Layout - export function f64be(property?: string): Layout - export function struct( - fields: Layout[], - property?: string, - decodePrefixes?: boolean - ): Layout - export function bits( - word: Layout, - msb?: boolean, - property?: string - ): any - export function seq( - elementLayout: Layout, - count: number | Layout, - property?: string - ): Layout - export function union( - discr: Layout, - defaultLayout?: any, - property?: string - ): any - export function unionLayoutDiscriminator( - layout: Layout, - property?: string - ): any - export function blob( - length: number | Layout, - property?: string - ): Layout - export function cstr(property?: string): Layout - export function utf8(maxSpan: number, property?: string): Layout -} diff --git a/@types/index.d.ts b/@types/index.d.ts deleted file mode 100644 index 9b9471da0d..0000000000 --- a/@types/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.svg' { - const content: any - export default content -} diff --git a/@types/types.ts b/@types/types.ts deleted file mode 100644 index e09141d5af..0000000000 --- a/@types/types.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { EndpointTypes } from '@models/types' -import type { AccountInfo, PublicKey } from '@solana/web3.js' - -export interface EndpointInfo { - name: EndpointTypes - url: string -} - -export interface TokenAccount { - pubkey: PublicKey - account: AccountInfo | null - effectiveMint: PublicKey -} diff --git a/NftVotePlugin/sdk/accounts.tsx b/NftVotePlugin/sdk/accounts.tsx deleted file mode 100644 index b531b90523..0000000000 --- a/NftVotePlugin/sdk/accounts.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { PublicKey } from '@solana/web3.js' - -export const emptyPk = '11111111111111111111111111111111' - -export const getNftRegistrarPDA = async ( - realmPk: PublicKey, - mint: PublicKey, - clientProgramId: PublicKey -) => { - const [registrar, registrarBump] = await PublicKey.findProgramAddress( - [Buffer.from('registrar'), realmPk.toBuffer(), mint.toBuffer()], - clientProgramId - ) - return { - registrar, - registrarBump, - } -} - -export const getNftMaxVoterWeightRecord = async ( - realmPk: PublicKey, - mint: PublicKey, - clientProgramId: PublicKey -) => { - const [ - maxVoterWeightRecord, - maxVoterWeightRecordBump, - ] = await PublicKey.findProgramAddress( - [ - Buffer.from('max-voter-weight-record'), - realmPk.toBuffer(), - mint.toBuffer(), - ], - clientProgramId - ) - return { - maxVoterWeightRecord, - maxVoterWeightRecordBump, - } -} - -export const getNftVoterWeightRecord = async ( - realmPk: PublicKey, - mint: PublicKey, - walletPk: PublicKey, - clientProgramId: PublicKey -) => { - const [ - voterWeightPk, - voterWeightRecordBump, - ] = await PublicKey.findProgramAddress( - [ - Buffer.from('voter-weight-record'), - realmPk.toBuffer(), - mint.toBuffer(), - walletPk.toBuffer(), - ], - clientProgramId - ) - return { - voterWeightPk, - voterWeightRecordBump, - } -} diff --git a/NftVotePlugin/store/nftPluginStore.ts b/NftVotePlugin/store/nftPluginStore.ts deleted file mode 100644 index 0f3a2e6b96..0000000000 --- a/NftVotePlugin/store/nftPluginStore.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { MaxVoterWeightRecord, ProgramAccount } from '@solana/spl-governance' -import { NFTWithMeta, VotingClient } from '@utils/uiTypes/VotePlugin' -import create, { State } from 'zustand' - -interface nftPluginStore extends State { - state: { - votingNfts: NFTWithMeta[] - votingPower: BN - maxVoteRecord: ProgramAccount | null - isLoadingNfts: boolean - } - setVotingNfts: ( - nfts: NFTWithMeta[], - votingClient: VotingClient, - nftMintRegistrar: any - ) => void - setVotingPower: (nfts: NFTWithMeta[], nftMintRegistrar: any) => void - setMaxVoterWeight: ( - maxVoterRecord: ProgramAccount | null - ) => void - setIsLoadingNfts: (val: boolean) => void -} - -const defaultState = { - votingNfts: [], - votingPower: new BN(0), - maxVoteRecord: null, - isLoadingNfts: false, -} - -const useNftPluginStore = create((set, _get) => ({ - state: { - ...defaultState, - }, - setIsLoadingNfts: (val) => { - set((s) => { - s.state.isLoadingNfts = val - }) - }, - setVotingNfts: (nfts, votingClient, nftMintRegistrar) => { - const filteredNfts = nfts.filter( - (x) => x.token.account.amount.cmpn(1) === 0 - ) - votingClient._setCurrentVoterNfts(filteredNfts) - set((s) => { - s.state.votingNfts = filteredNfts - }) - _get().setVotingPower(filteredNfts, nftMintRegistrar) - }, - setVotingPower: (nfts, nftMintRegistrar) => { - const votingPower = nfts - .map( - (x) => - nftMintRegistrar?.collectionConfigs?.find( - (j) => - j.collection?.toBase58() === x.metadata?.data?.collection?.key - )?.weight || new BN(0) - ) - .reduce((prev, next) => prev.add(next), new BN(0)) - set((s) => { - s.state.votingPower = votingPower - }) - }, - setMaxVoterWeight: (maxVoterRecord) => { - set((s) => { - s.state.maxVoteRecord = maxVoterRecord - }) - }, -})) - -export default useNftPluginStore diff --git a/Procfile b/Procfile deleted file mode 100644 index 7bde554606..0000000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -worker: npm run notifier diff --git a/README.md b/README.md index 823ed208b1..6a2aa52ca0 100644 --- a/README.md +++ b/README.md @@ -1,45 +1 @@ -# Switchboard Add-in Support - -## To set this up for development with Switchboard, the first step is to get [this](https://github.com/switchboard-xyz/switchboard-core/blob/main/switchboard_v2/tests/addin-tests.ts) to work. - -- [install anchor](https://project-serum.github.io/anchor/getting-started/installation.html#installing-dependencies)[install anchor](https://project-serum.github.io/anchor/getting-started/installation.html#installing-dependencies) if you don't currently have it installed -- navigate to the `switchboard_v2` directory within `switchboard-core` and run `anchor test`. This will build switchboardv2 and run the addin-tests.ts script, which will set up a realm, governance, queue, oracles, permissions, and proposal. -- you will need to make sure the pubkeys of the governance program and switchboard program throughout the codebase are pointed to your local pubkeys of those programs: -- you can determine the pubkeys of the localnet switchboardv2 and governance programs by navigating to `switchboard-core/switchboard_v2/target/deploy` and running `solana-keygen pubkey switchboard_v2-keypair.json` and `solana-keygen pubkey spl_governance-keypair.json` respectively -- You'll need to set the `declare_id!(...)` in Switchboardv2's `lib.rs` to point at your localnet switchboard program's pubkey, and you'll need to set Switchboardv2's `lib.rs` `GOVERNANCE_PID` variable to the spl_governance pubkey. -- you'll also need to ensure that `sbv2.ts` variable GOVERNANCE_PID points at the correct pubkey for your localnet governance program -- when you want to run the UI, start a local validator by running `solana-test-validator`. This will created a directory called `test-ledger` in the location you run the command. -- run the addin test suite, `anchor test` -- start the governance-ui by running `yarn dev` - -## Working on governance-ui - -- most of the work is in `hooks/useRealm.ts` and `hooks/useVotingPlugins.ts` in the governance-ui. The UI work is in `components/TokenBalance` - -# NextJS Typescript Boilerplate - -Bootstrap a developer-friendly NextJS app configured with: - -- [Typescript](https://www.typescriptlang.org/) -- Linting with [ESLint](https://eslint.org/) -- Formatting with [Prettier](https://prettier.io/) -- Linting, typechecking and formatting on by default using [`husky`](https://github.com/typicode/husky) for commit hooks -- Testing with [Jest](https://jestjs.io/) and [`react-testing-library`](https://testing-library.com/docs/react-testing-library/intro) - -## Deploy your own - -Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-typescript-eslint-jest&project-name=with-typescript-eslint-jest&repository-name=with-typescript-eslint-jest) - -## How to use - -Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: - -```bash -npx create-next-app --example with-typescript-eslint-jest with-typescript-eslint-jest-app -# or -yarn create next-app --example with-typescript-eslint-jest with-typescript-eslint-jest-app -``` - -Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Solend DeFi == DumbFucks diff --git a/Strategies/components/CreateRefLink.tsx b/Strategies/components/CreateRefLink.tsx deleted file mode 100644 index d00c9746f0..0000000000 --- a/Strategies/components/CreateRefLink.tsx +++ /dev/null @@ -1,220 +0,0 @@ -import { - MangoAccount, - ReferrerIdRecord, - makeRegisterReferrerIdInstruction, - MangoGroup, - INFO_LEN, -} from '@blockworks-foundation/mango-client' -import Button, { LinkButton } from '@components/Button' -import Input from '@components/inputs/Input' -import Tooltip from '@components/Tooltip' -import { DuplicateIcon } from '@heroicons/react/outline' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { PublicKey, Transaction } from '@solana/web3.js' -import { notify } from '@utils/notifications' -import { sendTransaction } from '@utils/send' -import { useState, useEffect } from 'react' -import useWalletStore from 'stores/useWalletStore' -import { tryGetMangoAccount } from 'Strategies/protocols/mango/tools' -import { MarketStore } from 'Strategies/store/marketStore' -const minMngoToCreateLink = 10000 -const CreateRefForm = ({ - selectedMangoAccount, - market, - mint, -}: { - selectedMangoAccount: MangoAccount - market: MarketStore - mint: PublicKey -}) => { - const connection = useWalletStore((s) => s.connection) - - const link = - connection.cluster === 'devnet' - ? `http://devnet.mango.markets/?ref=` - : `https://trade.mango.markets/?ref` - const depositIndex = market.group!.tokens.findIndex( - (x) => x.mint.toBase58() === mint.toBase58() - ) - const { canUseTransferInstruction } = useGovernanceAssets() - - const wallet = useWalletStore((s) => s.current) - const currentPosition = selectedMangoAccount - .getUiDeposit( - market.cache!.rootBankCache[depositIndex], - market.group!, - depositIndex - ) - .toNumber() - const [existingLinks, setExistingLinks] = useState([]) - const [linkGenerated, setLinkGenerated] = useState(false) - const [linkName, setLinkName] = useState('') - const connected = useWalletStore((s) => s.connected) - const handleCreateLink = async () => { - setLinkGenerated(false) - try { - const signers = [] - const programId = market.client!.programId - const mangoGroup = market.group - const { referrerPda, encodedReferrerId } = await getReferrerPda( - mangoGroup!, - linkName, - programId - ) - const instruction = makeRegisterReferrerIdInstruction( - programId, - mangoGroup!.publicKey, - selectedMangoAccount!.publicKey, - referrerPda, - wallet!.publicKey!, - encodedReferrerId - ) - - const transaction = new Transaction() - transaction.add(instruction) - await sendTransaction({ - transaction, - wallet: wallet!, - connection: connection.current, - signers, - sendingMessage: 'Creating ref link', - successMessage: 'Ref link created', - }) - setLinkGenerated(true) - } catch (e) { - setLinkGenerated(false) - notify({ type: 'error', message: "Can't generate link" }) - } - } - const getReferrerPda = async ( - mangoGroup: MangoGroup, - referrerId: string, - programId: PublicKey - ): Promise<{ referrerPda: PublicKey; encodedReferrerId: Buffer }> => { - const encoded = Buffer.from(referrerId, 'utf8') - if (encoded.length > INFO_LEN) { - throw new Error( - `info string too long. Must be less than or equal to ${INFO_LEN} bytes` - ) - } - - const encodedReferrerId = Buffer.concat([ - encoded, - Buffer.alloc(INFO_LEN - encoded.length, 0), - ]) - - // Generate the PDA pubkey - const [referrerIdRecordPk] = await PublicKey.findProgramAddress( - [ - mangoGroup.publicKey.toBytes(), - new Buffer('ReferrerIdRecord', 'utf-8'), - encodedReferrerId, - ], - programId - ) - - return { referrerPda: referrerIdRecordPk, encodedReferrerId } - } - useEffect(() => { - const getRefLinks = async () => { - const client = market.client - const mangoAccountPk = selectedMangoAccount!.publicKey - const account = await tryGetMangoAccount(market, mangoAccountPk) - if (account) { - const referrerIds = await client?.getReferrerIdsForMangoAccount(account) - if (referrerIds) { - setExistingLinks(referrerIds) - } - } - } - if (selectedMangoAccount) { - getRefLinks() - } else { - setExistingLinks([]) - } - setLinkName('') - }, [selectedMangoAccount]) - return ( -
- setLinkName(e.target.value)} - /> - - {linkGenerated || existingLinks.length > 0 ? ( -
- {linkGenerated && ( -
-
-
- {link} - {linkName} -
-
-
- { - navigator.clipboard.writeText(`${link}${linkName}`) - }} - > - - -
-
- )} - {existingLinks.map((x) => ( -
-
-
- {link} - {x.referrerId} -
-
-
- { - navigator.clipboard.writeText(`${link}${x.referrerId}`) - }} - > - - -
-
- ))} -
- ) : null} -
- ) -} - -export default CreateRefForm diff --git a/Strategies/components/Delegate.tsx b/Strategies/components/Delegate.tsx deleted file mode 100644 index 62843358f5..0000000000 --- a/Strategies/components/Delegate.tsx +++ /dev/null @@ -1,179 +0,0 @@ -import { - MangoAccount, - makeSetDelegateInstruction, -} from '@blockworks-foundation/mango-client' -import AdditionalProposalOptions from '@components/AdditionalProposalOptions' -import Button from '@components/Button' -import Input from '@components/inputs/Input' -import Loading from '@components/Loading' -import Tooltip from '@components/Tooltip' -import useCreateProposal from '@hooks/useCreateProposal' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import useQueryContext from '@hooks/useQueryContext' -import useRealm from '@hooks/useRealm' -import { - ProgramAccount, - Governance, - getInstructionDataFromBase64, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import { abbreviateAddress } from '@utils/formatting' -import { validateInstruction } from '@utils/instructionTools' -import { notify } from '@utils/notifications' -import { getValidatedPublickKey } from '@utils/validations' -import { InstructionDataWithHoldUpTime } from 'actions/createProposal' -import { useRouter } from 'next/router' -import { useState } from 'react' -import { MarketStore } from 'Strategies/store/marketStore' -import * as yup from 'yup' - -const DelegateForm = ({ - selectedMangoAccount, - governance, - market, -}: { - selectedMangoAccount: MangoAccount - governance: ProgramAccount - market: MarketStore -}) => { - const router = useRouter() - const { symbol } = useRealm() - const { fmtUrlWithCluster } = useQueryContext() - const { handleCreateProposal } = useCreateProposal() - const { canUseTransferInstruction } = useGovernanceAssets() - const groupConfig = market.groupConfig! - const [voteByCouncil, setVoteByCouncil] = useState(false) - const [isLoading, setIsLoading] = useState(false) - const [form, setForm] = useState({ - title: '', - description: '', - delegateAddress: '', - }) - const [formErrors, setFormErrors] = useState({}) - const proposalTitle = `Set delegate for MNGO account: ${abbreviateAddress( - selectedMangoAccount?.publicKey - )}` - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const handleProposeDelegate = async () => { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - if (!isValid) { - return - } - setIsLoading(true) - const delegateMangoAccount = makeSetDelegateInstruction( - groupConfig.mangoProgramId, - groupConfig.publicKey, - selectedMangoAccount!.publicKey, - governance!.pubkey, - new PublicKey(form.delegateAddress) - ) - try { - const instructionData: InstructionDataWithHoldUpTime = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(delegateMangoAccount) - ), - holdUpTime: governance!.account!.config.minInstructionHoldUpTime, - prerequisiteInstructions: [], - } - const proposalAddress = await handleCreateProposal({ - title: form.title || proposalTitle, - description: form.description, - instructionsData: [instructionData], - governance: governance!, - voteByCouncil, - }) - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - router.push(url) - } catch (e) { - console.log(e) - notify({ type: 'error', message: "Can't create proposal" }) - } - } - const schema = yup.object().shape({ - delegateAddress: yup - .string() - .test( - 'accountTests', - 'Delegate address validation error', - function (val: string) { - if (val) { - try { - return !!getValidatedPublickKey(val) - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Delegate address is required`, - }) - } - } - ), - }) - return ( -
- - handleSetForm({ - value: e.target.value, - propertyName: 'delegateAddress', - }) - } - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - setDescription={(evt) => - handleSetForm({ - value: evt.target.value, - propertyName: 'description', - }) - } - voteByCouncil={voteByCouncil} - setVoteByCouncil={setVoteByCouncil} - /> - -
- ) -} - -export default DelegateForm diff --git a/Strategies/components/DepositModal.tsx b/Strategies/components/DepositModal.tsx deleted file mode 100644 index 3ac535c1a1..0000000000 --- a/Strategies/components/DepositModal.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import Modal from '@components/Modal' -import ModalHeader from './ModalHeader' -import SolendModalContent from './SolendModalContent' -import MangoDeposit from './MangoDepositComponent' -import BigNumber from 'bignumber.js' -import { SolendStrategy } from 'Strategies/types/types' - -const DepositModal = ({ - onClose, - proposedInvestment, - handledMint, - apy, - protocolName, - protocolLogoSrc, - handledTokenName, - strategyName, - currentPosition, - createProposalFcn, - mangoAccounts, - governedTokenAccount, -}) => { - const currentPositionFtm = new BigNumber( - currentPosition.toFixed(0) - ).toFormat() - - return ( - - - {protocolName === 'Solend' ? ( - - ) : null} - {protocolName === 'Mango' ? ( - - ) : null} - - ) -} - -export default DepositModal diff --git a/Strategies/components/MangoDepositComponent.tsx b/Strategies/components/MangoDepositComponent.tsx deleted file mode 100644 index 5ae510d7d8..0000000000 --- a/Strategies/components/MangoDepositComponent.tsx +++ /dev/null @@ -1,490 +0,0 @@ -import { - MangoAccount, - MangoAccountLayout, - PublicKey, -} from '@blockworks-foundation/mango-client' -import Button, { LinkButton } from '@components/Button' -import Input from '@components/inputs/Input' -import Loading from '@components/Loading' -import Tooltip from '@components/Tooltip' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import useQueryContext from '@hooks/useQueryContext' -import useRealm from '@hooks/useRealm' -import { getProgramVersionForRealm } from '@models/registry/api' -import { BN } from '@project-serum/anchor' -import { - getNativeTreasuryAddress, - RpcContext, - withCreateNativeTreasury, -} from '@solana/spl-governance' -import { SystemProgram, TransactionInstruction } from '@solana/web3.js' -import { - fmtMintAmount, - getMintDecimalAmount, - getMintMinAmountAsDecimal, - parseMintNaturalAmountFromDecimal, -} from '@tools/sdk/units' -import { abbreviateAddress, precision } from '@utils/formatting' -import tokenService from '@utils/services/token' -import BigNumber from 'bignumber.js' -import { useRouter } from 'next/router' -import { useEffect, useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import useMarketStore, { MarketStore } from 'Strategies/store/marketStore' -import { HandleCreateProposalWithStrategy } from 'Strategies/types/types' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import ButtonGroup from '@components/ButtonGroup' -import Switch from '@components/Switch' -import Select from '@components/inputs/Select' -import CreateRefForm from './CreateRefLink' -import DelegateForm from './Delegate' -import AdditionalProposalOptions from '@components/AdditionalProposalOptions' -import { validateInstruction } from '@utils/instructionTools' -import * as yup from 'yup' -import { getValidatedPublickKey } from '@utils/validations' -import { AssetAccount } from '@utils/uiTypes/assets' -import WithdrawModal from './WithdrawModal' - -const DEPOSIT = 'Deposit' -const CREATE_REF_LINK = 'Create Referral Link' -const DELEGATE_ACCOUNT = 'Delegate' -const WITHDRAW = 'Withdraw' - -const MangoDepositComponent = ({ - handledMint, - currentPositionFtm, - createProposalFcn, - mangoAccounts, - governedTokenAccount, -}: { - handledMint: string - currentPositionFtm: string - createProposalFcn: HandleCreateProposalWithStrategy - mangoAccounts: MangoAccount[] - governedTokenAccount: AssetAccount -}) => { - const router = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const { - proposals, - realmInfo, - realm, - ownVoterWeight, - mint, - councilMint, - symbol, - } = useRealm() - const [isDepositing, setIsDepositing] = useState(false) - const [ - selectedMangoAccount, - setSelectedMangoAccount, - ] = useState( - mangoAccounts.length ? mangoAccounts[0] : null - ) - const [voteByCouncil, setVoteByCouncil] = useState(false) - const client = useVotePluginsClientStore( - (s) => s.state.currentRealmVotingClient - ) - const market = useMarketStore((s) => s) - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const tokenInfo = tokenService.getTokenInfo(handledMint) - const { canUseTransferInstruction } = useGovernanceAssets() - const treasuryAmount = governedTokenAccount.extensions?.token - ? governedTokenAccount.extensions.token.account.amount - : new BN(0) - const mintInfo = governedTokenAccount.extensions?.mint?.account - const [form, setForm] = useState({ - title: '', - description: '', - delegateAddress: '', - delegateDeposit: false, - amount: '', - }) - const [formErrors, setFormErrors] = useState({}) - const proposalTitle = `Deposit ${form.amount} ${ - tokenService.getTokenInfo( - governedTokenAccount.extensions.mint!.publicKey.toBase58() - )?.symbol || 'tokens' - } to Mango account` - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const [proposalType, setProposalType] = useState('Deposit') - const mintMinAmount = mintInfo ? getMintMinAmountAsDecimal(mintInfo) : 1 - const maxAmount = mintInfo - ? getMintDecimalAmount(mintInfo, treasuryAmount) - : new BigNumber(0) - const maxAmountFtm = fmtMintAmount(mintInfo, treasuryAmount) - const currentPrecision = precision(mintMinAmount) - const group = market!.group! - const depositIndex = group.tokens.findIndex( - (x) => x.mint.toBase58() === handledMint - ) - const tabs = [ - { val: DEPOSIT, isVisible: true }, - { val: CREATE_REF_LINK, isVisible: selectedMangoAccount !== null }, - { val: DELEGATE_ACCOUNT, isVisible: selectedMangoAccount !== null }, - { val: WITHDRAW, isVisible: selectedMangoAccount !== null }, - ] - .filter((x) => x.isVisible) - .map((x) => x.val) - const validateAmountOnBlur = () => { - handleSetForm({ - propertyName: 'amount', - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(form.amount)) - ).toFixed(currentPrecision) - ), - }) - } - useEffect(() => { - if (selectedMangoAccount === null) { - setProposalType(DEPOSIT) - } - }, [selectedMangoAccount]) - const handleSolPayment = async () => { - const instructions: TransactionInstruction[] = [] - const toAddress = await getNativeTreasuryAddress( - realm!.owner, - governedTokenAccount!.governance!.pubkey - ) - const hasSolAccount = await connection.current.getParsedAccountInfo( - toAddress - ) - if (!hasSolAccount.value) { - await withCreateNativeTreasury( - instructions, - realm!.owner, - governedTokenAccount!.governance!.pubkey, - wallet!.publicKey! - ) - } - - const minRentAmount = await connection.current.getMinimumBalanceForRentExemption( - MangoAccountLayout.span - ) - - const transferIx = SystemProgram.transfer({ - fromPubkey: wallet!.publicKey!, - toPubkey: toAddress, - lamports: minRentAmount, - }) - instructions.push(transferIx) - return instructions - } - const handleDeposit = async () => { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - if (!isValid) { - return - } - try { - setIsDepositing(true) - const prerequisiteInstructions: TransactionInstruction[] = [] - const mangoAccountPk = selectedMangoAccount?.publicKey || null - if (!mangoAccountPk) { - const solAccountInstruction = await handleSolPayment() - prerequisiteInstructions.push(...solAccountInstruction) - } - const rpcContext = new RpcContext( - new PublicKey(realm!.owner.toString()), - getProgramVersionForRealm(realmInfo!), - wallet!, - connection.current, - connection.endpoint - ) - const mintAmount = parseMintNaturalAmountFromDecimal( - form.amount!, - governedTokenAccount.extensions!.mint!.account.decimals - ) - const ownTokenRecord = ownVoterWeight.getTokenRecordToCreateProposal( - governedTokenAccount!.governance!.account.config - ) - const defaultProposalMint = voteByCouncil - ? realm?.account.config.councilMint - : !mint?.supply.isZero() || - realm?.account.config.useMaxCommunityVoterWeightAddin - ? realm!.account.communityMint - : !councilMint?.supply.isZero() - ? realm!.account.config.councilMint - : undefined - - const proposalAddress = await createProposalFcn( - rpcContext, - handledMint, - { - ...form, - mintAmount, - mangoAccountPk, - mangoAccounts, - proposalCount: Object.keys(proposals).length, - }, - realm!, - governedTokenAccount!, - ownTokenRecord, - defaultProposalMint!, - governedTokenAccount!.governance!.account!.proposalCount, - prerequisiteInstructions, - false, - market, - client - ) - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - router.push(url) - } catch (e) { - console.log(e) - } - setIsDepositing(false) - } - const schema = yup.object().shape({ - delegateAddress: yup - .string() - .test( - 'accountTests', - 'Delegate address validation error', - function (val: string) { - if (!form.delegateDeposit) { - return true - } - if (val) { - try { - return !!getValidatedPublickKey(val) - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Delegate address is required`, - }) - } - } - ), - amount: yup.number().required('Amount is required').min(mintMinAmount), - }) - return ( -
- -
- setProposalType(v)} - values={tabs} - /> -
- {proposalType === DELEGATE_ACCOUNT && ( - - )} - {proposalType === CREATE_REF_LINK && ( - - )} - {proposalType === WITHDRAW && ( - - )} - - {proposalType === DEPOSIT && ( -
-
- Amount -
- Bal: {maxAmountFtm} - - handleSetForm({ - propertyName: 'amount', - value: maxAmount.toNumber(), - }) - } - className="font-bold ml-2 text-primary-light" - > - Max - -
-
- - handleSetForm({ propertyName: 'amount', value: e.target.value }) - } - step={mintMinAmount} - onBlur={validateAmountOnBlur} - /> - {selectedMangoAccount === null && ( - <> -
- Delegate deposit - - handleSetForm({ - propertyName: 'delegateDeposit', - value: checked, - }) - } - /> -
- {form.delegateDeposit && ( - - handleSetForm({ - propertyName: 'delegateAddress', - value: e.target.value, - }) - } - /> - )} - - )} - - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - setDescription={(evt) => - handleSetForm({ - value: evt.target.value, - propertyName: 'description', - }) - } - voteByCouncil={voteByCouncil} - setVoteByCouncil={setVoteByCouncil} - /> -
-
- Current Deposits - - {currentPositionFtm || 0}{' '} - - {tokenInfo?.symbol} - - -
-
- Proposed Deposit - - {form.amount?.toLocaleString() || ( - Enter an amount - )}{' '} - - {form.amount && tokenInfo?.symbol} - - -
-
- -
- )} -
- ) -} - -export default MangoDepositComponent - -const MangoAccountItem = ({ - value, - market, - depositIndex, -}: { - value: MangoAccount | null - market: MarketStore - depositIndex: number -}) => { - const group = market!.group! - return value ? ( -
-
{abbreviateAddress(value.publicKey)}
-
- Deposit:{' '} - {new BigNumber( - value - .getUiDeposit( - market.cache!.rootBankCache[depositIndex], - group, - depositIndex - ) - .toNumber() - ).toFormat(2)} -
- {value.delegate.toBase58() && ( -
Delegate: {abbreviateAddress(value.delegate)}
- )} -
- ) : ( -
Create new account
- ) -} diff --git a/Strategies/components/ModalHeader.tsx b/Strategies/components/ModalHeader.tsx deleted file mode 100644 index 83a011cb47..0000000000 --- a/Strategies/components/ModalHeader.tsx +++ /dev/null @@ -1,21 +0,0 @@ -const ModalHeader = ({ - apy, - protocolLogoURI, - strategy, - protocolName, - TokenName, -}) => { - return ( -
- -
-

{`${strategy} ${TokenName} on ${protocolName}`}

-

- Interest Rate: {apy} -

-
-
- ) -} - -export default ModalHeader diff --git a/Strategies/components/SolendModalContent.tsx b/Strategies/components/SolendModalContent.tsx deleted file mode 100644 index ecbbb38e46..0000000000 --- a/Strategies/components/SolendModalContent.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { useState } from 'react' -import { SolendStrategy } from 'Strategies/types/types' -import ButtonGroup from '@components/ButtonGroup' -import { AssetAccount } from '@utils/uiTypes/assets' -import { CreateSolendStrategyParams } from 'Strategies/protocols/solend' -import SolendDeposit from './solend/SolendDeposit' -import SolendWithdraw from './solend/SolendWithdraw' - -const DEPOSIT = 'Deposit' -const WITHDRAW = 'Withdraw' - -const SolendDepositComponent = ({ - proposedInvestment, - handledMint, - createProposalFcn, - governedTokenAccount, -}: { - proposedInvestment: SolendStrategy - handledMint: string - createProposalFcn: CreateSolendStrategyParams - governedTokenAccount: AssetAccount -}) => { - const [proposalType, setProposalType] = useState('Deposit') - - const tabs = [DEPOSIT, WITHDRAW] - - return ( -
-
- setProposalType(v)} - values={tabs} - /> -
- {proposalType === WITHDRAW && ( - - )} - {proposalType === DEPOSIT && ( - - )} -
- ) -} - -export default SolendDepositComponent diff --git a/Strategies/components/WithdrawModal.tsx b/Strategies/components/WithdrawModal.tsx deleted file mode 100644 index 2dda629b1f..0000000000 --- a/Strategies/components/WithdrawModal.tsx +++ /dev/null @@ -1,330 +0,0 @@ -import { - BN, - makeCloseSpotOpenOrdersInstruction, - makeWithdrawInstruction, - MangoAccount, - PublicKey, -} from '@blockworks-foundation/mango-client' -import AdditionalProposalOptions from '@components/AdditionalProposalOptions' -import Button from '@components/Button' -import Input from '@components/inputs/Input' -import Loading from '@components/Loading' -import Tooltip from '@components/Tooltip' -import { CheckCircleIcon } from '@heroicons/react/outline' -import useCreateProposal from '@hooks/useCreateProposal' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import useQueryContext from '@hooks/useQueryContext' -import useRealm from '@hooks/useRealm' -import { - getInstructionDataFromBase64, - Governance, - ProgramAccount, - serializeInstructionToBase64, - TOKEN_PROGRAM_ID, -} from '@solana/spl-governance' -import { ASSOCIATED_TOKEN_PROGRAM_ID, Token } from '@solana/spl-token' -import { TransactionInstruction } from '@solana/web3.js' -import { tryParsePublicKey } from '@tools/core/pubkey' -import { parseMintNaturalAmountFromDecimal } from '@tools/sdk/units' -import { getATA } from '@utils/ataTools' -import { abbreviateAddress } from '@utils/formatting' -import { validateInstruction } from '@utils/instructionTools' -import { notify } from '@utils/notifications' -import tokenService from '@utils/services/token' -import { tryGetMint, tryGetTokenAccount } from '@utils/tokens' -import { - getValidateAccount, - getValidatedPublickKey, - validateDoseTokenAccountMatchMint, -} from '@utils/validations' -import { InstructionDataWithHoldUpTime } from 'actions/createProposal' -import BigNumber from 'bignumber.js' -import { useRouter } from 'next/router' -import { emptyPk } from 'NftVotePlugin/sdk/accounts' -import { useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import { MarketStore } from 'Strategies/store/marketStore' -import * as yup from 'yup' - -const WithdrawModal = ({ - selectedMangoAccount, - governance, - market, -}: { - selectedMangoAccount: MangoAccount - governance: ProgramAccount - market: MarketStore -}) => { - const { canUseTransferInstruction } = useGovernanceAssets() - const router = useRouter() - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { symbol } = useRealm() - const group = market.group! - const [isLoading, setIsLoading] = useState(false) - const [form, setForm] = useState({ - title: '', - description: '', - withdrawAddress: '', - amount: '', - }) - const [voteByCouncil, setVoteByCouncil] = useState(false) - const [depositIdx, setDepositIdx] = useState(0) - const [formErrors, setFormErrors] = useState({}) - const selectedDepositMInt = group?.tokens[depositIdx]?.mint - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const { handleCreateProposal } = useCreateProposal() - const { fmtUrlWithCluster } = useQueryContext() - const proposalTitle = `Withdraw from mango account to: ${ - form && tryParsePublicKey(form.withdrawAddress) - ? abbreviateAddress(new PublicKey(form.withdrawAddress)) - : '' - }` - const schema = yup.object().shape({ - withdrawAddress: yup - .string() - .test( - 'addressTest', - 'Address validation error', - async function (val: string) { - if (val) { - try { - const currentConnection = connection.current - const pubKey = getValidatedPublickKey(val) - const account = await getValidateAccount( - currentConnection, - pubKey - ) - if (account?.value !== null) { - const tokenAccount = await tryGetTokenAccount( - currentConnection, - pubKey - ) - if (tokenAccount && selectedDepositMInt) { - await validateDoseTokenAccountMatchMint( - tokenAccount.account, - selectedDepositMInt - ) - } - } - return true - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Address is required`, - }) - } - } - ), - amount: yup.string().required('Amount is required'), - }) - const handlePropose = async (idx: number) => { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - if (!isValid) { - return - } - const mintPk = group?.tokens[idx].mint - const tokenIndex = group.getTokenIndex(mintPk) - const publicKey = - group?.rootBankAccounts?.[tokenIndex]?.nodeBankAccounts[0].publicKey - const vault = - group?.rootBankAccounts?.[tokenIndex]?.nodeBankAccounts[0].vault - const address = new PublicKey(form.withdrawAddress) - const mintInfo = await tryGetMint(connection.current, mintPk) - const mintAmount = parseMintNaturalAmountFromDecimal( - form.amount!, - mintInfo!.account.decimals! - ) - const prerequisiteInstructions: TransactionInstruction[] = [] - //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: address, - mintPK: mintPk, - wallet: wallet!, - }) - if (needToCreateAta) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPk, // mint - receiverAddress, // ata - address, // owner of token account - wallet!.publicKey! // fee payer - ) - ) - } - setIsLoading(true) - const proposalInstructions: InstructionDataWithHoldUpTime[] = [] - for (const i in selectedMangoAccount.spotOpenOrders.filter( - (x) => x.toBase58() !== emptyPk - )) { - const closeOpenOrders = makeCloseSpotOpenOrdersInstruction( - market.client!.programId, - group.publicKey, - selectedMangoAccount.publicKey, - selectedMangoAccount.owner, - group.dexProgramId, - selectedMangoAccount.spotOpenOrders[i], - group.spotMarkets[i].spotMarket, - group.signerKey - ) - const closeInstruction: InstructionDataWithHoldUpTime = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(closeOpenOrders) - ), - holdUpTime: governance!.account!.config.minInstructionHoldUpTime, - prerequisiteInstructions: [], - } - proposalInstructions.push(closeInstruction) - } - - const instruction = makeWithdrawInstruction( - market.client!.programId, - group.publicKey, - selectedMangoAccount.publicKey, - selectedMangoAccount.owner, - group.mangoCache, - group.tokens[tokenIndex].rootBank, - publicKey!, - vault!, - receiverAddress, - group.signerKey, - [], - new BN(mintAmount), - false - ) - const instructionData: InstructionDataWithHoldUpTime = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(instruction) - ), - holdUpTime: governance!.account!.config.minInstructionHoldUpTime, - prerequisiteInstructions: prerequisiteInstructions, - chunkSplitByDefault: true, - chunkBy: 1, - } - proposalInstructions.push(instructionData) - try { - const proposalAddress = await handleCreateProposal({ - title: form.title || proposalTitle, - description: form.description, - instructionsData: [...proposalInstructions], - governance: governance!, - voteByCouncil, - }) - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - router.push(url) - } catch (e) { - console.log(e) - notify({ type: 'error', message: "Can't create proposal" }) - } - setIsLoading(false) - } - return ( -
- {selectedMangoAccount?.deposits.map((x, idx) => { - const mint = group?.tokens[idx].mint - const tokenInfo = tokenService.getTokenInfo(mint!.toBase58()) - const symbol = tokenInfo?.symbol - return !x.isZero() ? ( -
setDepositIdx(idx)} - > -
- {' '} - {new BigNumber( - selectedMangoAccount - .getUiDeposit(market.cache!.rootBankCache[idx], group!, idx) - .toNumber() - ).toFormat(2)}{' '} - - {symbol ? symbol : abbreviateAddress(mint)} - -
- {idx === depositIdx && ( - - )} -
- ) : null - })} -
- - handleSetForm({ - value: e.target.value, - propertyName: 'withdrawAddress', - }) - } - /> - - handleSetForm({ - value: e.target.value, - propertyName: 'amount', - }) - } - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - setDescription={(evt) => - handleSetForm({ - value: evt.target.value, - propertyName: 'description', - }) - } - voteByCouncil={voteByCouncil} - setVoteByCouncil={setVoteByCouncil} - /> -
- -
- ) -} - -export default WithdrawModal diff --git a/Strategies/components/solend/SolendDeposit.tsx b/Strategies/components/solend/SolendDeposit.tsx deleted file mode 100644 index 62ef146836..0000000000 --- a/Strategies/components/solend/SolendDeposit.tsx +++ /dev/null @@ -1,376 +0,0 @@ -import { PublicKey } from '@blockworks-foundation/mango-client' -import Button, { LinkButton } from '@components/Button' -import Input from '@components/inputs/Input' -import Loading from '@components/Loading' -import Tooltip from '@components/Tooltip' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import useQueryContext from '@hooks/useQueryContext' -import useRealm from '@hooks/useRealm' -import { getProgramVersionForRealm } from '@models/registry/api' -import { BN } from '@project-serum/anchor' -import { RpcContext } from '@solana/spl-governance' -import { - getMintDecimalAmount, - getMintMinAmountAsDecimal, - getMintNaturalAmountFromDecimalAsBN, -} from '@tools/sdk/units' -import { precision } from '@utils/formatting' -import tokenService from '@utils/services/token' -import BigNumber from 'bignumber.js' -import { useRouter } from 'next/router' -import { useEffect, useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import { SolendStrategy } from 'Strategies/types/types' -import AdditionalProposalOptions from '@components/AdditionalProposalOptions' -import { validateInstruction } from '@utils/instructionTools' -import * as yup from 'yup' -import { AssetAccount } from '@utils/uiTypes/assets' -import Select from '@components/inputs/Select' -import { - CreateSolendStrategyParams, - cTokenExchangeRate, - getReserveData, - SolendSubStrategy, -} from 'Strategies/protocols/solend' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' - -const SOL_BUFFER = 0.02 - -const SolendDeposit = ({ - proposedInvestment, - handledMint, - createProposalFcn, - governedTokenAccount, -}: { - proposedInvestment: SolendStrategy - handledMint: string - createProposalFcn: CreateSolendStrategyParams - governedTokenAccount: AssetAccount -}) => { - const router = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const { - proposals, - realmInfo, - realm, - ownVoterWeight, - mint, - councilMint, - symbol, - } = useRealm() - const [isDepositing, setIsDepositing] = useState(false) - const [deposits, setDeposits] = useState<{ - [reserveAddress: string]: number - }>({}) - const [voteByCouncil, setVoteByCouncil] = useState(false) - const client = useVotePluginsClientStore( - (s) => s.state.currentRealmVotingClient - ) - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const tokenInfo = tokenService.getTokenInfo(handledMint) - const { - governedTokenAccountsWithoutNfts, - auxiliaryTokenAccounts, - canUseTransferInstruction, - } = useGovernanceAssets() - - const treasuryAmount = new BN( - governedTokenAccount.isSol - ? governedTokenAccount.extensions.amount!.toNumber() - : governedTokenAccount.extensions.token!.account.amount - ) - const mintInfo = governedTokenAccount.extensions?.mint?.account - const tokenSymbol = tokenService.getTokenInfo( - governedTokenAccount.extensions.mint!.publicKey.toBase58() - )?.symbol - const [form, setForm] = useState<{ - title: string - description: string - amount?: number - reserve: SolendSubStrategy - }>({ - title: '', - description: '', - amount: undefined, - reserve: - proposedInvestment.reserves.find((reserve) => reserve.isPrimary) ?? - proposedInvestment.reserves[0]!, - }) - const [formErrors, setFormErrors] = useState({}) - const proposalTitle = `Deposit ${form.amount} ${ - tokenSymbol || 'tokens' - } to the Solend ${form.reserve.marketName} pool` - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const mintMinAmount = mintInfo ? getMintMinAmountAsDecimal(mintInfo) : 1 - let maxAmount = mintInfo - ? getMintDecimalAmount(mintInfo, treasuryAmount) - : new BigNumber(0) - if (governedTokenAccount.isSol) { - maxAmount = maxAmount.minus(SOL_BUFFER) - } - const maxAmountFtm = maxAmount.toNumber().toFixed(4) - const currentPrecision = precision(mintMinAmount) - - const validateAmountOnBlur = () => { - handleSetForm({ - propertyName: 'amount', - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(form.amount)) - ).toFixed(currentPrecision) - ), - }) - } - - // Solend - useEffect(() => { - const getSlndCTokens = async () => { - const accounts = [ - ...governedTokenAccountsWithoutNfts, - ...auxiliaryTokenAccounts, - ] - - const relevantAccs = accounts - .map((acc) => { - const reserve = (proposedInvestment as SolendStrategy)?.reserves.find( - (reserve) => - reserve.mintAddress === handledMint && - reserve.collateralMintAddress === - acc.extensions.mint?.publicKey.toBase58() - ) - if (!reserve || !proposedInvestment) return null - - return { - acc, - reserve, - } - }) - .filter(Boolean) - - const reserveStats = await getReserveData( - relevantAccs.map((data) => data!.reserve.reserveAddress) - ) - - const results = Object.fromEntries( - relevantAccs.map((data) => { - const reserve = data!.reserve - const account = data!.acc - - const stat = reserveStats.find( - (stat) => stat.reserve.lendingMarket === reserve.marketAddress - )! - - return [ - reserve.reserveAddress, - ((account.extensions.amount?.toNumber() ?? 0) * - cTokenExchangeRate(stat)) / - 10 ** reserve.decimals, - ] - }) - ) - setDeposits(results) - } - getSlndCTokens() - }, []) - - const handleDeposit = async () => { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - if (!isValid) { - return - } - try { - setIsDepositing(true) - const rpcContext = new RpcContext( - new PublicKey(realm!.owner.toString()), - getProgramVersionForRealm(realmInfo!), - wallet!, - connection.current, - connection.endpoint - ) - const ownTokenRecord = ownVoterWeight.getTokenRecordToCreateProposal( - governedTokenAccount!.governance!.account.config - ) - const defaultProposalMint = voteByCouncil - ? realm?.account.config.councilMint - : !mint?.supply.isZero() || - realm?.account.config.useMaxCommunityVoterWeightAddin - ? realm!.account.communityMint - : !councilMint?.supply.isZero() - ? realm!.account.config.councilMint - : undefined - - const proposalAddress = await createProposalFcn( - rpcContext, - { - ...form, - amountFmt: form.amount!.toFixed(4), - bnAmount: getMintNaturalAmountFromDecimalAsBN( - form.amount as number, - governedTokenAccount.extensions.mint!.account.decimals - ), - proposalCount: Object.keys(proposals).length, - action: 'Deposit', - }, - realm!, - governedTokenAccount!, - ownTokenRecord, - defaultProposalMint!, - governedTokenAccount!.governance!.account!.proposalCount, - false, - connection, - client - ) - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - router.push(url) - } catch (e) { - console.log(e) - throw e - } - setIsDepositing(false) - } - const schema = yup.object().shape({ - amount: yup - .number() - .required('Amount is required') - .min(mintMinAmount) - .max(maxAmount.toNumber()), - reserve: yup.object().required('Lending market address is required'), - }) - - return ( -
- -
- Amount -
- Bal: {maxAmountFtm} - - handleSetForm({ - propertyName: 'amount', - value: maxAmount.toNumber(), - }) - } - className="font-bold ml-2 text-primary-light" - > - Max - -
-
- - handleSetForm({ propertyName: 'amount', value: e.target.value }) - } - step={mintMinAmount} - onBlur={validateAmountOnBlur} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - setDescription={(evt) => - handleSetForm({ - value: evt.target.value, - propertyName: 'description', - }) - } - voteByCouncil={voteByCouncil} - setVoteByCouncil={setVoteByCouncil} - /> -
-
- Current Deposits - - {deposits[form.reserve.reserveAddress]?.toFixed(4) || 0}{' '} - {tokenInfo?.symbol} - -
-
- Proposed Deposit - - {form.amount?.toLocaleString() || ( - Enter an amount - )}{' '} - - {form.amount && tokenInfo?.symbol} - - -
-
- -
- ) -} -SolendDeposit.whyDidYouRender = true - -export default SolendDeposit diff --git a/Strategies/components/solend/SolendWithdraw.tsx b/Strategies/components/solend/SolendWithdraw.tsx deleted file mode 100644 index 786056c77b..0000000000 --- a/Strategies/components/solend/SolendWithdraw.tsx +++ /dev/null @@ -1,381 +0,0 @@ -import { PublicKey } from '@blockworks-foundation/mango-client' -import Button, { LinkButton } from '@components/Button' -import Input from '@components/inputs/Input' -import Loading from '@components/Loading' -import Tooltip from '@components/Tooltip' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import useQueryContext from '@hooks/useQueryContext' -import useRealm from '@hooks/useRealm' -import { getProgramVersionForRealm } from '@models/registry/api' -import { BN } from '@project-serum/anchor' -import { RpcContext } from '@solana/spl-governance' -import { - getMintMinAmountAsDecimal, - getMintNaturalAmountFromDecimalAsBN, -} from '@tools/sdk/units' -import { precision } from '@utils/formatting' -import tokenService from '@utils/services/token' -import BigNumber from 'bignumber.js' -import { useRouter } from 'next/router' -import { useEffect, useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import { SolendStrategy } from 'Strategies/types/types' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import AdditionalProposalOptions from '@components/AdditionalProposalOptions' -import { validateInstruction } from '@utils/instructionTools' -import * as yup from 'yup' -import { AssetAccount } from '@utils/uiTypes/assets' -import Select from '@components/inputs/Select' -import { - CreateSolendStrategyParams, - cTokenExchangeRate, - getReserveData, - SolendSubStrategy, -} from 'Strategies/protocols/solend' - -const SolendWithdraw = ({ - proposedInvestment, - handledMint, - createProposalFcn, - governedTokenAccount, -}: { - proposedInvestment: SolendStrategy - handledMint: string - createProposalFcn: CreateSolendStrategyParams - governedTokenAccount: AssetAccount -}) => { - const { - governedTokenAccountsWithoutNfts, - auxiliaryTokenAccounts, - canUseTransferInstruction, - } = useGovernanceAssets() - const router = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const { - proposals, - realmInfo, - realm, - ownVoterWeight, - mint, - councilMint, - symbol, - } = useRealm() - const [isWithdrawing, setIsWithdrawing] = useState(false) - const [voteByCouncil, setVoteByCouncil] = useState(false) - const [deposits, setDeposits] = useState<{ - [reserveAddress: string]: { amount: number; amountExact: number } - }>({}) - const client = useVotePluginsClientStore( - (s) => s.state.currentRealmVotingClient - ) - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const tokenInfo = tokenService.getTokenInfo(handledMint) - const mintInfo = governedTokenAccount.extensions?.mint?.account - const tokenSymbol = tokenService.getTokenInfo( - governedTokenAccount.extensions.mint!.publicKey.toBase58() - )?.symbol - const [form, setForm] = useState<{ - title: string - description: string - amount?: number - reserve: SolendSubStrategy - max: boolean - }>({ - title: '', - description: '', - amount: undefined, - reserve: - proposedInvestment.reserves.find((reserve) => reserve.isPrimary) ?? - proposedInvestment.reserves[0]!, - max: false, - }) - const [formErrors, setFormErrors] = useState({}) - const proposalTitle = `Withdraw ${form.amount} ${ - tokenSymbol || 'tokens' - } from the Solend ${form.reserve.marketName} pool` - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ - ...form, - max: propertyName === 'amount' ? false : form.max, - [propertyName]: value, - }) - } - const mintMinAmount = mintInfo ? getMintMinAmountAsDecimal(mintInfo) : 1 - const maxAmount = new BigNumber( - deposits[form.reserve.reserveAddress]?.amount ?? 0 - ) - const maxAmountFtm = maxAmount.toFixed(4) - const currentPrecision = precision(mintMinAmount) - - // Solend - useEffect(() => { - const getSlndCTokens = async () => { - const accounts = [ - ...governedTokenAccountsWithoutNfts, - ...auxiliaryTokenAccounts, - ] - - const relevantAccs = accounts - .map((acc) => { - const reserve = (proposedInvestment as SolendStrategy)?.reserves.find( - (reserve) => - reserve.mintAddress === handledMint && - reserve.collateralMintAddress === - acc.extensions.mint?.publicKey.toBase58() - ) - if (!reserve || !proposedInvestment) return null - - return { - acc, - reserve, - } - }) - .filter(Boolean) - - const reserveStats = await getReserveData( - relevantAccs.map((data) => data!.reserve.reserveAddress) - ) - - setDeposits( - Object.fromEntries( - relevantAccs.map((data) => { - const reserve = data!.reserve - const account = data!.acc - - const stat = reserveStats.find( - (stat) => stat.reserve.lendingMarket === reserve.marketAddress - )! - - return [ - reserve.reserveAddress, - { - amount: - ((account.extensions.amount?.toNumber() ?? 0) * - cTokenExchangeRate(stat)) / - 10 ** reserve.decimals, - amountExact: account.extensions.amount?.toNumber() ?? 0, - }, - ] - }) - ) - ) - } - getSlndCTokens() - }, []) - - const validateAmountOnBlur = () => { - handleSetForm({ - propertyName: 'amount', - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(form.amount)) - ).toFixed(currentPrecision) - ), - }) - } - - const handleWithdraw = async () => { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - if (!isValid) { - return - } - try { - setIsWithdrawing(true) - const rpcContext = new RpcContext( - new PublicKey(realm!.owner.toString()), - getProgramVersionForRealm(realmInfo!), - wallet!, - connection.current, - connection.endpoint - ) - const ownTokenRecord = ownVoterWeight.getTokenRecordToCreateProposal( - governedTokenAccount!.governance!.account.config - ) - const defaultProposalMint = voteByCouncil - ? realm?.account.config.councilMint - : !mint?.supply.isZero() || - realm?.account.config.useMaxCommunityVoterWeightAddin - ? realm!.account.communityMint - : !councilMint?.supply.isZero() - ? realm!.account.config.councilMint - : undefined - - const reserveStat = await getReserveData([form.reserve.reserveAddress]) - - const proposalAddress = await createProposalFcn( - rpcContext, - { - ...form, - bnAmount: form.max - ? new BN(deposits[form.reserve.reserveAddress].amountExact) - : getMintNaturalAmountFromDecimalAsBN( - (form.amount as number) / cTokenExchangeRate(reserveStat[0]), - governedTokenAccount.extensions.mint!.account.decimals - ), - amountFmt: ( - (form.amount as number) / cTokenExchangeRate(reserveStat[0]) - ).toFixed(4), - proposalCount: Object.keys(proposals).length, - action: 'Withdraw', - }, - realm!, - governedTokenAccount!, - ownTokenRecord, - defaultProposalMint!, - governedTokenAccount!.governance!.account!.proposalCount, - false, - connection, - client - ) - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - router.push(url) - } catch (e) { - console.log(e) - throw e - } - setIsWithdrawing(false) - } - const schema = yup.object().shape({ - amount: yup - .number() - .required('Amount is required') - .max(deposits[form.reserve.reserveAddress]?.amount), - reserve: yup.object().required('Lending market address is required'), - }) - - return ( -
- -
- Amount -
- Bal: {maxAmountFtm} - { - setFormErrors({}) - setForm({ - ...form, - amount: maxAmount.toNumber(), - max: true, - }) - }} - className="font-bold ml-2 text-primary-light" - > - Max - -
-
- - handleSetForm({ propertyName: 'amount', value: e.target.value }) - } - step={mintMinAmount} - onBlur={validateAmountOnBlur} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - setDescription={(evt) => - handleSetForm({ - value: evt.target.value, - propertyName: 'description', - }) - } - voteByCouncil={voteByCouncil} - setVoteByCouncil={setVoteByCouncil} - /> -
-
- Current Deposits - - {deposits[form.reserve.reserveAddress]?.amount.toFixed(4) || 0}{' '} - {tokenInfo?.symbol} - -
-
- Proposed Withdraw - - {form.amount?.toLocaleString() || ( - Enter an amount - )}{' '} - - {form.amount && tokenInfo?.symbol} - - -
-
- -
- ) -} - -export default SolendWithdraw diff --git a/Strategies/protocols/foresight/tools.ts b/Strategies/protocols/foresight/tools.ts deleted file mode 100644 index db42d1ef84..0000000000 --- a/Strategies/protocols/foresight/tools.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const FORESIGHT_MINT_DEVNET = - 'H7uqouPsJkeEiLpCEoC1qYVVquDrZan6ZfdPK2gS44zm' diff --git a/Strategies/protocols/mango/tools.ts b/Strategies/protocols/mango/tools.ts deleted file mode 100644 index 17ede67ffc..0000000000 --- a/Strategies/protocols/mango/tools.ts +++ /dev/null @@ -1,316 +0,0 @@ -import { - makeCreateMangoAccountInstruction, - makeDepositInstruction, - PublicKey, - BN, - makeSetDelegateInstruction, - MangoAccount, -} from '@blockworks-foundation/mango-client' -import { - getInstructionDataFromBase64, - getNativeTreasuryAddress, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { fmtMintAmount } from '@tools/sdk/units' -import { ConnectionContext } from '@utils/connection' -import tokenService from '@utils/services/token' -import { - createProposal, - InstructionDataWithHoldUpTime, -} from 'actions/createProposal' -import axios from 'axios' -import { MarketStore } from 'Strategies/store/marketStore' -import { - TreasuryStrategy, - HandleCreateProposalWithStrategy, -} from 'Strategies/types/types' - -//Symbol, coingeckoId -export const tokenList = { - ETH: 'ethereum', - BTC: 'bitcoin', - SOL: 'solana', - SRM: 'serum', - USDC: 'usd-coin', - USDT: 'tether', - MNGO: 'mango-markets', - RAY: 'raydium', - COPE: 'cope', - FTT: 'ftx-token', - MSOL: 'msol', - BNB: 'binance-coin', - AVAX: 'avalanche', - LUNA: 'terra-luna', -} -export const MANGO = 'Mango' -export const MANGO_MINT = 'MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac' -export const USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' -export const MANGO_MINT_DEVNET = 'Bb9bsTQa1bGEtQ5KagGkvSHyuLqDWumFUcRqFusFNJWC' -export const MANGO_USDC_MINT_DEVNET = - '8FRFC6MoGGkMFQwngccyu69VnYbzykGeez7ignHVAFSN' -export const tokenListFilter = Object.keys(tokenList).map((x) => { - return { - name: x, - val: x, - } -}) - -const endpoint = - 'https://mango-stats-v3.herokuapp.com/spot?mangoGroup=mainnet.1' - -// Very inefficient -function findClosestToDate(values, date) { - let min = values[0] - for (const val of values) { - const valDate = new Date(val.time).getTime() - const minDate = new Date(min.time).getTime() - if (Math.abs(valDate - date) < Math.abs(minDate - date)) { - min = val - } - } - if (Math.abs(new Date(min.time).getTime() - date) > 24 * 3600 * 1000) { - return { - totalDeposits: 0, - totalBorrows: 0, - } - } - return min -} - -//method to fetch mango strategies -export async function tvl(timestamp, connection: ConnectionContext) { - const protocolInfo = await tokenService.getTokenInfo(MANGO_MINT) - const balances: TreasuryStrategy[] = [] - const stats = await axios.get(endpoint) - const date = new Date(timestamp * 1000).getTime() - for (const [mangoId, mangoTokens] of Object.entries(tokenList)) { - const assetDeposits = stats.data.filter((s) => s.name === mangoId) - - if (assetDeposits.length > 0) { - const info = tokenService.getTokenInfoFromCoingeckoId(mangoTokens) - const handledMint = - (info?.address === MANGO_MINT && connection.cluster === 'devnet' - ? MANGO_MINT_DEVNET - : info?.address === USDC_MINT && connection.cluster === 'devnet' - ? MANGO_USDC_MINT_DEVNET - : info?.address) || '' - const closestVal = findClosestToDate(assetDeposits, date) - balances.push({ - liquidity: - (closestVal.totalDeposits - closestVal.totalBorrows) * - closestVal.baseOraclePrice, - handledTokenSymbol: info?.symbol || mangoId, - apy: `${( - (Math.pow(1 + closestVal.depositRate / 128, 128) - 1) * - 100 - ).toFixed(2)}%`, - protocolName: MANGO, - protocolSymbol: protocolInfo?.symbol || '', - handledMint: handledMint, - handledTokenImgSrc: info?.logoURI || '', - protocolLogoSrc: protocolInfo?.logoURI || '', - strategyName: 'Deposit', - strategyDescription: 'Description', - isGenericItem: false, - createProposalFcn: HandleMangoDeposit, - }) - } - } - - return balances -} - -export const calculateAllDepositsInMangoAccountsForMint = ( - accounts: MangoAccount[], - mint: PublicKey, - market: MarketStore -) => { - let deposited = 0 - const group = market!.group - const depositIndex = - mint && - group?.tokens.findIndex((x) => x.mint.toBase58() === mint.toBase58()) - if (accounts?.length && typeof depositIndex !== 'undefined' && group) { - const depositsWithAmountHiherThenZero = accounts - .map((x) => x.deposits[depositIndex]) - .filter((x) => !x?.isZero()) - if (depositsWithAmountHiherThenZero.length) { - const currentDepositAmount = accounts - .map((x) => - x - ?.getUiDeposit( - market.cache!.rootBankCache[depositIndex], - group, - depositIndex - ) - .toNumber() - ) - .reduce((prev, next) => (prev += next), 0) - deposited += currentDepositAmount ? currentDepositAmount : 0 - } - } - return deposited -} - -const HandleMangoDeposit: HandleCreateProposalWithStrategy = async ( - rpcContext, - handledMint, - form, - realm, - matchedTreasury, - tokenOwnerRecord, - governingTokenMint, - proposalIndex, - prerequisiteInstructions, - isDraft, - market, - client -) => { - const fmtAmount = fmtMintAmount( - matchedTreasury.extensions.mint?.account, - new BN(form.mintAmount) - ) - const group = market!.group! - const groupConfig = market!.groupConfig! - const rootBank = group.tokens.find( - (x) => - x.mint.toBase58() === - matchedTreasury.extensions.mint?.publicKey.toBase58() - )?.rootBank - const quoteRootBank = - group.rootBankAccounts[group.getRootBankIndex(rootBank!)] - const quoteNodeBank = quoteRootBank?.nodeBankAccounts[0] - const nextAccNumb = new BN(form.proposalCount) - const mangoAccountPk = - form.mangoAccountPk || - ( - await PublicKey.findProgramAddress( - [ - group.publicKey.toBytes(), - matchedTreasury.governance!.pubkey.toBytes(), - nextAccNumb.toArrayLike(Buffer, 'le', 8), - ], - groupConfig.mangoProgramId - ) - )[0] - - const solAddress = await getNativeTreasuryAddress( - realm!.owner, - matchedTreasury!.governance!.pubkey - ) - - const depositMangoAccountInsObj = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64( - makeDepositInstruction( - groupConfig.mangoProgramId, - groupConfig.publicKey, - matchedTreasury.isSol - ? matchedTreasury.governance.pubkey! - : matchedTreasury.extensions.token!.account.owner!, - group.mangoCache, - mangoAccountPk, - quoteRootBank!.publicKey, - quoteNodeBank!.publicKey, - quoteNodeBank!.vault, - matchedTreasury.extensions.transferAddress!, - new BN(form.mintAmount) - ) - ) - ), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - chunkSplitByDefault: true, - } - const insts: InstructionDataWithHoldUpTime[] = [] - if (!form.mangoAccountPk) { - const createMangoAccountIns = makeCreateMangoAccountInstruction( - groupConfig.mangoProgramId, - groupConfig.publicKey, - mangoAccountPk, - matchedTreasury.governance!.pubkey, - nextAccNumb, - solAddress - ) - const instructionData = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(createMangoAccountIns) - ), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [...prerequisiteInstructions], - splitToChunkByDefault: true, - } - insts.push(instructionData) - } - if (form.delegateAddress && form.delegateDeposit) { - const delegateMangoAccount = makeSetDelegateInstruction( - groupConfig.mangoProgramId, - groupConfig.publicKey, - mangoAccountPk, - matchedTreasury.governance!.pubkey, - new PublicKey(form.delegateAddress) - ) - const instructionData = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(delegateMangoAccount) - ), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - splitToChunkByDefault: true, - } - insts.push(instructionData) - } - insts.push(depositMangoAccountInsObj) - const proposalAddress = await createProposal( - rpcContext, - realm, - matchedTreasury.governance!.pubkey, - tokenOwnerRecord, - form.title || - `Deposit ${fmtAmount} ${ - tokenService.getTokenInfo( - matchedTreasury.extensions.mint!.publicKey.toBase58() - )?.symbol || 'tokens' - } to Mango account`, - form.description, - governingTokenMint, - proposalIndex, - insts, - isDraft, - client - ) - return proposalAddress -} - -export const tryGetMangoAccount = async ( - market: MarketStore, - mangoAccountPk: PublicKey -) => { - try { - const account = await market.client?.getMangoAccount( - mangoAccountPk, - market.group!.dexProgramId - ) - return account - } catch (e) { - return null - } -} - -export const tryGetMangoAccountsForOwner = async ( - market: MarketStore, - ownerPk: PublicKey -) => { - try { - const accounts = await market.client?.getMangoAccountsForOwner( - market.group!, - ownerPk - ) - return accounts - } catch (e) { - return null - } -} diff --git a/Strategies/protocols/solend/index.ts b/Strategies/protocols/solend/index.ts deleted file mode 100644 index 3289dd0e29..0000000000 --- a/Strategies/protocols/solend/index.ts +++ /dev/null @@ -1,511 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { - ProgramAccount, - Realm, - getInstructionDataFromBase64, - RpcContext, - serializeInstructionToBase64, - TokenOwnerRecord, -} from '@solana/spl-governance' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - NATIVE_MINT, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { PublicKey, SystemProgram } from '@solana/web3.js' -import { - depositReserveLiquidityInstruction, - redeemReserveCollateralInstruction, - syncNative, -} from '@solendprotocol/solend-sdk' -import tokenService from '@utils/services/token' -import { - createProposal, - InstructionDataWithHoldUpTime, -} from 'actions/createProposal' -import axios from 'axios' -import { SolendStrategy } from 'Strategies/types/types' - -import { VotingClient } from '@utils/uiTypes/VotePlugin' -import { AssetAccount } from '@utils/uiTypes/assets' -import { ConnectionContext } from '@utils/connection' -import BigNumber from 'bignumber.js' - -const MAINNET_PROGRAM = 'So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo' -const DEVNET_PROGRAM = 'ALend7Ketfx5bxh6ghsCDXAoDrhvEmsXT3cynB6aPLgx' - -export const SOLEND = 'Solend' -const SOLEND_SYMBOL = 'SLND' -const SOLEND_PROTOCOL_LOGO_URI = - 'https://solend-image-assets.s3.us-east-2.amazonaws.com/1280-circle.png' - -const SOLEND_ENDPOINT = 'https://api.solend.fi' - -export type CreateSolendStrategyParams = ( - rpcContext: RpcContext, - form: { - title: string - description: string - action: 'Deposit' | 'Withdraw' - bnAmount: BN - amountFmt: string - proposalCount: number - reserve: SolendSubStrategy - }, - realm: ProgramAccount, - treasuaryAccount: AssetAccount, - tokenOwnerRecord: ProgramAccount, - governingTokenMint: PublicKey, - proposalIndex: number, - isDraft: boolean, - connection: ConnectionContext, - client?: VotingClient -) => Promise - -type Config = Array - -type MarketConfig = { - name: string - isPrimary: boolean - description: string - creator: string - address: string - authorityAddress: string - reserves: Array -} - -type ReserveConfig = { - liquidityToken: { - coingeckoID: string - decimals: number - logo: string - mint: string - name: string - symbol: string - volume24h: number - } - pythOracle: string - switchboardOracle: string - address: string - collateralMintAddress: string - collateralSupplyAddress: string - liquidityAddress: string - liquidityFeeReceiverAddress: string - userSupplyCap: number -} - -type ReserveStat = { - reserve: { - lendingMarket: string - liquidity: { - mintPubkey: string - mintDecimals: number - supplyPubkey: string - pythOracle: string - switchboardOracle: string - availableAmount: string - borrowedAmountWads: string - cumulativeBorrowRateWads: string - marketPrice: string - } - collateral: { - mintPubkey: string - mintTotalSupply: string - supplyPubkey: string - } - } - rates: { - supplyInterest: string - borrowInterest: string - } -} - -export type SolendSubStrategy = { - marketAddress: string - marketName: string - reserveAddress: string - mintAddress: string - logo: string - symbol: string - decimals: number - liquidity: number - supplyApy: number - isPrimary: boolean - liquidityAddress: string - collateralMintAddress: string - marketAuthorityAddress: string -} - -export async function getReserveData( - reserveIds: Array -): Promise> { - if (!reserveIds.length) return [] - const stats = ( - await ( - await axios.get( - `${SOLEND_ENDPOINT}/v1/reserves?ids=${reserveIds.join(',')}` - ) - ).data - ).results as Array - - return stats -} - -export function cTokenExchangeRate(reserve: ReserveStat) { - return new BigNumber(reserve.reserve.liquidity.availableAmount ?? '0') - .plus( - new BigNumber(reserve.reserve.liquidity.borrowedAmountWads).shiftedBy(-18) - ) - .dividedBy(new BigNumber(reserve.reserve.collateral.mintTotalSupply)) - .toNumber() -} - -export async function getReserve(): Promise { - return await ( - await axios.get(`${SOLEND_ENDPOINT}/v1/markets/configs?scope=solend`) - ).data -} - -export async function getConfig(): Promise { - return await ( - await axios.get(`${SOLEND_ENDPOINT}/v1/markets/configs?scope=solend`) - ).data -} - -export async function getReserves(): Promise { - const config = await getConfig() - const reserves = config.flatMap((market) => - market.reserves.map((reserve) => ({ - marketName: market.name, - marketDescription: market.description, - marketAddress: market.address, - marketPrimary: market.isPrimary, - marketAuthorityAddress: market.authorityAddress, - ...reserve, - })) - ) - - return reserves -} - -export async function getSolendStrategies() { - const strats: SolendStrategy[] = [] - - // method to fetch solend strategies - const config = await getConfig() - const reserves = config.flatMap((market) => - market.reserves.map((reserve) => ({ - marketName: market.name, - marketDescription: market.description, - marketAddress: market.address, - marketPrimary: market.isPrimary, - marketAuthorityAddress: market.authorityAddress, - ...reserve, - })) - ) - - const stats = await getReserveData(reserves.map((reserve) => reserve.address)) - - const mergedData = reserves.map((reserve, index) => ({ - marketName: - reserve.marketName.charAt(0).toUpperCase() + reserve.marketName.slice(1), - marketAddress: reserve.marketAddress, - reserveAddress: reserve.address, - mintAddress: reserve.liquidityToken.mint, - decimals: reserve.liquidityToken.decimals, - liquidityAddress: reserve.liquidityAddress, - collateralMintAddress: reserve.collateralMintAddress, - marketAuthorityAddress: reserve.marketAuthorityAddress, - isPrimary: reserve.marketPrimary, - logo: reserve.liquidityToken.logo, - symbol: reserve.liquidityToken.symbol, - liquidity: - (Number(stats[index].reserve.liquidity.availableAmount) / - 10 ** stats[index].reserve.liquidity.mintDecimals) * - (Number(stats[index].reserve.liquidity.marketPrice) / 10 ** 18), - supplyApy: Number(stats[index].rates.supplyInterest), - })) as Array - - const aggregatedData = mergedData.reduce( - (acc, reserve) => ({ - ...acc, - [reserve.symbol]: (acc[reserve.symbol] ?? []).concat(reserve), - }), - {} as { - [symbol: string]: typeof mergedData - } - ) - - for (const [symbol, reserves] of Object.entries(aggregatedData)) { - const tokenData = reserves[0] - const maxApy = Math.max(...reserves.map((reserve) => reserve.supplyApy)) - const totalLiquidity = reserves.reduce( - (acc, reserve) => acc + reserve.liquidity, - 0 - ) - - strats.push({ - liquidity: totalLiquidity, - handledTokenSymbol: symbol, - apy: - reserves.length > 1 - ? `Up to ${maxApy.toFixed(2)}%` - : `${maxApy.toFixed(2)}%`, - protocolName: SOLEND, - protocolSymbol: SOLEND_SYMBOL, - handledMint: tokenData.mintAddress, - handledTokenImgSrc: tokenData.logo, - protocolLogoSrc: SOLEND_PROTOCOL_LOGO_URI, - strategyName: 'Deposit', - strategyDescription: - 'Earn interest on your treasury assets by depositing into Solend.', - isGenericItem: false, - reserves: reserves, - createProposalFcn: handleSolendAction, - }) - } - - return strats -} - -async function handleSolendAction( - rpcContext: RpcContext, - form: { - action: 'Deposit' | 'Withdraw' - title: string - description: string - bnAmount: BN - reserve: SolendSubStrategy - amountFmt: string - }, - realm: ProgramAccount, - matchedTreasury: AssetAccount, - tokenOwnerRecord: ProgramAccount, - governingTokenMint: PublicKey, - proposalIndex: number, - isDraft: boolean, - connection: ConnectionContext, - client?: VotingClient -) { - const isSol = matchedTreasury.isSol - const insts: InstructionDataWithHoldUpTime[] = [] - const owner = isSol - ? matchedTreasury!.pubkey - : matchedTreasury!.extensions!.token!.account.owner - - const slndProgramAddress = - connection.cluster === 'mainnet' ? MAINNET_PROGRAM : DEVNET_PROGRAM - - const ctokenATA = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - new PublicKey(form.reserve.collateralMintAddress), - owner, - true - ) - - const liquidityATA = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - new PublicKey(form.reserve.mintAddress), - owner, - true - ) - - let createAtaInst - - if (form.action === 'Deposit') { - const depositAccountInfo = await connection.current.getAccountInfo( - ctokenATA - ) - if (!depositAccountInfo) { - // generate the instruction for creating the ATA - createAtaInst = Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - new PublicKey(form.reserve.collateralMintAddress), - ctokenATA, - owner, - owner - ) - } - } else { - const withdrawAccountInfo = await connection.current.getAccountInfo( - liquidityATA - ) - if (!withdrawAccountInfo) { - // generate the instruction for creating the ATA - createAtaInst = Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - matchedTreasury.extensions.token!.publicKey, - liquidityATA, - owner, - owner - ) - } - } - - if (createAtaInst) { - const createAtaInstObj = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(createAtaInst) - ), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - chunkSplitByDefault: true, - } - insts.push(createAtaInstObj) - } - - const setupInsts: InstructionDataWithHoldUpTime[] = [] - const cleanupInsts: InstructionDataWithHoldUpTime[] = [] - - if (isSol) { - const userWSOLAccountInfo = await connection.current.getAccountInfo( - liquidityATA - ) - - const rentExempt = await Token.getMinBalanceRentForExemptAccount( - connection.current - ) - - const sendAction = form.action === 'Deposit' - - const transferLamportsIx = SystemProgram.transfer({ - fromPubkey: owner, - toPubkey: liquidityATA, - lamports: - (userWSOLAccountInfo ? 0 : rentExempt) + - (sendAction ? form.bnAmount.toNumber() : 0), - }) - - const transferLamportInst = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(transferLamportsIx) - ), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - chunkSplitByDefault: true, - } - - setupInsts.push(transferLamportInst) - - const closeWSOLAccountIx = Token.createCloseAccountInstruction( - TOKEN_PROGRAM_ID, - liquidityATA, - owner, - owner, - [] - ) - - const closeWSOLInst = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(closeWSOLAccountIx) - ), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - chunkSplitByDefault: true, - } - - if (userWSOLAccountInfo) { - const syncIx = syncNative(liquidityATA) - const syncInst = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(syncIx) - ), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - chunkSplitByDefault: true, - } - if (sendAction) { - setupInsts.push(syncInst) - } else { - cleanupInsts.push(closeWSOLInst) - } - } else { - const createUserWSOLAccountIx = Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - NATIVE_MINT, - liquidityATA, - owner, - owner - ) - const createUserWSOLAccountInst = { - data: getInstructionDataFromBase64( - serializeInstructionToBase64(createUserWSOLAccountIx) - ), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - chunkSplitByDefault: true, - } - setupInsts.push(createUserWSOLAccountInst) - cleanupInsts.push(closeWSOLInst) - } - } - - const actionIx = - form.action === 'Deposit' - ? depositReserveLiquidityInstruction( - form.bnAmount, - liquidityATA, - ctokenATA, - new PublicKey(form.reserve.reserveAddress), - new PublicKey(form.reserve.liquidityAddress), - new PublicKey(form.reserve.collateralMintAddress), - new PublicKey(form.reserve.marketAddress), - new PublicKey(form.reserve.marketAuthorityAddress), - owner, - new PublicKey(slndProgramAddress) - ) - : redeemReserveCollateralInstruction( - form.bnAmount, - ctokenATA, - liquidityATA, - new PublicKey(form.reserve.reserveAddress), - new PublicKey(form.reserve.collateralMintAddress), - new PublicKey(form.reserve.liquidityAddress), - new PublicKey(form.reserve.marketAddress), - new PublicKey(form.reserve.marketAuthorityAddress), - owner, - new PublicKey(slndProgramAddress) - ) - - const depositSolendInsObj = { - data: getInstructionDataFromBase64(serializeInstructionToBase64(actionIx)), - holdUpTime: matchedTreasury.governance!.account!.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - chunkSplitByDefault: true, - } - insts.push(depositSolendInsObj) - - const proposalAddress = await createProposal( - rpcContext, - realm, - matchedTreasury.governance!.pubkey, - tokenOwnerRecord, - form.title || - `${form.action} ${form.amountFmt} ${ - tokenService.getTokenInfo( - matchedTreasury.extensions.mint!.publicKey.toBase58() - )?.symbol || 'tokens' - } ${form.action === 'Deposit' ? 'into' : 'from'} the Solend ${ - form.reserve.marketName - } pool`, - form.description, - governingTokenMint, - proposalIndex, - [...setupInsts, ...insts, ...cleanupInsts], - isDraft, - client - ) - return proposalAddress -} diff --git a/Strategies/store/marketStore.tsx b/Strategies/store/marketStore.tsx deleted file mode 100644 index 759abd8330..0000000000 --- a/Strategies/store/marketStore.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import create, { State } from 'zustand' -import { - Config, - getMarketIndexBySymbol, - GroupConfig, - MangoCache, - MangoClient, - MangoGroup, - PerpMarket, - PerpMarketConfig, - PerpMarketInfo, - RootBank, - TokenInfo, -} from '@blockworks-foundation/mango-client' -import { ConnectionContext } from '@utils/connection' -import { Connection } from '@solana/web3.js' - -export interface MarketStore extends State { - groupConfig?: GroupConfig - marketConfig?: PerpMarketConfig - cache?: MangoCache - client?: MangoClient - group?: MangoGroup - info?: PerpMarketInfo - market?: PerpMarket - indexPrice?: number - quoteCurrency?: TokenInfo - quoteRootBank?: RootBank - loadMarket: (connection: ConnectionContext, cluster: string) => void -} -const useMarketStore = create((set, _get) => ({ - loadMarket: async (connection: ConnectionContext, cluster: string) => { - const GROUP = cluster === 'devnet' ? 'devnet.2' : 'mainnet.1' - const mangoConnection = - cluster === 'localnet' - ? new Connection(Config.ids().cluster_urls.mainnet) - : connection.current - const groupConfig = Config.ids().getGroupWithName(GROUP)! - const DEFAULT_MARKET = 'SOL' - const DEFAULT_MARKET_INDEX = getMarketIndexBySymbol( - groupConfig, - DEFAULT_MARKET - ) - const marketConfig = groupConfig?.perpMarkets[DEFAULT_MARKET_INDEX] - const client = new MangoClient(mangoConnection, groupConfig.mangoProgramId) - const group = await client.getMangoGroup(groupConfig.publicKey) - - const [perpMarket] = await Promise.all([ - group.loadPerpMarket( - mangoConnection, - marketConfig.marketIndex, - marketConfig.baseDecimals, - marketConfig.quoteDecimals - ), - group.loadRootBanks(mangoConnection), - ]) - - const cache = await group.loadCache(mangoConnection) - const indexPrice = group.getPriceUi(marketConfig.marketIndex, cache) - set((s: MarketStore) => { - s.groupConfig = groupConfig - s.marketConfig = marketConfig - s.market = perpMarket - s.client = client - s.group = group - s.info = group.perpMarkets[marketConfig.marketIndex] - s.cache = cache - s.indexPrice = indexPrice - }) - }, -})) - -export default useMarketStore diff --git a/Strategies/store/useStrategiesStore.tsx b/Strategies/store/useStrategiesStore.tsx deleted file mode 100644 index cb466bf3df..0000000000 --- a/Strategies/store/useStrategiesStore.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { ConnectionContext } from '@utils/connection' -import { notify } from '@utils/notifications' -import { tvl } from 'Strategies/protocols/mango/tools' -import { getSolendStrategies } from 'Strategies/protocols/solend' -import { TreasuryStrategy } from 'Strategies/types/types' -import create, { State } from 'zustand' - -interface StrategiesStore extends State { - strategies: TreasuryStrategy[] - strategiesLoading: boolean - getStrategies: (connection: ConnectionContext) => void -} - -const useStrategiesStore = create((set, _get) => ({ - strategies: [], - strategiesLoading: false, - getStrategies: async (connection: ConnectionContext) => { - set((s) => { - s.strategiesLoading = true - }) - try { - const mango = await tvl(Date.now() / 1000, connection) - const solend = await getSolendStrategies() - - //add fetch functions for your protocol in promise.all - const strategies: TreasuryStrategy[] = [...solend, ...mango] - - set((s) => { - s.strategies = strategies - }) - } catch (e) { - console.log(e) - notify({ type: 'error', message: "Can't fetch MNGO strategies" }) - } - set((s) => { - s.strategiesLoading = false - }) - }, -})) - -export default useStrategiesStore diff --git a/Strategies/types/types.ts b/Strategies/types/types.ts deleted file mode 100644 index fcec9d199c..0000000000 --- a/Strategies/types/types.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { MangoAccount } from '@blockworks-foundation/mango-client' -import { - ProgramAccount, - Realm, - RpcContext, - TokenOwnerRecord, -} from '@solana/spl-governance' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' -import { VotingClient } from '@utils/uiTypes/VotePlugin' -import { AssetAccount } from '@utils/uiTypes/assets' -import { MarketStore } from 'Strategies/store/marketStore' -import { - CreateSolendStrategyParams, - SolendSubStrategy, -} from 'Strategies/protocols/solend' - -export interface TreasuryStrategy { - //liquidity in $ - liquidity: number - protocolSymbol: string - apy: string - protocolName: string - strategySubtext?: string - handledMint: string - handledTokenSymbol: string - handledTokenImgSrc: string - protocolLogoSrc: string - strategyName: string - strategyDescription: string - //if you want to use custom component set this to false and add your custom - //item and modal to strategywrapper component based on generic components - isGenericItem?: boolean - createProposalFcn: any -} - -export type MangoStrategy = TreasuryStrategy & { - //async function that pass all props needed to create proposal - // if promise is successfully resolved it will automatically redirect to created proposal - createProposalFcn: HandleCreateProposalWithStrategy -} - -export type SolendStrategy = TreasuryStrategy & { - reserves: Array - createProposalFcn: CreateSolendStrategyParams -} - -export type HandleCreateProposalWithStrategy = ( - { connection, wallet, programId, programVersion, walletPubkey }: RpcContext, - handledMint: string, - form: MNGODepositForm, - realm: ProgramAccount, - treasuaryAccount: AssetAccount, - tokenOwnerRecord: ProgramAccount, - governingTokenMint: PublicKey, - proposalIndex: number, - prerequisiteInstructions: TransactionInstruction[], - isDraft: boolean, - market?: MarketStore, - client?: VotingClient -) => Promise - -export interface NameVal { - name: string - val: string | null -} - -export type MNGODepositForm = { - mintAmount: number - delegateDeposit: boolean - delegateAddress: string - mangoAccountPk: PublicKey | null - mangoAccounts: MangoAccount[] - title: string - description: string - proposalCount: number -} diff --git a/SwitchboardVotePlugin/SwitchboardIdl.ts b/SwitchboardVotePlugin/SwitchboardIdl.ts deleted file mode 100644 index 4e1eac7ded..0000000000 --- a/SwitchboardVotePlugin/SwitchboardIdl.ts +++ /dev/null @@ -1,9714 +0,0 @@ -export type Switchboard = { - version: '0.1.0' - name: 'switchboard_v2' - instructions: [ - { - name: 'aggregatorAddJob' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - }, - { - name: 'job' - isMut: true - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorAddJobParams' - } - } - ] - }, - { - name: 'aggregatorInit' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: false - }, - { - name: 'queue' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorInitParams' - } - } - ] - }, - { - name: 'aggregatorLock' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: true - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorLockParams' - } - } - ] - }, - { - name: 'aggregatorOpenRound' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'lease' - isMut: true - isSigner: false - }, - { - name: 'oracleQueue' - isMut: true - isSigner: false - }, - { - name: 'queueAuthority' - isMut: false - isSigner: false - }, - { - name: 'permission' - isMut: true - isSigner: false - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'payoutWallet' - isMut: true - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'dataBuffer' - isMut: false - isSigner: false - }, - { - name: 'mint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorOpenRoundParams' - } - } - ] - }, - { - name: 'aggregatorRemoveJob' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - }, - { - name: 'job' - isMut: true - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorRemoveJobParams' - } - } - ] - }, - { - name: 'aggregatorSaveResult' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'oracle' - isMut: true - isSigner: false - }, - { - name: 'oracleAuthority' - isMut: false - isSigner: true - }, - { - name: 'oracleQueue' - isMut: false - isSigner: false - }, - { - name: 'queueAuthority' - isMut: false - isSigner: false - }, - { - name: 'feedPermission' - isMut: true - isSigner: false - }, - { - name: 'oraclePermission' - isMut: false - isSigner: false - }, - { - name: 'lease' - isMut: true - isSigner: false - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'historyBuffer' - isMut: true - isSigner: false - }, - { - name: 'mint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSaveResultParams' - } - } - ] - }, - { - name: 'aggregatorSetAuthority' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - }, - { - name: 'newAuthority' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSetAuthorityParams' - } - } - ] - }, - { - name: 'aggregatorSetBatchSize' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSetBatchSizeParams' - } - } - ] - }, - { - name: 'aggregatorSetHistoryBuffer' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - }, - { - name: 'buffer' - isMut: true - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSetHistoryBufferParams' - } - } - ] - }, - { - name: 'aggregatorSetMinJobs' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSetMinJobsParams' - } - } - ] - }, - { - name: 'aggregatorSetMinOracles' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSetMinOraclesParams' - } - } - ] - }, - { - name: 'aggregatorSetQueue' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - }, - { - name: 'queue' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSetQueueParams' - } - } - ] - }, - { - name: 'aggregatorSetUpdateInterval' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSetUpdateIntervalParams' - } - } - ] - }, - { - name: 'aggregatorSetVarianceThreshold' - accounts: [ - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'AggregatorSetVarianceThresholdParams' - } - } - ] - }, - { - name: 'crankInit' - accounts: [ - { - name: 'crank' - isMut: true - isSigner: true - }, - { - name: 'queue' - isMut: false - isSigner: false - }, - { - name: 'buffer' - isMut: true - isSigner: false - }, - { - name: 'payer' - isMut: true - isSigner: false - }, - { - name: 'systemProgram' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'CrankInitParams' - } - } - ] - }, - { - name: 'crankPop' - accounts: [ - { - name: 'crank' - isMut: true - isSigner: false - }, - { - name: 'oracleQueue' - isMut: true - isSigner: false - }, - { - name: 'queueAuthority' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'payoutWallet' - isMut: true - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'crankDataBuffer' - isMut: true - isSigner: false - }, - { - name: 'queueDataBuffer' - isMut: false - isSigner: false - }, - { - name: 'mint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'CrankPopParams' - } - } - ] - }, - { - name: 'crankPush' - accounts: [ - { - name: 'crank' - isMut: true - isSigner: false - }, - { - name: 'aggregator' - isMut: true - isSigner: false - }, - { - name: 'oracleQueue' - isMut: true - isSigner: false - }, - { - name: 'queueAuthority' - isMut: false - isSigner: false - }, - { - name: 'permission' - isMut: false - isSigner: false - }, - { - name: 'lease' - isMut: true - isSigner: false - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'dataBuffer' - isMut: true - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'CrankPushParams' - } - } - ] - }, - { - name: 'jobInit' - accounts: [ - { - name: 'job' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'JobInitParams' - } - } - ] - }, - { - name: 'leaseExtend' - accounts: [ - { - name: 'lease' - isMut: true - isSigner: false - }, - { - name: 'aggregator' - isMut: false - isSigner: false - }, - { - name: 'queue' - isMut: false - isSigner: false - }, - { - name: 'funder' - isMut: true - isSigner: false - }, - { - name: 'owner' - isMut: true - isSigner: true - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'mint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'LeaseExtendParams' - } - } - ] - }, - { - name: 'leaseInit' - accounts: [ - { - name: 'lease' - isMut: true - isSigner: false - }, - { - name: 'queue' - isMut: true - isSigner: false - }, - { - name: 'aggregator' - isMut: false - isSigner: false - }, - { - name: 'funder' - isMut: true - isSigner: false - }, - { - name: 'payer' - isMut: true - isSigner: true - }, - { - name: 'systemProgram' - isMut: false - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'owner' - isMut: true - isSigner: true - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'mint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'LeaseInitParams' - } - } - ] - }, - { - name: 'leaseSetAuthority' - accounts: [ - { - name: 'lease' - isMut: true - isSigner: false - }, - { - name: 'withdrawAuthority' - isMut: false - isSigner: true - }, - { - name: 'newAuthority' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'LeaseSetAuthorityParams' - } - } - ] - }, - { - name: 'leaseWithdraw' - accounts: [ - { - name: 'lease' - isMut: true - isSigner: false - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'aggregator' - isMut: false - isSigner: false - }, - { - name: 'queue' - isMut: false - isSigner: false - }, - { - name: 'withdrawAuthority' - isMut: false - isSigner: true - }, - { - name: 'withdrawAccount' - isMut: true - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'mint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'LeaseWithdrawParams' - } - } - ] - }, - { - name: 'oracleHeartbeat' - accounts: [ - { - name: 'oracle' - isMut: true - isSigner: false - }, - { - name: 'oracleAuthority' - isMut: false - isSigner: true - }, - { - name: 'tokenAccount' - isMut: false - isSigner: false - }, - { - name: 'gcOracle' - isMut: true - isSigner: false - }, - { - name: 'oracleQueue' - isMut: true - isSigner: false - }, - { - name: 'permission' - isMut: false - isSigner: false - }, - { - name: 'dataBuffer' - isMut: true - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'OracleHeartbeatParams' - } - } - ] - }, - { - name: 'oracleInit' - accounts: [ - { - name: 'oracle' - isMut: true - isSigner: false - }, - { - name: 'oracleAuthority' - isMut: false - isSigner: false - }, - { - name: 'wallet' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'queue' - isMut: false - isSigner: false - }, - { - name: 'payer' - isMut: true - isSigner: false - }, - { - name: 'systemProgram' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'OracleInitParams' - } - } - ] - }, - { - name: 'oracleQueueInit' - accounts: [ - { - name: 'oracleQueue' - isMut: true - isSigner: true - }, - { - name: 'authority' - isMut: false - isSigner: false - }, - { - name: 'buffer' - isMut: true - isSigner: false - }, - { - name: 'payer' - isMut: true - isSigner: false - }, - { - name: 'systemProgram' - isMut: false - isSigner: false - }, - { - name: 'mint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'OracleQueueInitParams' - } - } - ] - }, - { - name: 'oracleQueueSetRewards' - accounts: [ - { - name: 'queue' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'OracleQueueSetRewardsParams' - } - } - ] - }, - { - name: 'oracleQueueVrfConfig' - accounts: [ - { - name: 'queue' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'OracleQueueVrfConfigParams' - } - } - ] - }, - { - name: 'oracleWithdraw' - accounts: [ - { - name: 'oracle' - isMut: true - isSigner: false - }, - { - name: 'oracleAuthority' - isMut: false - isSigner: true - }, - { - name: 'tokenAccount' - isMut: true - isSigner: false - }, - { - name: 'withdrawAccount' - isMut: true - isSigner: false - }, - { - name: 'oracleQueue' - isMut: true - isSigner: false - }, - { - name: 'permission' - isMut: true - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'payer' - isMut: true - isSigner: true - }, - { - name: 'systemProgram' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'OracleWithdrawParams' - } - } - ] - }, - { - name: 'permissionInit' - accounts: [ - { - name: 'permission' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: false - }, - { - name: 'granter' - isMut: false - isSigner: false - }, - { - name: 'grantee' - isMut: false - isSigner: false - }, - { - name: 'payer' - isMut: true - isSigner: true - }, - { - name: 'systemProgram' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'PermissionInitParams' - } - } - ] - }, - { - name: 'permissionSet' - accounts: [ - { - name: 'permission' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'PermissionSetParams' - } - } - ] - }, - { - name: 'permissionSetVoterWeight' - accounts: [ - { - name: 'permission' - isMut: false - isSigner: false - }, - { - name: 'permissionAuthority' - isMut: false - isSigner: false - }, - { - name: 'oracle' - isMut: false - isSigner: false - }, - { - name: 'oracleAuthority' - isMut: false - isSigner: false - }, - { - name: 'payer' - isMut: true - isSigner: true - }, - { - name: 'systemProgram' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'govProgram' - isMut: false - isSigner: false - }, - { - name: 'daoMint' - isMut: false - isSigner: false - }, - { - name: 'spawnRecord' - isMut: true - isSigner: false - }, - { - name: 'voterWeight' - isMut: true - isSigner: false - }, - { - name: 'tokenOwnerRecord' - isMut: true - isSigner: false - }, - { - name: 'realm' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'PermissionSetVoterWeightParams' - } - } - ] - }, - { - name: 'programConfig' - accounts: [ - { - name: 'authority' - isMut: false - isSigner: true - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'daoMint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'ProgramConfigParams' - } - } - ] - }, - { - name: 'programInit' - accounts: [ - { - name: 'state' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: false - }, - { - name: 'tokenMint' - isMut: true - isSigner: false - }, - { - name: 'vault' - isMut: true - isSigner: false - }, - { - name: 'payer' - isMut: true - isSigner: false - }, - { - name: 'systemProgram' - isMut: false - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'daoMint' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'ProgramInitParams' - } - } - ] - }, - { - name: 'vaultTransfer' - accounts: [ - { - name: 'state' - isMut: false - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: true - }, - { - name: 'to' - isMut: true - isSigner: false - }, - { - name: 'vault' - isMut: true - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'VaultTransferParams' - } - } - ] - }, - { - name: 'vrfInit' - accounts: [ - { - name: 'vrf' - isMut: true - isSigner: false - }, - { - name: 'authority' - isMut: false - isSigner: false - }, - { - name: 'oracleQueue' - isMut: false - isSigner: false - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'VrfInitParams' - } - } - ] - }, - { - name: 'vrfProve' - accounts: [ - { - name: 'vrf' - isMut: true - isSigner: false - }, - { - name: 'oracle' - isMut: false - isSigner: false - }, - { - name: 'randomnessProducer' - isMut: false - isSigner: true - } - ] - args: [ - { - name: 'params' - type: { - defined: 'VrfProveParams' - } - } - ] - }, - { - name: 'vrfProveAndVerify' - accounts: [ - { - name: 'vrf' - isMut: true - isSigner: false - }, - { - name: 'callbackPid' - isMut: false - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'oracle' - isMut: false - isSigner: false - }, - { - name: 'oracleAuthority' - isMut: false - isSigner: true - }, - { - name: 'oracleWallet' - isMut: true - isSigner: false - }, - { - name: 'instructionsSysvar' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'VrfProveAndVerifyParams' - } - } - ] - }, - { - name: 'vrfRequestRandomness' - accounts: [ - { - name: 'authority' - isMut: false - isSigner: true - }, - { - name: 'vrf' - isMut: true - isSigner: false - }, - { - name: 'oracleQueue' - isMut: true - isSigner: false - }, - { - name: 'queueAuthority' - isMut: false - isSigner: false - }, - { - name: 'dataBuffer' - isMut: false - isSigner: false - }, - { - name: 'permission' - isMut: true - isSigner: false - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'payerWallet' - isMut: true - isSigner: false - }, - { - name: 'payerAuthority' - isMut: false - isSigner: true - }, - { - name: 'recentBlockhashes' - isMut: false - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'VrfRequestRandomnessParams' - } - } - ] - }, - { - name: 'vrfVerify' - accounts: [ - { - name: 'vrf' - isMut: true - isSigner: false - }, - { - name: 'callbackPid' - isMut: false - isSigner: false - }, - { - name: 'tokenProgram' - isMut: false - isSigner: false - }, - { - name: 'escrow' - isMut: true - isSigner: false - }, - { - name: 'programState' - isMut: false - isSigner: false - }, - { - name: 'oracle' - isMut: false - isSigner: false - }, - { - name: 'oracleAuthority' - isMut: false - isSigner: false - }, - { - name: 'oracleWallet' - isMut: true - isSigner: false - }, - { - name: 'instructionsSysvar' - isMut: false - isSigner: false - } - ] - args: [ - { - name: 'params' - type: { - defined: 'VrfVerifyParams' - } - } - ] - } - ] - accounts: [ - { - name: 'SbState' - type: { - kind: 'struct' - fields: [ - { - name: 'authority' - type: 'publicKey' - }, - { - name: 'tokenMint' - type: 'publicKey' - }, - { - name: 'tokenVault' - type: 'publicKey' - }, - { - name: 'daoMint' - type: 'publicKey' - }, - { - name: 'ebuf' - type: { - array: ['u8', 992] - } - } - ] - } - }, - { - name: 'AggregatorAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: { - array: ['u8', 32] - } - }, - { - name: 'metadata' - type: { - array: ['u8', 128] - } - }, - { - name: 'reserved1' - type: { - array: ['u8', 32] - } - }, - { - name: 'queuePubkey' - type: 'publicKey' - }, - { - name: 'oracleRequestBatchSize' - type: 'u32' - }, - { - name: 'minOracleResults' - type: 'u32' - }, - { - name: 'minJobResults' - type: 'u32' - }, - { - name: 'minUpdateDelaySeconds' - type: 'u32' - }, - { - name: 'startAfter' - type: 'i64' - }, - { - name: 'varianceThreshold' - type: { - defined: 'SwitchboardDecimal' - } - }, - { - name: 'forceReportPeriod' - type: 'i64' - }, - { - name: 'expiration' - type: 'i64' - }, - { - name: 'consecutiveFailureCount' - type: 'u64' - }, - { - name: 'nextAllowedUpdateTime' - type: 'i64' - }, - { - name: 'isLocked' - type: 'bool' - }, - { - name: 'crankPubkey' - type: 'publicKey' - }, - { - name: 'latestConfirmedRound' - type: { - defined: 'AggregatorRound' - } - }, - { - name: 'currentRound' - type: { - defined: 'AggregatorRound' - } - }, - { - name: 'jobPubkeysData' - type: { - array: ['publicKey', 16] - } - }, - { - name: 'jobHashes' - type: { - array: [ - { - defined: 'Hash' - }, - 16 - ] - } - }, - { - name: 'jobPubkeysSize' - type: 'u32' - }, - { - name: 'jobsChecksum' - type: { - array: ['u8', 32] - } - }, - { - name: 'authority' - type: 'publicKey' - }, - { - name: 'historyBuffer' - type: 'publicKey' - }, - { - name: 'previousConfirmedRoundResult' - type: { - defined: 'SwitchboardDecimal' - } - }, - { - name: 'previousConfirmedRoundSlot' - type: 'u64' - }, - { - name: 'disableCrank' - type: 'bool' - }, - { - name: 'jobWeights' - type: { - array: ['u8', 16] - } - }, - { - name: 'ebuf' - type: { - array: ['u8', 147] - } - } - ] - } - }, - { - name: 'PermissionAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'authority' - type: 'publicKey' - }, - { - name: 'permissions' - type: 'u32' - }, - { - name: 'granter' - type: 'publicKey' - }, - { - name: 'grantee' - type: 'publicKey' - }, - { - name: 'expiration' - type: 'i64' - }, - { - name: 'ebuf' - type: { - array: ['u8', 256] - } - } - ] - } - }, - { - name: 'RealmSpawnRecordAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'ebuf' - type: { - array: ['u8', 256] - } - } - ] - } - }, - { - name: 'LeaseAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'escrow' - type: 'publicKey' - }, - { - name: 'queue' - type: 'publicKey' - }, - { - name: 'aggregator' - type: 'publicKey' - }, - { - name: 'tokenProgram' - type: 'publicKey' - }, - { - name: 'isActive' - type: 'bool' - }, - { - name: 'crankRowCount' - type: 'u32' - }, - { - name: 'createdAt' - type: 'i64' - }, - { - name: 'updateCount' - type: 'u128' - }, - { - name: 'withdrawAuthority' - type: 'publicKey' - }, - { - name: 'ebuf' - type: { - array: ['u8', 256] - } - } - ] - } - }, - { - name: 'OracleQueueAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: { - array: ['u8', 32] - } - }, - { - name: 'metadata' - type: { - array: ['u8', 64] - } - }, - { - name: 'authority' - type: 'publicKey' - }, - { - name: 'oracleTimeout' - type: 'u32' - }, - { - name: 'reward' - type: 'u64' - }, - { - name: 'minStake' - type: 'u64' - }, - { - name: 'slashingEnabled' - type: 'bool' - }, - { - name: 'varianceToleranceMultiplier' - type: { - defined: 'SwitchboardDecimal' - } - }, - { - name: 'feedProbationPeriod' - type: 'u32' - }, - { - name: 'currIdx' - type: 'u32' - }, - { - name: 'size' - type: 'u32' - }, - { - name: 'gcIdx' - type: 'u32' - }, - { - name: 'consecutiveFeedFailureLimit' - type: 'u64' - }, - { - name: 'consecutiveOracleFailureLimit' - type: 'u64' - }, - { - name: 'unpermissionedFeedsEnabled' - type: 'bool' - }, - { - name: 'unpermissionedVrfEnabled' - type: 'bool' - }, - { - name: 'curatorRewardCut' - type: { - defined: 'SwitchboardDecimal' - } - }, - { - name: 'lockLeaseFunding' - type: 'bool' - }, - { - name: 'mint' - type: 'publicKey' - }, - { - name: 'ebuf' - type: { - array: ['u8', 969] - } - }, - { - name: 'maxSize' - type: 'u32' - }, - { - name: 'dataBuffer' - type: 'publicKey' - } - ] - } - }, - { - name: 'CrankAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: { - array: ['u8', 32] - } - }, - { - name: 'metadata' - type: { - array: ['u8', 64] - } - }, - { - name: 'queuePubkey' - type: 'publicKey' - }, - { - name: 'pqSize' - type: 'u32' - }, - { - name: 'maxRows' - type: 'u32' - }, - { - name: 'jitterModifier' - type: 'u8' - }, - { - name: 'ebuf' - type: { - array: ['u8', 255] - } - }, - { - name: 'dataBuffer' - type: 'publicKey' - } - ] - } - }, - { - name: 'OracleAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: { - array: ['u8', 32] - } - }, - { - name: 'metadata' - type: { - array: ['u8', 128] - } - }, - { - name: 'oracleAuthority' - type: 'publicKey' - }, - { - name: 'lastHeartbeat' - type: 'i64' - }, - { - name: 'numInUse' - type: 'u32' - }, - { - name: 'tokenAccount' - type: 'publicKey' - }, - { - name: 'queuePubkey' - type: 'publicKey' - }, - { - name: 'metrics' - type: { - defined: 'OracleMetrics' - } - }, - { - name: 'ebuf' - type: { - array: ['u8', 256] - } - } - ] - } - }, - { - name: 'JobAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: { - array: ['u8', 32] - } - }, - { - name: 'metadata' - type: { - array: ['u8', 64] - } - }, - { - name: 'authority' - type: 'publicKey' - }, - { - name: 'expiration' - type: 'i64' - }, - { - name: 'hash' - type: { - array: ['u8', 32] - } - }, - { - name: 'data' - type: 'bytes' - }, - { - name: 'referenceCount' - type: 'u32' - }, - { - name: 'totalSpent' - type: 'u64' - }, - { - name: 'createdAt' - type: 'i64' - } - ] - } - }, - { - name: 'VrfAccountData' - type: { - kind: 'struct' - fields: [ - { - name: 'status' - type: { - defined: 'VrfStatus' - } - }, - { - name: 'counter' - type: 'u128' - }, - { - name: 'authority' - type: 'publicKey' - }, - { - name: 'oracleQueue' - type: 'publicKey' - }, - { - name: 'escrow' - type: 'publicKey' - }, - { - name: 'callback' - type: { - defined: 'CallbackZC' - } - }, - { - name: 'batchSize' - type: 'u32' - }, - { - name: 'builders' - type: { - array: [ - { - defined: 'VrfBuilder' - }, - 8 - ] - } - }, - { - name: 'buildersLen' - type: 'u32' - }, - { - name: 'testMode' - type: 'bool' - }, - { - name: 'currentRound' - type: { - defined: 'VrfRound' - } - }, - { - name: 'ebuf' - type: { - array: ['u8', 1024] - } - } - ] - } - } - ] - types: [ - { - name: 'AggregatorAddJobParams' - type: { - kind: 'struct' - fields: [ - { - name: 'weight' - type: { - option: 'u8' - } - } - ] - } - }, - { - name: 'AggregatorInitParams' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: { - array: ['u8', 32] - } - }, - { - name: 'metadata' - type: { - array: ['u8', 128] - } - }, - { - name: 'batchSize' - type: 'u32' - }, - { - name: 'minOracleResults' - type: 'u32' - }, - { - name: 'minJobResults' - type: 'u32' - }, - { - name: 'minUpdateDelaySeconds' - type: 'u32' - }, - { - name: 'startAfter' - type: 'i64' - }, - { - name: 'varianceThreshold' - type: { - defined: 'BorshDecimal' - } - }, - { - name: 'forceReportPeriod' - type: 'i64' - }, - { - name: 'expiration' - type: 'i64' - }, - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'disableCrank' - type: 'bool' - } - ] - } - }, - { - name: 'AggregatorLockParams' - type: { - kind: 'struct' - fields: [] - } - }, - { - name: 'AggregatorOpenRoundParams' - type: { - kind: 'struct' - fields: [ - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'leaseBump' - type: 'u8' - }, - { - name: 'permissionBump' - type: 'u8' - }, - { - name: 'jitter' - type: 'u8' - } - ] - } - }, - { - name: 'AggregatorRemoveJobParams' - type: { - kind: 'struct' - fields: [ - { - name: 'jobIdx' - type: 'u32' - } - ] - } - }, - { - name: 'AggregatorSaveResultParams' - type: { - kind: 'struct' - fields: [ - { - name: 'oracleIdx' - type: 'u32' - }, - { - name: 'error' - type: 'bool' - }, - { - name: 'value' - type: { - defined: 'BorshDecimal' - } - }, - { - name: 'jobsChecksum' - type: { - array: ['u8', 32] - } - }, - { - name: 'minResponse' - type: { - defined: 'BorshDecimal' - } - }, - { - name: 'maxResponse' - type: { - defined: 'BorshDecimal' - } - }, - { - name: 'feedPermissionBump' - type: 'u8' - }, - { - name: 'oraclePermissionBump' - type: 'u8' - }, - { - name: 'leaseBump' - type: 'u8' - }, - { - name: 'stateBump' - type: 'u8' - } - ] - } - }, - { - name: 'AggregatorSetAuthorityParams' - type: { - kind: 'struct' - fields: [] - } - }, - { - name: 'AggregatorSetBatchSizeParams' - type: { - kind: 'struct' - fields: [ - { - name: 'batchSize' - type: 'u32' - } - ] - } - }, - { - name: 'AggregatorSetHistoryBufferParams' - type: { - kind: 'struct' - fields: [] - } - }, - { - name: 'AggregatorSetMinJobsParams' - type: { - kind: 'struct' - fields: [ - { - name: 'minJobResults' - type: 'u32' - } - ] - } - }, - { - name: 'AggregatorSetMinOraclesParams' - type: { - kind: 'struct' - fields: [ - { - name: 'minOracleResults' - type: 'u32' - } - ] - } - }, - { - name: 'AggregatorSetQueueParams' - type: { - kind: 'struct' - fields: [] - } - }, - { - name: 'AggregatorSetUpdateIntervalParams' - type: { - kind: 'struct' - fields: [ - { - name: 'newInterval' - type: 'u32' - } - ] - } - }, - { - name: 'AggregatorSetVarianceThresholdParams' - type: { - kind: 'struct' - fields: [ - { - name: 'varianceThreshold' - type: { - defined: 'BorshDecimal' - } - } - ] - } - }, - { - name: 'CrankInitParams' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: 'bytes' - }, - { - name: 'metadata' - type: 'bytes' - }, - { - name: 'crankSize' - type: 'u32' - } - ] - } - }, - { - name: 'CrankPopParams' - type: { - kind: 'struct' - fields: [ - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'leaseBumps' - type: 'bytes' - }, - { - name: 'permissionBumps' - type: 'bytes' - }, - { - name: 'nonce' - type: { - option: 'u32' - } - }, - { - name: 'failOpenOnAccountMismatch' - type: { - option: 'bool' - } - } - ] - } - }, - { - name: 'CrankPushParams' - type: { - kind: 'struct' - fields: [ - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'permissionBump' - type: 'u8' - } - ] - } - }, - { - name: 'JobInitParams' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: { - array: ['u8', 32] - } - }, - { - name: 'expiration' - type: 'i64' - }, - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'data' - type: 'bytes' - } - ] - } - }, - { - name: 'LeaseExtendParams' - type: { - kind: 'struct' - fields: [ - { - name: 'loadAmount' - type: 'u64' - }, - { - name: 'leaseBump' - type: 'u8' - }, - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'walletBumps' - type: 'bytes' - } - ] - } - }, - { - name: 'LeaseInitParams' - type: { - kind: 'struct' - fields: [ - { - name: 'loadAmount' - type: 'u64' - }, - { - name: 'withdrawAuthority' - type: 'publicKey' - }, - { - name: 'leaseBump' - type: 'u8' - }, - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'walletBumps' - type: 'bytes' - } - ] - } - }, - { - name: 'LeaseSetAuthorityParams' - type: { - kind: 'struct' - fields: [] - } - }, - { - name: 'LeaseWithdrawParams' - type: { - kind: 'struct' - fields: [ - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'leaseBump' - type: 'u8' - }, - { - name: 'amount' - type: 'u64' - } - ] - } - }, - { - name: 'OracleHeartbeatParams' - type: { - kind: 'struct' - fields: [ - { - name: 'permissionBump' - type: 'u8' - } - ] - } - }, - { - name: 'OracleInitParams' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: 'bytes' - }, - { - name: 'metadata' - type: 'bytes' - }, - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'oracleBump' - type: 'u8' - } - ] - } - }, - { - name: 'OracleQueueInitParams' - type: { - kind: 'struct' - fields: [ - { - name: 'name' - type: { - array: ['u8', 32] - } - }, - { - name: 'metadata' - type: { - array: ['u8', 64] - } - }, - { - name: 'reward' - type: 'u64' - }, - { - name: 'minStake' - type: 'u64' - }, - { - name: 'feedProbationPeriod' - type: 'u32' - }, - { - name: 'oracleTimeout' - type: 'u32' - }, - { - name: 'slashingEnabled' - type: 'bool' - }, - { - name: 'varianceToleranceMultiplier' - type: { - defined: 'BorshDecimal' - } - }, - { - name: 'consecutiveFeedFailureLimit' - type: 'u64' - }, - { - name: 'consecutiveOracleFailureLimit' - type: 'u64' - }, - { - name: 'queueSize' - type: 'u32' - }, - { - name: 'unpermissionedFeeds' - type: 'bool' - }, - { - name: 'unpermissionedVrf' - type: 'bool' - } - ] - } - }, - { - name: 'OracleQueueSetRewardsParams' - type: { - kind: 'struct' - fields: [ - { - name: 'rewards' - type: 'u64' - } - ] - } - }, - { - name: 'OracleQueueVrfConfigParams' - type: { - kind: 'struct' - fields: [ - { - name: 'unpermissionedVrfEnabled' - type: 'bool' - } - ] - } - }, - { - name: 'OracleWithdrawParams' - type: { - kind: 'struct' - fields: [ - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'permissionBump' - type: 'u8' - }, - { - name: 'amount' - type: 'u64' - } - ] - } - }, - { - name: 'PermissionInitParams' - type: { - kind: 'struct' - fields: [] - } - }, - { - name: 'PermissionSetParams' - type: { - kind: 'struct' - fields: [ - { - name: 'permission' - type: { - defined: 'SwitchboardPermission' - } - }, - { - name: 'enable' - type: 'bool' - } - ] - } - }, - { - name: 'PermissionSetVoterWeightParams' - type: { - kind: 'struct' - fields: [ - { - name: 'stateBump' - type: 'u8' - } - ] - } - }, - { - name: 'ProgramConfigParams' - type: { - kind: 'struct' - fields: [ - { - name: 'token' - type: 'publicKey' - }, - { - name: 'bump' - type: 'u8' - }, - { - name: 'daoMint' - type: 'publicKey' - } - ] - } - }, - { - name: 'ProgramInitParams' - type: { - kind: 'struct' - fields: [ - { - name: 'stateBump' - type: 'u8' - } - ] - } - }, - { - name: 'VaultTransferParams' - type: { - kind: 'struct' - fields: [ - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'amount' - type: 'u64' - } - ] - } - }, - { - name: 'VrfInitParams' - type: { - kind: 'struct' - fields: [ - { - name: 'callback' - type: { - defined: 'Callback' - } - }, - { - name: 'stateBump' - type: 'u8' - } - ] - } - }, - { - name: 'VrfProveParams' - type: { - kind: 'struct' - fields: [ - { - name: 'proof' - type: 'bytes' - }, - { - name: 'idx' - type: 'u32' - } - ] - } - }, - { - name: 'VrfProveAndVerifyParams' - type: { - kind: 'struct' - fields: [ - { - name: 'nonce' - type: { - option: 'u32' - } - }, - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'idx' - type: 'u32' - }, - { - name: 'proof' - type: 'bytes' - } - ] - } - }, - { - name: 'VrfRequestRandomnessParams' - type: { - kind: 'struct' - fields: [ - { - name: 'permissionBump' - type: 'u8' - }, - { - name: 'stateBump' - type: 'u8' - } - ] - } - }, - { - name: 'VrfVerifyParams' - type: { - kind: 'struct' - fields: [ - { - name: 'nonce' - type: { - option: 'u32' - } - }, - { - name: 'stateBump' - type: 'u8' - }, - { - name: 'idx' - type: 'u32' - } - ] - } - }, - { - name: 'Hash' - type: { - kind: 'struct' - fields: [ - { - name: 'data' - type: { - array: ['u8', 32] - } - } - ] - } - }, - { - name: 'AggregatorRound' - type: { - kind: 'struct' - fields: [ - { - name: 'numSuccess' - type: 'u32' - }, - { - name: 'numError' - type: 'u32' - }, - { - name: 'isClosed' - type: 'bool' - }, - { - name: 'roundOpenSlot' - type: 'u64' - }, - { - name: 'roundOpenTimestamp' - type: 'i64' - }, - { - name: 'result' - type: { - defined: 'SwitchboardDecimal' - } - }, - { - name: 'stdDeviation' - type: { - defined: 'SwitchboardDecimal' - } - }, - { - name: 'minResponse' - type: { - defined: 'SwitchboardDecimal' - } - }, - { - name: 'maxResponse' - type: { - defined: 'SwitchboardDecimal' - } - }, - { - name: 'oraclePubkeysData' - type: { - array: ['publicKey', 16] - } - }, - { - name: 'mediansData' - type: { - array: [ - { - defined: 'SwitchboardDecimal' - }, - 16 - ] - } - }, - { - name: 'currentPayout' - type: { - array: ['i64', 16] - } - }, - { - name: 'mediansFulfilled' - type: { - array: ['bool', 16] - } - }, - { - name: 'errorsFulfilled' - type: { - array: ['bool', 16] - } - } - ] - } - }, - { - name: 'AggregatorHistoryRow' - type: { - kind: 'struct' - fields: [ - { - name: 'timestamp' - type: 'i64' - }, - { - name: 'value' - type: { - defined: 'SwitchboardDecimal' - } - } - ] - } - }, - { - name: 'SwitchboardDecimal' - type: { - kind: 'struct' - fields: [ - { - name: 'mantissa' - type: 'i128' - }, - { - name: 'scale' - type: 'u32' - } - ] - } - }, - { - name: 'CrankRow' - type: { - kind: 'struct' - fields: [ - { - name: 'pubkey' - type: 'publicKey' - }, - { - name: 'nextTimestamp' - type: 'i64' - } - ] - } - }, - { - name: 'OracleMetrics' - type: { - kind: 'struct' - fields: [ - { - name: 'consecutiveSuccess' - type: 'u64' - }, - { - name: 'consecutiveError' - type: 'u64' - }, - { - name: 'consecutiveDisagreement' - type: 'u64' - }, - { - name: 'consecutiveLateResponse' - type: 'u64' - }, - { - name: 'consecutiveFailure' - type: 'u64' - }, - { - name: 'totalSuccess' - type: 'u128' - }, - { - name: 'totalError' - type: 'u128' - }, - { - name: 'totalDisagreement' - type: 'u128' - }, - { - name: 'totalLateResponse' - type: 'u128' - } - ] - } - }, - { - name: 'BorshDecimal' - type: { - kind: 'struct' - fields: [ - { - name: 'mantissa' - type: 'i128' - }, - { - name: 'scale' - type: 'u32' - } - ] - } - }, - { - name: 'EcvrfProofZC' - type: { - kind: 'struct' - fields: [ - { - name: 'gamma' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'c' - type: { - defined: 'Scalar' - } - }, - { - name: 's' - type: { - defined: 'Scalar' - } - } - ] - } - }, - { - name: 'Scalar' - type: { - kind: 'struct' - fields: [ - { - name: 'bytes' - type: { - array: ['u8', 32] - } - } - ] - } - }, - { - name: 'FieldElementZC' - type: { - kind: 'struct' - fields: [ - { - name: 'bytes' - type: { - array: ['u64', 5] - } - } - ] - } - }, - { - name: 'CompletedPointZC' - type: { - kind: 'struct' - fields: [ - { - name: 'x' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'y' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'z' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 't' - type: { - defined: 'FieldElementZC' - } - } - ] - } - }, - { - name: 'EdwardsPointZC' - type: { - kind: 'struct' - fields: [ - { - name: 'x' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'y' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'z' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 't' - type: { - defined: 'FieldElementZC' - } - } - ] - } - }, - { - name: 'ProjectivePointZC' - type: { - kind: 'struct' - fields: [ - { - name: 'x' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'y' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'z' - type: { - defined: 'FieldElementZC' - } - } - ] - } - }, - { - name: 'EcvrfIntermediate' - type: { - kind: 'struct' - fields: [ - { - name: 'r' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'nS' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'd' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 't13' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 't15' - type: { - defined: 'FieldElementZC' - } - } - ] - } - }, - { - name: 'VrfBuilder' - type: { - kind: 'struct' - fields: [ - { - name: 'producer' - type: 'publicKey' - }, - { - name: 'status' - type: { - defined: 'VrfStatus' - } - }, - { - name: 'reprProof' - type: { - array: ['u8', 80] - } - }, - { - name: 'proof' - type: { - defined: 'EcvrfProofZC' - } - }, - { - name: 'yPoint' - type: 'publicKey' - }, - { - name: 'stage' - type: 'u32' - }, - { - name: 'stage1Out' - type: { - defined: 'EcvrfIntermediate' - } - }, - { - name: 'r1' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'r2' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'stage3Out' - type: { - defined: 'EcvrfIntermediate' - } - }, - { - name: 'hPoint' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'sReduced' - type: { - defined: 'Scalar' - } - }, - { - name: 'yPointBuilder' - type: { - array: [ - { - defined: 'FieldElementZC' - }, - 3 - ] - } - }, - { - name: 'yRistrettoPoint' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'mulRound' - type: 'u8' - }, - { - name: 'hashPointsRound' - type: 'u8' - }, - { - name: 'mulTmp1' - type: { - defined: 'CompletedPointZC' - } - }, - { - name: 'uPoint1' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'uPoint2' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'vPoint1' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'vPoint2' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'uPoint' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'vPoint' - type: { - defined: 'EdwardsPointZC' - } - }, - { - name: 'u1' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'u2' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'invertee' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'y' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'z' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'p1Bytes' - type: { - array: ['u8', 32] - } - }, - { - name: 'p2Bytes' - type: { - array: ['u8', 32] - } - }, - { - name: 'p3Bytes' - type: { - array: ['u8', 32] - } - }, - { - name: 'p4Bytes' - type: { - array: ['u8', 32] - } - }, - { - name: 'cPrimeHashbuf' - type: { - array: ['u8', 16] - } - }, - { - name: 'm1' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'm2' - type: { - defined: 'FieldElementZC' - } - }, - { - name: 'txRemaining' - type: 'u32' - }, - { - name: 'verified' - type: 'bool' - }, - { - name: 'result' - type: { - array: ['u8', 32] - } - } - ] - } - }, - { - name: 'AccountMetaZC' - type: { - kind: 'struct' - fields: [ - { - name: 'pubkey' - type: 'publicKey' - }, - { - name: 'isSigner' - type: 'bool' - }, - { - name: 'isWritable' - type: 'bool' - } - ] - } - }, - { - name: 'AccountMetaBorsh' - type: { - kind: 'struct' - fields: [ - { - name: 'pubkey' - type: 'publicKey' - }, - { - name: 'isSigner' - type: 'bool' - }, - { - name: 'isWritable' - type: 'bool' - } - ] - } - }, - { - name: 'CallbackZC' - type: { - kind: 'struct' - fields: [ - { - name: 'programId' - type: 'publicKey' - }, - { - name: 'accounts' - type: { - array: [ - { - defined: 'AccountMetaZC' - }, - 32 - ] - } - }, - { - name: 'accountsLen' - type: 'u32' - }, - { - name: 'ixData' - type: { - array: ['u8', 1024] - } - }, - { - name: 'ixDataLen' - type: 'u32' - } - ] - } - }, - { - name: 'Callback' - type: { - kind: 'struct' - fields: [ - { - name: 'programId' - type: 'publicKey' - }, - { - name: 'accounts' - type: { - vec: { - defined: 'AccountMetaBorsh' - } - } - }, - { - name: 'ixData' - type: 'bytes' - } - ] - } - }, - { - name: 'VrfRound' - type: { - kind: 'struct' - fields: [ - { - name: 'alpha' - type: { - array: ['u8', 256] - } - }, - { - name: 'alphaLen' - type: 'u32' - }, - { - name: 'requestSlot' - type: 'u64' - }, - { - name: 'requestTimestamp' - type: 'i64' - }, - { - name: 'result' - type: { - array: ['u8', 32] - } - }, - { - name: 'numVerified' - type: 'u32' - }, - { - name: 'ebuf' - type: { - array: ['u8', 256] - } - } - ] - } - }, - { - name: 'Lanes' - type: { - kind: 'enum' - variants: [ - { - name: 'C' - }, - { - name: 'D' - }, - { - name: 'AB' - }, - { - name: 'AC' - }, - { - name: 'CD' - }, - { - name: 'AD' - }, - { - name: 'BC' - }, - { - name: 'ABCD' - } - ] - } - }, - { - name: 'Shuffle' - type: { - kind: 'enum' - variants: [ - { - name: 'AAAA' - }, - { - name: 'BBBB' - }, - { - name: 'CACA' - }, - { - name: 'DBBD' - }, - { - name: 'ADDA' - }, - { - name: 'CBCB' - }, - { - name: 'ABAB' - }, - { - name: 'BADC' - }, - { - name: 'BACD' - }, - { - name: 'ABDC' - } - ] - } - }, - { - name: 'Shuffle' - type: { - kind: 'enum' - variants: [ - { - name: 'AAAA' - }, - { - name: 'BBBB' - }, - { - name: 'BADC' - }, - { - name: 'BACD' - }, - { - name: 'ADDA' - }, - { - name: 'CBCB' - }, - { - name: 'ABDC' - }, - { - name: 'ABAB' - }, - { - name: 'DBBD' - }, - { - name: 'CACA' - } - ] - } - }, - { - name: 'Lanes' - type: { - kind: 'enum' - variants: [ - { - name: 'D' - }, - { - name: 'C' - }, - { - name: 'AB' - }, - { - name: 'AC' - }, - { - name: 'AD' - }, - { - name: 'BCD' - } - ] - } - }, - { - name: 'Error' - type: { - kind: 'enum' - variants: [ - { - name: 'InvalidPublicKey' - }, - { - name: 'SerializationError' - fields: [ - { - defined: 'bincode::Error' - } - ] - }, - { - name: 'DeserializationError' - fields: [ - { - defined: 'bincode::Error' - } - ] - }, - { - name: 'InvalidDataError' - } - ] - } - }, - { - name: 'SwitchboardPermission' - type: { - kind: 'enum' - variants: [ - { - name: 'PermitOracleHeartbeat' - }, - { - name: 'PermitOracleQueueUsage' - }, - { - name: 'PermitVrfRequests' - } - ] - } - }, - { - name: 'OracleResponseType' - type: { - kind: 'enum' - variants: [ - { - name: 'TypeSuccess' - }, - { - name: 'TypeError' - }, - { - name: 'TypeDisagreement' - }, - { - name: 'TypeNoResponse' - } - ] - } - }, - { - name: 'VrfStatus' - type: { - kind: 'enum' - variants: [ - { - name: 'StatusNone' - }, - { - name: 'StatusRequesting' - }, - { - name: 'StatusVerifying' - }, - { - name: 'StatusVerified' - }, - { - name: 'StatusCallbackSuccess' - }, - { - name: 'StatusVerifyFailure' - } - ] - } - } - ] - events: [ - { - name: 'AggregatorInitEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - } - ] - }, - { - name: 'VrfRequestRandomnessEvent' - fields: [ - { - name: 'vrfPubkey' - type: 'publicKey' - index: true - }, - { - name: 'oraclePubkeys' - type: { - vec: 'publicKey' - } - index: false - }, - { - name: 'loadAmount' - type: 'u64' - index: false - }, - { - name: 'existingAmount' - type: 'u64' - index: false - } - ] - }, - { - name: 'VrfRequestEvent' - fields: [ - { - name: 'vrfPubkey' - type: 'publicKey' - index: true - }, - { - name: 'oraclePubkeys' - type: { - vec: 'publicKey' - } - index: false - } - ] - }, - { - name: 'VrfProveEvent' - fields: [ - { - name: 'vrfPubkey' - type: 'publicKey' - index: true - }, - { - name: 'oraclePubkey' - type: 'publicKey' - index: true - }, - { - name: 'authorityPubkey' - type: 'publicKey' - index: false - } - ] - }, - { - name: 'VrfVerifyEvent' - fields: [ - { - name: 'vrfPubkey' - type: 'publicKey' - index: true - }, - { - name: 'oraclePubkey' - type: 'publicKey' - index: true - }, - { - name: 'authorityPubkey' - type: 'publicKey' - index: false - }, - { - name: 'amount' - type: 'u64' - index: false - } - ] - }, - { - name: 'VrfCallbackPerformedEvent' - fields: [ - { - name: 'vrfPubkey' - type: 'publicKey' - index: true - }, - { - name: 'oraclePubkey' - type: 'publicKey' - index: true - }, - { - name: 'amount' - type: 'u64' - index: false - } - ] - }, - { - name: 'AggregatorOpenRoundEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - }, - { - name: 'oraclePubkeys' - type: { - vec: 'publicKey' - } - index: false - }, - { - name: 'jobPubkeys' - type: { - vec: 'publicKey' - } - index: false - }, - { - name: 'remainingFunds' - type: 'u64' - index: false - }, - { - name: 'queueAuthority' - type: 'publicKey' - index: false - } - ] - }, - { - name: 'AggregatorValueUpdateEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - }, - { - name: 'value' - type: { - defined: 'BorshDecimal' - } - index: false - }, - { - name: 'slot' - type: 'u64' - index: false - }, - { - name: 'timestamp' - type: 'i64' - index: false - }, - { - name: 'oraclePubkeys' - type: { - vec: 'publicKey' - } - index: false - }, - { - name: 'oracleValues' - type: { - vec: { - defined: 'BorshDecimal' - } - } - index: false - } - ] - }, - { - name: 'OracleRewardEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - }, - { - name: 'leasePubkey' - type: 'publicKey' - index: false - }, - { - name: 'oraclePubkey' - type: 'publicKey' - index: false - }, - { - name: 'walletPubkey' - type: 'publicKey' - index: false - }, - { - name: 'amount' - type: 'u64' - index: false - }, - { - name: 'roundSlot' - type: 'u64' - index: false - }, - { - name: 'timestamp' - type: 'i64' - index: false - } - ] - }, - { - name: 'OracleWithdrawEvent' - fields: [ - { - name: 'oraclePubkey' - type: 'publicKey' - index: false - }, - { - name: 'walletPubkey' - type: 'publicKey' - index: false - }, - { - name: 'destinationWallet' - type: 'publicKey' - index: false - }, - { - name: 'previousAmount' - type: 'u64' - index: false - }, - { - name: 'newAmount' - type: 'u64' - index: false - }, - { - name: 'timestamp' - type: 'i64' - index: false - } - ] - }, - { - name: 'LeaseWithdrawEvent' - fields: [ - { - name: 'leasePubkey' - type: 'publicKey' - index: false - }, - { - name: 'walletPubkey' - type: 'publicKey' - index: false - }, - { - name: 'previousAmount' - type: 'u64' - index: false - }, - { - name: 'newAmount' - type: 'u64' - index: false - }, - { - name: 'timestamp' - type: 'i64' - index: false - } - ] - }, - { - name: 'OracleSlashEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - }, - { - name: 'leasePubkey' - type: 'publicKey' - index: false - }, - { - name: 'oraclePubkey' - type: 'publicKey' - index: false - }, - { - name: 'walletPubkey' - type: 'publicKey' - index: false - }, - { - name: 'amount' - type: 'u64' - index: false - }, - { - name: 'roundSlot' - type: 'u64' - index: false - }, - { - name: 'timestamp' - type: 'i64' - index: false - } - ] - }, - { - name: 'LeaseFundEvent' - fields: [ - { - name: 'leasePubkey' - type: 'publicKey' - index: false - }, - { - name: 'funder' - type: 'publicKey' - index: false - }, - { - name: 'amount' - type: 'u64' - index: false - }, - { - name: 'timestamp' - type: 'i64' - index: false - } - ] - }, - { - name: 'ProbationBrokenEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - }, - { - name: 'queuePubkey' - type: 'publicKey' - index: false - }, - { - name: 'timestamp' - type: 'i64' - index: false - } - ] - }, - { - name: 'FeedPermissionRevokedEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - }, - { - name: 'timestamp' - type: 'i64' - index: false - } - ] - }, - { - name: 'GarbageCollectFailureEvent' - fields: [ - { - name: 'queuePubkey' - type: 'publicKey' - index: false - } - ] - }, - { - name: 'OracleBootedEvent' - fields: [ - { - name: 'queuePubkey' - type: 'publicKey' - index: false - }, - { - name: 'oraclePubkey' - type: 'publicKey' - index: false - } - ] - }, - { - name: 'CrankLeaseInsufficientFundsEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - }, - { - name: 'leasePubkey' - type: 'publicKey' - index: false - } - ] - }, - { - name: 'CrankPopExpectedFailureEvent' - fields: [ - { - name: 'feedPubkey' - type: 'publicKey' - index: false - }, - { - name: 'leasePubkey' - type: 'publicKey' - index: false - } - ] - } - ] - errors: [ - { - code: 6000 - name: 'ArrayOperationError' - msg: 'Illegal operation on a Switchboard array.' - }, - { - code: 6001 - name: 'QueueOperationError' - msg: 'Illegal operation on a Switchboard queue.' - }, - { - code: 6002 - name: 'IncorrectProgramOwnerError' - msg: 'An account required to be owned by the program has a different owner.' - }, - { - code: 6003 - name: 'InvalidAggregatorRound' - msg: 'Aggregator is not currently populated with a valid round.' - }, - { - code: 6004 - name: 'TooManyAggregatorJobs' - msg: 'Aggregator cannot fit any more jobs.' - }, - { - code: 6005 - name: 'AggregatorCurrentRoundClosed' - msg: "Aggregator's current round is closed. No results are being accepted." - }, - { - code: 6006 - name: 'AggregatorInvalidSaveResult' - msg: 'Aggregator received an invalid save result instruction.' - }, - { - code: 6007 - name: 'InvalidStrDecimalConversion' - msg: 'Failed to convert string to decimal format.' - }, - { - code: 6008 - name: 'AccountLoaderMissingSignature' - msg: 'AccountLoader account is missing a required signature.' - }, - { - code: 6009 - name: 'MissingRequiredSignature' - msg: 'Account is missing a required signature.' - }, - { - code: 6010 - name: 'ArrayOverflowError' - msg: 'The attempted action will overflow a zero-copy account array.' - }, - { - code: 6011 - name: 'ArrayUnderflowError' - msg: 'The attempted action will underflow a zero-copy account array.' - }, - { - code: 6012 - name: 'PubkeyNotFoundError' - msg: 'The queried public key was not found.' - }, - { - code: 6013 - name: 'AggregatorIllegalRoundOpenCall' - msg: 'Aggregator round open called too early.' - }, - { - code: 6014 - name: 'AggregatorIllegalRoundCloseCall' - msg: 'Aggregator round close called too early.' - }, - { - code: 6015 - name: 'AggregatorClosedError' - msg: 'Aggregator is closed. Illegal action.' - }, - { - code: 6016 - name: 'IllegalOracleIdxError' - msg: 'Illegal oracle index.' - }, - { - code: 6017 - name: 'OracleAlreadyRespondedError' - msg: 'The provided oracle has already responded this round.' - }, - { - code: 6018 - name: 'ProtoDeserializeError' - msg: 'Failed to deserialize protocol buffer.' - }, - { - code: 6019 - name: 'UnauthorizedStateUpdateError' - msg: 'Unauthorized program state modification attempted.' - }, - { - code: 6020 - name: 'MissingOracleAccountsError' - msg: 'Not enough oracle accounts provided to closeRounds.' - }, - { - code: 6021 - name: 'OracleMismatchError' - msg: 'An unexpected oracle account was provided for the transaction.' - }, - { - code: 6022 - name: 'CrankMaxCapacityError' - msg: "Attempted to push to a Crank that's at capacity" - }, - { - code: 6023 - name: 'AggregatorLeaseInsufficientFunds' - msg: 'Aggregator update call attempted but attached lease has insufficient funds.' - }, - { - code: 6024 - name: 'IncorrectTokenAccountMint' - msg: 'The provided token account does not point to the Switchboard token mint.' - }, - { - code: 6025 - name: 'InvalidEscrowAccount' - msg: 'An invalid escrow account was provided.' - }, - { - code: 6026 - name: 'CrankEmptyError' - msg: 'Crank empty. Pop failed.' - }, - { - code: 6027 - name: 'PdaDeriveError' - msg: 'Failed to derive a PDA from the provided seed.' - }, - { - code: 6028 - name: 'AggregatorAccountNotFound' - msg: 'Aggregator account missing from provided account list.' - }, - { - code: 6029 - name: 'PermissionAccountNotFound' - msg: 'Permission account missing from provided account list.' - }, - { - code: 6030 - name: 'LeaseAccountDeriveFailure' - msg: 'Failed to derive a lease account.' - }, - { - code: 6031 - name: 'PermissionAccountDeriveFailure' - msg: 'Failed to derive a permission account.' - }, - { - code: 6032 - name: 'EscrowAccountNotFound' - msg: 'Escrow account missing from provided account list.' - }, - { - code: 6033 - name: 'LeaseAccountNotFound' - msg: 'Lease account missing from provided account list.' - }, - { - code: 6034 - name: 'DecimalConversionError' - msg: 'Decimal conversion method failed.' - }, - { - code: 6035 - name: 'PermissionDenied' - msg: 'Permission account is missing required flags for the given action.' - }, - { - code: 6036 - name: 'QueueAtCapacity' - msg: 'Oracle queue is at lease capacity.' - }, - { - code: 6037 - name: 'ExcessiveCrankRowsError' - msg: 'Data feed is already pushed on a crank.' - }, - { - code: 6038 - name: 'AggregatorLockedError' - msg: 'Aggregator is locked, no setting modifications or job additions allowed.' - }, - { - code: 6039 - name: 'AggregatorInvalidBatchSizeError' - msg: 'Aggregator invalid batch size.' - }, - { - code: 6040 - name: 'AggregatorJobChecksumMismatch' - msg: 'Oracle provided an incorrect aggregator job checksum.' - }, - { - code: 6041 - name: 'IntegerOverflowError' - msg: 'An integer overflow occurred.' - }, - { - code: 6042 - name: 'InvalidUpdatePeriodError' - msg: 'Minimum update period is 5 seconds.' - }, - { - code: 6043 - name: 'NoResultsError' - msg: 'Aggregator round evaluation attempted with no results.' - }, - { - code: 6044 - name: 'InvalidExpirationError' - msg: 'An expiration constraint was broken.' - }, - { - code: 6045 - name: 'InsufficientStakeError' - msg: 'An account provided insufficient stake for action.' - }, - { - code: 6046 - name: 'LeaseInactiveError' - msg: 'The provided lease account is not active.' - }, - { - code: 6047 - name: 'NoAggregatorJobsFound' - msg: 'No jobs are currently included in the aggregator.' - }, - { - code: 6048 - name: 'IntegerUnderflowError' - msg: 'An integer underflow occurred.' - }, - { - code: 6049 - name: 'OracleQueueMismatch' - msg: 'An invalid oracle queue account was provided.' - }, - { - code: 6050 - name: 'OracleWalletMismatchError' - msg: 'An unexpected oracle wallet account was provided for the transaction.' - }, - { - code: 6051 - name: 'InvalidBufferAccountError' - msg: 'An invalid buffer account was provided.' - }, - { - code: 6052 - name: 'InsufficientOracleQueueError' - msg: 'Insufficient oracle queue size.' - }, - { - code: 6053 - name: 'InvalidAuthorityError' - msg: 'Invalid authority account provided.' - }, - { - code: 6054 - name: 'InvalidTokenAccountMintError' - msg: 'A provided token wallet is associated with an incorrect mint.' - }, - { - code: 6055 - name: 'ExcessiveLeaseWithdrawlError' - msg: 'You must leave enough funds to perform at least 1 update in the lease.' - }, - { - code: 6056 - name: 'InvalideHistoryAccountError' - msg: 'Invalid history account provided.' - }, - { - code: 6057 - name: 'InvalidLeaseAccountEscrowError' - msg: 'Invalid lease account escrow.' - }, - { - code: 6058 - name: 'InvalidCrankAccountError' - msg: 'Invalid crank provided.' - }, - { - code: 6059 - name: 'CrankNoElementsReadyError' - msg: 'No elements ready to be popped.' - }, - { - code: 6060 - name: 'IndexOutOfBoundsError' - msg: 'Index out of bounds' - }, - { - code: 6061 - name: 'VrfInvalidRequestError' - msg: 'Invalid vrf request params' - }, - { - code: 6062 - name: 'VrfInvalidProofSubmissionError' - msg: 'Vrf proof failed to verify' - }, - { - code: 6063 - name: 'VrfVerifyError' - msg: 'Error in verifying vrf proof.' - }, - { - code: 6064 - name: 'VrfCallbackError' - msg: 'Vrf callback function failed.' - }, - { - code: 6065 - name: 'VrfCallbackParamsError' - msg: 'Invalid vrf callback params provided.' - }, - { - code: 6066 - name: 'VrfCallbackAlreadyCalledError' - msg: 'Vrf callback has already been triggered.' - }, - { - code: 6067 - name: 'VrfInvalidPubkeyError' - msg: 'The provided pubkey is invalid to use in ecvrf proofs' - }, - { - code: 6068 - name: 'VrfTooManyVerifyCallsError' - msg: 'Number of required verify calls exceeded' - }, - { - code: 6069 - name: 'VrfRequestAlreadyLaunchedError' - msg: 'Vrf request is already pending' - }, - { - code: 6070 - name: 'VrfInsufficientVerificationError' - msg: 'Insufficient amount of proofs collected for VRF callback' - }, - { - code: 6071 - name: 'InvalidVrfProducerError' - msg: 'An incorrect oracle attempted to submit a proof' - }, - { - code: 6072 - name: 'InvalidGovernancePidError' - msg: 'Invalid SPLGovernance Account Supplied' - }, - { - code: 6073 - name: 'InvalidGovernanceAccountError' - msg: 'An Invalid Governance Account was supplied' - }, - { - code: 6074 - name: 'MissingOptionalAccount' - msg: 'Expected an optional account' - }, - { - code: 6075 - name: 'InvalidSpawnRecordOwner' - msg: 'Invalid Owner for Spawn Record' - }, - { - code: 6076 - name: 'NoopError' - msg: 'Noop error' - }, - { - code: 6077 - name: 'MissingRequiredAccountsError' - msg: 'A required instruction account was not included' - }, - { - code: 6078 - name: 'InvalidMintError' - msg: 'Invalid mint account passed for instruction' - }, - { - code: 6079 - name: 'InvalidTokenAccountKeyError' - msg: 'An invalid token account was passed into the instruction' - }, - { - code: 6080 - name: 'InvalidJobAccountError' - msg: '' - } - ] -} - -export const IDL: Switchboard = { - version: '0.1.0', - name: 'switchboard_v2', - instructions: [ - { - name: 'aggregatorAddJob', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - { - name: 'job', - isMut: true, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorAddJobParams', - }, - }, - ], - }, - { - name: 'aggregatorInit', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: false, - }, - { - name: 'queue', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorInitParams', - }, - }, - ], - }, - { - name: 'aggregatorLock', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: true, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorLockParams', - }, - }, - ], - }, - { - name: 'aggregatorOpenRound', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'lease', - isMut: true, - isSigner: false, - }, - { - name: 'oracleQueue', - isMut: true, - isSigner: false, - }, - { - name: 'queueAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'permission', - isMut: true, - isSigner: false, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'payoutWallet', - isMut: true, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'dataBuffer', - isMut: false, - isSigner: false, - }, - { - name: 'mint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorOpenRoundParams', - }, - }, - ], - }, - { - name: 'aggregatorRemoveJob', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - { - name: 'job', - isMut: true, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorRemoveJobParams', - }, - }, - ], - }, - { - name: 'aggregatorSaveResult', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'oracle', - isMut: true, - isSigner: false, - }, - { - name: 'oracleAuthority', - isMut: false, - isSigner: true, - }, - { - name: 'oracleQueue', - isMut: false, - isSigner: false, - }, - { - name: 'queueAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'feedPermission', - isMut: true, - isSigner: false, - }, - { - name: 'oraclePermission', - isMut: false, - isSigner: false, - }, - { - name: 'lease', - isMut: true, - isSigner: false, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'historyBuffer', - isMut: true, - isSigner: false, - }, - { - name: 'mint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSaveResultParams', - }, - }, - ], - }, - { - name: 'aggregatorSetAuthority', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - { - name: 'newAuthority', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSetAuthorityParams', - }, - }, - ], - }, - { - name: 'aggregatorSetBatchSize', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSetBatchSizeParams', - }, - }, - ], - }, - { - name: 'aggregatorSetHistoryBuffer', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - { - name: 'buffer', - isMut: true, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSetHistoryBufferParams', - }, - }, - ], - }, - { - name: 'aggregatorSetMinJobs', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSetMinJobsParams', - }, - }, - ], - }, - { - name: 'aggregatorSetMinOracles', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSetMinOraclesParams', - }, - }, - ], - }, - { - name: 'aggregatorSetQueue', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - { - name: 'queue', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSetQueueParams', - }, - }, - ], - }, - { - name: 'aggregatorSetUpdateInterval', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSetUpdateIntervalParams', - }, - }, - ], - }, - { - name: 'aggregatorSetVarianceThreshold', - accounts: [ - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'AggregatorSetVarianceThresholdParams', - }, - }, - ], - }, - { - name: 'crankInit', - accounts: [ - { - name: 'crank', - isMut: true, - isSigner: true, - }, - { - name: 'queue', - isMut: false, - isSigner: false, - }, - { - name: 'buffer', - isMut: true, - isSigner: false, - }, - { - name: 'payer', - isMut: true, - isSigner: false, - }, - { - name: 'systemProgram', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'CrankInitParams', - }, - }, - ], - }, - { - name: 'crankPop', - accounts: [ - { - name: 'crank', - isMut: true, - isSigner: false, - }, - { - name: 'oracleQueue', - isMut: true, - isSigner: false, - }, - { - name: 'queueAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'payoutWallet', - isMut: true, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'crankDataBuffer', - isMut: true, - isSigner: false, - }, - { - name: 'queueDataBuffer', - isMut: false, - isSigner: false, - }, - { - name: 'mint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'CrankPopParams', - }, - }, - ], - }, - { - name: 'crankPush', - accounts: [ - { - name: 'crank', - isMut: true, - isSigner: false, - }, - { - name: 'aggregator', - isMut: true, - isSigner: false, - }, - { - name: 'oracleQueue', - isMut: true, - isSigner: false, - }, - { - name: 'queueAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'permission', - isMut: false, - isSigner: false, - }, - { - name: 'lease', - isMut: true, - isSigner: false, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'dataBuffer', - isMut: true, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'CrankPushParams', - }, - }, - ], - }, - { - name: 'jobInit', - accounts: [ - { - name: 'job', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'JobInitParams', - }, - }, - ], - }, - { - name: 'leaseExtend', - accounts: [ - { - name: 'lease', - isMut: true, - isSigner: false, - }, - { - name: 'aggregator', - isMut: false, - isSigner: false, - }, - { - name: 'queue', - isMut: false, - isSigner: false, - }, - { - name: 'funder', - isMut: true, - isSigner: false, - }, - { - name: 'owner', - isMut: true, - isSigner: true, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'mint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'LeaseExtendParams', - }, - }, - ], - }, - { - name: 'leaseInit', - accounts: [ - { - name: 'lease', - isMut: true, - isSigner: false, - }, - { - name: 'queue', - isMut: true, - isSigner: false, - }, - { - name: 'aggregator', - isMut: false, - isSigner: false, - }, - { - name: 'funder', - isMut: true, - isSigner: false, - }, - { - name: 'payer', - isMut: true, - isSigner: true, - }, - { - name: 'systemProgram', - isMut: false, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'owner', - isMut: true, - isSigner: true, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'mint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'LeaseInitParams', - }, - }, - ], - }, - { - name: 'leaseSetAuthority', - accounts: [ - { - name: 'lease', - isMut: true, - isSigner: false, - }, - { - name: 'withdrawAuthority', - isMut: false, - isSigner: true, - }, - { - name: 'newAuthority', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'LeaseSetAuthorityParams', - }, - }, - ], - }, - { - name: 'leaseWithdraw', - accounts: [ - { - name: 'lease', - isMut: true, - isSigner: false, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'aggregator', - isMut: false, - isSigner: false, - }, - { - name: 'queue', - isMut: false, - isSigner: false, - }, - { - name: 'withdrawAuthority', - isMut: false, - isSigner: true, - }, - { - name: 'withdrawAccount', - isMut: true, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'mint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'LeaseWithdrawParams', - }, - }, - ], - }, - { - name: 'oracleHeartbeat', - accounts: [ - { - name: 'oracle', - isMut: true, - isSigner: false, - }, - { - name: 'oracleAuthority', - isMut: false, - isSigner: true, - }, - { - name: 'tokenAccount', - isMut: false, - isSigner: false, - }, - { - name: 'gcOracle', - isMut: true, - isSigner: false, - }, - { - name: 'oracleQueue', - isMut: true, - isSigner: false, - }, - { - name: 'permission', - isMut: false, - isSigner: false, - }, - { - name: 'dataBuffer', - isMut: true, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'OracleHeartbeatParams', - }, - }, - ], - }, - { - name: 'oracleInit', - accounts: [ - { - name: 'oracle', - isMut: true, - isSigner: false, - }, - { - name: 'oracleAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'wallet', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'queue', - isMut: false, - isSigner: false, - }, - { - name: 'payer', - isMut: true, - isSigner: false, - }, - { - name: 'systemProgram', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'OracleInitParams', - }, - }, - ], - }, - { - name: 'oracleQueueInit', - accounts: [ - { - name: 'oracleQueue', - isMut: true, - isSigner: true, - }, - { - name: 'authority', - isMut: false, - isSigner: false, - }, - { - name: 'buffer', - isMut: true, - isSigner: false, - }, - { - name: 'payer', - isMut: true, - isSigner: false, - }, - { - name: 'systemProgram', - isMut: false, - isSigner: false, - }, - { - name: 'mint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'OracleQueueInitParams', - }, - }, - ], - }, - { - name: 'oracleQueueSetRewards', - accounts: [ - { - name: 'queue', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'OracleQueueSetRewardsParams', - }, - }, - ], - }, - { - name: 'oracleQueueVrfConfig', - accounts: [ - { - name: 'queue', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'OracleQueueVrfConfigParams', - }, - }, - ], - }, - { - name: 'oracleWithdraw', - accounts: [ - { - name: 'oracle', - isMut: true, - isSigner: false, - }, - { - name: 'oracleAuthority', - isMut: false, - isSigner: true, - }, - { - name: 'tokenAccount', - isMut: true, - isSigner: false, - }, - { - name: 'withdrawAccount', - isMut: true, - isSigner: false, - }, - { - name: 'oracleQueue', - isMut: true, - isSigner: false, - }, - { - name: 'permission', - isMut: true, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'payer', - isMut: true, - isSigner: true, - }, - { - name: 'systemProgram', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'OracleWithdrawParams', - }, - }, - ], - }, - { - name: 'permissionInit', - accounts: [ - { - name: 'permission', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: false, - }, - { - name: 'granter', - isMut: false, - isSigner: false, - }, - { - name: 'grantee', - isMut: false, - isSigner: false, - }, - { - name: 'payer', - isMut: true, - isSigner: true, - }, - { - name: 'systemProgram', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'PermissionInitParams', - }, - }, - ], - }, - { - name: 'permissionSet', - accounts: [ - { - name: 'permission', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'PermissionSetParams', - }, - }, - ], - }, - { - name: 'permissionSetVoterWeight', - accounts: [ - { - name: 'permission', - isMut: false, - isSigner: false, - }, - { - name: 'permissionAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'oracle', - isMut: false, - isSigner: false, - }, - { - name: 'oracleAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'payer', - isMut: true, - isSigner: true, - }, - { - name: 'systemProgram', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'govProgram', - isMut: false, - isSigner: false, - }, - { - name: 'daoMint', - isMut: false, - isSigner: false, - }, - { - name: 'spawnRecord', - isMut: true, - isSigner: false, - }, - { - name: 'voterWeight', - isMut: true, - isSigner: false, - }, - { - name: 'tokenOwnerRecord', - isMut: true, - isSigner: false, - }, - { - name: 'realm', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'PermissionSetVoterWeightParams', - }, - }, - ], - }, - { - name: 'programConfig', - accounts: [ - { - name: 'authority', - isMut: false, - isSigner: true, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'daoMint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'ProgramConfigParams', - }, - }, - ], - }, - { - name: 'programInit', - accounts: [ - { - name: 'state', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: false, - }, - { - name: 'tokenMint', - isMut: true, - isSigner: false, - }, - { - name: 'vault', - isMut: true, - isSigner: false, - }, - { - name: 'payer', - isMut: true, - isSigner: false, - }, - { - name: 'systemProgram', - isMut: false, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'daoMint', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'ProgramInitParams', - }, - }, - ], - }, - { - name: 'vaultTransfer', - accounts: [ - { - name: 'state', - isMut: false, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: true, - }, - { - name: 'to', - isMut: true, - isSigner: false, - }, - { - name: 'vault', - isMut: true, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'VaultTransferParams', - }, - }, - ], - }, - { - name: 'vrfInit', - accounts: [ - { - name: 'vrf', - isMut: true, - isSigner: false, - }, - { - name: 'authority', - isMut: false, - isSigner: false, - }, - { - name: 'oracleQueue', - isMut: false, - isSigner: false, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'VrfInitParams', - }, - }, - ], - }, - { - name: 'vrfProve', - accounts: [ - { - name: 'vrf', - isMut: true, - isSigner: false, - }, - { - name: 'oracle', - isMut: false, - isSigner: false, - }, - { - name: 'randomnessProducer', - isMut: false, - isSigner: true, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'VrfProveParams', - }, - }, - ], - }, - { - name: 'vrfProveAndVerify', - accounts: [ - { - name: 'vrf', - isMut: true, - isSigner: false, - }, - { - name: 'callbackPid', - isMut: false, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'oracle', - isMut: false, - isSigner: false, - }, - { - name: 'oracleAuthority', - isMut: false, - isSigner: true, - }, - { - name: 'oracleWallet', - isMut: true, - isSigner: false, - }, - { - name: 'instructionsSysvar', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'VrfProveAndVerifyParams', - }, - }, - ], - }, - { - name: 'vrfRequestRandomness', - accounts: [ - { - name: 'authority', - isMut: false, - isSigner: true, - }, - { - name: 'vrf', - isMut: true, - isSigner: false, - }, - { - name: 'oracleQueue', - isMut: true, - isSigner: false, - }, - { - name: 'queueAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'dataBuffer', - isMut: false, - isSigner: false, - }, - { - name: 'permission', - isMut: true, - isSigner: false, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'payerWallet', - isMut: true, - isSigner: false, - }, - { - name: 'payerAuthority', - isMut: false, - isSigner: true, - }, - { - name: 'recentBlockhashes', - isMut: false, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'VrfRequestRandomnessParams', - }, - }, - ], - }, - { - name: 'vrfVerify', - accounts: [ - { - name: 'vrf', - isMut: true, - isSigner: false, - }, - { - name: 'callbackPid', - isMut: false, - isSigner: false, - }, - { - name: 'tokenProgram', - isMut: false, - isSigner: false, - }, - { - name: 'escrow', - isMut: true, - isSigner: false, - }, - { - name: 'programState', - isMut: false, - isSigner: false, - }, - { - name: 'oracle', - isMut: false, - isSigner: false, - }, - { - name: 'oracleAuthority', - isMut: false, - isSigner: false, - }, - { - name: 'oracleWallet', - isMut: true, - isSigner: false, - }, - { - name: 'instructionsSysvar', - isMut: false, - isSigner: false, - }, - ], - args: [ - { - name: 'params', - type: { - defined: 'VrfVerifyParams', - }, - }, - ], - }, - ], - accounts: [ - { - name: 'SbState', - type: { - kind: 'struct', - fields: [ - { - name: 'authority', - type: 'publicKey', - }, - { - name: 'tokenMint', - type: 'publicKey', - }, - { - name: 'tokenVault', - type: 'publicKey', - }, - { - name: 'daoMint', - type: 'publicKey', - }, - { - name: 'ebuf', - type: { - array: ['u8', 992], - }, - }, - ], - }, - }, - { - name: 'AggregatorAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: { - array: ['u8', 32], - }, - }, - { - name: 'metadata', - type: { - array: ['u8', 128], - }, - }, - { - name: 'reserved1', - type: { - array: ['u8', 32], - }, - }, - { - name: 'queuePubkey', - type: 'publicKey', - }, - { - name: 'oracleRequestBatchSize', - type: 'u32', - }, - { - name: 'minOracleResults', - type: 'u32', - }, - { - name: 'minJobResults', - type: 'u32', - }, - { - name: 'minUpdateDelaySeconds', - type: 'u32', - }, - { - name: 'startAfter', - type: 'i64', - }, - { - name: 'varianceThreshold', - type: { - defined: 'SwitchboardDecimal', - }, - }, - { - name: 'forceReportPeriod', - type: 'i64', - }, - { - name: 'expiration', - type: 'i64', - }, - { - name: 'consecutiveFailureCount', - type: 'u64', - }, - { - name: 'nextAllowedUpdateTime', - type: 'i64', - }, - { - name: 'isLocked', - type: 'bool', - }, - { - name: 'crankPubkey', - type: 'publicKey', - }, - { - name: 'latestConfirmedRound', - type: { - defined: 'AggregatorRound', - }, - }, - { - name: 'currentRound', - type: { - defined: 'AggregatorRound', - }, - }, - { - name: 'jobPubkeysData', - type: { - array: ['publicKey', 16], - }, - }, - { - name: 'jobHashes', - type: { - array: [ - { - defined: 'Hash', - }, - 16, - ], - }, - }, - { - name: 'jobPubkeysSize', - type: 'u32', - }, - { - name: 'jobsChecksum', - type: { - array: ['u8', 32], - }, - }, - { - name: 'authority', - type: 'publicKey', - }, - { - name: 'historyBuffer', - type: 'publicKey', - }, - { - name: 'previousConfirmedRoundResult', - type: { - defined: 'SwitchboardDecimal', - }, - }, - { - name: 'previousConfirmedRoundSlot', - type: 'u64', - }, - { - name: 'disableCrank', - type: 'bool', - }, - { - name: 'jobWeights', - type: { - array: ['u8', 16], - }, - }, - { - name: 'ebuf', - type: { - array: ['u8', 147], - }, - }, - ], - }, - }, - { - name: 'PermissionAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'authority', - type: 'publicKey', - }, - { - name: 'permissions', - type: 'u32', - }, - { - name: 'granter', - type: 'publicKey', - }, - { - name: 'grantee', - type: 'publicKey', - }, - { - name: 'expiration', - type: 'i64', - }, - { - name: 'ebuf', - type: { - array: ['u8', 256], - }, - }, - ], - }, - }, - { - name: 'RealmSpawnRecordAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'ebuf', - type: { - array: ['u8', 256], - }, - }, - ], - }, - }, - { - name: 'LeaseAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'escrow', - type: 'publicKey', - }, - { - name: 'queue', - type: 'publicKey', - }, - { - name: 'aggregator', - type: 'publicKey', - }, - { - name: 'tokenProgram', - type: 'publicKey', - }, - { - name: 'isActive', - type: 'bool', - }, - { - name: 'crankRowCount', - type: 'u32', - }, - { - name: 'createdAt', - type: 'i64', - }, - { - name: 'updateCount', - type: 'u128', - }, - { - name: 'withdrawAuthority', - type: 'publicKey', - }, - { - name: 'ebuf', - type: { - array: ['u8', 256], - }, - }, - ], - }, - }, - { - name: 'OracleQueueAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: { - array: ['u8', 32], - }, - }, - { - name: 'metadata', - type: { - array: ['u8', 64], - }, - }, - { - name: 'authority', - type: 'publicKey', - }, - { - name: 'oracleTimeout', - type: 'u32', - }, - { - name: 'reward', - type: 'u64', - }, - { - name: 'minStake', - type: 'u64', - }, - { - name: 'slashingEnabled', - type: 'bool', - }, - { - name: 'varianceToleranceMultiplier', - type: { - defined: 'SwitchboardDecimal', - }, - }, - { - name: 'feedProbationPeriod', - type: 'u32', - }, - { - name: 'currIdx', - type: 'u32', - }, - { - name: 'size', - type: 'u32', - }, - { - name: 'gcIdx', - type: 'u32', - }, - { - name: 'consecutiveFeedFailureLimit', - type: 'u64', - }, - { - name: 'consecutiveOracleFailureLimit', - type: 'u64', - }, - { - name: 'unpermissionedFeedsEnabled', - type: 'bool', - }, - { - name: 'unpermissionedVrfEnabled', - type: 'bool', - }, - { - name: 'curatorRewardCut', - type: { - defined: 'SwitchboardDecimal', - }, - }, - { - name: 'lockLeaseFunding', - type: 'bool', - }, - { - name: 'mint', - type: 'publicKey', - }, - { - name: 'ebuf', - type: { - array: ['u8', 969], - }, - }, - { - name: 'maxSize', - type: 'u32', - }, - { - name: 'dataBuffer', - type: 'publicKey', - }, - ], - }, - }, - { - name: 'CrankAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: { - array: ['u8', 32], - }, - }, - { - name: 'metadata', - type: { - array: ['u8', 64], - }, - }, - { - name: 'queuePubkey', - type: 'publicKey', - }, - { - name: 'pqSize', - type: 'u32', - }, - { - name: 'maxRows', - type: 'u32', - }, - { - name: 'jitterModifier', - type: 'u8', - }, - { - name: 'ebuf', - type: { - array: ['u8', 255], - }, - }, - { - name: 'dataBuffer', - type: 'publicKey', - }, - ], - }, - }, - { - name: 'OracleAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: { - array: ['u8', 32], - }, - }, - { - name: 'metadata', - type: { - array: ['u8', 128], - }, - }, - { - name: 'oracleAuthority', - type: 'publicKey', - }, - { - name: 'lastHeartbeat', - type: 'i64', - }, - { - name: 'numInUse', - type: 'u32', - }, - { - name: 'tokenAccount', - type: 'publicKey', - }, - { - name: 'queuePubkey', - type: 'publicKey', - }, - { - name: 'metrics', - type: { - defined: 'OracleMetrics', - }, - }, - { - name: 'ebuf', - type: { - array: ['u8', 256], - }, - }, - ], - }, - }, - { - name: 'JobAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: { - array: ['u8', 32], - }, - }, - { - name: 'metadata', - type: { - array: ['u8', 64], - }, - }, - { - name: 'authority', - type: 'publicKey', - }, - { - name: 'expiration', - type: 'i64', - }, - { - name: 'hash', - type: { - array: ['u8', 32], - }, - }, - { - name: 'data', - type: 'bytes', - }, - { - name: 'referenceCount', - type: 'u32', - }, - { - name: 'totalSpent', - type: 'u64', - }, - { - name: 'createdAt', - type: 'i64', - }, - ], - }, - }, - { - name: 'VrfAccountData', - type: { - kind: 'struct', - fields: [ - { - name: 'status', - type: { - defined: 'VrfStatus', - }, - }, - { - name: 'counter', - type: 'u128', - }, - { - name: 'authority', - type: 'publicKey', - }, - { - name: 'oracleQueue', - type: 'publicKey', - }, - { - name: 'escrow', - type: 'publicKey', - }, - { - name: 'callback', - type: { - defined: 'CallbackZC', - }, - }, - { - name: 'batchSize', - type: 'u32', - }, - { - name: 'builders', - type: { - array: [ - { - defined: 'VrfBuilder', - }, - 8, - ], - }, - }, - { - name: 'buildersLen', - type: 'u32', - }, - { - name: 'testMode', - type: 'bool', - }, - { - name: 'currentRound', - type: { - defined: 'VrfRound', - }, - }, - { - name: 'ebuf', - type: { - array: ['u8', 1024], - }, - }, - ], - }, - }, - ], - types: [ - { - name: 'AggregatorAddJobParams', - type: { - kind: 'struct', - fields: [ - { - name: 'weight', - type: { - option: 'u8', - }, - }, - ], - }, - }, - { - name: 'AggregatorInitParams', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: { - array: ['u8', 32], - }, - }, - { - name: 'metadata', - type: { - array: ['u8', 128], - }, - }, - { - name: 'batchSize', - type: 'u32', - }, - { - name: 'minOracleResults', - type: 'u32', - }, - { - name: 'minJobResults', - type: 'u32', - }, - { - name: 'minUpdateDelaySeconds', - type: 'u32', - }, - { - name: 'startAfter', - type: 'i64', - }, - { - name: 'varianceThreshold', - type: { - defined: 'BorshDecimal', - }, - }, - { - name: 'forceReportPeriod', - type: 'i64', - }, - { - name: 'expiration', - type: 'i64', - }, - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'disableCrank', - type: 'bool', - }, - ], - }, - }, - { - name: 'AggregatorLockParams', - type: { - kind: 'struct', - fields: [], - }, - }, - { - name: 'AggregatorOpenRoundParams', - type: { - kind: 'struct', - fields: [ - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'leaseBump', - type: 'u8', - }, - { - name: 'permissionBump', - type: 'u8', - }, - { - name: 'jitter', - type: 'u8', - }, - ], - }, - }, - { - name: 'AggregatorRemoveJobParams', - type: { - kind: 'struct', - fields: [ - { - name: 'jobIdx', - type: 'u32', - }, - ], - }, - }, - { - name: 'AggregatorSaveResultParams', - type: { - kind: 'struct', - fields: [ - { - name: 'oracleIdx', - type: 'u32', - }, - { - name: 'error', - type: 'bool', - }, - { - name: 'value', - type: { - defined: 'BorshDecimal', - }, - }, - { - name: 'jobsChecksum', - type: { - array: ['u8', 32], - }, - }, - { - name: 'minResponse', - type: { - defined: 'BorshDecimal', - }, - }, - { - name: 'maxResponse', - type: { - defined: 'BorshDecimal', - }, - }, - { - name: 'feedPermissionBump', - type: 'u8', - }, - { - name: 'oraclePermissionBump', - type: 'u8', - }, - { - name: 'leaseBump', - type: 'u8', - }, - { - name: 'stateBump', - type: 'u8', - }, - ], - }, - }, - { - name: 'AggregatorSetAuthorityParams', - type: { - kind: 'struct', - fields: [], - }, - }, - { - name: 'AggregatorSetBatchSizeParams', - type: { - kind: 'struct', - fields: [ - { - name: 'batchSize', - type: 'u32', - }, - ], - }, - }, - { - name: 'AggregatorSetHistoryBufferParams', - type: { - kind: 'struct', - fields: [], - }, - }, - { - name: 'AggregatorSetMinJobsParams', - type: { - kind: 'struct', - fields: [ - { - name: 'minJobResults', - type: 'u32', - }, - ], - }, - }, - { - name: 'AggregatorSetMinOraclesParams', - type: { - kind: 'struct', - fields: [ - { - name: 'minOracleResults', - type: 'u32', - }, - ], - }, - }, - { - name: 'AggregatorSetQueueParams', - type: { - kind: 'struct', - fields: [], - }, - }, - { - name: 'AggregatorSetUpdateIntervalParams', - type: { - kind: 'struct', - fields: [ - { - name: 'newInterval', - type: 'u32', - }, - ], - }, - }, - { - name: 'AggregatorSetVarianceThresholdParams', - type: { - kind: 'struct', - fields: [ - { - name: 'varianceThreshold', - type: { - defined: 'BorshDecimal', - }, - }, - ], - }, - }, - { - name: 'CrankInitParams', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: 'bytes', - }, - { - name: 'metadata', - type: 'bytes', - }, - { - name: 'crankSize', - type: 'u32', - }, - ], - }, - }, - { - name: 'CrankPopParams', - type: { - kind: 'struct', - fields: [ - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'leaseBumps', - type: 'bytes', - }, - { - name: 'permissionBumps', - type: 'bytes', - }, - { - name: 'nonce', - type: { - option: 'u32', - }, - }, - { - name: 'failOpenOnAccountMismatch', - type: { - option: 'bool', - }, - }, - ], - }, - }, - { - name: 'CrankPushParams', - type: { - kind: 'struct', - fields: [ - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'permissionBump', - type: 'u8', - }, - ], - }, - }, - { - name: 'JobInitParams', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: { - array: ['u8', 32], - }, - }, - { - name: 'expiration', - type: 'i64', - }, - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'data', - type: 'bytes', - }, - ], - }, - }, - { - name: 'LeaseExtendParams', - type: { - kind: 'struct', - fields: [ - { - name: 'loadAmount', - type: 'u64', - }, - { - name: 'leaseBump', - type: 'u8', - }, - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'walletBumps', - type: 'bytes', - }, - ], - }, - }, - { - name: 'LeaseInitParams', - type: { - kind: 'struct', - fields: [ - { - name: 'loadAmount', - type: 'u64', - }, - { - name: 'withdrawAuthority', - type: 'publicKey', - }, - { - name: 'leaseBump', - type: 'u8', - }, - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'walletBumps', - type: 'bytes', - }, - ], - }, - }, - { - name: 'LeaseSetAuthorityParams', - type: { - kind: 'struct', - fields: [], - }, - }, - { - name: 'LeaseWithdrawParams', - type: { - kind: 'struct', - fields: [ - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'leaseBump', - type: 'u8', - }, - { - name: 'amount', - type: 'u64', - }, - ], - }, - }, - { - name: 'OracleHeartbeatParams', - type: { - kind: 'struct', - fields: [ - { - name: 'permissionBump', - type: 'u8', - }, - ], - }, - }, - { - name: 'OracleInitParams', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: 'bytes', - }, - { - name: 'metadata', - type: 'bytes', - }, - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'oracleBump', - type: 'u8', - }, - ], - }, - }, - { - name: 'OracleQueueInitParams', - type: { - kind: 'struct', - fields: [ - { - name: 'name', - type: { - array: ['u8', 32], - }, - }, - { - name: 'metadata', - type: { - array: ['u8', 64], - }, - }, - { - name: 'reward', - type: 'u64', - }, - { - name: 'minStake', - type: 'u64', - }, - { - name: 'feedProbationPeriod', - type: 'u32', - }, - { - name: 'oracleTimeout', - type: 'u32', - }, - { - name: 'slashingEnabled', - type: 'bool', - }, - { - name: 'varianceToleranceMultiplier', - type: { - defined: 'BorshDecimal', - }, - }, - { - name: 'consecutiveFeedFailureLimit', - type: 'u64', - }, - { - name: 'consecutiveOracleFailureLimit', - type: 'u64', - }, - { - name: 'queueSize', - type: 'u32', - }, - { - name: 'unpermissionedFeeds', - type: 'bool', - }, - { - name: 'unpermissionedVrf', - type: 'bool', - }, - ], - }, - }, - { - name: 'OracleQueueSetRewardsParams', - type: { - kind: 'struct', - fields: [ - { - name: 'rewards', - type: 'u64', - }, - ], - }, - }, - { - name: 'OracleQueueVrfConfigParams', - type: { - kind: 'struct', - fields: [ - { - name: 'unpermissionedVrfEnabled', - type: 'bool', - }, - ], - }, - }, - { - name: 'OracleWithdrawParams', - type: { - kind: 'struct', - fields: [ - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'permissionBump', - type: 'u8', - }, - { - name: 'amount', - type: 'u64', - }, - ], - }, - }, - { - name: 'PermissionInitParams', - type: { - kind: 'struct', - fields: [], - }, - }, - { - name: 'PermissionSetParams', - type: { - kind: 'struct', - fields: [ - { - name: 'permission', - type: { - defined: 'SwitchboardPermission', - }, - }, - { - name: 'enable', - type: 'bool', - }, - ], - }, - }, - { - name: 'PermissionSetVoterWeightParams', - type: { - kind: 'struct', - fields: [ - { - name: 'stateBump', - type: 'u8', - }, - ], - }, - }, - { - name: 'ProgramConfigParams', - type: { - kind: 'struct', - fields: [ - { - name: 'token', - type: 'publicKey', - }, - { - name: 'bump', - type: 'u8', - }, - { - name: 'daoMint', - type: 'publicKey', - }, - ], - }, - }, - { - name: 'ProgramInitParams', - type: { - kind: 'struct', - fields: [ - { - name: 'stateBump', - type: 'u8', - }, - ], - }, - }, - { - name: 'VaultTransferParams', - type: { - kind: 'struct', - fields: [ - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'amount', - type: 'u64', - }, - ], - }, - }, - { - name: 'VrfInitParams', - type: { - kind: 'struct', - fields: [ - { - name: 'callback', - type: { - defined: 'Callback', - }, - }, - { - name: 'stateBump', - type: 'u8', - }, - ], - }, - }, - { - name: 'VrfProveParams', - type: { - kind: 'struct', - fields: [ - { - name: 'proof', - type: 'bytes', - }, - { - name: 'idx', - type: 'u32', - }, - ], - }, - }, - { - name: 'VrfProveAndVerifyParams', - type: { - kind: 'struct', - fields: [ - { - name: 'nonce', - type: { - option: 'u32', - }, - }, - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'idx', - type: 'u32', - }, - { - name: 'proof', - type: 'bytes', - }, - ], - }, - }, - { - name: 'VrfRequestRandomnessParams', - type: { - kind: 'struct', - fields: [ - { - name: 'permissionBump', - type: 'u8', - }, - { - name: 'stateBump', - type: 'u8', - }, - ], - }, - }, - { - name: 'VrfVerifyParams', - type: { - kind: 'struct', - fields: [ - { - name: 'nonce', - type: { - option: 'u32', - }, - }, - { - name: 'stateBump', - type: 'u8', - }, - { - name: 'idx', - type: 'u32', - }, - ], - }, - }, - { - name: 'Hash', - type: { - kind: 'struct', - fields: [ - { - name: 'data', - type: { - array: ['u8', 32], - }, - }, - ], - }, - }, - { - name: 'AggregatorRound', - type: { - kind: 'struct', - fields: [ - { - name: 'numSuccess', - type: 'u32', - }, - { - name: 'numError', - type: 'u32', - }, - { - name: 'isClosed', - type: 'bool', - }, - { - name: 'roundOpenSlot', - type: 'u64', - }, - { - name: 'roundOpenTimestamp', - type: 'i64', - }, - { - name: 'result', - type: { - defined: 'SwitchboardDecimal', - }, - }, - { - name: 'stdDeviation', - type: { - defined: 'SwitchboardDecimal', - }, - }, - { - name: 'minResponse', - type: { - defined: 'SwitchboardDecimal', - }, - }, - { - name: 'maxResponse', - type: { - defined: 'SwitchboardDecimal', - }, - }, - { - name: 'oraclePubkeysData', - type: { - array: ['publicKey', 16], - }, - }, - { - name: 'mediansData', - type: { - array: [ - { - defined: 'SwitchboardDecimal', - }, - 16, - ], - }, - }, - { - name: 'currentPayout', - type: { - array: ['i64', 16], - }, - }, - { - name: 'mediansFulfilled', - type: { - array: ['bool', 16], - }, - }, - { - name: 'errorsFulfilled', - type: { - array: ['bool', 16], - }, - }, - ], - }, - }, - { - name: 'AggregatorHistoryRow', - type: { - kind: 'struct', - fields: [ - { - name: 'timestamp', - type: 'i64', - }, - { - name: 'value', - type: { - defined: 'SwitchboardDecimal', - }, - }, - ], - }, - }, - { - name: 'SwitchboardDecimal', - type: { - kind: 'struct', - fields: [ - { - name: 'mantissa', - type: 'i128', - }, - { - name: 'scale', - type: 'u32', - }, - ], - }, - }, - { - name: 'CrankRow', - type: { - kind: 'struct', - fields: [ - { - name: 'pubkey', - type: 'publicKey', - }, - { - name: 'nextTimestamp', - type: 'i64', - }, - ], - }, - }, - { - name: 'OracleMetrics', - type: { - kind: 'struct', - fields: [ - { - name: 'consecutiveSuccess', - type: 'u64', - }, - { - name: 'consecutiveError', - type: 'u64', - }, - { - name: 'consecutiveDisagreement', - type: 'u64', - }, - { - name: 'consecutiveLateResponse', - type: 'u64', - }, - { - name: 'consecutiveFailure', - type: 'u64', - }, - { - name: 'totalSuccess', - type: 'u128', - }, - { - name: 'totalError', - type: 'u128', - }, - { - name: 'totalDisagreement', - type: 'u128', - }, - { - name: 'totalLateResponse', - type: 'u128', - }, - ], - }, - }, - { - name: 'BorshDecimal', - type: { - kind: 'struct', - fields: [ - { - name: 'mantissa', - type: 'i128', - }, - { - name: 'scale', - type: 'u32', - }, - ], - }, - }, - { - name: 'EcvrfProofZC', - type: { - kind: 'struct', - fields: [ - { - name: 'gamma', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'c', - type: { - defined: 'Scalar', - }, - }, - { - name: 's', - type: { - defined: 'Scalar', - }, - }, - ], - }, - }, - { - name: 'Scalar', - type: { - kind: 'struct', - fields: [ - { - name: 'bytes', - type: { - array: ['u8', 32], - }, - }, - ], - }, - }, - { - name: 'FieldElementZC', - type: { - kind: 'struct', - fields: [ - { - name: 'bytes', - type: { - array: ['u64', 5], - }, - }, - ], - }, - }, - { - name: 'CompletedPointZC', - type: { - kind: 'struct', - fields: [ - { - name: 'x', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'y', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'z', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 't', - type: { - defined: 'FieldElementZC', - }, - }, - ], - }, - }, - { - name: 'EdwardsPointZC', - type: { - kind: 'struct', - fields: [ - { - name: 'x', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'y', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'z', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 't', - type: { - defined: 'FieldElementZC', - }, - }, - ], - }, - }, - { - name: 'ProjectivePointZC', - type: { - kind: 'struct', - fields: [ - { - name: 'x', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'y', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'z', - type: { - defined: 'FieldElementZC', - }, - }, - ], - }, - }, - { - name: 'EcvrfIntermediate', - type: { - kind: 'struct', - fields: [ - { - name: 'r', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'nS', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'd', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 't13', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 't15', - type: { - defined: 'FieldElementZC', - }, - }, - ], - }, - }, - { - name: 'VrfBuilder', - type: { - kind: 'struct', - fields: [ - { - name: 'producer', - type: 'publicKey', - }, - { - name: 'status', - type: { - defined: 'VrfStatus', - }, - }, - { - name: 'reprProof', - type: { - array: ['u8', 80], - }, - }, - { - name: 'proof', - type: { - defined: 'EcvrfProofZC', - }, - }, - { - name: 'yPoint', - type: 'publicKey', - }, - { - name: 'stage', - type: 'u32', - }, - { - name: 'stage1Out', - type: { - defined: 'EcvrfIntermediate', - }, - }, - { - name: 'r1', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'r2', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'stage3Out', - type: { - defined: 'EcvrfIntermediate', - }, - }, - { - name: 'hPoint', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'sReduced', - type: { - defined: 'Scalar', - }, - }, - { - name: 'yPointBuilder', - type: { - array: [ - { - defined: 'FieldElementZC', - }, - 3, - ], - }, - }, - { - name: 'yRistrettoPoint', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'mulRound', - type: 'u8', - }, - { - name: 'hashPointsRound', - type: 'u8', - }, - { - name: 'mulTmp1', - type: { - defined: 'CompletedPointZC', - }, - }, - { - name: 'uPoint1', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'uPoint2', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'vPoint1', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'vPoint2', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'uPoint', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'vPoint', - type: { - defined: 'EdwardsPointZC', - }, - }, - { - name: 'u1', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'u2', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'invertee', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'y', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'z', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'p1Bytes', - type: { - array: ['u8', 32], - }, - }, - { - name: 'p2Bytes', - type: { - array: ['u8', 32], - }, - }, - { - name: 'p3Bytes', - type: { - array: ['u8', 32], - }, - }, - { - name: 'p4Bytes', - type: { - array: ['u8', 32], - }, - }, - { - name: 'cPrimeHashbuf', - type: { - array: ['u8', 16], - }, - }, - { - name: 'm1', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'm2', - type: { - defined: 'FieldElementZC', - }, - }, - { - name: 'txRemaining', - type: 'u32', - }, - { - name: 'verified', - type: 'bool', - }, - { - name: 'result', - type: { - array: ['u8', 32], - }, - }, - ], - }, - }, - { - name: 'AccountMetaZC', - type: { - kind: 'struct', - fields: [ - { - name: 'pubkey', - type: 'publicKey', - }, - { - name: 'isSigner', - type: 'bool', - }, - { - name: 'isWritable', - type: 'bool', - }, - ], - }, - }, - { - name: 'AccountMetaBorsh', - type: { - kind: 'struct', - fields: [ - { - name: 'pubkey', - type: 'publicKey', - }, - { - name: 'isSigner', - type: 'bool', - }, - { - name: 'isWritable', - type: 'bool', - }, - ], - }, - }, - { - name: 'CallbackZC', - type: { - kind: 'struct', - fields: [ - { - name: 'programId', - type: 'publicKey', - }, - { - name: 'accounts', - type: { - array: [ - { - defined: 'AccountMetaZC', - }, - 32, - ], - }, - }, - { - name: 'accountsLen', - type: 'u32', - }, - { - name: 'ixData', - type: { - array: ['u8', 1024], - }, - }, - { - name: 'ixDataLen', - type: 'u32', - }, - ], - }, - }, - { - name: 'Callback', - type: { - kind: 'struct', - fields: [ - { - name: 'programId', - type: 'publicKey', - }, - { - name: 'accounts', - type: { - vec: { - defined: 'AccountMetaBorsh', - }, - }, - }, - { - name: 'ixData', - type: 'bytes', - }, - ], - }, - }, - { - name: 'VrfRound', - type: { - kind: 'struct', - fields: [ - { - name: 'alpha', - type: { - array: ['u8', 256], - }, - }, - { - name: 'alphaLen', - type: 'u32', - }, - { - name: 'requestSlot', - type: 'u64', - }, - { - name: 'requestTimestamp', - type: 'i64', - }, - { - name: 'result', - type: { - array: ['u8', 32], - }, - }, - { - name: 'numVerified', - type: 'u32', - }, - { - name: 'ebuf', - type: { - array: ['u8', 256], - }, - }, - ], - }, - }, - { - name: 'Lanes', - type: { - kind: 'enum', - variants: [ - { - name: 'C', - }, - { - name: 'D', - }, - { - name: 'AB', - }, - { - name: 'AC', - }, - { - name: 'CD', - }, - { - name: 'AD', - }, - { - name: 'BC', - }, - { - name: 'ABCD', - }, - ], - }, - }, - { - name: 'Shuffle', - type: { - kind: 'enum', - variants: [ - { - name: 'AAAA', - }, - { - name: 'BBBB', - }, - { - name: 'CACA', - }, - { - name: 'DBBD', - }, - { - name: 'ADDA', - }, - { - name: 'CBCB', - }, - { - name: 'ABAB', - }, - { - name: 'BADC', - }, - { - name: 'BACD', - }, - { - name: 'ABDC', - }, - ], - }, - }, - { - name: 'Shuffle', - type: { - kind: 'enum', - variants: [ - { - name: 'AAAA', - }, - { - name: 'BBBB', - }, - { - name: 'BADC', - }, - { - name: 'BACD', - }, - { - name: 'ADDA', - }, - { - name: 'CBCB', - }, - { - name: 'ABDC', - }, - { - name: 'ABAB', - }, - { - name: 'DBBD', - }, - { - name: 'CACA', - }, - ], - }, - }, - { - name: 'Lanes', - type: { - kind: 'enum', - variants: [ - { - name: 'D', - }, - { - name: 'C', - }, - { - name: 'AB', - }, - { - name: 'AC', - }, - { - name: 'AD', - }, - { - name: 'BCD', - }, - ], - }, - }, - { - name: 'Error', - type: { - kind: 'enum', - variants: [ - { - name: 'InvalidPublicKey', - }, - { - name: 'SerializationError', - fields: [ - { - defined: 'bincode::Error', - }, - ], - }, - { - name: 'DeserializationError', - fields: [ - { - defined: 'bincode::Error', - }, - ], - }, - { - name: 'InvalidDataError', - }, - ], - }, - }, - { - name: 'SwitchboardPermission', - type: { - kind: 'enum', - variants: [ - { - name: 'PermitOracleHeartbeat', - }, - { - name: 'PermitOracleQueueUsage', - }, - { - name: 'PermitVrfRequests', - }, - ], - }, - }, - { - name: 'OracleResponseType', - type: { - kind: 'enum', - variants: [ - { - name: 'TypeSuccess', - }, - { - name: 'TypeError', - }, - { - name: 'TypeDisagreement', - }, - { - name: 'TypeNoResponse', - }, - ], - }, - }, - { - name: 'VrfStatus', - type: { - kind: 'enum', - variants: [ - { - name: 'StatusNone', - }, - { - name: 'StatusRequesting', - }, - { - name: 'StatusVerifying', - }, - { - name: 'StatusVerified', - }, - { - name: 'StatusCallbackSuccess', - }, - { - name: 'StatusVerifyFailure', - }, - ], - }, - }, - ], - events: [ - { - name: 'AggregatorInitEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - ], - }, - { - name: 'VrfRequestRandomnessEvent', - fields: [ - { - name: 'vrfPubkey', - type: 'publicKey', - index: true, - }, - { - name: 'oraclePubkeys', - type: { - vec: 'publicKey', - }, - index: false, - }, - { - name: 'loadAmount', - type: 'u64', - index: false, - }, - { - name: 'existingAmount', - type: 'u64', - index: false, - }, - ], - }, - { - name: 'VrfRequestEvent', - fields: [ - { - name: 'vrfPubkey', - type: 'publicKey', - index: true, - }, - { - name: 'oraclePubkeys', - type: { - vec: 'publicKey', - }, - index: false, - }, - ], - }, - { - name: 'VrfProveEvent', - fields: [ - { - name: 'vrfPubkey', - type: 'publicKey', - index: true, - }, - { - name: 'oraclePubkey', - type: 'publicKey', - index: true, - }, - { - name: 'authorityPubkey', - type: 'publicKey', - index: false, - }, - ], - }, - { - name: 'VrfVerifyEvent', - fields: [ - { - name: 'vrfPubkey', - type: 'publicKey', - index: true, - }, - { - name: 'oraclePubkey', - type: 'publicKey', - index: true, - }, - { - name: 'authorityPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'amount', - type: 'u64', - index: false, - }, - ], - }, - { - name: 'VrfCallbackPerformedEvent', - fields: [ - { - name: 'vrfPubkey', - type: 'publicKey', - index: true, - }, - { - name: 'oraclePubkey', - type: 'publicKey', - index: true, - }, - { - name: 'amount', - type: 'u64', - index: false, - }, - ], - }, - { - name: 'AggregatorOpenRoundEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'oraclePubkeys', - type: { - vec: 'publicKey', - }, - index: false, - }, - { - name: 'jobPubkeys', - type: { - vec: 'publicKey', - }, - index: false, - }, - { - name: 'remainingFunds', - type: 'u64', - index: false, - }, - { - name: 'queueAuthority', - type: 'publicKey', - index: false, - }, - ], - }, - { - name: 'AggregatorValueUpdateEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'value', - type: { - defined: 'BorshDecimal', - }, - index: false, - }, - { - name: 'slot', - type: 'u64', - index: false, - }, - { - name: 'timestamp', - type: 'i64', - index: false, - }, - { - name: 'oraclePubkeys', - type: { - vec: 'publicKey', - }, - index: false, - }, - { - name: 'oracleValues', - type: { - vec: { - defined: 'BorshDecimal', - }, - }, - index: false, - }, - ], - }, - { - name: 'OracleRewardEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'leasePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'oraclePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'walletPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'amount', - type: 'u64', - index: false, - }, - { - name: 'roundSlot', - type: 'u64', - index: false, - }, - { - name: 'timestamp', - type: 'i64', - index: false, - }, - ], - }, - { - name: 'OracleWithdrawEvent', - fields: [ - { - name: 'oraclePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'walletPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'destinationWallet', - type: 'publicKey', - index: false, - }, - { - name: 'previousAmount', - type: 'u64', - index: false, - }, - { - name: 'newAmount', - type: 'u64', - index: false, - }, - { - name: 'timestamp', - type: 'i64', - index: false, - }, - ], - }, - { - name: 'LeaseWithdrawEvent', - fields: [ - { - name: 'leasePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'walletPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'previousAmount', - type: 'u64', - index: false, - }, - { - name: 'newAmount', - type: 'u64', - index: false, - }, - { - name: 'timestamp', - type: 'i64', - index: false, - }, - ], - }, - { - name: 'OracleSlashEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'leasePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'oraclePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'walletPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'amount', - type: 'u64', - index: false, - }, - { - name: 'roundSlot', - type: 'u64', - index: false, - }, - { - name: 'timestamp', - type: 'i64', - index: false, - }, - ], - }, - { - name: 'LeaseFundEvent', - fields: [ - { - name: 'leasePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'funder', - type: 'publicKey', - index: false, - }, - { - name: 'amount', - type: 'u64', - index: false, - }, - { - name: 'timestamp', - type: 'i64', - index: false, - }, - ], - }, - { - name: 'ProbationBrokenEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'queuePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'timestamp', - type: 'i64', - index: false, - }, - ], - }, - { - name: 'FeedPermissionRevokedEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'timestamp', - type: 'i64', - index: false, - }, - ], - }, - { - name: 'GarbageCollectFailureEvent', - fields: [ - { - name: 'queuePubkey', - type: 'publicKey', - index: false, - }, - ], - }, - { - name: 'OracleBootedEvent', - fields: [ - { - name: 'queuePubkey', - type: 'publicKey', - index: false, - }, - { - name: 'oraclePubkey', - type: 'publicKey', - index: false, - }, - ], - }, - { - name: 'CrankLeaseInsufficientFundsEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'leasePubkey', - type: 'publicKey', - index: false, - }, - ], - }, - { - name: 'CrankPopExpectedFailureEvent', - fields: [ - { - name: 'feedPubkey', - type: 'publicKey', - index: false, - }, - { - name: 'leasePubkey', - type: 'publicKey', - index: false, - }, - ], - }, - ], - errors: [ - { - code: 6000, - name: 'ArrayOperationError', - msg: 'Illegal operation on a Switchboard array.', - }, - { - code: 6001, - name: 'QueueOperationError', - msg: 'Illegal operation on a Switchboard queue.', - }, - { - code: 6002, - name: 'IncorrectProgramOwnerError', - msg: - 'An account required to be owned by the program has a different owner.', - }, - { - code: 6003, - name: 'InvalidAggregatorRound', - msg: 'Aggregator is not currently populated with a valid round.', - }, - { - code: 6004, - name: 'TooManyAggregatorJobs', - msg: 'Aggregator cannot fit any more jobs.', - }, - { - code: 6005, - name: 'AggregatorCurrentRoundClosed', - msg: - "Aggregator's current round is closed. No results are being accepted.", - }, - { - code: 6006, - name: 'AggregatorInvalidSaveResult', - msg: 'Aggregator received an invalid save result instruction.', - }, - { - code: 6007, - name: 'InvalidStrDecimalConversion', - msg: 'Failed to convert string to decimal format.', - }, - { - code: 6008, - name: 'AccountLoaderMissingSignature', - msg: 'AccountLoader account is missing a required signature.', - }, - { - code: 6009, - name: 'MissingRequiredSignature', - msg: 'Account is missing a required signature.', - }, - { - code: 6010, - name: 'ArrayOverflowError', - msg: 'The attempted action will overflow a zero-copy account array.', - }, - { - code: 6011, - name: 'ArrayUnderflowError', - msg: 'The attempted action will underflow a zero-copy account array.', - }, - { - code: 6012, - name: 'PubkeyNotFoundError', - msg: 'The queried public key was not found.', - }, - { - code: 6013, - name: 'AggregatorIllegalRoundOpenCall', - msg: 'Aggregator round open called too early.', - }, - { - code: 6014, - name: 'AggregatorIllegalRoundCloseCall', - msg: 'Aggregator round close called too early.', - }, - { - code: 6015, - name: 'AggregatorClosedError', - msg: 'Aggregator is closed. Illegal action.', - }, - { - code: 6016, - name: 'IllegalOracleIdxError', - msg: 'Illegal oracle index.', - }, - { - code: 6017, - name: 'OracleAlreadyRespondedError', - msg: 'The provided oracle has already responded this round.', - }, - { - code: 6018, - name: 'ProtoDeserializeError', - msg: 'Failed to deserialize protocol buffer.', - }, - { - code: 6019, - name: 'UnauthorizedStateUpdateError', - msg: 'Unauthorized program state modification attempted.', - }, - { - code: 6020, - name: 'MissingOracleAccountsError', - msg: 'Not enough oracle accounts provided to closeRounds.', - }, - { - code: 6021, - name: 'OracleMismatchError', - msg: 'An unexpected oracle account was provided for the transaction.', - }, - { - code: 6022, - name: 'CrankMaxCapacityError', - msg: "Attempted to push to a Crank that's at capacity", - }, - { - code: 6023, - name: 'AggregatorLeaseInsufficientFunds', - msg: - 'Aggregator update call attempted but attached lease has insufficient funds.', - }, - { - code: 6024, - name: 'IncorrectTokenAccountMint', - msg: - 'The provided token account does not point to the Switchboard token mint.', - }, - { - code: 6025, - name: 'InvalidEscrowAccount', - msg: 'An invalid escrow account was provided.', - }, - { - code: 6026, - name: 'CrankEmptyError', - msg: 'Crank empty. Pop failed.', - }, - { - code: 6027, - name: 'PdaDeriveError', - msg: 'Failed to derive a PDA from the provided seed.', - }, - { - code: 6028, - name: 'AggregatorAccountNotFound', - msg: 'Aggregator account missing from provided account list.', - }, - { - code: 6029, - name: 'PermissionAccountNotFound', - msg: 'Permission account missing from provided account list.', - }, - { - code: 6030, - name: 'LeaseAccountDeriveFailure', - msg: 'Failed to derive a lease account.', - }, - { - code: 6031, - name: 'PermissionAccountDeriveFailure', - msg: 'Failed to derive a permission account.', - }, - { - code: 6032, - name: 'EscrowAccountNotFound', - msg: 'Escrow account missing from provided account list.', - }, - { - code: 6033, - name: 'LeaseAccountNotFound', - msg: 'Lease account missing from provided account list.', - }, - { - code: 6034, - name: 'DecimalConversionError', - msg: 'Decimal conversion method failed.', - }, - { - code: 6035, - name: 'PermissionDenied', - msg: 'Permission account is missing required flags for the given action.', - }, - { - code: 6036, - name: 'QueueAtCapacity', - msg: 'Oracle queue is at lease capacity.', - }, - { - code: 6037, - name: 'ExcessiveCrankRowsError', - msg: 'Data feed is already pushed on a crank.', - }, - { - code: 6038, - name: 'AggregatorLockedError', - msg: - 'Aggregator is locked, no setting modifications or job additions allowed.', - }, - { - code: 6039, - name: 'AggregatorInvalidBatchSizeError', - msg: 'Aggregator invalid batch size.', - }, - { - code: 6040, - name: 'AggregatorJobChecksumMismatch', - msg: 'Oracle provided an incorrect aggregator job checksum.', - }, - { - code: 6041, - name: 'IntegerOverflowError', - msg: 'An integer overflow occurred.', - }, - { - code: 6042, - name: 'InvalidUpdatePeriodError', - msg: 'Minimum update period is 5 seconds.', - }, - { - code: 6043, - name: 'NoResultsError', - msg: 'Aggregator round evaluation attempted with no results.', - }, - { - code: 6044, - name: 'InvalidExpirationError', - msg: 'An expiration constraint was broken.', - }, - { - code: 6045, - name: 'InsufficientStakeError', - msg: 'An account provided insufficient stake for action.', - }, - { - code: 6046, - name: 'LeaseInactiveError', - msg: 'The provided lease account is not active.', - }, - { - code: 6047, - name: 'NoAggregatorJobsFound', - msg: 'No jobs are currently included in the aggregator.', - }, - { - code: 6048, - name: 'IntegerUnderflowError', - msg: 'An integer underflow occurred.', - }, - { - code: 6049, - name: 'OracleQueueMismatch', - msg: 'An invalid oracle queue account was provided.', - }, - { - code: 6050, - name: 'OracleWalletMismatchError', - msg: - 'An unexpected oracle wallet account was provided for the transaction.', - }, - { - code: 6051, - name: 'InvalidBufferAccountError', - msg: 'An invalid buffer account was provided.', - }, - { - code: 6052, - name: 'InsufficientOracleQueueError', - msg: 'Insufficient oracle queue size.', - }, - { - code: 6053, - name: 'InvalidAuthorityError', - msg: 'Invalid authority account provided.', - }, - { - code: 6054, - name: 'InvalidTokenAccountMintError', - msg: 'A provided token wallet is associated with an incorrect mint.', - }, - { - code: 6055, - name: 'ExcessiveLeaseWithdrawlError', - msg: - 'You must leave enough funds to perform at least 1 update in the lease.', - }, - { - code: 6056, - name: 'InvalideHistoryAccountError', - msg: 'Invalid history account provided.', - }, - { - code: 6057, - name: 'InvalidLeaseAccountEscrowError', - msg: 'Invalid lease account escrow.', - }, - { - code: 6058, - name: 'InvalidCrankAccountError', - msg: 'Invalid crank provided.', - }, - { - code: 6059, - name: 'CrankNoElementsReadyError', - msg: 'No elements ready to be popped.', - }, - { - code: 6060, - name: 'IndexOutOfBoundsError', - msg: 'Index out of bounds', - }, - { - code: 6061, - name: 'VrfInvalidRequestError', - msg: 'Invalid vrf request params', - }, - { - code: 6062, - name: 'VrfInvalidProofSubmissionError', - msg: 'Vrf proof failed to verify', - }, - { - code: 6063, - name: 'VrfVerifyError', - msg: 'Error in verifying vrf proof.', - }, - { - code: 6064, - name: 'VrfCallbackError', - msg: 'Vrf callback function failed.', - }, - { - code: 6065, - name: 'VrfCallbackParamsError', - msg: 'Invalid vrf callback params provided.', - }, - { - code: 6066, - name: 'VrfCallbackAlreadyCalledError', - msg: 'Vrf callback has already been triggered.', - }, - { - code: 6067, - name: 'VrfInvalidPubkeyError', - msg: 'The provided pubkey is invalid to use in ecvrf proofs', - }, - { - code: 6068, - name: 'VrfTooManyVerifyCallsError', - msg: 'Number of required verify calls exceeded', - }, - { - code: 6069, - name: 'VrfRequestAlreadyLaunchedError', - msg: 'Vrf request is already pending', - }, - { - code: 6070, - name: 'VrfInsufficientVerificationError', - msg: 'Insufficient amount of proofs collected for VRF callback', - }, - { - code: 6071, - name: 'InvalidVrfProducerError', - msg: 'An incorrect oracle attempted to submit a proof', - }, - { - code: 6072, - name: 'InvalidGovernancePidError', - msg: 'Invalid SPLGovernance Account Supplied', - }, - { - code: 6073, - name: 'InvalidGovernanceAccountError', - msg: 'An Invalid Governance Account was supplied', - }, - { - code: 6074, - name: 'MissingOptionalAccount', - msg: 'Expected an optional account', - }, - { - code: 6075, - name: 'InvalidSpawnRecordOwner', - msg: 'Invalid Owner for Spawn Record', - }, - { - code: 6076, - name: 'NoopError', - msg: 'Noop error', - }, - { - code: 6077, - name: 'MissingRequiredAccountsError', - msg: 'A required instruction account was not included', - }, - { - code: 6078, - name: 'InvalidMintError', - msg: 'Invalid mint account passed for instruction', - }, - { - code: 6079, - name: 'InvalidTokenAccountKeyError', - msg: 'An invalid token account was passed into the instruction', - }, - { - code: 6080, - name: 'InvalidJobAccountError', - msg: '', - }, - ], -} diff --git a/SwitchboardVotePlugin/SwitchboardQueueVoterClient.ts b/SwitchboardVotePlugin/SwitchboardQueueVoterClient.ts deleted file mode 100644 index 706cd4a9af..0000000000 --- a/SwitchboardVotePlugin/SwitchboardQueueVoterClient.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Program, Provider } from '@project-serum/anchor' -import { PublicKey, Transaction } from '@solana/web3.js' -import { Switchboard, IDL } from './SwitchboardIdl' -//import { NftVoter, IDL } from './nft_voter'; - -export const SWITCHBOARD_ID = new PublicKey( - '7PMP6yE6qb3XzBQr5TK2GhuruYayZzBnT8U92ySaLESC' -) - -export const SWITCHBOARD_ADDIN_ID = new PublicKey( - 'B4EDDdMh5CmB6B9DeMmZmFvRzEgyHR5zWktf6httcMk6' -) - -export const SWITCHBOARD_GRANT_AUTHORITY = new PublicKey( - '5wD32vPTeBk3UJfTCQUpa4KbrHZ5xxc8f4eLnqTPNW8L' -) - -export const SWITCHBOARD_REVOKE_AUTHORITY = new PublicKey( - '9rkK8T8wnYXZ1SSC6g2ZhbnyL5K5v546XSbNJv7og87b' -) - -export const QUEUE_LIST: PublicKey[] = [ - new PublicKey('7QN4mJo9U58XMeHEyfY6ckKxAkVLkqVtcWjwgNU6xaE'), -] - -export class SwitchboardQueueVoterClient { - constructor(public program: Program, public devnet?: boolean) {} - - static async connect( - provider: Provider, - devnet?: boolean - ): Promise { - // alternatively we could fetch from chain - // const idl = await Program.fetchIdl(VSR_ID, provider); - const idl = IDL - - return new SwitchboardQueueVoterClient( - new Program(idl as Switchboard, SWITCHBOARD_ID, provider), - devnet - ) - } -} - -export async function grantPermissionTx( - program: Program, - grantAuthority: PublicKey, - switchboardProgram: PublicKey, - permission: PublicKey -): Promise { - const [addinState] = await PublicKey.findProgramAddress( - [Buffer.from('state')], - program.programId - ) - - return await program.methods - .grantPermission() - .accounts({ - state: addinState, - grantAuthority: grantAuthority, - switchboardProgram: switchboardProgram, - permission: permission, - }) - .transaction() -} - -export async function revokePermissionTx( - program: Program, - revokeAuthority: PublicKey, - switchboardProgram: PublicKey, - permission: PublicKey -): Promise { - const [addinState] = await PublicKey.findProgramAddress( - [Buffer.from('state')], - program.programId - ) - - return await program.methods - .revokePermission() - .accounts({ - state: addinState, - revokeAuthority: revokeAuthority, - switchboardProgram: switchboardProgram, - permission: permission, - }) - .transaction() -} diff --git a/SwitchboardVotePlugin/gameofnodes.json b/SwitchboardVotePlugin/gameofnodes.json deleted file mode 100644 index 4008bed3d8..0000000000 --- a/SwitchboardVotePlugin/gameofnodes.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "version": "0.1.0", - "name": "gameofnodes", - "instructions": [ - { - "name": "initialize", - "accounts": [ - { - "name": "state", - "isMut": true, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "grantAuthority", - "type": "publicKey" - }, - { - "name": "revokeAuthority", - "type": "publicKey" - } - ] - }, - { - "name": "grantPermission", - "accounts": [ - { - "name": "state", - "isMut": false, - "isSigner": false - }, - { - "name": "grantAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "switchboardProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "permission", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "revokePermission", - "accounts": [ - { - "name": "state", - "isMut": false, - "isSigner": false - }, - { - "name": "revokeAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "switchboardProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "permission", - "isMut": true, - "isSigner": false - } - ], - "args": [] - }, - { - "name": "permissionSetVoterWeight", - "accounts": [ - { - "name": "permission", - "isMut": false, - "isSigner": false - }, - { - "name": "permissionAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "oracle", - "isMut": false, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "sbState", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "govProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "daoMint", - "isMut": false, - "isSigner": false - }, - { - "name": "spawnRecord", - "isMut": true, - "isSigner": false - }, - { - "name": "voterWeight", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenOwnerRecord", - "isMut": true, - "isSigner": false - }, - { - "name": "realm", - "isMut": false, - "isSigner": false - } - ], - "args": [] - } - ], - "accounts": [ - { - "name": "State", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "grantAuthority", - "type": "publicKey" - }, - { - "name": "revokeAuthority", - "type": "publicKey" - } - ] - } - }, - { - "name": "RealmSpawnRecordAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "spawner", - "type": "publicKey" - }, - { - "name": "spawnerPrivilege", - "type": "bool" - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 256] - } - } - ] - } - } - ], - "errors": [ - { - "code": 6000, - "name": "InvalidGovernanceAccountError", - "msg": "Invalid Governance Account" - } - ], - "metadata": { - "address": "B4EDDdMh5CmB6B9DeMmZmFvRzEgyHR5zWktf6httcMk6" - } -} diff --git a/SwitchboardVotePlugin/sdk/accounts.tsx b/SwitchboardVotePlugin/sdk/accounts.tsx deleted file mode 100644 index 93b610d766..0000000000 --- a/SwitchboardVotePlugin/sdk/accounts.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { PublicKey } from '@solana/web3.js' - -export const unusedMintPk = '11111111111111111111111111111111' - -export const getNftRegistrarPDA = async ( - realmPk: PublicKey, - mint: PublicKey, - clientProgramId: PublicKey -) => { - const [registrar, registrarBump] = await PublicKey.findProgramAddress( - [Buffer.from('registrar'), realmPk.toBuffer(), mint.toBuffer()], - clientProgramId - ) - return { - registrar, - registrarBump, - } -} - -export const getNftMaxVoterWeightRecord = async ( - realmPk: PublicKey, - mint: PublicKey, - clientProgramId: PublicKey -) => { - const [ - maxVoterWeightRecord, - maxVoterWeightRecordBump, - ] = await PublicKey.findProgramAddress( - [ - Buffer.from('max-voter-weight-record'), - realmPk.toBuffer(), - mint.toBuffer(), - ], - clientProgramId - ) - return { - maxVoterWeightRecord, - maxVoterWeightRecordBump, - } -} - -export const getNftVoterWeightRecord = async ( - realmPk: PublicKey, - mint: PublicKey, - walletPk: PublicKey, - clientProgramId: PublicKey -) => { - const [ - voterWeightPk, - voterWeightRecordBump, - ] = await PublicKey.findProgramAddress( - [ - Buffer.from('voter-weight-record'), - realmPk.toBuffer(), - mint.toBuffer(), - walletPk.toBuffer(), - ], - clientProgramId - ) - return { - voterWeightPk, - voterWeightRecordBump, - } -} diff --git a/SwitchboardVotePlugin/store/switchboardStore.ts b/SwitchboardVotePlugin/store/switchboardStore.ts deleted file mode 100644 index 546114a91a..0000000000 --- a/SwitchboardVotePlugin/store/switchboardStore.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { BN } from '@project-serum/anchor' -import create, { State } from 'zustand' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' -import { VotingClient } from '@utils/uiTypes/VotePlugin' - -interface SwitchboardPluginStore extends State { - state: { - votingPower: BN - isLoading: boolean - oracleKeys: Array - instructions: Array - } - setVotingPower: (votingPower: BN) => void - setIsLoading: (val: boolean) => void - setOracleKeys: (keys: Array, votingClient: VotingClient) => void - setInstructions: ( - instructions: Array, - votingClient: VotingClient - ) => void -} - -const defaultState = { - votingPower: new BN(0), - isLoading: false, - oracleKeys: [], - instructions: [], -} - -const useSwitchboardPluginStore = create( - (set, _get) => ({ - state: { - ...defaultState, - }, - setIsLoading: (val) => { - set((s) => { - s.state.isLoading = val - }) - }, - setVotingPower: (votingPower) => { - set((s) => { - s.state.votingPower = votingPower - }) - }, - setOracleKeys: (oracleKeys, votingClient) => { - votingClient._setOracles(oracleKeys) - set((s) => { - s.state.oracleKeys = oracleKeys - }) - }, - setInstructions: (instructions, votingClient) => { - votingClient._setInstructions(instructions) - set((s) => { - s.state.instructions = instructions - }) - }, - }) -) - -export default useSwitchboardPluginStore diff --git a/SwitchboardVotePlugin/switchboard_v2.json b/SwitchboardVotePlugin/switchboard_v2.json deleted file mode 100644 index 0809111d32..0000000000 --- a/SwitchboardVotePlugin/switchboard_v2.json +++ /dev/null @@ -1,5316 +0,0 @@ -{ - "version": "0.1.0", - "name": "switchboard_v2", - "instructions": [ - { - "name": "aggregatorAddJob", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "job", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorAddJobParams" - } - } - ] - }, - { - "name": "aggregatorInit", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "queue", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorInitParams" - } - } - ] - }, - { - "name": "aggregatorLock", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorLockParams" - } - } - ] - }, - { - "name": "aggregatorOpenRound", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "lease", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": true, - "isSigner": false - }, - { - "name": "queueAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "permission", - "isMut": true, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "payoutWallet", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "dataBuffer", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorOpenRoundParams" - } - } - ] - }, - { - "name": "aggregatorRemoveJob", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "job", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorRemoveJobParams" - } - } - ] - }, - { - "name": "aggregatorSaveResult", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "oracle", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "oracleQueue", - "isMut": false, - "isSigner": false - }, - { - "name": "queueAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "feedPermission", - "isMut": true, - "isSigner": false - }, - { - "name": "oraclePermission", - "isMut": false, - "isSigner": false - }, - { - "name": "lease", - "isMut": true, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "historyBuffer", - "isMut": true, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSaveResultParams" - } - } - ] - }, - { - "name": "aggregatorSetAuthority", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "newAuthority", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetAuthorityParams" - } - } - ] - }, - { - "name": "aggregatorSetBatchSize", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetBatchSizeParams" - } - } - ] - }, - { - "name": "aggregatorSetForceReportPeriod", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetForceReportPeriodParams" - } - } - ] - }, - { - "name": "aggregatorSetHistoryBuffer", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "buffer", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetHistoryBufferParams" - } - } - ] - }, - { - "name": "aggregatorSetMinJobs", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetMinJobsParams" - } - } - ] - }, - { - "name": "aggregatorSetMinOracles", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetMinOraclesParams" - } - } - ] - }, - { - "name": "aggregatorSetQueue", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "queue", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetQueueParams" - } - } - ] - }, - { - "name": "aggregatorSetUpdateInterval", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetUpdateIntervalParams" - } - } - ] - }, - { - "name": "aggregatorSetVarianceThreshold", - "accounts": [ - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AggregatorSetVarianceThresholdParams" - } - } - ] - }, - { - "name": "crankInit", - "accounts": [ - { - "name": "crank", - "isMut": true, - "isSigner": true - }, - { - "name": "queue", - "isMut": false, - "isSigner": false - }, - { - "name": "buffer", - "isMut": true, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "CrankInitParams" - } - } - ] - }, - { - "name": "bufferRelayerInit", - "accounts": [ - { - "name": "bufferRelayer", - "isMut": true, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "queue", - "isMut": false, - "isSigner": false - }, - { - "name": "job", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "associatedTokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "rent", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "BufferRelayerInitParams" - } - } - ] - }, - { - "name": "bufferRelayerOpenRound", - "accounts": [ - { - "name": "bufferRelayer", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": true, - "isSigner": false - }, - { - "name": "dataBuffer", - "isMut": true, - "isSigner": false - }, - { - "name": "permission", - "isMut": true, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "BufferRelayerOpenRoundParams" - } - } - ] - }, - { - "name": "bufferRelayerSaveResult", - "accounts": [ - { - "name": "bufferRelayer", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "oracle", - "isMut": false, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": true, - "isSigner": false - }, - { - "name": "dataBuffer", - "isMut": true, - "isSigner": false - }, - { - "name": "queueAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "permission", - "isMut": true, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleWallet", - "isMut": true, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "BufferRelayerSaveResultParams" - } - } - ] - }, - { - "name": "crankPop", - "accounts": [ - { - "name": "crank", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": true, - "isSigner": false - }, - { - "name": "queueAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "payoutWallet", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "crankDataBuffer", - "isMut": true, - "isSigner": false - }, - { - "name": "queueDataBuffer", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "CrankPopParams" - } - } - ] - }, - { - "name": "crankPush", - "accounts": [ - { - "name": "crank", - "isMut": true, - "isSigner": false - }, - { - "name": "aggregator", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": true, - "isSigner": false - }, - { - "name": "queueAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "permission", - "isMut": false, - "isSigner": false - }, - { - "name": "lease", - "isMut": true, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "dataBuffer", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "CrankPushParams" - } - } - ] - }, - { - "name": "jobInit", - "accounts": [ - { - "name": "job", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "JobInitParams" - } - } - ] - }, - { - "name": "leaseExtend", - "accounts": [ - { - "name": "lease", - "isMut": true, - "isSigner": false - }, - { - "name": "aggregator", - "isMut": false, - "isSigner": false - }, - { - "name": "queue", - "isMut": false, - "isSigner": false - }, - { - "name": "funder", - "isMut": true, - "isSigner": false - }, - { - "name": "owner", - "isMut": true, - "isSigner": true - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "LeaseExtendParams" - } - } - ] - }, - { - "name": "leaseInit", - "accounts": [ - { - "name": "lease", - "isMut": true, - "isSigner": false - }, - { - "name": "queue", - "isMut": true, - "isSigner": false - }, - { - "name": "aggregator", - "isMut": false, - "isSigner": false - }, - { - "name": "funder", - "isMut": true, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "owner", - "isMut": true, - "isSigner": true - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "LeaseInitParams" - } - } - ] - }, - { - "name": "leaseSetAuthority", - "accounts": [ - { - "name": "lease", - "isMut": true, - "isSigner": false - }, - { - "name": "withdrawAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "newAuthority", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "LeaseSetAuthorityParams" - } - } - ] - }, - { - "name": "leaseWithdraw", - "accounts": [ - { - "name": "lease", - "isMut": true, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "aggregator", - "isMut": false, - "isSigner": false - }, - { - "name": "queue", - "isMut": false, - "isSigner": false - }, - { - "name": "withdrawAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "withdrawAccount", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "LeaseWithdrawParams" - } - } - ] - }, - { - "name": "oracleHeartbeat", - "accounts": [ - { - "name": "oracle", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "tokenAccount", - "isMut": false, - "isSigner": false - }, - { - "name": "gcOracle", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": true, - "isSigner": false - }, - { - "name": "permission", - "isMut": false, - "isSigner": false - }, - { - "name": "dataBuffer", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "OracleHeartbeatParams" - } - } - ] - }, - { - "name": "oracleInit", - "accounts": [ - { - "name": "oracle", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "wallet", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "queue", - "isMut": false, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "OracleInitParams" - } - } - ] - }, - { - "name": "oracleQueueInit", - "accounts": [ - { - "name": "oracleQueue", - "isMut": true, - "isSigner": true - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "buffer", - "isMut": true, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "mint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "OracleQueueInitParams" - } - } - ] - }, - { - "name": "oracleQueueSetRewards", - "accounts": [ - { - "name": "queue", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "OracleQueueSetRewardsParams" - } - } - ] - }, - { - "name": "oracleQueueVrfConfig", - "accounts": [ - { - "name": "queue", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "OracleQueueVrfConfigParams" - } - } - ] - }, - { - "name": "oracleWithdraw", - "accounts": [ - { - "name": "oracle", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "tokenAccount", - "isMut": true, - "isSigner": false - }, - { - "name": "withdrawAccount", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": true, - "isSigner": false - }, - { - "name": "permission", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "OracleWithdrawParams" - } - } - ] - }, - { - "name": "permissionInit", - "accounts": [ - { - "name": "permission", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "granter", - "isMut": false, - "isSigner": false - }, - { - "name": "grantee", - "isMut": false, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "PermissionInitParams" - } - } - ] - }, - { - "name": "permissionSet", - "accounts": [ - { - "name": "permission", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "PermissionSetParams" - } - } - ] - }, - { - "name": "permissionSetVoterWeight", - "accounts": [ - { - "name": "permission", - "isMut": true, - "isSigner": false - }, - { - "name": "permissionAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "oracle", - "isMut": false, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "govProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "daoMint", - "isMut": false, - "isSigner": false - }, - { - "name": "spawnRecord", - "isMut": true, - "isSigner": false - }, - { - "name": "voterWeight", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenOwnerRecord", - "isMut": true, - "isSigner": false - }, - { - "name": "realm", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "PermissionSetVoterWeightParams" - } - } - ] - }, - { - "name": "programConfig", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "daoMint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "ProgramConfigParams" - } - } - ] - }, - { - "name": "programInit", - "accounts": [ - { - "name": "state", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenMint", - "isMut": true, - "isSigner": false - }, - { - "name": "vault", - "isMut": true, - "isSigner": false - }, - { - "name": "payer", - "isMut": true, - "isSigner": true - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "daoMint", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "ProgramInitParams" - } - } - ] - }, - { - "name": "vaultTransfer", - "accounts": [ - { - "name": "state", - "isMut": false, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "to", - "isMut": true, - "isSigner": false - }, - { - "name": "vault", - "isMut": true, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "VaultTransferParams" - } - } - ] - }, - { - "name": "vrfInit", - "accounts": [ - { - "name": "vrf", - "isMut": true, - "isSigner": false - }, - { - "name": "authority", - "isMut": false, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": false, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "VrfInitParams" - } - } - ] - }, - { - "name": "vrfProve", - "accounts": [ - { - "name": "vrf", - "isMut": true, - "isSigner": false - }, - { - "name": "oracle", - "isMut": false, - "isSigner": false - }, - { - "name": "randomnessProducer", - "isMut": false, - "isSigner": true - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "VrfProveParams" - } - } - ] - }, - { - "name": "vrfProveAndVerify", - "accounts": [ - { - "name": "vrf", - "isMut": true, - "isSigner": false - }, - { - "name": "callbackPid", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "oracle", - "isMut": false, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "oracleWallet", - "isMut": true, - "isSigner": false - }, - { - "name": "instructionsSysvar", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "VrfProveAndVerifyParams" - } - } - ] - }, - { - "name": "vrfRequestRandomness", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true - }, - { - "name": "vrf", - "isMut": true, - "isSigner": false - }, - { - "name": "oracleQueue", - "isMut": true, - "isSigner": false - }, - { - "name": "queueAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "dataBuffer", - "isMut": false, - "isSigner": false - }, - { - "name": "permission", - "isMut": true, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "payerWallet", - "isMut": true, - "isSigner": false - }, - { - "name": "payerAuthority", - "isMut": false, - "isSigner": true - }, - { - "name": "recentBlockhashes", - "isMut": false, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "VrfRequestRandomnessParams" - } - } - ] - }, - { - "name": "vrfVerify", - "accounts": [ - { - "name": "vrf", - "isMut": true, - "isSigner": false - }, - { - "name": "callbackPid", - "isMut": false, - "isSigner": false - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "escrow", - "isMut": true, - "isSigner": false - }, - { - "name": "programState", - "isMut": false, - "isSigner": false - }, - { - "name": "oracle", - "isMut": false, - "isSigner": false - }, - { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false - }, - { - "name": "oracleWallet", - "isMut": true, - "isSigner": false - }, - { - "name": "instructionsSysvar", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "VrfVerifyParams" - } - } - ] - } - ], - "accounts": [ - { - "name": "SbState", - "type": { - "kind": "struct", - "fields": [ - { - "name": "authority", - "type": "publicKey" - }, - { - "name": "tokenMint", - "type": "publicKey" - }, - { - "name": "tokenVault", - "type": "publicKey" - }, - { - "name": "daoMint", - "type": "publicKey" - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 992] - } - } - ] - } - }, - { - "name": "TaskSpecRecord", - "type": { - "kind": "struct", - "fields": [ - { - "name": "hash", - "type": { - "defined": "Hash" - } - } - ] - } - }, - { - "name": "AggregatorAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "metadata", - "type": { - "array": ["u8", 128] - } - }, - { - "name": "reserved1", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "queuePubkey", - "type": "publicKey" - }, - { - "name": "oracleRequestBatchSize", - "type": "u32" - }, - { - "name": "minOracleResults", - "type": "u32" - }, - { - "name": "minJobResults", - "type": "u32" - }, - { - "name": "minUpdateDelaySeconds", - "type": "u32" - }, - { - "name": "startAfter", - "type": "i64" - }, - { - "name": "varianceThreshold", - "type": { - "defined": "SwitchboardDecimal" - } - }, - { - "name": "forceReportPeriod", - "type": "i64" - }, - { - "name": "expiration", - "type": "i64" - }, - { - "name": "consecutiveFailureCount", - "type": "u64" - }, - { - "name": "nextAllowedUpdateTime", - "type": "i64" - }, - { - "name": "isLocked", - "type": "bool" - }, - { - "name": "crankPubkey", - "type": "publicKey" - }, - { - "name": "latestConfirmedRound", - "type": { - "defined": "AggregatorRound" - } - }, - { - "name": "currentRound", - "type": { - "defined": "AggregatorRound" - } - }, - { - "name": "jobPubkeysData", - "type": { - "array": ["publicKey", 16] - } - }, - { - "name": "jobHashes", - "type": { - "array": [ - { - "defined": "Hash" - }, - 16 - ] - } - }, - { - "name": "jobPubkeysSize", - "type": "u32" - }, - { - "name": "jobsChecksum", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "authority", - "type": "publicKey" - }, - { - "name": "historyBuffer", - "type": "publicKey" - }, - { - "name": "previousConfirmedRoundResult", - "type": { - "defined": "SwitchboardDecimal" - } - }, - { - "name": "previousConfirmedRoundSlot", - "type": "u64" - }, - { - "name": "disableCrank", - "type": "bool" - }, - { - "name": "jobWeights", - "type": { - "array": ["u8", 16] - } - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 147] - } - } - ] - } - }, - { - "name": "PermissionAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "authority", - "type": "publicKey" - }, - { - "name": "permissions", - "type": "u32" - }, - { - "name": "granter", - "type": "publicKey" - }, - { - "name": "grantee", - "type": "publicKey" - }, - { - "name": "expiration", - "type": "i64" - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 256] - } - } - ] - } - }, - { - "name": "RealmSpawnRecordAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "ebuf", - "type": { - "array": ["u8", 256] - } - } - ] - } - }, - { - "name": "LeaseAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "escrow", - "type": "publicKey" - }, - { - "name": "queue", - "type": "publicKey" - }, - { - "name": "aggregator", - "type": "publicKey" - }, - { - "name": "tokenProgram", - "type": "publicKey" - }, - { - "name": "isActive", - "type": "bool" - }, - { - "name": "crankRowCount", - "type": "u32" - }, - { - "name": "createdAt", - "type": "i64" - }, - { - "name": "updateCount", - "type": "u128" - }, - { - "name": "withdrawAuthority", - "type": "publicKey" - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 256] - } - } - ] - } - }, - { - "name": "OracleQueueAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "metadata", - "type": { - "array": ["u8", 64] - } - }, - { - "name": "authority", - "type": "publicKey" - }, - { - "name": "oracleTimeout", - "type": "u32" - }, - { - "name": "reward", - "type": "u64" - }, - { - "name": "minStake", - "type": "u64" - }, - { - "name": "slashingEnabled", - "type": "bool" - }, - { - "name": "varianceToleranceMultiplier", - "type": { - "defined": "SwitchboardDecimal" - } - }, - { - "name": "feedProbationPeriod", - "type": "u32" - }, - { - "name": "currIdx", - "type": "u32" - }, - { - "name": "size", - "type": "u32" - }, - { - "name": "gcIdx", - "type": "u32" - }, - { - "name": "consecutiveFeedFailureLimit", - "type": "u64" - }, - { - "name": "consecutiveOracleFailureLimit", - "type": "u64" - }, - { - "name": "unpermissionedFeedsEnabled", - "type": "bool" - }, - { - "name": "unpermissionedVrfEnabled", - "type": "bool" - }, - { - "name": "curatorRewardCut", - "type": { - "defined": "SwitchboardDecimal" - } - }, - { - "name": "lockLeaseFunding", - "type": "bool" - }, - { - "name": "mint", - "type": "publicKey" - }, - { - "name": "enableBufferRelayers", - "type": "bool" - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 968] - } - }, - { - "name": "maxSize", - "type": "u32" - }, - { - "name": "dataBuffer", - "type": "publicKey" - } - ] - } - }, - { - "name": "CrankAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "metadata", - "type": { - "array": ["u8", 64] - } - }, - { - "name": "queuePubkey", - "type": "publicKey" - }, - { - "name": "pqSize", - "type": "u32" - }, - { - "name": "maxRows", - "type": "u32" - }, - { - "name": "jitterModifier", - "type": "u8" - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 255] - } - }, - { - "name": "dataBuffer", - "type": "publicKey" - } - ] - } - }, - { - "name": "OracleAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "metadata", - "type": { - "array": ["u8", 128] - } - }, - { - "name": "oracleAuthority", - "type": "publicKey" - }, - { - "name": "lastHeartbeat", - "type": "i64" - }, - { - "name": "numInUse", - "type": "u32" - }, - { - "name": "tokenAccount", - "type": "publicKey" - }, - { - "name": "queuePubkey", - "type": "publicKey" - }, - { - "name": "metrics", - "type": { - "defined": "OracleMetrics" - } - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 256] - } - } - ] - } - }, - { - "name": "JobAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "metadata", - "type": { - "array": ["u8", 64] - } - }, - { - "name": "authority", - "type": "publicKey" - }, - { - "name": "expiration", - "type": "i64" - }, - { - "name": "hash", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "data", - "type": "bytes" - }, - { - "name": "referenceCount", - "type": "u32" - }, - { - "name": "totalSpent", - "type": "u64" - }, - { - "name": "createdAt", - "type": "i64" - } - ] - } - }, - { - "name": "VrfAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "status", - "type": { - "defined": "VrfStatus" - } - }, - { - "name": "counter", - "type": "u128" - }, - { - "name": "authority", - "type": "publicKey" - }, - { - "name": "oracleQueue", - "type": "publicKey" - }, - { - "name": "escrow", - "type": "publicKey" - }, - { - "name": "callback", - "type": { - "defined": "CallbackZC" - } - }, - { - "name": "batchSize", - "type": "u32" - }, - { - "name": "builders", - "type": { - "array": [ - { - "defined": "VrfBuilder" - }, - 8 - ] - } - }, - { - "name": "buildersLen", - "type": "u32" - }, - { - "name": "testMode", - "type": "bool" - }, - { - "name": "currentRound", - "type": { - "defined": "VrfRound" - } - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 1024] - } - } - ] - } - }, - { - "name": "BufferRelayerAccountData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "queuePubkey", - "type": "publicKey" - }, - { - "name": "escrow", - "type": "publicKey" - }, - { - "name": "authority", - "type": "publicKey" - }, - { - "name": "jobPubkey", - "type": "publicKey" - }, - { - "name": "jobHash", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "minUpdateDelaySeconds", - "type": "u32" - }, - { - "name": "isLocked", - "type": "bool" - }, - { - "name": "currentRound", - "type": { - "defined": "BufferRelayerRound" - } - }, - { - "name": "latestConfirmedRound", - "type": { - "defined": "BufferRelayerRound" - } - }, - { - "name": "result", - "type": "bytes" - } - ] - } - } - ], - "types": [ - { - "name": "AggregatorAddJobParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "weight", - "type": { - "option": "u8" - } - } - ] - } - }, - { - "name": "AggregatorInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "metadata", - "type": { - "array": ["u8", 128] - } - }, - { - "name": "batchSize", - "type": "u32" - }, - { - "name": "minOracleResults", - "type": "u32" - }, - { - "name": "minJobResults", - "type": "u32" - }, - { - "name": "minUpdateDelaySeconds", - "type": "u32" - }, - { - "name": "startAfter", - "type": "i64" - }, - { - "name": "varianceThreshold", - "type": { - "defined": "BorshDecimal" - } - }, - { - "name": "forceReportPeriod", - "type": "i64" - }, - { - "name": "expiration", - "type": "i64" - }, - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "disableCrank", - "type": "bool" - } - ] - } - }, - { - "name": "AggregatorLockParams", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "AggregatorOpenRoundParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "leaseBump", - "type": "u8" - }, - { - "name": "permissionBump", - "type": "u8" - }, - { - "name": "jitter", - "type": "u8" - } - ] - } - }, - { - "name": "AggregatorRemoveJobParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "jobIdx", - "type": "u32" - } - ] - } - }, - { - "name": "AggregatorSaveResultParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "oracleIdx", - "type": "u32" - }, - { - "name": "error", - "type": "bool" - }, - { - "name": "value", - "type": { - "defined": "BorshDecimal" - } - }, - { - "name": "jobsChecksum", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "minResponse", - "type": { - "defined": "BorshDecimal" - } - }, - { - "name": "maxResponse", - "type": { - "defined": "BorshDecimal" - } - }, - { - "name": "feedPermissionBump", - "type": "u8" - }, - { - "name": "oraclePermissionBump", - "type": "u8" - }, - { - "name": "leaseBump", - "type": "u8" - }, - { - "name": "stateBump", - "type": "u8" - } - ] - } - }, - { - "name": "AggregatorSetAuthorityParams", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "AggregatorSetBatchSizeParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "batchSize", - "type": "u32" - } - ] - } - }, - { - "name": "AggregatorSetForceReportPeriodParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "forceReportPeriod", - "type": "u32" - } - ] - } - }, - { - "name": "AggregatorSetHistoryBufferParams", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "AggregatorSetMinJobsParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "minJobResults", - "type": "u32" - } - ] - } - }, - { - "name": "AggregatorSetMinOraclesParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "minOracleResults", - "type": "u32" - } - ] - } - }, - { - "name": "AggregatorSetQueueParams", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "AggregatorSetUpdateIntervalParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "newInterval", - "type": "u32" - } - ] - } - }, - { - "name": "AggregatorSetVarianceThresholdParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "varianceThreshold", - "type": { - "defined": "BorshDecimal" - } - } - ] - } - }, - { - "name": "BufferRelayerInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "minUpdateDelaySeconds", - "type": "u32" - }, - { - "name": "stateBump", - "type": "u8" - } - ] - } - }, - { - "name": "BufferRelayerOpenRoundParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "permissionBump", - "type": "u8" - } - ] - } - }, - { - "name": "BufferRelayerSaveResultParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "permissionBump", - "type": "u8" - }, - { - "name": "result", - "type": "bytes" - }, - { - "name": "success", - "type": "bool" - } - ] - } - }, - { - "name": "CrankInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": "bytes" - }, - { - "name": "metadata", - "type": "bytes" - }, - { - "name": "crankSize", - "type": "u32" - } - ] - } - }, - { - "name": "CrankPopParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "leaseBumps", - "type": "bytes" - }, - { - "name": "permissionBumps", - "type": "bytes" - }, - { - "name": "nonce", - "type": { - "option": "u32" - } - }, - { - "name": "failOpenOnAccountMismatch", - "type": { - "option": "bool" - } - } - ] - } - }, - { - "name": "CrankPushParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "permissionBump", - "type": "u8" - } - ] - } - }, - { - "name": "JobInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "expiration", - "type": "i64" - }, - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "data", - "type": "bytes" - } - ] - } - }, - { - "name": "LeaseExtendParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "loadAmount", - "type": "u64" - }, - { - "name": "leaseBump", - "type": "u8" - }, - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "walletBumps", - "type": "bytes" - } - ] - } - }, - { - "name": "LeaseInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "loadAmount", - "type": "u64" - }, - { - "name": "withdrawAuthority", - "type": "publicKey" - }, - { - "name": "leaseBump", - "type": "u8" - }, - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "walletBumps", - "type": "bytes" - } - ] - } - }, - { - "name": "LeaseSetAuthorityParams", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "LeaseWithdrawParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "leaseBump", - "type": "u8" - }, - { - "name": "amount", - "type": "u64" - } - ] - } - }, - { - "name": "OracleHeartbeatParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "permissionBump", - "type": "u8" - } - ] - } - }, - { - "name": "OracleInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": "bytes" - }, - { - "name": "metadata", - "type": "bytes" - }, - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "oracleBump", - "type": "u8" - } - ] - } - }, - { - "name": "OracleQueueInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "name", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "metadata", - "type": { - "array": ["u8", 64] - } - }, - { - "name": "reward", - "type": "u64" - }, - { - "name": "minStake", - "type": "u64" - }, - { - "name": "feedProbationPeriod", - "type": "u32" - }, - { - "name": "oracleTimeout", - "type": "u32" - }, - { - "name": "slashingEnabled", - "type": "bool" - }, - { - "name": "varianceToleranceMultiplier", - "type": { - "defined": "BorshDecimal" - } - }, - { - "name": "consecutiveFeedFailureLimit", - "type": "u64" - }, - { - "name": "consecutiveOracleFailureLimit", - "type": "u64" - }, - { - "name": "queueSize", - "type": "u32" - }, - { - "name": "unpermissionedFeeds", - "type": "bool" - }, - { - "name": "unpermissionedVrf", - "type": "bool" - }, - { - "name": "enableBufferRelayers", - "type": "bool" - } - ] - } - }, - { - "name": "OracleQueueSetRewardsParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "rewards", - "type": "u64" - } - ] - } - }, - { - "name": "OracleQueueVrfConfigParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "unpermissionedVrfEnabled", - "type": "bool" - } - ] - } - }, - { - "name": "OracleWithdrawParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "permissionBump", - "type": "u8" - }, - { - "name": "amount", - "type": "u64" - } - ] - } - }, - { - "name": "PermissionInitParams", - "type": { - "kind": "struct", - "fields": [] - } - }, - { - "name": "PermissionSetParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "permission", - "type": { - "defined": "SwitchboardPermission" - } - }, - { - "name": "enable", - "type": "bool" - } - ] - } - }, - { - "name": "PermissionSetVoterWeightParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - } - ] - } - }, - { - "name": "ProgramConfigParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "token", - "type": "publicKey" - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "daoMint", - "type": "publicKey" - } - ] - } - }, - { - "name": "ProgramInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - } - ] - } - }, - { - "name": "VaultTransferParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "amount", - "type": "u64" - } - ] - } - }, - { - "name": "VrfInitParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "callback", - "type": { - "defined": "Callback" - } - }, - { - "name": "stateBump", - "type": "u8" - } - ] - } - }, - { - "name": "VrfProveParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "proof", - "type": "bytes" - }, - { - "name": "idx", - "type": "u32" - } - ] - } - }, - { - "name": "VrfProveAndVerifyParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nonce", - "type": { - "option": "u32" - } - }, - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "idx", - "type": "u32" - }, - { - "name": "proof", - "type": "bytes" - } - ] - } - }, - { - "name": "VrfRequestRandomnessParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "permissionBump", - "type": "u8" - }, - { - "name": "stateBump", - "type": "u8" - } - ] - } - }, - { - "name": "VrfVerifyParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "nonce", - "type": { - "option": "u32" - } - }, - { - "name": "stateBump", - "type": "u8" - }, - { - "name": "idx", - "type": "u32" - } - ] - } - }, - { - "name": "Callback", - "type": { - "kind": "struct", - "fields": [ - { - "name": "programId", - "type": "publicKey" - }, - { - "name": "accounts", - "type": { - "vec": { - "defined": "AccountMetaBorsh" - } - } - }, - { - "name": "ixData", - "type": "bytes" - } - ] - } - }, - { - "name": "EcvrfProofZC", - "type": { - "kind": "struct", - "fields": [ - { - "name": "gamma", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "c", - "type": { - "defined": "Scalar" - } - }, - { - "name": "s", - "type": { - "defined": "Scalar" - } - } - ] - } - }, - { - "name": "Scalar", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bytes", - "type": { - "array": ["u8", 32] - } - } - ] - } - }, - { - "name": "FieldElementZC", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bytes", - "type": { - "array": ["u64", 5] - } - } - ] - } - }, - { - "name": "CompletedPointZC", - "type": { - "kind": "struct", - "fields": [ - { - "name": "x", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "y", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "z", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "t", - "type": { - "defined": "FieldElementZC" - } - } - ] - } - }, - { - "name": "EdwardsPointZC", - "type": { - "kind": "struct", - "fields": [ - { - "name": "x", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "y", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "z", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "t", - "type": { - "defined": "FieldElementZC" - } - } - ] - } - }, - { - "name": "ProjectivePointZC", - "type": { - "kind": "struct", - "fields": [ - { - "name": "x", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "y", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "z", - "type": { - "defined": "FieldElementZC" - } - } - ] - } - }, - { - "name": "EcvrfIntermediate", - "type": { - "kind": "struct", - "fields": [ - { - "name": "r", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "nS", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "d", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "t13", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "t15", - "type": { - "defined": "FieldElementZC" - } - } - ] - } - }, - { - "name": "Hash", - "type": { - "kind": "struct", - "fields": [ - { - "name": "data", - "type": { - "array": ["u8", 32] - } - } - ] - } - }, - { - "name": "AggregatorRound", - "type": { - "kind": "struct", - "fields": [ - { - "name": "numSuccess", - "type": "u32" - }, - { - "name": "numError", - "type": "u32" - }, - { - "name": "isClosed", - "type": "bool" - }, - { - "name": "roundOpenSlot", - "type": "u64" - }, - { - "name": "roundOpenTimestamp", - "type": "i64" - }, - { - "name": "result", - "type": { - "defined": "SwitchboardDecimal" - } - }, - { - "name": "stdDeviation", - "type": { - "defined": "SwitchboardDecimal" - } - }, - { - "name": "minResponse", - "type": { - "defined": "SwitchboardDecimal" - } - }, - { - "name": "maxResponse", - "type": { - "defined": "SwitchboardDecimal" - } - }, - { - "name": "oraclePubkeysData", - "type": { - "array": ["publicKey", 16] - } - }, - { - "name": "mediansData", - "type": { - "array": [ - { - "defined": "SwitchboardDecimal" - }, - 16 - ] - } - }, - { - "name": "currentPayout", - "type": { - "array": ["i64", 16] - } - }, - { - "name": "mediansFulfilled", - "type": { - "array": ["bool", 16] - } - }, - { - "name": "errorsFulfilled", - "type": { - "array": ["bool", 16] - } - } - ] - } - }, - { - "name": "AggregatorHistoryRow", - "type": { - "kind": "struct", - "fields": [ - { - "name": "timestamp", - "type": "i64" - }, - { - "name": "value", - "type": { - "defined": "SwitchboardDecimal" - } - } - ] - } - }, - { - "name": "SwitchboardDecimal", - "type": { - "kind": "struct", - "fields": [ - { - "name": "mantissa", - "type": "i128" - }, - { - "name": "scale", - "type": "u32" - } - ] - } - }, - { - "name": "CrankRow", - "type": { - "kind": "struct", - "fields": [ - { - "name": "pubkey", - "type": "publicKey" - }, - { - "name": "nextTimestamp", - "type": "i64" - } - ] - } - }, - { - "name": "OracleMetrics", - "type": { - "kind": "struct", - "fields": [ - { - "name": "consecutiveSuccess", - "type": "u64" - }, - { - "name": "consecutiveError", - "type": "u64" - }, - { - "name": "consecutiveDisagreement", - "type": "u64" - }, - { - "name": "consecutiveLateResponse", - "type": "u64" - }, - { - "name": "consecutiveFailure", - "type": "u64" - }, - { - "name": "totalSuccess", - "type": "u128" - }, - { - "name": "totalError", - "type": "u128" - }, - { - "name": "totalDisagreement", - "type": "u128" - }, - { - "name": "totalLateResponse", - "type": "u128" - } - ] - } - }, - { - "name": "VrfBuilder", - "type": { - "kind": "struct", - "fields": [ - { - "name": "producer", - "type": "publicKey" - }, - { - "name": "status", - "type": { - "defined": "VrfStatus" - } - }, - { - "name": "reprProof", - "type": { - "array": ["u8", 80] - } - }, - { - "name": "proof", - "type": { - "defined": "EcvrfProofZC" - } - }, - { - "name": "yPoint", - "type": "publicKey" - }, - { - "name": "stage", - "type": "u32" - }, - { - "name": "stage1Out", - "type": { - "defined": "EcvrfIntermediate" - } - }, - { - "name": "r1", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "r2", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "stage3Out", - "type": { - "defined": "EcvrfIntermediate" - } - }, - { - "name": "hPoint", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "sReduced", - "type": { - "defined": "Scalar" - } - }, - { - "name": "yPointBuilder", - "type": { - "array": [ - { - "defined": "FieldElementZC" - }, - 3 - ] - } - }, - { - "name": "yRistrettoPoint", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "mulRound", - "type": "u8" - }, - { - "name": "hashPointsRound", - "type": "u8" - }, - { - "name": "mulTmp1", - "type": { - "defined": "CompletedPointZC" - } - }, - { - "name": "uPoint1", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "uPoint2", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "vPoint1", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "vPoint2", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "uPoint", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "vPoint", - "type": { - "defined": "EdwardsPointZC" - } - }, - { - "name": "u1", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "u2", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "invertee", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "y", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "z", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "p1Bytes", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "p2Bytes", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "p3Bytes", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "p4Bytes", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "cPrimeHashbuf", - "type": { - "array": ["u8", 16] - } - }, - { - "name": "m1", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "m2", - "type": { - "defined": "FieldElementZC" - } - }, - { - "name": "txRemaining", - "type": "u32" - }, - { - "name": "verified", - "type": "bool" - }, - { - "name": "result", - "type": { - "array": ["u8", 32] - } - } - ] - } - }, - { - "name": "AccountMetaZC", - "type": { - "kind": "struct", - "fields": [ - { - "name": "pubkey", - "type": "publicKey" - }, - { - "name": "isSigner", - "type": "bool" - }, - { - "name": "isWritable", - "type": "bool" - } - ] - } - }, - { - "name": "AccountMetaBorsh", - "type": { - "kind": "struct", - "fields": [ - { - "name": "pubkey", - "type": "publicKey" - }, - { - "name": "isSigner", - "type": "bool" - }, - { - "name": "isWritable", - "type": "bool" - } - ] - } - }, - { - "name": "CallbackZC", - "type": { - "kind": "struct", - "fields": [ - { - "name": "programId", - "type": "publicKey" - }, - { - "name": "accounts", - "type": { - "array": [ - { - "defined": "AccountMetaZC" - }, - 32 - ] - } - }, - { - "name": "accountsLen", - "type": "u32" - }, - { - "name": "ixData", - "type": { - "array": ["u8", 1024] - } - }, - { - "name": "ixDataLen", - "type": "u32" - } - ] - } - }, - { - "name": "VrfRound", - "type": { - "kind": "struct", - "fields": [ - { - "name": "alpha", - "type": { - "array": ["u8", 256] - } - }, - { - "name": "alphaLen", - "type": "u32" - }, - { - "name": "requestSlot", - "type": "u64" - }, - { - "name": "requestTimestamp", - "type": "i64" - }, - { - "name": "result", - "type": { - "array": ["u8", 32] - } - }, - { - "name": "numVerified", - "type": "u32" - }, - { - "name": "ebuf", - "type": { - "array": ["u8", 256] - } - } - ] - } - }, - { - "name": "BufferRelayerRound", - "type": { - "kind": "struct", - "fields": [ - { - "name": "numSuccess", - "type": "u32" - }, - { - "name": "numError", - "type": "u32" - }, - { - "name": "roundOpenSlot", - "type": "u64" - }, - { - "name": "roundOpenTimestamp", - "type": "i64" - }, - { - "name": "oraclePubkey", - "type": "publicKey" - } - ] - } - }, - { - "name": "BorshDecimal", - "type": { - "kind": "struct", - "fields": [ - { - "name": "mantissa", - "type": "i128" - }, - { - "name": "scale", - "type": "u32" - } - ] - } - }, - { - "name": "Lanes", - "type": { - "kind": "enum", - "variants": [ - { - "name": "C" - }, - { - "name": "D" - }, - { - "name": "AB" - }, - { - "name": "AC" - }, - { - "name": "CD" - }, - { - "name": "AD" - }, - { - "name": "BC" - }, - { - "name": "ABCD" - } - ] - } - }, - { - "name": "Shuffle", - "type": { - "kind": "enum", - "variants": [ - { - "name": "AAAA" - }, - { - "name": "BBBB" - }, - { - "name": "CACA" - }, - { - "name": "DBBD" - }, - { - "name": "ADDA" - }, - { - "name": "CBCB" - }, - { - "name": "ABAB" - }, - { - "name": "BADC" - }, - { - "name": "BACD" - }, - { - "name": "ABDC" - } - ] - } - }, - { - "name": "Shuffle", - "type": { - "kind": "enum", - "variants": [ - { - "name": "AAAA" - }, - { - "name": "BBBB" - }, - { - "name": "BADC" - }, - { - "name": "BACD" - }, - { - "name": "ADDA" - }, - { - "name": "CBCB" - }, - { - "name": "ABDC" - }, - { - "name": "ABAB" - }, - { - "name": "DBBD" - }, - { - "name": "CACA" - } - ] - } - }, - { - "name": "Lanes", - "type": { - "kind": "enum", - "variants": [ - { - "name": "D" - }, - { - "name": "C" - }, - { - "name": "AB" - }, - { - "name": "AC" - }, - { - "name": "AD" - }, - { - "name": "BCD" - } - ] - } - }, - { - "name": "Error", - "type": { - "kind": "enum", - "variants": [ - { - "name": "InvalidPublicKey" - }, - { - "name": "SerializationError", - "fields": [ - { - "defined": "bincode::Error" - } - ] - }, - { - "name": "DeserializationError", - "fields": [ - { - "defined": "bincode::Error" - } - ] - }, - { - "name": "InvalidDataError" - } - ] - } - }, - { - "name": "SwitchboardPermission", - "type": { - "kind": "enum", - "variants": [ - { - "name": "PermitOracleHeartbeat" - }, - { - "name": "PermitOracleQueueUsage" - }, - { - "name": "PermitVrfRequests" - } - ] - } - }, - { - "name": "OracleResponseType", - "type": { - "kind": "enum", - "variants": [ - { - "name": "TypeSuccess" - }, - { - "name": "TypeError" - }, - { - "name": "TypeDisagreement" - }, - { - "name": "TypeNoResponse" - } - ] - } - }, - { - "name": "VrfStatus", - "type": { - "kind": "enum", - "variants": [ - { - "name": "StatusNone" - }, - { - "name": "StatusRequesting" - }, - { - "name": "StatusVerifying" - }, - { - "name": "StatusVerified" - }, - { - "name": "StatusCallbackSuccess" - }, - { - "name": "StatusVerifyFailure" - } - ] - } - } - ], - "events": [ - { - "name": "AggregatorInitEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - } - ] - }, - { - "name": "VrfRequestRandomnessEvent", - "fields": [ - { - "name": "vrfPubkey", - "type": "publicKey", - "index": true - }, - { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false - }, - { - "name": "loadAmount", - "type": "u64", - "index": false - }, - { - "name": "existingAmount", - "type": "u64", - "index": false - } - ] - }, - { - "name": "VrfRequestEvent", - "fields": [ - { - "name": "vrfPubkey", - "type": "publicKey", - "index": true - }, - { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false - } - ] - }, - { - "name": "VrfProveEvent", - "fields": [ - { - "name": "vrfPubkey", - "type": "publicKey", - "index": true - }, - { - "name": "oraclePubkey", - "type": "publicKey", - "index": true - }, - { - "name": "authorityPubkey", - "type": "publicKey", - "index": false - } - ] - }, - { - "name": "VrfVerifyEvent", - "fields": [ - { - "name": "vrfPubkey", - "type": "publicKey", - "index": true - }, - { - "name": "oraclePubkey", - "type": "publicKey", - "index": true - }, - { - "name": "authorityPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "amount", - "type": "u64", - "index": false - } - ] - }, - { - "name": "VrfCallbackPerformedEvent", - "fields": [ - { - "name": "vrfPubkey", - "type": "publicKey", - "index": true - }, - { - "name": "oraclePubkey", - "type": "publicKey", - "index": true - }, - { - "name": "amount", - "type": "u64", - "index": false - } - ] - }, - { - "name": "AggregatorOpenRoundEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false - }, - { - "name": "jobPubkeys", - "type": { - "vec": "publicKey" - }, - "index": false - }, - { - "name": "remainingFunds", - "type": "u64", - "index": false - }, - { - "name": "queueAuthority", - "type": "publicKey", - "index": false - } - ] - }, - { - "name": "AggregatorValueUpdateEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "value", - "type": { - "defined": "BorshDecimal" - }, - "index": false - }, - { - "name": "slot", - "type": "u64", - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - }, - { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false - }, - { - "name": "oracleValues", - "type": { - "vec": { - "defined": "BorshDecimal" - } - }, - "index": false - } - ] - }, - { - "name": "OracleRewardEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "leasePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "oraclePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "walletPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "amount", - "type": "u64", - "index": false - }, - { - "name": "roundSlot", - "type": "u64", - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - } - ] - }, - { - "name": "OracleWithdrawEvent", - "fields": [ - { - "name": "oraclePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "walletPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "destinationWallet", - "type": "publicKey", - "index": false - }, - { - "name": "previousAmount", - "type": "u64", - "index": false - }, - { - "name": "newAmount", - "type": "u64", - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - } - ] - }, - { - "name": "LeaseWithdrawEvent", - "fields": [ - { - "name": "leasePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "walletPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "previousAmount", - "type": "u64", - "index": false - }, - { - "name": "newAmount", - "type": "u64", - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - } - ] - }, - { - "name": "OracleSlashEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "leasePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "oraclePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "walletPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "amount", - "type": "u64", - "index": false - }, - { - "name": "roundSlot", - "type": "u64", - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - } - ] - }, - { - "name": "LeaseFundEvent", - "fields": [ - { - "name": "leasePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "funder", - "type": "publicKey", - "index": false - }, - { - "name": "amount", - "type": "u64", - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - } - ] - }, - { - "name": "ProbationBrokenEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "queuePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - } - ] - }, - { - "name": "FeedPermissionRevokedEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - } - ] - }, - { - "name": "GarbageCollectFailureEvent", - "fields": [ - { - "name": "queuePubkey", - "type": "publicKey", - "index": false - } - ] - }, - { - "name": "OracleBootedEvent", - "fields": [ - { - "name": "queuePubkey", - "type": "publicKey", - "index": false - }, - { - "name": "oraclePubkey", - "type": "publicKey", - "index": false - } - ] - }, - { - "name": "AggregatorCrankEvictionEvent", - "fields": [ - { - "name": "crankPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "aggregatorPubkey", - "type": "publicKey", - "index": true - }, - { - "name": "reason", - "type": { - "option": "u32" - }, - "index": false - }, - { - "name": "timestamp", - "type": "i64", - "index": false - } - ] - }, - { - "name": "CrankLeaseInsufficientFundsEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "leasePubkey", - "type": "publicKey", - "index": false - } - ] - }, - { - "name": "CrankPopExpectedFailureEvent", - "fields": [ - { - "name": "feedPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "leasePubkey", - "type": "publicKey", - "index": false - } - ] - }, - { - "name": "BufferRelayerOpenRoundEvent", - "fields": [ - { - "name": "relayerPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "jobPubkey", - "type": "publicKey", - "index": false - }, - { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false - }, - { - "name": "remainingFunds", - "type": "u64", - "index": false - }, - { - "name": "queue", - "type": "publicKey", - "index": false - } - ] - } - ], - "errors": [ - { - "code": 6000, - "name": "ArrayOperationError", - "msg": "Illegal operation on a Switchboard array." - }, - { - "code": 6001, - "name": "QueueOperationError", - "msg": "Illegal operation on a Switchboard queue." - }, - { - "code": 6002, - "name": "IncorrectProgramOwnerError", - "msg": "An account required to be owned by the program has a different owner." - }, - { - "code": 6003, - "name": "InvalidAggregatorRound", - "msg": "Aggregator is not currently populated with a valid round." - }, - { - "code": 6004, - "name": "TooManyAggregatorJobs", - "msg": "Aggregator cannot fit any more jobs." - }, - { - "code": 6005, - "name": "AggregatorCurrentRoundClosed", - "msg": "Aggregator's current round is closed. No results are being accepted." - }, - { - "code": 6006, - "name": "AggregatorInvalidSaveResult", - "msg": "Aggregator received an invalid save result instruction." - }, - { - "code": 6007, - "name": "InvalidStrDecimalConversion", - "msg": "Failed to convert string to decimal format." - }, - { - "code": 6008, - "name": "AccountLoaderMissingSignature", - "msg": "AccountLoader account is missing a required signature." - }, - { - "code": 6009, - "name": "MissingRequiredSignature", - "msg": "Account is missing a required signature." - }, - { - "code": 6010, - "name": "ArrayOverflowError", - "msg": "The attempted action will overflow a zero-copy account array." - }, - { - "code": 6011, - "name": "ArrayUnderflowError", - "msg": "The attempted action will underflow a zero-copy account array." - }, - { - "code": 6012, - "name": "PubkeyNotFoundError", - "msg": "The queried public key was not found." - }, - { - "code": 6013, - "name": "AggregatorIllegalRoundOpenCall", - "msg": "Aggregator round open called too early." - }, - { - "code": 6014, - "name": "AggregatorIllegalRoundCloseCall", - "msg": "Aggregator round close called too early." - }, - { - "code": 6015, - "name": "AggregatorClosedError", - "msg": "Aggregator is closed. Illegal action." - }, - { - "code": 6016, - "name": "IllegalOracleIdxError", - "msg": "Illegal oracle index." - }, - { - "code": 6017, - "name": "OracleAlreadyRespondedError", - "msg": "The provided oracle has already responded this round." - }, - { - "code": 6018, - "name": "ProtoDeserializeError", - "msg": "Failed to deserialize protocol buffer." - }, - { - "code": 6019, - "name": "UnauthorizedStateUpdateError", - "msg": "Unauthorized program state modification attempted." - }, - { - "code": 6020, - "name": "MissingOracleAccountsError", - "msg": "Not enough oracle accounts provided to closeRounds." - }, - { - "code": 6021, - "name": "OracleMismatchError", - "msg": "An unexpected oracle account was provided for the transaction." - }, - { - "code": 6022, - "name": "CrankMaxCapacityError", - "msg": "Attempted to push to a Crank that's at capacity" - }, - { - "code": 6023, - "name": "AggregatorLeaseInsufficientFunds", - "msg": "Aggregator update call attempted but attached lease has insufficient funds." - }, - { - "code": 6024, - "name": "IncorrectTokenAccountMint", - "msg": "The provided token account does not point to the Switchboard token mint." - }, - { - "code": 6025, - "name": "InvalidEscrowAccount", - "msg": "An invalid escrow account was provided." - }, - { - "code": 6026, - "name": "CrankEmptyError", - "msg": "Crank empty. Pop failed." - }, - { - "code": 6027, - "name": "PdaDeriveError", - "msg": "Failed to derive a PDA from the provided seed." - }, - { - "code": 6028, - "name": "AggregatorAccountNotFound", - "msg": "Aggregator account missing from provided account list." - }, - { - "code": 6029, - "name": "PermissionAccountNotFound", - "msg": "Permission account missing from provided account list." - }, - { - "code": 6030, - "name": "LeaseAccountDeriveFailure", - "msg": "Failed to derive a lease account." - }, - { - "code": 6031, - "name": "PermissionAccountDeriveFailure", - "msg": "Failed to derive a permission account." - }, - { - "code": 6032, - "name": "EscrowAccountNotFound", - "msg": "Escrow account missing from provided account list." - }, - { - "code": 6033, - "name": "LeaseAccountNotFound", - "msg": "Lease account missing from provided account list." - }, - { - "code": 6034, - "name": "DecimalConversionError", - "msg": "Decimal conversion method failed." - }, - { - "code": 6035, - "name": "PermissionDenied", - "msg": "Permission account is missing required flags for the given action." - }, - { - "code": 6036, - "name": "QueueAtCapacity", - "msg": "Oracle queue is at lease capacity." - }, - { - "code": 6037, - "name": "ExcessiveCrankRowsError", - "msg": "Data feed is already pushed on a crank." - }, - { - "code": 6038, - "name": "AggregatorLockedError", - "msg": "Aggregator is locked, no setting modifications or job additions allowed." - }, - { - "code": 6039, - "name": "AggregatorInvalidBatchSizeError", - "msg": "Aggregator invalid batch size." - }, - { - "code": 6040, - "name": "AggregatorJobChecksumMismatch", - "msg": "Oracle provided an incorrect aggregator job checksum." - }, - { - "code": 6041, - "name": "IntegerOverflowError", - "msg": "An integer overflow occurred." - }, - { - "code": 6042, - "name": "InvalidUpdatePeriodError", - "msg": "Minimum update period is 5 seconds." - }, - { - "code": 6043, - "name": "NoResultsError", - "msg": "Aggregator round evaluation attempted with no results." - }, - { - "code": 6044, - "name": "InvalidExpirationError", - "msg": "An expiration constraint was broken." - }, - { - "code": 6045, - "name": "InsufficientStakeError", - "msg": "An account provided insufficient stake for action." - }, - { - "code": 6046, - "name": "LeaseInactiveError", - "msg": "The provided lease account is not active." - }, - { - "code": 6047, - "name": "NoAggregatorJobsFound", - "msg": "No jobs are currently included in the aggregator." - }, - { - "code": 6048, - "name": "IntegerUnderflowError", - "msg": "An integer underflow occurred." - }, - { - "code": 6049, - "name": "OracleQueueMismatch", - "msg": "An invalid oracle queue account was provided." - }, - { - "code": 6050, - "name": "OracleWalletMismatchError", - "msg": "An unexpected oracle wallet account was provided for the transaction." - }, - { - "code": 6051, - "name": "InvalidBufferAccountError", - "msg": "An invalid buffer account was provided." - }, - { - "code": 6052, - "name": "InsufficientOracleQueueError", - "msg": "Insufficient oracle queue size." - }, - { - "code": 6053, - "name": "InvalidAuthorityError", - "msg": "Invalid authority account provided." - }, - { - "code": 6054, - "name": "InvalidTokenAccountMintError", - "msg": "A provided token wallet is associated with an incorrect mint." - }, - { - "code": 6055, - "name": "ExcessiveLeaseWithdrawlError", - "msg": "You must leave enough funds to perform at least 1 update in the lease." - }, - { - "code": 6056, - "name": "InvalideHistoryAccountError", - "msg": "Invalid history account provided." - }, - { - "code": 6057, - "name": "InvalidLeaseAccountEscrowError", - "msg": "Invalid lease account escrow." - }, - { - "code": 6058, - "name": "InvalidCrankAccountError", - "msg": "Invalid crank provided." - }, - { - "code": 6059, - "name": "CrankNoElementsReadyError", - "msg": "No elements ready to be popped." - }, - { - "code": 6060, - "name": "IndexOutOfBoundsError", - "msg": "Index out of bounds" - }, - { - "code": 6061, - "name": "VrfInvalidRequestError", - "msg": "Invalid vrf request params" - }, - { - "code": 6062, - "name": "VrfInvalidProofSubmissionError", - "msg": "Vrf proof failed to verify" - }, - { - "code": 6063, - "name": "VrfVerifyError", - "msg": "Error in verifying vrf proof." - }, - { - "code": 6064, - "name": "VrfCallbackError", - "msg": "Vrf callback function failed." - }, - { - "code": 6065, - "name": "VrfCallbackParamsError", - "msg": "Invalid vrf callback params provided." - }, - { - "code": 6066, - "name": "VrfCallbackAlreadyCalledError", - "msg": "Vrf callback has already been triggered." - }, - { - "code": 6067, - "name": "VrfInvalidPubkeyError", - "msg": "The provided pubkey is invalid to use in ecvrf proofs" - }, - { - "code": 6068, - "name": "VrfTooManyVerifyCallsError", - "msg": "Number of required verify calls exceeded" - }, - { - "code": 6069, - "name": "VrfRequestAlreadyLaunchedError", - "msg": "Vrf request is already pending" - }, - { - "code": 6070, - "name": "VrfInsufficientVerificationError", - "msg": "Insufficient amount of proofs collected for VRF callback" - }, - { - "code": 6071, - "name": "InvalidVrfProducerError", - "msg": "An incorrect oracle attempted to submit a proof" - }, - { - "code": 6072, - "name": "InvalidGovernancePidError", - "msg": "Invalid SPLGovernance Account Supplied" - }, - { - "code": 6073, - "name": "InvalidGovernanceAccountError", - "msg": "An Invalid Governance Account was supplied" - }, - { - "code": 6074, - "name": "MissingOptionalAccount", - "msg": "Expected an optional account" - }, - { - "code": 6075, - "name": "InvalidSpawnRecordOwner", - "msg": "Invalid Owner for Spawn Record" - }, - { - "code": 6076, - "name": "NoopError", - "msg": "Noop error" - }, - { - "code": 6077, - "name": "MissingRequiredAccountsError", - "msg": "A required instruction account was not included" - }, - { - "code": 6078, - "name": "InvalidMintError", - "msg": "Invalid mint account passed for instruction" - }, - { - "code": 6079, - "name": "InvalidTokenAccountKeyError", - "msg": "An invalid token account was passed into the instruction" - }, - { - "code": 6080, - "name": "InvalidJobAccountError", - "msg": "" - }, - { - "code": 6081, - "name": "VoterStakeRegistryError", - "msg": "" - }, - { - "code": 6082, - "name": "AccountDiscriminatorMismatch", - "msg": "Account discriminator did not match." - } - ], - "metadata": { - "address": "7PMP6yE6qb3XzBQr5TK2GhuruYayZzBnT8U92ySaLESC" - } -} diff --git a/VoteStakeRegistry/actions/closeDeposit.ts b/VoteStakeRegistry/actions/closeDeposit.ts deleted file mode 100644 index e4eae3f57b..0000000000 --- a/VoteStakeRegistry/actions/closeDeposit.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { RpcContext } from '@solana/spl-governance' -import { sendTransaction } from '@utils/send' -import { getRegistrarPDA, getVoterPDA } from 'VoteStakeRegistry/sdk/accounts' - -export const closeDeposit = async ({ - rpcContext, - realmPk, - depositIndex, - communityMintPk, - client, -}: { - rpcContext: RpcContext - realmPk: PublicKey - communityMintPk: PublicKey - depositIndex: number - client?: VsrClient -}) => { - const signers: Keypair[] = [] - const { wallet, connection } = rpcContext - const instructions: TransactionInstruction[] = [] - const clientProgramId = client!.program.programId - - const { registrar } = await getRegistrarPDA( - realmPk, - communityMintPk, - client!.program.programId - ) - const { voter } = await getVoterPDA( - registrar, - wallet!.publicKey!, - clientProgramId - ) - const closeDepositEntry = await client!.program.methods - .closeDepositEntry(depositIndex) - .accounts({ - voter: voter, - voterAuthority: wallet!.publicKey!, - }) - .instruction() - instructions.push(closeDepositEntry) - - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: `Closing deposit`, - successMessage: `Deposit closed successful`, - }) -} diff --git a/VoteStakeRegistry/actions/getClawbackInstruction.ts b/VoteStakeRegistry/actions/getClawbackInstruction.ts deleted file mode 100644 index 4dc08fb39c..0000000000 --- a/VoteStakeRegistry/actions/getClawbackInstruction.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { PublicKey } from '@solana/web3.js' - -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { getRegistrarPDA, getVoterPDA } from 'VoteStakeRegistry/sdk/accounts' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' - -export const getClawbackInstruction = async ({ - realmPk, - realmAuthority, - voterWalletAddress, - destination, - voterDepositIndex, - grantMintPk, - realmCommunityMintPk, - client, -}: { - realmPk: PublicKey - realmAuthority: PublicKey - voterWalletAddress: PublicKey - destination: PublicKey - voterDepositIndex: number - grantMintPk: PublicKey - realmCommunityMintPk: PublicKey - client?: VsrClient -}) => { - const clientProgramId = client!.program.programId - - const { registrar } = await getRegistrarPDA( - realmPk, - realmCommunityMintPk, - clientProgramId - ) - const { voter } = await getVoterPDA( - registrar, - voterWalletAddress, - clientProgramId - ) - - const voterATAPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - grantMintPk, - voter, - true - ) - - const clawbackIx = await client?.program.methods - .clawback(voterDepositIndex) - .accounts({ - registrar, - realmAuthority, - voter, - vault: voterATAPk, - destination, - tokenProgram: TOKEN_PROGRAM_ID, - }) - .instruction() - return clawbackIx -} diff --git a/VoteStakeRegistry/actions/getGrantInstruction.ts b/VoteStakeRegistry/actions/getGrantInstruction.ts deleted file mode 100644 index 81005e3d8c..0000000000 --- a/VoteStakeRegistry/actions/getGrantInstruction.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { PublicKey, SystemProgram, SYSVAR_RENT_PUBKEY } from '@solana/web3.js' - -import { BN } from '@project-serum/anchor' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { - getRegistrarPDA, - getVoterPDA, - getVoterWeightPDA, - LockupType, -} from 'VoteStakeRegistry/sdk/accounts' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' - -export const getGrantInstruction = async ({ - fromPk, - toPk, - realmPk, - grantMintPk, - communityMintPk, - amount, - lockupPeriod, - startTime, - lockupKind, - allowClawback, - tokenAuthority, - client, -}: { - fromPk: PublicKey - realmMint: PublicKey - grantMintPk: PublicKey - communityMintPk: PublicKey - toPk: PublicKey - realmPk: PublicKey - tokenAuthority: PublicKey - amount: number - //days or months in case of monthly vesting lockup type - lockupPeriod: number - lockupKind: LockupType - startTime: number - allowClawback: boolean - client?: VsrClient -}) => { - const systemProgram = SystemProgram.programId - const clientProgramId = client!.program.programId - - const { registrar } = await getRegistrarPDA( - realmPk, - communityMintPk, - clientProgramId - ) - const { voter, voterBump } = await getVoterPDA( - registrar, - toPk, - clientProgramId - ) - const { voterWeightPk, voterWeightBump } = await getVoterWeightPDA( - registrar, - toPk, - clientProgramId - ) - const voterATAPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - grantMintPk, - voter, - true - ) - - const grantIx = await client?.program.methods - .grant( - voterBump, - voterWeightBump, - { [lockupKind]: {} }, - new BN(startTime), - lockupPeriod, - allowClawback, - new BN(amount) - ) - .accounts({ - registrar, - voter, - voterAuthority: toPk, - voterWeightRecord: voterWeightPk, - vault: voterATAPk, - depositToken: fromPk, - tokenAuthority: tokenAuthority, - grantAuthority: toPk, - depositMint: grantMintPk, - payer: toPk, - systemProgram: systemProgram, - tokenProgram: TOKEN_PROGRAM_ID, - associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, - rent: SYSVAR_RENT_PUBKEY, - }) - .instruction() - return grantIx -} diff --git a/VoteStakeRegistry/actions/voteRegistryDepositWithoutLockup.ts b/VoteStakeRegistry/actions/voteRegistryDepositWithoutLockup.ts deleted file mode 100644 index 229e236d67..0000000000 --- a/VoteStakeRegistry/actions/voteRegistryDepositWithoutLockup.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { RpcContext } from '@solana/spl-governance' -import { sendTransaction } from 'utils/send' - -import { BN } from '@project-serum/anchor' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { withVoteRegistryDeposit } from '../sdk/withVoteRegistryDeposit' - -export const voteRegistryDepositWithoutLockup = async ({ - rpcContext, - fromPk, - mintPk, - realmPk, - communityMintPk, - programId, - amount, - tokenOwnerRecordPk, - client, -}: { - rpcContext: RpcContext - //from where we deposit our founds - fromPk: PublicKey - mintPk: PublicKey - communityMintPk: PublicKey - realmPk: PublicKey - programId: PublicKey - amount: BN - tokenOwnerRecordPk: PublicKey | null - client?: VsrClient -}) => { - const lockUpPeriodInDays = 0 - const lockupKind = 'none' - const signers: Keypair[] = [] - const { wallet, connection } = rpcContext - const instructions: TransactionInstruction[] = [] - await withVoteRegistryDeposit({ - instructions, - walletPk: rpcContext.walletPubkey, - fromPk, - mintPk, - realmPk, - programId, - amount, - tokenOwnerRecordPk, - lockUpPeriodInDays, - communityMintPk, - lockupKind, - client, - }) - - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: `Depositing`, - successMessage: `Deposit successful`, - }) -} diff --git a/VoteStakeRegistry/actions/voteRegistryLockDeposit.ts b/VoteStakeRegistry/actions/voteRegistryLockDeposit.ts deleted file mode 100644 index a0fbce6553..0000000000 --- a/VoteStakeRegistry/actions/voteRegistryLockDeposit.ts +++ /dev/null @@ -1,136 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { RpcContext, TOKEN_PROGRAM_ID } from '@solana/spl-governance' -import { sendTransaction } from 'utils/send' - -import { BN } from '@project-serum/anchor' -import { LockupType } from 'VoteStakeRegistry/sdk/accounts' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { withCreateNewDeposit } from '../sdk/withCreateNewDeposit' -import { getPeriod } from 'VoteStakeRegistry/tools/deposits' - -export const voteRegistryLockDeposit = async ({ - rpcContext, - mintPk, - realmPk, - programId, - amountFromVoteRegistryDeposit, - totalTransferAmount, - lockUpPeriodInDays, - lockupKind, - sourceDepositIdx, - client, - tokenOwnerRecordPk, - sourceTokenAccount, - communityMintPk, - allowClawback = false, -}: { - rpcContext: RpcContext - mintPk: PublicKey - realmPk: PublicKey - programId: PublicKey - //amount that will be taken from vote registry deposit - amountFromVoteRegistryDeposit: BN - totalTransferAmount: BN - lockUpPeriodInDays: number - lockupKind: LockupType - sourceDepositIdx: number - tokenOwnerRecordPk: PublicKey | null - sourceTokenAccount: PublicKey - communityMintPk: PublicKey - allowClawback?: boolean - client?: VsrClient -}) => { - const signers: Keypair[] = [] - const { wallet, connection } = rpcContext - if (!client) { - throw 'no vote registry plugin' - } - if (!wallet.publicKey) { - throw 'no wallet connected' - } - const fromWalletTransferAmount = totalTransferAmount.sub( - amountFromVoteRegistryDeposit - ) - const instructions: TransactionInstruction[] = [] - const { - depositIdx, - voter, - registrar, - voterATAPk, - } = await withCreateNewDeposit({ - instructions, - walletPk: rpcContext.walletPubkey, - mintPk, - realmPk, - programId, - tokenOwnerRecordPk, - lockUpPeriodInDays, - lockupKind, - communityMintPk, - client, - allowClawback, - }) - - if (!amountFromVoteRegistryDeposit.isZero()) { - const internalTransferUnlockedInstruction = await client?.program.methods - .internalTransferUnlocked( - sourceDepositIdx!, - depositIdx, - amountFromVoteRegistryDeposit - ) - .accounts({ - registrar: registrar, - voter: voter, - voterAuthority: wallet!.publicKey, - }) - .instruction() - - instructions.push(internalTransferUnlockedInstruction) - } - - if (!fromWalletTransferAmount.isZero() && !fromWalletTransferAmount.isNeg()) { - const depositInstruction = await client?.program.methods - .deposit(depositIdx, fromWalletTransferAmount) - .accounts({ - registrar: registrar, - voter: voter, - vault: voterATAPk, - depositToken: sourceTokenAccount, - depositAuthority: wallet!.publicKey!, - tokenProgram: TOKEN_PROGRAM_ID, - }) - .instruction() - instructions.push(depositInstruction) - } - - if (!amountFromVoteRegistryDeposit.isZero()) { - const period = getPeriod(lockUpPeriodInDays, lockupKind) - const resetLockup = await client?.program.methods - .resetLockup(depositIdx, { [lockupKind]: {} }, period) - .accounts({ - registrar: registrar, - voter: voter, - voterAuthority: wallet!.publicKey, - }) - .instruction() - - instructions.push(resetLockup) - } - - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: `Depositing`, - successMessage: `Deposit successful`, - }) -} diff --git a/VoteStakeRegistry/actions/voteRegistryStartUnlock.ts b/VoteStakeRegistry/actions/voteRegistryStartUnlock.ts deleted file mode 100644 index 72aef459fc..0000000000 --- a/VoteStakeRegistry/actions/voteRegistryStartUnlock.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { RpcContext } from '@solana/spl-governance' -import { sendTransaction } from 'utils/send' - -import { BN } from '@project-serum/anchor' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { withCreateNewDeposit } from '../sdk/withCreateNewDeposit' - -export const voteRegistryStartUnlock = async ({ - rpcContext, - mintPk, - realmPk, - communityMintPk, - programId, - transferAmount, - amountAfterOperation, - lockUpPeriodInDays, - sourceDepositIdx, - client, - tokenOwnerRecordPk, -}: { - rpcContext: RpcContext - mintPk: PublicKey - realmPk: PublicKey - programId: PublicKey - communityMintPk: PublicKey - transferAmount: BN - //amount left in deposit after operation - amountAfterOperation: BN - lockUpPeriodInDays: number - sourceDepositIdx: number - tokenOwnerRecordPk: PublicKey | null - client?: VsrClient -}) => { - //adding one day to lockupPeriod when unlocking to avoid difference in front/backend calculation of period - //period have to be same or higher then deposit has that we unlock - const period = lockUpPeriodInDays + 1 - const lockupKind = 'cliff' - const signers: Keypair[] = [] - const { wallet, connection } = rpcContext - if (!client) { - throw 'no vote registry plugin' - } - if (!wallet.publicKey) { - throw 'no wallet connected' - } - const instructions: TransactionInstruction[] = [] - const { depositIdx, voter, registrar } = await withCreateNewDeposit({ - instructions, - walletPk: rpcContext.walletPubkey, - mintPk, - realmPk, - programId, - tokenOwnerRecordPk, - lockUpPeriodInDays: period, - lockupKind, - communityMintPk, - client, - }) - - const internalTransferInst = await client?.program.methods - .internalTransferLocked(sourceDepositIdx, depositIdx, transferAmount) - .accounts({ - registrar, - voter, - voterAuthority: wallet.publicKey, - }) - .instruction() - instructions.push(internalTransferInst) - - if (amountAfterOperation && amountAfterOperation?.isZero()) { - const close = await client.program.methods - .closeDepositEntry(sourceDepositIdx) - .accounts({ - voter: voter, - voterAuthority: wallet.publicKey, - }) - .instruction() - instructions.push(close) - } - - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: `Depositing`, - successMessage: `Deposit successful`, - }) -} diff --git a/VoteStakeRegistry/actions/voteRegistryWithdraw.ts b/VoteStakeRegistry/actions/voteRegistryWithdraw.ts deleted file mode 100644 index a72a7eeac9..0000000000 --- a/VoteStakeRegistry/actions/voteRegistryWithdraw.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { BN } from '@project-serum/anchor' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { withVoteRegistryWithdraw } from '../sdk/withVoteRegistryWithdraw' -import { RpcContext } from '@solana/spl-governance' -import { sendTransaction } from '@utils/send' - -export const voteRegistryWithdraw = async ({ - rpcContext, - mintPk, - realmPk, - amount, - tokenOwnerRecordPubKey, - depositIndex, - closeDepositAfterOperation, - communityMintPk, - client, -}: { - rpcContext: RpcContext - mintPk: PublicKey - realmPk: PublicKey - communityMintPk: PublicKey - amount: BN - tokenOwnerRecordPubKey: PublicKey - depositIndex: number - //if we want to close deposit after doing operation we need to fill this because we can close only deposits that have 0 tokens inside - closeDepositAfterOperation?: boolean - client?: VsrClient -}) => { - const signers: Keypair[] = [] - const { wallet, connection } = rpcContext - const instructions: TransactionInstruction[] = [] - await withVoteRegistryWithdraw({ - instructions, - walletPk: wallet!.publicKey!, - mintPk, - realmPk, - amount, - tokenOwnerRecordPubKey, - depositIndex, - closeDepositAfterOperation, - communityMintPk, - connection, - client, - }) - - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: `Withdrawing`, - successMessage: `Withdraw successful`, - }) -} diff --git a/VoteStakeRegistry/components/Account/Account.tsx b/VoteStakeRegistry/components/Account/Account.tsx deleted file mode 100644 index b2ff1b725e..0000000000 --- a/VoteStakeRegistry/components/Account/Account.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import dynamic from 'next/dynamic' -import useRealm from '@hooks/useRealm' -import PreviousRouteBtn from '@components/PreviousRouteBtn' -import { LinkIcon } from '@heroicons/react/outline' -import MyProposalsBtn from 'pages/dao/[symbol]/proposal/components/MyProposalsBtn' -import useWalletStore from 'stores/useWalletStore' - -const NotificationsCard = dynamic(() => import('@components/NotificationsCard')) -const DelegateCard = dynamic(() => import('@components/DelegateCard')) - -const AccountInner = ({ withHeader = true }: { withHeader?: boolean }) => { - const connected = useWalletStore((s) => s.connected) - return ( -
- {withHeader && ( - <> -
- -
-
-

Account

-
- - )} - -
- {connected ? ( - - ) : ( -
- - Connect your wallet -
- )} -
-
- ) -} - -const NotificationsPlugin = () => { - const { realmInfo } = useRealm() - if (realmInfo?.enableNotifi) { - return ( -
- -
- ) - } - - return null -} - -const Account = ({ withHeader = true }: { withHeader?: boolean }) => { - if (withHeader) { - return ( -
- - -
- -
-
- ) - } else { - return ( - <> - -
- -
- - - ) - } -} - -export default Account diff --git a/VoteStakeRegistry/components/Account/DepositCard.tsx b/VoteStakeRegistry/components/Account/DepositCard.tsx deleted file mode 100644 index dafc9d9205..0000000000 --- a/VoteStakeRegistry/components/Account/DepositCard.tsx +++ /dev/null @@ -1,245 +0,0 @@ -import Button from '@components/Button' -import useRealm from '@hooks/useRealm' -import { getProgramVersionForRealm } from '@models/registry/api' -import { RpcContext } from '@solana/spl-governance' -import { fmtMintAmount, getMintDecimalAmount } from '@tools/sdk/units' -import useWalletStore from 'stores/useWalletStore' -import { voteRegistryWithdraw } from 'VoteStakeRegistry/actions/voteRegistryWithdraw' -import { - DepositWithMintAccount, - LockupType, -} from 'VoteStakeRegistry/sdk/accounts' -import useDepositStore from 'VoteStakeRegistry/stores/useDepositStore' -import tokenService from '@utils/services/token' -import LockTokensModal from './LockTokensModal' -import { useState } from 'react' -import { - getFormattedStringFromDays, - getMinDurationFmt, - getTimeLeftFromNowFmt, - SECS_PER_DAY, -} from 'VoteStakeRegistry/tools/dateTools' -import { closeDeposit } from 'VoteStakeRegistry/actions/closeDeposit' -import { abbreviateAddress } from '@utils/formatting' -import { notify } from '@utils/notifications' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import dayjs from 'dayjs' -import { BN } from '@project-serum/anchor' - -const DepositCard = ({ deposit }: { deposit: DepositWithMintAccount }) => { - const { getOwnedDeposits } = useDepositStore() - const { realm, realmInfo, tokenRecords, ownTokenRecord } = useRealm() - const client = useVotePluginsClientStore((s) => s.state.vsrClient) - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection.current) - const endpoint = useWalletStore((s) => s.connection.endpoint) - const [isUnlockModalOpen, setIsUnlockModalOpen] = useState(false) - const { fetchRealm, fetchWalletTokenAccounts } = useWalletStore( - (s) => s.actions - ) - const handleWithDrawFromDeposit = async ( - depositEntry: DepositWithMintAccount - ) => { - if ( - ownTokenRecord!.account!.unrelinquishedVotesCount && - realm!.account.communityMint.toBase58() === - deposit.mint.publicKey.toBase58() - ) { - notify({ - type: 'error', - message: - "You can't withdraw community tokens when you have active proposals", - }) - return - } - const rpcContext = new RpcContext( - realm!.owner, - getProgramVersionForRealm(realmInfo!), - wallet!, - connection, - endpoint - ) - await voteRegistryWithdraw({ - rpcContext, - mintPk: depositEntry!.mint.publicKey, - realmPk: realm!.pubkey!, - amount: depositEntry.available, - communityMintPk: realm!.account.communityMint, - closeDepositAfterOperation: depositEntry.currentlyLocked.isZero(), - tokenOwnerRecordPubKey: tokenRecords[wallet!.publicKey!.toBase58()] - .pubkey!, - depositIndex: depositEntry.index, - client: client, - }) - await getOwnedDeposits({ - realmPk: realm!.pubkey, - communityMintPk: realm!.account.communityMint, - walletPk: wallet!.publicKey!, - client: client!, - connection, - }) - await fetchWalletTokenAccounts() - await fetchRealm(realmInfo!.programId, realmInfo!.realmId) - } - const handleStartUnlock = () => { - setIsUnlockModalOpen(true) - } - const handleCloseDeposit = async () => { - const rpcContext = new RpcContext( - realm!.owner, - getProgramVersionForRealm(realmInfo!), - wallet!, - connection, - endpoint - ) - await closeDeposit({ - rpcContext, - realmPk: realm!.pubkey!, - depositIndex: deposit.index, - communityMintPk: realm!.account.communityMint, - client, - }) - await getOwnedDeposits({ - realmPk: realm!.pubkey, - communityMintPk: realm!.account.communityMint, - walletPk: wallet!.publicKey!, - client: client!, - connection, - }) - } - - const lockedTokens = fmtMintAmount( - deposit.mint.account, - deposit.currentlyLocked.add(deposit.available) - ) - const type = Object.keys(deposit.lockup.kind)[0] as LockupType - const typeName = type !== 'monthly' ? type : 'Vested' - const isVest = type === 'monthly' - const isRealmCommunityMint = - deposit.mint.publicKey.toBase58() === - realm?.account.communityMint.toBase58() - const isConstant = type === 'constant' - const CardLabel = ({ label, value }) => { - return ( -
-

{label}

-

{value}

-
- ) - } - const tokenInfo = tokenService.getTokenInfo(deposit.mint.publicKey.toBase58()) - return ( -
-
- {tokenInfo?.logoURI && ( - - )} -

- {lockedTokens}{' '} - {!tokenInfo?.logoURI && abbreviateAddress(deposit.mint.publicKey)} - - {tokenInfo?.symbol} - -

-
-
-
- - - {isVest && ( - - )} - {isVest && ( - - )} - {isVest && deposit.nextVestingTimestamp !== null && ( - - )} - {isRealmCommunityMint && ( - - )} - - -
- {deposit?.available?.isZero() && deposit?.currentlyLocked?.isZero() ? ( - - ) : ( - - )} -
- {isUnlockModalOpen && ( - setIsUnlockModalOpen(false)} - > - )} -
- ) -} - -export default DepositCard diff --git a/VoteStakeRegistry/components/Account/LockTokensAccount.tsx b/VoteStakeRegistry/components/Account/LockTokensAccount.tsx deleted file mode 100644 index 2f60258a30..0000000000 --- a/VoteStakeRegistry/components/Account/LockTokensAccount.tsx +++ /dev/null @@ -1,373 +0,0 @@ -import Button from '@components/Button' -import useRealm from '@hooks/useRealm' -import { - fmtMintAmount, - getMintDecimalAmountFromNatural, -} from '@tools/sdk/units' -import { useEffect, useMemo, useState } from 'react' -import LockTokensModal from './LockTokensModal' -import DepositCommunityTokensBtn from '../TokenBalance/DepositCommunityTokensBtn' -import WithDrawCommunityTokens from '../TokenBalance/WithdrawCommunityTokensBtn' -import DepositCard from './DepositCard' -import PreviousRouteBtn from '@components/PreviousRouteBtn' -import VotingPowerBox from '../TokenBalance/VotingPowerBox' -import { PublicKey } from '@solana/web3.js' -import { MintInfo } from '@solana/spl-token' -import { BN } from '@project-serum/anchor' -import tokenService from '@utils/services/token' -import useWalletStore from 'stores/useWalletStore' -import { getDeposits } from 'VoteStakeRegistry/tools/deposits' -import { DepositWithMintAccount } from 'VoteStakeRegistry/sdk/accounts' -import useDepositStore from 'VoteStakeRegistry/stores/useDepositStore' -import { notify } from '@utils/notifications' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { getTokenOwnerRecordAddress } from '@solana/spl-governance' -import InlineNotification from '@components/InlineNotification' -import { - LightningBoltIcon, - LinkIcon, - LockClosedIcon, -} from '@heroicons/react/outline' -import { getMintMetadata } from '@components/instructions/programs/splToken' -import Account from './Account' -import { abbreviateAddress } from '@utils/formatting' - -interface DepositBox { - mintPk: PublicKey - mint: MintInfo - currentAmount: BN - lockUpKind: string -} -const unlockedTypes = ['none'] - -const LockTokensAccount = ({ tokenOwnerRecordPk }) => { - const { realm, realmInfo, mint, tokenRecords, councilMint } = useRealm() - const [isLockModalOpen, setIsLockModalOpen] = useState(false) - const client = useVotePluginsClientStore((s) => s.state.vsrClient) - const [reducedDeposits, setReducedDeposits] = useState([]) - const ownDeposits = useDepositStore((s) => s.state.deposits) - const [deposits, setDeposits] = useState([]) - const [votingPower, setVotingPower] = useState(new BN(0)) - const [votingPowerFromDeposits, setVotingPowerFromDeposits] = useState( - new BN(0) - ) - const [isOwnerOfDeposits, setIsOwnerOfDeposits] = useState(true) - const tokenOwnerRecordWalletPk = Object.keys(tokenRecords)?.find( - (key) => tokenRecords[key]?.pubkey?.toBase58() === tokenOwnerRecordPk - ) - const [isLoading, setIsLoading] = useState(false) - const connection = useWalletStore((s) => s.connection.current) - const wallet = useWalletStore((s) => s.current) - const connected = useWalletStore((s) => s.connected) - const mainBoxesClasses = 'bg-bkg-1 col-span-1 p-4 rounded-md' - const isNextSameRecord = (x, next) => { - const nextType = Object.keys(next.lockup.kind)[0] - return ( - x.mintPk.toBase58() === next.mint.publicKey.toBase58() && - ((!unlockedTypes.includes(x.lockUpKind) && - !unlockedTypes.includes(nextType)) || - (unlockedTypes.includes(x.lockUpKind) && - unlockedTypes.includes(nextType))) - ) - } - const handleGetDeposits = async () => { - setIsLoading(true) - try { - if ( - realm?.account.config.useCommunityVoterWeightAddin && - realm.pubkey && - wallet?.publicKey && - client - ) { - const { - deposits, - votingPower, - votingPowerFromDeposits, - } = await getDeposits({ - realmPk: realm!.pubkey, - communityMintPk: realm!.account.communityMint, - walletPk: tokenOwnerRecordWalletPk - ? new PublicKey(tokenOwnerRecordWalletPk) - : wallet.publicKey, - client: client!, - connection: connection, - }) - const reducedDeposits = deposits.reduce((curr, next) => { - const nextType = Object.keys(next.lockup.kind)[0] - const isUnlockedType = unlockedTypes.includes(nextType) - const currentValue = curr.find((x) => { - return isNextSameRecord(x, next) - }) - if (typeof currentValue === 'undefined') { - curr.push({ - mintPk: next.mint.publicKey, - mint: next.mint.account, - currentAmount: isUnlockedType - ? next.available - : next.currentlyLocked, - lockUpKind: nextType, - }) - } else { - curr.map((x) => { - if (isNextSameRecord(x, next)) { - x.currentAmount = x.currentAmount.add( - unlockedTypes.includes(x.lockUpKind) - ? next.available - : next.currentlyLocked - ) - } - return x - }) - } - return curr - }, [] as DepositBox[]) - setVotingPowerFromDeposits(votingPowerFromDeposits) - setVotingPower(votingPower) - setDeposits(deposits) - setReducedDeposits(reducedDeposits) - } else if (!wallet?.connected) { - setVotingPowerFromDeposits(new BN(0)) - setVotingPower(new BN(0)) - setDeposits([]) - setReducedDeposits([]) - } - } catch (e) { - console.log(e) - notify({ - type: 'error', - message: "Can't fetch deposits", - }) - } - setIsLoading(false) - } - useEffect(() => { - if ( - JSON.stringify(ownDeposits) !== JSON.stringify(deposits) && - isOwnerOfDeposits - ) { - handleGetDeposits() - } - }, [JSON.stringify(ownDeposits), ownDeposits.length]) - useEffect(() => { - handleGetDeposits() - }, [isOwnerOfDeposits, client]) - useEffect(() => { - const getTokenOwnerRecord = async () => { - const defaultMint = - !mint?.supply.isZero() || - realm?.account.config.useMaxCommunityVoterWeightAddin - ? realm!.account.communityMint - : !councilMint?.supply.isZero() - ? realm!.account.config.councilMint - : undefined - const tokenOwnerRecordAddress = await getTokenOwnerRecordAddress( - realm!.owner, - realm!.pubkey, - defaultMint!, - wallet!.publicKey! - ) - setIsOwnerOfDeposits( - tokenOwnerRecordAddress.toBase58() === tokenOwnerRecordPk - ) - } - if (realm && wallet?.connected) { - getTokenOwnerRecord() - } - }, [realm?.pubkey.toBase58(), wallet?.connected, tokenOwnerRecordPk]) - - const hasLockedTokens = useMemo(() => { - return reducedDeposits.find((d) => d.lockUpKind !== 'none') - }, [reducedDeposits]) - - const lockedTokens = useMemo(() => { - return ( - deposits - // we filter out one deposits that is used to store none locked community tokens - ?.filter( - (x) => - x.index !== - deposits.find( - (depo) => - typeof depo.lockup.kind.none !== 'undefined' && - depo.mint.publicKey.toBase58() === - realm?.account.communityMint.toBase58() && - depo.isUsed && - !depo.allowClawback && - depo.isUsed - )?.index - ) - ) - }, [deposits]) - - return ( -
-
-
- -
-
-

- Your Account{' '} - - ({realmInfo?.displayName}) - -

- -
- - -
-
- {!isOwnerOfDeposits && connected && ( -
- -
- )} - {connected ? ( -
-
- {isLoading ? ( - <> -
-
-
- - ) : ( - <> -
- {mint && ( - - )} -
- {reducedDeposits?.map((x, idx) => { - const availableTokens = fmtMintAmount( - x.mint, - x.currentAmount - ) - const price = - getMintDecimalAmountFromNatural( - x.mint, - x.currentAmount - ).toNumber() * - tokenService.getUSDTokenPrice(x.mintPk.toBase58()) - const tokenName = - getMintMetadata(x.mintPk)?.name || - tokenService.getTokenInfo(x.mintPk.toBase58())?.name || - abbreviateAddress(x.mintPk) - const formatter = Intl.NumberFormat('en', { - notation: 'compact', - }) - return ( -
-

- {`${tokenName} ${ - x.lockUpKind === 'none' ? 'Deposited' : 'Locked' - }`} -

- - {availableTokens} - {price ? ( - - $ - {formatter.format(price)} - - ) : null} - -
- ) - })} - {reducedDeposits.length === 0 ? ( -
-

{`${realmInfo?.symbol} Deposited`}

- 0 -
- ) : null} - {!hasLockedTokens ? ( -
-

{`${realmInfo?.symbol} Locked`}

- 0 -
- ) : null} - - )} -
-

Locked Deposits

- {lockedTokens?.length > 0 ? ( -
- {deposits - //we filter out one deposits that is used to store none locked community tokens - ?.filter( - (x) => - x.index !== - deposits.find( - (depo) => - typeof depo.lockup.kind.none !== 'undefined' && - depo.mint.publicKey.toBase58() === - realm?.account.communityMint.toBase58() && - depo.isUsed && - !depo.allowClawback && - depo.isUsed - )?.index - ) - ?.map((x, idx) => ( - - ))} -
- -

- Increase your voting power by

locking your tokens. -

- -
-
- ) : ( -
- -

- Increase your voting power by

locking your tokens. -

- -
- )} -
- ) : ( -
- - Connect your wallet -
- )} - {isLockModalOpen && ( - setIsLockModalOpen(false)} - > - )} -
- {connected && } -
- ) -} - -export default LockTokensAccount diff --git a/VoteStakeRegistry/components/Account/LockTokensModal.tsx b/VoteStakeRegistry/components/Account/LockTokensModal.tsx deleted file mode 100644 index 52c85f5c03..0000000000 --- a/VoteStakeRegistry/components/Account/LockTokensModal.tsx +++ /dev/null @@ -1,637 +0,0 @@ -import Button, { LinkButton, SecondaryButton } from '@components/Button' -import Input from '@components/inputs/Input' -import { getMintMetadata } from '@components/instructions/programs/splToken' -import Modal from '@components/Modal' -import { QuestionMarkCircleIcon } from '@heroicons/react/outline' -import useRealm from '@hooks/useRealm' -import { getProgramVersionForRealm } from '@models/registry/api' -import { BN } from '@project-serum/anchor' -import { RpcContext } from '@solana/spl-governance' -import { - fmtMintAmount, - getMintDecimalAmount, - getMintMinAmountAsDecimal, - getMintNaturalAmountFromDecimalAsBN, -} from '@tools/sdk/units' -import { precision } from '@utils/formatting' -import { useEffect, useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import { voteRegistryLockDeposit } from 'VoteStakeRegistry/actions/voteRegistryLockDeposit' -import { DepositWithMintAccount } from 'VoteStakeRegistry/sdk/accounts' -import { - yearsToDays, - daysToMonths, - getMinDurationInDays, - SECS_PER_DAY, - getFormattedStringFromDays, -} from 'VoteStakeRegistry/tools/dateTools' -import useDepositStore from 'VoteStakeRegistry/stores/useDepositStore' -import { voteRegistryStartUnlock } from 'VoteStakeRegistry/actions/voteRegistryStartUnlock' -import { - LockupKind, - lockupTypes, - MONTHLY, - CONSTANT, - Period, - VestingPeriod, - vestingPeriods, -} from 'VoteStakeRegistry/tools/types' -import BigNumber from 'bignumber.js' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { calcMintMultiplier } from 'VoteStakeRegistry/tools/deposits' -import ButtonGroup from '@components/ButtonGroup' -import InlineNotification from '@components/InlineNotification' -import Tooltip from '@components/Tooltip' -//import Switch from '@components/Switch' -import { notify } from '@utils/notifications' - -const YES = 'Yes' -const NO = 'No' - -const LockTokensModal = ({ - onClose, - isOpen, - depositToUnlock, -}: { - onClose: () => void - isOpen: boolean - depositToUnlock?: DepositWithMintAccount | null -}) => { - const { getOwnedDeposits } = useDepositStore() - const { mint, realm, realmTokenAccount, realmInfo, tokenRecords } = useRealm() - const client = useVotePluginsClientStore((s) => s.state.vsrClient) - const voteStakeRegistryRegistrar = useVotePluginsClientStore( - (s) => s.state.voteStakeRegistryRegistrar - ) - const connection = useWalletStore((s) => s.connection.current) - const endpoint = useWalletStore((s) => s.connection.endpoint) - const wallet = useWalletStore((s) => s.current) - const deposits = useDepositStore((s) => s.state.deposits) - const { fetchRealm, fetchWalletTokenAccounts } = useWalletStore( - (s) => s.actions - ) - - const lockupPeriods: Period[] = [ - { - defaultValue: yearsToDays(1), - display: '1y', - }, - { - defaultValue: yearsToDays(2), - display: '2y', - }, - { - defaultValue: yearsToDays(3), - display: '3y', - }, - { - defaultValue: yearsToDays(4), - display: '4y', - }, - { - defaultValue: yearsToDays(5), - display: '5y', - }, - { - defaultValue: 1, - display: 'Custom', - }, - ].filter((x) => - depositToUnlock - ? getMinDurationInDays(depositToUnlock) <= x.defaultValue || - x.display === 'Custom' - : true - ) - - const maxNonCustomDaysLockup = lockupPeriods - .map((x) => x.defaultValue) - .reduce((prev, current) => { - return prev > current ? prev : current - }) - const maxMultiplier = calcMintMultiplier( - maxNonCustomDaysLockup * SECS_PER_DAY, - voteStakeRegistryRegistrar, - realm - ) - - const depositRecord = deposits.find( - (x) => - x.mint.publicKey.toBase58() === realm!.account.communityMint.toBase58() && - x.lockup.kind.none - ) - const [lockupPeriodDays, setLockupPeriodDays] = useState(0) - const [allowClawback, setAllowClawback] = useState(false) - console.log(setAllowClawback) - const [lockupPeriod, setLockupPeriod] = useState(lockupPeriods[0]) - const [amount, setAmount] = useState() - const [lockMoreThenDeposited, setLockMoreThenDeposited] = useState( - YES - ) - const [lockupType, setLockupType] = useState(lockupTypes[0]) - const [ - vestingPeriod, - // setVestingPeriod - ] = useState(vestingPeriods[0]) - const [currentStep, setCurrentStep] = useState(0) - const [showLockupTypeInfo, setShowLockupTypeInfo] = useState(false) - - const depositedTokens = depositRecord - ? fmtMintAmount(mint, depositRecord.amountDepositedNative) - : '0' - const mintMinAmount = mint ? getMintMinAmountAsDecimal(mint) : 1 - const hasMoreTokensInWallet = !realmTokenAccount?.account.amount.isZero() - const wantToLockMoreThenDeposited = lockMoreThenDeposited === 'Yes' - const currentPrecision = precision(mintMinAmount) - const maxAmountToUnlock = depositToUnlock - ? getMintDecimalAmount( - depositToUnlock.mint.account, - depositToUnlock?.amountInitiallyLockedNative - ) - : 0 - const maxAmountToLock = - depositRecord && mint - ? wantToLockMoreThenDeposited - ? getMintDecimalAmount( - mint, - depositRecord?.amountDepositedNative.add( - new BN(realmTokenAccount!.account.amount) - ) - ) - : getMintDecimalAmount(mint, depositRecord?.amountDepositedNative) - : 0 - const maxAmount = depositToUnlock ? maxAmountToUnlock : maxAmountToLock - const maxAmountToLockFmt = - depositRecord && mint - ? wantToLockMoreThenDeposited - ? fmtMintAmount( - mint, - depositRecord?.amountDepositedNative.add( - new BN(realmTokenAccount!.account.amount) - ) - ) - : fmtMintAmount(mint, depositRecord?.amountDepositedNative) - : 0 - const maxAmountToUnlockFmt = depositToUnlock - ? fmtMintAmount( - depositToUnlock.mint.account, - depositToUnlock?.amountInitiallyLockedNative - ) - : 0 - const maxAmountFmt = depositToUnlock - ? maxAmountToUnlockFmt - : maxAmountToLockFmt - - const tokenName = mint - ? getMintMetadata(realm?.account.communityMint)?.name || 'tokens' - : '' - const currentMultiplier = calcMintMultiplier( - lockupPeriodDays * SECS_PER_DAY, - voteStakeRegistryRegistrar, - realm - ) - const currentPercentOfMaxMultiplier = - (100 * currentMultiplier) / maxMultiplier - - const handleNextStep = () => { - setCurrentStep(currentStep + 1) - } - const goToStep = (val: number) => { - setCurrentStep(val) - } - const validateAmountOnBlur = () => { - const val = parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(maxAmount), Number(amount)) - ).toFixed(currentPrecision) - ) - setAmount(val) - } - const handleSaveLock = async () => { - const rpcContext = new RpcContext( - realm!.owner, - getProgramVersionForRealm(realmInfo!), - wallet!, - connection, - endpoint - ) - const totalAmountToLock = getMintNaturalAmountFromDecimalAsBN( - amount!, - mint!.decimals - ) - const totalAmountInDeposit = - depositRecord?.amountDepositedNative || new BN(0) - const whatWillBeLeftInsideDeposit = totalAmountInDeposit.sub( - totalAmountToLock - ) - const amountFromDeposit = whatWillBeLeftInsideDeposit.isNeg() - ? totalAmountInDeposit - : totalAmountToLock - if (!amountFromDeposit.isZero() && allowClawback) { - notify({ - type: 'warn', - message: `Please withdraw your tokens to the wallet`, - description: `To lock tokens with clawback option you must first withdraw them to wallet`, - }) - throw 'To lock tokens with clawback option you must first withdraw them to wallet' - } - await voteRegistryLockDeposit({ - rpcContext, - mintPk: realm!.account.communityMint!, - communityMintPk: realm!.account.communityMint!, - realmPk: realm!.pubkey!, - programId: realm!.owner, - amountFromVoteRegistryDeposit: amountFromDeposit, - totalTransferAmount: totalAmountToLock, - lockUpPeriodInDays: lockupPeriodDays, - lockupKind: lockupType.value, - sourceDepositIdx: depositRecord!.index, - sourceTokenAccount: realmTokenAccount!.publicKey, - allowClawback: allowClawback, - tokenOwnerRecordPk: - tokenRecords[wallet!.publicKey!.toBase58()]?.pubkey || null, - client: client, - }) - await getOwnedDeposits({ - realmPk: realm!.pubkey, - communityMintPk: realm!.account.communityMint, - walletPk: wallet!.publicKey!, - client: client!, - connection, - }) - fetchWalletTokenAccounts() - fetchRealm(realmInfo!.programId, realmInfo!.realmId) - onClose() - } - - const handleSaveUnlock = async () => { - if (!depositToUnlock) { - throw 'No deposit to unlock selected' - } - - const rpcContext = new RpcContext( - realm!.owner, - getProgramVersionForRealm(realmInfo!), - wallet!, - connection, - endpoint - ) - const totalAmountToUnlock = getMintNaturalAmountFromDecimalAsBN( - amount!, - depositToUnlock!.mint.account.decimals - ) - - const totalAmountInDeposit = depositToUnlock.currentlyLocked - - const whatWillBeLeftInsideDeposit = totalAmountInDeposit.sub( - totalAmountToUnlock - ) - - await voteRegistryStartUnlock({ - rpcContext, - mintPk: depositToUnlock!.mint.publicKey, - realmPk: realm!.pubkey!, - programId: realm!.owner, - transferAmount: totalAmountToUnlock, - amountAfterOperation: whatWillBeLeftInsideDeposit, - lockUpPeriodInDays: lockupPeriodDays, - sourceDepositIdx: depositToUnlock!.index, - communityMintPk: realm!.account.communityMint, - tokenOwnerRecordPk: - tokenRecords[wallet!.publicKey!.toBase58()]?.pubkey || null, - client: client, - }) - await getOwnedDeposits({ - realmPk: realm!.pubkey, - communityMintPk: realm!.account.communityMint, - walletPk: wallet!.publicKey!, - client: client!, - connection, - }) - - onClose() - } - const labelClasses = 'mb-2 text-fgd-2 text-sm' - const DoYouWantToDepositMoreComponent = () => ( -
-
- Lock more than the {depositedTokens} {realmInfo?.symbol} you have - deposited? -
- setLockMoreThenDeposited(v)} - values={[YES, NO]} - /> -
- ) - const getCurrentStep = () => { - switch (currentStep) { - case 0: - return ( - <> - {!depositToUnlock ? ( - <> -
-
Lockup Type
- setShowLockupTypeInfo(true)} - > - About Lockup Types - -
-
- - setLockupType( - //@ts-ignore - lockupTypes - .filter((x) => x.value !== MONTHLY) - .find((t) => t.displayName === type) - ) - } - values={lockupTypes - .filter((x) => x.value !== MONTHLY) - .map((type) => type.displayName)} - /> -
- - ) : null} -
- {depositToUnlock && ( -
- -
- )} - {hasMoreTokensInWallet && !depositToUnlock && ( - - )} -
-
- {depositToUnlock ? 'Amount to Unlock' : 'Amount to Lock'} - setAmount(Number(maxAmount))} - > - Max: {maxAmountFmt} - -
- setAmount(e.target.value)} - step={mintMinAmount} - onBlur={validateAmountOnBlur} - /> -
-
-
Duration
- - setLockupPeriod( - //@ts-ignore - lockupPeriods.find((p) => p.display === period) - ) - } - values={lockupPeriods.map((p) => p.display)} - /> -
- {lockupPeriod.defaultValue === 1 && ( - <> -
- Number of days -
- - setLockupPeriodDays(Number(e.target.value)) - } - step={1} - /> - - )} - - {lockupType.value === MONTHLY && ( -
-
-

Vesting Period

-

Monthly

-
- {/* - - {vestingPeriods.map((period, index) => ( - - {period.display} - - ))} - - */} -
-

Vesting Rate

- {amount ? ( -

- {(amount / daysToMonths(lockupPeriodDays)).toFixed(2)}{' '} - {vestingPeriod.info} -

- ) : ( -

- Enter an amount to lock -

- )} -
-
- )} -
- {lockupType.value === CONSTANT - ? 'Vote Weight Multiplier' - : 'Initial Vote Weight Multiplier'} - {lockupType.value !== CONSTANT ? ( - - - - ) : null} - - {currentMultiplier}x - -
-
-
100 - ? 100 - : currentPercentOfMaxMultiplier - }%`, - }} - className="bg-primary-light h-2 rounded-lg" - >
-
- {/* {!depositToUnlock && ( -
-
- Allow dao to clawback -{' '} - - It will give ability to propose clawback of your locked - tokens to any given address If you use constant lockup - type with this option turn on only way to retrieve tokens - from that deposit will be dao vote - -
- setAllowClawback(checked)} - /> -
- )} */} -
- - ) - case 1: - return ( -
- {depositToUnlock ? ( -

- This will convert {new BigNumber(amount!).toFormat()}{' '} - {tokenName} into a cliff type lockup that unlocks in{' '} - {getFormattedStringFromDays(lockupPeriodDays, true)} -

- ) : ( -

- Lock {new BigNumber(amount!).toFormat()} {tokenName} for{' '} - {lockupType.value === CONSTANT && ' at least '} - {getFormattedStringFromDays(lockupPeriodDays, true)} -

- )} - {!depositToUnlock && ( -

Locking tokens can’t be undone.

- )} -
- ) - default: - return 'Unknown step' - } - } - useEffect(() => { - if (amount) { - validateAmountOnBlur() - } - }, [lockMoreThenDeposited]) - useEffect(() => { - setLockupPeriod(lockupPeriods[0]) - }, [voteStakeRegistryRegistrar]) - useEffect(() => { - if (depositToUnlock) { - goToStep(0) - } - }, [depositToUnlock]) - useEffect(() => { - setLockupPeriodDays(lockupPeriod.defaultValue) - }, [lockupPeriod.defaultValue]) - // const isMainBtnVisible = !hasMoreTokensInWallet || currentStep !== 0 - const isTitleVisible = currentStep !== 3 - const getCurrentBtnForStep = () => { - switch (currentStep) { - case 0: - return ( - - ) - case 1: - return ( - - ) - default: - return ( - - ) - } - } - return ( - - {currentStep !== 1 ? ( -

- {isTitleVisible && (depositToUnlock ? 'Start Unlock' : 'Lock Tokens')} -

- ) : null} - {showLockupTypeInfo ? ( - <> - {lockupTypes.map((type) => ( - <> -

- {type.displayName} -

- {type.info.map((info) => ( -

- {info} -

- ))} - - ))} - - - - ) : ( - <> - {getCurrentStep()} -
- { - // isMainBtnVisible && - getCurrentBtnForStep() - } - Cancel -
- - )} -
- ) -} - -export default LockTokensModal diff --git a/VoteStakeRegistry/components/LockTokenStats/InfoBox.tsx b/VoteStakeRegistry/components/LockTokenStats/InfoBox.tsx deleted file mode 100644 index b787eae360..0000000000 --- a/VoteStakeRegistry/components/LockTokenStats/InfoBox.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import Tooltip from '@components/Tooltip' -import { InformationCircleIcon } from '@heroicons/react/outline' -import useRealm from '@hooks/useRealm' -import { getMintDecimalAmount } from '@tools/sdk/units' -import tokenService from '@utils/services/token' - -const InfoBox = ({ title, val, tooltip = '', className = '' }) => { - const { mint, realm } = useRealm() - const formatter = Intl.NumberFormat('en', { - notation: 'compact', - }) - const fmtAmount = (val) => { - return mint - ? formatter.format(getMintDecimalAmount(mint!, val).toNumber()) - : '0' - } - const price = realm - ? tokenService.getUSDTokenPrice(realm!.account.communityMint.toBase58()) - : 0 - const totalPrice = mint - ? formatter.format(getMintDecimalAmount(mint!, val).toNumber() * price) - : '' - return ( -
-
- {title} - {tooltip && ( - - - - - - )} -
-
- {fmtAmount(val)} - {totalPrice && ( - - {' '} - ≈ ${totalPrice} - - )} -
-
- ) -} - -export default InfoBox diff --git a/VoteStakeRegistry/components/LockTokenStats/LockTokenRow.tsx b/VoteStakeRegistry/components/LockTokenStats/LockTokenRow.tsx deleted file mode 100644 index e4c31fb1e1..0000000000 --- a/VoteStakeRegistry/components/LockTokenStats/LockTokenRow.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { AddressImage, DisplayAddress } from '@cardinal/namespaces-components' -import { UserCircleIcon } from '@heroicons/react/outline' -import useRealm from '@hooks/useRealm' -import { PublicKey } from '@solana/web3.js' -import { getMintDecimalAmount } from '@tools/sdk/units' -import { useMemo } from 'react' -import useWalletStore from 'stores/useWalletStore' -import { LockupType } from 'VoteStakeRegistry/sdk/accounts' -import { - getMinDurationFmt, - getTimeLeftFromNowFmt, -} from 'VoteStakeRegistry/tools/dateTools' -import { DepositWithWallet } from './tools' - -const LockTokenRow = ({ - depositWithWallet, - index, -}: { - depositWithWallet: DepositWithWallet - index: number -}) => { - const connection = useWalletStore((s) => s.connection) - const { mint } = useRealm() - const fmtMangoAmount = (val) => { - return mint ? getMintDecimalAmount(mint!, val).toFormat(0) : '0' - } - const renderAddressName = useMemo(() => { - return ( - - ) - }, [depositWithWallet.wallet.toBase58()]) - const renderAddressImage = useMemo( - () => ( - } - /> - ), - [depositWithWallet.wallet.toBase58()] - ) - const type = Object.keys( - depositWithWallet.deposit.lockup.kind - )[0] as LockupType - const typeName = type !== 'monthly' ? type : 'Vested' - const isConstant = type === 'constant' - const lockedTokens = fmtMangoAmount( - depositWithWallet.deposit.amountDepositedNative - ) - return ( -
-
- {renderAddressImage} {renderAddressName} -
-
{typeName}
-
- {isConstant - ? getMinDurationFmt(depositWithWallet.deposit as any) - : getTimeLeftFromNowFmt(depositWithWallet.deposit as any)} -
-
{lockedTokens}
-
- ) -} - -export default LockTokenRow diff --git a/VoteStakeRegistry/components/LockTokenStats/VestingVsTime.tsx b/VoteStakeRegistry/components/LockTokenStats/VestingVsTime.tsx deleted file mode 100644 index 5adfe87bbf..0000000000 --- a/VoteStakeRegistry/components/LockTokenStats/VestingVsTime.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { ResponsiveBar } from '@nivo/bar' - -const VestingVsTime = ({ data, fmtAmount /* see data tab */ }) => ( - fmtAmount(v.value)} - axisLeft={{ format: (v) => fmtAmount(v) }} - labelSkipWidth={12} - labelSkipHeight={12} - labelTextColor="#fff" - role="application" - /> -) -export default VestingVsTime diff --git a/VoteStakeRegistry/components/LockTokenStats/tools.tsx b/VoteStakeRegistry/components/LockTokenStats/tools.tsx deleted file mode 100644 index 74981555a8..0000000000 --- a/VoteStakeRegistry/components/LockTokenStats/tools.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { - ProposalTransaction, - getGovernanceSchemaForAccount, - getAccountTypes, - GovernanceAccountClass, - deserializeBorsh, - ProgramAccount, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import { ConnectionContext } from '@utils/connection' -import axios from 'axios' -import { Deposit } from 'VoteStakeRegistry/sdk/accounts' - -export interface DepositWithWallet { - voter: PublicKey - wallet: PublicKey - deposit: Deposit -} -export interface DepoistWithVoter { - amount: BN | undefined - voterPk: PublicKey - startTs: BN | undefined -} - -//TODO fcn specific to grant instruction => make it generic for all governanceAccounts and move to sdk -export const getProposalsTransactions = async ( - pubkeys: PublicKey[], - connection: ConnectionContext, - programId: PublicKey -) => { - const getTransactions = await axios.request({ - url: connection.endpoint, - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - data: JSON.stringify([ - ...pubkeys.map((x) => { - return { - jsonrpc: '2.0', - id: 1, - method: 'getProgramAccounts', - params: [ - programId.toBase58(), - { - commitment: connection.current.commitment, - encoding: 'base64', - filters: [ - { - memcmp: { - offset: 0, // number of bytes - bytes: 'E', // base58 encoded string - }, - }, - { - memcmp: { - offset: 1, - bytes: x.toBase58(), - }, - }, - ], - }, - ], - } - }), - ]), - }) - - const accounts: ProgramAccount[] = [] - const rawAccounts = getTransactions.data - ? getTransactions.data.flatMap((x) => x.result) - : [] - for (const rawAccount of rawAccounts) { - try { - const getSchema = getGovernanceSchemaForAccount - const data = Buffer.from(rawAccount.account.data[0], 'base64') - const accountTypes = getAccountTypes( - (ProposalTransaction as any) as GovernanceAccountClass - ) - const account: ProgramAccount = { - pubkey: new PublicKey(rawAccount.pubkey), - account: deserializeBorsh( - getSchema(accountTypes[1]), - ProposalTransaction, - data - ), - owner: new PublicKey(rawAccount.account.owner), - } - - accounts.push(account) - } catch (ex) { - console.info(`Can't deserialize @ ${rawAccount.pubkey}, ${ex}.`) - } - } - return accounts -} diff --git a/VoteStakeRegistry/components/TokenBalance/DepositCommunityTokensBtn.tsx b/VoteStakeRegistry/components/TokenBalance/DepositCommunityTokensBtn.tsx deleted file mode 100644 index f27993c66f..0000000000 --- a/VoteStakeRegistry/components/TokenBalance/DepositCommunityTokensBtn.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import Button from '@components/Button' -import Loading from '@components/Loading' -import useRealm from '@hooks/useRealm' -import { getProgramVersionForRealm } from '@models/registry/api' -import { BN } from '@project-serum/anchor' -import { RpcContext } from '@solana/spl-governance' -import { notify } from '@utils/notifications' -import { useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import { voteRegistryDepositWithoutLockup } from 'VoteStakeRegistry/actions/voteRegistryDepositWithoutLockup' -import useDepositStore from 'VoteStakeRegistry/stores/useDepositStore' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' - -const DepositCommunityTokensBtn = ({ className = '' }) => { - const { getOwnedDeposits } = useDepositStore() - const { realm, realmInfo, realmTokenAccount, tokenRecords } = useRealm() - const client = useVotePluginsClientStore((s) => s.state.vsrClient) - const [isLoading, setIsLoading] = useState(false) - const wallet = useWalletStore((s) => s.current) - const connected = useWalletStore((s) => s.connected) - const connection = useWalletStore((s) => s.connection.current) - const endpoint = useWalletStore((s) => s.connection.endpoint) - const { fetchRealm, fetchWalletTokenAccounts } = useWalletStore( - (s) => s.actions - ) - - const depositAllTokens = async function () { - if (!realm) { - throw 'No realm selected' - } - setIsLoading(true) - const currentTokenOwnerRecord = tokenRecords[wallet!.publicKey!.toBase58()] - const tokenOwnerRecordPk = - typeof currentTokenOwnerRecord !== 'undefined' - ? currentTokenOwnerRecord.pubkey - : null - const rpcContext = new RpcContext( - realm.owner, - getProgramVersionForRealm(realmInfo!), - wallet!, - connection, - endpoint - ) - try { - await voteRegistryDepositWithoutLockup({ - rpcContext, - fromPk: realmTokenAccount!.publicKey, - mintPk: realm.account.communityMint!, - realmPk: realm.pubkey, - programId: realm.owner, - amount: realmTokenAccount!.account.amount, - tokenOwnerRecordPk, - client: client, - communityMintPk: realm.account.communityMint, - }) - await getOwnedDeposits({ - realmPk: realm!.pubkey, - communityMintPk: realm!.account.communityMint, - walletPk: wallet!.publicKey!, - client: client!, - connection, - }) - await fetchWalletTokenAccounts() - await fetchRealm(realmInfo!.programId, realmInfo!.realmId) - } catch (e) { - console.log(e) - notify({ message: `Something went wrong ${e}`, type: 'error' }) - } - setIsLoading(false) - } - - const hasTokensInWallet = - realmTokenAccount && realmTokenAccount.account.amount.gt(new BN(0)) - - const depositTooltipContent = !connected - ? 'Connect your wallet to deposit' - : !hasTokensInWallet - ? "You don't have any governance tokens in your wallet to deposit." - : '' - - return ( - - ) -} - -export default DepositCommunityTokensBtn diff --git a/VoteStakeRegistry/components/TokenBalance/LockPluginTokenBalanceCard.tsx b/VoteStakeRegistry/components/TokenBalance/LockPluginTokenBalanceCard.tsx deleted file mode 100644 index 758fe85ecc..0000000000 --- a/VoteStakeRegistry/components/TokenBalance/LockPluginTokenBalanceCard.tsx +++ /dev/null @@ -1,246 +0,0 @@ -import { MintInfo } from '@solana/spl-token' -import { PublicKey } from '@solana/web3.js' -import BN from 'bn.js' -import useRealm from '@hooks/useRealm' -import { getTokenOwnerRecordAddress, Proposal } from '@solana/spl-governance' -import useWalletStore from '../../../stores/useWalletStore' -import { Option } from '@tools/core/option' -import { GoverningTokenType } from '@solana/spl-governance' -import { fmtMintAmount } from '@tools/sdk/units' -import { getMintMetadata } from '@components/instructions/programs/splToken' -import useQueryContext from '@hooks/useQueryContext' -import DepositCommunityTokensBtn from './DepositCommunityTokensBtn' -import WithDrawCommunityTokens from './WithdrawCommunityTokensBtn' -import useDepositStore from 'VoteStakeRegistry/stores/useDepositStore' -import VotingPowerBox from './VotingPowerBox' -import { useEffect, useState } from 'react' -import { ChevronRightIcon } from '@heroicons/react/solid' -import InlineNotification from '@components/InlineNotification' -import Link from 'next/link' -import DelegateTokenBalanceCard from '@components/TokenBalance/DelegateTokenBalanceCard' -import { TokenDeposit } from '@components/TokenBalance/TokenBalanceCard' - -const LockPluginTokenBalanceCard = ({ - proposal, -}: { - proposal?: Option -}) => { - const { fmtUrlWithCluster } = useQueryContext() - const { councilMint, mint, realm, symbol } = useRealm() - const [tokenOwnerRecordPk, setTokenOwneRecordPk] = useState('') - const connected = useWalletStore((s) => s.connected) - const wallet = useWalletStore((s) => s.current) - const isDepositVisible = ( - depositMint: MintInfo | undefined, - realmMint: PublicKey | undefined - ) => - depositMint && - (!proposal || - (proposal.isSome() && - proposal.value.governingTokenMint.toBase58() === realmMint?.toBase58())) - - const communityDepositVisible = - // If there is no council then community deposit is the only option to show - !realm?.account.config.councilMint || - isDepositVisible(mint, realm?.account.communityMint) - - const councilDepositVisible = isDepositVisible( - councilMint, - realm?.account.config.councilMint - ) - - useEffect(() => { - const getTokenOwnerRecord = async () => { - const defaultMint = - !mint?.supply.isZero() || - realm?.account.config.useMaxCommunityVoterWeightAddin - ? realm!.account.communityMint - : !councilMint?.supply.isZero() - ? realm!.account.config.councilMint - : undefined - const tokenOwnerRecordAddress = await getTokenOwnerRecordAddress( - realm!.owner, - realm!.pubkey, - defaultMint!, - wallet!.publicKey! - ) - setTokenOwneRecordPk(tokenOwnerRecordAddress.toBase58()) - } - if (realm && wallet?.connected) { - getTokenOwnerRecord() - } - }, [realm?.pubkey.toBase58(), wallet?.connected]) - - const hasLoaded = mint || councilMint - return ( -
-
-

Your Account

- - - View - - - -
- {hasLoaded ? ( - <> - {communityDepositVisible && ( - - )} - {councilDepositVisible && ( -
- -
- )} - - - ) : ( - <> -
-
- - )} -
- ) -} - -const TokenDepositLock = ({ - mint, - tokenType, -}: { - mint: MintInfo | undefined - tokenType: GoverningTokenType - councilVote?: boolean -}) => { - const { realm, realmTokenAccount, councilTokenAccount } = useRealm() - const connected = useWalletStore((s) => s.connected) - const deposits = useDepositStore((s) => s.state.deposits) - const votingPower = useDepositStore((s) => s.state.votingPower) - const votingPowerFromDeposits = useDepositStore( - (s) => s.state.votingPowerFromDeposits - ) - const lockedTokensAmount = deposits - .filter( - (x) => - typeof x.lockup.kind['none'] === 'undefined' && - x.mint.publicKey.toBase58() === realm?.account.communityMint.toBase58() - ) - .reduce((curr, next) => curr.add(next.currentlyLocked), new BN(0)) - - const depositRecord = deposits.find( - (x) => - x.mint.publicKey.toBase58() === realm!.account.communityMint.toBase58() && - x.lockup.kind.none - ) - // Do not show deposits for mints with zero supply because nobody can deposit anyway - if (!mint || mint.supply.isZero()) { - return null - } - - const depositTokenAccount = - tokenType === GoverningTokenType.Community - ? realmTokenAccount - : councilTokenAccount - - const depositMint = - tokenType === GoverningTokenType.Community - ? realm?.account.communityMint - : realm?.account.config.councilMint - - const tokenName = getMintMetadata(depositMint)?.name ?? realm?.account.name - - const depositTokenName = `${tokenName} ${ - tokenType === GoverningTokenType.Community ? '' : 'Council' - }` - - const hasTokensInWallet = - depositTokenAccount && depositTokenAccount.account.amount.gt(new BN(0)) - - const hasTokensDeposited = - depositRecord && depositRecord.amountDepositedNative.gt(new BN(0)) - - const lockTokensFmt = - lockedTokensAmount && mint ? fmtMintAmount(mint, lockedTokensAmount) : '0' - - const availableTokens = - depositRecord && mint - ? fmtMintAmount(mint, depositRecord.amountDepositedNative) - : '0' - - const canShowAvailableTokensMessage = - !hasTokensDeposited && hasTokensInWallet && connected - const canExecuteAction = !hasTokensDeposited ? 'deposit' : 'withdraw' - const canDepositToken = !hasTokensDeposited && hasTokensInWallet - const tokensToShow = - canDepositToken && depositTokenAccount - ? fmtMintAmount(mint, depositTokenAccount.account.amount) - : canDepositToken - ? availableTokens - : 0 - - return ( - <> - {canShowAvailableTokensMessage ? ( -
- -
- ) : null} -
- -
-
-

- {depositTokenName} Deposited - - {availableTokens} - -

-

- {depositTokenName} Locked - {lockTokensFmt} -

-
- {/*

- You have {tokensToShow} tokens available to {canExecuteAction}. -

*/} - -
- - -
- - ) -} - -export default LockPluginTokenBalanceCard diff --git a/VoteStakeRegistry/components/TokenBalance/VotingPowerBox.tsx b/VoteStakeRegistry/components/TokenBalance/VotingPowerBox.tsx deleted file mode 100644 index 4dcea3a375..0000000000 --- a/VoteStakeRegistry/components/TokenBalance/VotingPowerBox.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { MintInfo } from '@solana/spl-token' -import { getMintDecimalAmount } from '@tools/sdk/units' -import { LightningBoltIcon } from '@heroicons/react/solid' -import Tooltip from '@components/Tooltip' - -const VotingPowerBox = ({ - votingPower, - mint, - votingPowerFromDeposits, - className = '', - style, -}: { - votingPower: BN - mint: MintInfo - votingPowerFromDeposits: BN - className?: string - style?: any -}) => { - const votingPowerFmt = - votingPower && mint - ? getMintDecimalAmount(mint, votingPower).toFormat(0) - : '0' - - return ( -
-

Votes

- - {votingPowerFmt}{' '} - {!votingPowerFromDeposits.isZero() && !votingPower.isZero() && ( - -
- - {`${( - votingPower.toNumber() / votingPowerFromDeposits.toNumber() - ).toFixed(2)}x`} -
-
- )} -
-
- ) -} - -export default VotingPowerBox diff --git a/VoteStakeRegistry/components/TokenBalance/WithdrawCommunityTokensBtn.tsx b/VoteStakeRegistry/components/TokenBalance/WithdrawCommunityTokensBtn.tsx deleted file mode 100644 index 7853afd9fe..0000000000 --- a/VoteStakeRegistry/components/TokenBalance/WithdrawCommunityTokensBtn.tsx +++ /dev/null @@ -1,200 +0,0 @@ -import Button from '@components/Button' -import useRealm from '@hooks/useRealm' -import { getUnrelinquishedVoteRecords } from '@models/api' -import { BN } from '@project-serum/anchor' -import { - getProposal, - ProposalState, - withFinalizeVote, - withRelinquishVote, -} from '@solana/spl-governance' -import { Transaction, TransactionInstruction } from '@solana/web3.js' -import { chunks } from '@utils/helpers' -import { sendTransaction } from '@utils/send' -import useWalletStore from 'stores/useWalletStore' -import { withVoteRegistryWithdraw } from 'VoteStakeRegistry/sdk/withVoteRegistryWithdraw' -import useDepositStore from 'VoteStakeRegistry/stores/useDepositStore' -import { getProgramVersionForRealm } from '@models/registry/api' -import { notify } from '@utils/notifications' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { useState } from 'react' -import Loading from '@components/Loading' -import useNftPluginStore from 'NftVotePlugin/store/nftPluginStore' - -const WithDrawCommunityTokens = () => { - const { getOwnedDeposits } = useDepositStore() - const client = useVotePluginsClientStore((s) => s.state.vsrClient) - const { - realm, - realmInfo, - ownTokenRecord, - proposals, - governances, - tokenRecords, - toManyCommunityOutstandingProposalsForUser, - toManyCouncilOutstandingProposalsForUse, - } = useRealm() - const [isLoading, setIsLoading] = useState(false) - const wallet = useWalletStore((s) => s.current) - const connected = useWalletStore((s) => s.connected) - const connection = useWalletStore((s) => s.connection.current) - const deposits = useDepositStore((s) => s.state.deposits) - const { fetchRealm, fetchWalletTokenAccounts } = useWalletStore( - (s) => s.actions - ) - const maxVoterWeight = - useNftPluginStore((s) => s.state.maxVoteRecord)?.pubkey || undefined - const depositRecord = deposits.find( - (x) => - x.mint.publicKey.toBase58() === realm!.account.communityMint.toBase58() && - x.lockup.kind.none - ) - const withdrawAllTokens = async function () { - setIsLoading(true) - const instructions: TransactionInstruction[] = [] - // If there are unrelinquished votes for the voter then let's release them in the same instruction as convenience - if (ownTokenRecord!.account!.unrelinquishedVotesCount > 0) { - const voteRecords = await getUnrelinquishedVoteRecords( - connection, - realmInfo!.programId, - ownTokenRecord!.account!.governingTokenOwner - ) - - for (const voteRecord of Object.values(voteRecords)) { - let proposal = proposals[voteRecord.account.proposal.toBase58()] - if (!proposal) { - continue - } - - if (proposal.account.state === ProposalState.Voting) { - // If the Proposal is in Voting state refetch it to make sure we have the latest state to avoid false positives - proposal = await getProposal(connection, proposal.pubkey) - if (proposal.account.state === ProposalState.Voting) { - const governance = - governances[proposal.account.governance.toBase58()] - if (proposal.account.getTimeToVoteEnd(governance.account) > 0) { - setIsLoading(false) - // Note: It's technically possible to withdraw the vote here but I think it would be confusing and people would end up unconsciously withdrawing their votes - notify({ - type: 'error', - message: `Can't withdraw tokens while Proposal ${proposal.account.name} is being voted on. Please withdraw your vote first`, - }) - throw new Error( - `Can't withdraw tokens while Proposal ${proposal.account.name} is being voted on. Please withdraw your vote first` - ) - } else { - // finalize proposal before withdrawing tokens so we don't stop the vote from succeeding - await withFinalizeVote( - instructions, - realmInfo!.programId, - getProgramVersionForRealm(realmInfo!), - realm!.pubkey, - proposal.account.governance, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - proposal.account.governingTokenMint, - maxVoterWeight - ) - } - } - } - - // Note: We might hit single transaction limits here (accounts and size) if user has too many unrelinquished votes - // It's not going to be an issue for now due to the limited number of proposals so I'm leaving it for now - // As a temp. work around I'm leaving the 'Release Tokens' button on finalized Proposal to make it possible to release the tokens from one Proposal at a time - await withRelinquishVote( - instructions, - realmInfo!.programId, - proposal.account.governance, - proposal.pubkey, - ownTokenRecord!.pubkey, - proposal.account.governingTokenMint, - voteRecord.pubkey, - ownTokenRecord!.account.governingTokenOwner, - wallet!.publicKey! - ) - } - } - - await withVoteRegistryWithdraw({ - instructions, - walletPk: wallet!.publicKey!, - mintPk: ownTokenRecord!.account.governingTokenMint, - realmPk: realm!.pubkey!, - amount: depositRecord!.amountDepositedNative, - communityMintPk: realm!.account.communityMint, - tokenOwnerRecordPubKey: tokenRecords[wallet!.publicKey!.toBase58()] - .pubkey!, - depositIndex: depositRecord!.index, - connection, - client: client, - }) - - try { - // use chunks of 8 here since we added finalize, - // because previously 9 withdraws used to fit into one tx - const ixChunks = chunks(instructions, 8) - for (const [index, chunk] of ixChunks.entries()) { - const transaction = new Transaction().add(...chunk) - await sendTransaction({ - connection, - wallet: wallet!, - transaction, - sendingMessage: - index == ixChunks.length - 1 - ? 'Withdrawing tokens' - : `Releasing tokens (${index}/${ixChunks.length - 2})`, - successMessage: - index == ixChunks.length - 1 - ? 'Tokens have been withdrawn' - : `Released tokens (${index}/${ixChunks.length - 2})`, - }) - } - await fetchRealm(realmInfo!.programId, realmInfo!.realmId) - await fetchWalletTokenAccounts() - await getOwnedDeposits({ - realmPk: realm!.pubkey, - communityMintPk: realm!.account.communityMint, - walletPk: wallet!.publicKey!, - client: client!, - connection, - }) - } catch (ex) { - console.error( - "Can't withdraw tokens, go to my proposals in account view to check outstanding proposals", - ex - ) - } - setIsLoading(false) - } - const hasTokensDeposited = - depositRecord && depositRecord.amountDepositedNative.gt(new BN(0)) - const withdrawTooltipContent = !connected - ? 'Connect your wallet to withdraw' - : !hasTokensDeposited - ? "You don't have any tokens deposited to withdraw." - : toManyCouncilOutstandingProposalsForUse || - toManyCommunityOutstandingProposalsForUser - ? "You don't have any governance tokens to withdraw." - : '' - return ( - - ) -} - -export default WithDrawCommunityTokens diff --git a/VoteStakeRegistry/components/instructions/Clawback.tsx b/VoteStakeRegistry/components/instructions/Clawback.tsx deleted file mode 100644 index 1c67762f70..0000000000 --- a/VoteStakeRegistry/components/instructions/Clawback.tsx +++ /dev/null @@ -1,268 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { TransactionInstruction } from '@solana/web3.js' -import useWalletStore from 'stores/useWalletStore' -import { tryGetMint } from '@utils/tokens' -import { - ClawbackForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { - Governance, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { NewProposalContext } from 'pages/dao/[symbol]/proposal/new' -import GovernedAccountSelect from 'pages/dao/[symbol]/proposal/components/GovernedAccountSelect' -import * as yup from 'yup' -import { - Deposit, - DepositWithMintAccount, - getRegistrarPDA, - emptyPk, - Voter, -} from 'VoteStakeRegistry/sdk/accounts' -import Select from '@components/inputs/Select' -import { tryGetRegistrar } from 'VoteStakeRegistry/sdk/api' -import { fmtMintAmount } from '@tools/sdk/units' -import tokenService from '@utils/services/token' -import { getClawbackInstruction } from 'VoteStakeRegistry/actions/getClawbackInstruction' -import { abbreviateAddress } from '@utils/formatting' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { AssetAccount } from '@utils/uiTypes/assets' - -const Clawback = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const client = useVotePluginsClientStore((s) => s.state.vsrClient) - const connection = useWalletStore((s) => s.connection) - const { realm } = useRealm() - const { - governedTokenAccountsWithoutNfts, - governancesArray, - } = useGovernanceAssets() - const shouldBeGoverned = index !== 0 && governance - const [voters, setVoters] = useState([]) - const [deposits, setDeposits] = useState([]) - const [form, setForm] = useState({ - governedTokenAccount: undefined, - voter: null, - deposit: 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 }) - } - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - const prerequisiteInstructions: TransactionInstruction[] = [] - if ( - isValid && - form.governedTokenAccount!.extensions.token?.publicKey && - form.governedTokenAccount!.extensions.token && - form.governedTokenAccount!.extensions.mint?.account && - form.voter && - form.deposit - ) { - const clawbackDestination = form.governedTokenAccount!.extensions.token - .account.address - const voterWalletAddress = form.voter.voterAuthority - const clawbackIx = await getClawbackInstruction({ - realmPk: realm!.pubkey, - realmAuthority: realm!.account.authority!, - voterWalletAddress: voterWalletAddress, - destination: clawbackDestination, - voterDepositIndex: form.deposit.index, - grantMintPk: form.deposit.mint.publicKey, - realmCommunityMintPk: realm!.account.communityMint, - client, - }) - serializedInstruction = serializeInstructionToBase64(clawbackIx!) - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: governancesArray.find( - (x) => x.pubkey.toBase58() === realm?.account.authority?.toBase58() - ), - prerequisiteInstructions: prerequisiteInstructions, - chunkSplitByDefault: true, - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: governedAccount, getInstruction }, - index - ) - }, [form]) - useEffect(() => { - setGovernedAccount( - governancesArray.find( - (x) => x.pubkey.toBase58() === realm?.account.authority?.toBase58() - ) - ) - }, [form.governedTokenAccount]) - useEffect(() => { - const getVoters = async () => { - const { registrar } = await getRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - client!.program.programId - ) - const resp = await client?.program.account.voter.all([ - { - memcmp: { - offset: 40, - bytes: registrar.toString(), - }, - }, - ]) - const voters = - resp - ?.filter( - (x) => - (x.account.deposits as Deposit[]).filter( - (depo) => depo.allowClawback - ).length - ) - .map((x) => x.account as Voter) || [] - - setVoters([...voters]) - } - if (client) { - getVoters() - } - }, [client]) - useEffect(() => { - const getOwnedDepositsInfo = async () => { - const { registrar } = await getRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - client!.program.programId - ) - const existingRegistrar = await tryGetRegistrar(registrar, client!) - const mintCfgs = existingRegistrar?.votingMints - const mints = {} - if (mintCfgs) { - for (const i of mintCfgs) { - if (i.mint.toBase58() !== emptyPk) { - const mint = await tryGetMint(connection.current, i.mint) - mints[i.mint.toBase58()] = mint - } - } - } - const deposits = - form.voter?.deposits.map((depo, index) => { - return { - ...depo, - index, - mint: mints[mintCfgs![depo.votingMintConfigIdx].mint.toBase58()], - //warning no currentlyLocked, available, vestingrate props - } as DepositWithMintAccount - }) || [] - setDeposits(deposits) - } - if (form.voter) { - getOwnedDepositsInfo() - } else { - setDeposits([]) - } - setForm({ ...form, deposit: null, governedTokenAccount: undefined }) - }, [form.voter]) - useEffect(() => { - setForm({ ...form, governedTokenAccount: undefined }) - }, [form.deposit]) - const schema = yup.object().shape({ - governedTokenAccount: yup - .object() - .required('Clawback destination required'), - voter: yup.object().nullable().required('Voter required'), - deposit: yup.object().nullable().required('Deposit required'), - }) - - const getOwnedDepositsLabel = (deposit: DepositWithMintAccount | null) => { - const symbol = deposit - ? tokenService.getTokenInfo(deposit.mint.publicKey.toBase58())?.symbol || - '' - : null - return deposit - ? `${fmtMintAmount( - deposit.mint.account, - deposit.amountDepositedNative - )} ${symbol ? symbol : abbreviateAddress(deposit.mint.publicKey)}` - : null - } - return ( - <> - - - - x.extensions.mint?.publicKey.toBase58() === - form.deposit?.mint.publicKey.toBase58() - ) as AssetAccount[] - } - onChange={(value) => { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - ) -} - -export default Clawback diff --git a/VoteStakeRegistry/components/instructions/Grant.tsx b/VoteStakeRegistry/components/instructions/Grant.tsx deleted file mode 100644 index 2f67f1a81f..0000000000 --- a/VoteStakeRegistry/components/instructions/Grant.tsx +++ /dev/null @@ -1,390 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import Input from '@components/inputs/Input' -import useRealm from '@hooks/useRealm' -import { AccountInfo } from '@solana/spl-token' -import { - getMintMinAmountAsDecimal, - parseMintNaturalAmountFromDecimal, -} from '@tools/sdk/units' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' -import { precision } from '@utils/formatting' -import { tryParseKey } from '@tools/validators/pubkey' -import useWalletStore from 'stores/useWalletStore' -import { TokenProgramAccount, tryGetTokenAccount } from '@utils/tokens' -import { GrantForm, UiInstruction } from '@utils/uiTypes/proposalCreationTypes' -import { getAccountName } from '@components/instructions/tools' -import { debounce } from '@utils/debounce' -import { getTokenTransferSchema } from '@utils/validations' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { - Governance, - serializeInstructionToBase64, - withCreateTokenOwnerRecord, -} from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { NewProposalContext } from 'pages/dao/[symbol]/proposal/new' -import GovernedAccountSelect from 'pages/dao/[symbol]/proposal/components/GovernedAccountSelect' -import { lockupTypes } from 'VoteStakeRegistry/tools/types' -import Select from '@components/inputs/Select' -import Switch from '@components/Switch' -import { getFormattedStringFromDays } from 'VoteStakeRegistry/tools/dateTools' -import * as yup from 'yup' -import { getGrantInstruction } from 'VoteStakeRegistry/actions/getGrantInstruction' -import { getRegistrarPDA } from 'VoteStakeRegistry/sdk/accounts' -import { tryGetRegistrar } from 'VoteStakeRegistry/sdk/api' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import dayjs from 'dayjs' -import { AssetAccount } from '@utils/uiTypes/assets' - -const Grant = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const client = useVotePluginsClientStore((s) => s.state.vsrClient) - const dateNow = dayjs().unix() - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realm, tokenRecords } = useRealm() - const { governedTokenAccountsWithoutNfts } = useGovernanceAssets() - const shouldBeGoverned = index !== 0 && governance - const [startDate, setStartDate] = useState(dayjs().format('DD-MM-YYYY')) - const [endDate, setEndDate] = useState('') - const [useableGrantMints, setUseableGrantMints] = useState([]) - const [form, setForm] = useState({ - destinationAccount: '', - // No default transfer amount - amount: undefined, - governedTokenAccount: undefined, - mintInfo: undefined, - startDateUnixSeconds: dateNow, - periods: 0, - allowClawback: true, - lockupKind: lockupTypes[0], - }) - const [governedAccount, setGovernedAccount] = useState< - ProgramAccount | undefined - >(undefined) - const [ - destinationAccount, - setDestinationAccount, - ] = useState | null>(null) - const [formErrors, setFormErrors] = useState({}) - const mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - const currentPrecision = precision(mintMinAmount) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - const prerequisiteInstructions: TransactionInstruction[] = [] - if ( - isValid && - form.governedTokenAccount?.extensions?.token?.publicKey && - form.governedTokenAccount?.extensions?.token && - form.governedTokenAccount?.extensions.mint?.account - ) { - const sourceAccount = - form.governedTokenAccount.extensions.token?.account.address - const destinationAccount = new PublicKey(form.destinationAccount) - const mintAmount = parseMintNaturalAmountFromDecimal( - form.amount!, - form.governedTokenAccount.extensions.mint.account.decimals - ) - const currentTokenOwnerRecord = tokenRecords[form.destinationAccount] - if (!currentTokenOwnerRecord) { - await withCreateTokenOwnerRecord( - prerequisiteInstructions, - realm!.owner, - realm!.pubkey, - destinationAccount, - realm!.account.communityMint, - wallet!.publicKey! - ) - } - const grantIx = await getGrantInstruction({ - fromPk: sourceAccount, - toPk: destinationAccount, - realmMint: realm!.account.communityMint!, - realmPk: realm!.pubkey, - communityMintPk: realm!.account.communityMint, - tokenAuthority: - form.governedTokenAccount.extensions.token.account.owner, - grantMintPk: form.governedTokenAccount.extensions.mint.publicKey, - amount: mintAmount, - lockupPeriod: form.periods, - startTime: form.startDateUnixSeconds, - lockupKind: form.lockupKind.value, - allowClawback: form.allowClawback, - client: client!, - }) - serializedInstruction = serializeInstructionToBase64(grantIx!) - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: form.governedTokenAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - chunkSplitByDefault: true, - } - return obj - } - const handleChangeStartDate = (e) => { - const value = e.target.value - setStartDate(value) - const unixDate = dayjs(value).unix() - handleSetForm({ - value: !isNaN(unixDate) ? unixDate : 0, - propertyName: 'startDateUnixSeconds', - }) - } - const handleChangeEndDate = (e) => { - const value = e.target.value - setEndDate(value) - } - useEffect(() => { - if ( - startDate && - endDate && - dayjs(startDate).isValid() && - dayjs(endDate).isValid() - ) { - const daysDifference = dayjs(endDate).diff(dayjs(startDate), 'days') - const monthsDifference = dayjs(endDate).diff(dayjs(startDate), 'months') - const periods = - form.lockupKind.value !== 'monthly' ? daysDifference : monthsDifference - - handleSetForm({ - value: periods > 0 ? periods : 0, - propertyName: 'periods', - }) - } - }, [startDate, endDate, form.lockupKind.value]) - useEffect(() => { - if (form.destinationAccount) { - debounce.debounceFcn(async () => { - const pubKey = tryParseKey(form.destinationAccount) - if (pubKey) { - const account = await tryGetTokenAccount(connection.current, pubKey) - setDestinationAccount(account ? account : null) - } else { - setDestinationAccount(null) - } - }) - } else { - setDestinationAccount(null) - } - }, [form.destinationAccount]) - useEffect(() => { - handleSetInstructions( - { governedAccount: governedAccount, getInstruction }, - index - ) - }, [form]) - useEffect(() => { - setGovernedAccount(form.governedTokenAccount?.governance) - setMintInfo(form.governedTokenAccount?.extensions.mint?.account) - }, [form.governedTokenAccount]) - const destinationAccountName = - destinationAccount?.publicKey && - getAccountName(destinationAccount?.account.address) - const schema = getTokenTransferSchema({ form, connection }).concat( - yup.object().shape({ - startDateUnixSeconds: yup - .number() - .required('Start date required') - .min(1, 'Start date required'), - periods: yup - .number() - .required('End date required') - .min(1, 'End date cannot be prior to start date'), - }) - ) - useEffect(() => { - const getGrantMints = async () => { - const clientProgramId = client!.program.programId - const { registrar } = await getRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - clientProgramId - ) - const existingRegistrar = await tryGetRegistrar(registrar, client!) - if (existingRegistrar) { - setUseableGrantMints( - existingRegistrar.votingMints.map((x) => x.mint.toBase58()) - ) - } - } - if (client) { - getGrantMints() - } - }, [client]) - return ( - <> - -
{form.lockupKind.info}
- - x.extensions.mint && - useableGrantMints.includes(x.extensions.mint.publicKey.toBase58()) - ) as AssetAccount[] - } - onChange={(value) => { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > -
-
Allow dao to clawback
-
- - handleSetForm({ - value: checked, - propertyName: 'allowClawback', - }) - } - /> -
-
- - {form.lockupKind.value !== 'monthly' ? ( - - ) : ( - { - handleSetForm({ - value: e.target.value, - propertyName: 'periods', - }) - }} - error={formErrors['periods']} - > - )} - {form.periods !== 0 && ( -
-
Period
-
- {form.lockupKind.value !== 'monthly' - ? getFormattedStringFromDays(form.periods) - : `${form.periods || 0} months`} -
-
- )} - - handleSetForm({ - value: evt.target.value, - propertyName: 'destinationAccount', - }) - } - error={formErrors['destinationAccount']} - /> - {destinationAccount && ( -
-
Account owner
-
- {destinationAccount.account.owner.toString()} -
-
- )} - {destinationAccountName && ( -
-
Account name
-
{destinationAccountName}
-
- )} - - {form.lockupKind.value === 'monthly' && - form.amount && - !isNaN(form.amount) && - !isNaN(form.periods) && ( -
Vesting rate: {(form.amount / form.periods).toFixed(2)} p/m
- )} - - ) -} - -export default Grant diff --git a/VoteStakeRegistry/sdk/accounts.tsx b/VoteStakeRegistry/sdk/accounts.tsx deleted file mode 100644 index a935073265..0000000000 --- a/VoteStakeRegistry/sdk/accounts.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { MintInfo } from '@solana/spl-token' -import { PublicKey } from '@solana/web3.js' -import { TokenProgramAccount } from '@utils/tokens' - -export interface Voter { - deposits: Deposit[] - voterAuthority: PublicKey - registrar: PublicKey - //there are more fields but no use for them on ui yet -} - -export interface votingMint { - baselineVoteWeightScaledFactor: BN - digitShift: number - grantAuthority: PublicKey - lockupSaturationSecs: BN - maxExtraLockupVoteWeightScaledFactor: BN - mint: PublicKey -} - -export type LockupType = 'none' | 'monthly' | 'cliff' | 'constant' | 'daily' //there is also daily type but not used on ui yet -export interface Registrar { - governanceProgramId: PublicKey - realm: PublicKey - realmAuthority: PublicKey - realmGoverningTokenMint: PublicKey - votingMints: votingMint[] - //there are more fields but no use for them on ui yet -} -interface LockupKind { - none: object - daily: object - monthly: object - cliff: object - constant: object -} -interface Lockup { - endTs: BN - kind: LockupKind - startTs: BN -} -export interface Deposit { - allowClawback: boolean - amountDepositedNative: BN - amountInitiallyLockedNative: BN - isUsed: boolean - lockup: Lockup - votingMintConfigIdx: number -} -export interface DepositWithMintAccount extends Deposit { - mint: TokenProgramAccount - index: number - available: BN - vestingRate: BN | null - currentlyLocked: BN - nextVestingTimestamp: BN | null - votingPower: BN - votingPowerBaseline: BN -} - -export const emptyPk = '11111111111111111111111111111111' - -export const getRegistrarPDA = async ( - realmPk: PublicKey, - mint: PublicKey, - clientProgramId: PublicKey -) => { - const [registrar, registrarBump] = await PublicKey.findProgramAddress( - [realmPk.toBuffer(), Buffer.from('registrar'), mint.toBuffer()], - clientProgramId - ) - return { - registrar, - registrarBump, - } -} - -export const getVoterPDA = async ( - registrar: PublicKey, - walletPk: PublicKey, - clientProgramId: PublicKey -) => { - const [voter, voterBump] = await PublicKey.findProgramAddress( - [registrar.toBuffer(), Buffer.from('voter'), walletPk.toBuffer()], - clientProgramId - ) - - return { - voter, - voterBump, - } -} - -export const getVoterWeightPDA = async ( - registrar: PublicKey, - walletPk: PublicKey, - clientProgramId: PublicKey -) => { - const [voterWeightPk, voterWeightBump] = await PublicKey.findProgramAddress( - [ - registrar.toBuffer(), - Buffer.from('voter-weight-record'), - walletPk.toBuffer(), - ], - clientProgramId - ) - - return { - voterWeightPk, - voterWeightBump, - } -} diff --git a/VoteStakeRegistry/sdk/api.ts b/VoteStakeRegistry/sdk/api.ts deleted file mode 100644 index 4803cdb250..0000000000 --- a/VoteStakeRegistry/sdk/api.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { NftVoterClient } from '@solana/governance-program-library' -import { PublicKey } from '@solana/web3.js' -import { Registrar, Voter } from './accounts' - -export const tryGetVoter = async (voterPk: PublicKey, client: VsrClient) => { - try { - const voter = await client?.program.account.voter.fetch(voterPk) - return voter as Voter - } catch (e) { - return null - } -} -export const tryGetRegistrar = async ( - registrarPk: PublicKey, - client: VsrClient -) => { - try { - const existingRegistrar = await client.program.account.registrar.fetch( - registrarPk - ) - return existingRegistrar as Registrar - } catch (e) { - return null - } -} - -export const tryGetNftRegistrar = async ( - registrarPk: PublicKey, - client: NftVoterClient -) => { - try { - const existingRegistrar = await client.program.account.registrar.fetch( - registrarPk - ) - return existingRegistrar - } catch (e) { - return null - } -} - -export const getMintCfgIdx = async ( - registrarPk: PublicKey, - mintPK: PublicKey, - client: VsrClient -) => { - const existingRegistrar = await tryGetRegistrar(registrarPk, client) - const mintCfgIdx = existingRegistrar?.votingMints.findIndex( - (x) => x.mint.toBase58() === mintPK.toBase58() - ) - if (mintCfgIdx === null || mintCfgIdx === -1) { - throw 'mint not configured to use' - } - return mintCfgIdx -} diff --git a/VoteStakeRegistry/sdk/withCreateNewDeposit.ts b/VoteStakeRegistry/sdk/withCreateNewDeposit.ts deleted file mode 100644 index 8952535795..0000000000 --- a/VoteStakeRegistry/sdk/withCreateNewDeposit.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { - PublicKey, - SystemProgram, - SYSVAR_INSTRUCTIONS_PUBKEY, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js' -import { withCreateTokenOwnerRecord } from '@solana/spl-governance' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { - getRegistrarPDA, - getVoterPDA, - getVoterWeightPDA, - LockupType, -} from 'VoteStakeRegistry/sdk/accounts' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { getMintCfgIdx, tryGetVoter } from './api' -import { getPeriod } from 'VoteStakeRegistry/tools/deposits' - -export const withCreateNewDeposit = async ({ - instructions, - walletPk, - mintPk, - communityMintPk, - realmPk, - programId, - tokenOwnerRecordPk, - lockUpPeriodInDays, - lockupKind, - client, - allowClawback = false, -}: { - instructions: TransactionInstruction[] - walletPk: PublicKey - mintPk: PublicKey - communityMintPk: PublicKey - realmPk: PublicKey - programId: PublicKey - tokenOwnerRecordPk: PublicKey | null - lockUpPeriodInDays: number - lockupKind: LockupType - allowClawback?: boolean - client?: VsrClient -}) => { - if (!client) { - throw 'no vote registry plugin' - } - const systemProgram = SystemProgram.programId - const clientProgramId = client!.program.programId - let tokenOwnerRecordPubKey = tokenOwnerRecordPk - - const { registrar } = await getRegistrarPDA( - realmPk, - communityMintPk, - clientProgramId - ) - const { voter, voterBump } = await getVoterPDA( - registrar, - walletPk, - clientProgramId - ) - const { voterWeightPk, voterWeightBump } = await getVoterWeightPDA( - registrar, - walletPk, - clientProgramId - ) - const existingVoter = await tryGetVoter(voter, client) - - const voterATAPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - mintPk, - voter, - true - ) - - //spl governance tokenownerrecord pubkey - if (!tokenOwnerRecordPubKey) { - tokenOwnerRecordPubKey = await withCreateTokenOwnerRecord( - instructions, - programId, - realmPk, - walletPk, - mintPk, - walletPk - ) - } - if (!existingVoter) { - const createVoterIx = await client?.program.methods - .createVoter(voterBump, voterWeightBump) - .accounts({ - registrar: registrar, - voter: voter, - voterAuthority: walletPk, - voterWeightRecord: voterWeightPk, - payer: walletPk, - systemProgram: systemProgram, - rent: SYSVAR_RENT_PUBKEY, - instructions: SYSVAR_INSTRUCTIONS_PUBKEY, - }) - .instruction() - instructions.push(createVoterIx) - } - const mintCfgIdx = await getMintCfgIdx(registrar, mintPk, client) - - //none type deposits are used only to store tokens that will be withdrawable immediately so there is no need to create new every time and there should be one per mint - //for other kinds of deposits we always want to create new deposit - const indexOfNoneTypeDeposit = - lockupKind === 'none' - ? existingVoter?.deposits.findIndex( - (x) => - x.isUsed && - typeof x.lockup.kind[lockupKind] !== 'undefined' && - x.votingMintConfigIdx === mintCfgIdx - ) - : -1 - - const createNewDeposit = - typeof indexOfNoneTypeDeposit === 'undefined' || - indexOfNoneTypeDeposit === -1 - - const firstFreeIdx = existingVoter?.deposits?.findIndex((x) => !x.isUsed) || 0 - - if (firstFreeIdx === -1 && createNewDeposit) { - throw 'User has to much active deposits' - } - - if (createNewDeposit) { - //in case we do monthly close up we pass months not days. - const period = getPeriod(lockUpPeriodInDays, lockupKind) - const createDepositEntryInstruction = await client?.program.methods - .createDepositEntry( - firstFreeIdx, - { [lockupKind]: {} }, - //lockup starts now - null, - period, - allowClawback - ) - .accounts({ - registrar: registrar, - voter: voter, - payer: walletPk, - voterAuthority: walletPk, - depositMint: mintPk, - rent: SYSVAR_RENT_PUBKEY, - systemProgram: systemProgram, - tokenProgram: TOKEN_PROGRAM_ID, - associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID, - vault: voterATAPk, - }) - .instruction() - instructions.push(createDepositEntryInstruction) - } - - const depositIdx = !createNewDeposit ? indexOfNoneTypeDeposit! : firstFreeIdx - return { - depositIdx, - registrar, - voterATAPk, - voter, - tokenOwnerRecordPubKey, - voterWeightPk, - } -} diff --git a/VoteStakeRegistry/sdk/withVoteRegistryDeposit.ts b/VoteStakeRegistry/sdk/withVoteRegistryDeposit.ts deleted file mode 100644 index c0d13c9694..0000000000 --- a/VoteStakeRegistry/sdk/withVoteRegistryDeposit.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js' -import { TOKEN_PROGRAM_ID } from '@solana/spl-token' -import { BN } from '@project-serum/anchor' -import { LockupType } from 'VoteStakeRegistry/sdk/accounts' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { withCreateNewDeposit } from './withCreateNewDeposit' - -export const withVoteRegistryDeposit = async ({ - instructions, - walletPk, - fromPk, - mintPk, - realmPk, - programId, - amount, - tokenOwnerRecordPk, - lockUpPeriodInDays, - lockupKind, - communityMintPk, - client, -}: { - instructions: TransactionInstruction[] - walletPk: PublicKey - //from where we deposit our founds - fromPk: PublicKey - mintPk: PublicKey - realmPk: PublicKey - programId: PublicKey - amount: BN - communityMintPk: PublicKey - tokenOwnerRecordPk: PublicKey | null - lockUpPeriodInDays: number - lockupKind: LockupType - client?: VsrClient -}) => { - if (!client) { - throw 'no vote registry plugin' - } - - const { - depositIdx, - voter, - registrar, - voterATAPk, - } = await withCreateNewDeposit({ - instructions, - walletPk, - mintPk, - realmPk, - programId, - tokenOwnerRecordPk, - lockUpPeriodInDays, - lockupKind, - communityMintPk, - client, - }) - const depositInstruction = await client?.program.methods - .deposit(depositIdx, amount) - .accounts({ - registrar: registrar, - voter: voter, - vault: voterATAPk, - depositToken: fromPk, - depositAuthority: walletPk, - tokenProgram: TOKEN_PROGRAM_ID, - }) - .instruction() - instructions.push(depositInstruction) -} diff --git a/VoteStakeRegistry/sdk/withVoteRegistryWithdraw.ts b/VoteStakeRegistry/sdk/withVoteRegistryWithdraw.ts deleted file mode 100644 index f0b643d243..0000000000 --- a/VoteStakeRegistry/sdk/withVoteRegistryWithdraw.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Connection, PublicKey, TransactionInstruction } from '@solana/web3.js' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { BN } from '@project-serum/anchor' -import { - getRegistrarPDA, - getVoterPDA, - getVoterWeightPDA, -} from 'VoteStakeRegistry/sdk/accounts' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { tryGetTokenAccount } from '@utils/tokens' - -export const withVoteRegistryWithdraw = async ({ - instructions, - walletPk, - mintPk, - realmPk, - amount, - tokenOwnerRecordPubKey, - depositIndex, - communityMintPk, - closeDepositAfterOperation, - client, - connection, -}: { - instructions: TransactionInstruction[] - walletPk: PublicKey - mintPk: PublicKey - realmPk: PublicKey - communityMintPk: PublicKey - amount: BN - tokenOwnerRecordPubKey: PublicKey - depositIndex: number - connection: Connection - //if we want to close deposit after doing operation we need to fill this because we can close only deposits that have 0 tokens inside - closeDepositAfterOperation?: boolean - client?: VsrClient -}) => { - if (!client) { - throw 'no vote registry plugin' - } - const clientProgramId = client!.program.programId - - const { registrar } = await getRegistrarPDA( - realmPk, - communityMintPk, - client!.program.programId - ) - const { voter } = await getVoterPDA(registrar, walletPk, clientProgramId) - const { voterWeightPk } = await getVoterWeightPDA( - registrar, - walletPk, - clientProgramId - ) - - const voterATAPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - mintPk, - voter, - true - ) - - const ataPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPk, // mint - walletPk, // owner - true - ) - const isExistingAta = await tryGetTokenAccount(connection, ataPk) - if (!isExistingAta) { - instructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPk, // mint - ataPk, // ata - walletPk, // owner of token account - walletPk // fee payer - ) - ) - } - const withdrawInstruction = await client?.program.methods - .withdraw(depositIndex!, amount) - .accounts({ - registrar: registrar, - voter: voter, - voterAuthority: walletPk, - tokenOwnerRecord: tokenOwnerRecordPubKey, - voterWeightRecord: voterWeightPk, - vault: voterATAPk, - destination: ataPk, - tokenProgram: TOKEN_PROGRAM_ID, - }) - .instruction() - instructions.push(withdrawInstruction) - - if (closeDepositAfterOperation) { - const close = await client.program.methods - .closeDepositEntry(depositIndex) - .accounts({ - voter: voter, - voterAuthority: walletPk, - }) - .instruction() - instructions.push(close) - } -} diff --git a/VoteStakeRegistry/stores/useDepositStore.tsx b/VoteStakeRegistry/stores/useDepositStore.tsx deleted file mode 100644 index 8b1c8d9b0d..0000000000 --- a/VoteStakeRegistry/stores/useDepositStore.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import create, { State } from 'zustand' -import { DepositWithMintAccount } from 'VoteStakeRegistry/sdk/accounts' -import { Connection, PublicKey } from '@solana/web3.js' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { BN } from '@project-serum/anchor' -import { getDeposits } from 'VoteStakeRegistry/tools/deposits' - -interface DepositStore extends State { - state: { - deposits: DepositWithMintAccount[] - votingPower: BN - votingPowerFromDeposits: BN - } - resetDepositState: () => void - getOwnedDeposits: ({ - isUsed, - realmPk, - walletPk, - communityMintPk, - client, - connection, - }: { - isUsed?: boolean | undefined - realmPk: PublicKey - walletPk: PublicKey - communityMintPk: PublicKey - client: VsrClient - connection: Connection - }) => Promise -} - -const defaultState = { - deposits: [], - votingPower: new BN(0), - votingPowerFromDeposits: new BN(0), -} - -const useDepositStore = create((set, _get) => ({ - state: { - ...defaultState, - }, - resetDepositState: () => { - set((s) => { - s.state = { ...defaultState } - }) - }, - getOwnedDeposits: async ({ - isUsed = true, - realmPk, - walletPk, - communityMintPk, - client, - connection, - }) => { - const { - votingPower, - deposits, - votingPowerFromDeposits, - } = await getDeposits({ - isUsed, - realmPk, - walletPk, - communityMintPk, - client, - connection, - }) - - set((s) => { - s.state.votingPower = votingPower - s.state.deposits = deposits - s.state.votingPowerFromDeposits = votingPowerFromDeposits - }) - }, -})) - -export default useDepositStore diff --git a/VoteStakeRegistry/tools/dateTools.ts b/VoteStakeRegistry/tools/dateTools.ts deleted file mode 100644 index 8409bebcd8..0000000000 --- a/VoteStakeRegistry/tools/dateTools.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { DepositWithMintAccount } from 'VoteStakeRegistry/sdk/accounts' - -export const DAYS_PER_YEAR = 365 -export const SECS_PER_DAY = 86400 -export const DAYS_PER_MONTH = DAYS_PER_YEAR / 12 -export const SECS_PER_MONTH = DAYS_PER_MONTH * SECS_PER_DAY -export const HOURS_PER_DAY = 24 -export const MINS_PER_HOUR = 60 - -export function getFormattedStringFromDays( - numberOfDays: number, - fullFormat = false -) { - const years = Math.floor(numberOfDays / DAYS_PER_YEAR) - const months = Math.floor((numberOfDays % DAYS_PER_YEAR) / DAYS_PER_MONTH) - const days = Math.floor((numberOfDays % DAYS_PER_YEAR) % DAYS_PER_MONTH) - const hours = (numberOfDays - Math.floor(numberOfDays)) * HOURS_PER_DAY - const hoursInt = Math.floor(hours) - const minutes = Math.floor((hours - hoursInt) * MINS_PER_HOUR) - const yearSuffix = years > 1 ? ' years' : ' year' - const monthSuffix = months > 1 ? ' months' : ' month' - const daysSuffix = days > 1 ? ' days' : ' day' - const yearsDisplay = - years > 0 ? years + `${fullFormat ? yearSuffix : 'y'} ` : '' - const monthsDisplay = - months > 0 ? months + `${fullFormat ? monthSuffix : 'm'} ` : '' - const daysDisplay = days > 0 ? days + `${fullFormat ? daysSuffix : 'd'} ` : '' - const hoursDisplay = hours > 0 ? `${hoursInt}h ${minutes}min` : '' - const text = - !years && !months && days <= 1 - ? daysDisplay + hoursDisplay - : yearsDisplay + monthsDisplay + daysDisplay - return text ? text : 0 -} - -export const yearsToDays = (years: number) => { - return DAYS_PER_YEAR * years -} -export const daysToYear = (days: number) => { - return days / DAYS_PER_YEAR -} -export const yearsToSecs = (years: number) => { - return DAYS_PER_YEAR * years * SECS_PER_DAY -} - -export const secsToDays = (secs: number) => { - return secs / SECS_PER_DAY -} - -export const daysToMonths = (days: number) => { - return days / DAYS_PER_MONTH -} - -export const getMinDurationFmt = (deposit: DepositWithMintAccount) => { - return getFormattedStringFromDays(getMinDurationInDays(deposit)) -} -export const getTimeLeftFromNowFmt = (deposit: DepositWithMintAccount) => { - const dateNowSecTimeStampBN = new BN(new Date().getTime() / 1000) - return getFormattedStringFromDays( - deposit.lockup.endTs.sub(dateNowSecTimeStampBN).toNumber() / SECS_PER_DAY - ) -} - -export const getMinDurationInDays = (deposit: DepositWithMintAccount) => { - return ( - deposit.lockup.endTs.sub(deposit.lockup.startTs).toNumber() / SECS_PER_DAY - ) -} diff --git a/VoteStakeRegistry/tools/deposits.ts b/VoteStakeRegistry/tools/deposits.ts deleted file mode 100644 index 0153b5ecd4..0000000000 --- a/VoteStakeRegistry/tools/deposits.ts +++ /dev/null @@ -1,242 +0,0 @@ -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { BN, EventParser } from '@project-serum/anchor' -import { - ProgramAccount, - Realm, - simulateTransaction, -} from '@solana/spl-governance' -import { PublicKey, Transaction, Connection } from '@solana/web3.js' -import { tryGetMint } from '@utils/tokens' -import { - getRegistrarPDA, - getVoterPDA, - emptyPk, - DepositWithMintAccount, - LockupType, - Registrar, -} from 'VoteStakeRegistry/sdk/accounts' -import { tryGetVoter, tryGetRegistrar } from 'VoteStakeRegistry/sdk/api' -import { DAYS_PER_MONTH } from './dateTools' -import { MONTHLY } from './types' - -export const getDeposits = async ({ - isUsed = true, - realmPk, - walletPk, - communityMintPk, - client, - connection, -}: { - isUsed?: boolean | undefined - realmPk: PublicKey - walletPk: PublicKey - communityMintPk: PublicKey - client: VsrClient - connection: Connection -}) => { - const clientProgramId = client.program.programId - const { registrar } = await getRegistrarPDA( - realmPk, - communityMintPk, - clientProgramId - ) - const { voter } = await getVoterPDA(registrar, walletPk, clientProgramId) - const existingVoter = await tryGetVoter(voter, client) - const existingRegistrar = await tryGetRegistrar(registrar, client) - const mintCfgs = existingRegistrar?.votingMints || [] - const mints = {} - let votingPower = new BN(0) - let votingPowerFromDeposits = new BN(0) - let deposits: DepositWithMintAccount[] = [] - for (const i of mintCfgs) { - if (i.mint.toBase58() !== emptyPk) { - const mint = await tryGetMint(connection, i.mint) - mints[i.mint.toBase58()] = mint - } - } - if (existingVoter) { - deposits = existingVoter.deposits - .map( - (x, idx) => - ({ - ...x, - mint: mints[mintCfgs![x.votingMintConfigIdx].mint.toBase58()], - index: idx, - } as DepositWithMintAccount) - ) - .filter((x) => typeof isUsed === 'undefined' || x.isUsed === isUsed) - const usedDeposits = deposits.filter((x) => x.isUsed) - const areThereAnyUsedDeposits = usedDeposits.length - if (areThereAnyUsedDeposits) { - const events = await getDepositsAdditionalInfoEvents( - client, - usedDeposits, - connection, - registrar, - voter - ) - const DEPOSIT_EVENT_NAME = 'DepositEntryInfo' - const VOTER_INFO_EVENT_NAME = 'VoterInfo' - const depositsInfo = events.filter((x) => x.name === DEPOSIT_EVENT_NAME) - const votingPowerEntry = events.find( - (x) => x.name === VOTER_INFO_EVENT_NAME - ) - deposits = deposits.map((x) => { - const additionalInfoData = depositsInfo.find( - (info) => info.data.depositEntryIndex === x.index - ).data - - x.currentlyLocked = additionalInfoData.locking?.amount || new BN(0) - x.available = additionalInfoData.unlocked || new BN(0) - x.vestingRate = additionalInfoData.locking?.vesting?.rate || new BN(0) - x.nextVestingTimestamp = - additionalInfoData.locking?.vesting?.nextTimestamp || null - x.votingPower = additionalInfoData.votingPower || new BN(0) - x.votingPowerBaseline = - additionalInfoData.votingPowerBaseline || new BN(0) - return x - }) - if ( - votingPowerEntry && - !votingPowerEntry.data.votingPowerBaseline.isZero() - ) { - votingPowerFromDeposits = votingPowerEntry.data.votingPowerBaseline - } - if (votingPowerEntry && !votingPowerEntry.data.votingPower.isZero()) { - votingPower = votingPowerEntry.data.votingPower - } - return { votingPower, deposits, votingPowerFromDeposits } - } - } - return { votingPower, deposits, votingPowerFromDeposits } -} - -export const calcMultiplier = ({ - depositScaledFactor, - maxExtraLockupVoteWeightScaledFactor, - lockupSecs, - lockupSaturationSecs, -}: { - depositScaledFactor: number - maxExtraLockupVoteWeightScaledFactor: number - lockupSecs: number - lockupSaturationSecs: number -}) => { - // if (isVested) { - // const onMonthSecs = SECS_PER_DAY * DAYS_PER_MONTH - // const n_periods_before_saturation = lockupSaturationSecs / onMonthSecs - // const n_periods = lockupSecs / onMonthSecs - // const n_unsaturated_periods = Math.min( - // n_periods, - // n_periods_before_saturation - // ) - // const n_saturated_periods = Math.max(0, n_periods - n_unsaturated_periods) - // const calc = - // (depositScaledFactor + - // (maxExtraLockupVoteWeightScaledFactor / n_periods) * - // (n_saturated_periods + - // ((n_unsaturated_periods + 1) * n_unsaturated_periods) / - // 2 / - // n_periods_before_saturation)) / - // depositScaledFactor - // return depositScaledFactor !== 0 ? calc : 0 - // } - const calc = - (depositScaledFactor + - (maxExtraLockupVoteWeightScaledFactor * - Math.min(lockupSecs, lockupSaturationSecs)) / - lockupSaturationSecs) / - depositScaledFactor - return depositScaledFactor !== 0 ? calc : 0 -} - -export const getPeriod = ( - lockUpPeriodInDays: number, - lockupKind: LockupType -) => { - //in case we do monthly close up we pass months not days. - const period = - lockupKind !== MONTHLY - ? lockUpPeriodInDays - : lockUpPeriodInDays / DAYS_PER_MONTH - // const maxMonthsNumber = 72 - // const daysLimit = 2190 - //additional prevention of lockup being to high in case of monthly lockup 72 months as 6 years - //in case of other types 2190 days as 6 years - // if (lockupKind === MONTHLY && period > maxMonthsNumber) { - // throw 'lockup period is to hight' - // } - // if (lockupKind !== MONTHLY && period > daysLimit) { - // throw 'lockup period is to hight' - // } - return period -} - -export const calcMintMultiplier = ( - lockupSecs: number, - registrar: Registrar | null, - realm: ProgramAccount | undefined -) => { - const mintCfgs = registrar?.votingMints - const mintCfg = mintCfgs?.find( - (x) => x.mint.toBase58() === realm?.account.communityMint.toBase58() - ) - if (mintCfg) { - const { - lockupSaturationSecs, - baselineVoteWeightScaledFactor, - maxExtraLockupVoteWeightScaledFactor, - } = mintCfg - const depositScaledFactorNum = baselineVoteWeightScaledFactor.toNumber() - const maxExtraLockupVoteWeightScaledFactorNum = maxExtraLockupVoteWeightScaledFactor.toNumber() - const lockupSaturationSecsNum = lockupSaturationSecs.toNumber() - //(deposit_scaled_factor + max_extra_lockup_vote_weight_scaled_factor * min(lockup_secs, lockup_saturation_secs) / lockup_saturation_secs) / deposit_scaled_factor - const calced = calcMultiplier({ - depositScaledFactor: depositScaledFactorNum, - maxExtraLockupVoteWeightScaledFactor: maxExtraLockupVoteWeightScaledFactorNum, - lockupSaturationSecs: lockupSaturationSecsNum, - lockupSecs, - }) - - return parseFloat(calced.toFixed(2)) - } - return 0 -} - -const getDepositsAdditionalInfoEvents = async ( - client: VsrClient, - usedDeposits: DepositWithMintAccount[], - connection: Connection, - registrar: PublicKey, - voter: PublicKey -) => { - // The wallet can be any existing account for the simulation - // Note: when running a local validator ensure the account is copied from devnet: --clone ENmcpFCpxN1CqyUjuog9yyUVfdXBKF3LVCwLr7grJZpk -ud - const walletPk = new PublicKey('ENmcpFCpxN1CqyUjuog9yyUVfdXBKF3LVCwLr7grJZpk') - //because we switch wallet in here we can't use rpc from npm module - //anchor dont allow to switch wallets inside existing client - //parse events response as anchor do - const events: any[] = [] - const parser = new EventParser(client.program.programId, client.program.coder) - const maxRange = 8 - const maxIndex = Math.max(...usedDeposits.map((x) => x.index)) + 1 - const numberOfSimulations = Math.ceil(maxIndex / maxRange) - for (let i = 0; i < numberOfSimulations; i++) { - const take = maxRange - const transaction = new Transaction({ feePayer: walletPk }) - const logVoterInfoIx = await client.program.methods - .logVoterInfo(maxRange * i, take) - .accounts({ registrar, voter }) - .instruction() - transaction.add(logVoterInfoIx) - const batchOfDeposits = await simulateTransaction( - connection, - transaction, - 'recent' - ) - parser.parseLogs(batchOfDeposits.value.logs!, (event) => { - events.push(event) - }) - } - return events -} diff --git a/VoteStakeRegistry/tools/types.ts b/VoteStakeRegistry/tools/types.ts deleted file mode 100644 index 464bf9529b..0000000000 --- a/VoteStakeRegistry/tools/types.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { LockupType } from 'VoteStakeRegistry/sdk/accounts' - -export interface Period { - defaultValue: number - display: string -} -export interface LockupKind { - value: LockupType - info: string[] - displayName: string -} -export interface VestingPeriod { - value: number - display: string - info: string -} -export const MONTHLY = 'monthly' -export const CONSTANT = 'constant' -export const lockupTypes: LockupKind[] = [ - { - value: 'cliff', - displayName: 'Cliff', - info: [ - 'Tokens are locked for a fixed duration and are released in full at the end of it.', - 'Vote weight declines linearly until release.', - 'Example: You lock 10.000 tokens for two years. They are then unavailable for the next two years. After this time, you can withdraw them again.', - ], - }, - { - value: CONSTANT, - displayName: 'Constant', - info: [ - 'Tokens are locked indefinitely. At any time you can start the unlock process which lasts for the initially chosen lockup duration.', - 'Vote weight stays constant until you start the unlock process, then it declines linearly until release.', - 'Example: You lock 10.000 tokens with a lockup duration of one year. After two years you decide to start the unlocking process. Another year after that, you can withdraw the tokens.', - ], - }, - { - value: MONTHLY, - displayName: 'Vested', - info: [ - 'Tokens are locked for a fixed duration and released over time at a rate of (locked amount / number of periods) per vesting period.', - 'Vote weight declines linearly and with each vesting until release.', - 'Example: You lock 12.000 tokens for one year with monthly vesting. Every month 1.000 tokens unlock. After the year, all tokens have unlocked.', - ], - }, -] - -export const vestingPeriods: VestingPeriod[] = [ - { - value: 30, - display: 'Monthly', - info: 'per month', - }, -] diff --git a/actions/cancelProposal.ts b/actions/cancelProposal.ts deleted file mode 100644 index c3a345107a..0000000000 --- a/actions/cancelProposal.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' - -import { getGovernanceProgramVersion, RpcContext } from '@solana/spl-governance' -import { Proposal } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { sendTransaction } from 'utils/send' -import { withCancelProposal } from '@solana/spl-governance' - -export const cancelProposal = async ( - { connection, wallet, programId, walletPubkey }: RpcContext, - realmPk: PublicKey, - proposal: ProgramAccount | undefined -) => { - const instructions: TransactionInstruction[] = [] - const signers: Keypair[] = [] - const governanceAuthority = walletPubkey - - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - withCancelProposal( - instructions, - programId, - programVersion, - realmPk, - proposal!.account.governance, - proposal!.pubkey, - proposal!.account.tokenOwnerRecord, - governanceAuthority - ) - - const transaction = new Transaction({ feePayer: walletPubkey }) - - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: 'Cancelling proposal', - successMessage: 'Proposal cancelled', - }) -} diff --git a/actions/castVote.ts b/actions/castVote.ts deleted file mode 100644 index fad78907ad..0000000000 --- a/actions/castVote.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { Keypair, Transaction, TransactionInstruction } from '@solana/web3.js' -import { - ChatMessageBody, - getGovernanceProgramVersion, - GOVERNANCE_CHAT_PROGRAM_ID, - Proposal, - Realm, - TokenOwnerRecord, - withPostChatMessage, - YesNoVote, -} from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' - -import { Vote } from '@solana/spl-governance' - -import { withCastVote } from '@solana/spl-governance' -import { VotingClient } from '@utils/uiTypes/VotePlugin' -import { chunks } from '@utils/helpers' -import { - sendTransactionsV2, - SequenceType, - transactionInstructionsToTypedInstructionsSets, -} from '@utils/sendTransactions' -import { sendTransaction } from '@utils/send' -import { NftVoterClient } from '@solana/governance-program-library' - -export async function castVote( - { connection, wallet, programId, walletPubkey }: RpcContext, - realm: ProgramAccount, - proposal: ProgramAccount, - tokeOwnerRecord: ProgramAccount, - yesNoVote: YesNoVote, - message?: ChatMessageBody | undefined, - votingPlugin?: VotingClient -) { - const signers: Keypair[] = [] - const instructions: TransactionInstruction[] = [] - - const governanceAuthority = walletPubkey - const payer = walletPubkey - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - //will run only if any plugin is connected with realm - const plugin = await votingPlugin?.withCastPluginVote( - instructions, - proposal, - tokeOwnerRecord - ) - - await withCastVote( - instructions, - programId, - programVersion, - realm.pubkey, - proposal.account.governance, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - tokeOwnerRecord.pubkey, - governanceAuthority, - proposal.account.governingTokenMint, - Vote.fromYesNoVote(yesNoVote), - payer, - plugin?.voterWeightPk, - plugin?.maxVoterWeightRecord - ) - - if (message) { - const plugin = await votingPlugin?.withUpdateVoterWeightRecord( - instructions, - tokeOwnerRecord, - 'commentProposal' - ) - await withPostChatMessage( - instructions, - signers, - GOVERNANCE_CHAT_PROGRAM_ID, - programId, - realm.pubkey, - proposal.account.governance, - proposal.pubkey, - tokeOwnerRecord.pubkey, - governanceAuthority, - payer, - undefined, - message, - plugin?.voterWeightPk - ) - } - const shouldChunk = votingPlugin?.client instanceof NftVoterClient - const instructionsCountThatMustHaveTheirOwnChunk = message ? 4 : 2 - if (shouldChunk) { - const instructionsWithTheirOwnChunk = instructions.slice( - -instructionsCountThatMustHaveTheirOwnChunk - ) - const remainingInstructionsToChunk = instructions.slice( - 0, - instructions.length - instructionsCountThatMustHaveTheirOwnChunk - ) - const splInstructionsWithAccountsChunk = chunks( - instructionsWithTheirOwnChunk, - 2 - ) - const nftsAccountsChunks = chunks(remainingInstructionsToChunk, 2) - const signerChunks = Array( - splInstructionsWithAccountsChunk.length + nftsAccountsChunks.length - ).fill([]) - const singersMap = message - ? [...signerChunks.slice(0, signerChunks.length - 1), signers] - : signerChunks - const instructionsChunks = [ - ...nftsAccountsChunks.map((x) => - transactionInstructionsToTypedInstructionsSets(x, SequenceType.Parallel) - ), - ...splInstructionsWithAccountsChunk.map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Sequential - ) - ), - ] - await sendTransactionsV2({ - connection, - wallet, - TransactionInstructions: instructionsChunks, - signersSet: singersMap, - showUiComponent: true, - }) - } else { - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ transaction, wallet, connection, signers }) - } -} diff --git a/actions/chat/postMessage.ts b/actions/chat/postMessage.ts deleted file mode 100644 index 3965d01935..0000000000 --- a/actions/chat/postMessage.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { - PublicKey, - Keypair, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { - GOVERNANCE_CHAT_PROGRAM_ID, - Proposal, - Realm, - TokenOwnerRecord, -} from '@solana/spl-governance' -import { ChatMessageBody } from '@solana/spl-governance' -import { withPostChatMessage } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { sendTransaction } from '../../utils/send' -import { VotingClient } from '@utils/uiTypes/VotePlugin' - -export async function postChatMessage( - { connection, wallet, programId, walletPubkey }: RpcContext, - realm: ProgramAccount, - proposal: ProgramAccount, - tokeOwnerRecord: ProgramAccount, - body: ChatMessageBody, - replyTo?: PublicKey, - client?: VotingClient -) { - const signers: Keypair[] = [] - const instructions: TransactionInstruction[] = [] - - const governanceAuthority = walletPubkey - const payer = walletPubkey - //will run only if plugin is connected with realm - const plugin = await client?.withUpdateVoterWeightRecord( - instructions, - tokeOwnerRecord, - 'commentProposal' - ) - - await withPostChatMessage( - instructions, - signers, - GOVERNANCE_CHAT_PROGRAM_ID, - programId, - realm.pubkey, - proposal.account.governance, - proposal.pubkey, - tokeOwnerRecord.pubkey, - governanceAuthority, - payer, - replyTo, - body, - plugin?.voterWeightPk - ) - - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ transaction, wallet, connection, signers }) -} diff --git a/actions/createMultisigRealm.ts b/actions/createMultisigRealm.ts deleted file mode 100644 index 7968b3b89b..0000000000 --- a/actions/createMultisigRealm.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { - getTokenOwnerRecordAddress, - GovernanceConfig, - MintMaxVoteWeightSource, - SetRealmAuthorityAction, - VoteThresholdPercentage, - VoteTipping, - withCreateNativeTreasury, -} from '@solana/spl-governance' - -import { withCreateMintGovernance } from '@solana/spl-governance' -import { withCreateRealm } from '@solana/spl-governance' -import { withDepositGoverningTokens } from '@solana/spl-governance' -import { withSetRealmAuthority } from '@solana/spl-governance' -import { BN } from '@project-serum/anchor' -import { - Connection, - Keypair, - PublicKey, - TransactionInstruction, -} from '@solana/web3.js' - -import { withCreateAssociatedTokenAccount } from '@tools/sdk/splToken/withCreateAssociatedTokenAccount' -import { withCreateMint } from '@tools/sdk/splToken/withCreateMint' -import { withMintTo } from '@tools/sdk/splToken/withMintTo' -import { - getMintNaturalAmountFromDecimalAsBN, - getTimestampFromDays, -} from '@tools/sdk/units' -import { - getWalletPublicKey, - sendTransactionsV2, - SequenceType, - transactionInstructionsToTypedInstructionsSets, - WalletSigner, -} from 'utils/sendTransactions' -import { chunks } from '@utils/helpers' -import { MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY } from '@tools/constants' - -/// Creates multisig realm with community mint with 0 supply -/// and council mint used as multisig token -export const createMultisigRealm = async ( - connection: Connection, - programId: PublicKey, - programVersion: number, - - name: string, - yesVoteThreshold: number, - councilWalletPks: PublicKey[], - - wallet: WalletSigner -) => { - const walletPk = getWalletPublicKey(wallet) - - const mintsSetupInstructions: TransactionInstruction[] = [] - const councilMembersInstructions: TransactionInstruction[] = [] - - const mintsSetupSigners: Keypair[] = [] - - // Default to 100% supply - const communityMintMaxVoteWeightSource = - MintMaxVoteWeightSource.FULL_SUPPLY_FRACTION - - // The community mint is going to have 0 supply and we arbitrarily set it to 1m - const minCommunityTokensToCreate = MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY - - // Community mint decimals - const communityMintDecimals = 6 - - // Create community mint - const communityMintPk = await withCreateMint( - connection, - mintsSetupInstructions, - mintsSetupSigners, - walletPk, - null, - communityMintDecimals, - walletPk - ) - - // Create council mint - const councilMintPk = await withCreateMint( - connection, - mintsSetupInstructions, - mintsSetupSigners, - walletPk, - null, - 0, - walletPk - ) - - let walletAtaPk: PublicKey | undefined - const tokenAmount = 1 - - for (const teamWalletPk of councilWalletPks) { - const ataPk = await withCreateAssociatedTokenAccount( - councilMembersInstructions, - councilMintPk, - teamWalletPk, - walletPk - ) - - // Mint 1 council token to each team member - await withMintTo( - councilMembersInstructions, - councilMintPk, - ataPk, - walletPk, - tokenAmount - ) - - if (teamWalletPk.equals(walletPk)) { - walletAtaPk = ataPk - } - } - - // Create realm - const realmInstructions: TransactionInstruction[] = [] - const realmSigners: Keypair[] = [] - - // Convert to mint natural amount - const minCommunityTokensToCreateAsMintValue = getMintNaturalAmountFromDecimalAsBN( - minCommunityTokensToCreate, - communityMintDecimals - ) - - const realmPk = await withCreateRealm( - realmInstructions, - programId, - programVersion, - name, - walletPk, - communityMintPk, - walletPk, - councilMintPk, - communityMintMaxVoteWeightSource, - minCommunityTokensToCreateAsMintValue, - undefined - ) - - let tokenOwnerRecordPk: PublicKey - - // If the current wallet is in the team then deposit the council token - if (walletAtaPk) { - await withDepositGoverningTokens( - realmInstructions, - programId, - programVersion, - realmPk, - walletAtaPk, - councilMintPk, - walletPk, - walletPk, - walletPk, - new BN(tokenAmount) - ) - - // TODO: return from withDepositGoverningTokens in the SDK - tokenOwnerRecordPk = await getTokenOwnerRecordAddress( - programId, - realmPk, - councilMintPk, - walletPk - ) - } else { - // Let's throw for now if the current wallet isn't in the team - // TODO: To fix it we would have to make it temp. as part of the team and then remove after the realm is created - throw new Error('Current wallet must be in the team') - } - - // Put community and council mints under the realm governance with default config - const config = new GovernanceConfig({ - voteThresholdPercentage: new VoteThresholdPercentage({ - value: yesVoteThreshold, - }), - minCommunityTokensToCreateProposal: minCommunityTokensToCreateAsMintValue, - // Do not use instruction hold up time - minInstructionHoldUpTime: 0, - // max voting time 3 days - maxVotingTime: getTimestampFromDays(3), - voteTipping: VoteTipping.Strict, - proposalCoolOffTime: 0, - minCouncilTokensToCreateProposal: new BN(1), - }) - - const communityMintGovPk = await withCreateMintGovernance( - realmInstructions, - programId, - programVersion, - realmPk, - communityMintPk, - config, - !!walletPk, - walletPk, - tokenOwnerRecordPk, - walletPk, - walletPk - ) - - await withCreateMintGovernance( - realmInstructions, - programId, - programVersion, - realmPk, - councilMintPk, - config, - !!walletPk, - walletPk, - tokenOwnerRecordPk, - walletPk, - walletPk - ) - - await withCreateNativeTreasury( - realmInstructions, - programId, - communityMintGovPk, - walletPk - ) - - console.log('CREATE NFT REALM governance config created', config) - - // Set the community governance as the realm authority - withSetRealmAuthority( - realmInstructions, - programId, - programVersion, - realmPk, - walletPk, - communityMintGovPk, - SetRealmAuthorityAction.SetChecked - ) - - try { - const councilMembersChunks = chunks(councilMembersInstructions, 10) - // only walletPk needs to sign the minting instructions and it's a signer by default and we don't have to include any more signers - const councilMembersSignersChunks = Array(councilMembersChunks.length).fill( - [] - ) - - const tx = await sendTransactionsV2({ - connection, - showUiComponent: true, - wallet, - signersSet: [ - mintsSetupSigners, - ...councilMembersSignersChunks, - realmSigners, - ], - TransactionInstructions: [ - mintsSetupInstructions, - ...councilMembersChunks, - realmInstructions, - ].map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Sequential - ) - ), - }) - - return { - tx, - realmPk, - communityMintPk, - councilMintPk, - } - } catch (ex) { - console.error(ex) - throw ex - } -} diff --git a/actions/createMultisigWallet.ts b/actions/createMultisigWallet.ts deleted file mode 100644 index d28010c8e1..0000000000 --- a/actions/createMultisigWallet.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Connection, PublicKey } from '@solana/web3.js' - -import { - sendTransactionsV2, - SequenceType, - transactionInstructionsToTypedInstructionsSets, - WalletSigner, -} from 'utils/sendTransactions' -import { chunks } from '@utils/helpers' - -import { prepareRealmCreation } from '@tools/governance/prepareRealmCreation' - -/// Creates multisig realm with community mint with 0 supply -/// and council mint used as multisig token -interface MultisigWallet { - connection: Connection - wallet: WalletSigner - programIdAddress: string - - realmName: string - councilYesVotePercentage: number - councilWalletPks: PublicKey[] -} - -export default async function createMultisigWallet({ - connection, - wallet, - programIdAddress, - realmName, - - councilYesVotePercentage, - councilWalletPks, -}: MultisigWallet) { - const { - communityMintPk, - councilMintPk, - realmPk, - realmInstructions, - realmSigners, - mintsSetupInstructions, - mintsSetupSigners, - councilMembersInstructions, - } = await prepareRealmCreation({ - connection, - wallet, - programIdAddress, - - realmName, - tokensToGovernThreshold: undefined, - - existingCommunityMintPk: undefined, - communityMintSupplyFactor: undefined, - transferCommunityMintAuthority: true, - communityYesVotePercentage: councilYesVotePercentage, - - createCouncil: true, - existingCouncilMintPk: undefined, - transferCouncilMintAuthority: true, - councilWalletPks, - }) - - try { - const councilMembersChunks = chunks(councilMembersInstructions, 10) - // only walletPk needs to sign the minting instructions and it's a signer by default and we don't have to include any more signers - const councilMembersSignersChunks = Array(councilMembersChunks.length).fill( - [] - ) - console.log('CREATE MULTISIG WALLET: sending transactions') - const tx = await sendTransactionsV2({ - connection, - showUiComponent: true, - wallet, - signersSet: [ - mintsSetupSigners, - ...councilMembersSignersChunks, - realmSigners, - ], - TransactionInstructions: [ - mintsSetupInstructions, - ...councilMembersChunks, - realmInstructions, - ].map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Sequential - ) - ), - }) - - return { - tx, - realmPk, - communityMintPk, - councilMintPk, - } - } catch (ex) { - console.error(ex) - throw ex - } -} diff --git a/actions/createNFTRealm.ts b/actions/createNFTRealm.ts deleted file mode 100644 index 904aae0b73..0000000000 --- a/actions/createNFTRealm.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { - SetRealmAuthorityAction, - SYSTEM_PROGRAM_ID, - withCreateTokenOwnerRecord, - withSetRealmAuthority, -} from '@solana/spl-governance' - -import { - Connection, - Keypair, - PublicKey, - TransactionInstruction, -} from '@solana/web3.js' -import { AnchorProvider, Wallet } from '@project-serum/anchor' - -import { - sendTransactionsV2, - SequenceType, - WalletSigner, - transactionInstructionsToTypedInstructionsSets, -} from 'utils/sendTransactions' -import { chunks } from '@utils/helpers' -import { nftPluginsPks } from '@hooks/useVotingPlugins' - -import { - getNftVoterWeightRecord, - getNftMaxVoterWeightRecord, - getNftRegistrarPDA, -} from 'NftVotePlugin/sdk/accounts' -import { NftVoterClient } from '@solana/governance-program-library' - -import { prepareRealmCreation } from '@tools/governance/prepareRealmCreation' -interface NFTRealm { - connection: Connection - wallet: WalletSigner - programIdAddress: string - - realmName: string - collectionAddress: string - collectionCount: number - tokensToGovernThreshold: number | undefined - - communityYesVotePercentage: number - existingCommunityMintPk: PublicKey | undefined - // communityMintSupplyFactor: number | undefined - - createCouncil: boolean - existingCouncilMintPk: PublicKey | undefined - transferCouncilMintAuthority: boolean | undefined - councilWalletPks: PublicKey[] -} - -export default async function createNFTRealm({ - connection, - wallet, - programIdAddress, - realmName, - tokensToGovernThreshold = 1, - - collectionAddress, - collectionCount, - - existingCommunityMintPk, - communityYesVotePercentage, - // communityMintSupplyFactor: rawCMSF, - - createCouncil = false, - existingCouncilMintPk, - transferCouncilMintAuthority = true, - // councilYesVotePercentage, - councilWalletPks, -}: NFTRealm) { - const options = AnchorProvider.defaultOptions() - const provider = new AnchorProvider(connection, wallet as Wallet, options) - const nftClient = await NftVoterClient.connect(provider) - - const { - communityMintGovPk, - communityMintPk, - councilMintPk, - realmPk, - walletPk, - programIdPk, - programVersion, - minCommunityTokensToCreateAsMintValue, - realmInstructions, - realmSigners, - mintsSetupInstructions, - mintsSetupSigners, - councilMembersInstructions, - } = await prepareRealmCreation({ - connection, - wallet, - programIdAddress, - - realmName, - tokensToGovernThreshold, - - existingCommunityMintPk, - nftCollectionCount: collectionCount, - communityMintSupplyFactor: undefined, - transferCommunityMintAuthority: false, // delay this until we have created NFT instructions - communityYesVotePercentage, - - createCouncil, - existingCouncilMintPk, - transferCouncilMintAuthority, - councilWalletPks, - - additionalRealmPlugins: [ - new PublicKey(nftPluginsPks[0]), - new PublicKey(nftPluginsPks[0]), - ], - }) - - console.log('NFT REALM realm public-key', realmPk.toBase58()) - const { registrar } = await getNftRegistrarPDA( - realmPk, - communityMintPk, - nftClient!.program.programId - ) - const instructionCR = await nftClient!.program.methods - .createRegistrar(10) // Max collections - .accounts({ - registrar, - realm: realmPk, - governanceProgramId: programIdPk, - // realmAuthority: communityMintGovPk, - realmAuthority: walletPk, - governingTokenMint: communityMintPk, - payer: walletPk, - systemProgram: SYSTEM_PROGRAM_ID, - }) - .instruction() - - console.log( - 'CREATE NFT REALM registrar PDA', - registrar.toBase58(), - instructionCR - ) - - const { maxVoterWeightRecord } = await getNftMaxVoterWeightRecord( - realmPk, - communityMintPk, - nftClient!.program.programId - ) - const instructionMVWR = await nftClient!.program.methods - .createMaxVoterWeightRecord() - .accounts({ - maxVoterWeightRecord, - governanceProgramId: programIdPk, - realm: realmPk, - realmGoverningTokenMint: communityMintPk, - payer: walletPk, - systemProgram: SYSTEM_PROGRAM_ID, - }) - .instruction() - console.log( - 'CREATE NFT REALM max voter weight record', - maxVoterWeightRecord.toBase58(), - instructionMVWR - ) - - const instructionCC = await nftClient!.program.methods - .configureCollection(minCommunityTokensToCreateAsMintValue, collectionCount) - .accounts({ - registrar, - realm: realmPk, - // realmAuthority: communityMintGovPk, - realmAuthority: walletPk, - collection: new PublicKey(collectionAddress), - maxVoterWeightRecord: maxVoterWeightRecord, - }) - .instruction() - - console.log( - 'CREATE NFT REALM configure collection', - minCommunityTokensToCreateAsMintValue, - instructionCC - ) - - const nftConfigurationInstructions: TransactionInstruction[] = [ - instructionCR, - instructionMVWR, - instructionCC, - ] - - // Set the community governance as the realm authority - withSetRealmAuthority( - nftConfigurationInstructions, - programIdPk, - programVersion, - realmPk, - walletPk, - communityMintGovPk, - SetRealmAuthorityAction.SetChecked - ) - - const { voterWeightPk } = await getNftVoterWeightRecord( - realmPk, - communityMintPk, - walletPk, - nftClient.program.programId - ) - console.log('NFT realm voter weight', voterWeightPk.toBase58()) - const createVoterWeightRecord = await nftClient.program.methods - .createVoterWeightRecord(walletPk) - .accounts({ - voterWeightRecord: voterWeightPk, - governanceProgramId: programIdPk, - realm: realmPk, - realmGoverningTokenMint: communityMintPk, - payer: walletPk, - systemProgram: SYSTEM_PROGRAM_ID, - }) - .instruction() - console.log( - 'NFT realm voter weight record instruction', - createVoterWeightRecord - ) - nftConfigurationInstructions.push(createVoterWeightRecord) - await withCreateTokenOwnerRecord( - nftConfigurationInstructions, - programIdPk, - realmPk, - walletPk, - communityMintPk, - walletPk - ) - - try { - const councilMembersChunks = chunks(councilMembersInstructions, 10) - // only walletPk needs to sign the minting instructions and it's a signer by default and we don't have to include any more signers - const councilMembersSignersChunks = Array(councilMembersChunks.length).fill( - [] - ) - const nftSigners: Keypair[] = [] - console.log('CREATE NFT REALM: sending transactions') - const tx = await sendTransactionsV2({ - connection, - showUiComponent: true, - wallet, - signersSet: [ - mintsSetupSigners, - ...councilMembersSignersChunks, - realmSigners, - nftSigners, - ], - TransactionInstructions: [ - mintsSetupInstructions, - ...councilMembersChunks, - realmInstructions, - nftConfigurationInstructions, - ].map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Sequential - ) - ), - }) - - return { - tx, - realmPk, - communityMintPk, - councilMintPk, - } - } catch (ex) { - console.error(ex) - throw ex - } -} diff --git a/actions/createProposal.ts b/actions/createProposal.ts deleted file mode 100644 index bfebb51a90..0000000000 --- a/actions/createProposal.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' - -import { - getGovernanceProgramVersion, - getInstructionDataFromBase64, - getSignatoryRecordAddress, - Governance, - ProgramAccount, - Realm, - TokenOwnerRecord, - VoteType, - withCreateProposal, -} from '@solana/spl-governance' -import { withAddSignatory } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { withInsertTransaction } from '@solana/spl-governance' -import { InstructionData } from '@solana/spl-governance' -import { sendTransaction } from 'utils/send' -import { withSignOffProposal } from '@solana/spl-governance' -import { - sendTransactionsV2, - SequenceType, - transactionInstructionsToTypedInstructionsSets, -} from '@utils/sendTransactions' -import { chunks } from '@utils/helpers' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' -import { VotingClient } from '@utils/uiTypes/VotePlugin' -import { NftVoterClient } from '@solana/governance-program-library' - -export interface InstructionDataWithHoldUpTime { - data: InstructionData | null - holdUpTime: number | undefined - prerequisiteInstructions: TransactionInstruction[] - chunkSplitByDefault?: boolean - chunkBy?: number - signers?: Keypair[] - shouldSplitIntoSeparateTxs?: boolean | undefined -} - -export class InstructionDataWithHoldUpTime { - constructor({ - instruction, - governance, - }: { - instruction: UiInstruction - governance?: ProgramAccount - }) { - this.data = instruction.serializedInstruction - ? getInstructionDataFromBase64(instruction.serializedInstruction) - : null - this.holdUpTime = - typeof instruction.customHoldUpTime !== 'undefined' - ? instruction.customHoldUpTime - : governance?.account?.config.minInstructionHoldUpTime - this.prerequisiteInstructions = instruction.prerequisiteInstructions || [] - this.chunkSplitByDefault = instruction.chunkSplitByDefault || false - this.chunkBy = instruction.chunkBy || 2 - } -} - -export const createProposal = async ( - { connection, wallet, programId, walletPubkey }: RpcContext, - realm: ProgramAccount, - governance: PublicKey, - tokenOwnerRecord: ProgramAccount, - name: string, - descriptionLink: string, - governingTokenMint: PublicKey, - proposalIndex: number, - instructionsData: InstructionDataWithHoldUpTime[], - isDraft: boolean, - client?: VotingClient -): Promise => { - const instructions: TransactionInstruction[] = [] - - const governanceAuthority = walletPubkey - const signatory = walletPubkey - const payer = walletPubkey - const notificationTitle = isDraft ? 'proposal draft' : 'proposal' - const prerequisiteInstructions: TransactionInstruction[] = [] - - // sum up signers - const signers: Keypair[] = instructionsData.flatMap((x) => x.signers ?? []) - const shouldSplitIntoSeparateTxs: boolean = instructionsData - .flatMap((x) => x.shouldSplitIntoSeparateTxs) - .some((x) => x) - - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - - // Changed this because it is misbehaving on my local validator setup. - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - // V2 Approve/Deny configuration - const voteType = VoteType.SINGLE_CHOICE - const options = ['Approve'] - const useDenyOption = true - - //will run only if plugin is connected with realm - const plugin = await client?.withUpdateVoterWeightRecord( - instructions, - tokenOwnerRecord, - 'createProposal' - ) - - const proposalAddress = await withCreateProposal( - instructions, - programId, - programVersion, - realm.pubkey!, - governance, - tokenOwnerRecord.pubkey, - name, - descriptionLink, - governingTokenMint, - governanceAuthority, - proposalIndex, - voteType, - options, - useDenyOption, - payer, - plugin?.voterWeightPk - ) - - await withAddSignatory( - instructions, - programId, - programVersion, - proposalAddress, - tokenOwnerRecord.pubkey, - governanceAuthority, - signatory, - payer - ) - - // TODO: Return signatoryRecordAddress from the SDK call - const signatoryRecordAddress = await getSignatoryRecordAddress( - programId, - proposalAddress, - signatory - ) - - const insertInstructions: TransactionInstruction[] = [] - const splitToChunkByDefault = instructionsData.filter( - (x) => x.chunkSplitByDefault - ).length - const chunkBys = instructionsData - .filter((x) => x.chunkBy) - .map((x) => x.chunkBy!) - const chunkBy = chunkBys.length ? Math.min(...chunkBys) : 2 - for (const [index, instruction] of instructionsData - .filter((x) => x.data) - .entries()) { - if (instruction.data) { - if (instruction.prerequisiteInstructions) { - prerequisiteInstructions.push(...instruction.prerequisiteInstructions) - } - await withInsertTransaction( - insertInstructions, - programId, - programVersion, - governance, - proposalAddress, - tokenOwnerRecord.pubkey, - governanceAuthority, - index, - 0, - instruction.holdUpTime || 0, - [instruction.data], - payer - ) - } - } - - const insertInstructionCount = insertInstructions.length - - if (!isDraft) { - withSignOffProposal( - insertInstructions, // SingOff proposal needs to be executed after inserting instructions hence we add it to insertInstructions - programId, - programVersion, - realm.pubkey, - governance, - proposalAddress, - signatory, - signatoryRecordAddress, - undefined - ) - } - - if (shouldSplitIntoSeparateTxs) { - const transaction1 = new Transaction() - const transaction2 = new Transaction() - - transaction1.add(...prerequisiteInstructions, ...instructions) - transaction2.add(...insertInstructions) - - await sendTransaction({ - transaction: transaction1, - wallet, - connection, - signers, - sendingMessage: `creating ${notificationTitle}`, - successMessage: `${notificationTitle} created`, - }) - await sendTransaction({ - transaction: transaction2, - wallet, - connection, - signers: undefined, - sendingMessage: `inserting into ${notificationTitle}`, - successMessage: `inserted into ${notificationTitle}`, - }) - } else if ( - insertInstructionCount <= 2 && - !splitToChunkByDefault && - !(client?.client instanceof NftVoterClient) - ) { - // This is an arbitrary threshold and we assume that up to 2 instructions can be inserted as a single Tx - // This is conservative setting and we might need to revise it if we have more empirical examples or - // reliable way to determine Tx size - // We merge instructions with prerequisiteInstructions - // Prerequisite instructions can came from instructions as something we need to do before instruction can be executed - // For example we create ATAs if they don't exist as part of the proposal creation flow - - await sendTransactionsV2({ - wallet, - connection, - signersSet: [[], [], signers], - showUiComponent: true, - TransactionInstructions: [ - prerequisiteInstructions, - instructions, - insertInstructions, - ].map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Sequential - ) - ), - }) - } else { - const insertChunks = chunks(insertInstructions, chunkBy) - const signerChunks = Array(insertChunks.length).fill([]) - - console.log(`Creating proposal using ${insertChunks.length} chunks`) - await sendTransactionsV2({ - wallet, - connection, - signersSet: [[], [], ...signerChunks], - showUiComponent: true, - TransactionInstructions: [ - prerequisiteInstructions, - instructions, - ...insertChunks, - ].map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Sequential - ) - ), - }) - } - - return proposalAddress -} diff --git a/actions/createTokenizedRealm.ts b/actions/createTokenizedRealm.ts deleted file mode 100644 index 6c7b531f86..0000000000 --- a/actions/createTokenizedRealm.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Connection, PublicKey } from '@solana/web3.js' - -import { - sendTransactionsV2, - transactionInstructionsToTypedInstructionsSets, - SequenceType, - WalletSigner, -} from 'utils/sendTransactions' -import { chunks } from '@utils/helpers' - -import { prepareRealmCreation } from '@tools/governance/prepareRealmCreation' - -interface TokenizedRealm { - connection: Connection - wallet: WalletSigner - programIdAddress: string - - realmName: string - tokensToGovernThreshold: number | undefined - - communityYesVotePercentage: number - existingCommunityMintPk: PublicKey | undefined - transferCommunityMintAuthority: boolean | undefined - communityMintSupplyFactor: number | undefined - - createCouncil: boolean - existingCouncilMintPk: PublicKey | undefined - transferCouncilMintAuthority: boolean | undefined - councilWalletPks: PublicKey[] -} - -export default async function createTokenizedRealm({ - connection, - wallet, - programIdAddress, - realmName, - tokensToGovernThreshold, - - existingCommunityMintPk, - transferCommunityMintAuthority = true, - communityYesVotePercentage, - communityMintSupplyFactor: rawCMSF, - - createCouncil = false, - existingCouncilMintPk, - transferCouncilMintAuthority = true, - // councilYesVotePercentage, - councilWalletPks, -}: TokenizedRealm) { - const { - communityMintPk, - councilMintPk, - realmPk, - realmInstructions, - realmSigners, - mintsSetupInstructions, - mintsSetupSigners, - councilMembersInstructions, - } = await prepareRealmCreation({ - connection, - wallet, - programIdAddress, - - realmName, - tokensToGovernThreshold, - - existingCommunityMintPk, - communityMintSupplyFactor: rawCMSF, - transferCommunityMintAuthority, - communityYesVotePercentage, - - createCouncil, - existingCouncilMintPk, - transferCouncilMintAuthority, - councilWalletPks, - }) - - try { - const councilMembersChunks = chunks(councilMembersInstructions, 10) - // only walletPk needs to sign the minting instructions and it's a signer by default and we don't have to include any more signers - const councilMembersSignersChunks = Array(councilMembersChunks.length).fill( - [] - ) - console.log('CREATE GOV TOKEN REALM: sending transactions') - const tx = await sendTransactionsV2({ - connection, - showUiComponent: true, - wallet, - signersSet: [ - mintsSetupSigners, - ...councilMembersSignersChunks, - realmSigners, - ], - TransactionInstructions: [ - mintsSetupInstructions, - ...councilMembersChunks, - realmInstructions, - ].map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Sequential - ) - ), - }) - - return { - tx, - realmPk, - communityMintPk, - councilMintPk, - } - } catch (ex) { - console.error(ex) - throw ex - } -} diff --git a/actions/createTreasuryAccount.ts b/actions/createTreasuryAccount.ts deleted file mode 100644 index d3cb951a87..0000000000 --- a/actions/createTreasuryAccount.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' - -import { - getGovernanceProgramVersion, - GovernanceConfig, - ProgramAccount, - Realm, - TokenOwnerRecord, - withCreateGovernance, - withCreateNativeTreasury, -} from '@solana/spl-governance' - -import { withCreateTokenGovernance } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { sendTransaction } from '@utils/send' -import { withCreateSplTokenAccount } from '@models/withCreateSplTokenAccount' -import { VotingClient } from '@utils/uiTypes/VotePlugin' - -export const createTreasuryAccount = async ( - { connection, wallet, programId, walletPubkey }: RpcContext, - realm: ProgramAccount, - mint: PublicKey | null, - config: GovernanceConfig, - tokenOwnerRecord: ProgramAccount, - client?: VotingClient -): Promise => { - const instructions: TransactionInstruction[] = [] - const signers: Keypair[] = [] - - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - //will run only if plugin is connected with realm - const plugin = await client?.withUpdateVoterWeightRecord( - instructions, - tokenOwnerRecord, - 'createGovernance' - ) - - const tokenAccount = mint - ? await withCreateSplTokenAccount( - connection, - wallet!, - instructions, - signers, - mint - ) - : null - - const governanceAuthority = walletPubkey - - const governanceAddress = tokenAccount - ? await withCreateTokenGovernance( - instructions, - programId, - programVersion, - realm.pubkey, - tokenAccount.tokenAccountAddress, - config, - true, - walletPubkey, - tokenOwnerRecord.pubkey, - walletPubkey, - governanceAuthority, - plugin?.voterWeightPk - ) - : await withCreateGovernance( - instructions, - programId, - programVersion, - realm.pubkey, - undefined, - config, - tokenOwnerRecord.pubkey, - walletPubkey, - governanceAuthority, - plugin?.voterWeightPk - ) - - if (!tokenAccount) { - await withCreateNativeTreasury( - instructions, - programId, - governanceAddress, - walletPubkey - ) - } - - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: 'Creating treasury account', - successMessage: 'Treasury account has been created', - }) - - return governanceAddress -} diff --git a/actions/dryRunInstruction.ts b/actions/dryRunInstruction.ts deleted file mode 100644 index 275b5f2235..0000000000 --- a/actions/dryRunInstruction.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { InstructionData } from '@solana/spl-governance' - -import { - Connection, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { simulateTransaction } from '../utils/send' -import { WalletAdapter } from '@solana/wallet-adapter-base' - -export async function dryRunInstruction( - connection: Connection, - wallet: WalletAdapter, - instructionData: InstructionData, - prerequisiteInstructionsToRun?: TransactionInstruction[] | undefined, - additionalInstructions?: InstructionData[] -) { - const transaction = new Transaction({ feePayer: wallet.publicKey }) - if (prerequisiteInstructionsToRun) { - prerequisiteInstructionsToRun.map((x) => transaction.add(x)) - } - if (additionalInstructions) { - for (const i of additionalInstructions) { - transaction.add({ - keys: i.accounts, - programId: i.programId, - data: Buffer.from(i.data), - }) - } - } - - transaction.add({ - keys: instructionData.accounts, - programId: instructionData.programId, - data: Buffer.from(instructionData.data), - }) - - const result = await simulateTransaction(connection, transaction, 'single') - - return { response: result.value, transaction } -} diff --git a/actions/executeInstructions.ts b/actions/executeInstructions.ts deleted file mode 100644 index f2cb59ba4e..0000000000 --- a/actions/executeInstructions.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { - ProgramAccount, - Proposal, - ProposalTransaction, - RpcContext, - withExecuteTransaction, -} from '@solana/spl-governance' -import { Transaction, TransactionInstruction } from '@solana/web3.js' -import { sendSignedTransaction, signTransaction } from '@utils/send' - -// Merge instructions within one Transaction, sign it and execute it -export const executeInstructions = async ( - { connection, wallet, programId, programVersion }: RpcContext, - proposal: ProgramAccount, - proposalInstructions: ProgramAccount[] -) => { - const instructions: TransactionInstruction[] = [] - - await Promise.all( - proposalInstructions.map((instruction) => - // withExecuteTransaction function mutate the given 'instructions' parameter - withExecuteTransaction( - instructions, - programId, - programVersion, - proposal.account.governance, - proposal.pubkey, - instruction.pubkey, - [instruction.account.getSingleInstruction()] - ) - ) - ) - - const transaction = new Transaction() - - transaction.add(...instructions) - - const signedTransaction = await signTransaction({ - transaction, - wallet, - connection, - signers: [], - }) - - await sendSignedTransaction({ - signedTransaction, - connection, - sendingMessage: 'Executing instruction', - successMessage: 'Execution finalized', - }) -} diff --git a/actions/executeTransaction.ts b/actions/executeTransaction.ts deleted file mode 100644 index 884ca23e0b..0000000000 --- a/actions/executeTransaction.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Keypair, Transaction, TransactionInstruction } from '@solana/web3.js' - -import { - sendSignedAndAdjacentTransactions, - sendTransaction, - signTransactions, -} from '@utils/send' -import Wallet from '@project-serum/sol-wallet-adapter' -import { - RpcContext, - Proposal, - ProposalTransaction, - getGovernanceProgramVersion, - withExecuteTransaction, - ProgramAccount, -} from '@solana/spl-governance' - -/** - * Executes a proposal transaction - * @param rpcContext RPC contextual information - * @param proposal Metadata about the proposal - * @param instruction Instruction that will be executed by the proposal - * @param adjacentTransaction Optional transaction that is sent in the same slot as the proposal instruction. - * @param preExecutionTransactions Optional tansactions that are executed before the proposal instruction - */ -export const executeTransaction = async ( - { connection, wallet, programId }: RpcContext, - proposal: ProgramAccount, - instruction: ProgramAccount, - adjacentTransaction?: Transaction, - preExecutionTransactions?: Transaction[] -) => { - const signers: Keypair[] = [] - const instructions: TransactionInstruction[] = [] - - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - await withExecuteTransaction( - instructions, - programId, - programVersion, - proposal.account.governance, - proposal.pubkey, - instruction.pubkey, - [instruction.account.getSingleInstruction()] - ) - - // Create proposal transaction - const proposalTransaction = new Transaction().add(...instructions) - - // Sign and send all pre-execution transactions - if (preExecutionTransactions && !preExecutionTransactions?.length) { - await Promise.all( - preExecutionTransactions.map((transaction) => - sendTransaction({ - transaction, - wallet, - connection, - sendingMessage: 'Sending pre-execution transaction', - successMessage: 'Sent pre-execution transaction', - }) - ) - ) - console.log('sent preExecutionTransactions', preExecutionTransactions) - } - - // Some proposals require additional adjacent transactions due to tx size limits - if (adjacentTransaction) { - const [signedProposalTx, signedAdjacentTx] = await signTransactions({ - transactionsAndSigners: [ - { transaction: proposalTransaction }, - { transaction: adjacentTransaction }, - ], - wallet: (wallet as unknown) as Wallet, - connection, - }) - // Send proposal transaction with prepended adjacent transaction - await sendSignedAndAdjacentTransactions({ - signedTransaction: signedProposalTx, - adjacentTransaction: signedAdjacentTx, - connection, - sendingMessage: 'Executing instruction', - successMessage: 'Execution finalized', - }) - } else { - // Send the proposal transaction - await sendTransaction({ - transaction: proposalTransaction, - wallet, - connection, - signers, - sendingMessage: 'Executing instruction', - successMessage: 'Execution finalized', - }) - } -} diff --git a/actions/finalizeVotes.ts b/actions/finalizeVotes.ts deleted file mode 100644 index 9779b22237..0000000000 --- a/actions/finalizeVotes.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { - getGovernanceProgramVersion, - ProgramAccount, -} from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { sendTransaction } from '@utils/send' -import { Proposal } from '@solana/spl-governance' -import { withFinalizeVote } from '@solana/spl-governance' - -export const finalizeVote = async ( - { connection, wallet, programId }: RpcContext, - realm: PublicKey, - proposal: ProgramAccount, - maxVoterWeightPk: PublicKey | undefined -) => { - const signers: Keypair[] = [] - const instructions: TransactionInstruction[] = [] - - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - await withFinalizeVote( - instructions, - programId, - programVersion, - realm, - proposal.account.governance, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - proposal.account.governingTokenMint, - maxVoterWeightPk - ) - - const transaction = new Transaction() - - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: 'Finalizing votes', - successMessage: 'Votes finalized', - }) -} diff --git a/actions/flagInstructionError.ts b/actions/flagInstructionError.ts deleted file mode 100644 index 665810f4e4..0000000000 --- a/actions/flagInstructionError.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' - -import { getGovernanceProgramVersion, Proposal } from '@solana/spl-governance' - -import { withFlagTransactionError } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { sendTransaction } from '@utils/send' - -export const flagInstructionError = async ( - { connection, wallet, programId, walletPubkey }: RpcContext, - proposal: ProgramAccount, - proposalInstruction: PublicKey -) => { - const governanceAuthority = walletPubkey - - const signers: Keypair[] = [] - const instructions: TransactionInstruction[] = [] - - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - withFlagTransactionError( - instructions, - programId, - programVersion, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - governanceAuthority, - proposalInstruction - ) - - const transaction = new Transaction({ feePayer: walletPubkey }) - - transaction.add(...instructions) - - await sendTransaction({ - transaction, - connection, - wallet, - signers, - sendingMessage: 'Flagging instruction as broken', - successMessage: 'Instruction flagged as broken', - }) -} diff --git a/actions/registerProgramGovernance.ts b/actions/registerProgramGovernance.ts deleted file mode 100644 index 6a4b4a7e10..0000000000 --- a/actions/registerProgramGovernance.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { - getGovernanceProgramVersion, - GovernanceType, - ProgramAccount, - Realm, - TokenOwnerRecord, -} from '@solana/spl-governance' -import { GovernanceConfig } from '@solana/spl-governance' -import { withCreateProgramGovernance } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { sendTransaction } from '@utils/send' -import { VotingClient } from '@utils/uiTypes/VotePlugin' - -export const registerProgramGovernance = async ( - { connection, wallet, programId, walletPubkey }: RpcContext, - governanceType: GovernanceType, - realm: ProgramAccount, - governedAccount: PublicKey, - config: GovernanceConfig, - transferAuthority: boolean, - tokenOwnerRecord: ProgramAccount, - client?: VotingClient -): Promise => { - const instructions: TransactionInstruction[] = [] - const signers: Keypair[] = [] - let governanceAddress - const governanceAuthority = walletPubkey - - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - //will run only if plugin is connected with realm - const plugin = await client?.withUpdateVoterWeightRecord( - instructions, - tokenOwnerRecord, - 'createGovernance' - ) - - switch (governanceType) { - case GovernanceType.Program: { - governanceAddress = await withCreateProgramGovernance( - instructions, - programId, - programVersion, - realm.pubkey, - governedAccount, - config, - transferAuthority!, - walletPubkey, - tokenOwnerRecord.pubkey, - walletPubkey, - governanceAuthority, - plugin?.voterWeightPk - ) - break - } - default: { - throw new Error(`Governance type ${governanceType} is not supported yet.`) - } - } - - const transaction = new Transaction() - transaction.add(...instructions) - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: 'Creating governance program account', - successMessage: 'Governance program account has been created', - }) - - return governanceAddress -} diff --git a/actions/registerRealm.ts b/actions/registerRealm.ts deleted file mode 100644 index 1ae3954f58..0000000000 --- a/actions/registerRealm.ts +++ /dev/null @@ -1,505 +0,0 @@ -import { - Connection, - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import BN from 'bn.js' -import { - getTokenOwnerRecordAddress, - GovernanceConfig, - MintMaxVoteWeightSource, - SetRealmAuthorityAction, - VoteThresholdPercentage, - VoteTipping, -} from '@solana/spl-governance' -import { withCreateRealm } from '@solana/spl-governance' -import { sendTransaction } from '../utils/send' - -import { - sendTransactions, - SequenceType, - WalletSigner, -} from 'utils/sendTransactions' -import { withCreateMint } from '@tools/sdk/splToken/withCreateMint' -import { withCreateAssociatedTokenAccount } from '@tools/sdk/splToken/withCreateAssociatedTokenAccount' -import { withMintTo } from '@tools/sdk/splToken/withMintTo' -import { chunks } from '@utils/helpers' -import { - SignerWalletAdapter, - WalletConnectionError, -} from '@solana/wallet-adapter-base' -import { withDepositGoverningTokens } from '@solana/spl-governance' -import { - getMintNaturalAmountFromDecimalAsBN, - getTimestampFromDays, -} from '@tools/sdk/units' -import { withCreateMintGovernance } from '@solana/spl-governance' -import { withSetRealmAuthority } from '@solana/spl-governance' -import { AccountInfo, u64 } from '@solana/spl-token' -import { ProgramAccount } from '@project-serum/common' -import { tryGetAta } from '@utils/validations' -import { ConnectionContext } from '@utils/connection' -import { MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY } from '@tools/constants' -import BigNumber from 'bignumber.js' - -interface RegisterRealmRpc { - connection: ConnectionContext - wallet: SignerWalletAdapter - walletPubkey: PublicKey -} - -/** - * The default amount of decimals for the community token - */ -export const COMMUNITY_MINT_DECIMALS = 6 - -/** - * Prepares the mint instructions - * - * If `otherOwners` is given, then the token will be minted (1) to each wallet. - * This option is usually used when using council. - * - * @param connection - * @param walletPubkey - * @param tokenDecimals - * @param council if it is council, avoid creating the mint if otherowners is not filled - * @param mintPk - * @param otherOwners - */ -async function prepareMintInstructions( - connection: ConnectionContext, - walletPubkey: PublicKey, - tokenDecimals = 0, - council = false, - mintPk?: PublicKey, - otherOwners?: PublicKey[] -) { - console.debug('preparing mint instructions') - - let _mintPk: PublicKey | undefined = undefined - let walletAtaPk: PublicKey | undefined - const mintInstructions: TransactionInstruction[] = [] - const mintSigners: Keypair[] = [] - - const councilTokenAmount = new u64( - new BigNumber(1).shiftedBy(tokenDecimals).toString() - ) - - if (!council || (council && otherOwners?.length)) { - // If mintPk is undefined, then - // should create the mint - _mintPk = - mintPk ?? - (await withCreateMint( - connection.current, - mintInstructions, - mintSigners, - walletPubkey, - null, - tokenDecimals, - walletPubkey - )) - - // If the array of other owners is not empty - // then should create mints to them - if (otherOwners?.length) { - for (const ownerPk of otherOwners) { - const ata: ProgramAccount | undefined = await tryGetAta( - connection.current, - ownerPk, - _mintPk - ) - const shouldMint = !ata?.account.amount.gt(new BN(0)) - - const ataPk = - ata?.publicKey ?? - (await withCreateAssociatedTokenAccount( - mintInstructions, - _mintPk, - ownerPk, - walletPubkey - )) - - // Mint 1 token to each owner - if (shouldMint && ataPk) { - console.debug('will mint to ', { ataPk }) - await withMintTo( - mintInstructions, - _mintPk, - ataPk, - walletPubkey, - councilTokenAmount - ) - } - - if (ownerPk.equals(walletPubkey)) { - walletAtaPk = ataPk - } - } - } - } - - const instructionChunks = chunks(mintInstructions, 10) - const signersChunks = Array(instructionChunks.length).fill([]) - signersChunks[0] = mintSigners - return { - mintPk: _mintPk, - walletAtaPk, - /** - * Mint instructions in chunks of 10 - */ - instructionChunks, - /** - * Signer sets in chunks of 10 - */ - signersChunks, - /** - * Array with all the instructions - */ - mintInstructions, - /** - * Array with all the signer sets - */ - mintSigners, - /** - * Amount of tokens minted to the council members - */ - councilTokenAmount, - } -} - -/** - * Creates a default governance config object - * @param yesVoteThreshold - * @returns - */ -function createGovernanceConfig( - yesVoteThreshold = 60, - tokenDecimals?: number, - minCommunityTokensToCreateGovernance?: string -): GovernanceConfig { - console.debug('mounting governance config') - - const minCommunityTokensToCreateAsMintValue = getMintNaturalAmountFromDecimalAsBN( - minCommunityTokensToCreateGovernance && - +minCommunityTokensToCreateGovernance > 0 - ? +minCommunityTokensToCreateGovernance - : MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY, - tokenDecimals ?? COMMUNITY_MINT_DECIMALS - ) - - // Put community and council mints under the realm governance with default config - return new GovernanceConfig({ - voteThresholdPercentage: new VoteThresholdPercentage({ - value: yesVoteThreshold, - }), - minCommunityTokensToCreateProposal: minCommunityTokensToCreateAsMintValue, - // Do not use instruction hold up time - minInstructionHoldUpTime: 0, - // max voting time 3 days - maxVotingTime: getTimestampFromDays(3), - voteTipping: VoteTipping.Strict, - proposalCoolOffTime: 0, - minCouncilTokensToCreateProposal: new BN(1), - }) -} - -/** - * Sets the governance instructions into the realm - * - * @param walletPubkey payeer wallet pub key - * @param tokenMintPk the token mint to put under governance - * @param yesVoteThreshold vote quorum - * @param programId governance program id - * @param realmPk realm pub key - * @param tokenOwnerRecordPk - * @param realmInstructions realm instructions array - */ -async function prepareGovernanceInstructions( - walletPubkey: PublicKey, - councilMintPk: PublicKey | undefined, - communityMintPk: PublicKey, - communityTokenDecimals: number | undefined, - yesVoteThreshold: number, - minCommunityTokensToCreateGovernance: string, - programId: PublicKey, - programVersion: number, - realmPk: PublicKey, - tokenOwnerRecordPk: PublicKey, - realmInstructions: TransactionInstruction[], - transferAuthority?: boolean -) { - console.debug('Preparing governance instructions') - - const config = createGovernanceConfig( - yesVoteThreshold, - communityTokenDecimals, - minCommunityTokensToCreateGovernance - ) - - if (transferAuthority) { - console.debug('transfer community mint authority') - const communityMintGovPk = await withCreateMintGovernance( - realmInstructions, - programId, - programVersion, - realmPk, - communityMintPk, - config, - true, - walletPubkey, - tokenOwnerRecordPk, - walletPubkey, - walletPubkey - ) - - // Set the community governance as the realm authority - withSetRealmAuthority( - realmInstructions, - programId, - programVersion, - realmPk, - walletPubkey, - communityMintGovPk, - SetRealmAuthorityAction.SetChecked - ) - } - - if (councilMintPk) - // Put council token mint under realm governance - await withCreateMintGovernance( - realmInstructions, - programId, - programVersion, - realmPk, - councilMintPk, - config, - true, - walletPubkey, - tokenOwnerRecordPk, - walletPubkey, - walletPubkey - ) -} - -/** - * Factories the send transaction method according to the parameters - * @param wallet the payeer - * @param connection current connection - * @param councilMembersChunks Chunks of council members instructions - * @param councilSignersChunks Chunks of council signers - * @param communityMintInstructions Community mint instructions - * @param communityMintSigners Community mint signers - * @param realmInstructions Realm instructions - * @returns a promise to be executed. - */ -function sendTransactionFactory( - wallet: WalletSigner, - connection: Connection, - councilMembersChunks: TransactionInstruction[][], - councilSignersChunks: Keypair[][], - realmInstructions: TransactionInstruction[], - communityMintInstructions?: TransactionInstruction[], - communityMintSigners?: Keypair[] -) { - console.debug('factoring sendtransaction') - - const instructions: TransactionInstruction[][] = [realmInstructions] - const signerSets: Keypair[][] = [[]] - - if (councilMembersChunks.length) { - instructions.unshift(...councilMembersChunks) - signerSets.unshift(...councilSignersChunks) - } - - if (communityMintInstructions && communityMintSigners) { - instructions.unshift(communityMintInstructions) - signerSets.unshift(communityMintSigners) - } - - if (instructions.length > 1) { - return sendTransactions( - connection, - wallet, - instructions, - signerSets, - SequenceType.Sequential - ) - } else { - const transaction = new Transaction() - transaction.add(...realmInstructions) - return sendTransaction({ transaction, wallet, connection }) - } -} - -/** - * Performs the necessary operations to register a realm, including: - * - * - Create community mint instructions (if eligible) - * - Create council mint instructions (if eligible) - * - Deposit owner goverance tokens instruction (if eligible) - * - Create governance config - * - Create ATAs instructions - * - Create realm instruction - * - * @param RpcContext - * @param programId Pubkey of the governance program - * @param programVersion - * @param name The name of the realm - * @param communityMint the community mint id - * @param councilMint the council mint id - * @param communityMintMaxVoteWeightSource - * @param minCommunityTokensToCreateGovernance Minimum amount of community tokens to create a governance - * @param yesVoteThreshold minimum percentage of yes votes to the proposal to pass - * @param transferAuthority if set to true, will transfer the authority of the community token to the realm - * @param communityMintTokenDecimals Token amount decimals - * @param councilWalletPks Array of wallets of the council/team - */ -export async function registerRealm( - { connection, wallet, walletPubkey }: RegisterRealmRpc, - programId: PublicKey, - programVersion: number, - name: string, - communityMint: PublicKey | undefined, - councilMint: PublicKey | undefined, - communityMintMaxVoteWeightSource: MintMaxVoteWeightSource, - minCommunityTokensToCreateGovernance: string, - yesVoteThreshold = 60, - transferAuthority = true, - communityMintTokenDecimals?: number, - councilMintTokenDecimals?: number, - councilWalletPks?: PublicKey[] -): Promise { - if (!wallet) throw WalletConnectionError - console.debug('starting register realm') - - const realmInstructions: TransactionInstruction[] = [] - - const { - mintPk: councilMintPk, - walletAtaPk, - instructionChunks: councilMembersChunks, - signersChunks: councilSignersChunks, - councilTokenAmount, - } = await prepareMintInstructions( - connection, - walletPubkey, - councilMintTokenDecimals, - true, - councilMint, - councilWalletPks - ) - - let communityMintInstructions: - | TransactionInstruction[] - | undefined = undefined - let communityMintPk: PublicKey | undefined = communityMint - let communityMintSigners: Keypair[] | undefined = undefined - - // If user doens't provides a community mint, we'll generate it - if (!communityMint) { - const communityDetails = await prepareMintInstructions( - connection, - walletPubkey, - COMMUNITY_MINT_DECIMALS - ) - communityMintInstructions = communityDetails.mintInstructions - communityMintPk = communityDetails.mintPk - communityMintSigners = communityDetails.mintSigners - } - - if (!communityMintPk) throw new Error('Invalid community mint public key.') - - const _minCommunityTokensToCreateGovernance = getMintNaturalAmountFromDecimalAsBN( - minCommunityTokensToCreateGovernance && - +minCommunityTokensToCreateGovernance > 0 - ? +minCommunityTokensToCreateGovernance - : MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY, - communityMintTokenDecimals ?? COMMUNITY_MINT_DECIMALS - ) - - const realmAddress = await withCreateRealm( - realmInstructions, - programId, - programVersion, - name, - walletPubkey, - communityMintPk, - walletPubkey, - councilMintPk, - communityMintMaxVoteWeightSource, - _minCommunityTokensToCreateGovernance, - undefined - ) - - let tokenOwnerRecordPk: PublicKey | undefined = undefined - - // If the current wallet is in the team then deposit the council token - if (councilMintPk) { - if (walletAtaPk) { - // TODO: return tokenOwnerRecordPk from the sdk call - tokenOwnerRecordPk = await getTokenOwnerRecordAddress( - programId, - realmAddress, - councilMintPk, - walletPubkey - ) - - await withDepositGoverningTokens( - realmInstructions, - programId, - programVersion, - realmAddress, - walletAtaPk, - councilMintPk, - walletPubkey, - walletPubkey, - walletPubkey, - councilTokenAmount - ) - } else { - // Let's throw for now if the current wallet isn't in the team - // TODO: To fix it we would have to make it temp. as part of the team and then remove after the realm is created - throw new Error('Current wallet must be in the team') - } - } - - // Checks if the council token was generated by us and if transferAuthority is true - // then put them under governance - if (tokenOwnerRecordPk) { - await prepareGovernanceInstructions( - walletPubkey, - councilMintPk, - communityMintPk, - communityMintTokenDecimals, - yesVoteThreshold, - minCommunityTokensToCreateGovernance, - programId, - programVersion, - realmAddress, - tokenOwnerRecordPk, - realmInstructions, - transferAuthority - ) - } - - const txnToSend = sendTransactionFactory( - wallet, - connection.current, - councilMembersChunks, - councilSignersChunks, - realmInstructions, - communityMintInstructions, - communityMintSigners - ) - console.debug('sending transaction') - await txnToSend - console.debug('transaction sent') - console.debug({ - communityMintPk, - councilMintPk, - }) - return realmAddress -} diff --git a/actions/relinquishVote.ts b/actions/relinquishVote.ts deleted file mode 100644 index eaffe831e9..0000000000 --- a/actions/relinquishVote.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' - -import { Proposal } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { sendTransaction } from '../utils/send' -import { withRelinquishVote } from '@solana/spl-governance' -import { VotingClient } from '@utils/uiTypes/VotePlugin' -import { chunks } from '@utils/helpers' -import { - sendTransactionsV2, - SequenceType, - transactionInstructionsToTypedInstructionsSets, -} from '@utils/sendTransactions' -import { NftVoterClient } from '@solana/governance-program-library' - -export const relinquishVote = async ( - { connection, wallet, programId, walletPubkey }: RpcContext, - proposal: ProgramAccount, - tokenOwnerRecord: PublicKey, - voteRecord: PublicKey, - instructions: TransactionInstruction[] = [], - plugin: VotingClient -) => { - const signers: Keypair[] = [] - - const governanceAuthority = walletPubkey - const beneficiary = walletPubkey - await withRelinquishVote( - instructions, - programId, - proposal.account.governance, - proposal.pubkey, - tokenOwnerRecord, - proposal.account.governingTokenMint, - voteRecord, - governanceAuthority, - beneficiary - ) - await plugin.withRelinquishVote(instructions, proposal, voteRecord) - const shouldChunk = plugin?.client instanceof NftVoterClient - if (shouldChunk) { - const insertChunks = chunks(instructions, 2) - const signerChunks = Array(instructions.length).fill([]) - const instArray = [ - ...insertChunks - .slice(0, 1) - .map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Sequential - ) - ), - ...insertChunks - .slice(1, insertChunks.length) - .map((x) => - transactionInstructionsToTypedInstructionsSets( - x, - SequenceType.Parallel - ) - ), - ] - await sendTransactionsV2({ - connection, - wallet, - TransactionInstructions: instArray, - signersSet: [...signerChunks], - showUiComponent: true, - }) - } else { - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ transaction, wallet, connection, signers }) - } -} diff --git a/actions/signOffProposal.ts b/actions/signOffProposal.ts deleted file mode 100644 index 551bd23270..0000000000 --- a/actions/signOffProposal.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' - -import { - getGovernanceProgramVersion, - Proposal, - RpcContext, -} from '@solana/spl-governance' -import { SignatoryRecord } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { sendTransaction } from 'utils/send' -import { withSignOffProposal } from '@solana/spl-governance' - -export const signOffProposal = async ( - { connection, wallet, programId }: RpcContext, - realmPk: PublicKey, - proposal: ProgramAccount, - signatoryRecord: ProgramAccount -) => { - const instructions: TransactionInstruction[] = [] - const signers: Keypair[] = [] - - // Explicitly request the version before making RPC calls to work around race conditions in resolving - // the version for RealmInfo - const programVersion = await getGovernanceProgramVersion( - connection, - programId - ) - - withSignOffProposal( - instructions, - programId, - programVersion, - realmPk, - proposal.account.governance, - proposal.pubkey, - signatoryRecord.account.signatory, - signatoryRecord?.pubkey, - undefined - ) - - const transaction = new Transaction() - - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet, - connection, - signers, - sendingMessage: 'Signing off proposal', - successMessage: 'Proposal signed off', - }) -} diff --git a/actions/switchboardRefreshVoterWeight.ts b/actions/switchboardRefreshVoterWeight.ts deleted file mode 100644 index dadd3e88d7..0000000000 --- a/actions/switchboardRefreshVoterWeight.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Transaction } from '@solana/web3.js' -import { sendTransaction } from '@utils/send' - -export const sbRefreshWeight = async ( - voterWeightInstructions, - connection, - wallet -) => { - /*const voterWeightInstructions = useSwitchboardPluginStore((s) => s.state.instructions); - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current)*/ - - const transaction = new Transaction().add(voterWeightInstructions) - - await sendTransaction({ - transaction: transaction, - wallet: wallet, - signers: [], - connection: connection.current, - }) -} diff --git a/components/AboutRealm.tsx b/components/AboutRealm.tsx deleted file mode 100644 index 56973f0d4a..0000000000 --- a/components/AboutRealm.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react' -import useRealm from 'hooks/useRealm' - -const AboutRealm = () => { - const { realmInfo, realmDisplayName, symbol } = useRealm() - - return ( -
-
-

Name

-

{realmDisplayName || symbol}

-
- {realmInfo?.isCertified ? ( -
-

Token

-

{symbol}

-
- ) : null} - {realmInfo?.website ? ( - - ) : null} - {realmInfo?.twitter ? ( - - ) : null} -
-

Program Version

-

{realmInfo?.programVersion}

-
-
- ) -} - -export default AboutRealm diff --git a/components/AddMemberIcon.tsx b/components/AddMemberIcon.tsx deleted file mode 100644 index d29a72a6e7..0000000000 --- a/components/AddMemberIcon.tsx +++ /dev/null @@ -1,43 +0,0 @@ -const AddMemberIcon = ({ className }) => { - return ( - - - - - - - ) -} - -export default AddMemberIcon diff --git a/components/AdditionalProposalOptions.tsx b/components/AdditionalProposalOptions.tsx deleted file mode 100644 index d57d9298b0..0000000000 --- a/components/AdditionalProposalOptions.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { ChevronDownIcon } from '@heroicons/react/outline' -import useRealm from '@hooks/useRealm' -import VoteBySwitch from 'pages/dao/[symbol]/proposal/components/VoteBySwitch' -import { useState } from 'react' -import { LinkButton } from './Button' -import Input from './inputs/Input' -import Textarea from './inputs/Textarea' - -const AdditionalProposalOptions = ({ - title, - description, - setTitle, - setDescription, - defaultTitle, - defaultDescription, - voteByCouncil, - setVoteByCouncil, -}: { - title: string - description: string - setTitle: (evt) => void - setDescription: (evt) => void - defaultTitle: string - defaultDescription?: string - voteByCouncil: boolean - setVoteByCouncil: (val) => void -}) => { - const [showOptions, setShowOptions] = useState(false) - const { canChooseWhoVote } = useRealm() - return ( - <> - setShowOptions(!showOptions)} - > - {showOptions ? 'Less Options' : 'More Options'} - - - {showOptions && ( -
- - - {canChooseWhoVote && ( - { - setVoteByCouncil(!voteByCouncil) - }} - > - )} - - )} -
-
- -
- - ) -} - -export default ConvertToMsol diff --git a/components/TreasuryAccount/CreateAta.tsx b/components/TreasuryAccount/CreateAta.tsx deleted file mode 100644 index bb4fb88b9d..0000000000 --- a/components/TreasuryAccount/CreateAta.tsx +++ /dev/null @@ -1,211 +0,0 @@ -import Input from '@components/inputs/Input' -import { useEffect, useState } from 'react' -import tokenService from '@utils/services/token' -import { tryParsePublicKey } from '@tools/core/pubkey' -import { TokenProgramAccount, tryGetMint } from '@utils/tokens' -import useWalletStore from 'stores/useWalletStore' -import { - Keypair, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import { MintInfo } from '@solana/spl-token' -import { debounce } from '@utils/debounce' -import Button from '@components/Button' -import { createATA } from '@utils/ataTools' -import { tryGetAta } from '@utils/validations' -import { sendTransaction } from '@utils/send' -import useRealm from '@hooks/useRealm' -import useGovernanceAssetsStore from 'stores/useGovernanceAssetsStore' -import * as serum from '@project-serum/common' -import { InformationCircleIcon } from '@heroicons/react/outline' - -const CreateAta = ({ - owner, - governancePk, - createCallback, -}: { - owner: PublicKey - governancePk: PublicKey - createCallback: () => void -}) => { - const { realm } = useRealm() - const refetchGovernanceAccounts = useGovernanceAssetsStore( - (s) => s.refetchGovernanceAccounts - ) - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const [isTyping, setIsTyping] = useState(false) - const [isLoading, setIsLoading] = useState(false) - const [query, setQuery] = useState('') - const [mintInfo, setMintInfo] = useState< - TokenProgramAccount | undefined - >(undefined) - const tokenList = tokenService._tokenList - const foundByNameToken = tokenList.find( - (x) => - x.address.toLowerCase() === query.toLowerCase() || - x.name.toLowerCase() === query.toLowerCase() || - x.symbol.toLowerCase() === query.toLowerCase() - ) - const typedMint = tryParsePublicKey(query) ? query : '' - useEffect(() => { - const validateMint = async () => { - const info = await tryGetMint( - connection.current, - new PublicKey(typedMint) - ) - setMintInfo(info) - } - if (typedMint) { - validateMint() - } else { - setMintInfo(undefined) - } - }, [typedMint]) - useEffect(() => { - if (isTyping !== !!query) { - setIsTyping(!!query) - } - debounce.debounceFcn(async () => { - setIsTyping(false) - }) - }, [query]) - const handleCreate = async () => { - const mintPk = typedMint - ? new PublicKey(typedMint) - : new PublicKey(foundByNameToken!.address) - if (!mintPk) { - throw 'Invalid mint' - } - if (!wallet) { - throw 'Wallet not connected' - } - setIsLoading(true) - const existingAta = await tryGetAta(connection.current, mintPk, owner) - if (!existingAta) { - await createATA( - connection.current, - wallet, - mintPk, - owner, - wallet!.publicKey! - ) - } else { - const instructions: TransactionInstruction[] = [] - const signers: Keypair[] = [] - const tokenAccount = new Keypair() - const provider = new serum.Provider( - connection.current, - wallet as serum.Wallet, - serum.Provider.defaultOptions() - ) - instructions.push( - ...(await serum.createTokenAccountInstrs( - provider, - tokenAccount.publicKey, - mintPk, - owner - )) - ) - signers.push(tokenAccount) - const transaction = new Transaction() - transaction.add(...instructions) - - await sendTransaction({ - transaction, - wallet: wallet!, - connection: connection.current!, - signers, - }) - } - await refetchGovernanceAccounts(connection, realm!, governancePk) - setIsLoading(false) - createCallback() - } - return ( -
-

Create token account

-
- setQuery(evt.target.value)} - /> -
- - <> -
- {!isTyping && ( - <> -
- {((typedMint && mintInfo) || foundByNameToken) && ( -
Token found
- )} -
-
- {!mintInfo && !foundByNameToken && query && ( -
Token not found
- )} -
- - )} -
-
-
- {!isTyping && foundByNameToken ? ( - <> - {foundByNameToken?.logoURI && ( - { - currentTarget.onerror = null // prevents looping - currentTarget.hidden = true - }} - /> - )} -
-
-
- {foundByNameToken?.name} -
-
-
- {foundByNameToken?.symbol} -
-
- - ) : ( - <> - - {' '} - Type exact mint address, token name or symbol - - - )} -
-
- -
- -
-
- ) -} -export default CreateAta diff --git a/components/TreasuryAccount/DepositLabel.tsx b/components/TreasuryAccount/DepositLabel.tsx deleted file mode 100644 index db2683339c..0000000000 --- a/components/TreasuryAccount/DepositLabel.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { LinkButton } from '@components/Button' -import { getAccountName } from '@components/instructions/tools' -import { DuplicateIcon } from '@heroicons/react/outline' -import { PublicKey } from '@solana/web3.js' -import { abbreviateAddress } from '@utils/formatting' - -const DepositLabel = ({ - header = 'Treasury account address', - abbreviatedAddress = true, - transferAddress, -}: { - header?: string - abbreviatedAddress?: boolean - transferAddress: PublicKey | undefined | null -}) => { - return ( -
-
-
{header}
-
- {transferAddress && getAccountName(transferAddress) ? ( -
- {getAccountName(transferAddress)} -
- ) : null} -
- - {abbreviatedAddress - ? abbreviateAddress(transferAddress as PublicKey) - : transferAddress?.toBase58()} - -
-
- { - navigator.clipboard.writeText(transferAddress!.toBase58()) - }} - > - - -
-
- ) -} - -export default DepositLabel diff --git a/components/TreasuryAccount/DepositNFT.tsx b/components/TreasuryAccount/DepositNFT.tsx deleted file mode 100644 index 051617c375..0000000000 --- a/components/TreasuryAccount/DepositNFT.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import React, { useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import Button, { SecondaryButton } from '@components/Button' -import Tooltip from '@components/Tooltip' -import DepositNFTFromWallet from './DepositNFTFromWallet' -import DepositNFTAddress from './DepositNFTAddress' -import useTreasuryAccountStore from 'stores/useTreasuryAccountStore' -import { ArrowLeftIcon, ExternalLinkIcon } from '@heroicons/react/solid' -import { getExplorerUrl } from '@components/explorer/tools' - -enum DepositState { - DepositNFTFromWallet, - DepositNFTAddress, -} - -const DepositNFT = ({ onClose }) => { - const currentAccount = useTreasuryAccountStore((s) => s.currentAccount) - const connection = useWalletStore((s) => s.connection) - const connected = useWalletStore((s) => s.connected) - const [ - currentDepositView, - setCurrentDepositView, - ] = useState(null) - - return ( - <> -

- {currentDepositView !== null && ( - setCurrentDepositView(null)} - /> - )} - Deposit NFT - e.stopPropagation()} - > - - -

- {currentDepositView === null && ( -
- - -
- )} - {currentDepositView === DepositState.DepositNFTFromWallet && ( - - )} - {currentDepositView === DepositState.DepositNFTAddress && ( - Close - } - > - )} - - ) -} - -export default DepositNFT diff --git a/components/TreasuryAccount/DepositNFTAddress.tsx b/components/TreasuryAccount/DepositNFTAddress.tsx deleted file mode 100644 index ce813f7274..0000000000 --- a/components/TreasuryAccount/DepositNFTAddress.tsx +++ /dev/null @@ -1,225 +0,0 @@ -import React, { useEffect, useState } from 'react' -import useTreasuryAccountStore from 'stores/useTreasuryAccountStore' -import Input from '@components/inputs/Input' -import { tryParseKey } from '@tools/validators/pubkey' -import { debounce } from '@utils/debounce' -import useWalletStore from 'stores/useWalletStore' -import { Metadata } from '@metaplex-foundation/mpl-token-metadata' -import axios from 'axios' -import { notify } from '@utils/notifications' -import Loading from '@components/Loading' -import Button, { LinkButton } from '@components/Button' -import { PublicKey } from '@solana/web3.js' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import Tooltip from '@components/Tooltip' -import { tryGetAta } from '@utils/validations' -import useRealm from '@hooks/useRealm' -import { createATA } from '@utils/ataTools' -import { abbreviateAddress } from '@utils/formatting' -import { DuplicateIcon, ExclamationIcon } from '@heroicons/react/outline' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import DepositLabel from './DepositLabel' -import NFTAccountSelect from './NFTAccountSelect' -import ImgWithLoader from '@components/ImgWithLoader' -const DepositNFTAddress = ({ additionalBtns }: { additionalBtns?: any }) => { - const currentAccount = useTreasuryAccountStore((s) => s.currentAccount) - - const wallet = useWalletStore((s) => s.current) - const { realm } = useRealm() - const connected = useWalletStore((s) => s.connected) - const [form, setForm] = useState({ - mint: '', - }) - const [isLoading, setIsLoading] = useState(false) - const [nftMetaData, setNftMetaData] = useState(null) - const [isInvalidMint, setIsInvalidMint] = useState(false) - const [formErrors, setFormErrors] = useState({}) - const [imgUrl, setImgUrl] = useState('') - const [ataAddress, setAtaAddress] = useState('') - const { nftsGovernedTokenAccounts } = useGovernanceAssets() - const { setCurrentAccount } = useTreasuryAccountStore() - const connection = useWalletStore((s) => s.connection) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const handleGenerateATAAddress = async () => { - setAtaAddress('') - if (!currentAccount) { - throw 'No governance selected' - } - if (!realm) { - throw 'no realm selected' - } - const mintPK = new PublicKey(form.mint) - const owner = currentAccount?.isSol - ? currentAccount.extensions.transferAddress! - : currentAccount!.governance!.pubkey - const ataPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPK, // mint - owner!, // owner - true - ) - const ata = ataPk.toBase58() - const isExistingAta = await tryGetAta(connection.current, mintPK, owner) - if (!isExistingAta) { - try { - await createATA( - connection.current, - wallet, - mintPK, - owner, - wallet!.publicKey! - ) - setAtaAddress(ata) - } catch (e) { - notify({ - type: 'error', - message: 'Unable to create address', - }) - setAtaAddress('') - } - } else { - setAtaAddress(ata) - } - } - useEffect(() => { - setIsInvalidMint(false) - if (form.mint) { - debounce.debounceFcn(async () => { - const pubKey = tryParseKey(form.mint) - if (pubKey) { - setIsLoading(true) - try { - const metadataPDA = await Metadata.getPDA(pubKey) - const tokenMetadata = await Metadata.load( - connection.current, - metadataPDA - ) - setNftMetaData(tokenMetadata) - } catch (e) { - notify({ - type: 'error', - message: 'Unable to fetch nft', - }) - setNftMetaData(null) - } - setIsLoading(false) - } else { - setIsInvalidMint(true) - setNftMetaData(null) - } - }) - } else { - setNftMetaData(null) - } - }, [form.mint]) - useEffect(() => { - const uri = nftMetaData?.data?.data?.uri - const getNftData = async (uri) => { - if (uri) { - setIsLoading(true) - try { - const nftResponse = (await axios.get(uri)).data - setImgUrl(nftResponse.image) - } catch (e) { - notify({ - type: 'error', - message: 'Unable to fetch nft', - }) - } - setIsLoading(false) - } else { - setImgUrl('') - } - } - setAtaAddress('') - getNftData(uri) - }, [JSON.stringify(nftMetaData)]) - return ( - <> - setCurrentAccount(value, connection)} - currentAccount={currentAccount} - nftsGovernedTokenAccounts={nftsGovernedTokenAccounts} - > - -
-
-
- - { - "If your wallet doesn't support sending nfts to shared wallets please generate address using the nft mint" - } -
-
- - handleSetForm({ - value: evt.target.value, - propertyName: 'mint', - }) - } - noMaxWidth={true} - error={formErrors['mint']} - /> - - {isInvalidMint && ( -
Invalid mint address
- )} - {isLoading ? ( - - ) : ( - imgUrl && ( -
- -
- ) - )} -
- {ataAddress && ( -
-
-
- {abbreviateAddress(new PublicKey(ataAddress))} -
-
-
- { - navigator.clipboard.writeText(ataAddress) - }} - > - - -
-
- )} -
-
{additionalBtns}
-
- - ) -} - -export default DepositNFTAddress diff --git a/components/TreasuryAccount/DepositNFTFromWallet.tsx b/components/TreasuryAccount/DepositNFTFromWallet.tsx deleted file mode 100644 index d2b9f40bc8..0000000000 --- a/components/TreasuryAccount/DepositNFTFromWallet.tsx +++ /dev/null @@ -1,147 +0,0 @@ -import React, { useEffect, useRef, useState } from 'react' -import useTreasuryAccountStore from 'stores/useTreasuryAccountStore' -import useWalletStore from 'stores/useWalletStore' -import Button from '@components/Button' -import Tooltip from '@components/Tooltip' -import { NFTWithMint } from '@utils/uiTypes/nfts' -import { notify } from '@utils/notifications' -import { web3 } from '@project-serum/anchor' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { PublicKey } from '@solana/web3.js' -import { createATA } from '@utils/ataTools' -import { getTokenAccountsByMint } from '@utils/tokens' -import { sendTransaction } from '@utils/send' -import NFTSelector, { NftSelectorFunctions } from '@components/NFTS/NFTSelector' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import NFTAccountSelect from './NFTAccountSelect' - -const DepositNFTFromWallet = ({ additionalBtns }: { additionalBtns?: any }) => { - const nftSelectorRef = useRef(null) - const { setCurrentAccount } = useTreasuryAccountStore() - const currentAccount = useTreasuryAccountStore((s) => s.currentAccount) - const { getNfts } = useTreasuryAccountStore() - const [selectedNfts, setSelectedNfts] = useState([]) - const wallet = useWalletStore((s) => s.current) - const connected = useWalletStore((s) => s.connected) - const connection = useWalletStore((s) => s.connection) - const [isLoading, setIsLoading] = useState(false) - const [sendingSuccess, setSendingSuccess] = useState(false) - const { nftsGovernedTokenAccounts } = useGovernanceAssets() - const handleDeposit = async () => { - setIsLoading(true) - setSendingSuccess(false) - try { - const owner = currentAccount?.isSol - ? currentAccount.extensions.transferAddress! - : currentAccount!.governance!.pubkey - const ConnectedWalletAddress = wallet?.publicKey - const selectedNft = selectedNfts[0] - const nftMintPk = new PublicKey(selectedNft.mint) - const tokenAccountsWithNftMint = await getTokenAccountsByMint( - connection.current, - nftMintPk.toBase58() - ) - //we find ata from connected wallet that holds the nft - const fromAddress = tokenAccountsWithNftMint.find( - (x) => x.account.owner.toBase58() === ConnectedWalletAddress?.toBase58() - )?.publicKey - //we check is there ata created for nft before - const doseAtaForReciverAddressExisit = tokenAccountsWithNftMint.find( - (x) => x.account.owner.toBase58() === owner.toBase58() - ) - - const ataPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - nftMintPk, // mint - owner!, // owner - true - ) - if (!doseAtaForReciverAddressExisit) { - await createATA( - connection.current, - wallet, - nftMintPk, - owner!, - wallet!.publicKey! - ) - } - const transaction = new web3.Transaction().add( - Token.createTransferInstruction( - TOKEN_PROGRAM_ID, - fromAddress!, - ataPk, - wallet!.publicKey!, - [], - 1 - ) - ) - await sendTransaction({ - connection: connection.current, - wallet: wallet!, - transaction, - sendingMessage: 'Depositing NFT', - successMessage: 'NFT has been deposited', - }) - setSendingSuccess(true) - nftSelectorRef.current?.handleGetNfts() - getNfts(nftsGovernedTokenAccounts, connection.current) - } catch (e) { - notify({ - type: 'error', - message: 'Unable to send selected nft', - }) - } - setIsLoading(false) - } - - useEffect(() => { - if (sendingSuccess) { - setCurrentAccount(currentAccount!, connection) - } - }, [connected, sendingSuccess]) - - return ( - <> - setCurrentAccount(value, connection)} - currentAccount={currentAccount} - nftsGovernedTokenAccounts={nftsGovernedTokenAccounts} - > - setSelectedNfts(selected)} - > -
-
- {additionalBtns} - -
-
- - ) -} - -export default DepositNFTFromWallet diff --git a/components/TreasuryAccount/HoldTokensTotalPrice.tsx b/components/TreasuryAccount/HoldTokensTotalPrice.tsx deleted file mode 100644 index 040ed1ca7e..0000000000 --- a/components/TreasuryAccount/HoldTokensTotalPrice.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { useTotalTreasuryPrice } from '@hooks/useTotalTreasuryPrice' -const HoldTokensTotalPrice = () => { - const { totalPriceFormatted } = useTotalTreasuryPrice() - return ( -
-

Treasury Balance

- - ${totalPriceFormatted ? totalPriceFormatted : 0} - -
- ) -} - -export default HoldTokensTotalPrice diff --git a/components/TreasuryAccount/LoadingRows.tsx b/components/TreasuryAccount/LoadingRows.tsx deleted file mode 100644 index 0dddaabbe1..0000000000 --- a/components/TreasuryAccount/LoadingRows.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react' - -const LoadingRows = () => { - return ( -
-
-
-
-
- ) -} - -export default LoadingRows diff --git a/components/TreasuryAccount/NFTAccountSelect.tsx b/components/TreasuryAccount/NFTAccountSelect.tsx deleted file mode 100644 index 9eb5385e84..0000000000 --- a/components/TreasuryAccount/NFTAccountSelect.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import Select from '@components/inputs/Select' -import AccountItemNFT from './AccountItemNFT' - -const NFTAccountSelect = ({ - onChange, - nftsGovernedTokenAccounts, - currentAccount, -}) => { - return ( - - ) -} - -export default NFTAccountSelect diff --git a/components/TreasuryAccount/NewTreasuryAccountForm.tsx b/components/TreasuryAccount/NewTreasuryAccountForm.tsx deleted file mode 100644 index e4f7ee3b03..0000000000 --- a/components/TreasuryAccount/NewTreasuryAccountForm.tsx +++ /dev/null @@ -1,350 +0,0 @@ -import BaseGovernanceForm, { - BaseGovernanceFormFields, -} from 'components/AssetsList/BaseGovernanceForm' -import Button from 'components/Button' -import Input from 'components/inputs/Input' -import PreviousRouteBtn from 'components/PreviousRouteBtn' -import useQueryContext from 'hooks/useQueryContext' -import useRealm from 'hooks/useRealm' -import { - PROGRAM_VERSION_V1, - RpcContext, - VoteTipping, -} from '@solana/spl-governance' -import { MintInfo } from '@solana/spl-token' -import { PublicKey } from '@solana/web3.js' -import { tryParseKey } from 'tools/validators/pubkey' -import { debounce } from 'utils/debounce' -import { isFormValid } from 'utils/formValidation' -import { getGovernanceConfig } from '@utils/GovernanceTools' -import { notify } from 'utils/notifications' -import tokenService from 'utils/services/token' -import { TokenProgramAccount, tryGetMint } from 'utils/tokens' -import { createTreasuryAccount } from 'actions/createTreasuryAccount' -import { useRouter } from 'next/router' -import React, { useEffect, useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import * as yup from 'yup' -import { DEFAULT_NFT_TREASURY_MINT } from '@components/instructions/tools' -import { MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY } from '@tools/constants' -import { getProgramVersionForRealm } from '@models/registry/api' -import { TokenInfo } from '@solana/spl-token-registry' -import Select from '@components/inputs/Select' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { getMintDecimalAmount } from '@tools/sdk/units' -interface NewTreasuryAccountForm extends BaseGovernanceFormFields { - mintAddress: string -} -const defaultFormValues = { - mintAddress: '', - minCommunityTokensToCreateProposal: MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY, - minInstructionHoldUpTime: 0, - maxVotingTime: 3, - voteThreshold: 60, - voteTipping: VoteTipping.Strict, -} - -const SOL = 'SOL' -const OTHER = 'OTHER' -const NFT = 'NFT' - -const NewAccountForm = () => { - const router = useRouter() - const client = useVotePluginsClientStore( - (s) => s.state.currentRealmVotingClient - ) - const [types, setTypes] = useState([]) - const { fmtUrlWithCluster } = useQueryContext() - const isCurrentVersionHigherThenV1 = () => { - return ( - (realmInfo?.programVersion && - realmInfo.programVersion > PROGRAM_VERSION_V1) || - false - ) - } - const { - realmInfo, - realm, - mint: realmMint, - symbol, - ownVoterWeight, - } = useRealm() - useEffect(() => { - const accTypes = [ - { - name: 'SOL Account', - value: SOL, - defaultMint: '', - hide: !isCurrentVersionHigherThenV1(), - }, - { - name: 'Token Account', - value: OTHER, - defaultMint: '', - hide: isCurrentVersionHigherThenV1(), - }, - { - name: 'NFT Account', - value: NFT, - defaultMint: DEFAULT_NFT_TREASURY_MINT, - hide: isCurrentVersionHigherThenV1(), - }, - ] - setTypes(accTypes) - }, [realmInfo?.programVersion]) - const filteredTypes = types.filter((x) => !x.hide) - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection) - const connected = useWalletStore((s) => s.connected) - const { fetchRealm } = useWalletStore((s) => s.actions) - const [form, setForm] = useState({ - ...defaultFormValues, - }) - const [tokenInfo, setTokenInfo] = useState(undefined) - const [mint, setMint] = useState | null>(null) - const [isLoading, setIsLoading] = useState(false) - const [formErrors, setFormErrors] = useState({}) - const [treasuryType, setTreasuryType] = useState(null) - const tokenOwnerRecord = ownVoterWeight.canCreateGovernanceUsingCouncilTokens() - ? ownVoterWeight.councilTokenRecord - : realm && ownVoterWeight.canCreateGovernanceUsingCommunityTokens(realm) - ? ownVoterWeight.communityTokenRecord - : undefined - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - useEffect(() => { - setTreasuryType(filteredTypes[0]) - }, [filteredTypes.length]) - const handleCreate = async () => { - try { - if (!realm) { - throw 'No realm selected' - } - if (!connected) { - throw 'Please connect your wallet' - } - if (!tokenOwnerRecord) { - throw "You don't have enough governance power to create a new treasury account" - } - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - if (isValid && realmMint) { - setIsLoading(true) - - const rpcContext = new RpcContext( - new PublicKey(realm.owner.toString()), - getProgramVersionForRealm(realmInfo!), - wallet!, - connection.current, - connection.endpoint - ) - - const governanceConfigValues = { - minTokensToCreateProposal: form.minCommunityTokensToCreateProposal, - minInstructionHoldUpTime: form.minInstructionHoldUpTime, - maxVotingTime: form.maxVotingTime, - voteThresholdPercentage: form.voteThreshold, - mintDecimals: realmMint.decimals, - voteTipping: form.voteTipping, - } - - const governanceConfig = getGovernanceConfig(governanceConfigValues) - - await createTreasuryAccount( - rpcContext, - realm, - treasuryType?.value === SOL ? null : new PublicKey(form.mintAddress), - governanceConfig, - tokenOwnerRecord!, - client - ) - setIsLoading(false) - fetchRealm(realmInfo!.programId, realmInfo!.realmId) - router.push(fmtUrlWithCluster(`/dao/${symbol}/`)) - } - } catch (e) { - console.error('Create Treasury', e) - //TODO how do we present errors maybe something more generic ? - notify({ - type: 'error', - message: `Can't create governance`, - description: `Transaction error ${e}`, - }) - setIsLoading(false) - } - } - const handleSetDefaultMintError = () => { - const mintError = { mintAddress: 'Invalid mint address' } - setFormErrors(mintError) - setMint(null) - setTokenInfo(undefined) - } - - const schema = yup.object().shape({ - mintAddress: yup - .string() - .test( - 'mintAddressTest', - 'Mint address validation error', - async function (val: string) { - if (treasuryType.value === SOL) { - return true - } - if (val) { - try { - const pubKey = tryParseKey(val) - if (!pubKey) { - return this.createError({ - message: `Invalid mint address`, - }) - } - - const accountData = await connection.current.getAccountInfo( - pubKey - ) - if (!accountData) { - return this.createError({ - message: `Account not found`, - }) - } - const mint = tryGetMint(connection.current, pubKey) - if (!mint) { - return this.createError({ - message: `Account is not a valid mint`, - }) - } - return true - } catch (e) { - return this.createError({ - message: `Invalid mint address`, - }) - } - } else { - return this.createError({ - message: `Mint address is required`, - }) - } - } - ), - }) - useEffect(() => { - if (form.mintAddress) { - debounce.debounceFcn(async () => { - const pubKey = tryParseKey(form.mintAddress) - if (pubKey) { - const mintAccount = await tryGetMint(connection.current, pubKey) - if (mintAccount) { - setMint(mintAccount) - const info = tokenService.getTokenInfo(form.mintAddress) - setTokenInfo(info) - } else { - handleSetDefaultMintError() - } - } else { - handleSetDefaultMintError() - } - }) - } else { - setMint(null) - setTokenInfo(undefined) - } - }, [form.mintAddress]) - - useEffect(() => { - handleSetForm({ - value: treasuryType?.defaultMint, - propertyName: 'mintAddress', - }) - }, [treasuryType]) - useEffect(() => { - setForm({ - ...form, - minCommunityTokensToCreateProposal: realmMint?.supply.isZero() - ? MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY - : realmMint - ? getMintDecimalAmount(realmMint!, realmMint!.supply).toNumber() * 0.01 - : 0, - }) - }, [JSON.stringify(realmMint)]) - return ( -
- -
-
-

Create new DAO wallet

-
-
- - {filteredTypes.length > 1 && ( - - )} - - {treasuryType?.value === OTHER && ( - <> - - handleSetForm({ - value: evt.target.value, - propertyName: 'mintAddress', - }) - } - error={formErrors['mintAddress']} - /> - {tokenInfo ? ( -
- {tokenInfo?.logoURI && ( - - )} -
- {tokenInfo.name} -

{tokenInfo?.symbol}

-
-
- ) : mint ? ( -
Mint found
- ) : null} - - )} - -
- -
-
- ) -} - -export default NewAccountForm diff --git a/components/TreasuryAccount/ProposalOptions.tsx b/components/TreasuryAccount/ProposalOptions.tsx deleted file mode 100644 index acd48ed0cf..0000000000 --- a/components/TreasuryAccount/ProposalOptions.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import Input from '@components/inputs/Input' -import Textarea from '@components/inputs/Textarea' -import VoteBySwitch from 'pages/dao/[symbol]/proposal/components/VoteBySwitch' -import React from 'react' - -const ProposalOptions: React.FC<{ - handleSetForm: (obj: { propertyName: string; value: any }) => void - form: any - canChooseWhoVote?: boolean - voteByCouncil: boolean - setVoteByCouncil: React.Dispatch> -}> = ({ - handleSetForm, - form, - canChooseWhoVote, - voteByCouncil, - setVoteByCouncil, -}) => { - return ( - <> - - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - /> - - {canChooseWhoVote && ( - { - setVoteByCouncil(!voteByCouncil) - }} - > - )} - - ) -} - -export default ProposalOptions diff --git a/components/TreasuryAccount/SendTokens.tsx b/components/TreasuryAccount/SendTokens.tsx deleted file mode 100644 index 1cadff0a8c..0000000000 --- a/components/TreasuryAccount/SendTokens.tsx +++ /dev/null @@ -1,425 +0,0 @@ -import Button from '@components/Button' -import Input from '@components/inputs/Input' -import { getAccountName } from '@components/instructions/tools' -import useRealm from '@hooks/useRealm' -import { AccountInfo } from '@solana/spl-token' -import { PublicKey } from '@solana/web3.js' -import { - // getMintDecimalAmountFromNatural, - getMintMinAmountAsDecimal, - getMintNaturalAmountFromDecimalAsBN, -} from '@tools/sdk/units' -import { tryParseKey } from '@tools/validators/pubkey' -import { debounce } from '@utils/debounce' -import { abbreviateAddress, precision } from '@utils/formatting' -import { TokenProgramAccount, tryGetTokenAccount } from '@utils/tokens' -import { - SendTokenCompactViewForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import React, { useEffect, useState } from 'react' -import useTreasuryAccountStore from 'stores/useTreasuryAccountStore' -import useWalletStore from 'stores/useWalletStore' - -import { getTokenTransferSchema } from '@utils/validations' -import { - ArrowCircleDownIcon, - ArrowCircleUpIcon, - // InformationCircleIcon, -} from '@heroicons/react/solid' -import tokenService from '@utils/services/token' -import BigNumber from 'bignumber.js' -import { getInstructionDataFromBase64 } from '@solana/spl-governance' -import useQueryContext from '@hooks/useQueryContext' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { useRouter } from 'next/router' -import { notify } from '@utils/notifications' -import Textarea from '@components/inputs/Textarea' -// import { Popover } from '@headlessui/react' -import AccountLabel from './AccountHeader' -import Tooltip from '@components/Tooltip' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { - getSolTransferInstruction, - getTransferInstruction, - getTransferNftInstruction, -} from '@utils/instructionTools' -import VoteBySwitch from 'pages/dao/[symbol]/proposal/components/VoteBySwitch' -import NFTSelector from '@components/NFTS/NFTSelector' -import { NFTWithMint } from '@utils/uiTypes/nfts' -import useCreateProposal from '@hooks/useCreateProposal' -import NFTAccountSelect from './NFTAccountSelect' - -const SendTokens = ({ isNft = false }) => { - const currentAccount = useTreasuryAccountStore((s) => s.currentAccount) - const connection = useWalletStore((s) => s.connection) - const { nftsGovernedTokenAccounts } = useGovernanceAssets() - const { setCurrentAccount } = useTreasuryAccountStore() - const { realmInfo, symbol, realm, canChooseWhoVote } = useRealm() - const { handleCreateProposal } = useCreateProposal() - const { canUseTransferInstruction } = useGovernanceAssets() - const tokenInfo = useTreasuryAccountStore((s) => s.tokenInfo) - const isNFT = isNft || currentAccount?.isNft - const isSol = currentAccount?.isSol - const { fmtUrlWithCluster } = useQueryContext() - const wallet = useWalletStore((s) => s.current) - const router = useRouter() - const { fetchRealmGovernance } = useWalletStore((s) => s.actions) - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - destinationAccount: '', - amount: isNFT ? 1 : undefined, - governedTokenAccount: undefined, - programId: programId?.toString(), - mintInfo: undefined, - title: '', - description: '', - }) - const [selectedNfts, setSelectedNfts] = useState([]) - const [voteByCouncil, setVoteByCouncil] = useState(false) - const [showOptions, setShowOptions] = useState(false) - const [ - destinationAccount, - setDestinationAccount, - ] = useState | null>(null) - const [isLoading, setIsLoading] = useState(false) - const [formErrors, setFormErrors] = useState({}) - const destinationAccountName = - destinationAccount?.publicKey && - getAccountName(destinationAccount?.account.address) - const mintMinAmount = form.governedTokenAccount?.extensions?.mint - ? getMintMinAmountAsDecimal( - form.governedTokenAccount.extensions.mint.account - ) - : 1 - const currentPrecision = precision(mintMinAmount) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - const calcTransactionDolarAmount = (amount) => { - const price = tokenService.getUSDTokenPrice( - currentAccount!.extensions.mint!.publicKey.toBase58() - ) - const totalPrice = amount * price - const totalPriceFormatted = - amount && price ? new BigNumber(totalPrice).toFormat(2) : '' - return totalPriceFormatted - } - - async function getInstruction(): Promise { - const selectedNftMint = selectedNfts[0]?.mint - const defaultProps = { - schema, - form, - programId, - connection, - wallet, - currentAccount, - setFormErrors, - } - if (isNFT) { - return getTransferNftInstruction({ - ...defaultProps, - nftMint: selectedNftMint, - }) - } - if (isSol) { - return getSolTransferInstruction(defaultProps) - } - return getTransferInstruction(defaultProps) - } - const handlePropose = async () => { - setIsLoading(true) - const instruction: UiInstruction = await getInstruction() - if (instruction.isValid) { - const governance = currentAccount?.governance - let proposalAddress: PublicKey | null = null - if (!realm) { - setIsLoading(false) - throw 'No realm selected' - } - const instructionData = { - data: instruction.serializedInstruction - ? getInstructionDataFromBase64(instruction.serializedInstruction) - : null, - holdUpTime: governance?.account?.config.minInstructionHoldUpTime, - prerequisiteInstructions: instruction.prerequisiteInstructions || [], - } - try { - // Fetch governance to get up to date proposalCount - const selectedGovernance = (await fetchRealmGovernance( - governance?.pubkey - )) as ProgramAccount - proposalAddress = await handleCreateProposal({ - title: form.title ? form.title : proposalTitle, - description: form.description ? form.description : '', - voteByCouncil, - instructionsData: [instructionData], - governance: selectedGovernance!, - }) - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - router.push(url) - } catch (ex) { - notify({ type: 'error', message: `${ex}` }) - } - } - setIsLoading(false) - } - const IsAmountNotHigherThenBalance = () => { - const mintValue = getMintNaturalAmountFromDecimalAsBN( - form.amount!, - form.governedTokenAccount!.extensions.mint!.account.decimals - ) - let gte: boolean | undefined = false - try { - gte = form.governedTokenAccount!.extensions.amount?.gte(mintValue) - } catch (e) { - //silent fail - } - return gte - } - - useEffect(() => { - if (currentAccount) { - handleSetForm({ - value: currentAccount, - propertyName: 'governedTokenAccount', - }) - } - }, [currentAccount]) - useEffect(() => { - if (form.destinationAccount) { - debounce.debounceFcn(async () => { - const pubKey = tryParseKey(form.destinationAccount) - if (pubKey) { - const account = await tryGetTokenAccount(connection.current, pubKey) - setDestinationAccount(account ? account : null) - } else { - setDestinationAccount(null) - } - }) - } else { - setDestinationAccount(null) - } - }, [form.destinationAccount]) - - const schema = getTokenTransferSchema({ form, connection, nftMode: isNft }) - const transactionDolarAmount = calcTransactionDolarAmount(form.amount) - const nftName = selectedNfts[0]?.val?.name - const nftTitle = `Send ${nftName ? nftName : 'NFT'} to ${ - tryParseKey(form.destinationAccount) - ? abbreviateAddress(new PublicKey(form.destinationAccount)) - : '' - }` - const proposalTitle = isNFT - ? nftTitle - : `Pay ${form.amount}${tokenInfo ? ` ${tokenInfo?.symbol} ` : ' '}to ${ - tryParseKey(form.destinationAccount) - ? abbreviateAddress(new PublicKey(form.destinationAccount)) - : '' - }` - - if (!currentAccount) { - return null - } - - return ( - <> -

- <> - Send {!isNft && tokenInfo && tokenInfo?.symbol} {isNFT && 'NFT'} - -

- {isNFT ? ( - setCurrentAccount(value, connection)} - currentAccount={currentAccount} - nftsGovernedTokenAccounts={nftsGovernedTokenAccounts} - > - ) : ( - - )} -
- - handleSetForm({ - value: evt.target.value, - propertyName: 'destinationAccount', - }) - } - noMaxWidth={true} - error={formErrors['destinationAccount']} - /> - {destinationAccount && ( -
-
Account owner
-
- {destinationAccount.account.owner.toString()} -
-
- )} - {destinationAccountName && ( -
-
Account name
-
{destinationAccountName}
-
- )} - {isNFT ? ( - setSelectedNfts(nfts)} - ownersPk={ - currentAccount.isSol - ? [ - currentAccount.extensions.transferAddress!, - currentAccount.governance.pubkey, - ] - : [currentAccount.governance.pubkey] - } - > - ) : ( - - )} - - {transactionDolarAmount && !isNft - ? IsAmountNotHigherThenBalance() - ? `~$${transactionDolarAmount}` - : 'Insufficient balance' - : null} - -
setShowOptions(!showOptions)} - > - {showOptions ? ( - - ) : ( - - )} - Options - {/* popover with description maybe will be needed later */} - {/* - - - - - -
- {`In case of empty fields of advanced options, title and description will be - combination of amount token symbol and destination account e.g - "Pay 10 sol to PF295R1YJ8n1..."`} -
-
-
*/} -
- {showOptions && ( - <> - - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - /> - - {canChooseWhoVote && ( - { - setVoteByCouncil(!voteByCouncil) - }} - > - )} - - )} -
-
- -
- - ) -} - -export default SendTokens diff --git a/components/TreasuryAccount/TradeOnSerum.tsx b/components/TreasuryAccount/TradeOnSerum.tsx deleted file mode 100644 index 198183e7cf..0000000000 --- a/components/TreasuryAccount/TradeOnSerum.tsx +++ /dev/null @@ -1,606 +0,0 @@ -import * as yup from 'yup' -import Input from '@components/inputs/Input' -import Select from '@components/inputs/Select' -import useTotalTokenValue from '@hooks/useTotalTokenValue' -import { - fmtTokenInfoWithMint, - getMintDecimalAmountFromNatural, - getMintNaturalAmountFromDecimalAsBN, -} from '@tools/sdk/units' -import { Market as SerumMarket } from '@project-serum/serum' -import tokenService from '@utils/services/token' -import React, { useCallback, useState } from 'react' -import useTreasuryAccountStore from 'stores/useTreasuryAccountStore' -import AccountLabel from './BaseAccountHeader' -import { - Bound, - boundOptions, - OrderSide, - orderSideOptions, - getProgramId, - instructions as serumRemoteInstructions, - getDexId, - IDL as SerumRemoteIDL, - SerumRemote, -} from '@mithraic-labs/serum-remote' -import useWalletStore from 'stores/useWalletStore' -import { - ArrowCircleDownIcon, - ArrowCircleUpIcon, - ExternalLinkIcon, -} from '@heroicons/react/solid' -import ProposalOptions from './ProposalOptions' -import useRealm from '@hooks/useRealm' -import Button from '@components/Button' -import Tooltip from '@components/Tooltip' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { - BN, - Program, - AnchorProvider, - Wallet, - web3, -} from '@project-serum/anchor' -import { getValidatedPublickKey } from '@utils/validations' -import { validateInstruction } from '@utils/instructionTools' -import { - getInstructionDataFromBase64, - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { notify } from '@utils/notifications' -import { useRouter } from 'next/router' -import useCreateProposal from '@hooks/useCreateProposal' -import useQueryContext from '@hooks/useQueryContext' -import { - AccountInfo, - ASSOCIATED_TOKEN_PROGRAM_ID, - MintInfo, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { InstructionDataWithHoldUpTime } from 'actions/createProposal' -import { AssetAccount } from '@utils/uiTypes/assets' -import { TokenProgramAccount } from '@utils/tokens' -import { Keypair } from '@solana/web3.js' - -export type TradeOnSerumProps = { tokenAccount: AssetAccount } - -type TradeOnSerumForm = { - amount: number - boundedPrice: number - serumRemoteProgramId: string - serumProgramId: string - serumMarketId: string - assetMint: string - reclaimDate: Date - reclaimAddress: string - orderSide: number - bound: Bound - description: string - title: string -} - -const formSchema = ( - mintInfo: TokenProgramAccount, - token: TokenProgramAccount -) => { - return ( - yup - .object() - .shape({ - title: yup.string(), - description: yup.string(), - amount: yup - .number() - .typeError('Amount is required') - .test( - 'amount', - "Transfer amount must be less than the source account's available amount", - function (val: number) { - const mintValue = getMintNaturalAmountFromDecimalAsBN( - val, - mintInfo.account.decimals - ) - return token.account.amount.gte(mintValue) - } - ) - .test( - 'amount', - 'Transfer amount must be greater than 0', - function (val: number) { - return val > 0 - } - ), - boundedPrice: yup - .number() - .typeError('boundedPrice is required') - .test( - 'boundedPrice', - 'Bounded price must be greater than 0', - function (val: number) { - return val > 0 - } - ), - serumRemoteProgramId: yup - .string() - .test( - 'serumRemoteProgramId', - 'serumRemoteProgramId must be valid PublicKey', - function (serumRemoteProgramId: string) { - try { - getValidatedPublickKey(serumRemoteProgramId) - } catch (err) { - return false - } - return true - } - ), - serumProgramId: yup - .string() - .test( - 'serumProgramId', - 'serumProgramId must be valid PublicKey', - function (serumProgramId: string) { - try { - getValidatedPublickKey(serumProgramId) - } catch (err) { - return false - } - return true - } - ), - serumMarketId: yup - .string() - .test( - 'serumMarketId', - 'serumMarketId must be valid PublicKey', - function (serumMarketId: string) { - try { - getValidatedPublickKey(serumMarketId) - } catch (err) { - return false - } - return true - } - ), - assetMint: yup - .string() - .test( - 'assetMint', - 'assetMint must be valid PublicKey', - function (assetMint: string) { - try { - getValidatedPublickKey(assetMint) - } catch (err) { - return false - } - return true - } - ), - // TODO: [nice to have] Validate the date is at least min voting period ahead - reclaimDate: yup.date().typeError('reclaimDate must be a valid date'), - reclaimAddress: yup - .string() - .test( - 'reclaimAddress', - 'reclaimAddress must be valid PublicKey', - function (reclaimAddress: string) { - try { - getValidatedPublickKey(reclaimAddress) - } catch (err) { - return false - } - return true - } - ), - orderSide: yup - .number() - .typeError('orderSide is required') - .test( - 'orderSide', - 'orderSide must be 0 (Bid) or 1 (Ask)', - function (orderSide: number) { - return orderSide === 0 || orderSide === 1 - } - ), - bound: yup - .number() - .typeError('bound is required') - .test( - 'bound', - 'bound must be 0 (Lower) or 1 (Upper)', - function (bound: number) { - return bound === 0 || bound === 1 - } - ), - }) - // Check the Bound and Order Side are viable - .test('bound', 'Some check against other values', function (val) { - if (!val.bound) { - return true - } - if (val.bound === val.orderSide) { - return new yup.ValidationError( - `Bound cannot be ${Bound[val.bound]} when Order Side is ${ - OrderSide[val.orderSide] - }`, - undefined, - 'bound' - ) - } - return true - }) - ) -} - -const TradeOnSerum: React.FC = ({ tokenAccount }) => { - const currentAccount = useTreasuryAccountStore((s) => s.currentAccount) - const router = useRouter() - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { fetchRealmGovernance } = useWalletStore((s) => s.actions) - const { handleCreateProposal } = useCreateProposal() - const serumRemoteProgramId = getProgramId(connection.cluster) - const serumProgramKey = getDexId(connection.cluster) - const { canUseTransferInstruction } = useGovernanceAssets() - const { canChooseWhoVote, symbol } = useRealm() - const { fmtUrlWithCluster } = useQueryContext() - const [form, setForm] = useState({ - amount: 0, - boundedPrice: 0, - title: 'Diversify treasury with Serum', - description: - 'A proposal to trade some asset for another using Serum. PLEASE EXPLAIN IN MORE DETAIL', - serumRemoteProgramId: serumRemoteProgramId.toString(), - serumProgramId: serumProgramKey.toString(), - serumMarketId: '', - assetMint: tokenAccount.extensions.mint!.publicKey.toString(), - orderSide: 0, - bound: 1, - // Default reclaim date of 10 days - reclaimDate: new Date(new Date().getTime() + 1_000 * 3600 * 24 * 10), - // The reclaim address must be the same account where the initial assets come from - reclaimAddress: tokenAccount.pubkey.toString(), - }) - const [formErrors, setFormErrors] = useState({}) - const [showOptions, setShowOptions] = useState(false) - const [voteByCouncil, setVoteByCouncil] = useState(false) - const [isLoading, setIsLoading] = useState(false) - - if (!tokenAccount.extensions.mint || !tokenAccount.extensions.token) { - throw new Error('No mint information on the tokenAccount') - } - const mintAccount = tokenAccount.extensions.mint - const token = tokenAccount.extensions.token - const schema = formSchema(mintAccount, token) - - const tokenInfo = tokenService.getTokenInfo(mintAccount.publicKey.toString()) - - const totalValue = useTotalTokenValue({ - amount: getMintDecimalAmountFromNatural( - mintAccount.account, - token.account.amount - ).toNumber(), - mintAddress: mintAccount.publicKey.toString(), - }) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const handlePropose = useCallback(async () => { - setIsLoading(true) - const isValid = await validateInstruction({ schema, form, setFormErrors }) - if (!currentAccount || !currentAccount!.extensions!.token!.account.owner) { - throw new Error('currentAccount is null or undefined') - } - if (wallet && wallet.publicKey && isValid) { - // create the anchor Program - // @ts-ignore: Wallet compatability issues - const options = AnchorProvider.defaultOptions() - const provider = new AnchorProvider( - connection.current, - new Wallet(Keypair.generate()), - options - ) - const program = new Program( - SerumRemoteIDL, - serumRemoteProgramId, - provider - ) - // convert amount to mintAmount - const mintValue = getMintNaturalAmountFromDecimalAsBN( - form.amount, - mintAccount.account.decimals - ) - const dexProgramId = new web3.PublicKey(form.serumProgramId) - const serumMarketId = new web3.PublicKey(form.serumMarketId) - // Load the serumMarket - let market: SerumMarket - try { - market = await SerumMarket.load( - connection.current, - serumMarketId, - {}, - dexProgramId - ) - } catch (err) { - setFormErrors((e) => ({ - ...e, - serumMarketId: 'Error loading the SerumMarket', - })) - setIsLoading(false) - return - } - // Convert the form's numerical bounded price to market lots - const boundPrice = market.priceNumberToLots(form.boundedPrice) - // Validate the market and information - if ( - form.assetMint !== market.quoteMintAddress.toString() && - form.assetMint !== market.baseMintAddress.toString() - ) { - setFormErrors((e) => ({ - ...e, - serumMarketId: - "The asset you're looking to trade with does not exist on this Serum Market", - })) - setIsLoading(false) - return - } - if ( - (form.orderSide === 0 && - form.assetMint !== market.quoteMintAddress.toString()) || - (form.orderSide === 1 && - form.assetMint !== market.baseMintAddress.toString()) - ) { - setFormErrors((e) => ({ - ...e, - orderSide: `order side of ${ - OrderSide[form.orderSide] - } does not match the expected serum market mint`, - })) - setIsLoading(false) - return - } - - const proposalInstructions: InstructionDataWithHoldUpTime[] = [] - const prerequisiteInstructions: web3.TransactionInstruction[] = [] - // Check if an associated token account for the other side of the - // market is required. If so, add the create associated token account ix - const aTADepositAddress = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - form.orderSide === 0 ? market.baseMintAddress : market.quoteMintAddress, - currentAccount!.extensions!.token!.account.owner - ) - const depositAccountInfo = await connection.current.getAccountInfo( - aTADepositAddress - ) - if (!depositAccountInfo) { - // generate the instruction for creating the ATA - const createAtaIx = Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - form.orderSide === 0 - ? market.baseMintAddress - : market.quoteMintAddress, - aTADepositAddress, - currentAccount!.extensions!.token!.account.owner, - wallet.publicKey - ) - prerequisiteInstructions.push(createAtaIx) - } - - const instruction = await serumRemoteInstructions.initBoundedStrategyIx( - //@ts-ignore: differing anchor versions - program, - dexProgramId, - serumMarketId, - new web3.PublicKey(form.assetMint), - { - transferAmount: mintValue, - boundPrice, - reclaimDate: new BN(form.reclaimDate.getTime() / 1_000), - reclaimAddress: new web3.PublicKey(form.reclaimAddress), - depositAddress: aTADepositAddress, - orderSide: form.orderSide, - bound: form.bound, - }, - { owner: currentAccount!.extensions!.token!.account.owner } - ) - - const serializedIx = serializeInstructionToBase64(instruction) - - const instructionData = { - data: getInstructionDataFromBase64(serializedIx), - holdUpTime: - currentAccount?.governance?.account?.config.minInstructionHoldUpTime, - prerequisiteInstructions, - shouldSplitIntoSeparateTxs: true, - } - proposalInstructions.push(instructionData) - - try { - // Fetch governance to get up to date proposalCount - const selectedGovernance = (await fetchRealmGovernance( - currentAccount?.governance?.pubkey - )) as ProgramAccount - - const proposalAddress = await handleCreateProposal({ - title: form.title, - description: form.description, - governance: selectedGovernance, - instructionsData: proposalInstructions, - voteByCouncil, - isDraft: false, - }) - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - - router.push(url) - } catch (ex) { - notify({ type: 'error', message: `${ex}` }) - } - } - - setIsLoading(false) - }, [schema, form, setFormErrors, connection, currentAccount, symbol, wallet]) - return ( - <> -
-

Trade on Serum!

-
- -
- Serum Remote{' '} - -
-
-  is open sourced, yet unaudited. Do your own research. -
- - {/* Add Serum Remote form */} -
- - handleSetForm({ - value: evt.target.value, - propertyName: 'serumMarketId', - }) - } - noMaxWidth={true} - error={formErrors['serumMarketId']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'amount', - }) - } - error={formErrors['amount']} - noMaxWidth={true} - /> - - - {/* TODO: Add reclaim date picker */} - - handleSetForm({ - value: evt.target.value, - propertyName: 'boundedPrice', - }) - } - error={formErrors['boundedPrice']} - noMaxWidth={true} - /> -
- -
setShowOptions(!showOptions)} - > - {showOptions ? ( - - ) : ( - - )} - Options -
- {showOptions && ( - - )} -
-
- -
- - ) -} - -export default TradeOnSerum diff --git a/components/VoteCommentModal.tsx b/components/VoteCommentModal.tsx deleted file mode 100644 index cd6efc778f..0000000000 --- a/components/VoteCommentModal.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import React, { FunctionComponent, useState } from 'react' - -import { - ChatMessageBody, - ChatMessageBodyType, - YesNoVote, -} from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import useWalletStore from '../stores/useWalletStore' -import useRealm from '../hooks/useRealm' -import { castVote } from '../actions/castVote' - -import Button, { SecondaryButton } from './Button' -// import { notify } from '../utils/notifications' -import Loading from './Loading' -import Modal from './Modal' -import Input from './inputs/Input' -import Tooltip from './Tooltip' -import { TokenOwnerRecord } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { getProgramVersionForRealm } from '@models/registry/api' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' - -interface VoteCommentModalProps { - onClose: () => void - isOpen: boolean - vote: YesNoVote - voterTokenRecord: ProgramAccount -} - -const VoteCommentModal: FunctionComponent = ({ - onClose, - isOpen, - vote, - voterTokenRecord, -}) => { - const client = useVotePluginsClientStore( - (s) => s.state.currentRealmVotingClient - ) - const [submitting, setSubmitting] = useState(false) - const [comment, setComment] = useState('') - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection) - const { proposal } = useWalletStore((s) => s.selectedProposal) - const { fetchChatMessages } = useWalletStore((s) => s.actions) - const { realm, realmInfo } = useRealm() - const { refetchProposals } = useWalletStore((s) => s.actions) - - const submitVote = async (vote: YesNoVote) => { - setSubmitting(true) - const rpcContext = new RpcContext( - proposal!.owner, - getProgramVersionForRealm(realmInfo!), - wallet!, - connection.current, - connection.endpoint - ) - - const msg = comment - ? new ChatMessageBody({ - type: ChatMessageBodyType.Text, - value: comment, - }) - : undefined - - try { - await castVote( - rpcContext, - realm!, - proposal!, - voterTokenRecord, - vote, - msg, - client - ) - await refetchProposals() - } catch (ex) { - //TODO: How do we present transaction errors to users? Just the notification? - console.error("Can't cast vote", ex) - onClose() - } finally { - setSubmitting(false) - onClose() - } - - fetchChatMessages(proposal!.pubkey) - } - - const voteString = vote === YesNoVote.Yes ? 'Yes' : 'No' - - return ( - -

Confirm your vote

- - - - (Optional) - - - setComment(e.target.value)} - // placeholder={`Let the DAO know why you vote '${voteString}'`} - /> - -
- - Cancel - - - -
-
- ) -} - -export default React.memo(VoteCommentModal) diff --git a/components/VoteCountdown.tsx b/components/VoteCountdown.tsx deleted file mode 100644 index e05c3b6952..0000000000 --- a/components/VoteCountdown.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import React, { useEffect, useState } from 'react' -import { Governance, Proposal } from '@solana/spl-governance' -import dayjs from 'dayjs' - -interface CountdownState { - days: number - hours: number - minutes: number - seconds: number -} - -const ZeroCountdown: CountdownState = { - days: 0, - hours: 0, - minutes: 0, - seconds: 0, -} - -const isZeroCountdown = (state: CountdownState) => - state.days === 0 && - state.hours === 0 && - state.minutes === 0 && - state.seconds === 0 - -export function VoteCountdown({ - proposal, - governance, -}: { - proposal: Proposal - governance: Governance -}) { - const [countdown, setCountdown] = useState(ZeroCountdown) - - useEffect(() => { - if (proposal.isVoteFinalized()) { - setCountdown(ZeroCountdown) - return - } - - const getTimeToVoteEnd = () => { - const now = dayjs().unix() - - let timeToVoteEnd = proposal.isPreVotingState() - ? governance.config.maxVotingTime - : (proposal.votingAt?.toNumber() ?? 0) + - governance.config.maxVotingTime - - now - - if (timeToVoteEnd <= 0) { - return ZeroCountdown - } - - const days = Math.floor(timeToVoteEnd / 86400) - timeToVoteEnd -= days * 86400 - - const hours = Math.floor(timeToVoteEnd / 3600) % 24 - timeToVoteEnd -= hours * 3600 - - const minutes = Math.floor(timeToVoteEnd / 60) % 60 - timeToVoteEnd -= minutes * 60 - - const seconds = Math.floor(timeToVoteEnd % 60) - - return { days, hours, minutes, seconds } - } - - const updateCountdown = () => { - const newState = getTimeToVoteEnd() - setCountdown(newState) - } - - const interval = setInterval(() => { - updateCountdown() - }, 1000) - - updateCountdown() - return () => clearInterval(interval) - }, [proposal, governance]) - - return ( - <> - {isZeroCountdown(countdown) ? ( -
Voting ended
- ) : ( -
-
Ends
- {countdown && countdown.days > 0 && ( - <> -
- {countdown.days}d -
- : - - )} -
{countdown.hours}h
- : -
- {countdown.minutes}m -
- {!countdown.days && ( - <> - : -
- {countdown.seconds}s -
- - )} -
- )} - - ) -} diff --git a/components/VotePanel.tsx b/components/VotePanel.tsx deleted file mode 100644 index 72b97ecc23..0000000000 --- a/components/VotePanel.tsx +++ /dev/null @@ -1,265 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ - -import { withFinalizeVote, YesNoVote } from '@solana/spl-governance' -import { TransactionInstruction } from '@solana/web3.js' -import { useCallback, useState } from 'react' -import { relinquishVote } from '../actions/relinquishVote' -import { useHasVoteTimeExpired } from '../hooks/useHasVoteTimeExpired' -import useRealm from '../hooks/useRealm' -import { ProposalState } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { GoverningTokenType } from '@solana/spl-governance' - -import useWalletStore from '../stores/useWalletStore' -import Button, { SecondaryButton } from './Button' -import VoteCommentModal from './VoteCommentModal' -import { getProgramVersionForRealm } from '@models/registry/api' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { useRouter } from 'next/router' -import useNftPluginStore from 'NftVotePlugin/store/nftPluginStore' -import { LOCALNET_REALM_ID as PYTH_LOCALNET_REALM_ID } from 'pyth-staking-api' - -const VotePanel = () => { - const [showVoteModal, setShowVoteModal] = useState(false) - const [vote, setVote] = useState(null) - const client = useVotePluginsClientStore( - (s) => s.state.currentRealmVotingClient - ) - const [isLoading, setIsLoading] = useState(false) - const router = useRouter() - const { pk } = router.query - const { - governance, - proposal, - voteRecordsByVoter, - tokenType, - } = useWalletStore((s) => s.selectedProposal) - const { - ownTokenRecord, - ownCouncilTokenRecord, - realm, - realmInfo, - ownVoterWeight, - } = useRealm() - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection) - const connected = useWalletStore((s) => s.connected) - const refetchProposals = useWalletStore((s) => s.actions.refetchProposals) - const fetchProposal = useWalletStore((s) => s.actions.fetchProposal) - const hasVoteTimeExpired = useHasVoteTimeExpired(governance, proposal!) - const maxVoterWeight = - useNftPluginStore((s) => s.state.maxVoteRecord)?.pubkey || undefined - - // Handle state based on if a delegated wallet has already voted or not - const ownVoteRecord = - tokenType === GoverningTokenType.Community && ownTokenRecord - ? voteRecordsByVoter[ - ownTokenRecord.account.governingTokenOwner.toBase58() - ] - : ownCouncilTokenRecord - ? voteRecordsByVoter[ - ownCouncilTokenRecord.account.governingTokenOwner.toBase58() - ] - : wallet?.publicKey && voteRecordsByVoter[wallet.publicKey.toBase58()] - - const voterTokenRecord = - tokenType === GoverningTokenType.Community - ? ownTokenRecord - : ownCouncilTokenRecord - - const isVoteCast = ownVoteRecord !== undefined - const isVoting = - proposal?.account.state === ProposalState.Voting && !hasVoteTimeExpired - - const isVoteEnabled = - connected && - isVoting && - !isVoteCast && - voterTokenRecord && - ownVoterWeight.hasMinAmountToVote( - voterTokenRecord.account.governingTokenMint - ) - - const isWithdrawEnabled = - connected && - ownVoteRecord && - !ownVoteRecord?.account.isRelinquished && - proposal && - (proposal!.account.state === ProposalState.Voting || - proposal!.account.state === ProposalState.Completed || - proposal!.account.state === ProposalState.Cancelled || - proposal!.account.state === ProposalState.Succeeded || - proposal!.account.state === ProposalState.Executing || - proposal!.account.state === ProposalState.Defeated) - - const submitRelinquishVote = async () => { - const rpcContext = new RpcContext( - proposal!.owner, - getProgramVersionForRealm(realmInfo!), - wallet!, - connection.current, - connection.endpoint - ) - try { - setIsLoading(true) - const instructions: TransactionInstruction[] = [] - - if ( - proposal?.account.state === ProposalState.Voting && - hasVoteTimeExpired - ) { - await withFinalizeVote( - instructions, - realmInfo!.programId, - getProgramVersionForRealm(realmInfo!), - realm!.pubkey, - proposal.account.governance, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - proposal.account.governingTokenMint, - maxVoterWeight - ) - } - - await relinquishVote( - rpcContext, - proposal!, - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - voterTokenRecord!.pubkey, - ownVoteRecord!.pubkey, - instructions, - client - ) - await refetchProposals() - if (pk) { - fetchProposal(pk) - } - } catch (ex) { - console.error("Can't relinquish vote", ex) - } - setIsLoading(false) - } - - const handleShowVoteModal = (vote: YesNoVote) => { - setVote(vote) - setShowVoteModal(true) - } - - const handleCloseShowVoteModal = useCallback(() => { - setShowVoteModal(false) - }, []) - - const actionLabel = - !isVoteCast || !connected - ? `Cast your ${ - tokenType === GoverningTokenType.Community ? 'community' : 'council' - } vote` - : isVoting - ? 'Withdraw your vote' - : 'Release your tokens' - - const withdrawTooltipContent = !connected - ? 'You need to connect your wallet' - : !isWithdrawEnabled - ? !ownVoteRecord?.account.isRelinquished - ? 'Owner vote record is not relinquished' - : 'The proposal is not in a valid state to execute this action.' - : '' - - const voteTooltipContent = !connected - ? 'You need to connect your wallet to be able to vote' - : !isVoting && isVoteCast - ? 'Proposal is not in a voting state anymore.' - : !voterTokenRecord || - !ownVoterWeight.hasMinAmountToVote( - voterTokenRecord.account.governingTokenMint - ) - ? 'You don’t have governance power to vote in this realm' - : '' - - const notVisibleStatesForNotConnectedWallet = [ - ProposalState.Cancelled, - ProposalState.Succeeded, - ProposalState.Draft, - ProposalState.Completed, - ] - - const isVisibleToWallet = !connected - ? !hasVoteTimeExpired && - typeof notVisibleStatesForNotConnectedWallet.find( - (x) => x === proposal?.account.state - ) === 'undefined' - : !ownVoteRecord?.account.isRelinquished - - const isPanelVisible = (isVoting || isVoteCast) && isVisibleToWallet - - //Todo: move to own components with refactor to dao folder structure - const isPyth = - realmInfo?.realmId.toBase58() === PYTH_LOCALNET_REALM_ID.toBase58() - - const isRelinquishVotePanelVisible = !( - isPyth && - isVoteCast && - connected && - !isVoting - ) - - return ( - <> - {isPanelVisible && isRelinquishVotePanelVisible && ( -
-

{actionLabel}

- -
- {isVoteCast && connected ? ( - submitRelinquishVote()} - disabled={!isWithdrawEnabled || isLoading} - > - {isVoting ? 'Withdraw' : 'Release Tokens'} - - ) : ( - <> - {isVoting && ( -
- - - -
- )} - - )} -
- - {showVoteModal ? ( - - ) : null} -
- )} - - ) -} - -export default VotePanel diff --git a/components/VoteResultStatus.tsx b/components/VoteResultStatus.tsx deleted file mode 100644 index d9e1fd2f21..0000000000 --- a/components/VoteResultStatus.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { XCircleIcon, CheckCircleIcon } from '@heroicons/react/outline' - -type VoteResultStatusProps = { - progress: number - votePassed: boolean | undefined - yesVotesRequired: number -} - -const VoteResultStatus = ({ - progress, - votePassed, - yesVotesRequired, -}: VoteResultStatusProps) => { - return votePassed ? ( -
- -

The proposal has passed

-
- ) : ( -
-
- -
-

The proposal has failed

-

{`${yesVotesRequired?.toLocaleString( - undefined, - { - maximumFractionDigits: 0, - } - )} more Yes vote${yesVotesRequired > 1 ? 's' : ''} were needed`}

-
-
-
-
= 100 ? 'bg-green' : 'bg-fgd-3' - } flex rounded`} - >
-
-
- ) -} - -export default VoteResultStatus diff --git a/components/VoteResults.tsx b/components/VoteResults.tsx deleted file mode 100644 index f9c94f7825..0000000000 --- a/components/VoteResults.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import VoteResultsBar from './VoteResultsBar' -import useProposalVotes from '@hooks/useProposalVotes' -import { Proposal } from '@solana/spl-governance' - -type VoteResultsProps = { - isListView?: boolean - proposal: Proposal -} - -const VoteResults = ({ isListView, proposal }: VoteResultsProps) => { - const { - yesVoteCount, - noVoteCount, - relativeNoVotes, - relativeYesVotes, - } = useProposalVotes(proposal) - return ( -
- {proposal ? ( -
-
-
-

Yes Votes

-

- {yesVoteCount.toLocaleString()} - {isListView ? ( - - {relativeYesVotes?.toFixed(1)}% - - ) : null} -

- {!isListView ? ( -
- {relativeYesVotes?.toFixed(1)}% -
- ) : null} -
-
-

No Votes

-

- {noVoteCount.toLocaleString()} - {isListView ? ( - - {relativeNoVotes?.toFixed(1)}% - - ) : null} -

- {!isListView ? ( -
- {relativeNoVotes?.toFixed(1)}% -
- ) : null} -
-
- -
- ) : ( - <> -
- - )} -
- ) -} - -export default VoteResults diff --git a/components/VoteResultsBar.tsx b/components/VoteResultsBar.tsx deleted file mode 100644 index 52f5385368..0000000000 --- a/components/VoteResultsBar.tsx +++ /dev/null @@ -1,42 +0,0 @@ -type VoteResultsBarProps = { - approveVotePercentage: number - denyVotePercentage: number -} - -const VoteResultsBar = ({ - approveVotePercentage = 0, - denyVotePercentage = 0, -}: VoteResultsBarProps) => { - return ( - <> -
-
2 || approveVotePercentage < 0.01 - ? approveVotePercentage - : 2 - }%`, - }} - className={`bg-green flex rounded-l ${ - denyVotePercentage < 0.01 && 'rounded' - }`} - >
-
2 || denyVotePercentage < 0.01 - ? denyVotePercentage - : 2 - }%`, - }} - className={`bg-red flex rounded-r ${ - approveVotePercentage < 0.01 && 'rounded' - }`} - >
-
- - ) -} - -export default VoteResultsBar diff --git a/components/chat/Comment.tsx b/components/chat/Comment.tsx deleted file mode 100644 index 977dfe9003..0000000000 --- a/components/chat/Comment.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import React from 'react' -import { VoteRecord } from '@solana/spl-governance' -import { - CheckCircleIcon, - UserCircleIcon, - XCircleIcon, -} from '@heroicons/react/solid' -import { ExternalLinkIcon } from '@heroicons/react/solid' -import { ChatMessage } from '@solana/spl-governance' -import { abbreviateAddress, fmtTokenAmount } from '../../utils/formatting' -import useRealm from '../../hooks/useRealm' -import { MintInfo } from '@solana/spl-token' -import { isPublicKey } from '@tools/core/pubkey' -import { getVoteWeight, isYesVote } from '@models/voteRecords' -import dayjs from 'dayjs' -const relativeTime = require('dayjs/plugin/relativeTime') -const Comment = ({ - chatMessage, - voteRecord, - proposalMint, -}: { - chatMessage: ChatMessage - voteRecord: VoteRecord | undefined - proposalMint: MintInfo | undefined -}) => { - dayjs.extend(relativeTime) - const { author, postedAt, body } = chatMessage - const { realmInfo } = useRealm() - const voteSymbol = !realmInfo - ? '' - : isPublicKey(realmInfo.symbol) - ? realmInfo.displayName - : realmInfo.symbol - //@ts-ignore - const fromNow = dayjs(postedAt.toNumber() * 1000).fromNow() - return ( -
-
-
-
- -
- -
- {voteRecord && ( -
-
- {isYesVote(voteRecord) ? ( - - ) : ( - - )} - {isYesVote(voteRecord) ? 'Approve' : 'Deny'} -
- | - - {`${fmtTokenAmount( - getVoteWeight(voteRecord)!, - proposalMint?.decimals - ).toLocaleString()} ${voteSymbol}`} - -
- )} -
-

{body.value}

-
- ) -} - -export default Comment diff --git a/components/chat/DiscussionForm.tsx b/components/chat/DiscussionForm.tsx deleted file mode 100644 index 77d277f53e..0000000000 --- a/components/chat/DiscussionForm.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import { useState } from 'react' -import Button from '../Button' -import Input from '../inputs/Input' -import useWalletStore from '../../stores/useWalletStore' -import useRealm from '../../hooks/useRealm' -import { RpcContext, GoverningTokenType } from '@solana/spl-governance' -import { ChatMessageBody, ChatMessageBodyType } from '@solana/spl-governance' -import { postChatMessage } from '../../actions/chat/postMessage' -import Loading from '../Loading' -import Tooltip from '@components/Tooltip' -import { getProgramVersionForRealm } from '@models/registry/api' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' - -const DiscussionForm = () => { - const [comment, setComment] = useState('') - const connected = useWalletStore((s) => s.connected) - const { - ownVoterWeight, - realmInfo, - realm, - ownTokenRecord, - ownCouncilTokenRecord, - } = useRealm() - const client = useVotePluginsClientStore( - (s) => s.state.currentRealmVotingClient - ) - const [submitting, setSubmitting] = useState(false) - - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection) - const { proposal } = useWalletStore((s) => s.selectedProposal) - const { fetchChatMessages } = useWalletStore((s) => s.actions) - const { tokenType } = useWalletStore((s) => s.selectedProposal) - const commenterVoterTokenRecord = - tokenType === GoverningTokenType.Community - ? ownTokenRecord - : ownCouncilTokenRecord - - const submitComment = async () => { - setSubmitting(true) - - const rpcContext = new RpcContext( - proposal!.owner, - getProgramVersionForRealm(realmInfo!), - wallet!, - connection.current, - connection.endpoint - ) - - const msg = new ChatMessageBody({ - type: ChatMessageBodyType.Text, - value: comment, - }) - - try { - await postChatMessage( - rpcContext, - realm!, - proposal!, - commenterVoterTokenRecord!, - msg, - undefined, - client - ) - - setComment('') - } catch (ex) { - console.error("Can't post chat message", ex) - //TODO: How do we present transaction errors to users? Just the notification? - } finally { - setSubmitting(false) - } - - fetchChatMessages(proposal!.pubkey) - } - - const postEnabled = - proposal && connected && ownVoterWeight.hasAnyWeight() && comment - - const tooltipContent = !connected - ? 'Connect your wallet to send a comment' - : !ownVoterWeight.hasAnyWeight() - ? 'You need to have deposited some tokens to submit your comment.' - : !comment - ? 'Write a comment to submit' - : !commenterVoterTokenRecord - ? 'You need to have voting power for this community to submit your comment.' - : '' - - return ( - <> -
- setComment(e.target.value)} - placeholder="Thoughts?..." - /> - - - - -
- - ) -} - -export default DiscussionForm diff --git a/components/chat/DiscussionPanel.tsx b/components/chat/DiscussionPanel.tsx deleted file mode 100644 index b732dbddfa..0000000000 --- a/components/chat/DiscussionPanel.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import DiscussionForm from './DiscussionForm' -import Comment from './Comment' -import useWalletStore from '../../stores/useWalletStore' - -const DiscussionPanel = () => { - const { chatMessages, voteRecordsByVoter, proposalMint } = useWalletStore( - (s) => s.selectedProposal - ) - - return ( -
-

- Discussion{' '} - - ({Object.keys(chatMessages).length}) - -

-
- -
- {Object.values(chatMessages) - .sort( - (m1, m2) => - m2.account.postedAt.toNumber() - m1.account.postedAt.toNumber() - ) - .map((cm) => ( - - ))} -
- ) -} - -export default DiscussionPanel diff --git a/components/explorer/inspectorButton.tsx b/components/explorer/inspectorButton.tsx deleted file mode 100644 index 1d98e83daa..0000000000 --- a/components/explorer/inspectorButton.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import { dryRunInstruction } from '../../actions/dryRunInstruction' -import { - InstructionExecutionStatus, - ProgramAccount, - ProposalTransaction, -} from '@solana/spl-governance' -import useWalletStore from '../../stores/useWalletStore' -import { getExplorerInspectorUrl, getExplorerUrl } from './tools' -import { SecondaryButton } from '../Button' -import { notify } from '@utils/notifications' - -export default function InspectorButton({ - proposalInstruction, -}: { - proposalInstruction: ProgramAccount -}) { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const connected = useWalletStore((s) => s.connected) - const wasExecuted = - proposalInstruction.account.executionStatus === - InstructionExecutionStatus.Success - const showInspector = async () => { - let inspectUrl = '' - if (!wasExecuted) { - const instructionData = proposalInstruction.account.getSingleInstruction() - const result = await dryRunInstruction( - connection.current, - wallet!, - instructionData - ) - - inspectUrl = getExplorerInspectorUrl( - connection.endpoint, - result.transaction - ) - } else { - try { - const recentActivity = await connection.current.getConfirmedSignaturesForAddress2( - proposalInstruction.pubkey, - { - limit: 5, - }, - 'confirmed' - ) - inspectUrl = getExplorerUrl( - connection.cluster, - recentActivity[0].signature, - 'tx' - ) - } catch (e) { - console.log(e) - } - } - if (inspectUrl) { - window.open(inspectUrl, '_blank') - } else { - notify({ type: 'error', message: 'Something went wrong url not found' }) - } - } - - return ( - showInspector()} - > - {!wasExecuted ? 'Inspect' : 'View transaction'} - - ) -} diff --git a/components/explorer/tools.ts b/components/explorer/tools.ts deleted file mode 100644 index 82cf129f6f..0000000000 --- a/components/explorer/tools.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { PublicKey, Transaction } from '@solana/web3.js' -import base58 from 'bs58' - -export function getExplorerUrl( - endpoint: string, - viewTypeOrItemAddress: 'inspector' | PublicKey | string, - itemType = 'address' -) { - const getClusterUrlParam = () => { - let cluster = '' - if (endpoint === 'localnet') { - cluster = `custom&customUrl=${encodeURIComponent( - 'http://127.0.0.1:8899' - )}` - } else if (endpoint === 'https://api.devnet.solana.com') { - // if the default free RPC for devnet is used - cluster = 'devnet' - } else if (endpoint === 'devnet') { - // connection.cluster is passed in - cluster = 'devnet' - } - - return cluster ? `?cluster=${cluster}` : '' - } - - return `https://explorer.solana.com/${itemType}/${viewTypeOrItemAddress}${getClusterUrlParam()}` -} - -/// Returns explorer inspector URL for the given transaction -export function getExplorerInspectorUrl( - endpoint: string, - transaction: Transaction -) { - const SIGNATURE_LENGTH = 64 - - const explorerUrl = new URL(getExplorerUrl(endpoint, 'inspector', 'tx')) - - const signatures = transaction.signatures.map((s) => - base58.encode(s.signature ?? Buffer.alloc(SIGNATURE_LENGTH)) - ) - explorerUrl.searchParams.append('signatures', JSON.stringify(signatures)) - - const message = transaction.serializeMessage() - explorerUrl.searchParams.append('message', message.toString('base64')) - - return explorerUrl.toString() -} diff --git a/components/icons.jsx b/components/icons.jsx deleted file mode 100644 index 4300a52988..0000000000 --- a/components/icons.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export const TwitterIcon = ({ className }) => { - return ( - - - - ) -} diff --git a/components/inputs/ChangeNonprofitSelect.tsx b/components/inputs/ChangeNonprofitSelect.tsx deleted file mode 100644 index 3d1d13ec2c..0000000000 --- a/components/inputs/ChangeNonprofitSelect.tsx +++ /dev/null @@ -1,178 +0,0 @@ -import { Listbox } from '@headlessui/react' -import { StyledLabel } from './styles' -import ErrorField from './ErrorField' -import Input from '@components/inputs/Input' -import { ChangeNonprofit } from '@utils/uiTypes/proposalCreationTypes' -import Loading from '@components/Loading' - -const copyText = (textToCopy = '') => { - navigator.clipboard.writeText(textToCopy) -} -const NonprofitSelect = ({ - value, - onSearch, - onSelect, - children, - className = '', - error = '', - nonprofitInformation, - disabled = false, - noMaxWidth = false, - wrapperClassNames = '', - minWidth = '', - showSearchResults = false, - isLoading = false, -}: { - onSearch: any | undefined - onSelect: any | undefined - value: any | undefined - children: any | undefined - showSearchResults: boolean - isLoading: boolean - nonprofitInformation?: ChangeNonprofit | undefined - className?: string | undefined - placeholder?: string | undefined - error?: string | undefined - disabled?: boolean | undefined - label?: string | undefined - componentLabel?: any | undefined - useDefaultStyle?: boolean - noMaxWidth?: boolean - wrapperClassNames?: string - minWidth?: string -}) => { - return ( -
- {{'Nonprofit name or EIN'}} -
- -
- - {() => ( - <> - - {isLoading ? ( -
- -
- ) : ( - '' - )} - {isLoading && children.length === 0 ? ( - - - - ) : ( - <> - )} - {children} -
- ) - - )} -
-
- -
-
- {' '} - 👋 We recommend adding this description to the proposal description to - help members understand the transaction:
-
- - {nonprofitInformation?.name} - {' '} - (EIN: {nonprofitInformation?.ein})
- Mission: {nonprofitInformation?.description} -
- Read more information about {nonprofitInformation?.name} at  - - getchange.io/solana/cause/ - {nonprofitInformation?.crypto.solana_address.slice(0, 4)}... - -
- -
-
- ) -} - -const Option = ({ value, children, className = '' }) => { - return ( - - {({ selected }) => ( -
- {children} -
- )} -
- ) -} - -NonprofitSelect.Option = Option - -export default NonprofitSelect diff --git a/components/inputs/Checkbox.tsx b/components/inputs/Checkbox.tsx deleted file mode 100644 index 5ef8f57aeb..0000000000 --- a/components/inputs/Checkbox.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react' -import { CheckIcon } from '@heroicons/react/solid' - -const Checkbox = ({ checked, label = '', disabled = false, ...props }) => ( - -) - -export default Checkbox diff --git a/components/inputs/ErrorField.tsx b/components/inputs/ErrorField.tsx deleted file mode 100644 index d29f604fa9..0000000000 --- a/components/inputs/ErrorField.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { capitalize } from '@utils/helpers' - -const ErrorField = ({ text }) => { - return text ? ( -
{text ? capitalize(text) : text}
- ) : null -} - -export default ErrorField diff --git a/components/inputs/Input.tsx b/components/inputs/Input.tsx deleted file mode 100644 index 1f9b273091..0000000000 --- a/components/inputs/Input.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { StyledLabel, StyledSuffix, inputClasses } from './styles' -import ErrorField from './ErrorField' -import { CheckCircleIcon } from '@heroicons/react/outline' - -interface InputProps { - type: string - value: any - onChange?: (e) => void - className?: string - disabled?: boolean - useDefaultStyle?: boolean - [x: string]: any - checkIcon?: boolean -} - -const Input = ({ - checkIcon = false, - type, - value = '', - onChange, - className, - wrapperClassName = 'w-full', - disabled, - label, - prefix, - prefixClassName, - suffix, - min, - error = '', - max = Number.MAX_SAFE_INTEGER, - step, - noMaxWidth, - useDefaultStyle = true, - subtitle, - ...props -}: InputProps) => { - return ( -
- {label && {label}} - {subtitle &&

{subtitle}

} - {prefix ? ( -
- {prefix} -
- ) : null} - - - {checkIcon && !error && ( - - )} - - {suffix && {suffix}} - -
- -
-
- ) -} - -export default Input diff --git a/components/inputs/Select.tsx b/components/inputs/Select.tsx deleted file mode 100644 index a9e95d6c79..0000000000 --- a/components/inputs/Select.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { Listbox } from '@headlessui/react' -import { ChevronDownIcon } from '@heroicons/react/solid' -import { StyledLabel, inputClasses } from './styles' -import ErrorField from './ErrorField' - -const Select = ({ - value, - onChange, - children, - className = '', - placeholder = '', - error = '', - disabled = false, - label = '', - componentLabel, - useDefaultStyle = true, - noMaxWidth = false, - wrapperClassNames = '', - minWidth = '', -}: { - value: any | undefined - onChange: any | undefined - children: any | undefined - className?: string | undefined - placeholder?: string | undefined - error?: string | undefined - disabled?: boolean | undefined - label?: string | undefined - componentLabel?: any | undefined - useDefaultStyle?: boolean - noMaxWidth?: boolean - wrapperClassNames?: string - minWidth?: string -}) => { - return ( -
- {label && {label}} -
- - {({ open }) => ( - <> - -
- {componentLabel - ? componentLabel - : value - ? value - : placeholder} - -
-
- {open ? ( - - {children} - - ) : null} - - )} -
- -
-
- ) -} - -const Option = ({ value, children, className = '' }) => { - return ( - - {({ selected }) => ( -
- {children} -
- )} -
- ) -} - -Select.Option = Option - -export default Select diff --git a/components/inputs/Textarea.tsx b/components/inputs/Textarea.tsx deleted file mode 100644 index c925d4c27e..0000000000 --- a/components/inputs/Textarea.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { StyledLabel, StyledSuffix, inputClasses } from './styles' -import ErrorField from './ErrorField' - -interface TextareaProps { - value: any - onChange?: (e) => void - className?: string - disabled?: boolean - useDefaultStyle?: boolean - [x: string]: any -} - -const TextareaProps = ({ - value, - onChange, - className, - wrapperClassName = 'w-full', - disabled, - label, - suffix, - error = '', - noMaxWidth = false, - useDefaultStyle = true, - ...props -}: TextareaProps) => { - return ( -
- {label && {label}} - - - {canChooseWhoVote && ( - { - setVoteByCouncil(!voteByCouncil) - }} - > - )} - -
-
- -
- - ) -} - -export default GovernanceConfigModal diff --git a/pages/dao/[symbol]/params/RealmConfigModal.tsx b/pages/dao/[symbol]/params/RealmConfigModal.tsx deleted file mode 100644 index 9f255fb7f3..0000000000 --- a/pages/dao/[symbol]/params/RealmConfigModal.tsx +++ /dev/null @@ -1,186 +0,0 @@ -import { parseMintNaturalAmountFromDecimalAsBN } from '@tools/sdk/units' -import Modal from '@components/Modal' -import Input from '@components/inputs/Input' -import VoteBySwitch from '../proposal/components/VoteBySwitch' -import Textarea from '@components/inputs/Textarea' -import { - createSetRealmConfig, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { getRealmCfgSchema } from '@utils/validations' -import useWalletStore from 'stores/useWalletStore' -import { PublicKey } from '@solana/web3.js' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' -import { parseMintSupplyFraction } from '@utils/tokens' -import useCreateProposal from '@hooks/useCreateProposal' -import { InstructionDataWithHoldUpTime } from 'actions/createProposal' -import useQueryContext from '@hooks/useQueryContext' -import { useRouter } from 'next/router' -import { notify } from '@utils/notifications' -import useRealm from '@hooks/useRealm' -import { useState } from 'react' -import Button from '@components/Button' -import RealmConfigFormComponent, { - RealmConfigForm, -} from '../proposal/components/forms/RealmConfigFormComponent' -import { abbreviateAddress } from '@utils/formatting' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -interface RealmConfigProposal extends RealmConfigForm { - title: string - description: string -} - -const RealmConfigModal = ({ closeProposalModal, isProposalModalOpen }) => { - const router = useRouter() - const { realm, mint, canChooseWhoVote, realmInfo, symbol } = useRealm() - const { assetAccounts } = useGovernanceAssets() - - const realmAuthorityGovernance = assetAccounts.find( - (x) => - x.governance.pubkey.toBase58() === realm?.account.authority?.toBase58() - ) - const { fmtUrlWithCluster } = useQueryContext() - const wallet = useWalletStore((s) => s.current) - const { handleCreateProposal } = useCreateProposal() - const defaultCfgTitle = 'Change realm config' - const [formErrors, setFormErrors] = useState({}) - const [voteByCouncil, setVoteByCouncil] = useState(false) - const [creatingProposal, setCreatingProposal] = useState(false) - const [form, setForm] = useState() - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form!, [propertyName]: value }) - } - const schema = getRealmCfgSchema({ form }) - const handleCreate = async () => { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - form!.governedAccount?.governance?.account && - wallet?.publicKey && - realm - ) { - setCreatingProposal(true) - const governance = form!.governedAccount.governance - const mintAmount = parseMintNaturalAmountFromDecimalAsBN( - form!.minCommunityTokensToCreateGovernance!, - mint!.decimals! - ) - const instruction = await createSetRealmConfig( - realmInfo!.programId, - realmInfo!.programVersion!, - realm.pubkey, - realm.account.authority!, - form?.removeCouncil ? undefined : realm?.account.config.councilMint, - parseMintSupplyFraction(form!.communityMintSupplyFactor.toString()), - mintAmount, - form!.communityVoterWeightAddin - ? new PublicKey(form!.communityVoterWeightAddin) - : undefined, - form?.maxCommunityVoterWeightAddin - ? new PublicKey(form.maxCommunityVoterWeightAddin) - : undefined, - wallet.publicKey - ) - serializedInstruction = serializeInstructionToBase64(instruction) - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance, - } - const instructionData = new InstructionDataWithHoldUpTime({ - instruction: obj, - governance, - }) - try { - const proposalAddress = await handleCreateProposal({ - title: form!.title ? form!.title : defaultCfgTitle, - description: form!.description ? form!.description : '', - voteByCouncil, - instructionsData: [instructionData], - governance: governance!, - }) - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - router.push(url) - } catch (ex) { - notify({ type: 'error', message: `${ex}` }) - } - setCreatingProposal(false) - } - } - return ( - -
-

- Change Realm Config:{' '} - {realmAuthorityGovernance && - abbreviateAddress(realmAuthorityGovernance!.governance.pubkey)} -

- - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - /> - - {canChooseWhoVote && ( - { - setVoteByCouncil(!voteByCouncil) - }} - > - )} - {realmAuthorityGovernance && ( - - )} -
-
- -
-
- ) -} - -export default RealmConfigModal diff --git a/pages/dao/[symbol]/params/SetRealmAuthorityModal.tsx b/pages/dao/[symbol]/params/SetRealmAuthorityModal.tsx deleted file mode 100644 index 3069bbf310..0000000000 --- a/pages/dao/[symbol]/params/SetRealmAuthorityModal.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import Modal from '@components/Modal' -import { useState } from 'react' -import Button from '@components/Button' -import GovernedAccountSelect from '../proposal/components/GovernedAccountSelect' -import { - SetRealmAuthorityAction, - withSetRealmAuthority, -} from '@solana/spl-governance' -import useRealm from '@hooks/useRealm' -import useWalletStore from 'stores/useWalletStore' -import { Transaction, TransactionInstruction } from '@solana/web3.js' -import { sendTransaction } from '@utils/send' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { AssetAccount } from '@utils/uiTypes/assets' - -const SetRealmAuthorityModal = ({ - closeModal, - isOpen, -}: { - closeModal: () => void - isOpen: boolean -}) => { - const { realmInfo, realm } = useRealm() - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection) - const { fetchRealm, fetchAllRealms } = useWalletStore((s) => s.actions) - const { assetAccounts } = useGovernanceAssets() - const [account, setAccount] = useState(null) - const [settingAuthority, setSettingAuthority] = useState(false) - const handleSetAuthority = async () => { - setSettingAuthority(true) - const instructions: TransactionInstruction[] = [] - withSetRealmAuthority( - instructions, - realmInfo!.programId, - realmInfo!.programVersion!, - realm!.pubkey!, - wallet!.publicKey!, - account!.governance.pubkey, - SetRealmAuthorityAction.SetChecked - ) - const transaction = new Transaction({ feePayer: wallet!.publicKey }) - transaction.add(...instructions) - await sendTransaction({ - transaction: transaction, - wallet: wallet!, - connection: connection.current, - signers: [], - sendingMessage: `Setting authority`, - successMessage: `Authority set`, - }) - await fetchAllRealms(realmInfo!.programId) - await fetchRealm(realmInfo!.programId, realmInfo!.realmId) - setSettingAuthority(false) - closeModal() - } - return ( - -
-

Set realm authority

-
-
- { - setAccount(value) - }} - value={account} - /> -
-
- -
-
- ) -} - -export default SetRealmAuthorityModal diff --git a/pages/dao/[symbol]/params/components/AccountsView.tsx b/pages/dao/[symbol]/params/components/AccountsView.tsx deleted file mode 100644 index 65f2463e5f..0000000000 --- a/pages/dao/[symbol]/params/components/AccountsView.tsx +++ /dev/null @@ -1,155 +0,0 @@ -import { getTreasuryAccountItemInfoV2 } from '@utils/treasuryTools' -import { AccountType } from '@utils/uiTypes/assets' -import { AddressField } from '../index' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const AccountsView = ({ - activeGovernance, - getYesNoString, - auxiliaryMode = false, -}) => { - const { assetAccounts, auxiliaryTokenAccounts } = useGovernanceAssets() - const accounts = auxiliaryMode ? auxiliaryTokenAccounts : assetAccounts - return ( -
- {accounts - .filter((x) => - !auxiliaryMode - ? x.governance.pubkey.toBase58() === - activeGovernance.pubkey.toBase58() - : auxiliaryMode - ) - .map((x) => { - const info = getTreasuryAccountItemInfoV2(x) - if (x.isToken || x.isSol || x.type === AccountType.AuxiliaryToken) { - return ( -
- - - - {info.logo && ( - - )} - {`${info.amountFormatted} ${ - info.info?.symbol ? info.info?.symbol : info.name - }`} -
- } - /> - - {x.type !== AccountType.SOL && ( - - )} -
- ) - } - - if (x.type === AccountType.NFT) { - return ( -
- - -
- ) - } - if (x.type === AccountType.MINT) { - return ( -
- - - - - - - {x.extensions.mint?.account.freezeAuthority ? ( - - ) : null} -
- ) - } - if (x.type === AccountType.PROGRAM) { - return ( -
- - -
- ) - } - })} -
- ) -} - -export default AccountsView diff --git a/pages/dao/[symbol]/params/components/ParamsView.tsx b/pages/dao/[symbol]/params/components/ParamsView.tsx deleted file mode 100644 index e33830f016..0000000000 --- a/pages/dao/[symbol]/params/components/ParamsView.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import useRealm from '@hooks/useRealm' -import { fmtMintAmount } from '@tools/sdk/units' -import { MAX_TOKENS_TO_DISABLE } from '@tools/constants' -import { - getFormattedStringFromDays, - SECS_PER_DAY, -} from 'VoteStakeRegistry/tools/dateTools' -import Button from '@components/Button' -import { VoteTipping } from '@solana/spl-governance' -import { AddressField, NumberField } from '../index' - -const ParamsView = ({ activeGovernance, openGovernanceProposalModal }) => { - const { realm, mint, councilMint, ownVoterWeight } = useRealm() - - const realmAccount = realm?.account - const communityMint = realmAccount?.communityMint.toBase58() - - const minCommunityTokensToCreateProposal = activeGovernance?.account?.config - ?.minCommunityTokensToCreateProposal - ? mint && - MAX_TOKENS_TO_DISABLE.eq( - activeGovernance.account.config.minCommunityTokensToCreateProposal - ) - ? 'Disabled' - : fmtMintAmount( - mint, - activeGovernance?.account?.config?.minCommunityTokensToCreateProposal - ) - : 'calculating...' - - return ( - <> - {activeGovernance && ( - <> - {realmAccount?.authority?.toBase58() === - activeGovernance.pubkey.toBase58() && ( - - )} - - {communityMint && ( - - )} - {councilMint && ( - - )} - - {/* NOT NEEDED RIGHT NOW */} - {/* */} - - -
- -
- - )} - - ) -} - -export default ParamsView diff --git a/pages/dao/[symbol]/params/components/StatsView.tsx b/pages/dao/[symbol]/params/components/StatsView.tsx deleted file mode 100644 index a0181c43fd..0000000000 --- a/pages/dao/[symbol]/params/components/StatsView.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { AddressField, NumberField } from '../index' - -const StatsView = ({ activeGovernance }) => { - return ( -
- {activeGovernance && ( - <> - - - - )} -
- ) -} - -export default StatsView diff --git a/pages/dao/[symbol]/params/index.tsx b/pages/dao/[symbol]/params/index.tsx deleted file mode 100644 index 13253e800a..0000000000 --- a/pages/dao/[symbol]/params/index.tsx +++ /dev/null @@ -1,380 +0,0 @@ -import { useEffect, useState } from 'react' -import GovernedAccountsTabs from '@components/GovernedAccountsTabs' -import PreviousRouteBtn from '@components/PreviousRouteBtn' -import useRealm from '@hooks/useRealm' -import { fmtMintAmount } from '@tools/sdk/units' -import { MAX_TOKENS_TO_DISABLE } from '@tools/constants' -import { capitalize } from '@utils/helpers' -import useGovernanceAssetsStore from 'stores/useGovernanceAssetsStore' -import Tabs from '@components/Tabs' -import Select from '@components/inputs/Select' -import Button from '@components/Button' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -import RealmConfigModal from './RealmConfigModal' -import GovernanceConfigModal from './GovernanceConfigModal' -import { tryParsePublicKey } from '@tools/core/pubkey' -import { getAccountName } from '@components/instructions/tools' -import useWalletStore from 'stores/useWalletStore' -import SetRealmAuthorityModal from './SetRealmAuthorityModal' - -import ParamsView from './components/ParamsView' -import AccountsView from './components/AccountsView' -import StatsView from './components/StatsView' -import { ExclamationIcon } from '@heroicons/react/outline' -import Tooltip from '@components/Tooltip' - -const Params = () => { - const { realm, mint } = useRealm() - const wallet = useWalletStore((s) => s.current) - const { - canUseAuthorityInstruction, - assetAccounts, - auxiliaryTokenAccounts, - } = useGovernanceAssets() - const governancesArray = useGovernanceAssetsStore((s) => s.governancesArray) - const loadGovernedAccounts = useGovernanceAssetsStore( - (s) => s.loadGovernedAccounts - ) - - const realmAuthorityGovernance = governancesArray.find( - (x) => x.pubkey.toBase58() === realm?.account.authority?.toBase58() - ) - const [isRealmProposalModalOpen, setIsRealmProposalModalOpen] = useState( - false - ) - const [ - isGovernanceProposalModalOpen, - setIsGovernanceProposalModalOpen, - ] = useState(false) - const [activeGovernance, setActiveGovernance] = useState(null) - const [activeTab, setActiveTab] = useState('Params') - const [isRealmAuthorityModalOpen, setRealmAuthorityModalIsOpen] = useState( - false - ) - const realmAccount = realm?.account - const communityMint = realmAccount?.communityMint.toBase58() - const councilMintPk = realmAccount?.config.councilMint?.toBase58() - const communityMintMaxVoteWeightSource = - realmAccount?.config.communityMintMaxVoteWeightSource - const realmConfig = realmAccount?.config - const openRealmProposalModal = () => { - setIsRealmProposalModalOpen(true) - } - const closeRealmProposalModal = () => { - setIsRealmProposalModalOpen(false) - } - const openGovernanceProposalModal = () => { - setIsGovernanceProposalModalOpen(true) - } - const closeGovernanceProposalModal = () => { - setIsGovernanceProposalModalOpen(false) - } - const openSetRealmAuthorityModal = () => { - setRealmAuthorityModalIsOpen(true) - } - const closeSetRealmAuthorityModal = () => { - setRealmAuthorityModalIsOpen(false) - } - const getYesNoString = (val) => { - return val ? ' Yes' : ' No' - } - const minCommunityTokensToCreateGovernance = - realmConfig && - MAX_TOKENS_TO_DISABLE.eq(realmConfig.minCommunityTokensToCreateGovernance) - ? 'Disabled' - : realmConfig?.minCommunityTokensToCreateGovernance && - fmtMintAmount(mint, realmConfig.minCommunityTokensToCreateGovernance) - - useEffect(() => { - if (governancesArray.length > 0) { - setActiveGovernance(governancesArray[0]) - } - }, [governancesArray]) - - return ( -
- {isRealmProposalModalOpen && ( - - )} - {isGovernanceProposalModalOpen && activeGovernance && ( - - )} - {isRealmAuthorityModalOpen && ( - - )} -
-
- -
-
-

- {realmAccount?.name} DAO Parameters -

-
-
- {activeGovernance ? ( - <> -
-

Addresses

- - - - {communityMint && ( - - )} - {councilMintPk && ( - - )} -
- {wallet?.publicKey?.toBase58() === - realmAccount?.authority?.toBase58() && ( - - )} -
-
-
-

Config

- {communityMintMaxVoteWeightSource && ( - - )} - - - -
- -
-
- - ) : ( - <> -
-
- - )} -
- {!loadGovernedAccounts ? ( - <> -
-
- -
-
-

{governancesArray.length} Governances

- setActiveGovernance(g)} - tabs={governancesArray} - /> -
- {activeGovernance ? ( -
-

- {activeGovernance.pubkey.toBase58()} -

- {assetAccounts.filter( - (x) => - x.governance.pubkey.toBase58() === - activeGovernance.pubkey.toBase58() - ).length > 0 ? ( - setActiveTab(t)} - tabs={['Params', 'Accounts', 'Statistics']} - /> - ) : null} - {activeTab === 'Params' && ( - - )} - {activeTab === 'Accounts' && ( - - )} - {activeTab === 'Statistics' && ( - - )} -
- ) : null} -
- {auxiliaryTokenAccounts.length !== 0 && ( -
-
-

Auxiliary Accounts

- -
-
- )} - - ) : ( -
- )} -
-
- ) -} - -export const AddressField = ({ - label, - val, - padding = false, - bg = false, - warn = false, - warningText = '', -}) => { - const pubkey = isNaN(val) && tryParsePublicKey(val) - const name = pubkey ? getAccountName(pubkey) : '' - return ( -
-
{capitalize(label)}
-
- {pubkey && name ? ( - <> -
{name}
-
- {val} - {warn && ( -
- - - -
- )} -
- - ) : ( -
{val}
- )} -
-
- ) -} - -export const NumberField = ({ - label, - val = 0, - padding = false, - bg = false, -}) => { - return ( -
-
{capitalize(label)}
-
-
{val}
-
-
- ) -} - -export default Params diff --git a/pages/dao/[symbol]/program/new.tsx b/pages/dao/[symbol]/program/new.tsx deleted file mode 100644 index a0f7a0aa39..0000000000 --- a/pages/dao/[symbol]/program/new.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import NewProgramForm from '@components/AssetsList/NewProgramForm' -import React from 'react' - -const New = () => { - return ( -
-
- -
-
- ) -} - -export default New diff --git a/pages/dao/[symbol]/proposal/[pk]/explore.tsx b/pages/dao/[symbol]/proposal/[pk]/explore.tsx deleted file mode 100644 index d20074da60..0000000000 --- a/pages/dao/[symbol]/proposal/[pk]/explore.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import { useState } from 'react' -import { useRouter } from 'next/router' -import classNames from 'classnames' -import { ChevronLeftIcon } from '@heroicons/react/solid' - -import useProposal from '@hooks/useProposal' -import useVoteRecords from '@hooks/useVoteRecords' -import ProposalStateBadge from '@components/ProposalStatusBadge' -import ProposalTopVotersList from '@components/ProposalTopVotersList' -import ProposalTopVotersBubbleChart from '@components/ProposalTopVotersBubbleChart' -import useWalletStore from 'stores/useWalletStore' -import useSignatories from '@hooks/useSignatories' -import ProposalSignatories from '@components/ProposalSignatories' -import ProposalVoteResult from '@components/ProposalVoteResults' -import ProposalRemainingVotingTime from '@components/ProposalRemainingVotingTime' - -export default function Explore() { - const { proposal, governance } = useProposal() - const [highlighted, setHighlighted] = useState() - const connection = useWalletStore((s) => s.connection) - const records = useVoteRecords(proposal) - const signatories = useSignatories(proposal) - const router = useRouter() - - const endpoint = connection.endpoint - - return ( -
- - {proposal && governance ? ( -
-
-

{proposal?.account.name}

- -
-

Top Voters

-
setHighlighted(undefined)} - > - - -
-
- - - -
-
- ) : ( -
-
-
-
-
- )} -
- ) -} diff --git a/pages/dao/[symbol]/proposal/[pk]/index.tsx b/pages/dao/[symbol]/proposal/[pk]/index.tsx deleted file mode 100644 index ec3a8a43d8..0000000000 --- a/pages/dao/[symbol]/proposal/[pk]/index.tsx +++ /dev/null @@ -1,175 +0,0 @@ -import ReactMarkdown from 'react-markdown/react-markdown.min' -import remarkGfm from 'remark-gfm' -import { ExternalLinkIcon } from '@heroicons/react/outline' -import useProposal from 'hooks/useProposal' -import ProposalStateBadge from 'components/ProposalStatusBadge' -import { InstructionPanel } from 'components/instructions/instructionPanel' -import DiscussionPanel from 'components/chat/DiscussionPanel' -import VotePanel from 'components/VotePanel' -import ApprovalQuorum from 'components/ApprovalQuorum' -import useRealm from 'hooks/useRealm' -import useProposalVotes from 'hooks/useProposalVotes' -import ProposalTimeStatus from 'components/ProposalTimeStatus' -import { option } from 'tools/core/option' -import React, { useEffect, useState } from 'react' -import ProposalActionsPanel from '@components/ProposalActions' -import { getRealmExplorerHost } from 'tools/routing' -import TokenBalanceCardWrapper from '@components/TokenBalance/TokenBalanceCardWrapper' -import { ProposalState } from '@solana/spl-governance' -import VoteResultStatus from '@components/VoteResultStatus' -import VoteResults from '@components/VoteResults' -import { resolveProposalDescription } from '@utils/helpers' -import PreviousRouteBtn from '@components/PreviousRouteBtn' -import Link from 'next/link' -import useQueryContext from '@hooks/useQueryContext' -import { ChevronRightIcon } from '@heroicons/react/solid' - -const Proposal = () => { - const { realmInfo, symbol } = useRealm() - const { proposal, descriptionLink } = useProposal() - const [description, setDescription] = useState('') - const { yesVoteProgress, yesVotesRequired } = useProposalVotes( - proposal?.account - ) - - const showResults = - proposal && - proposal.account.state !== ProposalState.Cancelled && - proposal.account.state !== ProposalState.Draft - - const votePassed = - proposal && - (proposal.account.state === ProposalState.Completed || - proposal.account.state === ProposalState.Executing || - proposal.account.state === ProposalState.SigningOff || - proposal.account.state === ProposalState.Succeeded || - proposal.account.state === ProposalState.ExecutingWithErrors) - - useEffect(() => { - const handleResolveDescription = async () => { - const description = await resolveProposalDescription(descriptionLink!) - setDescription(description) - } - if (descriptionLink) { - handleResolveDescription() - } - }, [descriptionLink]) - - const { fmtUrlWithCluster } = useQueryContext() - - return ( -
-
- {proposal ? ( - <> - - -
-
-

- {proposal?.account.name} -

- -
-
- - {description && ( -
- - {description} - -
- )} - - - - - ) : ( - <> -
-
-
- - )} -
- -
- - {showResults ? ( -
-
- {proposal?.account.state === ProposalState.Voting ? ( -
-

Voting Now

- -
- ) : ( -

Results

- )} - {proposal?.account.state === ProposalState.Voting ? ( -
- -
- ) : ( -
- -
- )} - - {proposal && ( - - )} -
-
- ) : null} - - - -
-
- ) -} - -export default Proposal diff --git a/pages/dao/[symbol]/proposal/components/ComandLineInfo.tsx b/pages/dao/[symbol]/proposal/components/ComandLineInfo.tsx deleted file mode 100644 index 116540afe6..0000000000 --- a/pages/dao/[symbol]/proposal/components/ComandLineInfo.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { DuplicateIcon } from '@heroicons/react/outline' - -export default function CommandLineInfo({ - info, -}: { - info: string | undefined -}) { - return ( -
- {info} - { - navigator.clipboard.writeText(info ?? '') - }} - /> -
- ) -} diff --git a/pages/dao/[symbol]/proposal/components/DryRunInstructionBtn.tsx b/pages/dao/[symbol]/proposal/components/DryRunInstructionBtn.tsx deleted file mode 100644 index d49a0bc412..0000000000 --- a/pages/dao/[symbol]/proposal/components/DryRunInstructionBtn.tsx +++ /dev/null @@ -1,129 +0,0 @@ -import Button, { LinkButton, SecondaryButton } from '@components/Button' -import { getExplorerInspectorUrl } from '@components/explorer/tools' -import Loading from '@components/Loading' -import Modal from '@components/Modal' -import { getInstructionDataFromBase64 } from '@solana/spl-governance' -import { SimulatedTransactionResponse, Transaction } from '@solana/web3.js' -import { notify } from '@utils/notifications' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' -import { dryRunInstruction } from 'actions/dryRunInstruction' -import React, { useState } from 'react' -import useWalletStore from 'stores/useWalletStore' - -const DryRunInstructionBtn = ({ - getInstructionDataFcn, - btnClassNames, -}: { - getInstructionDataFcn: (() => Promise) | undefined - btnClassNames: string -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const [isPending, setIsPending] = useState(false) - const [result, setResult] = useState<{ - response: SimulatedTransactionResponse - transaction: Transaction - } | null>(null) - const [isOpen, setIsOpen] = useState(false) - - const onInspect = () => { - if (result) { - const inspectUrl = getExplorerInspectorUrl( - connection.endpoint, - result.transaction - ) - window.open(inspectUrl, '_blank') - } else { - notify({ type: 'error', message: 'no results to inspect' }) - } - } - const handleDryRun = async () => { - try { - if (!getInstructionDataFcn) { - throw 'No get instructionDataFcn provided' - } - setIsPending(true) - const instructionData = await getInstructionDataFcn() - const prerequisiteInstructionsToRun = - instructionData.prerequisiteInstructions - const additionalInstructions = - instructionData.additionalSerializedInstructions - if (!instructionData?.isValid) { - setIsPending(false) - throw new Error('Invalid instruction') - } - const result = await dryRunInstruction( - connection.current, - wallet!, - getInstructionDataFromBase64(instructionData?.serializedInstruction), - prerequisiteInstructionsToRun, - additionalInstructions?.map((x) => getInstructionDataFromBase64(x)) - ) - setResult(result) - setIsOpen(true) - } catch (ex) { - notify({ - type: 'error', - message: `Can't simulate transaction`, - description: 'The instruction is invalid', - }) - console.error('Simulation error', ex) - } finally { - setIsPending(false) - } - } - const onClose = () => { - setIsOpen(false) - setResult(null) - } - function getLogTextType(text: string) { - // Use some heuristics to highlight error and success log messages - - text = text.toLowerCase() - - if (text.includes('failed')) { - return 'text-red' - } - - if (text.includes('success')) { - return 'text-green' - } - } - return ( - <> - - {isPending ? : 'Preview transaction'} - - - {result?.response && ( - -

- {result?.response.err - ? 'Simulation error' - : 'Simulation successful'} -

-
    - {result?.response.logs?.map((log, i) => ( -
  • -
    {log}
    -
  • - ))} -
-
- - - Close - -
-
- )} - - ) -} - -export default DryRunInstructionBtn diff --git a/pages/dao/[symbol]/proposal/components/GovernedAccountSelect.tsx b/pages/dao/[symbol]/proposal/components/GovernedAccountSelect.tsx deleted file mode 100644 index f180b97ec0..0000000000 --- a/pages/dao/[symbol]/proposal/components/GovernedAccountSelect.tsx +++ /dev/null @@ -1,156 +0,0 @@ -import Select from '@components/inputs/Select' -import { Governance, GovernanceAccountType } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { - getMintAccountLabelInfo, - getSolAccountLabel, - getTokenAccountLabelInfo, -} from '@utils/tokens' -import React, { useEffect } from 'react' -import { getProgramName } from '@components/instructions/programs/names' -import { AssetAccount } from '@utils/uiTypes/assets' - -const GovernedAccountSelect = ({ - onChange, - value, - error, - governedAccounts = [], - shouldBeGoverned, - governance, - label, - noMaxWidth, - autoselectFirst = true, -}: { - onChange - value - error? - governedAccounts: AssetAccount[] - shouldBeGoverned? - governance?: ProgramAccount | null | undefined - label? - noMaxWidth?: boolean - autoselectFirst?: boolean -}) => { - function getLabel(value: AssetAccount) { - if (value) { - const accountType = value.governance.account.accountType - if (value.isSol || value.isToken) { - return getTokenAccountLabelComponent( - value.isSol - ? getSolAccountLabel(value) - : getTokenAccountLabelInfo(value) - ) - } else { - switch (accountType) { - case GovernanceAccountType.MintGovernanceV1: - case GovernanceAccountType.MintGovernanceV2: - return getMintAccountLabelComponent(getMintAccountLabelInfo(value)) - case GovernanceAccountType.ProgramGovernanceV1: - case GovernanceAccountType.ProgramGovernanceV2: - return getProgramAccountLabel(value.governance) - default: - return value.governance.account.governedAccount.toBase58() - } - } - } else { - return null - } - } - //TODO refactor both methods (getMintAccountLabelComponent, getTokenAccountLabelComponent) make it more common - function getMintAccountLabelComponent({ - account, - tokenName, - mintAccountName, - amount, - imgUrl, - }) { - return ( -
- {account &&
{account}
} -
{mintAccountName}
-
- {tokenName && ( -
- Token: - {tokenName} -
- )} -
Supply: {amount}
-
-
- ) - } - function getTokenAccountLabelComponent({ - tokenAccount, - tokenAccountName, - tokenName, - amount, - }) { - return ( -
- {tokenAccountName &&
{tokenAccountName}
} -
{tokenAccount}
-
- {tokenName && ( -
- Token: - {tokenName} -
- )} -
- Bal:{amount} -
-
-
- ) - } - function getProgramAccountLabel(val: ProgramAccount) { - const name = val ? getProgramName(val.account.governedAccount) : '' - return ( -
- {name &&
{name}
} -
{val?.account?.governedAccount?.toBase58()}
-
- ) - } - useEffect(() => { - if (governedAccounts.length == 1 && autoselectFirst) { - //wait for microtask queue to be empty - setTimeout(() => { - onChange(governedAccounts[0]) - }) - } - }, [JSON.stringify(governedAccounts)]) - return ( - - ) -} - -export default GovernedAccountSelect diff --git a/pages/dao/[symbol]/proposal/components/InstructionContentContainer.tsx b/pages/dao/[symbol]/proposal/components/InstructionContentContainer.tsx deleted file mode 100644 index 14f4108815..0000000000 --- a/pages/dao/[symbol]/proposal/components/InstructionContentContainer.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { - ComponentInstructionData, - Instructions, -} from '@utils/uiTypes/proposalCreationTypes' -import React from 'react' -import DryRunInstructionBtn from './DryRunInstructionBtn' - -const InstructionContentContainer = ({ - children, - idx, - instructionsData, -}: { - children: any - idx: number - instructionsData: ComponentInstructionData[] -}) => { - const currentInstruction = instructionsData ? instructionsData[idx] : null - - return ( -
- {children} - - {currentInstruction?.type?.id !== Instructions.None && ( - - )} -
- ) -} - -export default InstructionContentContainer diff --git a/pages/dao/[symbol]/proposal/components/MinimumApprovalThreshold.tsx b/pages/dao/[symbol]/proposal/components/MinimumApprovalThreshold.tsx deleted file mode 100644 index 194f541b8b..0000000000 --- a/pages/dao/[symbol]/proposal/components/MinimumApprovalThreshold.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import ProgressBar from '@components/ProgressBar' - -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import React from 'react' - -const MinimumApprovalThreshold = ({ - governance, -}: { - governance: ProgramAccount | null -}) => { - const info = governance?.account - // const info = { config: { voteThresholdPercentage: { value: 50 } } } - return info ? ( - - ) : null -} - -export default MinimumApprovalThreshold diff --git a/pages/dao/[symbol]/proposal/components/MyProposalsBtn.tsx b/pages/dao/[symbol]/proposal/components/MyProposalsBtn.tsx deleted file mode 100644 index 0a6d9d240c..0000000000 --- a/pages/dao/[symbol]/proposal/components/MyProposalsBtn.tsx +++ /dev/null @@ -1,439 +0,0 @@ -import useRealm from '@hooks/useRealm' -import React, { useEffect, useMemo, useState } from 'react' -import useWalletStore from 'stores/useWalletStore' -import { - ProgramAccount, - Proposal, - ProposalState, - withCancelProposal, - withFinalizeVote, - withRelinquishVote, -} from '@solana/spl-governance' -import { Transaction, TransactionInstruction } from '@solana/web3.js' -import Modal from '@components/Modal' -import Button from '@components/Button' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import dayjs from 'dayjs' -import { notify } from '@utils/notifications' -import Loading from '@components/Loading' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import useNftPluginStore from 'NftVotePlugin/store/nftPluginStore' -import { sleep } from '@project-serum/common' -import { NftVoterClient } from '@solana/governance-program-library' -import { chunks } from '@utils/helpers' -import { - getNftRegistrarPDA, - getNftVoterWeightRecord, -} from 'NftVotePlugin/sdk/accounts' -import { sendSignedTransaction } from '@utils/send' - -const MyProposalsBn = () => { - const [modalIsOpen, setModalIsOpen] = useState(false) - const wallet = useWalletStore((s) => s.current) - const connected = useWalletStore((s) => s.connected) - const [isLoading, setIsLoading] = useState(false) - const { governancesArray } = useGovernanceAssets() - const { current: connection } = useWalletStore((s) => s.connection) - const ownVoteRecordsByProposal = useWalletStore( - (s) => s.ownVoteRecordsByProposal - ) - const [ownNftVoteRecords, setOwnNftVoteRecords] = useState([]) - const ownNftVoteRecordsFilterd = ownNftVoteRecords.filter( - (x) => !ownVoteRecordsByProposal[x.account.proposal.toBase58()] - ) - const maxVoterWeight = - useNftPluginStore((s) => s.state.maxVoteRecord)?.pubkey || undefined - const { realm, programId } = useWalletStore((s) => s.selectedRealm) - const { refetchProposals } = useWalletStore((s) => s.actions) - const client = useVotePluginsClientStore( - (s) => s.state.currentRealmVotingClient - ) - const { - proposals, - ownTokenRecord, - ownCouncilTokenRecord, - realmInfo, - isNftMode, - } = useRealm() - const myProposals = useMemo( - () => - connected - ? Object.values(proposals).filter( - (p) => - p.account.tokenOwnerRecord.toBase58() === - ownTokenRecord?.pubkey.toBase58() || - p.account.tokenOwnerRecord.toBase58() === - ownCouncilTokenRecord?.pubkey.toBase58() - ) - : [], - [proposals, ownVoteRecordsByProposal, connected] - ) - const drafts = myProposals.filter((x) => { - return x.account.state === ProposalState.Draft - }) - const notfinalized = myProposals.filter((x) => { - const governance = governancesArray.find( - (gov) => gov.pubkey.toBase58() === x.account.governance.toBase58() - ) - const now = dayjs().unix() - const timestamp = x - ? x.account.isVoteFinalized() - ? 0 // If vote is finalized then set the timestamp to 0 to make it expired - : x.account.votingAt && governance - ? x.account.votingAt.toNumber() + - governance.account.config.maxVotingTime - : undefined - : undefined - return ( - x.account.state === ProposalState.Voting && - !x.account.isVoteFinalized() && - timestamp && - now > timestamp - ) - }) - const unReleased = [...Object.values(proposals)].filter( - (x) => - (x.account.state === ProposalState.Completed || - x.account.state === ProposalState.Executing || - x.account.state === ProposalState.SigningOff || - x.account.state === ProposalState.Succeeded || - x.account.state === ProposalState.ExecutingWithErrors || - x.account.state === ProposalState.Defeated || - x.account.state === ProposalState.Cancelled) && - ownVoteRecordsByProposal[x.pubkey.toBase58()] && - !ownVoteRecordsByProposal[x.pubkey.toBase58()]?.account.isRelinquished - ) - - const createdVoting = myProposals.filter((x) => { - return ( - x.account.state === ProposalState.Voting && !x.account.isVoteFinalized() - ) - }) - - const cleanSelected = async ( - proposalsArray: ProgramAccount[], - withInstruction - ) => { - if (!wallet || !programId || !realm) return - setIsLoading(true) - try { - const { - blockhash: recentBlockhash, - } = await connection.getLatestBlockhash() - - const transactions: Transaction[] = [] - for (let i = 0; i < proposalsArray.length; i++) { - const proposal = proposalsArray[i] - - const instructions: TransactionInstruction[] = [] - - await withInstruction(instructions, proposal) - - const transaction = new Transaction({ - recentBlockhash, - feePayer: wallet.publicKey!, - }) - transaction.add(...instructions) - transaction.recentBlockhash = recentBlockhash - transaction.setSigners( - // fee payed by the wallet owner - wallet.publicKey! - ) - transactions.push(transaction) - } - const signedTXs = await wallet.signAllTransactions(transactions) - await Promise.all( - signedTXs.map((transaction) => - sendSignedTransaction({ signedTransaction: transaction, connection }) - ) - ) - await sleep(500) - await refetchProposals() - } catch (e) { - console.log(e) - notify({ type: 'error', message: 'Something wnet wrong' }) - } - setIsLoading(false) - } - - const cleanDrafts = (toIndex = null) => { - const withInstruction = (instructions, proposal) => { - return withCancelProposal( - instructions, - realm!.owner!, - realmInfo!.programVersion!, - realm!.pubkey!, - proposal!.account.governance, - proposal!.pubkey, - proposal!.account.tokenOwnerRecord, - wallet!.publicKey! - ) - } - cleanSelected(drafts.slice(0, toIndex || drafts.length), withInstruction) - } - const releaseAllTokens = (toIndex = null) => { - const withInstruction = async ( - instructions, - proposal: ProgramAccount - ) => { - const voterTokenRecord = - proposal.account.governingTokenMint.toBase58() === - realm?.account.communityMint.toBase58() - ? ownTokenRecord - : ownCouncilTokenRecord - const governanceAuthority = wallet!.publicKey! - const beneficiary = wallet!.publicKey! - const inst = await withRelinquishVote( - instructions, - realm!.owner, - proposal.account.governance, - proposal.pubkey, - voterTokenRecord!.pubkey, - proposal.account.governingTokenMint, - ownVoteRecordsByProposal[proposal.pubkey.toBase58()].pubkey, - governanceAuthority, - beneficiary - ) - await client.withRelinquishVote( - instructions, - proposal, - ownVoteRecordsByProposal[proposal.pubkey.toBase58()].pubkey - ) - return inst - } - cleanSelected( - unReleased.slice(0, toIndex || unReleased.length), - withInstruction - ) - } - const finalizeAll = (toIndex = null) => { - const withInstruction = ( - instructions, - proposal: ProgramAccount - ) => { - return withFinalizeVote( - instructions, - realm!.owner, - realmInfo!.programVersion!, - realm!.pubkey!, - proposal.account.governance, - proposal.pubkey, - proposal.account.tokenOwnerRecord, - proposal.account.governingTokenMint, - maxVoterWeight - ) - } - cleanSelected( - notfinalized.slice(0, toIndex || notfinalized.length), - withInstruction - ) - } - const releaseNfts = async () => { - setIsLoading(true) - const instructions: TransactionInstruction[] = [] - const { registrar } = await getNftRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - client.client!.program.programId - ) - const { voterWeightPk } = await getNftVoterWeightRecord( - realm!.pubkey, - realm!.account.communityMint, - wallet!.publicKey!, - client.client!.program.programId - ) - for (const i of ownNftVoteRecords) { - const relinquishNftVoteIx = await (client.client as NftVoterClient).program.methods - .relinquishNftVote() - .accounts({ - registrar, - voterWeightRecord: voterWeightPk, - governance: proposals[i.account.proposal].account.governance, - proposal: i.account.proposal, - governingTokenOwner: wallet!.publicKey!, - voteRecord: i.publicKey, - beneficiary: wallet!.publicKey!, - }) - .remainingAccounts([ - { pubkey: i.publicKey, isSigner: false, isWritable: true }, - ]) - .instruction() - instructions.push(relinquishNftVoteIx) - } - try { - const insertChunks = chunks(instructions, 10) - const instArray = [...insertChunks] - const transactions: Transaction[] = [] - const { - blockhash: recentBlockhash, - } = await connection.getLatestBlockhash() - for (let i = 0; i < instArray.length; i++) { - const instructionsChunk = instArray[i] - - const transaction = new Transaction({ - recentBlockhash, - feePayer: wallet!.publicKey!, - }) - transaction.add(...instructionsChunk) - transaction.recentBlockhash = recentBlockhash - transaction.setSigners( - // fee payed by the wallet owner - wallet!.publicKey! - ) - transactions.push(transaction) - } - const signedTXs = await wallet!.signAllTransactions(transactions) - await Promise.all( - signedTXs.map((transaction) => - sendSignedTransaction({ signedTransaction: transaction, connection }) - ) - ) - setIsLoading(false) - getNftsVoteRecord() - } catch (e) { - setIsLoading(false) - console.log(e) - } - } - const getNftsVoteRecord = async () => { - const nftClient = client.client as NftVoterClient - const nftVoteRecords = await nftClient.program.account.nftVoteRecord.all([ - { - memcmp: { - offset: 72, - bytes: wallet!.publicKey!.toBase58(), - }, - }, - ]) - const nftVoteRecordsFiltered = nftVoteRecords - setOwnNftVoteRecords(nftVoteRecordsFiltered) - } - useEffect(() => { - if (wallet?.publicKey && isNftMode && client.client && modalIsOpen) { - getNftsVoteRecord() - } - }, [client.clientType, isNftMode, wallet?.publicKey?.toBase58(), modalIsOpen]) - - return ( - <> -
- -
- {modalIsOpen && ( - { - setModalIsOpen(false) - }} - isOpen={modalIsOpen} - > - <> -

- Your proposals {isLoading && } -

- - - - null} - btnName="" - proposals={createdVoting} - isLoading={isLoading} - > - {isNftMode && ownNftVoteRecordsFilterd.length !== 0 && ( -
-

- Unreleased nfts ({ownNftVoteRecordsFilterd.length}) - -

-
- )} - -
- )} - - ) -} - -const ProposalList = ({ - title, - fcn, - btnName, - proposals, - isLoading, -}: { - title: string - fcn: (count?) => void - btnName: string - proposals: ProgramAccount[] - isLoading: boolean -}) => { - return ( - <> - {' '} -

- {title} ({proposals.length}) - {btnName && proposals.length !== 0 && ( -
- - -
- )} -

-
- {proposals.map((x) => ( -
- {x.account.name} -
- ))} -
- - ) -} - -export default MyProposalsBn diff --git a/pages/dao/[symbol]/proposal/components/NewProposalBtn.tsx b/pages/dao/[symbol]/proposal/components/NewProposalBtn.tsx deleted file mode 100644 index 851bce8452..0000000000 --- a/pages/dao/[symbol]/proposal/components/NewProposalBtn.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import Link from 'next/link' -import { PlusCircleIcon } from '@heroicons/react/outline' -import useQueryContext from '@hooks/useQueryContext' -import useRealm from '@hooks/useRealm' -import React from 'react' -import useWalletStore from 'stores/useWalletStore' -import Tooltip from '@components/Tooltip' - -const NewProposalBtn = () => { - const { fmtUrlWithCluster } = useQueryContext() - - const connected = useWalletStore((s) => s.connected) - - const { - symbol, - realm, - governances, - ownVoterWeight, - toManyCommunityOutstandingProposalsForUser, - toManyCouncilOutstandingProposalsForUse, - } = useRealm() - - const governanceItems = Object.values(governances) - - const canCreateProposal = - realm && - governanceItems.some((g) => - ownVoterWeight.canCreateProposal(g.account.config) - ) && - !toManyCommunityOutstandingProposalsForUser && - !toManyCouncilOutstandingProposalsForUse - - const tooltipContent = !connected - ? 'Connect your wallet to create new proposal' - : governanceItems.length === 0 - ? 'There is no governance configuration to create a new proposal' - : !governanceItems.some((g) => - ownVoterWeight.canCreateProposal(g.account.config) - ) - ? "You don't have enough governance power to create a new proposal" - : toManyCommunityOutstandingProposalsForUser - ? 'Too many community outstanding proposals. You need to finalize them before creating a new one.' - : toManyCouncilOutstandingProposalsForUse - ? 'Too many council outstanding proposals. You need to finalize them before creating a new one.' - : '' - - return ( - <> - - - - - ) -} - -export default NewProposalBtn diff --git a/pages/dao/[symbol]/proposal/components/VoteBySwitch.tsx b/pages/dao/[symbol]/proposal/components/VoteBySwitch.tsx deleted file mode 100644 index fc94d3a5ea..0000000000 --- a/pages/dao/[symbol]/proposal/components/VoteBySwitch.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import Switch from '@components/Switch' -import useRealm from '@hooks/useRealm' -import React from 'react' - -const VoteBySwitch = ({ checked, onChange }) => { - const { toManyCouncilOutstandingProposalsForUse } = useRealm() - return !toManyCouncilOutstandingProposalsForUse ? ( -
-
Vote by council
-
- -
-
- ) : null -} - -export default VoteBySwitch diff --git a/pages/dao/[symbol]/proposal/components/forms/RealmConfigFormComponent.tsx b/pages/dao/[symbol]/proposal/components/forms/RealmConfigFormComponent.tsx deleted file mode 100644 index b673c1b095..0000000000 --- a/pages/dao/[symbol]/proposal/components/forms/RealmConfigFormComponent.tsx +++ /dev/null @@ -1,178 +0,0 @@ -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import useRealm from '@hooks/useRealm' -import { - MintMaxVoteWeightSource, - PROGRAM_VERSION_V1, -} from '@solana/spl-governance' -import { - getMintDecimalAmount, - getMintMinAmountAsDecimal, -} from '@tools/sdk/units' -import { precision } from '@utils/formatting' -import BigNumber from 'bignumber.js' -import { AssetAccount } from '@utils/uiTypes/assets' -import InstructionForm, { - InstructionInput, - InstructionInputType, -} from '../instructions/FormCreator' -import { MAX_TOKENS_TO_DISABLE } from '@tools/constants' - -export interface RealmConfigForm { - governedAccount: AssetAccount | undefined - minCommunityTokensToCreateGovernance: number - communityVoterWeightAddin: string - removeCouncil: boolean - maxCommunityVoterWeightAddin: string - communityMintSupplyFactor: number -} - -const RealmConfigFormComponent = ({ - setForm, - setFormErrors, - formErrors, - governedAccount = null, - shouldBeGoverned, - form = {}, - hideGovSelector = false, -}: { - setForm: React.Dispatch> - setFormErrors: React.Dispatch> - formErrors: any - governedAccount: AssetAccount | null - shouldBeGoverned: boolean - form: any - hideGovSelector?: boolean -}) => { - const { realm, mint, realmInfo, councilMint, config } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const minCommunity = mint ? getMintMinAmountAsDecimal(mint) : 0 - const minCommunityTokensToCreateProposal = - realm && mint - ? MAX_TOKENS_TO_DISABLE.eq( - realm.account.config.minCommunityTokensToCreateGovernance - ) - ? MAX_TOKENS_TO_DISABLE - : getMintDecimalAmount( - mint, - realm.account.config.minCommunityTokensToCreateGovernance - ) - : new BigNumber(0) - - const currentPrecision = precision(minCommunity) - const getMinSupplyFractionStep = () => - new BigNumber(1) - .shiftedBy(-1 * MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS) - .toNumber() - - const getMintSupplyFraction = () => { - const communityMintMaxVoteWeightSource = realm!.account.config - .communityMintMaxVoteWeightSource - - return new BigNumber(communityMintMaxVoteWeightSource.value.toString()) - .shiftedBy(-MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS) - .toNumber() - } - const getSupplyFraction = () => { - try { - return mint - ? getMintDecimalAmount(mint, mint?.supply).toNumber() * - Number(form?.communityMintSupplyFactor) - : 0 - } catch (e) { - return 0 - } - } - const getPercentSupply = () => { - try { - return `${Number(form?.communityMintSupplyFactor) * 100}%` - } catch (e) { - return '' - } - } - const inputs: InstructionInput[] = [ - { - label: 'Governance', - initialValue: governedAccount, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned as any, - governance: governedAccount?.governance, - options: assetAccounts.filter( - (x) => - x.governance.pubkey.toBase58() === - realm?.account.authority?.toBase58() - ), - hide: hideGovSelector, - }, - { - label: 'Min community tokens to create governance', - initialValue: minCommunityTokensToCreateProposal, - name: 'minCommunityTokensToCreateGovernance', - type: InstructionInputType.INPUT, - inputType: 'number', - min: minCommunity, - step: minCommunity, - hide: !mint, - validateMinMax: true, - precision: currentPrecision, - }, - { - label: 'Community mint supply factor (max vote weight)', - initialValue: realm ? getMintSupplyFraction() : 0, - name: 'communityMintSupplyFactor', - type: InstructionInputType.INPUT, - inputType: 'number', - min: getMinSupplyFractionStep(), - max: 1, - hide: !mint, - validateMinMax: true, - step: getMinSupplyFractionStep(), - additionalComponent: ( -
- {new BigNumber(getSupplyFraction()).toFormat()} ({getPercentSupply()}) -
- ), - }, - { - label: 'Community voter weight addin', - initialValue: - config?.account?.communityVoterWeightAddin?.toBase58() || '', - name: 'communityVoterWeightAddin', - type: InstructionInputType.INPUT, - inputType: 'text', - hide: realmInfo?.programVersion === PROGRAM_VERSION_V1, - }, - { - label: 'Community max voter weight addin', - initialValue: - config?.account?.maxCommunityVoterWeightAddin?.toBase58() || '', - name: 'maxCommunityVoterWeightAddin', - type: InstructionInputType.INPUT, - inputType: 'text', - hide: realmInfo?.programVersion === PROGRAM_VERSION_V1, - }, - { - label: 'Remove council', - initialValue: false, - name: 'removeCouncil', - type: InstructionInputType.SWITCH, - hide: typeof councilMint === 'undefined', - }, - ] - - return ( - <> - {form && ( - - )} - - ) -} - -export default RealmConfigFormComponent diff --git a/pages/dao/[symbol]/proposal/components/instructions/Castle/CastleDeposit.tsx b/pages/dao/[symbol]/proposal/components/instructions/Castle/CastleDeposit.tsx deleted file mode 100644 index b012e2ac2d..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Castle/CastleDeposit.tsx +++ /dev/null @@ -1,197 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import Input from '@components/inputs/Input' -import useRealm from '@hooks/useRealm' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import { precision } from '@utils/formatting' -import useWalletStore from 'stores/useWalletStore' -import { - CastleDepositForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import { NewProposalContext } from '../../../new' -import { getCastleDepositSchema } 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 Select from '@components/inputs/Select' -import { - Clusters, - DeploymentEnvs, - VaultConfig, -} from '@castlefinance/vault-core' -import { - getCastleVaults, - getCastleDepositInstruction, -} from '@utils/instructions/Castle' - -const CastleDeposit = ({ - 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 - - // Store CastleDepositForm state - const [form, setForm] = useState({ - amount: undefined, - governedTokenAccount: undefined, - castleVaultId: '', - programId: programId?.toString(), - mintInfo: undefined, - }) - - const [castleVaults, setCastleVaults] = useState< - VaultConfig[] | null - >(null) - - const [governedAccount, setGovernedAccount] = useState< - ProgramAccount | undefined - >(undefined) - - const [formErrors, setFormErrors] = useState({}) - - const mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - - const currentPrecision = precision(mintMinAmount) - const { handleSetInstructions } = useContext(NewProposalContext) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - - async function getInstruction(): Promise { - return await getCastleDepositInstruction({ - schema, - form, - amount: form.amount ?? 0, - programId, - connection, - wallet, - setFormErrors, - }) - } - - // Grab Castle vault information from config server - useEffect(() => { - const getCastleConfig = async () => { - const vaults = (await getCastleVaults()).filter((v) => - connection.cluster == 'mainnet' - ? v.cluster == Clusters.mainnetBeta - : v.cluster == Clusters.devnet - ) - console.log(vaults) - setCastleVaults(vaults) - } - getCastleConfig() - }, [connection.cluster]) - - 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 = getCastleDepositSchema({ form }) - - return ( - - { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - - - ) -} - -export default CastleDeposit diff --git a/pages/dao/[symbol]/proposal/components/instructions/Castle/CastleWithdraw.tsx b/pages/dao/[symbol]/proposal/components/instructions/Castle/CastleWithdraw.tsx deleted file mode 100644 index d0bcba7961..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Castle/CastleWithdraw.tsx +++ /dev/null @@ -1,197 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import Input from '@components/inputs/Input' -import useRealm from '@hooks/useRealm' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import { precision } from '@utils/formatting' -import useWalletStore from 'stores/useWalletStore' -import { - CastleWithdrawForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import { NewProposalContext } from '../../../new' -import { getCastleWithdrawSchema } 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 Select from '@components/inputs/Select' -import { - VaultConfig, - DeploymentEnvs, - Clusters, -} from '@castlefinance/vault-core' -import { - getCastleVaults, - getCastleWithdrawInstruction, -} from '@utils/instructions/Castle' - -const CastleWithdraw = ({ - 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 - - // Store CastleWithdrawForm state - const [form, setForm] = useState({ - amount: undefined, - governedTokenAccount: undefined, - castleVaultId: '', - programId: programId?.toString(), - mintInfo: undefined, - }) - - const [castleVaults, setCastleVaults] = useState< - VaultConfig[] | null - >(null) - - const [governedAccount, setGovernedAccount] = useState< - ProgramAccount | undefined - >(undefined) - - const [formErrors, setFormErrors] = useState({}) - - const mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - - const currentPrecision = precision(mintMinAmount) - const { handleSetInstructions } = useContext(NewProposalContext) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - - async function getInstruction(): Promise { - return await getCastleWithdrawInstruction({ - schema, - form, - amount: form.amount ?? 0, - programId, - connection, - wallet, - setFormErrors, - }) - } - - // Grab Castle vault information from config server - useEffect(() => { - const getCastleConfig = async () => { - const vaults = (await getCastleVaults()).filter((v) => - connection.cluster == 'mainnet' - ? v.cluster == Clusters.mainnetBeta - : v.cluster == Clusters.devnet - ) - setCastleVaults(vaults) - } - getCastleConfig() - }, []) - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - if (wallet) { - handleSetInstructions( - { governedAccount: governedAccount, getInstruction }, - index - ) - } - }, [form]) - - useEffect(() => { - setGovernedAccount(form.governedTokenAccount?.governance) - setMintInfo(form.governedTokenAccount?.extensions.mint?.account) - }, [form.governedTokenAccount]) - - const schema = getCastleWithdrawSchema() - - return ( - - { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - - ) -} - -export default CastleWithdraw diff --git a/pages/dao/[symbol]/proposal/components/instructions/Change/ChangeDonation.tsx b/pages/dao/[symbol]/proposal/components/instructions/Change/ChangeDonation.tsx deleted file mode 100644 index 125382167c..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Change/ChangeDonation.tsx +++ /dev/null @@ -1,282 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import Input from '@components/inputs/Input' -import useRealm from '@hooks/useRealm' -import { AccountInfo } from '@solana/spl-token' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import { precision } from '@utils/formatting' -import { tryParseKey } from '@tools/validators/pubkey' -import useWalletStore from 'stores/useWalletStore' -import { TokenProgramAccount, tryGetTokenAccount } from '@utils/tokens' -import { - SplTokenTransferForm, - UiInstruction, - ChangeNonprofit, -} from '@utils/uiTypes/proposalCreationTypes' -import { getAccountName } from '@components/instructions/tools' -import { debounce } from '@utils/debounce' -import { NewProposalContext } from '../../../new' -import { getTokenTransferSchema } 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 { - getSolTransferInstruction, - getTransferInstruction, -} from '@utils/instructionTools' -import NonprofitSelect from '@components/inputs/ChangeNonprofitSelect' - -const ChangeDonation = ({ - 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({ - destinationAccount: '', - // No default transfer amount - amount: undefined, - governedTokenAccount: undefined, - programId: programId?.toString(), - mintInfo: undefined, - }) - - const [searchResults, setSearchResults] = useState([]) - const [loading, setLoading] = useState(false) - const [isTyping, setIsTyping] = useState(false) - const [selectedNonprofit, setNonprofit] = useState() - const [searchInput, setSearchInput] = useState() - - const [governedAccount, setGovernedAccount] = useState< - ProgramAccount | undefined - >(undefined) - const [ - destinationAccount, - setDestinationAccount, - ] = useState | null>(null) - const [formErrors, setFormErrors] = useState({}) - const mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - const currentPrecision = precision(mintMinAmount) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - - const handleSelectNonProfit = (selectedNonprofit: string): void => { - const selectedNonprofitDetail = searchResults.find( - (nonprofit) => nonprofit.name === selectedNonprofit - ) - handleSetForm({ - value: selectedNonprofitDetail?.crypto.solana_address, - propertyName: 'destinationAccount', - }) - setSearchResults([]) - setSearchInput(selectedNonprofit) - setNonprofit(selectedNonprofitDetail) - } - - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - const handleSearch = async (evt) => { - const debounceTimer = 300 - setSearchInput(evt.target.value) - - if (evt.target.value === '') { - setTimeout(() => { - setSearchResults([]) - setLoading(false) - setIsTyping(false) - setNonprofit(undefined) - }, debounceTimer) - } else { - setIsTyping(true) - debounce.debounceFcn(() => performSearch(evt.target.value), debounceTimer) - } - } - const performSearch = (textToSearch: string) => { - setLoading(true) - const queryParams = new URLSearchParams() - queryParams.append('search_term', textToSearch!) - fetch( - `https://api.getchange.io/api/v1/nonprofit_basics?${queryParams.toString()}`, - { - headers: { - 'Content-Type': 'application/json', - }, - } - ) - .then((response) => response.json()) - .then((response) => { - // Some nonprofits do not have crypto addresses; filter these out. - return response.nonprofits.filter( - (n: any) => n.crypto !== undefined - ) as ChangeNonprofit[] - }) - .then((nonprofits) => { - setSearchResults(nonprofits) - }) - .catch(() => { - console.log('error finding nonprofits') - }) - .finally(() => { - setIsTyping(false) - setLoading(false) - }) - } - - async function getInstruction(): Promise { - return !form.governedTokenAccount?.isSol - ? getTransferInstruction({ - schema, - form, - programId, - connection, - wallet, - currentAccount: form.governedTokenAccount || null, - setFormErrors, - }) - : getSolTransferInstruction({ - schema, - form, - programId, - connection, - wallet, - currentAccount: form.governedTokenAccount || null, - setFormErrors, - }) - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - useEffect(() => { - if (form.destinationAccount) { - debounce.debounceFcn(async () => { - const pubKey = tryParseKey(form.destinationAccount) - if (pubKey) { - const account = await tryGetTokenAccount(connection.current, pubKey) - setDestinationAccount(account ? account : null) - } else { - setDestinationAccount(null) - } - }) - } else { - setDestinationAccount(null) - } - }, [form.destinationAccount]) - useEffect(() => { - handleSetInstructions( - { governedAccount: governedAccount, getInstruction }, - index - ) - }, [form]) - useEffect(() => { - setGovernedAccount(form.governedTokenAccount?.governance) - setMintInfo(form.governedTokenAccount?.extensions.mint?.account) - }, [form.governedTokenAccount]) - const destinationAccountName = - destinationAccount?.publicKey && - getAccountName(destinationAccount?.account.address) - const schema = getTokenTransferSchema({ form, connection }) - - return ( - <> - { - return governedTokenAccount.isSol - } - )} - onChange={(value) => { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - handleSelectNonProfit(nonprofitName)} - className="h-12" - showSearchResults={searchResults.length > 0 || isTyping} - disabled={searchResults.length === 0} - nonprofitInformation={selectedNonprofit} - isLoading={loading || isTyping} - > - {searchResults.map((foundNonprofit) => ( - - {foundNonprofit.name} - - ))} - - {destinationAccount && ( -
-
Account owner
-
- {destinationAccount.account.owner.toString()} -
-
- )} - {destinationAccountName && ( -
-
Account name
-
{destinationAccountName}
-
- )} - - - ) -} - -export default ChangeDonation diff --git a/pages/dao/[symbol]/proposal/components/instructions/CloseTokenAccount.tsx b/pages/dao/[symbol]/proposal/components/instructions/CloseTokenAccount.tsx deleted file mode 100644 index 07989f555c..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/CloseTokenAccount.tsx +++ /dev/null @@ -1,199 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { - getTransferInstructionObj, - validateInstruction, -} from '@utils/instructionTools' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../new' -import useRealm from '@hooks/useRealm' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { AssetAccount } from '@utils/uiTypes/assets' -import InstructionForm, { - InstructionInput, - InstructionInputType, -} from './FormCreator' -import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token' -import * as yup from 'yup' -import { getValidatedPublickKey } from '@utils/validations' -import { PublicKey } from '@solana/web3.js' - -export interface CloseTokenAccountForm { - governedAccount: AssetAccount | undefined - fundsDestinationAccount: string - solRentDestination: string -} - -const CloseTokenAccount = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { realm } = useRealm() - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection) - const shouldBeGoverned = index !== 0 && governance - const { governedTokenAccountsWithoutNfts } = useGovernanceAssets() - const [form, setForm] = useState() - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - fundsDestinationAccount: yup - .string() - .test( - 'fundsDestinationAccountTest', - 'Funds destination address validation error', - function (val: string) { - if (form?.governedAccount?.extensions.amount?.isZero()) { - return true - } - if (val) { - try { - return !!getValidatedPublickKey(val) - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Funds destination address is required`, - }) - } - } - ), - solRentDestination: yup - .string() - .test( - 'solRentDestinationTest', - 'Sol rent destination address validation error', - function (val: string) { - if (val) { - try { - return !!getValidatedPublickKey(val) - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Sol rent destination address is required`, - }) - } - } - ), - }) - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstructionClose = '' - let serializedTransfer = '' - let instructions: any = null - if ( - isValid && - form!.governedAccount?.governance?.account && - wallet?.publicKey && - realm - ) { - instructions = !form!.governedAccount.extensions.token!.account.amount?.isZero() - ? await getTransferInstructionObj({ - connection: connection, - governedTokenAccount: form!.governedAccount!, - amount: form!.governedAccount.extensions.token!.account.amount!, - destinationAccount: form!.fundsDestinationAccount!, - wallet: wallet, - }) - : null - const closeInstruction = Token.createCloseAccountInstruction( - TOKEN_PROGRAM_ID, - form!.governedAccount.extensions.token!.publicKey!, - new PublicKey(form!.solRentDestination), - form!.governedAccount.extensions.token!.account.owner!, - [] - ) - serializedTransfer = instructions?.transferInstruction - ? serializeInstructionToBase64(instructions?.transferInstruction) - : '' - serializedInstructionClose = serializeInstructionToBase64( - closeInstruction - ) - } - const obj: UiInstruction = { - prerequisiteInstructions: [], - serializedInstruction: serializedInstructionClose, - additionalSerializedInstructions: [], - isValid, - governance: form!.governedAccount?.governance, - } - if (instructions?.ataInstruction) { - obj.prerequisiteInstructions?.push(instructions?.ataInstruction) - } - if (serializedTransfer) { - obj.additionalSerializedInstructions!.push(serializedTransfer) - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: form?.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const inputs: InstructionInput[] = [ - { - label: 'Token account', - initialValue: null, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned as any, - governance: governance, - options: governedTokenAccountsWithoutNfts.filter((x) => !x.isSol), - }, - { - label: 'Token recipient', - initialValue: '', - name: 'fundsDestinationAccount', - type: InstructionInputType.INPUT, - inputType: 'text', - hide: form?.governedAccount?.extensions.amount?.isZero(), - }, - { - label: 'Sol recipient', - initialValue: - governedTokenAccountsWithoutNfts - .find((x) => x.isSol) - ?.extensions.transferAddress?.toBase58() || - wallet?.publicKey?.toBase58(), - name: 'solRentDestination', - type: InstructionInputType.INPUT, - inputType: 'text', - }, - ] - return ( - <> - - - ) -} - -export default CloseTokenAccount diff --git a/pages/dao/[symbol]/proposal/components/instructions/CreateAssociatedTokenAccount.tsx b/pages/dao/[symbol]/proposal/components/instructions/CreateAssociatedTokenAccount.tsx deleted file mode 100644 index 40ac00d731..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/CreateAssociatedTokenAccount.tsx +++ /dev/null @@ -1,155 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' - -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import Select from '@components/inputs/Select' -import useRealm from '@hooks/useRealm' -import { createAssociatedTokenAccount } from '@utils/associated' -import { isFormValid } from '@utils/formValidation' -import { getSplTokenMintAddressByUIName, SPL_TOKENS } from '@utils/splTokens' -import { - CreateAssociatedTokenAccountForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' - -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../new' -import GovernedAccountSelect from '../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const CreateAssociatedTokenAccount = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - - const { assetAccounts } = useGovernanceAssets() - - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({}) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const validateInstruction = async (): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid - } - - async function getInstruction(): Promise { - const isValid = await validateInstruction() - - if ( - !connection || - !isValid || - !programId || - !form.governedAccount?.governance?.account || - !form.splTokenMintUIName || - !wallet?.publicKey - ) { - return { - serializedInstruction: '', - isValid: false, - governance: form.governedAccount?.governance, - } - } - - const [tx] = await createAssociatedTokenAccount( - // fundingAddress - wallet.publicKey, - - // walletAddress - form.governedAccount.governance.pubkey, - - // splTokenMintAddress - getSplTokenMintAddressByUIName(form.splTokenMintUIName) - ) - - return { - serializedInstruction: serializeInstructionToBase64(tx), - isValid: true, - governance: form.governedAccount.governance, - } - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: form.governedAccount?.governance, - getInstruction, - }, - index - ) - }, [form]) - - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - splTokenMintUIName: yup.string().required('SPL Token Mint is required'), - }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - - ) -} - -export default CreateAssociatedTokenAccount diff --git a/pages/dao/[symbol]/proposal/components/instructions/CustomBase64.tsx b/pages/dao/[symbol]/proposal/components/instructions/CustomBase64.tsx deleted file mode 100644 index e160498edf..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/CustomBase64.tsx +++ /dev/null @@ -1,152 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - getInstructionDataFromBase64, - Governance, - ProgramAccount, -} from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import Textarea from '@components/inputs/Textarea' -import { validateInstruction } from '@utils/instructionTools' -import { - Base64InstructionForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../new' -import GovernedAccountSelect from '../GovernedAccountSelect' -import useRealm from '@hooks/useRealm' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const CustomBase64 = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { ownVoterWeight } = useRealm() - const wallet = useWalletStore((s) => s.current) - const { assetAccounts } = useGovernanceAssets() - const shouldBeGoverned = index !== 0 && governance - const [form, setForm] = useState({ - governedAccount: undefined, - base64: '', - holdUpTime: 0, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - serializedInstruction = form.base64 - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - customHoldUpTime: form.holdUpTime, - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - base64: yup - .string() - .required('Instruction is required') - .test('base64Test', 'Invalid base64', function (val: string) { - if (val) { - try { - getInstructionDataFromBase64(val) - return true - } catch (e) { - return false - } - } else { - return this.createError({ - message: `Instruction is required`, - }) - } - }), - }) - const validateAmountOnBlur = () => { - const value = form.holdUpTime - - handleSetForm({ - value: parseFloat( - Math.max( - Number(0), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed() - ), - propertyName: 'holdUpTime', - }) - } - return ( - <> - - ownVoterWeight.canCreateProposal(x.governance.account.config) - )} - onChange={(value) => { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - { - handleSetForm({ - value: event.target.value, - propertyName: 'holdUpTime', - }) - }} - step={1} - error={formErrors['holdUpTime']} - onBlur={validateAmountOnBlur} - /> - - - ) -} - -export default CustomBase64 diff --git a/pages/dao/[symbol]/proposal/components/instructions/Empty.tsx b/pages/dao/[symbol]/proposal/components/instructions/Empty.tsx deleted file mode 100644 index 8f2d384ee3..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Empty.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { Governance, ProgramAccount } from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { - EmptyInstructionForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import { NewProposalContext } from '../../new' -import GovernedAccountSelect from '../GovernedAccountSelect' -import useRealm from '@hooks/useRealm' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -const Empty = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const [form, setForm] = useState({ - governedAccount: undefined, - }) - const { ownVoterWeight } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const shouldBeGoverned = index !== 0 && governance - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - const obj: UiInstruction = { - serializedInstruction: '', - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - }) - return ( - - ownVoterWeight.canCreateProposal(x.governance.account.config) - )} - onChange={(value) => { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - ) -} - -export default Empty diff --git a/pages/dao/[symbol]/proposal/components/instructions/Execute.tsx b/pages/dao/[symbol]/proposal/components/instructions/Execute.tsx deleted file mode 100644 index dfac47e671..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Execute.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import React from 'react' -import { RpcContext } from '@solana/spl-governance' -import useWalletStore from 'stores/useWalletStore' -import useRealm from 'hooks/useRealm' -import Button, { SecondaryButton } from '@components/Button' -import { notify } from 'utils/notifications' -import Modal from '@components/Modal' -import { executeTransaction } from 'actions/executeTransaction' -import { ProposalTransaction } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { getProgramVersionForRealm } from '@models/registry/api' - -type ExecuteInstructionProps = { - onClose: () => void - isOpen: boolean - instruction: ProgramAccount | any -} - -const ExecuteInstruction = ({ - onClose, - isOpen, - instruction, -}: ExecuteInstructionProps) => { - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection) - const { proposal } = useWalletStore((s) => s.selectedProposal) - const { realmInfo } = useRealm() - - const handleExecuteInstruction = async () => { - try { - if (proposal && realmInfo) { - const rpcContext = new RpcContext( - proposal.owner, - getProgramVersionForRealm(realmInfo), - wallet!, - connection.current, - connection.endpoint - ) - - await executeTransaction(rpcContext, proposal, instruction) - - onClose() - } - } catch (error) { - notify({ - type: 'error', - message: `Error: Could not execute instruction.`, - }) - - console.log('error executing instruction', error) - - onClose() - } - } - - return ( - -

Execute instruction

- -

Do you want to execute instruction?

- -
- - No - - - -
-
- ) -} - -export default ExecuteInstruction diff --git a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeAddMarketListToCategoryParams.tsx b/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeAddMarketListToCategoryParams.tsx deleted file mode 100644 index 488c3fbe6e..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeAddMarketListToCategoryParams.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React from 'react' -import { ForesightMakeAddMarketListToCategoryParams } from '@utils/uiTypes/proposalCreationTypes' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { governance as foresightGov } from '@foresight-tmp/foresight-sdk' -import { - commonAssets, - ForesightCategoryIdInput, - ForesightMarketListIdInput, -} from '@utils/Foresight' - -function MakeAddMarketListToCategoryParams({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) { - const { - inputProps, - effector, - governedAccountSelect, - wallet, - } = commonAssets( - { categoryId: '', marketListId: '' }, - index, - governance - ) - async function ixCreator(form: ForesightMakeAddMarketListToCategoryParams) { - const { ix } = await foresightGov.genAddMarketListToCategoryIx( - Buffer.from(form.categoryId.padEnd(20)), - Buffer.from(form.marketListId.padEnd(20)), - wallet!.publicKey! - ) - return ix - } - effector(ixCreator) - - return ( - <> - {governedAccountSelect} - - - - ) -} - -export default MakeAddMarketListToCategoryParams diff --git a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitCategoryParams.tsx b/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitCategoryParams.tsx deleted file mode 100644 index 04003cf3da..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitCategoryParams.tsx +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React from 'react' -import { ForesightHasCategoryId } from '@utils/uiTypes/proposalCreationTypes' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { governance as foresightGov } from '@foresight-tmp/foresight-sdk' -import { commonAssets, ForesightCategoryIdInput } from '@utils/Foresight' - -const MakeInitCategoryParams = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { - inputProps, - effector, - governedAccountSelect, - wallet, - } = commonAssets( - { categoryId: '' }, - index, - governance - ) - async function ixCreator(form: ForesightHasCategoryId) { - const { ix } = await foresightGov.genInitCategoryIx( - Buffer.from(form.categoryId.padEnd(20)), - wallet!.publicKey! - ) - return ix - } - effector(ixCreator) - return ( - <> - {governedAccountSelect} - - - ) -} - -export default MakeInitCategoryParams diff --git a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitMarketListParams.tsx b/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitMarketListParams.tsx deleted file mode 100644 index 158a268b51..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitMarketListParams.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React from 'react' -import { ForesightHasMarketListId } from '@utils/uiTypes/proposalCreationTypes' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { governance as foresightGov } from '@foresight-tmp/foresight-sdk' -import { commonAssets, ForesightMarketListIdInput } from '@utils/Foresight' - -const MakeInitMarketListParams = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { - inputProps, - effector, - governedAccountSelect, - wallet, - } = commonAssets( - { marketListId: '' }, - index, - governance - ) - async function ixCreator(form: ForesightHasMarketListId) { - const { ix } = await foresightGov.genInitMarketListIx( - Buffer.from(form.marketListId.padEnd(20)), - wallet!.publicKey!, - form.governedAccount.extensions.transferAddress! - ) - return ix - } - effector(ixCreator) - - return ( - <> - {governedAccountSelect} - - - ) -} - -export default MakeInitMarketListParams diff --git a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitMarketParams.tsx b/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitMarketParams.tsx deleted file mode 100644 index c7a5386b3e..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeInitMarketParams.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React from 'react' -import { ForesightHasMarketId } from '@utils/uiTypes/proposalCreationTypes' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { governance as foresightGov, utils } from '@foresight-tmp/foresight-sdk' -import { - commonAssets, - ForesightMarketIdInput, - ForesightMarketListIdInput, -} from '@utils/Foresight' - -const MakeInitMarketParams = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { - inputProps, - effector, - governedAccountSelect, - wallet, - } = commonAssets( - { marketListId: '', marketId: 0 }, - index, - governance - ) - async function ixCreator(form: ForesightHasMarketId) { - const { ix } = await foresightGov.genInitMarketIx( - Buffer.from(form.marketListId.padEnd(20)), - utils.intToArray(form.marketId, 1), - wallet!.publicKey! - ) - return ix - } - effector(ixCreator) - - return ( - <> - {governedAccountSelect} - - - - ) -} - -export default MakeInitMarketParams diff --git a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeResolveMarketParams.tsx b/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeResolveMarketParams.tsx deleted file mode 100644 index 928e5850b1..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeResolveMarketParams.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React from 'react' -import { ForesightMakeResolveMarketParams } from '@utils/uiTypes/proposalCreationTypes' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { governance as foresightGov, utils } from '@foresight-tmp/foresight-sdk' -import { - commonAssets, - ForesightMarketIdInput, - ForesightMarketListIdInput, - ForesightWinnerInput, -} from '@utils/Foresight' - -const MakeResolveMarketParams = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { - inputProps, - effector, - governedAccountSelect, - } = commonAssets( - { marketListId: '', marketId: 0, winner: 0 }, - index, - governance - ) - async function ixCreator(form: ForesightMakeResolveMarketParams) { - const ix = await foresightGov.genResolveMarketIx( - form.winner, - utils.intToArray(form.marketId, 1), - Buffer.from(form.marketListId.padEnd(20)), - form.governedAccount.extensions.transferAddress! - ) - return ix - } - effector(ixCreator) - - return ( - <> - {governedAccountSelect} - - - - - ) -} - -export default MakeResolveMarketParams diff --git a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeSetMarketMetadataParams.tsx b/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeSetMarketMetadataParams.tsx deleted file mode 100644 index 4c5bfb82d4..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Foresight/MakeSetMarketMetadataParams.tsx +++ /dev/null @@ -1,64 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React from 'react' -import { ForesightMakeSetMarketMetadataParams } from '@utils/uiTypes/proposalCreationTypes' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { - governance as foresightGov, - consts as foresightConsts, - utils, -} from '@foresight-tmp/foresight-sdk' -import { - commonAssets, - ForesightContentInput, - ForesightMarketIdInput, - ForesightMarketListIdInput, - ForesightMarketMetadataFieldSelect, -} from '@utils/Foresight' - -export default function MakeSetMarketMetadataParams({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) { - const { - inputProps, - effector, - governedAccountSelect, - wallet, - } = commonAssets( - { - marketListId: '', - marketId: 0, - content: '', - field: Object.keys( - foresightConsts.MARKET_METADATA_FIELDS - )[0] as foresightConsts.MarketMetadataFieldName, - }, - index, - governance - ) - async function ixCreator(form: ForesightMakeSetMarketMetadataParams) { - const field = foresightConsts.MARKET_METADATA_FIELDS[form.field] - const { ix } = await foresightGov.genWriteToFieldMarketMetadataIx( - utils.intToArray(form.marketId, 1), - Buffer.from(form.marketListId.padEnd(20)), - form.content, - new field(), - wallet!.publicKey! - ) - return ix - } - effector(ixCreator) - return ( - <> - {governedAccountSelect} - - - - - - ) -} diff --git a/pages/dao/[symbol]/proposal/components/instructions/FormCreator.tsx b/pages/dao/[symbol]/proposal/components/instructions/FormCreator.tsx deleted file mode 100644 index 566ec83357..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/FormCreator.tsx +++ /dev/null @@ -1,230 +0,0 @@ -import Input from '@components/inputs/Input' -import Textarea from '@components/inputs/Textarea' -import { ProgramAccount, Governance } from '@solana/spl-governance' -import { useState, useEffect } from 'react' -import GovernedAccountSelect from '../GovernedAccountSelect' -import { precision } from '@utils/formatting' -import Switch from '@components/Switch' -import Select from '@components/inputs/Select' - -export enum InstructionInputType { - GOVERNED_ACCOUNT, - INPUT, - TEXTAREA, - SWITCH, - SELECT, -} - -export interface InstructionInput { - label: string - initialValue: any - name: string - type: InstructionInputType - inputType?: string - placeholder?: string - min?: number - max?: number - step?: number - onBlur?: () => void - shouldBeGoverned?: false | ProgramAccount | null - governance?: ProgramAccount | null - options?: any[] - hide?: boolean - validateMinMax?: boolean - precision?: number - additionalComponent?: JSX.Element -} - -const InstructionForm = ({ - inputs = [], - setFormErrors, - setForm, - formErrors, - outerForm, -}: { - inputs: InstructionInput[] - setFormErrors: React.Dispatch> - formErrors - setForm: React.Dispatch> - outerForm: any -}) => { - const [form, setInnerForm] = useState({}) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setInnerForm({ ...outerForm, [propertyName]: value }) - } - useEffect(() => { - setForm(form) - }, [form]) - useEffect(() => { - setInnerForm({ - ...inputs.reduce((a, v) => ({ ...a, [v.name]: v.initialValue }), {}), - }) - }, [JSON.stringify(inputs.map((x) => x.initialValue))]) - return ( - <> - {inputs - .filter((x) => !x.hide) - .map((x) => ( - - ))} - - ) -} - -const InstructionInput = ({ - input, - handleSetForm, - formErrors, - form, -}: { - input: InstructionInput - handleSetForm: ({ - propertyName, - value, - }: { - propertyName: string - value: any - }) => void - formErrors - form -}) => { - const getComponent = () => { - switch (input.type) { - case InstructionInputType.GOVERNED_ACCOUNT: - return ( - { - handleSetForm({ value, propertyName: input.name }) - }} - value={form[input.name]} - error={formErrors[input.name]} - shouldBeGoverned={input.shouldBeGoverned} - governance={input.governance} - /> - ) - case InstructionInputType.SELECT: - return ( - - ) - case InstructionInputType.INPUT: { - const validateAmountOnBlur = () => { - const value = form[input.name] - const precisionFromMin = input.min ? precision(input.min) : 1 - handleSetForm({ - value: parseFloat( - Math.max( - Number(input.min ? input.min : 0), - Math.min( - Number( - typeof input.max !== 'undefined' - ? input.max - : Number.MAX_SAFE_INTEGER - ), - Number(value) - ) - ).toFixed( - input.precision - ? input.precision - : precisionFromMin - ? precisionFromMin - : 0 - ) - ), - propertyName: input.name, - }) - } - return ( - { - handleSetForm({ - value: event.target.value, - propertyName: input.name, - }) - }} - step={input.step} - error={formErrors[input.name]} - onBlur={ - input.onBlur - ? input.onBlur - : input.validateMinMax - ? validateAmountOnBlur - : null - } - /> - ) - } - - case InstructionInputType.TEXTAREA: - return ( - - ) - case InstructionInputType.SWITCH: - return ( -
-
{input.label}
-
- - handleSetForm({ - value: checked, - propertyName: input.name, - }) - } - /> -
-
- ) - } - } - return ( - <> - {getComponent()} - {input.additionalComponent && input.additionalComponent} - - ) -} - -export default InstructionForm diff --git a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingDeposit.tsx b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingDeposit.tsx deleted file mode 100644 index bba354e60b..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingDeposit.tsx +++ /dev/null @@ -1,144 +0,0 @@ -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 deleted file mode 100644 index eb8fc04adb..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionClaimPendingWithdraw.tsx +++ /dev/null @@ -1,144 +0,0 @@ -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 deleted file mode 100644 index 606c2f1e6f..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionDeposit.tsx +++ /dev/null @@ -1,182 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import Input from '@components/inputs/Input' -import useRealm from '@hooks/useRealm' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import { precision } from '@utils/formatting' -import useWalletStore from 'stores/useWalletStore' -import { - FriktionDepositForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import { NewProposalContext } from '../../../new' -import { getFriktionDepositSchema } 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 { getFriktionDepositInstruction } from '@utils/instructions/Friktion' -import Select from '@components/inputs/Select' -import { FriktionSnapshot, VoltSnapshot } from '@friktion-labs/friktion-sdk' - -const FriktionDeposit = ({ - 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({ - amount: undefined, - 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 mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - const currentPrecision = precision(mintMinAmount) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - async function getInstruction(): Promise { - return getFriktionDepositInstruction({ - schema, - form, - amount: form.amount ?? 0, - 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 = getFriktionDepositSchema({ form }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - - - ) -} - -export default FriktionDeposit diff --git a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionWithdraw.tsx b/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionWithdraw.tsx deleted file mode 100644 index f570e7dd9d..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Friktion/FriktionWithdraw.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import Input from '@components/inputs/Input' -import useRealm from '@hooks/useRealm' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import { precision } from '@utils/formatting' -import useWalletStore from 'stores/useWalletStore' -import { - FriktionWithdrawForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import { NewProposalContext } from '../../../new' -import { getFriktionWithdrawSchema } 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 { getFriktionWithdrawInstruction } from '@utils/instructions/Friktion' -import Select from '@components/inputs/Select' -import { FriktionSnapshot, VoltSnapshot } from '@friktion-labs/friktion-sdk' - -const FriktionWithdraw = ({ - 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({ - amount: undefined, - 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 mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - const currentPrecision = precision(mintMinAmount) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - - async function getInstruction(): Promise { - return getFriktionWithdrawInstruction({ - schema, - form, - amount: form.amount ?? 0, - 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 = getFriktionWithdrawSchema() - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - - - ) -} - -export default FriktionWithdraw diff --git a/pages/dao/[symbol]/proposal/components/instructions/GoblinGold/GoblinGoldDeposit.tsx b/pages/dao/[symbol]/proposal/components/instructions/GoblinGold/GoblinGoldDeposit.tsx deleted file mode 100644 index 0707fddd22..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/GoblinGold/GoblinGoldDeposit.tsx +++ /dev/null @@ -1,180 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import { Governance, ProgramAccount } from '@solana/spl-governance' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import Input from '@components/inputs/Input' -import Select from '@components/inputs/Select' -import useRealm from '@hooks/useRealm' -import { precision } from '@utils/formatting' -import { - GoblinGoldDepositForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import useWalletStore from 'stores/useWalletStore' -import { NewProposalContext } from '../../../new' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { getGoblinGoldDepositInstruction } from '@utils/instructions/GoblinGold' -import { StrategyVault } from 'goblingold-sdk' -import { getGoblinGoldDepositSchema } from '@utils/validations' - -const GoblinGoldDeposit = ({ - 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({ - amount: undefined, - governedTokenAccount: undefined, - goblinGoldVaultId: '', - mintInfo: undefined, - }) - const [governedAccount, setGovernedAccount] = useState< - ProgramAccount | undefined - >(undefined) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - const [goblinGoldVaults, setGoblinGoldVaults] = useState([]) - - const mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - - const currentPrecision = precision(mintMinAmount) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - - async function getInstruction(): Promise { - return await getGoblinGoldDepositInstruction({ - schema, - form, - amount: form.amount ?? 0, - programId, - connection, - wallet, - setFormErrors, - }) - } - - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - - useEffect(() => { - // call for the mainnet vaults - const fetchVaults = async () => { - const response = await fetch('https://data.goblin.gold:7766/vaults') - const parsedResponse = (await response.json()) as StrategyVault[] - setGoblinGoldVaults(parsedResponse as StrategyVault[]) - } - fetchVaults() - }, []) - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: governedAccount, getInstruction }, - index - ) - }, [form]) - - useEffect(() => { - setGovernedAccount(form.governedTokenAccount?.governance) - setMintInfo(form.governedTokenAccount?.extensions.mint?.account) - }, [form.governedTokenAccount]) - - const schema = getGoblinGoldDepositSchema({ form }) - - return ( - - { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - - - ) -} - -export default GoblinGoldDeposit diff --git a/pages/dao/[symbol]/proposal/components/instructions/GoblinGold/GoblinGoldWithdraw.tsx b/pages/dao/[symbol]/proposal/components/instructions/GoblinGold/GoblinGoldWithdraw.tsx deleted file mode 100644 index 08e14603e2..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/GoblinGold/GoblinGoldWithdraw.tsx +++ /dev/null @@ -1,185 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import { - Governance, - ProgramAccount, - // serializeInstructionToBase64, -} from '@solana/spl-governance' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import Input from '@components/inputs/Input' -import Select from '@components/inputs/Select' -import useRealm from '@hooks/useRealm' -import { precision } from '@utils/formatting' -import { - GoblinGoldWithdrawForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import useWalletStore from 'stores/useWalletStore' -import { NewProposalContext } from '../../../new' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { getGoblinGoldWithdrawInstruction } from '@utils/instructions/GoblinGold' -import { StrategyVault } from 'goblingold-sdk' -import { getGoblinGoldWithdrawSchema } from '@utils/validations' - -const GoblinGoldWithdraw = ({ - 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({ - amount: undefined, - governedTokenAccount: undefined, - goblinGoldVaultId: '', - mintInfo: undefined, - }) - const [governedAccount, setGovernedAccount] = useState< - ProgramAccount | undefined - >(undefined) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - const [goblinGoldVaults, setGoblinGoldVaults] = useState([]) - - const mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - - const currentPrecision = precision(mintMinAmount) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - - async function getInstruction(): Promise { - return await getGoblinGoldWithdrawInstruction({ - schema, - form, - amount: form.amount ?? 0, - programId, - connection, - wallet, - setFormErrors, - }) - } - - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - - useEffect(() => { - // call for the mainnet vaults - const fetchVaults = async () => { - const response = await fetch('https://data.goblin.gold:7766/vaults') - const parsedResponse = (await response.json()) as StrategyVault[] - setGoblinGoldVaults(parsedResponse as StrategyVault[]) - } - - fetchVaults() - }, []) - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: governedAccount, getInstruction }, - index - ) - }, [form]) - - useEffect(() => { - setGovernedAccount(form.governedTokenAccount?.governance) - setMintInfo(form.governedTokenAccount?.extensions.mint?.account) - }, [form.governedTokenAccount]) - - const schema = getGoblinGoldWithdrawSchema() - - return ( - - { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - - - ) -} - -export default GoblinGoldWithdraw diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeAddOracle.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeAddOracle.tsx deleted file mode 100644 index 3ffbe5d853..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeAddOracle.tsx +++ /dev/null @@ -1,142 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { PublicKey } from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - MangoMakeAddOracleForm, -} 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 useWalletStore from 'stores/useWalletStore' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import { makeAddOracleInstruction } from '@blockworks-foundation/mango-client' -import { AccountType } from '@utils/uiTypes/assets' - -const MakeAddOracle = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: undefined, - programId: programId?.toString(), - mangoGroup: undefined, - oracleAccount: undefined, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - 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 && - programId && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - //Mango instruction call and serialize - const addOracleIx = makeAddOracleInstruction( - form.governedAccount.governance.account.governedAccount, - new PublicKey(form.mangoGroup!), - new PublicKey(form.oracleAccount!), - form.governedAccount.governance.pubkey - ) - - serializedInstruction = serializeInstructionToBase64(addOracleIx) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - bufferAddress: yup.number(), - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'mangoGroup', - }) - } - error={formErrors['mangoGroup']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'oracleAccount', - }) - } - error={formErrors['oracleAccount']} - /> - - ) -} - -export default MakeAddOracle diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeAddSpotMarket.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeAddSpotMarket.tsx deleted file mode 100644 index 7072a02601..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeAddSpotMarket.tsx +++ /dev/null @@ -1,347 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { - Account, - PublicKey, - Transaction, - TransactionInstruction, -} from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - MangoMakeAddSpotMarketForm, -} 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 useWalletStore from 'stores/useWalletStore' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import { - Config, - createAccountInstruction, - getTokenBySymbol, - I80F48, - makeAddSpotMarketInstruction, - MangoClient, - NodeBankLayout, - RootBankLayout, -} from '@blockworks-foundation/mango-client' -import * as common from '@project-serum/common' -import * as serum from '@project-serum/serum' -import { AccountType } from '@utils/uiTypes/assets' - -const MakeAddSpotMarket = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection.current) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: undefined, - programId: programId?.toString(), - mangoGroup: undefined, - oracleAccount: undefined, - serumAccount: undefined, - maintLeverage: 10, - initLeverage: 5, - liquidationFee: 0.05, - optUtil: 0.7, - optRate: 0.03, - maxRate: 0.75, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - 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 && - programId && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - const groupConfig = Config.ids().groups.find((c) => - c.publicKey.equals(new PublicKey(form.mangoGroup!)) - )! - const quoteMint = getTokenBySymbol(groupConfig, groupConfig.quoteSymbol) - - const mangoGroup = await new MangoClient( - connection, - groupConfig.mangoProgramId - ).getMangoGroup(groupConfig.publicKey) - - const provider = new common.Provider( - connection, - { ...wallet!, publicKey: wallet!.publicKey! }, - common.Provider.defaultOptions() - ) - const oracle = new PublicKey(form.oracleAccount!) - const market = new PublicKey(form.serumAccount!) - const marketInfo = await serum.Market.load( - connection, - market, - undefined, - groupConfig.serumProgramId - ) - - if (!marketInfo.quoteMintAddress.equals(quoteMint.mintKey)) { - throw new Error('invalid market') - } - - const tx = new Transaction() - const addToTx = async ( - instructions: Promise - ) => { - for (const ins of await instructions) { - tx.add(ins) - } - } - - const baseVault = new Account() - await addToTx( - common.createTokenAccountInstrs( - provider, - baseVault.publicKey, - marketInfo.baseMintAddress, - mangoGroup.signerKey - ) - ) - - const nodeBank = await createAccountInstruction( - connection, - provider.wallet.publicKey, - NodeBankLayout.span, - groupConfig.mangoProgramId - ) - tx.add(nodeBank.instruction) - - const rootBank = await createAccountInstruction( - connection, - provider.wallet.publicKey, - RootBankLayout.span, - groupConfig.mangoProgramId - ) - tx.add(rootBank.instruction) - - tx.recentBlockhash = ( - await connection.getLatestBlockhash('max') - ).blockhash - - const signers = [baseVault, nodeBank.account, rootBank.account] - tx.setSigners(wallet!.publicKey!, ...signers.map((s) => s.publicKey)) - if (signers.length > 0) { - tx.partialSign(...signers) - } - const signed = await wallet?.signTransaction(tx) - const txid = await connection.sendRawTransaction(signed!.serialize()) - - console.log('created accounts', txid) - - const instruction = makeAddSpotMarketInstruction( - groupConfig.mangoProgramId, - mangoGroup.publicKey, - oracle, - market, - mangoGroup.dexProgramId, - marketInfo.baseMintAddress, - nodeBank.account.publicKey, - baseVault.publicKey, - rootBank.account.publicKey, - form.governedAccount.governance.pubkey, - I80F48.fromNumber(form.maintLeverage), - I80F48.fromNumber(form.initLeverage), - I80F48.fromNumber(form.liquidationFee), - I80F48.fromNumber(form.optUtil), - I80F48.fromNumber(form.optRate), - I80F48.fromNumber(form.maxRate) - ) - serializedInstruction = serializeInstructionToBase64(instruction) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - bufferAddress: yup.number(), - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'mangoGroup', - }) - } - error={formErrors['mangoGroup']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'oracleAccount', - }) - } - error={formErrors['oracleAccount']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'serumAccount', - }) - } - error={formErrors['serumAccount']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'maintLeverage', - }) - } - error={formErrors['maintLeverage']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'initLeverage', - }) - } - error={formErrors['initLeverage']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'liquidationFee', - }) - } - error={formErrors['liquidationFee']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'optUtil', - }) - } - error={formErrors['optUtil']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'optRate', - }) - } - error={formErrors['optRate']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'maxRate', - }) - } - error={formErrors['maxRate']} - /> - - ) -} - -export default MakeAddSpotMarket diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeMaxAccounts.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeMaxAccounts.tsx deleted file mode 100644 index 48447ce11e..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeMaxAccounts.tsx +++ /dev/null @@ -1,150 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { PublicKey } from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - MangoMakeChangeMaxAccountsForm, -} 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 useWalletStore from 'stores/useWalletStore' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import { - BN, - makeChangeMaxMangoAccountsInstruction, -} from '@blockworks-foundation/mango-client' -import { AccountType } from '@utils/uiTypes/assets' - -const MakeChangeMaxAccounts = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: undefined, - programId: programId?.toString(), - mangoGroup: undefined, - maxMangoAccounts: 1, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - 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 && - programId && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - //Mango instruction call and serialize - const setMaxMangoAccountsInstr = makeChangeMaxMangoAccountsInstruction( - form.governedAccount.governance.account.governedAccount, - new PublicKey(form.mangoGroup!), - form.governedAccount.governance.pubkey, - new BN(form.maxMangoAccounts) - ) - - serializedInstruction = serializeInstructionToBase64( - setMaxMangoAccountsInstr - ) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - bufferAddress: yup.number(), - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - }) - - return ( - <> - {/* if you need more fields add theme to interface MangoMakeChangeMaxAccountsForm - then you can add inputs in here */} - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'mangoGroup', - }) - } - error={formErrors['mangoGroup']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'maxMangoAccounts', - }) - } - error={formErrors['maxMangoAccounts']} - /> - - ) -} - -export default MakeChangeMaxAccounts diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangePerpMarket.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangePerpMarket.tsx deleted file mode 100644 index a9bd8b1573..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangePerpMarket.tsx +++ /dev/null @@ -1,346 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { PublicKey } from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - MangoMakeChangePerpMarketForm, -} 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 useWalletStore from 'stores/useWalletStore' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import { - BN, - Config, - I80F48, - makeChangePerpMarketParams2Instruction, - optionalBNFromString, -} from '@blockworks-foundation/mango-client' -import { AccountType } from '@utils/uiTypes/assets' - -const MakeChangePerpMarket = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: undefined, - programId: programId?.toString(), - mangoGroup: undefined, - perpMarket: undefined, - mngoPerPeriod: undefined, - maxDepthBps: undefined, - lmSizeShift: undefined, - makerFee: undefined, - takerFee: undefined, - maintLeverage: undefined, - initLeverage: undefined, - liquidationFee: undefined, - rate: undefined, - exp: undefined, - targetPeriodLength: undefined, - version: undefined, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - 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 && - programId && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - const mangoGroup = new PublicKey(form.mangoGroup!) - const perpMarket = new PublicKey(form.perpMarket!) - const groupConfig = Config.ids().groups.find((c) => - c.publicKey.equals(mangoGroup) - )! - - const instruction = makeChangePerpMarketParams2Instruction( - groupConfig.mangoProgramId, - mangoGroup, - perpMarket, - form.governedAccount.governance.pubkey, - I80F48.fromOptionalString(form.maintLeverage), - I80F48.fromOptionalString(form.initLeverage), - I80F48.fromOptionalString(form.liquidationFee), - I80F48.fromOptionalString(form.makerFee), - I80F48.fromOptionalString(form.takerFee), - I80F48.fromOptionalString(form.rate), - I80F48.fromOptionalString(form.maxDepthBps), - optionalBNFromString(form.targetPeriodLength), - form.mngoPerPeriod - ? new BN( - Math.round( - ((form.mngoPerPeriod as any) as number) * Math.pow(10, 6) - ) - ) - : undefined, - optionalBNFromString(form.exp), - optionalBNFromString(form.version), - optionalBNFromString(form.lmSizeShift) - ) - - serializedInstruction = serializeInstructionToBase64(instruction) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - bufferAddress: yup.number(), - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - }) - - const recommendedLmSizeShift = - form.maxDepthBps && - Math.floor(Math.log2((form.maxDepthBps as any) as number) - 3) - - const recommendedMaintLeverage = - form.initLeverage && ((form.initLeverage as any) as number) * 2 - - const recommendedLiquidationFee = - form.initLeverage && 1 / (((form.initLeverage as any) as number) * 4) - - return ( - <> - {/* if you need more fields add theme to interface MangoMakeChangeMaxAccountsForm - then you can add inputs in here */} - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'mangoGroup', - }) - } - error={formErrors['mangoGroup']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'perpMarket', - }) - } - error={formErrors['perpMarket']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'mngoPerPeriod', - }) - } - error={formErrors['mngoPerPeriod']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'maxDepthBps', - }) - } - error={formErrors['maxDepthBps']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'lmSizeShift', - }) - } - error={formErrors['lmSizeShift']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'makerFee', - }) - } - error={formErrors['makerFee']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'takerFee', - }) - } - error={formErrors['takerFee']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'initLeverage', - }) - } - error={formErrors['initLeverage']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'maintLeverage', - }) - } - error={formErrors['maintLeverage']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'liquidationFee', - }) - } - error={formErrors['liquidationFee']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'rate', - }) - } - error={formErrors['rate']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'exp', - }) - } - error={formErrors['exp']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'targetPeriodLength', - }) - } - error={formErrors['targetPeriodLength']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'version', - }) - } - error={formErrors['version']} - /> - - ) -} - -export default MakeChangePerpMarket diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeReferralFeeParams.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeReferralFeeParams.tsx deleted file mode 100644 index 76d07be7c1..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeReferralFeeParams.tsx +++ /dev/null @@ -1,191 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { PublicKey } from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - MangoMakeChangeReferralFeeParams, - 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 useWalletStore from 'stores/useWalletStore' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import { tryGetMint } from '@utils/tokens' -import { makeChangeReferralFeeParamsInstruction } from '@blockworks-foundation/mango-client' -import { BN } from '@project-serum/anchor' -import { MANGO_MINT } from 'Strategies/protocols/mango/tools' -import { parseMintNaturalAmountFromDecimal } from '@tools/sdk/units' -import { AccountType } from '@utils/uiTypes/assets' - -const MakeChangeReferralFeeParams = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const connection = useWalletStore((s) => s.connection) - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: undefined, - programId: programId?.toString(), - mangoGroup: undefined, - refSurchargeCentibps: 0, - refShareCentibps: 0, - refMngoRequired: 0, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - 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 && - programId && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - //Mango instruction call and serialize - const mint = await tryGetMint( - connection.current, - new PublicKey(MANGO_MINT) - ) - const refMngoRequiredMintAmount = parseMintNaturalAmountFromDecimal( - form.refMngoRequired!, - mint!.account.decimals - ) - const setMaxMangoAccountsInstr = makeChangeReferralFeeParamsInstruction( - form.governedAccount.governance.account.governedAccount, - new PublicKey(form.mangoGroup!), - form.governedAccount.governance.pubkey, - new BN(form.refSurchargeCentibps), - new BN(form.refShareCentibps), - new BN(refMngoRequiredMintAmount) - ) - - serializedInstruction = serializeInstructionToBase64( - setMaxMangoAccountsInstr - ) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - mangoGroup: yup.string().required(), - refShareCentibps: yup.number().required(), - refMngoRequired: yup.number().required(), - refSurchargeCentibps: yup.number().required(), - }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'mangoGroup', - }) - } - error={formErrors['mangoGroup']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'refSurchargeCentibps', - }) - } - error={formErrors['refSurchargeCentibps']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'refShareCentibps', - }) - } - error={formErrors['refShareCentibps']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'refMngoRequired', - }) - } - error={formErrors['refMngoRequired']} - /> - - ) -} - -export default MakeChangeReferralFeeParams diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeSpotMarket.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeSpotMarket.tsx deleted file mode 100644 index c701feb148..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeChangeSpotMarket.tsx +++ /dev/null @@ -1,285 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { PublicKey } from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - MangoMakeChangeSpotMarketForm, -} 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 useWalletStore from 'stores/useWalletStore' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import { - Config, - getSpotMarketByBaseSymbol, - getTokenBySymbol, - I80F48, - makeChangeSpotMarketParamsInstruction, - MangoClient, - optionalBNFromString, -} from '@blockworks-foundation/mango-client' -import * as serum from '@project-serum/serum' -import { AccountType } from '@utils/uiTypes/assets' - -const MakeChangeSpotMarket = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection.current) - - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: undefined, - programId: programId?.toString(), - mangoGroup: undefined, - baseSymbol: undefined, - maintLeverage: 10, - initLeverage: 5, - liquidationFee: 0.05, - optUtil: 0.7, - optRate: 0.03, - maxRate: 0.75, - version: undefined, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - 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 && - programId && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - const mangoGroupPk = new PublicKey(form.mangoGroup!) - const groupConfig = Config.ids().groups.find((c) => - c.publicKey.equals(mangoGroupPk) - )! - - const client = new MangoClient(connection, groupConfig.mangoProgramId) - const mangoGroup = await client.getMangoGroup(groupConfig.publicKey) - - const spotMarketConfig = getSpotMarketByBaseSymbol( - groupConfig, - form.baseSymbol! - ) - const spotMarket = await serum.Market.load( - connection, - spotMarketConfig!.publicKey, - undefined, - groupConfig.serumProgramId - ) - const rootBanks = await mangoGroup.loadRootBanks(connection) - const tokenBySymbol = getTokenBySymbol(groupConfig, form.baseSymbol!) - const tokenIndex = mangoGroup.getTokenIndex(tokenBySymbol.mintKey) - const rootBank = rootBanks[tokenIndex] - - const instruction = makeChangeSpotMarketParamsInstruction( - groupConfig.mangoProgramId, - mangoGroup.publicKey, - spotMarket.publicKey, - rootBank!.publicKey, - form.governedAccount.governance.pubkey, - I80F48.fromNumber(form.maintLeverage), - I80F48.fromNumber(form.initLeverage), - I80F48.fromNumber(form.liquidationFee), - I80F48.fromNumber(form.optUtil), - I80F48.fromNumber(form.optRate), - I80F48.fromNumber(form.maxRate), - optionalBNFromString(form.version) - ) - - serializedInstruction = serializeInstructionToBase64(instruction) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - bufferAddress: yup.number(), - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - }) - - return ( - <> - {/* if you need more fields add theme to interface MangoMakeChangeMaxAccountsForm - then you can add inputs in here */} - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'mangoGroup', - }) - } - error={formErrors['mangoGroup']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'baseSymbol', - }) - } - error={formErrors['baseSymbol']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'maintLeverage', - }) - } - error={formErrors['maintLeverage']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'initLeverage', - }) - } - error={formErrors['initLeverage']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'liquidationFee', - }) - } - error={formErrors['liquidationFee']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'optUtil', - }) - } - error={formErrors['optUtil']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'optRate', - }) - } - error={formErrors['optRate']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'maxRate', - }) - } - error={formErrors['maxRate']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'version', - }) - } - error={formErrors['version']} - /> - - ) -} - -export default MakeChangeSpotMarket diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeCreatePerpMarket.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeCreatePerpMarket.tsx deleted file mode 100644 index fbebb1577b..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeCreatePerpMarket.tsx +++ /dev/null @@ -1,492 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { PublicKey, Transaction } from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - MangoMakeCreatePerpMarketForm, -} from '@utils/uiTypes/proposalCreationTypes' -import { NewProposalContext } from '../../../new' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { Governance, TOKEN_PROGRAM_ID } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import useWalletStore from 'stores/useWalletStore' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import { - BN, - BookSideLayout, - Config, - createAccountInstruction, - I80F48, - makeCreatePerpMarketInstruction, - MangoClient, - PerpEventLayout, - PerpEventQueueHeaderLayout, -} from '@blockworks-foundation/mango-client' -import * as common from '@project-serum/common' -import { AccountType } from '@utils/uiTypes/assets' - -const MakeCreatePerpMarket = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const wallet = useWalletStore((s) => s.current) - const connection = useWalletStore((s) => s.connection.current) - - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: undefined, - programId: programId?.toString(), - mangoGroup: undefined, - oracleAccount: undefined, - baseDecimals: 8, - baseLotSize: 1, - quoteLotSize: 1, - mngoPerPeriod: 250, - maxDepthBps: 1, - lmSizeShift: 0, - makerFee: -0.0003, - takerFee: 0.0004, - maintLeverage: 20, - initLeverage: 10, - liquidationFee: 0.025, - rate: 0.03, - exp: 2, - targetPeriodLength: 3600, - version: 1, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - 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 && - programId && - form.governedAccount?.governance?.account && - form.mangoGroup && - form.oracleAccount && - wallet?.publicKey - ) { - const groupConfig = Config.ids().groups.find((c) => - c.publicKey.equals(new PublicKey(form.mangoGroup!)) - )! - - const oraclePk = new PublicKey(form.oracleAccount) - - const mangoGroup = await new MangoClient( - connection, - groupConfig.mangoProgramId - ).getMangoGroup(groupConfig.publicKey) - - const mngoToken = groupConfig.tokens.filter((token) => { - return token.symbol === 'MNGO' - })[0] - const mngoMintPk = mngoToken.mintKey - - const provider = new common.Provider( - connection, - { ...wallet!, publicKey: wallet!.publicKey! }, - common.Provider.defaultOptions() - ) - const tx = new Transaction() - - const makeEventQueueAccountInstruction = await createAccountInstruction( - connection, - provider.wallet.publicKey, - PerpEventQueueHeaderLayout.span + 256 * PerpEventLayout.span, - groupConfig.mangoProgramId - ) - tx.add(makeEventQueueAccountInstruction.instruction) - - const makeBidAccountInstruction = await createAccountInstruction( - connection, - provider.wallet.publicKey, - BookSideLayout.span, - groupConfig.mangoProgramId - ) - tx.add(makeBidAccountInstruction.instruction) - - const makeAskAccountInstruction = await createAccountInstruction( - connection, - provider.wallet.publicKey, - BookSideLayout.span, - groupConfig.mangoProgramId - ) - tx.add(makeAskAccountInstruction.instruction) - - tx.recentBlockhash = ( - await connection.getLatestBlockhash('max') - ).blockhash - const signers = [ - makeEventQueueAccountInstruction.account, - makeBidAccountInstruction.account, - makeAskAccountInstruction.account, - ] - tx.feePayer = wallet!.publicKey! - tx.partialSign(...signers) - const signed = await wallet?.signTransaction(tx) - const txid = await connection.sendRawTransaction(signed!.serialize()) - console.log('created accounts', txid) - - const [perpMarketPk] = await PublicKey.findProgramAddress( - [ - mangoGroup.publicKey.toBytes(), - new Buffer('PerpMarket', 'utf-8'), - oraclePk.toBytes(), - ], - groupConfig.mangoProgramId - ) - - const [mngoVaultPk] = await PublicKey.findProgramAddress( - [ - perpMarketPk.toBytes(), - TOKEN_PROGRAM_ID.toBytes(), - mngoMintPk.toBytes(), - ], - groupConfig.mangoProgramId - ) - - const instruction = await makeCreatePerpMarketInstruction( - groupConfig.mangoProgramId, - mangoGroup.publicKey, - oraclePk, - perpMarketPk, - makeEventQueueAccountInstruction.account.publicKey, - makeBidAccountInstruction.account.publicKey, - makeAskAccountInstruction.account.publicKey, - mngoMintPk, - mngoVaultPk, - form.governedAccount?.governance?.pubkey, - mangoGroup.signerKey, - I80F48.fromNumber(form.maintLeverage), - I80F48.fromNumber(form.initLeverage), - I80F48.fromNumber(form.liquidationFee), - I80F48.fromNumber(form.makerFee), - I80F48.fromNumber(form.takerFee), - new BN(form.baseLotSize), - new BN(form.quoteLotSize), - I80F48.fromNumber(form.rate), - I80F48.fromNumber(form.maxDepthBps), - new BN(form.targetPeriodLength), - new BN(form.mngoPerPeriod * Math.pow(10, mngoToken.decimals)), - new BN(form.exp), - new BN(form.version), - new BN(form.lmSizeShift), - new BN(form.baseDecimals) - ) - - serializedInstruction = serializeInstructionToBase64(instruction) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - bufferAddress: yup.number(), - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - }) - - const groupConfig = Config.ids().groups.find((c) => - new PublicKey(form.mangoGroup || 0)?.equals(c.publicKey) - )! - - const quoteDecimals = groupConfig?.tokens.find( - (t) => t.symbol == groupConfig?.quoteSymbol - )?.decimals - - const recommendedLmSizeShift = - form.maxDepthBps && - Math.floor(Math.log2((form.maxDepthBps as any) as number) - 3) - - const recommendedMaintLeverage = - form.initLeverage && ((form.initLeverage as any) as number) * 2 - - const recommendedLiquidationFee = - form.initLeverage && 1 / (((form.initLeverage as any) as number) * 4) - - return ( - <> - {/* if you need more fields add theme to interface MangoMakeChangeMaxAccountsForm - then you can add inputs in here */} - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'mangoGroup', - }) - } - error={formErrors['mangoGroup']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'oracleAccount', - }) - } - error={formErrors['oracleAccount']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'baseDecimals', - }) - } - error={formErrors['baseDecimals']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'baseLotSize', - }) - } - error={formErrors['baseLotSize']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'quoteLotSize', - }) - } - error={formErrors['quoteLotSize']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'mngoPerPeriod', - }) - } - error={formErrors['mngoPerPeriod']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'maxDepthBps', - }) - } - error={formErrors['maxDepthBps']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'lmSizeShift', - }) - } - error={formErrors['lmSizeShift']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'makerFee', - }) - } - error={formErrors['makerFee']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'takerFee', - }) - } - error={formErrors['takerFee']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'initLeverage', - }) - } - error={formErrors['initLeverage']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'maintLeverage', - }) - } - error={formErrors['maintLeverage']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'liquidationFee', - }) - } - error={formErrors['liquidationFee']} - /> - - handleSetForm({ - value: evt.target.value, - propertyName: 'rate', - }) - } - error={formErrors['rate']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'exp', - }) - } - error={formErrors['exp']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'targetPeriodLength', - }) - } - error={formErrors['targetPeriodLength']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'version', - }) - } - error={formErrors['version']} - /> - - ) -} - -export default MakeCreatePerpMarket diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeSetMarketMode.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeSetMarketMode.tsx deleted file mode 100644 index 6f49f2d67a..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MakeSetMarketMode.tsx +++ /dev/null @@ -1,234 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { PublicKey } from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - MangoMakeSetMarketModeForm, -} 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 useWalletStore from 'stores/useWalletStore' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import { - IDS, - makeSetMarketModeInstruction, - BN, - Config, -} from '@blockworks-foundation/mango-client' -import { AccountType } from '@utils/uiTypes/assets' -import InstructionForm, { - InstructionInput, - InstructionInputType, -} from '../FormCreator' - -export const ASSET_TYPE = [ - { - name: 'Token', - value: 0, - }, - { - name: 'Perp', - value: 1, - }, -] - -export const MARKET_MODE = [ - { - name: 'Default', - value: 0, - }, - { - name: 'Active', - value: 1, - }, - { - name: 'Close Only', - value: 2, - }, - { - name: 'Force Close Only', - value: 3, - }, - { - name: 'Inactive', - value: 4, - }, - { - name: 'Swapping Spot Market', - value: 5, - }, -] - -const MakeSetMarketMode = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: null, - mangoGroup: null, - marketIndex: null, - adminPk: '', - marketMode: null, - marketType: null, - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - 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 && - programId && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - const groupConfig = Config.ids().groups.find((c) => - c.publicKey.equals(new PublicKey(form.mangoGroup!.value)) - )! - //Mango instruction call and serialize - const addOracleIx = makeSetMarketModeInstruction( - groupConfig.mangoProgramId, - new PublicKey(form.mangoGroup!.value), - new PublicKey(form.adminPk), - new BN(form.marketIndex!.value), - Number(form.marketMode!.value), - Number(form.marketType!.value) - ) - - serializedInstruction = serializeInstructionToBase64(addOracleIx) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - mangoGroup: yup.object().nullable().required('Mango group is required'), - marketIndex: yup.object().nullable().required('Market index is required'), - adminPk: yup.string().required('Admin Pk is required'), - marketMode: yup.object().nullable().required('Market Mode is required'), - marketType: yup.object().nullable().required('Market Type is required'), - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - }) - const getOptionsForMarketIndex = () => { - const currentMangoGroup = IDS.groups.find( - (x) => x.publicKey === form.mangoGroup?.value - )! - return form.mangoGroup && form.marketType - ? currentMangoGroup[ - Number(form.marketType.value) === 0 ? 'spotMarkets' : 'perpMarkets' - ].map((x) => { - return { - name: x.name, - value: x.marketIndex, - } - }) - : [] - } - const inputs: InstructionInput[] = [ - { - label: 'Governance', - initialValue: form.governedAccount, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned as any, - governance: form.governedAccount?.governance, - options: governedProgramAccounts, - }, - { - label: 'Mango group', - initialValue: form.mangoGroup, - type: InstructionInputType.SELECT, - name: 'mangoGroup', - options: IDS.groups.map((x) => { - return { name: x.name, value: x.publicKey } - }), - }, - { - label: 'Market type', - initialValue: form.marketType, - type: InstructionInputType.SELECT, - name: 'marketType', - options: ASSET_TYPE, - }, - { - label: 'Market index', - initialValue: form.marketIndex, - type: InstructionInputType.SELECT, - name: 'marketIndex', - options: getOptionsForMarketIndex(), - }, - { - label: 'Market mode', - initialValue: form.marketMode, - type: InstructionInputType.SELECT, - name: 'marketMode', - options: MARKET_MODE, - }, - { - label: 'Admin PublicKey', - initialValue: form.adminPk, - type: InstructionInputType.INPUT, - name: 'adminPk', - }, - ] - - return ( - <> - {form && ( - - )} - - ) -} - -export default MakeSetMarketMode diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mint.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mint.tsx deleted file mode 100644 index 89b6e22b87..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Mint.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import Input from 'components/inputs/Input' -import useRealm from 'hooks/useRealm' -import { AccountInfo } from '@solana/spl-token' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import { precision } from 'utils/formatting' -import { tryParseKey } from 'tools/validators/pubkey' -import useWalletStore from 'stores/useWalletStore' -import { TokenProgramAccount, tryGetTokenAccount } from '@utils/tokens' -import { UiInstruction, MintForm } from 'utils/uiTypes/proposalCreationTypes' -import { getAccountName } from 'components/instructions/tools' -import { debounce } from 'utils/debounce' -import { NewProposalContext } from '../../new' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import useGovernanceAssets from 'hooks/useGovernanceAssets' -import { getMintSchema } from 'utils/validations' -import GovernedAccountSelect from '../GovernedAccountSelect' -import { getMintInstruction } from 'utils/instructionTools' -import { AccountType } from '@utils/uiTypes/assets' - -const Mint = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const mintGovernancesWithMintInfo = assetAccounts.filter( - (x) => x.type === AccountType.MINT - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - destinationAccount: '', - // No default mint amount - amount: undefined, - mintAccount: undefined, - programId: programId?.toString(), - }) - const wallet = useWalletStore((s) => s.current) - const [governedAccount, setGovernedAccount] = useState< - ProgramAccount | undefined - >(undefined) - const [ - destinationAccount, - setDestinationAccount, - ] = useState | null>(null) - const [formErrors, setFormErrors] = useState({}) - const mintMinAmount = form.mintAccount - ? getMintMinAmountAsDecimal(form.mintAccount.extensions.mint!.account) - : 1 - const currentPrecision = precision(mintMinAmount) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - async function getInstruction(): Promise { - return getMintInstruction({ - schema, - form, - programId, - connection, - wallet, - governedMintInfoAccount: form.mintAccount, - setFormErrors, - }) - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - useEffect(() => { - if (form.destinationAccount) { - debounce.debounceFcn(async () => { - const pubKey = tryParseKey(form.destinationAccount) - if (pubKey) { - const account = await tryGetTokenAccount(connection.current, pubKey) - setDestinationAccount(account ? account : null) - } else { - setDestinationAccount(null) - } - }) - } else { - setDestinationAccount(null) - } - }, [form.destinationAccount]) - useEffect(() => { - handleSetInstructions( - { governedAccount: governedAccount, getInstruction }, - index - ) - }, [form, governedAccount]) - useEffect(() => { - setGovernedAccount(form?.mintAccount?.governance) - }, [form.mintAccount]) - const destinationAccountName = - destinationAccount?.publicKey && - getAccountName(destinationAccount?.account.address) - const schema = getMintSchema({ form, connection }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'mintAccount' }) - }} - value={form.mintAccount} - error={formErrors['mintAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'destinationAccount', - }) - } - error={formErrors['destinationAccount']} - /> - {destinationAccount && ( -
-
Account owner
-
- {destinationAccount.account.owner.toString()} -
-
- )} - {destinationAccountName && ( -
-
Account name
-
{destinationAccountName}
-
- )} - - - ) -} - -export default Mint diff --git a/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/ConfigureCollection.tsx b/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/ConfigureCollection.tsx deleted file mode 100644 index 25c7005dcf..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/ConfigureCollection.tsx +++ /dev/null @@ -1,183 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import useRealm from '@hooks/useRealm' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { NewProposalContext } from '../../../new' -import InstructionForm, { - InstructionInput, - InstructionInputType, -} from '../FormCreator' -import { PublicKey } from '@solana/web3.js' -import { - getNftMaxVoterWeightRecord, - getNftRegistrarPDA, -} from 'NftVotePlugin/sdk/accounts' -import { getValidatedPublickKey } from '@utils/validations' -import { getMintNaturalAmountFromDecimalAsBN } from '@tools/sdk/units' -import { AssetAccount } from '@utils/uiTypes/assets' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -interface ConfigureCollectionForm { - governedAccount: AssetAccount | undefined - weight: number - size: number - collection: string -} - -const ConfigureNftPluginCollection = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { realm, mint } = useRealm() - const nftClient = useVotePluginsClientStore((s) => s.state.nftClient) - const { assetAccounts } = useGovernanceAssets() - const wallet = useWalletStore((s) => s.current) - const shouldBeGoverned = index !== 0 && governance - const [form, setForm] = useState() - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - form!.governedAccount?.governance.pubkey && - wallet?.publicKey - ) { - const weight = getMintNaturalAmountFromDecimalAsBN( - form!.weight, - mint!.decimals - ) - const { registrar } = await getNftRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - nftClient!.program.programId - ) - const { maxVoterWeightRecord } = await getNftMaxVoterWeightRecord( - realm!.pubkey, - realm!.account.communityMint, - nftClient!.program.programId - ) - const configureCollectionIx = await nftClient!.program.methods - .configureCollection(weight, form!.size) - .accounts({ - registrar, - realm: realm!.pubkey, - realmAuthority: realm!.account.authority!, - collection: new PublicKey(form!.collection), - maxVoterWeightRecord: maxVoterWeightRecord, - }) - .instruction() - serializedInstruction = serializeInstructionToBase64( - configureCollectionIx - ) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form!.governedAccount?.governance, - chunkSplitByDefault: true, - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: form?.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - collection: yup - .string() - .test( - 'accountTests', - 'Collection address validation error', - function (val: string) { - if (val) { - try { - return !!getValidatedPublickKey(val) - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Collection address is required`, - }) - } - } - ), - }) - const inputs: InstructionInput[] = [ - { - label: 'Governance', - initialValue: null, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned, - governance: governance, - options: assetAccounts.filter( - (x) => - x.governance.pubkey.toBase58() === - realm?.account.authority?.toBase58() - ), - }, - { - label: 'Collection size', - initialValue: 0, - name: 'size', - inputType: 'number', - type: InstructionInputType.INPUT, - min: 1, - validateMinMax: true, - }, - { - label: 'Collection weight', - initialValue: 1, - name: 'weight', - inputType: 'number', - type: InstructionInputType.INPUT, - min: 0, - validateMinMax: true, - }, - { - label: 'Collection', - initialValue: '', - inputType: 'text', - name: 'collection', - type: InstructionInputType.INPUT, - }, - ] - return ( - <> - - - ) -} - -export default ConfigureNftPluginCollection diff --git a/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/CreateMaxVoterWeightRecord.tsx b/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/CreateMaxVoterWeightRecord.tsx deleted file mode 100644 index 918ce00205..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/CreateMaxVoterWeightRecord.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, - SYSTEM_PROGRAM_ID, -} from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import useRealm from '@hooks/useRealm' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { NewProposalContext } from '../../../new' -import InstructionForm, { - InstructionInput, - InstructionInputType, -} from '../FormCreator' -import { getNftMaxVoterWeightRecord } from 'NftVotePlugin/sdk/accounts' -import { AssetAccount } from '@utils/uiTypes/assets' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -interface CreateNftMaxVoterWeightRecord { - governedAccount: AssetAccount | undefined -} - -const CreateNftPluginMaxVoterWeightRecord = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { realm, realmInfo } = useRealm() - const nftClient = useVotePluginsClientStore((s) => s.state.nftClient) - const { assetAccounts } = useGovernanceAssets() - const wallet = useWalletStore((s) => s.current) - const shouldBeGoverned = index !== 0 && governance - const [form, setForm] = useState() - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - form!.governedAccount?.governance?.account && - wallet?.publicKey - ) { - const { maxVoterWeightRecord } = await getNftMaxVoterWeightRecord( - realm!.pubkey!, - realm!.account.communityMint, - nftClient!.program.programId - ) - const createMaxVoterWeightRecordix = await nftClient!.program.methods - .createMaxVoterWeightRecord() - .accounts({ - maxVoterWeightRecord, - governanceProgramId: realmInfo!.programId, - realm: realm!.pubkey, - realmGoverningTokenMint: realm!.account.communityMint, - payer: wallet.publicKey!, - systemProgram: SYSTEM_PROGRAM_ID, - }) - .instruction() - serializedInstruction = serializeInstructionToBase64( - createMaxVoterWeightRecordix - ) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form!.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: form?.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - }) - const inputs: InstructionInput[] = [ - { - label: 'Governance', - initialValue: null, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned, - governance: governance, - options: assetAccounts.filter( - (x) => - x.governance.pubkey.toBase58() === - realm?.account.authority?.toBase58() - ), - }, - ] - return ( - <> - - - ) -} - -export default CreateNftPluginMaxVoterWeightRecord diff --git a/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/CreateRegistrar.tsx b/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/CreateRegistrar.tsx deleted file mode 100644 index 574670480a..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/NftVotingPlugin/CreateRegistrar.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, - SYSTEM_PROGRAM_ID, -} from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' -import useRealm from '@hooks/useRealm' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { NewProposalContext } from '../../../new' -import InstructionForm, { InstructionInputType } from '../FormCreator' -import { getNftRegistrarPDA } from 'NftVotePlugin/sdk/accounts' -import { AssetAccount } from '@utils/uiTypes/assets' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -interface CreateNftRegistrarForm { - governedAccount: AssetAccount | undefined - maxCollections: number -} - -const CreateNftPluginRegistrar = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { realm, realmInfo } = useRealm() - const nftClient = useVotePluginsClientStore((s) => s.state.nftClient) - const { assetAccounts } = useGovernanceAssets() - const wallet = useWalletStore((s) => s.current) - const shouldBeGoverned = index !== 0 && governance - const [form, setForm] = useState() - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - form!.governedAccount?.governance?.account && - wallet?.publicKey - ) { - const { registrar } = await getNftRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - nftClient!.program.programId - ) - - const createRegistrarIx = await nftClient!.program.methods - .createRegistrar(form!.maxCollections) - .accounts({ - registrar, - realm: realm!.pubkey, - governanceProgramId: realmInfo!.programId, - realmAuthority: realm!.account.authority!, - governingTokenMint: realm!.account.communityMint!, - payer: wallet.publicKey!, - systemProgram: SYSTEM_PROGRAM_ID, - }) - .instruction() - serializedInstruction = serializeInstructionToBase64(createRegistrarIx) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form!.governedAccount?.governance, - chunkSplitByDefault: true, - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: form?.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - }) - const inputs = [ - { - label: 'Governance', - initialValue: null, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned, - governance: governance, - options: assetAccounts.filter( - (x) => - x.governance.pubkey.toBase58() === - realm?.account.authority?.toBase58() - ), - }, - { - label: 'Max collections', - initialValue: 10, - name: 'maxCollections', - type: InstructionInputType.INPUT, - inputType: 'number', - min: 1, - validateMinMax: true, - hide: true, - }, - ] - return ( - <> - - - ) -} - -export default CreateNftPluginRegistrar diff --git a/pages/dao/[symbol]/proposal/components/instructions/RealmConfig.tsx b/pages/dao/[symbol]/proposal/components/instructions/RealmConfig.tsx deleted file mode 100644 index 76a8ba0c47..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/RealmConfig.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import { - createSetRealmConfig, - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../new' -import useRealm from '@hooks/useRealm' -import { parseMintNaturalAmountFromDecimalAsBN } from '@tools/sdk/units' -import { parseMintSupplyFraction } from '@utils/tokens' -import { PublicKey } from '@solana/web3.js' -import { getRealmCfgSchema } from '@utils/validations' -import RealmConfigFormComponent from '../forms/RealmConfigFormComponent' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { AssetAccount } from '@utils/uiTypes/assets' - -export interface RealmConfigForm { - governedAccount: AssetAccount | undefined - minCommunityTokensToCreateGovernance: number - communityVoterWeightAddin: string - removeCouncil: boolean - maxCommunityVoterWeightAddin: string - communityMintSupplyFactor: number -} - -const RealmConfig = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { realm, mint, realmInfo } = useRealm() - const wallet = useWalletStore((s) => s.current) - const shouldBeGoverned = index !== 0 && governance - const { assetAccounts } = useGovernanceAssets() - const realmAuthority = assetAccounts.find( - (x) => - x.governance.pubkey.toBase58() === realm?.account.authority?.toBase58() - ) - const [form, setForm] = useState() - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - form!.governedAccount?.governance?.account && - wallet?.publicKey && - realm - ) { - const mintAmount = parseMintNaturalAmountFromDecimalAsBN( - form!.minCommunityTokensToCreateGovernance!, - mint!.decimals! - ) - const instruction = await createSetRealmConfig( - realmInfo!.programId, - realmInfo!.programVersion!, - realm.pubkey, - realm.account.authority!, - form?.removeCouncil ? undefined : realm?.account.config.councilMint, - parseMintSupplyFraction(form!.communityMintSupplyFactor.toString()), - mintAmount, - form!.communityVoterWeightAddin - ? new PublicKey(form!.communityVoterWeightAddin) - : undefined, - form?.maxCommunityVoterWeightAddin - ? new PublicKey(form.maxCommunityVoterWeightAddin) - : undefined, - wallet.publicKey - ) - serializedInstruction = serializeInstructionToBase64(instruction) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form!.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: form?.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = getRealmCfgSchema({ form }) - - return ( - <> - {realmAuthority && ( - - )} - - ) -} - -export default RealmConfig diff --git a/pages/dao/[symbol]/proposal/components/instructions/Solend/CreateObligationAccount.tsx b/pages/dao/[symbol]/proposal/components/instructions/Solend/CreateObligationAccount.tsx deleted file mode 100644 index 80fe05d8b3..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Solend/CreateObligationAccount.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import * as yup from 'yup' -import { PublicKey } from '@solana/web3.js' -import useRealm from '@hooks/useRealm' -import { createObligationAccount } from '@tools/sdk/solend/createObligationAccount' -import { isFormValid } from '@utils/formValidation' -import { - CreateSolendObligationAccountForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' - -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../../new' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const CreateObligationAccount = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - - // Hardcoded gate used to be clear about what cluster is supported for now - if (connection.cluster !== 'mainnet') { - return <>This instruction does not support {connection.cluster} - } - const { assetAccounts } = useGovernanceAssets() - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({}) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const validateInstruction = async (): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid - } - - async function getInstruction(): Promise { - const isValid = await validateInstruction() - - if ( - !connection || - !isValid || - !programId || - !form.governedAccount?.governance?.account || - !wallet?.publicKey - ) { - return { - serializedInstruction: '', - isValid: false, - governance: form.governedAccount?.governance, - } - } - - const tx = await createObligationAccount({ - fundingAddress: wallet.publicKey, - walletAddress: form.governedAccount.governance.pubkey, - }) - - return { - serializedInstruction: serializeInstructionToBase64(tx), - isValid: true, - governance: form.governedAccount.governance, - } - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: form.governedAccount?.governance, - getInstruction, - }, - index - ) - }, [form]) - - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - }) - - return ( - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - ) -} - -export default CreateObligationAccount diff --git a/pages/dao/[symbol]/proposal/components/instructions/Solend/DepositReserveLiquidityAndObligationCollateral.tsx b/pages/dao/[symbol]/proposal/components/instructions/Solend/DepositReserveLiquidityAndObligationCollateral.tsx deleted file mode 100644 index a36d25b7ae..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Solend/DepositReserveLiquidityAndObligationCollateral.tsx +++ /dev/null @@ -1,179 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import BigNumber from 'bignumber.js' -import * as yup from 'yup' - -import { BN } from '@project-serum/anchor' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import Input from '@components/inputs/Input' -import Select from '@components/inputs/Select' -import useRealm from '@hooks/useRealm' -import SolendConfiguration from '@tools/sdk/solend/configuration' -import { depositReserveLiquidityAndObligationCollateral } from '@tools/sdk/solend/depositReserveLiquidityAndObligationCollateral' -import { isFormValid } from '@utils/formValidation' -import { - DepositReserveLiquidityAndObligationCollateralForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import useWalletStore from 'stores/useWalletStore' -import { NewProposalContext } from '../../../new' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const DepositReserveLiquidityAndObligationCollateral = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - - const { assetAccounts } = useGovernanceAssets() - // Hardcoded gate used to be clear about what cluster is supported for now - if (connection.cluster !== 'mainnet') { - return <>This instruction does not support {connection.cluster} - } - - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [ - form, - setForm, - ] = useState({ - uiAmount: '0', - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const validateInstruction = async (): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid - } - - async function getInstruction(): Promise { - const isValid = await validateInstruction() - - if ( - !connection || - !isValid || - !programId || - !form.governedAccount?.governance?.account || - !wallet?.publicKey || - !form.mintName - ) { - return { - serializedInstruction: '', - isValid: false, - governance: form.governedAccount?.governance, - } - } - - const tx = await depositReserveLiquidityAndObligationCollateral({ - obligationOwner: form.governedAccount.governance.pubkey, - liquidityAmount: new BN( - new BigNumber(form.uiAmount) - .shiftedBy( - SolendConfiguration.getSupportedMintInformation(form.mintName) - .decimals - ) - .toString() - ), - mintName: form.mintName, - }) - - return { - serializedInstruction: serializeInstructionToBase64(tx), - isValid: true, - governance: form.governedAccount.governance, - } - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: form.governedAccount?.governance, - getInstruction, - }, - index - ) - }, [form]) - - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - mintName: yup.string().required('Token Name is required'), - uiAmount: yup - .number() - .moreThan(0, 'Amount should be more than 0') - .required('Amount is required'), - }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - - - handleSetForm({ - value: evt.target.value, - propertyName: 'uiAmount', - }) - } - error={formErrors['uiAmount']} - /> - - ) -} - -export default DepositReserveLiquidityAndObligationCollateral diff --git a/pages/dao/[symbol]/proposal/components/instructions/Solend/InitObligationAccount.tsx b/pages/dao/[symbol]/proposal/components/instructions/Solend/InitObligationAccount.tsx deleted file mode 100644 index 1ddd93869b..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Solend/InitObligationAccount.tsx +++ /dev/null @@ -1,127 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' - -import useRealm from '@hooks/useRealm' -import { initObligationAccount } from '@tools/sdk/solend/initObligationAccount' -import { isFormValid } from '@utils/formValidation' -import { - InitSolendObligationAccountForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../../new' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const InitObligationAccount = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - - const { assetAccounts } = useGovernanceAssets() - - // Hardcoded gate used to be clear about what cluster is supported for now - if (connection.cluster !== 'mainnet') { - return <>This instruction does not support {connection.cluster} - } - - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({}) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const validateInstruction = async (): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid - } - - async function getInstruction(): Promise { - const isValid = await validateInstruction() - - if ( - !connection || - !isValid || - !programId || - !form.governedAccount?.governance?.account || - !wallet?.publicKey - ) { - return { - serializedInstruction: '', - isValid: false, - governance: form.governedAccount?.governance, - } - } - - const tx = await initObligationAccount({ - obligationOwner: form.governedAccount.governance.pubkey, - }) - - return { - serializedInstruction: serializeInstructionToBase64(tx), - isValid: true, - governance: form.governedAccount.governance, - } - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: form.governedAccount?.governance, - getInstruction, - }, - index - ) - }, [form]) - - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - }) - - return ( - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - ) -} - -export default InitObligationAccount diff --git a/pages/dao/[symbol]/proposal/components/instructions/Solend/RefreshObligation.tsx b/pages/dao/[symbol]/proposal/components/instructions/Solend/RefreshObligation.tsx deleted file mode 100644 index bd15c77ecb..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Solend/RefreshObligation.tsx +++ /dev/null @@ -1,147 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import Select from '@components/inputs/Select' -import useRealm from '@hooks/useRealm' -import SolendConfiguration from '@tools/sdk/solend/configuration' -import { refreshObligation } from '@tools/sdk/solend/refreshObligation' -import { isFormValid } from '@utils/formValidation' -import { - RefreshObligationForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../../new' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const RefreshObligation = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - - const { assetAccounts } = useGovernanceAssets() - - // Hardcoded gate used to be clear about what cluster is supported for now - if (connection.cluster !== 'mainnet') { - return <>This instruction does not support {connection.cluster} - } - - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({}) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const validateInstruction = async (): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid - } - - async function getInstruction(): Promise { - const isValid = await validateInstruction() - - if ( - !connection || - !isValid || - !programId || - !form.governedAccount?.governance?.account || - !form.mintName || - !wallet?.publicKey - ) { - return { - serializedInstruction: '', - isValid: false, - governance: form.governedAccount?.governance, - } - } - - const tx = await refreshObligation({ - obligationOwner: form.governedAccount.governance.pubkey, - mintNames: [form.mintName], - }) - - return { - serializedInstruction: serializeInstructionToBase64(tx), - isValid: true, - governance: form.governedAccount.governance, - } - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: form.governedAccount?.governance, - getInstruction, - }, - index - ) - }, [form]) - - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - mintName: yup.string().required('Token Name is required'), - }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - - ) -} - -export default RefreshObligation diff --git a/pages/dao/[symbol]/proposal/components/instructions/Solend/RefreshReserve.tsx b/pages/dao/[symbol]/proposal/components/instructions/Solend/RefreshReserve.tsx deleted file mode 100644 index 9fb4f2d22f..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Solend/RefreshReserve.tsx +++ /dev/null @@ -1,145 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import Select from '@components/inputs/Select' -import useRealm from '@hooks/useRealm' -import SolendConfiguration from '@tools/sdk/solend/configuration' -import { refreshReserve } from '@tools/sdk/solend/refreshReserve' -import { isFormValid } from '@utils/formValidation' -import { - RefreshReserveForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../../new' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const RefreshReserve = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - - const { assetAccounts } = useGovernanceAssets() - const shouldBeGoverned = index !== 0 && governance - - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({}) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - // Hardcoded gate used to be clear about what cluster is supported for now - if (connection.cluster !== 'mainnet') { - return <>This instruction does not support {connection.cluster} - } - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const validateInstruction = async (): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid - } - - async function getInstruction(): Promise { - const isValid = await validateInstruction() - - if ( - !connection || - !isValid || - !programId || - !form.mintName || - !form.governedAccount?.governance.account || - !wallet?.publicKey - ) { - return { - serializedInstruction: '', - isValid: false, - governance: form.governedAccount?.governance, - } - } - - const tx = await refreshReserve({ - mintName: form.mintName, - }) - - return { - serializedInstruction: serializeInstructionToBase64(tx), - isValid: true, - governance: form.governedAccount?.governance, - } - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: form.governedAccount?.governance, - getInstruction, - }, - index - ) - }, [form]) - - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - mintName: yup.string().required('Token Name is required'), - }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - ) -} - -export default RefreshReserve diff --git a/pages/dao/[symbol]/proposal/components/instructions/Solend/WithdrawObligationCollateralAndRedeemReserveLiquidity.tsx b/pages/dao/[symbol]/proposal/components/instructions/Solend/WithdrawObligationCollateralAndRedeemReserveLiquidity.tsx deleted file mode 100644 index e0d182d357..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Solend/WithdrawObligationCollateralAndRedeemReserveLiquidity.tsx +++ /dev/null @@ -1,196 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -import Input from '@components/inputs/Input' -import BigNumber from 'bignumber.js' -import * as yup from 'yup' -import { BN } from '@project-serum/anchor' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import Select from '@components/inputs/Select' -import useRealm from '@hooks/useRealm' -import SolendConfiguration from '@tools/sdk/solend/configuration' -import { withdrawObligationCollateralAndRedeemReserveLiquidity } from '@tools/sdk/solend/withdrawObligationCollateralAndRedeemReserveLiquidity' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - WithdrawObligationCollateralAndRedeemReserveLiquidityForm, -} from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import { NewProposalContext } from '../../../new' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import useGovernanceAssets from '@hooks/useGovernanceAssets' - -const WithdrawObligationCollateralAndRedeemReserveLiquidity = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - - // Hardcoded gate used to be clear about what cluster is supported for now - if (connection.cluster !== 'mainnet') { - return <>This instruction does not support {connection.cluster} - } - - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [ - form, - setForm, - ] = useState({ - uiAmount: '0', - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - - const validateInstruction = async (): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid - } - - async function getInstruction(): Promise { - const isValid = await validateInstruction() - - if ( - !connection || - !isValid || - !programId || - !form.governedAccount?.governance?.account || - !wallet?.publicKey || - !form.mintName - ) { - return { - serializedInstruction: '', - isValid: false, - governance: form.governedAccount?.governance, - } - } - - const tx = await withdrawObligationCollateralAndRedeemReserveLiquidity({ - obligationOwner: form.governedAccount.governance.pubkey, - liquidityAmount: new BN( - new BigNumber(form.uiAmount) - .shiftedBy( - SolendConfiguration.getSupportedMintInformation(form.mintName) - .decimals - ) - .toString() - ), - mintName: form.mintName, - ...(form.destinationLiquidity && { - destinationLiquidity: new PublicKey(form.destinationLiquidity), - }), - }) - - return { - serializedInstruction: serializeInstructionToBase64(tx), - isValid: true, - governance: form.governedAccount.governance, - } - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: form.governedAccount?.governance, - getInstruction, - }, - index - ) - }, [form]) - - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - mintName: yup.string().required('Token Name is required'), - uiAmount: yup - .number() - .moreThan(0, 'Amount should be more than 0') - .required('Amount is required'), - }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={form.governedAccount} - error={formErrors['governedAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - /> - - - - - handleSetForm({ - value: evt.target.value, - propertyName: 'uiAmount', - }) - } - error={formErrors['uiAmount']} - /> - - - handleSetForm({ - value: evt.target.value, - propertyName: 'destinationLiquidity', - }) - } - error={formErrors['destinationLiquidity']} - /> - - ) -} - -export default WithdrawObligationCollateralAndRedeemReserveLiquidity diff --git a/pages/dao/[symbol]/proposal/components/instructions/SplTokenTransfer.tsx b/pages/dao/[symbol]/proposal/components/instructions/SplTokenTransfer.tsx deleted file mode 100644 index bed7b35bed..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/SplTokenTransfer.tsx +++ /dev/null @@ -1,200 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import Input from '@components/inputs/Input' -import useRealm from '@hooks/useRealm' -import { AccountInfo } from '@solana/spl-token' -import { getMintMinAmountAsDecimal } from '@tools/sdk/units' -import { PublicKey } from '@solana/web3.js' -import { precision } from '@utils/formatting' -import { tryParseKey } from '@tools/validators/pubkey' -import useWalletStore from 'stores/useWalletStore' -import { TokenProgramAccount, tryGetTokenAccount } from '@utils/tokens' -import { - SplTokenTransferForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import { getAccountName } from '@components/instructions/tools' -import { debounce } from '@utils/debounce' -import { NewProposalContext } from '../../new' -import { getTokenTransferSchema } 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 { - getSolTransferInstruction, - getTransferInstruction, -} from '@utils/instructionTools' - -const SplTokenTransfer = ({ - 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({ - destinationAccount: '', - // No default transfer amount - amount: undefined, - governedTokenAccount: undefined, - programId: programId?.toString(), - mintInfo: undefined, - }) - const [governedAccount, setGovernedAccount] = useState< - ProgramAccount | undefined - >(undefined) - const [ - destinationAccount, - setDestinationAccount, - ] = useState | null>(null) - const [formErrors, setFormErrors] = useState({}) - const mintMinAmount = form.mintInfo - ? getMintMinAmountAsDecimal(form.mintInfo) - : 1 - const currentPrecision = precision(mintMinAmount) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const setMintInfo = (value) => { - setForm({ ...form, mintInfo: value }) - } - const setAmount = (event) => { - const value = event.target.value - handleSetForm({ - value: value, - propertyName: 'amount', - }) - } - const validateAmountOnBlur = () => { - const value = form.amount - - handleSetForm({ - value: parseFloat( - Math.max( - Number(mintMinAmount), - Math.min(Number(Number.MAX_SAFE_INTEGER), Number(value)) - ).toFixed(currentPrecision) - ), - propertyName: 'amount', - }) - } - async function getInstruction(): Promise { - return !form.governedTokenAccount?.isSol - ? getTransferInstruction({ - schema, - form, - programId, - connection, - wallet, - currentAccount: form.governedTokenAccount || null, - setFormErrors, - }) - : getSolTransferInstruction({ - schema, - form, - programId, - connection, - wallet, - currentAccount: form.governedTokenAccount || null, - setFormErrors, - }) - } - - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - useEffect(() => { - if (form.destinationAccount) { - debounce.debounceFcn(async () => { - const pubKey = tryParseKey(form.destinationAccount) - if (pubKey) { - const account = await tryGetTokenAccount(connection.current, pubKey) - setDestinationAccount(account ? account : null) - } else { - setDestinationAccount(null) - } - }) - } else { - setDestinationAccount(null) - } - }, [form.destinationAccount]) - useEffect(() => { - handleSetInstructions( - { governedAccount: governedAccount, getInstruction }, - index - ) - }, [form]) - useEffect(() => { - setGovernedAccount(form.governedTokenAccount?.governance) - setMintInfo(form.governedTokenAccount?.extensions.mint?.account) - }, [form.governedTokenAccount]) - const destinationAccountName = - destinationAccount?.publicKey && - getAccountName(destinationAccount?.account.address) - const schema = getTokenTransferSchema({ form, connection }) - - return ( - <> - { - handleSetForm({ value, propertyName: 'governedTokenAccount' }) - }} - value={form.governedTokenAccount} - error={formErrors['governedTokenAccount']} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: 'destinationAccount', - }) - } - error={formErrors['destinationAccount']} - /> - {destinationAccount && ( -
-
Account owner
-
- {destinationAccount.account.owner.toString()} -
-
- )} - {destinationAccountName && ( -
-
Account name
-
{destinationAccountName}
-
- )} - - - ) -} - -export default SplTokenTransfer diff --git a/pages/dao/[symbol]/proposal/components/instructions/Switchboard/AdmitOracle.tsx b/pages/dao/[symbol]/proposal/components/instructions/Switchboard/AdmitOracle.tsx deleted file mode 100644 index 5eabae47b3..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Switchboard/AdmitOracle.tsx +++ /dev/null @@ -1,160 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import { - ProgramAccount, - serializeInstructionToBase64, - Governance, - getGovernance, -} from '@solana/spl-governance' -import { SwitchboardAdmitOracleForm } from '@utils/uiTypes/proposalCreationTypes' -import { PublicKey } from '@solana/web3.js' -import Input from '@components/inputs/Input' -import * as sbv2 from '@switchboard-xyz/switchboard-v2' -import useWalletStore from 'stores/useWalletStore' -import * as anchor from '@project-serum/anchor' -import sbIdl from 'SwitchboardVotePlugin/switchboard_v2.json' -import gonIdl from 'SwitchboardVotePlugin/gameofnodes.json' -import { - SWITCHBOARD_ID, - SWITCHBOARD_ADDIN_ID, - SWITCHBOARD_GRANT_AUTHORITY, - grantPermissionTx, -} from 'SwitchboardVotePlugin/SwitchboardQueueVoterClient' -import { NewProposalContext } from '../../../new' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' - -const SwitchboardAdmitOracle = ({ - index, - _governance, -}: { - index: number - _governance: ProgramAccount | null -}) => { - const [form, setForm] = useState({ - oraclePubkey: undefined, - queuePubkey: undefined, - }) - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { handleSetInstructions } = useContext(NewProposalContext) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: SWITCHBOARD_GRANT_AUTHORITY, - getInstruction, - }, - index - ) - }, [form]) - - async function getInstruction(): Promise { - const options = anchor.AnchorProvider.defaultOptions() - const provider = new anchor.AnchorProvider( - connection.current, - (wallet as unknown) as anchor.Wallet, - options - ) - - const switchboardProgram = new anchor.Program( - sbIdl as anchor.Idl, - SWITCHBOARD_ID, - provider - ) - - const addinProgram = new anchor.Program( - gonIdl as anchor.Idl, - SWITCHBOARD_ADDIN_ID, - provider - ) - - const [addinState] = await PublicKey.findProgramAddress( - [Buffer.from('state')], - addinProgram.programId - ) - - let qPk - if (form === undefined) { - qPk = PublicKey.default - } else { - qPk = form.queuePubkey - } - let oPk - if (form === undefined) { - oPk = PublicKey.default - } else { - oPk = form.oraclePubkey - } - const p = sbv2.PermissionAccount.fromSeed( - switchboardProgram, - addinState, - new PublicKey(qPk), - new PublicKey(oPk) - )[0] - console.log('P:') - console.log(p) - - const grantTx = await grantPermissionTx( - addinProgram, - SWITCHBOARD_GRANT_AUTHORITY, - SWITCHBOARD_ID, - p.publicKey - ) - - const gov = await getGovernance( - connection.current, - SWITCHBOARD_GRANT_AUTHORITY - ) - return { - serializedInstruction: serializeInstructionToBase64( - grantTx.instructions[0] - ), - isValid: true, - governance: gov, - } - } - - return ( - <> - { - let oPk - if (form === undefined) { - oPk = PublicKey.default - } else { - oPk = form.oraclePubkey - } - return oPk - })()} - onChange={(text) => { - setForm({ - ...form, - ['oraclePubkey']: new PublicKey(text.target.value), - }) - }} - /> - { - let qPk - if (form === undefined) { - qPk = PublicKey.default - } else { - qPk = form.queuePubkey - } - return qPk - })()} - onChange={(text) => { - setForm({ - ...form, - ['queuePubkey']: new PublicKey(text.target.value), - }) - }} - /> - - ) -} - -export default SwitchboardAdmitOracle diff --git a/pages/dao/[symbol]/proposal/components/instructions/Switchboard/RevokeOracle.tsx b/pages/dao/[symbol]/proposal/components/instructions/Switchboard/RevokeOracle.tsx deleted file mode 100644 index d78c76f557..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Switchboard/RevokeOracle.tsx +++ /dev/null @@ -1,151 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import React, { useContext, useEffect, useState } from 'react' -//import { ForesightHasMarketId } from '@utils/uiTypes/proposalCreationTypes' -import { - ProgramAccount, - serializeInstructionToBase64, - Governance, - getGovernance, -} from '@solana/spl-governance' -/*import { - governance as foresightGov, - utils, - consts, -} from '@foresight-tmp/foresight-sdk'*/ -import { SwitchboardRevokeOracleForm } from '@utils/uiTypes/proposalCreationTypes' -import { PublicKey } from '@solana/web3.js' -import Input from '@components/inputs/Input' -import * as sbv2 from '@switchboard-xyz/switchboard-v2' -import useWalletStore from 'stores/useWalletStore' -import * as anchor from '@project-serum/anchor' -import sbIdl from 'SwitchboardVotePlugin/switchboard_v2.json' -import gonIdl from 'SwitchboardVotePlugin/gameofnodes.json' -import { - SWITCHBOARD_ID, - SWITCHBOARD_ADDIN_ID, - SWITCHBOARD_REVOKE_AUTHORITY, - revokePermissionTx, -} from 'SwitchboardVotePlugin/SwitchboardQueueVoterClient' -import { NewProposalContext } from '../../../new' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' - -const SwitchboardRevokeOracle = ({ - index, - _governance, -}: { - index: number - _governance: ProgramAccount | null -}) => { - const [form, setForm] = useState({ - oraclePubkey: undefined, - queuePubkey: undefined, - }) - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { handleSetInstructions } = useContext(NewProposalContext) - - useEffect(() => { - handleSetInstructions( - { - governedAccount: SWITCHBOARD_REVOKE_AUTHORITY, - getInstruction, - }, - index - ) - }, [form]) - - async function getInstruction(): Promise { - const options = anchor.AnchorProvider.defaultOptions() - const provider = new anchor.AnchorProvider( - connection.current, - (wallet as unknown) as anchor.Wallet, - options - ) - - const switchboardProgram = new anchor.Program( - sbIdl as anchor.Idl, - SWITCHBOARD_ID, - provider - ) - - const addinProgram = new anchor.Program( - gonIdl as anchor.Idl, - SWITCHBOARD_ADDIN_ID, - provider - ) - - const [addinState] = await PublicKey.findProgramAddress( - [Buffer.from('state')], - addinProgram.programId - ) - - let qPk - if (form === undefined) { - qPk = PublicKey.default - } else { - qPk = form.queuePubkey - } - let oPk - if (form === undefined) { - oPk = PublicKey.default - } else { - oPk = form.oraclePubkey - } - - const p = sbv2.PermissionAccount.fromSeed( - switchboardProgram, - addinState, - new PublicKey(qPk), - new PublicKey(oPk) - )[0] - - const revokeTx = await revokePermissionTx( - addinProgram, - SWITCHBOARD_REVOKE_AUTHORITY, - SWITCHBOARD_ID, - p.publicKey - ) - - const gov = await getGovernance( - connection.current, - SWITCHBOARD_REVOKE_AUTHORITY - ) - return { - serializedInstruction: serializeInstructionToBase64( - revokeTx.instructions[0] - ), - isValid: true, - governance: gov, - } - } - - return ( - <> - { - setForm({ - ...form, - ['oraclePubkey']: new PublicKey(text.target.value), - }) - //setGovernance(); - }} - /> - { - setForm({ - ...form, - ['queuePubkey']: new PublicKey(text.target.value), - }) - }} - /> - - ) -} - -export default SwitchboardRevokeOracle diff --git a/pages/dao/[symbol]/proposal/components/instructions/Vsr/CreateRegistrar.tsx b/pages/dao/[symbol]/proposal/components/instructions/Vsr/CreateRegistrar.tsx deleted file mode 100644 index e43fc381f3..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Vsr/CreateRegistrar.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, - SYSTEM_PROGRAM_ID, -} from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' -import useRealm from '@hooks/useRealm' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import { NewProposalContext } from '../../../new' -import InstructionForm, { InstructionInputType } from '../FormCreator' -import { AssetAccount } from '@utils/uiTypes/assets' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { SYSVAR_RENT_PUBKEY } from '@solana/web3.js' -import { getRegistrarPDA } from 'VoteStakeRegistry/sdk/accounts' - -interface CreateVsrRegistrarForm { - governedAccount: AssetAccount | undefined -} - -const CreateVsrRegistrar = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { realm, realmInfo } = useRealm() - const vsrClient = useVotePluginsClientStore((s) => s.state.vsrClient) - const { assetAccounts } = useGovernanceAssets() - const wallet = useWalletStore((s) => s.current) - const shouldBeGoverned = index !== 0 && governance - const [form, setForm] = useState() - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - form!.governedAccount?.governance?.account && - wallet?.publicKey - ) { - const { registrar, registrarBump } = await getRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - vsrClient!.program.programId - ) - - const createRegistrarIx = await vsrClient!.program.methods - .createRegistrar(registrarBump) - .accounts({ - registrar, - realm: realm!.pubkey, - governanceProgramId: realmInfo!.programId, - realmAuthority: realm!.account.authority!, - realmGoverningTokenMint: realm!.account.communityMint!, - payer: wallet.publicKey!, - systemProgram: SYSTEM_PROGRAM_ID, - rent: SYSVAR_RENT_PUBKEY, - }) - .instruction() - serializedInstruction = serializeInstructionToBase64(createRegistrarIx) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form!.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: form?.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - }) - const inputs = [ - { - label: 'Governance', - initialValue: null, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned, - governance: governance, - options: assetAccounts.filter( - (x) => - x.governance.pubkey.toBase58() === - realm?.account.authority?.toBase58() - ), - }, - ] - return ( - <> - - - ) -} - -export default CreateVsrRegistrar diff --git a/pages/dao/[symbol]/proposal/components/instructions/Vsr/VotingMintConfig.tsx b/pages/dao/[symbol]/proposal/components/instructions/Vsr/VotingMintConfig.tsx deleted file mode 100644 index 011fff0179..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Vsr/VotingMintConfig.tsx +++ /dev/null @@ -1,261 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, - //serializeInstructionToBase64, -} from '@solana/spl-governance' -import { validateInstruction } from '@utils/instructionTools' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' - -import useWalletStore from 'stores/useWalletStore' - -import useRealm from '@hooks/useRealm' -import { NewProposalContext } from '../../../new' -import InstructionForm, { - InstructionInput, - InstructionInputType, -} from '../FormCreator' -import { getValidatedPublickKey } from '@utils/validations' -import { AssetAccount } from '@utils/uiTypes/assets' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { getScaledFactor } from '@utils/tokens' -import { yearsToSecs } from 'VoteStakeRegistry/tools/dateTools' -import { BN } from '@project-serum/anchor' -import { PublicKey } from '@solana/web3.js' -import { - emptyPk, - getRegistrarPDA, - Registrar, -} from 'VoteStakeRegistry/sdk/accounts' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' - -interface ConfigureCollectionForm { - governedAccount: AssetAccount | undefined - mint: string - mintIndex: number - grantAuthority: AssetAccount | undefined - mintDigitShift: number - mintUnlockedFactor: number - mintLockupFactor: number - mintLockupSaturation: number -} - -const VotingMintConfig = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const { realm } = useRealm() - const vsrClient = useVotePluginsClientStore((s) => s.state.vsrClient) - const { assetAccounts } = useGovernanceAssets() - const wallet = useWalletStore((s) => s.current) - const shouldBeGoverned = index !== 0 && governance - const [form, setForm] = useState() - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - form && - form!.governedAccount?.governance.pubkey && - wallet?.publicKey - ) { - const digitShift = form.mintDigitShift - const unlockedScaledFactor = getScaledFactor(form.mintUnlockedFactor) - const lockupScaledFactor = getScaledFactor(form.mintLockupFactor) - const lockupSaturationSecs = new BN( - yearsToSecs(form.mintLockupSaturation).toString() - ) - const mint = new PublicKey(form.mint) - const mintIndex = form.mintIndex - const grantAuthority = form.grantAuthority!.governance.pubkey - const { registrar } = await getRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - vsrClient!.program.programId! - ) - let remainingAccounts = [ - { - pubkey: mint, - isSigner: false, - isWritable: false, - }, - ] - - try { - // If we can fetch the registrar then use it for the additional mint configs - // Note: The registrar might not exist if we are setting this for the first time in a single proposal - // In that case we default to 0 existing mints - const registrarAcc = (await vsrClient?.program.account.registrar.fetch( - registrar - )) as Registrar - - const registrarMints = registrarAcc?.votingMints - .filter((vm) => !vm.mint.equals(new PublicKey(emptyPk))) - .map((vm) => { - return { - pubkey: vm.mint, - isSigner: false, - isWritable: false, - } - }) - - remainingAccounts = remainingAccounts.concat(registrarMints) - } catch (ex) { - console.info("Can't fetch registrar", ex) - } - const configureCollectionIx = await vsrClient!.program.methods - .configureVotingMint( - mintIndex, // mint index - digitShift, // digit_shift - unlockedScaledFactor, // unlocked_scaled_factor - lockupScaledFactor, // lockup_scaled_factor - lockupSaturationSecs, // lockup_saturation_secs - grantAuthority! // grant_authority) - ) - .accounts({ - registrar, - realmAuthority: realm!.account.authority, - mint, - }) - .remainingAccounts(remainingAccounts) - .instruction() - serializedInstruction = serializeInstructionToBase64( - configureCollectionIx - ) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form!.governedAccount?.governance, - chunkSplitByDefault: true, - } - return obj - } - useEffect(() => { - handleSetInstructions( - { governedAccount: form?.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - grantAuthority: yup - .object() - .nullable() - .required('Grant authority is required'), - mint: yup - .string() - .test( - 'accountTests', - 'mint address validation error', - function (val: string) { - if (val) { - try { - return !!getValidatedPublickKey(val) - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `mint address is required`, - }) - } - } - ), - }) - const inputs: InstructionInput[] = [ - { - label: 'Governance', - initialValue: null, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned, - governance: governance, - options: assetAccounts.filter( - (x) => - x.governance.pubkey.toBase58() === - realm?.account.authority?.toBase58() - ), - }, - { - label: 'mint', - initialValue: realm?.account.communityMint.toBase58() || '', - inputType: 'text', - name: 'mint', - type: InstructionInputType.INPUT, - }, - { - label: 'mint index', - initialValue: 0, - min: 0, - inputType: 'number', - name: 'mintIndex', - type: InstructionInputType.INPUT, - }, - { - label: 'Grant authority (Governance)', - initialValue: null, - name: 'grantAuthority', - type: InstructionInputType.GOVERNED_ACCOUNT, - options: assetAccounts.filter((x) => x.isToken || x.isSol || x.isNft), - }, - { - label: 'mint digit shift', - initialValue: 0, - min: 0, - inputType: 'number', - name: 'mintDigitShift', - type: InstructionInputType.INPUT, - }, - { - label: 'mint unlocked factor', - initialValue: 0, - min: 0, - inputType: 'number', - name: 'mintUnlockedFactor', - type: InstructionInputType.INPUT, - }, - { - label: 'mint lockup factor', - initialValue: 0, - min: 0, - inputType: 'number', - name: 'mintLockupFactor', - type: InstructionInputType.INPUT, - }, - { - label: 'mint lockup saturation (years)', - initialValue: 0, - min: 0, - inputType: 'number', - name: 'mintLockupSaturation', - type: InstructionInputType.INPUT, - }, - ] - return ( - <> - - - ) -} - -export default VotingMintConfig diff --git a/pages/dao/[symbol]/proposal/components/instructions/bpfUpgradeableLoader/ProgramUpgrade.tsx b/pages/dao/[symbol]/proposal/components/instructions/bpfUpgradeableLoader/ProgramUpgrade.tsx deleted file mode 100644 index 5f8800830d..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/bpfUpgradeableLoader/ProgramUpgrade.tsx +++ /dev/null @@ -1,214 +0,0 @@ -import React, { useContext, useEffect, useState } from 'react' -import useRealm from '@hooks/useRealm' -import { PublicKey } from '@solana/web3.js' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { - UiInstruction, - ProgramUpgradeForm, - programUpgradeFormNameOf, -} 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 useWalletStore from 'stores/useWalletStore' -import { createUpgradeInstruction } from '@tools/sdk/bpfUpgradeableLoader/createUpgradeInstruction' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import Input from '@components/inputs/Input' -import { debounce } from '@utils/debounce' -import { validateAccount, validateBuffer } from '@utils/validations' -import GovernedAccountSelect from '../../GovernedAccountSelect' -import { validateInstruction } from '@utils/instructionTools' -import ProgramUpgradeInfo from './ProgramUpgradeInfo' -import { AccountType } from '@utils/uiTypes/assets' - -const ProgramUpgrade = ({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) => { - const connection = useWalletStore((s) => s.connection) - const wallet = useWalletStore((s) => s.current) - const { realmInfo } = useRealm() - const { assetAccounts } = useGovernanceAssets() - const governedProgramAccounts = assetAccounts.filter( - (x) => x.type === AccountType.PROGRAM - ) - const shouldBeGoverned = index !== 0 && governance - const programId: PublicKey | undefined = realmInfo?.programId - const [form, setForm] = useState({ - governedAccount: undefined, - programId: programId?.toString(), - bufferAddress: '', - bufferSpillAddress: wallet?.publicKey?.toBase58(), - }) - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - async function getInstruction(): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - if ( - isValid && - programId && - form.governedAccount?.governance?.account && - wallet?.publicKey - ) { - const bufferSpillAddress = form.bufferSpillAddress - ? new PublicKey(form.bufferSpillAddress) - : wallet.publicKey - - const upgradeIx = await createUpgradeInstruction( - form.governedAccount.governance.account.governedAccount, - new PublicKey(form.bufferAddress), - form.governedAccount.governance.pubkey, - bufferSpillAddress - ) - serializedInstruction = serializeInstructionToBase64(upgradeIx) - } - const obj: UiInstruction = { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } - return obj - } - useEffect(() => { - handleSetForm({ - propertyName: programUpgradeFormNameOf('programId'), - value: programId?.toString(), - }) - }, [realmInfo?.programId]) - - useEffect(() => { - handleSetForm({ - propertyName: programUpgradeFormNameOf('bufferSpillAddress'), - value: wallet?.publicKey?.toBase58(), - }) - }, [wallet?.publicKey?.toBase58()]) - - useEffect(() => { - if (form.bufferAddress) { - debounce.debounceFcn(async () => { - const { validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - }) - } - }, [form.bufferAddress]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) - - const schema = yup.object().shape({ - bufferAddress: yup - .string() - .test('bufferTest', 'Invalid buffer', async function (val: string) { - if (val) { - try { - await validateBuffer( - connection, - val, - form.governedAccount?.governance?.pubkey - ) - return true - } catch (e) { - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Buffer address is required`, - }) - } - }), - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - - bufferSpillAddress: yup - .string() - .test( - 'bufferSpillAddressTest', - 'Invalid buffer spill address', - async function (val: string) { - if (val) { - try { - await validateAccount(connection, val) - return true - } catch (ex) { - return this.createError({ - message: `${ex}`, - }) - } - return true - } else { - return this.createError({ - message: `Buffer spill address is required`, - }) - } - } - ), - }) - - return ( - <> - { - handleSetForm({ - value, - propertyName: programUpgradeFormNameOf('governedAccount'), - }) - }} - value={form.governedAccount} - error={formErrors[programUpgradeFormNameOf('governedAccount')]} - shouldBeGoverned={shouldBeGoverned} - governance={governance} - > - - handleSetForm({ - value: evt.target.value, - propertyName: programUpgradeFormNameOf('bufferAddress'), - }) - } - error={formErrors[programUpgradeFormNameOf('bufferAddress')]} - /> - - - - - handleSetForm({ - value: evt.target.value, - propertyName: programUpgradeFormNameOf('bufferSpillAddress'), - }) - } - error={formErrors[programUpgradeFormNameOf('bufferSpillAddress')]} - /> - - ) -} - -export default ProgramUpgrade diff --git a/pages/dao/[symbol]/proposal/components/instructions/bpfUpgradeableLoader/ProgramUpgradeInfo.tsx b/pages/dao/[symbol]/proposal/components/instructions/bpfUpgradeableLoader/ProgramUpgradeInfo.tsx deleted file mode 100644 index 897a856f77..0000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/bpfUpgradeableLoader/ProgramUpgradeInfo.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { PublicKey } from '@solana/web3.js' -import CommandLineInfo from '../../ComandLineInfo' - -export default function ProgramUpgradeInfo({ - governancePk, -}: { - governancePk: PublicKey | undefined -}) { - if (!governancePk) { - return null - } - - return ( -
-
-

Upgrade authority

- -
- -
-

Solana CLI

- -
- `} - /> -
- ) -} diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx deleted file mode 100644 index 520b4f7575..0000000000 --- a/pages/dao/[symbol]/proposal/new.tsx +++ /dev/null @@ -1,686 +0,0 @@ -import Link from 'next/link' -import { useRouter } from 'next/router' -import React, { createContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { - ArrowLeftIcon, - PlusCircleIcon, - XCircleIcon, -} from '@heroicons/react/outline' -import { - getInstructionDataFromBase64, - Governance, - ProgramAccount, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import Button, { LinkButton, SecondaryButton } from '@components/Button' -import Input from '@components/inputs/Input' -import Select from '@components/inputs/Select' -import Textarea from '@components/inputs/Textarea' -import TokenBalanceCardWrapper from '@components/TokenBalance/TokenBalanceCardWrapper' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import useQueryContext from '@hooks/useQueryContext' -import useRealm from '@hooks/useRealm' -import { getTimestampFromDays } from '@tools/sdk/units' -import { formValidation, isFormValid } from '@utils/formValidation' -import { - ComponentInstructionData, - Instructions, - InstructionsContext, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import useWalletStore from 'stores/useWalletStore' -import { notify } from 'utils/notifications' -import Clawback from 'VoteStakeRegistry/components/instructions/Clawback' -import Grant from 'VoteStakeRegistry/components/instructions/Grant' -import InstructionContentContainer from './components/InstructionContentContainer' -import ProgramUpgrade from './components/instructions/bpfUpgradeableLoader/ProgramUpgrade' -import CreateAssociatedTokenAccount from './components/instructions/CreateAssociatedTokenAccount' -import CustomBase64 from './components/instructions/CustomBase64' -import Empty from './components/instructions/Empty' -import MakeChangeMaxAccounts from './components/instructions/Mango/MakeChangeMaxAccounts' -import MakeChangeReferralFeeParams from './components/instructions/Mango/MakeChangeReferralFeeParams' -import Mint from './components/instructions/Mint' -import CreateObligationAccount from './components/instructions/Solend/CreateObligationAccount' -import DepositReserveLiquidityAndObligationCollateral from './components/instructions/Solend/DepositReserveLiquidityAndObligationCollateral' -import InitObligationAccount from './components/instructions/Solend/InitObligationAccount' -import RefreshObligation from './components/instructions/Solend/RefreshObligation' -import RefreshReserve from './components/instructions/Solend/RefreshReserve' -import WithdrawObligationCollateralAndRedeemReserveLiquidity from './components/instructions/Solend/WithdrawObligationCollateralAndRedeemReserveLiquidity' -import SplTokenTransfer from './components/instructions/SplTokenTransfer' -import VoteBySwitch from './components/VoteBySwitch' -import FriktionDeposit from './components/instructions/Friktion/FriktionDeposit' -import CreateNftPluginRegistrar from './components/instructions/NftVotingPlugin/CreateRegistrar' -import CreateNftPluginMaxVoterWeightRecord from './components/instructions/NftVotingPlugin/CreateMaxVoterWeightRecord' -import ConfigureNftPluginCollection from './components/instructions/NftVotingPlugin/ConfigureCollection' -import SwitchboardAdmitOracle from './components/instructions/Switchboard/AdmitOracle' -import SwitchboardRevokeOracle from './components/instructions/Switchboard/RevokeOracle' -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' -import MakeChangeSpotMarket from './components/instructions/Mango/MakeChangeSpotMarket' -import MakeCreatePerpMarket from './components/instructions/Mango/MakeCreatePerpMarket' -import useCreateProposal from '@hooks/useCreateProposal' -import CastleDeposit from './components/instructions/Castle/CastleDeposit' -import MakeInitMarketParams from './components/instructions/Foresight/MakeInitMarketParams' -import MakeInitMarketListParams from './components/instructions/Foresight/MakeInitMarketListParams' -import MakeInitCategoryParams from './components/instructions/Foresight/MakeInitCategoryParams' -import MakeResolveMarketParams from './components/instructions/Foresight/MakeResolveMarketParams' -import MakeAddMarketListToCategoryParams from './components/instructions/Foresight/MakeAddMarketListToCategoryParams' -import RealmConfig from './components/instructions/RealmConfig' -import MakeSetMarketMetadataParams from './components/instructions/Foresight/MakeSetMarketMetadataParams' -import CloseTokenAccount from './components/instructions/CloseTokenAccount' -import { InstructionDataWithHoldUpTime } from 'actions/createProposal' -import CastleWithdraw from './components/instructions/Castle/CastleWithdraw' -import ChangeDonation from './components/instructions/Change/ChangeDonation' -import VotingMintConfig from './components/instructions/Vsr/VotingMintConfig' -import CreateVsrRegistrar from './components/instructions/Vsr/CreateRegistrar' -import GoblinGoldDeposit from './components/instructions/GoblinGold/GoblinGoldDeposit' -import GoblinGoldWithdraw from './components/instructions/GoblinGold/GoblinGoldWithdraw' -import MakeSetMarketMode from './components/instructions/Mango/MakeSetMarketMode' - -const schema = yup.object().shape({ - title: yup.string().required('Title is required'), -}) -const defaultGovernanceCtx: InstructionsContext = { - instructionsData: [], - handleSetInstructions: () => null, - governance: null, - setGovernance: () => null, -} -export const NewProposalContext = createContext( - defaultGovernanceCtx -) - -// Takes the first encountered governance account -function extractGovernanceAccountFromInstructionsData( - instructionsData: ComponentInstructionData[] -): ProgramAccount | null { - return ( - instructionsData.find((itx) => itx.governedAccount)?.governedAccount ?? null - ) -} - -const New = () => { - const router = useRouter() - const { handleCreateProposal } = useCreateProposal() - const { fmtUrlWithCluster } = useQueryContext() - const { symbol, realm, realmDisplayName, canChooseWhoVote } = useRealm() - - const { getAvailableInstructions } = useGovernanceAssets() - const availableInstructions = getAvailableInstructions() - const { fetchRealmGovernance } = useWalletStore((s) => s.actions) - const [voteByCouncil, setVoteByCouncil] = useState(false) - const [form, setForm] = useState({ - title: '', - description: '', - }) - const [formErrors, setFormErrors] = useState({}) - const [ - governance, - setGovernance, - ] = useState | null>(null) - const [isLoadingSignedProposal, setIsLoadingSignedProposal] = useState(false) - const [isLoadingDraft, setIsLoadingDraft] = useState(false) - const isLoading = isLoadingSignedProposal || isLoadingDraft - // const customInstructionFilterForSelectedGovernance = ( - // instructionType: Instructions - // ) => { - // if (!governance) { - // return true - // } else { - // const governanceType = governance.account.accountType - // const instructionsAvailiableAfterProgramGovernance = [Instructions.Base64] - // switch (governanceType) { - // case GovernanceAccountType.ProgramGovernanceV1: - // case GovernanceAccountType.ProgramGovernanceV2: - // return instructionsAvailiableAfterProgramGovernance.includes( - // instructionType - // ) - // default: - // return true - // } - // } - // } - - const getAvailableInstructionsForIndex = (index) => { - if (index === 0) { - return availableInstructions - } else { - return availableInstructions - } - } - const [instructionsData, setInstructions] = useState< - ComponentInstructionData[] - >([{ type: availableInstructions[0] }]) - const handleSetInstructions = (val: any, index) => { - const newInstructions = [...instructionsData] - newInstructions[index] = { ...instructionsData[index], ...val } - setInstructions(newInstructions) - } - const handleSetForm = ({ propertyName, value }) => { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - const setInstructionType = ({ value, idx }) => { - const newInstruction = { - type: value, - } - handleSetInstructions(newInstruction, idx) - } - const addInstruction = () => { - setInstructions([...instructionsData, { type: undefined }]) - } - const removeInstruction = (idx) => { - setInstructions([...instructionsData.filter((x, index) => index !== idx)]) - } - const handleGetInstructions = async () => { - const instructions: UiInstruction[] = [] - for (const inst of instructionsData) { - if (inst.getInstruction) { - const instruction: UiInstruction = await inst?.getInstruction() - instructions.push(instruction) - } - } - return instructions - } - const handleTurnOffLoaders = () => { - setIsLoadingSignedProposal(false) - setIsLoadingDraft(false) - } - - const handleCreate = async (isDraft) => { - setFormErrors({}) - if (isDraft) { - setIsLoadingDraft(true) - } else { - setIsLoadingSignedProposal(true) - } - - const { isValid, validationErrors }: formValidation = await isFormValid( - schema, - form - ) - - const instructions: UiInstruction[] = await handleGetInstructions() - - let proposalAddress: PublicKey | null = null - if (!realm) { - handleTurnOffLoaders() - throw 'No realm selected' - } - - if (isValid && instructions.every((x: UiInstruction) => x.isValid)) { - let selectedGovernance = governance - if (!governance) { - handleTurnOffLoaders() - throw Error('No governance selected') - } - - const additionalInstructions = [ - ...(instructions - .flatMap((instruction) => { - return instruction.additionalSerializedInstructions?.map((x) => { - return { - data: x ? getInstructionDataFromBase64(x) : null, - holdUpTime: instruction.customHoldUpTime - ? getTimestampFromDays(instruction.customHoldUpTime) - : selectedGovernance?.account?.config - .minInstructionHoldUpTime, - prerequisiteInstructions: [], - chunkSplitByDefault: instruction.chunkSplitByDefault || false, - signers: instruction.signers, - shouldSplitIntoSeparateTxs: - instruction.shouldSplitIntoSeparateTxs, - } - }) - }) - .filter((x) => x) as InstructionDataWithHoldUpTime[]), - ] - - const instructionsData = [ - ...additionalInstructions, - ...instructions.map((x) => { - return { - data: x.serializedInstruction - ? getInstructionDataFromBase64(x.serializedInstruction) - : null, - holdUpTime: x.customHoldUpTime - ? getTimestampFromDays(x.customHoldUpTime) - : selectedGovernance?.account?.config.minInstructionHoldUpTime, - prerequisiteInstructions: x.prerequisiteInstructions || [], - chunkSplitByDefault: x.chunkSplitByDefault || false, - signers: x.signers, - shouldSplitIntoSeparateTxs: x.shouldSplitIntoSeparateTxs, - } - }), - ] - - try { - // Fetch governance to get up to date proposalCount - - if (governance.pubkey != undefined) { - selectedGovernance = (await fetchRealmGovernance( - governance.pubkey - )) as ProgramAccount - } else { - selectedGovernance = (await fetchRealmGovernance( - governance - )) as ProgramAccount - } - proposalAddress = await handleCreateProposal({ - title: form.title, - description: form.description, - governance: selectedGovernance, - instructionsData, - voteByCouncil, - isDraft, - }) - - const url = fmtUrlWithCluster( - `/dao/${symbol}/proposal/${proposalAddress}` - ) - - router.push(url) - } catch (ex) { - console.log(ex) - notify({ type: 'error', message: `${ex}` }) - } - } else { - setFormErrors(validationErrors) - } - handleTurnOffLoaders() - } - - useEffect(() => { - setInstructions([instructionsData[0]]) - }, [instructionsData[0].governedAccount?.pubkey]) - - useEffect(() => { - const governedAccount = extractGovernanceAccountFromInstructionsData( - instructionsData - ) - - setGovernance(governedAccount) - }, [instructionsData]) - - const getCurrentInstruction = ({ typeId, idx }) => { - switch (typeId) { - case Instructions.Transfer: - return ( - - ) - case Instructions.ChangeMakeDonation: - return ( - - ) - case Instructions.ProgramUpgrade: - return ( - - ) - case Instructions.CreateAssociatedTokenAccount: - return ( - - ) - case Instructions.Mint: - return - case Instructions.Base64: - return - case Instructions.None: - 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.SwitchboardAdmitOracle: - return - case Instructions.SwitchboardRevokeOracle: - return - - case Instructions.CreateSolendObligationAccount: - return - case Instructions.InitSolendObligationAccount: - return - case Instructions.DepositReserveLiquidityAndObligationCollateral: - return ( - - ) - case Instructions.RefreshSolendObligation: - return - case Instructions.RefreshSolendReserve: - return - case Instructions.WithdrawObligationCollateralAndRedeemReserveLiquidity: - return ( - - ) - case Instructions.CreateNftPluginRegistrar: - return ( - - ) - case Instructions.ConfigureNftPluginCollection: - return ( - - ) - case Instructions.CreateNftPluginMaxVoterWeight: - return ( - - ) - case Instructions.MangoAddOracle: - return ( - - ) - case Instructions.MangoAddSpotMarket: - return ( - - ) - case Instructions.MangoChangeMaxAccounts: - return ( - - ) - case Instructions.MangoChangePerpMarket: - return ( - - ) - case Instructions.MangoChangeReferralFeeParams: - return ( - - ) - case Instructions.MangoChangeSpotMarket: - return ( - - ) - case Instructions.MangoCreatePerpMarket: - return ( - - ) - case Instructions.MangoSetMarketMode: - return ( - - ) - case Instructions.ForesightInitMarket: - return ( - - ) - case Instructions.ForesightInitMarketList: - return ( - - ) - case Instructions.ForesightInitCategory: - return ( - - ) - case Instructions.ForesightResolveMarket: - return ( - - ) - case Instructions.ForesightAddMarketListToCategory: - return ( - - ) - case Instructions.ForesightSetMarketMetadata: - return ( - - ) - case Instructions.RealmConfig: - return - case Instructions.Grant: - return - case Instructions.Clawback: - return - case Instructions.CloseTokenAccount: - return ( - - ) - case Instructions.VotingMintConfig: - return ( - - ) - case Instructions.CreateVsrRegistrar: - return ( - - ) - default: - null - } - } - - return ( -
-
- <> - - - - Back - - -
-
-

- Add a proposal - {realmDisplayName ? ` to ${realmDisplayName}` : ``}{' '} -

-
-
-
-
- - handleSetForm({ - value: evt.target.value, - propertyName: 'title', - }) - } - /> -
- - {canChooseWhoVote && ( - { - setVoteByCouncil(!voteByCouncil) - }} - > - )} - -

Transactions

- {instructionsData.map((instruction, idx) => { - const availableInstructionsForIdx = getAvailableInstructionsForIndex( - idx - ) - return ( -
- -
- - {getCurrentInstruction({ - typeId: instruction.type?.id, - idx, - })} - - {idx !== 0 && ( - removeInstruction(idx)} - > - - Remove - - )} -
-
- ) - })} -
-
- - - Add transaction - -
-
- handleCreate(true)} - > - Save draft - - -
-
- -
-
- -
-
- ) -} - -export default New diff --git a/pages/dao/[symbol]/token-stats/index.tsx b/pages/dao/[symbol]/token-stats/index.tsx deleted file mode 100644 index 643ffa5141..0000000000 --- a/pages/dao/[symbol]/token-stats/index.tsx +++ /dev/null @@ -1,634 +0,0 @@ -import { Config, MangoClient } from '@blockworks-foundation/mango-client' -import Input from '@components/inputs/Input' -import { GrantInstruction } from '@components/instructions/programs/voteStakeRegistry' -import { MANGO_DAO_TREASURY } from '@components/instructions/tools' -import PreviousRouteBtn from '@components/PreviousRouteBtn' -import { SearchIcon, UserCircleIcon } from '@heroicons/react/outline' -import useRealm from '@hooks/useRealm' -import { BN, BorshInstructionCoder } from '@project-serum/anchor' -import { - GovernanceAccountType, - InstructionExecutionStatus, -} from '@solana/spl-governance' -import { PublicKey } from '@solana/web3.js' -import { getMintDecimalAmount } from '@tools/sdk/units' -import dayjs from 'dayjs' -import dynamic from 'next/dynamic' -import { useEffect, useRef, useState } from 'react' -import useGovernanceAssetsStore from 'stores/useGovernanceAssetsStore' -import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' -import useWalletStore from 'stores/useWalletStore' -import { - DAYS_PER_MONTH, - SECS_PER_MONTH, -} from 'VoteStakeRegistry/tools/dateTools' -import InfoBox from 'VoteStakeRegistry/components/LockTokenStats/InfoBox' -import { AddressImage, DisplayAddress } from '@cardinal/namespaces-components' -import { LockupType } from 'VoteStakeRegistry/sdk/accounts' -import { - getMinDurationFmt, - getTimeLeftFromNowFmt, -} from 'VoteStakeRegistry/tools/dateTools' -import { - DepoistWithVoter, - DepositWithWallet, - getProposalsTransactions, -} from 'VoteStakeRegistry/components/LockTokenStats/tools' -import PaginationComponent from '@components/Pagination' -import { - ExpandableRow, - Table, - Td, - Th, - TrBody, - TrHead, -} from '@components/TableElements' -import { tryParsePublicKey } from '@tools/core/pubkey' -import { abbreviateAddress } from '@utils/formatting' -const VestingVsTime = dynamic( - () => import('VoteStakeRegistry/components/LockTokenStats/VestingVsTime'), - { - ssr: false, - } -) -const isBetween = require('dayjs/plugin/isBetween') -dayjs.extend(isBetween) - -const LockTokenStats = () => { - const walletsPerPage = 10 - const pagination = useRef<{ setPage: (val) => void }>(null) - const { realmInfo, realm, symbol, mint, proposals } = useRealm() - const vsrClient = useVotePluginsClientStore((s) => s.state.vsrClient) - const voteStakeRegistryRegistrarPk = useVotePluginsClientStore( - (s) => s.state.voteStakeRegistryRegistrarPk - ) - const voteStakeRegistryRegistrar = useVotePluginsClientStore( - (s) => s.state.voteStakeRegistryRegistrar - ) - const connection = useWalletStore((s) => s.connection) - const governedTokenAccounts = useGovernanceAssetsStore( - (s) => s.governedTokenAccounts - ) - const [search, setSearch] = useState('') - const [voters, setVoters] = useState< - { - publicKey: PublicKey - account: any - }[] - >([]) - const [depositsWithWallets, setDepositsWithWallets] = useState< - DepositWithWallet[] - >([]) - const [givenGrantsTokenAmounts, setGivenGrantsTokenAmounts] = useState< - DepoistWithVoter[] - >([]) - const [unlockedFromGrants, setUnlockedFromGrants] = useState(new BN(0)) - const [ - liquidityMiningEmissionPerMonth, - setLiqudiityMiningEmissionPerMonth, - ] = useState(new BN(0)) - const [vestPerMonthStats, setVestPerMonthStats] = useState<{ - [key: string]: { vestingDate: dayjs.Dayjs; vestingAmount: BN }[] - }>({}) - const [statsMonths, setStatsMonths] = useState([]) - const [paginatedWallets, setPaginatedWallets] = useState( - [] - ) - const filteredDepositWithWallets = depositsWithWallets.filter((x) => - search ? x.wallet.toBase58().includes(search) : x - ) - const givenGrantsTokenAmount = givenGrantsTokenAmounts.reduce( - (acc, curr) => acc.add(curr.amount!), - new BN(0) - ) - const possibleGrantProposals = Object.values(proposals).filter( - (x) => - x.account.governance.toBase58() === MANGO_DAO_TREASURY && - x.account.accountType === GovernanceAccountType.ProposalV2 - ) - const currentMonthName = statsMonths.length ? statsMonths[0] : '' - const vestingThisMonth = - currentMonthName && vestPerMonthStats[currentMonthName] - ? vestPerMonthStats[currentMonthName].reduce( - (acc, val) => acc.add(val.vestingAmount), - new BN(0) - ) - : new BN(0) - const walletsCount = [ - ...new Set(depositsWithWallets.map((x) => x.wallet.toBase58())), - ].length - const mngoValut = governedTokenAccounts.find( - (x) => - x.extensions.mint?.publicKey.toBase58() === - realm?.account.communityMint.toBase58() - ) - const mngoLocked = depositsWithWallets.reduce( - (acc, curr) => acc.add(curr.deposit.amountDepositedNative), - new BN(0) - ) - const circulatingSupply = - mngoValut && mint - ? mint.supply.sub(mngoValut.extensions.amount!).sub(mngoLocked) - : new BN(0) - const mngoLockedWithClawback = depositsWithWallets - .filter((x) => x.deposit.allowClawback) - .reduce( - (acc, curr) => acc.add(curr.deposit.amountDepositedNative), - new BN(0) - ) - const calcVestingAmountsPerLastXMonths = (monthsNumber: number) => { - const depositsWithWalletsSortedByDate = [...depositsWithWallets].sort( - (x, y) => - x.deposit.lockup.startTs.toNumber() * 1000 - - y.deposit.lockup.startTs.toNumber() * 1000 - ) - const months: dayjs.Dayjs[] = [] - const vestingPerMonth = {} - const currentDate = dayjs() - const oldestDate = dayjs().subtract(monthsNumber, 'month') - for (let i = 0; i < monthsNumber; i++) { - const date = dayjs().subtract(i, 'month') - months.push(date) - vestingPerMonth[date.format('MMM')] = [] - } - for (const depositWithWallet of depositsWithWalletsSortedByDate) { - const unixLockupStart = - depositWithWallet.deposit.lockup.startTs.toNumber() * 1000 - const unixLockupEnd = - depositWithWallet.deposit.lockup.endTs.toNumber() * 1000 - const isPossibleToVest = - typeof depositWithWallet.deposit.lockup.kind.monthly !== 'undefined' && - currentDate.isAfter(unixLockupStart) && - oldestDate.isBefore(unixLockupEnd) - - if (isPossibleToVest) { - const vestingCount = Math.ceil( - dayjs(unixLockupEnd).diff(unixLockupStart, 'month', true) - ) - const vestingAmount = depositWithWallet.deposit.amountInitiallyLockedNative.divn( - vestingCount - ) - for (let i = 1; i <= vestingCount; i++) { - const nextVestinDays = i * DAYS_PER_MONTH - const vestingDate = dayjs(unixLockupStart).add(nextVestinDays, 'day') - for (const date of months) { - if ( - //@ts-ignore - vestingDate.isBetween(date.startOf('month'), date.endOf('month')) - ) { - vestingPerMonth[date.format('MMM')] = [ - ...vestingPerMonth[date.format('MMM')], - { - vestingDate, - vestingAmount, - }, - ] - } - } - } - } - } - return { vestingPerMonth, months } - } - const fmtAmount = (val) => { - const formatter = Intl.NumberFormat('en', { - notation: 'compact', - }) - return mint - ? formatter.format(getMintDecimalAmount(mint!, val).toNumber()) - : '0' - } - - useEffect(() => { - const getProposalsInstructions = async () => { - const accounts = await getProposalsTransactions( - possibleGrantProposals.map((x) => x.pubkey), - connection, - realmInfo!.programId - ) - - const givenGrantsTokenAmounts = accounts - .filter( - (x) => - x.account.executionStatus === InstructionExecutionStatus.Success - ) - .flatMap((x) => - x.account.instructions - .filter( - (x) => - x.data[0] === 145 && - x.accounts[9].pubkey.toBase58() === - realm?.account.communityMint.toBase58() - ) - .map((instruction) => { - const data = new BorshInstructionCoder( - vsrClient!.program.idl - ).decode(Buffer.from(instruction.data)) - ?.data as GrantInstruction | null - return { - voterPk: instruction.accounts[1].pubkey, - amount: data?.amount, - startTs: data?.startTs, - } - }) - ) - setGivenGrantsTokenAmounts(givenGrantsTokenAmounts) - } - if (realmInfo?.programId && vsrClient) { - getProposalsInstructions() - } - }, [possibleGrantProposals.length, realmInfo?.programId]) - useEffect(() => { - const depositsWithWalletsInner: DepositWithWallet[] = [] - for (const voter of voters) { - const deposits = voter.account.deposits.filter( - (x) => - x.isUsed && - typeof x.lockup?.kind.none === 'undefined' && - x.votingMintConfigIdx === - voteStakeRegistryRegistrar?.votingMints.findIndex( - (votingMint) => - votingMint.mint.toBase58() === - realm?.account.communityMint.toBase58() - ) - ) - for (const deposit of deposits) { - const depositWithWallet = { - voter: voter.publicKey, - wallet: voter.account.voterAuthority, - deposit: deposit, - } - depositsWithWalletsInner.push(depositWithWallet) - } - } - const depositWithWalletSorted = depositsWithWalletsInner.sort( - (a, b) => - b.deposit.amountDepositedNative.toNumber() - - a.deposit.amountDepositedNative.toNumber() - ) - setDepositsWithWallets(depositWithWalletSorted) - }, [voters.length]) - - useEffect(() => { - const getLockedDeposits = async () => { - const allVoters = await vsrClient?.program.account.voter.all([ - { - memcmp: { - offset: 40, - bytes: voteStakeRegistryRegistrarPk!.toBase58(), - }, - }, - ]) - const currentRealmVoters = allVoters && allVoters.length ? allVoters : [] - setVoters(currentRealmVoters) - } - if (vsrClient && voteStakeRegistryRegistrarPk) { - getLockedDeposits() - } - }, [ - vsrClient?.program.programId.toBase58(), - voteStakeRegistryRegistrarPk?.toBase58(), - ]) - useEffect(() => { - const { vestingPerMonth, months } = calcVestingAmountsPerLastXMonths(6) - const monthsFormat = months.map((x) => x.format('MMM')) - setVestPerMonthStats(vestingPerMonth) - setStatsMonths(monthsFormat) - }, [depositsWithWallets.length]) - useEffect(() => { - if (depositsWithWallets.length && givenGrantsTokenAmounts.length) { - const currentlyUnlocked = new BN(0) - for (const depostiWithVoter of givenGrantsTokenAmounts) { - const grantDeposit = depositsWithWallets.find((x) => { - return ( - x.deposit.amountInitiallyLockedNative.cmp( - depostiWithVoter.amount! - ) === 0 && - x.deposit.lockup.startTs.cmp(depostiWithVoter.startTs!) === 0 && - x.voter.toBase58() === depostiWithVoter.voterPk.toBase58() - ) - }) - if (grantDeposit) { - currentlyUnlocked.iadd( - grantDeposit.deposit.amountInitiallyLockedNative.sub( - grantDeposit.deposit.amountDepositedNative - ) - ) - } else { - currentlyUnlocked.iadd(depostiWithVoter.amount!) - } - } - setUnlockedFromGrants(currentlyUnlocked) - } - }, [depositsWithWallets.length, givenGrantsTokenAmounts.length]) - useEffect(() => { - const mngoPerpMarket = async () => { - const GROUP = connection.cluster === 'devnet' ? 'devnet.2' : 'mainnet.1' - const groupConfig = Config.ids().getGroupWithName(GROUP)! - const client = new MangoClient( - connection.current, - groupConfig.mangoProgramId - ) - const group = await client.getMangoGroup(groupConfig.publicKey) - const perpMarkets = await Promise.all([ - ...groupConfig!.perpMarkets.map((x) => - group.loadPerpMarket( - connection.current, - x.marketIndex, - x.baseDecimals, - x.quoteDecimals - ) - ), - ]) - - const emissionPerMonth = perpMarkets - .reduce( - (acc, next) => acc.iadd(next.liquidityMiningInfo.mngoPerPeriod), - new BN(0) - ) - .muln(SECS_PER_MONTH) - .div(perpMarkets[0].liquidityMiningInfo.targetPeriodLength) - setLiqudiityMiningEmissionPerMonth(emissionPerMonth) - } - if (symbol === 'MNGO') { - mngoPerpMarket() - } - }, [connection.cluster]) - useEffect(() => { - setPaginatedWallets(paginateWallets(0)) - pagination?.current?.setPage(0) - }, [JSON.stringify(filteredDepositWithWallets)]) - const onPageChange = (page) => { - setPaginatedWallets(paginateWallets(page)) - } - const paginateWallets = (page) => { - return filteredDepositWithWallets.slice( - page * walletsPerPage, - (page + 1) * walletsPerPage - ) - } - const parsedSymbol = - typeof symbol === 'string' && tryParsePublicKey(symbol) - ? abbreviateAddress(new PublicKey(symbol)) - : symbol - const renderAddressName = (wallet) => { - return ( - - ) - } - const renderAddressImage = (wallet) => ( - } - /> - ) - - return ( -
-
-
-
- -
-
- {realmInfo?.ogImage ? ( - - ) : null} -

- {typeof symbol === 'string' && tryParsePublicKey(symbol) - ? realm?.account.name - : symbol}{' '} - Stats -

-
-
- {symbol === 'MNGO' && ( -
- -
- )} -
- -
-
- -
- {symbol === 'MNGO' && ( -
- -
- )} -
-

Vesting and Grants

-
-
-
- - - -
-
-
-
-

{parsedSymbol} Vesting vs. Time

-
- { - return { - month: x, - amount: vestPerMonthStats[x] - .reduce((acc, curr) => { - return acc.add(curr.vestingAmount) - }, new BN(0)) - .toNumber(), - } - }), - ].reverse()} - fmtAmount={fmtAmount} - > -
-
-
-
-
-

- Members with Locked {parsedSymbol}{' '} - - ({walletsCount}) - -

-
- { - return setSearch(e.target.value) - }} - prefix={} - /> -
-
-
- - - - - - - - - - - {paginatedWallets.map((x, index) => { - const fmtMangoAmount = (val) => { - return mint - ? getMintDecimalAmount(mint!, val).toFormat(0) - : '0' - } - const type = Object.keys( - x.deposit.lockup.kind - )[0] as LockupType - const typeName = type !== 'monthly' ? type : 'Vested' - const isConstant = type === 'constant' - const lockedTokens = fmtMangoAmount( - x.deposit.amountDepositedNative - ) - return ( - - - - - - - ) - })} - -
AddressLock TypeDurationAmount ({parsedSymbol})
-
-
- {renderAddressImage(x.wallet)} -
{' '} - {renderAddressName(x.wallet)} -
-
- {typeName.charAt(0).toUpperCase() + typeName.slice(1)} - - {isConstant - ? getMinDurationFmt(x.deposit as any) - : getTimeLeftFromNowFmt(x.deposit as any)} - {lockedTokens}
-
-
-
-
Address
-
Amount
-
- {paginatedWallets.map((x, index) => { - const fmtAmount = (val) => { - return mint ? getMintDecimalAmount(mint!, val).toFormat(0) : '0' - } - const type = Object.keys(x.deposit.lockup.kind)[0] as LockupType - const typeName = type !== 'monthly' ? type : 'Vested' - const isConstant = type === 'constant' - const lockedTokens = fmtAmount(x.deposit.amountDepositedNative) - return ( - -
-
- {renderAddressImage(x.wallet)} -
- {renderAddressName(x.wallet)} -
- {lockedTokens} -
- } - key={`${x.deposit}${index}`} - panelTemplate={ -
-
-
- Lock Type -
-
- {typeName.charAt(0).toUpperCase() + typeName.slice(1)} -
-
-
-
- Duration -
-
- {isConstant - ? getMinDurationFmt(x.deposit as any) - : getTimeLeftFromNowFmt(x.deposit as any)} -
-
-
- } - /> - ) - })} -
- -
-
-
- ) -} - -export default LockTokenStats diff --git a/pages/dao/[symbol]/treasury/index.tsx b/pages/dao/[symbol]/treasury/index.tsx deleted file mode 100644 index 3d7af72e74..0000000000 --- a/pages/dao/[symbol]/treasury/index.tsx +++ /dev/null @@ -1,219 +0,0 @@ -import PreviousRouteBtn from '@components/PreviousRouteBtn' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { useTotalTreasuryPrice } from '@hooks/useTotalTreasuryPrice' -import { useEffect, useState } from 'react' -import useTreasuryAccountStore from 'stores/useTreasuryAccountStore' -import AccountsTabs from '@components/TreasuryAccount/AccountsTabs' -import AccountOverview from '@components/TreasuryAccount/AccountOverview' -import useWalletStore from 'stores/useWalletStore' -import useRealm from 'hooks/useRealm' -import { CurrencyDollarIcon, PlusCircleIcon } from '@heroicons/react/outline' -import { LinkButton } from '@components/Button' -import { useRouter } from 'next/router' -import useQueryContext from '@hooks/useQueryContext' -import tokenService from '@utils/services/token' -import useStrategiesStore from 'Strategies/store/useStrategiesStore' -import Select from '@components/inputs/Select' -import { getTreasuryAccountItemInfoV2 } from '@utils/treasuryTools' -import { AssetAccount } from '@utils/uiTypes/assets' -import Tooltip from '@components/Tooltip' - -export const NEW_TREASURY_ROUTE = `/treasury/new` - -const Treasury = () => { - const { getStrategies } = useStrategiesStore() - const { - governedTokenAccountsWithoutNfts, - auxiliaryTokenAccounts, - } = useGovernanceAssets() - const { setCurrentAccount } = useTreasuryAccountStore() - const connection = useWalletStore((s) => s.connection) - const { - ownVoterWeight, - symbol, - realm, - toManyCommunityOutstandingProposalsForUser, - toManyCouncilOutstandingProposalsForUse, - } = useRealm() - const router = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const connected = useWalletStore((s) => s.connected) - const [treasuryAccounts, setTreasuryAccounts] = useState([]) - const [activeAccount, setActiveAccount] = useState(null) - const [accountInfo, setAccountInfo] = useState(null) - const { realmInfo } = useRealm() - useEffect(() => { - if ( - tokenService._tokenList.length && - governedTokenAccountsWithoutNfts.filter((x) => x.extensions.mint).length - ) { - getStrategies(connection) - } - }, [ - tokenService._tokenList.length, - governedTokenAccountsWithoutNfts.filter((x) => x.extensions.mint).length, - ]) - useEffect(() => { - async function prepTreasuryAccounts() { - if ( - governedTokenAccountsWithoutNfts.every( - (x) => x.extensions.transferAddress - ) - ) { - const accounts = [ - ...governedTokenAccountsWithoutNfts, - ...auxiliaryTokenAccounts, - ] - const accountsSorted = accounts.sort((a, b) => { - const infoA = getTreasuryAccountItemInfoV2(a) - const infoB = getTreasuryAccountItemInfoV2(b) - return infoB.totalPrice - infoA.totalPrice - }) - setTreasuryAccounts(accountsSorted) - } - } - prepTreasuryAccounts() - }, [JSON.stringify(governedTokenAccountsWithoutNfts)]) - - useEffect(() => { - if (treasuryAccounts.length > 0 && treasuryAccounts[0].extensions.mint) { - setActiveAccount(treasuryAccounts[0]) - setCurrentAccount(treasuryAccounts[0], connection) - } - }, [JSON.stringify(treasuryAccounts)]) - - const { totalPriceFormatted } = useTotalTreasuryPrice() - - const handleChangeAccountTab = (acc) => { - if (acc) { - setActiveAccount(acc) - setCurrentAccount(acc, connection) - } - } - - const goToNewAccountForm = () => { - router.push(fmtUrlWithCluster(`/dao/${symbol}${NEW_TREASURY_ROUTE}`)) - } - - const canCreateGovernance = realm - ? ownVoterWeight.canCreateGovernance(realm) - : null - const isConnectedWithGovernanceCreationPermission = - connected && - canCreateGovernance && - !toManyCommunityOutstandingProposalsForUser && - !toManyCouncilOutstandingProposalsForUse - - const addNewAssetTooltip = !connected - ? 'Connect your wallet to create new asset' - : !canCreateGovernance - ? "You don't have enough governance power to create a new asset" - : toManyCommunityOutstandingProposalsForUser - ? 'You have too many community outstanding proposals. You need to finalize them before creating a new asset.' - : toManyCouncilOutstandingProposalsForUse - ? 'You have too many council outstanding proposals. You need to finalize them before creating a new asset.' - : '' - useEffect(() => { - if (activeAccount) { - const info = getTreasuryAccountItemInfoV2(activeAccount) - setAccountInfo(info) - } - }, [activeAccount]) - - return ( - <> -
-
-
-
- -
-
-
- {realmInfo?.ogImage ? ( - - ) : null} -
-

{realmInfo?.displayName}

-

Treasury

-
-
- {totalPriceFormatted && ( -
-
- -
-

Treasury Value

-
- ${totalPriceFormatted} -
-
-
-
- )} -
-
- <> -
-
-

Treasury Accounts

- - - - New DAO wallet - - -
-
- -
-
- handleChangeAccountTab(t)} - tabs={treasuryAccounts} - /> -
-
-
- -
- -
-
- - ) -} - -export default Treasury diff --git a/pages/dao/[symbol]/treasury/new.tsx b/pages/dao/[symbol]/treasury/new.tsx deleted file mode 100644 index e2a20f4a16..0000000000 --- a/pages/dao/[symbol]/treasury/new.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import NewAccountForm from '@components/TreasuryAccount/NewTreasuryAccountForm' -import React from 'react' - -const New = () => { - return ( -
-
- -
-
- ) -} - -export default New diff --git a/pages/index.tsx b/pages/index.tsx deleted file mode 100644 index 1c42b787b1..0000000000 --- a/pages/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { useEffect } from 'react' -import { useRouter } from 'next/router' -const Index = () => { - const router = useRouter() - - useEffect(() => { - const { REALM } = process.env - const mainUrl = REALM ? `/dao/${REALM}` : '/realms' - router.replace(mainUrl) - }, []) - - return null -} - -export default Index diff --git a/pages/realms/components/RealmsDashboard.tsx b/pages/realms/components/RealmsDashboard.tsx deleted file mode 100644 index aa773f5418..0000000000 --- a/pages/realms/components/RealmsDashboard.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import useQueryContext from '@hooks/useQueryContext' -import { RealmInfo } from '@models/registry/api' -import { useTheme } from 'next-themes' -import { useRouter } from 'next/router' -import React, { useMemo } from 'react' - -export default function RealmsDashboard({ - realms, - isLoading, -}: { - realms: readonly RealmInfo[] - isLoading: boolean -}) { - const router = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const { theme } = useTheme() - - const goToRealm = (realmInfo: RealmInfo) => { - const symbol = - realmInfo.isCertified && realmInfo.symbol - ? realmInfo.symbol - : realmInfo.realmId.toBase58() - const url = fmtUrlWithCluster(`/dao/${symbol}`) - router.push(url) - } - - const certifiedRealms = useMemo(() => realms?.filter((r) => r.isCertified), [ - realms, - ]) - - const unchartedRealms = useMemo(() => realms?.filter((r) => !r.isCertified), [ - realms, - ]) - - return isLoading ? ( -
-
-
-
-
-
-
-
-
-
-
-
- ) : ( - <> -
- {certifiedRealms?.length > 0 ? ( - certifiedRealms.map((realm: RealmInfo) => ( -
goToRealm(realm)} - className="flex flex-col items-center justify-center p-8 rounded-lg cursor-pointer bg-bkg-2 default-transition hover:bg-bkg-3" - key={realm.realmId.toString()} - > -
- {realm.ogImage ? ( -
- -
- ) : ( -
- {realm.displayName?.charAt(0)} -
- )} -
-

- {realm.displayName ?? realm.symbol} -

-
- )) - ) : ( -
-

No results

-
- )} -
-
-

Unchartered DAOs

-
- {unchartedRealms?.length > 0 ? ( - unchartedRealms.map((realm: RealmInfo) => ( -
goToRealm(realm)} - className="flex flex-col items-center justify-center p-8 rounded-lg cursor-pointer bg-bkg-2 default-transition hover:bg-bkg-3" - key={realm.realmId.toString()} - > -
- {realm.ogImage ? ( -
- -
- ) : ( -
- {realm.displayName?.charAt(0)} -
- )} -
-

- {realm.displayName ?? realm.symbol} -

-
- )) - ) : ( -
-

No results

-
- )} -
-
- - ) -} diff --git a/pages/realms/index.tsx b/pages/realms/index.tsx deleted file mode 100644 index db2dae2861..0000000000 --- a/pages/realms/index.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import React, { useMemo, useState } from 'react' - -import { - getCertifiedRealmInfos, - getUnchartedRealmInfos, - RealmInfo, -} from '../../models/registry/api' - -import { SearchIcon } from '@heroicons/react/outline' -import useWalletStore from '../../stores/useWalletStore' -import useQueryContext from '@hooks/useQueryContext' -import Button from '@components/Button' -import { notify } from '@utils/notifications' -import { useRouter } from 'next/router' -import Input from '@components/inputs/Input' -import dynamic from 'next/dynamic' - -const RealmsDashboard = dynamic(() => import('./components/RealmsDashboard')) - -const Realms = () => { - const [realms, setRealms] = useState>([]) - const [filteredRealms, setFilteredRealms] = useState< - ReadonlyArray - >([]) - const [isLoadingRealms, setIsLoadingRealms] = useState(true) - const { actions, selectedRealm, connection } = useWalletStore((s) => s) - const { connected, current: wallet } = useWalletStore((s) => s) - const router = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const [searchString, setSearchString] = useState('') - const { cluster } = router.query - //Small hack to prevent race conditions with cluster change until we remove connection from store and move it to global dep. - const routeHasClusterInPath = router.asPath.includes('cluster') - - useMemo(async () => { - if ( - connection && - ((routeHasClusterInPath && cluster) || !routeHasClusterInPath) - ) { - const [certifiedRealms, uncharteredRealms] = await Promise.all([ - getCertifiedRealmInfos(connection), - getUnchartedRealmInfos(connection), - ]) - const allRealms = [...certifiedRealms, ...uncharteredRealms] - setRealms(sortDaos(allRealms)) - setFilteredRealms(sortDaos(allRealms)) - setIsLoadingRealms(false) - } - if (selectedRealm.realm) { - actions.deselectRealm() - } - }, [connection]) - - const handleCreateRealmButtonClick = async () => { - if (!connected) { - try { - if (wallet) await wallet.connect() - } catch (error) { - const err = error as Error - return notify({ - type: 'error', - message: err.message, - }) - } - } - router.push(fmtUrlWithCluster(`/realms/new`)) - } - const sortDaos = (realmInfoData: RealmInfo[]) => { - return realmInfoData.sort((a: RealmInfo, b: RealmInfo) => { - return (b.sortRank ?? -0) - (a.sortRank ?? -0) - }) - } - const filterDaos = (v) => { - setSearchString(v) - if (v.length > 0) { - const filtered = realms.filter( - (r) => - r.displayName?.toLowerCase().includes(v.toLowerCase()) || - r.symbol?.toLowerCase().includes(v.toLowerCase()) - ) - setFilteredRealms(filtered) - } else { - setFilteredRealms(realms) - } - } - return ( -
-
-

DAOs

-
- filterDaos(e.target.value)} - placeholder={`Search DAOs...`} - prefix={} - /> - -
-
- -
- ) -} - -export default Realms diff --git a/pages/realms/new.tsx b/pages/realms/new.tsx deleted file mode 100644 index 2dab193458..0000000000 --- a/pages/realms/new.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import React from 'react' -import Link from 'next/link' -import Head from 'next/head' -import useQueryContext from '@hooks/useQueryContext' - -import Header from '@components/Header' -import Text from '@components/Text' - -const New: React.FC = () => { - const { fmtUrlWithCluster } = useQueryContext() - const DAO_TYPES = [ - { - url: '/realms/new/multisig', - name: 'Multi-Signature Wallet', - description: - 'A "multisig" is a shared wallet, typically with two or more members authorizing transactions.', - }, - { - url: '/realms/new/nft', - name: 'NFT Community DAO', - description: - 'NFT Community DAOs leverage NFTs as membership, giving NFT holders voting power to make decisions.', - }, - { - url: '/realms/new/community-token', - name: 'Community Token DAO', - description: - 'DAO members use a community token to denote their membership and allow them to vote on proposals.', - }, - ] - return ( - <> - - Create new DAO | Realms - -
- What type of DAO
- would you like to create? -
-
-
- {DAO_TYPES.map(({ url, name, description }) => ( - - -
- {name} -
- - {description} - -
- - ))} -
- -
- - ) -} - -export default New diff --git a/pages/realms/new/community-token/index.tsx b/pages/realms/new/community-token/index.tsx deleted file mode 100644 index 4151a8dec4..0000000000 --- a/pages/realms/new/community-token/index.tsx +++ /dev/null @@ -1,143 +0,0 @@ -import { useState } from 'react' -import { useRouter } from 'next/router' - -import { PublicKey } from '@solana/web3.js' -import useWalletStore from 'stores/useWalletStore' -import createTokenizedRealm from 'actions/createTokenizedRealm' -import useQueryContext from '@hooks/useQueryContext' - -import { DEFAULT_GOVERNANCE_PROGRAM_ID } from '@components/instructions/tools' - -import { notify } from '@utils/notifications' - -import FormPage from '@components/NewRealmWizard/PageTemplate' -import BasicDetailsForm, { - BasicDetailsSchema, - BasicDetails, -} from '@components/NewRealmWizard/components/steps/BasicDetailsForm' -import CommunityTokenDetailsForm, { - CommunityTokenSchema, - CommunityToken, -} from '@components/NewRealmWizard/components/steps/CommunityTokenDetailsForm' -import YesVotePercentageForm, { - CommunityYesVotePercentageSchema, - CommunityYesVotePercentage, -} from '@components/NewRealmWizard/components/steps/YesVotePercentageThresholdForm' -import AddCouncilForm, { - AddCouncilSchema, - AddCouncil, -} from '@components/NewRealmWizard/components/steps/AddCouncilForm' -import InviteMembersForm, { - InviteMembersSchema, - InviteMembers, -} from '@components/NewRealmWizard/components/steps/InviteMembersForm' - -export const FORM_NAME = 'tokenized' - -type CommunityTokenForm = BasicDetails & - CommunityToken & - CommunityYesVotePercentage & - AddCouncil & - InviteMembers - -export default function CommunityTokenWizard() { - const { connected, connection, current: wallet } = useWalletStore((s) => s) - const { push } = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const [requestPending, setRequestPending] = useState(false) - const steps = [ - { Form: BasicDetailsForm, schema: BasicDetailsSchema, required: 'true' }, - { - Form: CommunityTokenDetailsForm, - schema: CommunityTokenSchema, - required: 'true', - }, - { - Form: YesVotePercentageForm, - schema: CommunityYesVotePercentageSchema, - required: 'true', - forCommunity: true, - }, - { Form: AddCouncilForm, schema: AddCouncilSchema, required: 'true' }, - { - Form: InviteMembersForm, - schema: InviteMembersSchema, - required: 'form.addCouncil', - }, - // { - // Form: YesVotePercentageForm, - // schema: CouncilYesVotePercentageSchema, - // required: 'true', - // forCouncil: true, - // }, - ] - - async function handleSubmit(formData: CommunityTokenForm) { - console.log('submit clicked') - setRequestPending(true) - try { - console.log('connection', connected, wallet) - if (!connected) { - if (wallet) await wallet.connect() - } - if (!wallet?.publicKey) { - throw new Error('No valid wallet connected') - } - - const programIdAddress = - formData?.programId || DEFAULT_GOVERNANCE_PROGRAM_ID - - const results = await createTokenizedRealm({ - wallet, - connection: connection.current, - programIdAddress, - realmName: formData.name, - // COMMUNITY INFO - tokensToGovernThreshold: - formData.minimumNumberOfCommunityTokensToGovern, - communityMintSupplyFactor: formData.communityMintSupplyFactor, - communityYesVotePercentage: formData.communityYesVotePercentage, - existingCommunityMintPk: formData.communityTokenMintAddress - ? new PublicKey(formData.communityTokenMintAddress) - : undefined, - transferCommunityMintAuthority: formData.transferCommunityMintAuthority, - // COUNCIL INFO - createCouncil: formData.addCouncil, - // councilVotePercentage: formData.communityYesVotePercentage, - existingCouncilMintPk: formData.councilTokenMintAddress - ? new PublicKey(formData.councilTokenMintAddress) - : undefined, - transferCouncilMintAuthority: formData.transferCouncilMintAuthority, - councilWalletPks: - formData?.memberAddresses?.map((w) => new PublicKey(w)) || [], - }) - - if (results) { - push( - fmtUrlWithCluster(`/dao/${results.realmPk.toBase58()}`), - undefined, - { shallow: true } - ) - } else { - throw new Error('Something bad happened during this request.') - } - } catch (error) { - setRequestPending(false) - const err = error as Error - console.log(error) - return notify({ - type: 'error', - message: err.message, - }) - } - } - - return ( - - ) -} diff --git a/pages/realms/new/multisig/index.tsx b/pages/realms/new/multisig/index.tsx deleted file mode 100644 index 416778e237..0000000000 --- a/pages/realms/new/multisig/index.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { useState } from 'react' -import { useRouter } from 'next/router' -import { PublicKey } from '@solana/web3.js' - -import useWalletStore from 'stores/useWalletStore' -import createMultisigWallet from 'actions/createMultisigWallet' - -import useQueryContext from '@hooks/useQueryContext' - -import { notify } from '@utils/notifications' - -import { DEFAULT_GOVERNANCE_PROGRAM_ID } from '@components/instructions/tools' - -import BasicDetailsForm, { - BasicDetailsSchema, - BasicDetails, -} from '@components/NewRealmWizard/components/steps/BasicDetailsForm' -import InviteMembersForm, { - InviteMembersSchema, - InviteMembers, -} from '@components/NewRealmWizard/components/steps/InviteMembersForm' -import YesVotePercentageForm, { - CouncilYesVotePercentageSchema, - CouncilYesVotePercentage, -} from '@components/NewRealmWizard/components/steps/YesVotePercentageThresholdForm' -import FormPage from '@components/NewRealmWizard/PageTemplate' - -export const FORM_NAME = 'multisig' - -type MultisigForm = BasicDetails & InviteMembers & CouncilYesVotePercentage - -export default function MultiSigWizard() { - const { connected, connection, current: wallet } = useWalletStore((s) => s) - const { push } = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const [requestPending, setRequestPending] = useState(false) - - const steps = [ - { Form: BasicDetailsForm, schema: BasicDetailsSchema, required: 'true' }, - { Form: InviteMembersForm, schema: InviteMembersSchema, required: 'true' }, - { - Form: YesVotePercentageForm, - schema: CouncilYesVotePercentageSchema, - required: 'true', - forCouncil: true, - }, - ] - - async function handleSubmit(formData: MultisigForm) { - console.log('submit clicked') - setRequestPending(true) - try { - console.log('connection', connected, wallet) - if (!connected) { - if (wallet) await wallet.connect() - } - if (!wallet?.publicKey) { - throw new Error('No valid wallet connected') - } - - const programIdAddress = - formData?.programId || DEFAULT_GOVERNANCE_PROGRAM_ID - - const results = await createMultisigWallet({ - wallet, - connection: connection.current, - programIdAddress, - - realmName: formData.name, - councilYesVotePercentage: formData.councilYesVotePercentage, - councilWalletPks: formData.memberAddresses.map((w) => new PublicKey(w)), - }) - - if (results) { - push( - fmtUrlWithCluster(`/dao/${results.realmPk.toBase58()}`), - undefined, - { shallow: true } - ) - } else { - throw new Error('Something bad happened during this request.') - } - } catch (error) { - setRequestPending(false) - const err = error as Error - console.log(error) - return notify({ - type: 'error', - message: err.message, - }) - } - } - - return ( - - ) -} diff --git a/pages/realms/new/nft/index.tsx b/pages/realms/new/nft/index.tsx deleted file mode 100644 index 7b4949d3f8..0000000000 --- a/pages/realms/new/nft/index.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import { useState } from 'react' -import { useRouter } from 'next/router' -import { PublicKey } from '@solana/web3.js' -import createNFTRealm from 'actions/createNFTRealm' -import { DEFAULT_GOVERNANCE_PROGRAM_ID } from '@components/instructions/tools' - -import useWalletStore from 'stores/useWalletStore' - -import useQueryContext from '@hooks/useQueryContext' - -import { notify } from '@utils/notifications' - -import BasicDetailsForm, { - BasicDetailsSchema, - BasicDetails, -} from '@components/NewRealmWizard/components/steps/BasicDetailsForm' -import AddNFTCollectionForm, { - AddNFTCollectionSchema, - AddNFTCollection, -} from '@components/NewRealmWizard/components/steps/AddNFTCollectionForm' -import AddCouncilForm, { - AddCouncilSchema, - AddCouncil, -} from '@components/NewRealmWizard/components/steps/AddCouncilForm' -import InviteMembersForm, { - InviteMembersSchema, - InviteMembers, -} from '@components/NewRealmWizard/components/steps/InviteMembersForm' - -import FormPage from '@components/NewRealmWizard/PageTemplate' - -export const FORM_NAME = 'nft' - -type NFTForm = BasicDetails & AddNFTCollection & AddCouncil & InviteMembers - -export default function NFTWizard() { - const { connected, connection, current: wallet } = useWalletStore((s) => s) - const { push } = useRouter() - const { fmtUrlWithCluster } = useQueryContext() - const [requestPending, setRequestPending] = useState(false) - - const steps = [ - { Form: BasicDetailsForm, schema: BasicDetailsSchema, required: 'true' }, - { - Form: AddNFTCollectionForm, - schema: AddNFTCollectionSchema, - required: 'true', - }, - { Form: AddCouncilForm, schema: AddCouncilSchema, required: 'true' }, - { - Form: InviteMembersForm, - schema: InviteMembersSchema, - required: 'form.addCouncil', - }, - ] - - async function handleSubmit(formData: NFTForm) { - console.log('submit clicked') - setRequestPending(true) - - try { - console.log('connection', connected) - if (!connected) { - if (wallet) await wallet.connect() - } - if (!wallet?.publicKey) { - throw new Error('No valid wallet connected') - } - - const programIdAddress = - formData?.programId || DEFAULT_GOVERNANCE_PROGRAM_ID - - const results = await createNFTRealm({ - wallet, - connection: connection.current, - programIdAddress, - - realmName: formData.name, - collectionAddress: formData.collectionKey, - collectionCount: formData.numberOfNFTs, - tokensToGovernThreshold: 1, // 1 NFT 1 vote - - existingCommunityMintPk: undefined, - communityYesVotePercentage: formData.communityYesVotePercentage, - - // COUNCIL INFO - createCouncil: formData.addCouncil, - // councilVotePercentage: formData.communityYesVotePercentage, - existingCouncilMintPk: formData.councilTokenMintAddress - ? new PublicKey(formData.councilTokenMintAddress) - : undefined, - transferCouncilMintAuthority: formData.transferCouncilMintAuthority, - councilWalletPks: - formData?.memberAddresses?.map((w) => new PublicKey(w)) || [], - }) - - if (results) { - push( - fmtUrlWithCluster(`/dao/${results.realmPk.toBase58()}`), - undefined, - { shallow: true } - ) - } else { - throw new Error('Something bad happened during this request.') - } - } catch (error) { - setRequestPending(false) - const err = error as Error - console.log(error) - return notify({ - type: 'error', - message: err.message, - }) - } - } - - return ( - - ) -} diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 5aa4450a35..0000000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - 'postcss-preset-env': { stage: 1 }, - }, -} diff --git a/public/browserconfig.xml b/public/browserconfig.xml deleted file mode 100644 index d1d3ffa9c9..0000000000 --- a/public/browserconfig.xml +++ /dev/null @@ -1,2 +0,0 @@ - -#ffffff \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 3c2e1ae52e..0000000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/favicons/android-icon-144x144.png b/public/favicons/android-icon-144x144.png deleted file mode 100644 index 73121c0275..0000000000 Binary files a/public/favicons/android-icon-144x144.png and /dev/null differ diff --git a/public/favicons/android-icon-192x192.png b/public/favicons/android-icon-192x192.png deleted file mode 100644 index dc1da2b089..0000000000 Binary files a/public/favicons/android-icon-192x192.png and /dev/null differ diff --git a/public/favicons/android-icon-36x36.png b/public/favicons/android-icon-36x36.png deleted file mode 100644 index 59d6083442..0000000000 Binary files a/public/favicons/android-icon-36x36.png and /dev/null differ diff --git a/public/favicons/android-icon-48x48.png b/public/favicons/android-icon-48x48.png deleted file mode 100644 index c0e60b2e09..0000000000 Binary files a/public/favicons/android-icon-48x48.png and /dev/null differ diff --git a/public/favicons/android-icon-72x72.png b/public/favicons/android-icon-72x72.png deleted file mode 100644 index 2a03affcb6..0000000000 Binary files a/public/favicons/android-icon-72x72.png and /dev/null differ diff --git a/public/favicons/android-icon-96x96.png b/public/favicons/android-icon-96x96.png deleted file mode 100644 index c7f047a5df..0000000000 Binary files a/public/favicons/android-icon-96x96.png and /dev/null differ diff --git a/public/favicons/apple-icon-114x114.png b/public/favicons/apple-icon-114x114.png deleted file mode 100644 index 72c40b98bd..0000000000 Binary files a/public/favicons/apple-icon-114x114.png and /dev/null differ diff --git a/public/favicons/apple-icon-120x120.png b/public/favicons/apple-icon-120x120.png deleted file mode 100644 index 4bfc07b002..0000000000 Binary files a/public/favicons/apple-icon-120x120.png and /dev/null differ diff --git a/public/favicons/apple-icon-144x144.png b/public/favicons/apple-icon-144x144.png deleted file mode 100644 index 73121c0275..0000000000 Binary files a/public/favicons/apple-icon-144x144.png and /dev/null differ diff --git a/public/favicons/apple-icon-152x152.png b/public/favicons/apple-icon-152x152.png deleted file mode 100644 index d73eaf3c3d..0000000000 Binary files a/public/favicons/apple-icon-152x152.png and /dev/null differ diff --git a/public/favicons/apple-icon-180x180.png b/public/favicons/apple-icon-180x180.png deleted file mode 100644 index e6bc458e53..0000000000 Binary files a/public/favicons/apple-icon-180x180.png and /dev/null differ diff --git a/public/favicons/apple-icon-57x57.png b/public/favicons/apple-icon-57x57.png deleted file mode 100644 index 15e2771153..0000000000 Binary files a/public/favicons/apple-icon-57x57.png and /dev/null differ diff --git a/public/favicons/apple-icon-60x60.png b/public/favicons/apple-icon-60x60.png deleted file mode 100644 index 6b5805e51e..0000000000 Binary files a/public/favicons/apple-icon-60x60.png and /dev/null differ diff --git a/public/favicons/apple-icon-72x72.png b/public/favicons/apple-icon-72x72.png deleted file mode 100644 index 2a03affcb6..0000000000 Binary files a/public/favicons/apple-icon-72x72.png and /dev/null differ diff --git a/public/favicons/apple-icon-76x76.png b/public/favicons/apple-icon-76x76.png deleted file mode 100644 index f165517e2b..0000000000 Binary files a/public/favicons/apple-icon-76x76.png and /dev/null differ diff --git a/public/favicons/apple-icon-precomposed.png b/public/favicons/apple-icon-precomposed.png deleted file mode 100644 index 20be142f6e..0000000000 Binary files a/public/favicons/apple-icon-precomposed.png and /dev/null differ diff --git a/public/favicons/apple-icon.png b/public/favicons/apple-icon.png deleted file mode 100644 index 20be142f6e..0000000000 Binary files a/public/favicons/apple-icon.png and /dev/null differ diff --git a/public/favicons/favicon-16x16.png b/public/favicons/favicon-16x16.png deleted file mode 100644 index c80b8dcf8b..0000000000 Binary files a/public/favicons/favicon-16x16.png and /dev/null differ diff --git a/public/favicons/favicon-32x32.png b/public/favicons/favicon-32x32.png deleted file mode 100644 index 6fdaead42d..0000000000 Binary files a/public/favicons/favicon-32x32.png and /dev/null differ diff --git a/public/favicons/favicon-96x96.png b/public/favicons/favicon-96x96.png deleted file mode 100644 index c7f047a5df..0000000000 Binary files a/public/favicons/favicon-96x96.png and /dev/null differ diff --git a/public/favicons/ms-icon-144x144.png b/public/favicons/ms-icon-144x144.png deleted file mode 100644 index 73121c0275..0000000000 Binary files a/public/favicons/ms-icon-144x144.png and /dev/null differ diff --git a/public/favicons/ms-icon-150x150.png b/public/favicons/ms-icon-150x150.png deleted file mode 100644 index cbf49ac41e..0000000000 Binary files a/public/favicons/ms-icon-150x150.png and /dev/null differ diff --git a/public/favicons/ms-icon-310x310.png b/public/favicons/ms-icon-310x310.png deleted file mode 100644 index 8d4c38ded9..0000000000 Binary files a/public/favicons/ms-icon-310x310.png and /dev/null differ diff --git a/public/favicons/ms-icon-70x70.png b/public/favicons/ms-icon-70x70.png deleted file mode 100644 index f60c0557d5..0000000000 Binary files a/public/favicons/ms-icon-70x70.png and /dev/null differ diff --git a/public/fonts/Ambit-Black.woff b/public/fonts/Ambit-Black.woff deleted file mode 100644 index aa30d68ba9..0000000000 Binary files a/public/fonts/Ambit-Black.woff and /dev/null differ diff --git a/public/fonts/Ambit-Black.woff2 b/public/fonts/Ambit-Black.woff2 deleted file mode 100644 index 0939b36ff1..0000000000 Binary files a/public/fonts/Ambit-Black.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-BlackItalic.woff b/public/fonts/Ambit-BlackItalic.woff deleted file mode 100644 index 30def39573..0000000000 Binary files a/public/fonts/Ambit-BlackItalic.woff and /dev/null differ diff --git a/public/fonts/Ambit-BlackItalic.woff2 b/public/fonts/Ambit-BlackItalic.woff2 deleted file mode 100644 index c82e5fbae2..0000000000 Binary files a/public/fonts/Ambit-BlackItalic.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-Bold.woff b/public/fonts/Ambit-Bold.woff deleted file mode 100644 index 8f4bb3e90b..0000000000 Binary files a/public/fonts/Ambit-Bold.woff and /dev/null differ diff --git a/public/fonts/Ambit-Bold.woff2 b/public/fonts/Ambit-Bold.woff2 deleted file mode 100644 index ef03acedc2..0000000000 Binary files a/public/fonts/Ambit-Bold.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-BoldItalic.woff b/public/fonts/Ambit-BoldItalic.woff deleted file mode 100644 index 8e74a84bf7..0000000000 Binary files a/public/fonts/Ambit-BoldItalic.woff and /dev/null differ diff --git a/public/fonts/Ambit-BoldItalic.woff2 b/public/fonts/Ambit-BoldItalic.woff2 deleted file mode 100644 index 6d568bdf1a..0000000000 Binary files a/public/fonts/Ambit-BoldItalic.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-ExtraLight.woff b/public/fonts/Ambit-ExtraLight.woff deleted file mode 100644 index 914839481a..0000000000 Binary files a/public/fonts/Ambit-ExtraLight.woff and /dev/null differ diff --git a/public/fonts/Ambit-ExtraLight.woff2 b/public/fonts/Ambit-ExtraLight.woff2 deleted file mode 100644 index 8d1b382dca..0000000000 Binary files a/public/fonts/Ambit-ExtraLight.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-ExtraLightItalic.woff b/public/fonts/Ambit-ExtraLightItalic.woff deleted file mode 100644 index 0db36744b6..0000000000 Binary files a/public/fonts/Ambit-ExtraLightItalic.woff and /dev/null differ diff --git a/public/fonts/Ambit-ExtraLightItalic.woff2 b/public/fonts/Ambit-ExtraLightItalic.woff2 deleted file mode 100644 index 0f86924d58..0000000000 Binary files a/public/fonts/Ambit-ExtraLightItalic.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-Italic.woff b/public/fonts/Ambit-Italic.woff deleted file mode 100644 index afa3ffc3bd..0000000000 Binary files a/public/fonts/Ambit-Italic.woff and /dev/null differ diff --git a/public/fonts/Ambit-Italic.woff2 b/public/fonts/Ambit-Italic.woff2 deleted file mode 100644 index fda90ceb9c..0000000000 Binary files a/public/fonts/Ambit-Italic.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-Light.woff b/public/fonts/Ambit-Light.woff deleted file mode 100644 index 1b6b235413..0000000000 Binary files a/public/fonts/Ambit-Light.woff and /dev/null differ diff --git a/public/fonts/Ambit-Light.woff2 b/public/fonts/Ambit-Light.woff2 deleted file mode 100644 index 4a2232c89e..0000000000 Binary files a/public/fonts/Ambit-Light.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-LightItalic.woff b/public/fonts/Ambit-LightItalic.woff deleted file mode 100644 index 339941d43e..0000000000 Binary files a/public/fonts/Ambit-LightItalic.woff and /dev/null differ diff --git a/public/fonts/Ambit-LightItalic.woff2 b/public/fonts/Ambit-LightItalic.woff2 deleted file mode 100644 index b0e8d9aeca..0000000000 Binary files a/public/fonts/Ambit-LightItalic.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-Regular.woff b/public/fonts/Ambit-Regular.woff deleted file mode 100644 index cf6853e83b..0000000000 Binary files a/public/fonts/Ambit-Regular.woff and /dev/null differ diff --git a/public/fonts/Ambit-Regular.woff2 b/public/fonts/Ambit-Regular.woff2 deleted file mode 100644 index 0e6f3eb28d..0000000000 Binary files a/public/fonts/Ambit-Regular.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-SemiBold.woff b/public/fonts/Ambit-SemiBold.woff deleted file mode 100644 index 820d444d2c..0000000000 Binary files a/public/fonts/Ambit-SemiBold.woff and /dev/null differ diff --git a/public/fonts/Ambit-SemiBold.woff2 b/public/fonts/Ambit-SemiBold.woff2 deleted file mode 100644 index e02b52e141..0000000000 Binary files a/public/fonts/Ambit-SemiBold.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-SemiBoldItalic.woff b/public/fonts/Ambit-SemiBoldItalic.woff deleted file mode 100644 index 74ee5a1ab7..0000000000 Binary files a/public/fonts/Ambit-SemiBoldItalic.woff and /dev/null differ diff --git a/public/fonts/Ambit-SemiBoldItalic.woff2 b/public/fonts/Ambit-SemiBoldItalic.woff2 deleted file mode 100644 index 36a562b018..0000000000 Binary files a/public/fonts/Ambit-SemiBoldItalic.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-Thin.woff b/public/fonts/Ambit-Thin.woff deleted file mode 100644 index 5079af49b4..0000000000 Binary files a/public/fonts/Ambit-Thin.woff and /dev/null differ diff --git a/public/fonts/Ambit-Thin.woff2 b/public/fonts/Ambit-Thin.woff2 deleted file mode 100644 index 623b2dd8bb..0000000000 Binary files a/public/fonts/Ambit-Thin.woff2 and /dev/null differ diff --git a/public/fonts/Ambit-ThinItalic.woff b/public/fonts/Ambit-ThinItalic.woff deleted file mode 100644 index 54c55497b3..0000000000 Binary files a/public/fonts/Ambit-ThinItalic.woff and /dev/null differ diff --git a/public/fonts/Ambit-ThinItalic.woff2 b/public/fonts/Ambit-ThinItalic.woff2 deleted file mode 100644 index 1d4c558c81..0000000000 Binary files a/public/fonts/Ambit-ThinItalic.woff2 and /dev/null differ diff --git a/public/icons/council-icon.svg b/public/icons/council-icon.svg deleted file mode 100644 index 3f4bdda749..0000000000 --- a/public/icons/council-icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/council-members-icon.svg b/public/icons/council-members-icon.svg deleted file mode 100644 index 2b7c92b0db..0000000000 --- a/public/icons/council-members-icon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/icons/discord.svg b/public/icons/discord.svg deleted file mode 100644 index 5b98cf4b8f..0000000000 --- a/public/icons/discord.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/public/icons/github.svg b/public/icons/github.svg deleted file mode 100644 index c1d56f44ed..0000000000 --- a/public/icons/github.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/mngo.svg b/public/icons/mngo.svg deleted file mode 100644 index 4cd03cf154..0000000000 --- a/public/icons/mngo.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/icons/nft-icon.svg b/public/icons/nft-icon.svg deleted file mode 100644 index 43f9942d23..0000000000 --- a/public/icons/nft-icon.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/public/icons/threshold-icon.svg b/public/icons/threshold-icon.svg deleted file mode 100644 index a660d59071..0000000000 --- a/public/icons/threshold-icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/icons/twitter.svg b/public/icons/twitter.svg deleted file mode 100644 index 5f78b2e0eb..0000000000 --- a/public/icons/twitter.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/public/icons/usdc.svg b/public/icons/usdc.svg deleted file mode 100644 index 6634c087e1..0000000000 --- a/public/icons/usdc.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/public/img/bg-desktop.png b/public/img/bg-desktop.png deleted file mode 100644 index e64936748b..0000000000 Binary files a/public/img/bg-desktop.png and /dev/null differ diff --git a/public/img/bg-mobile.png b/public/img/bg-mobile.png deleted file mode 100644 index 9d3e17fead..0000000000 Binary files a/public/img/bg-mobile.png and /dev/null differ diff --git a/public/img/bg-quorum-all-sizes.png b/public/img/bg-quorum-all-sizes.png deleted file mode 100644 index 6499a55532..0000000000 Binary files a/public/img/bg-quorum-all-sizes.png and /dev/null differ diff --git a/public/img/collectablesIcon.svg b/public/img/collectablesIcon.svg deleted file mode 100644 index 20667e6cc9..0000000000 --- a/public/img/collectablesIcon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/img/creation-bg-desktop.png b/public/img/creation-bg-desktop.png deleted file mode 100644 index aca5befe78..0000000000 Binary files a/public/img/creation-bg-desktop.png and /dev/null differ diff --git a/public/img/logo-realms.svg b/public/img/logo-realms.svg deleted file mode 100644 index 09cff225ec..0000000000 --- a/public/img/logo-realms.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/public/img/logotype-realms-blue-white.svg b/public/img/logotype-realms-blue-white.svg deleted file mode 100644 index 9b084578db..0000000000 --- a/public/img/logotype-realms-blue-white.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/public/img/nft-logo.jpeg b/public/img/nft-logo.jpeg deleted file mode 100644 index 3e20ca58e1..0000000000 Binary files a/public/img/nft-logo.jpeg and /dev/null differ diff --git a/public/img/solana-logo.svg b/public/img/solana-logo.svg deleted file mode 100644 index f7f376886b..0000000000 --- a/public/img/solana-logo.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index c906975576..0000000000 --- a/public/manifest.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "Realms", - "icons": [ - { - "src": "\/favicons\/android-icon-36x36.png", - "sizes": "36x36", - "type": "image\/png", - "density": "0.75" - }, - { - "src": "\/favicons\/android-icon-48x48.png", - "sizes": "48x48", - "type": "image\/png", - "density": "1.0" - }, - { - "src": "\/favicons\/android-icon-72x72.png", - "sizes": "72x72", - "type": "image\/png", - "density": "1.5" - }, - { - "src": "\/favicons\/android-icon-96x96.png", - "sizes": "96x96", - "type": "image\/png", - "density": "2.0" - }, - { - "src": "\/favicons\/android-icon-144x144.png", - "sizes": "144x144", - "type": "image\/png", - "density": "3.0" - }, - { - "src": "\/favicons\/android-icon-192x192.png", - "sizes": "192x192", - "type": "image\/png", - "density": "4.0" - } - ] -} \ No newline at end of file diff --git a/public/realms/1SolDAO/img/1SolDAO-logo.svg b/public/realms/1SolDAO/img/1SolDAO-logo.svg deleted file mode 100644 index 61b708e7f6..0000000000 --- a/public/realms/1SolDAO/img/1SolDAO-logo.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/realms/21DAO/img/21dao_icon.png b/public/realms/21DAO/img/21dao_icon.png deleted file mode 100644 index 94547225c3..0000000000 Binary files a/public/realms/21DAO/img/21dao_icon.png and /dev/null differ diff --git a/public/realms/ALLOVR/favicon.ico b/public/realms/ALLOVR/favicon.ico deleted file mode 100644 index 3097975551..0000000000 Binary files a/public/realms/ALLOVR/favicon.ico and /dev/null differ diff --git a/public/realms/Astra/AstraPodcastLogo.png b/public/realms/Astra/AstraPodcastLogo.png deleted file mode 100644 index cb42dac3b7..0000000000 Binary files a/public/realms/Astra/AstraPodcastLogo.png and /dev/null differ diff --git a/public/realms/BFNC/img/logo.png b/public/realms/BFNC/img/logo.png deleted file mode 100644 index 9ee1858345..0000000000 Binary files a/public/realms/BFNC/img/logo.png and /dev/null differ diff --git a/public/realms/Bears/img/bearlogo.png b/public/realms/Bears/img/bearlogo.png deleted file mode 100644 index c4a08d5f5b..0000000000 Binary files a/public/realms/Bears/img/bearlogo.png and /dev/null differ diff --git a/public/realms/COCK/img/chicken_tribe_logo.jpeg b/public/realms/COCK/img/chicken_tribe_logo.jpeg deleted file mode 100644 index 4d633af939..0000000000 Binary files a/public/realms/COCK/img/chicken_tribe_logo.jpeg and /dev/null differ diff --git a/public/realms/Chiao/img/chiao.png b/public/realms/Chiao/img/chiao.png deleted file mode 100644 index 798b3bb501..0000000000 Binary files a/public/realms/Chiao/img/chiao.png and /dev/null differ diff --git a/public/realms/CreatedBy/CreatedBy.png b/public/realms/CreatedBy/CreatedBy.png deleted file mode 100644 index 7697792eb7..0000000000 Binary files a/public/realms/CreatedBy/CreatedBy.png and /dev/null differ diff --git a/public/realms/DAINV/img/DAI_LOGO_2.png b/public/realms/DAINV/img/DAI_LOGO_2.png deleted file mode 100644 index d849d2b434..0000000000 Binary files a/public/realms/DAINV/img/DAI_LOGO_2.png and /dev/null differ diff --git a/public/realms/DAKU/img/daku_logo.png b/public/realms/DAKU/img/daku_logo.png deleted file mode 100644 index aca6d6c2ab..0000000000 Binary files a/public/realms/DAKU/img/daku_logo.png and /dev/null differ diff --git a/public/realms/EverSol/img/EverSol_Banner.jpg b/public/realms/EverSol/img/EverSol_Banner.jpg deleted file mode 100644 index f32b94013e..0000000000 Binary files a/public/realms/EverSol/img/EverSol_Banner.jpg and /dev/null differ diff --git a/public/realms/EverSol/img/EverSol_Logo.png b/public/realms/EverSol/img/EverSol_Logo.png deleted file mode 100644 index 37e87ff450..0000000000 Binary files a/public/realms/EverSol/img/EverSol_Logo.png and /dev/null differ diff --git a/public/realms/FAFD/img/fafd_logo.png b/public/realms/FAFD/img/fafd_logo.png deleted file mode 100644 index cdd04a2f6b..0000000000 Binary files a/public/realms/FAFD/img/fafd_logo.png and /dev/null differ diff --git a/public/realms/FyfyDAO/img/logo.png b/public/realms/FyfyDAO/img/logo.png deleted file mode 100644 index ebdceec9e6..0000000000 Binary files a/public/realms/FyfyDAO/img/logo.png and /dev/null differ diff --git a/public/realms/GoblinGold/img/logo.png b/public/realms/GoblinGold/img/logo.png deleted file mode 100644 index 5c82c9ff6a..0000000000 Binary files a/public/realms/GoblinGold/img/logo.png and /dev/null differ diff --git a/public/realms/Governance/img/spl-governance-logo.svg b/public/realms/Governance/img/spl-governance-logo.svg deleted file mode 100644 index c6855f2d8a..0000000000 --- a/public/realms/Governance/img/spl-governance-logo.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/public/realms/Grape/img/grape.png b/public/realms/Grape/img/grape.png deleted file mode 100644 index dbfc32c813..0000000000 Binary files a/public/realms/Grape/img/grape.png and /dev/null differ diff --git a/public/realms/IADAO/img/IA-DAO_LOGO.png b/public/realms/IADAO/img/IA-DAO_LOGO.png deleted file mode 100644 index 92223cd14d..0000000000 Binary files a/public/realms/IADAO/img/IA-DAO_LOGO.png and /dev/null differ diff --git a/public/realms/Ikohaus/img/Ikohaus_Logo.png b/public/realms/Ikohaus/img/Ikohaus_Logo.png deleted file mode 100644 index 2a96a37a3b..0000000000 Binary files a/public/realms/Ikohaus/img/Ikohaus_Logo.png and /dev/null differ diff --git a/public/realms/Kiwi/img/kiwi_logo.png b/public/realms/Kiwi/img/kiwi_logo.png deleted file mode 100644 index 4986d797f2..0000000000 Binary files a/public/realms/Kiwi/img/kiwi_logo.png and /dev/null differ diff --git a/public/realms/KiwiDAO/img/kiwi_logo.png b/public/realms/KiwiDAO/img/kiwi_logo.png deleted file mode 100644 index e8ae7a5171..0000000000 Binary files a/public/realms/KiwiDAO/img/kiwi_logo.png and /dev/null differ diff --git a/public/realms/LeDao/img/leDao-logo.png b/public/realms/LeDao/img/leDao-logo.png deleted file mode 100644 index 98d9b883cf..0000000000 Binary files a/public/realms/LeDao/img/leDao-logo.png and /dev/null differ diff --git a/public/realms/MMCC/img/MMCC_Logo.png b/public/realms/MMCC/img/MMCC_Logo.png deleted file mode 100644 index 751af0eeb5..0000000000 Binary files a/public/realms/MMCC/img/MMCC_Logo.png and /dev/null differ diff --git a/public/realms/MNDE/img/mnde_logo.png b/public/realms/MNDE/img/mnde_logo.png deleted file mode 100644 index 34ee55e301..0000000000 Binary files a/public/realms/MNDE/img/mnde_logo.png and /dev/null differ diff --git a/public/realms/MNGO/favicon.ico b/public/realms/MNGO/favicon.ico deleted file mode 100644 index 1cc6a0a436..0000000000 Binary files a/public/realms/MNGO/favicon.ico and /dev/null differ diff --git a/public/realms/MNGO/img/logo.svg b/public/realms/MNGO/img/logo.svg deleted file mode 100644 index 48c6e28a47..0000000000 --- a/public/realms/MNGO/img/logo.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/realms/MasoorDAO/MasoorDAO.png b/public/realms/MasoorDAO/MasoorDAO.png deleted file mode 100644 index 01bbe038c3..0000000000 Binary files a/public/realms/MasoorDAO/MasoorDAO.png and /dev/null differ diff --git a/public/realms/MonkOG/img/ogemoji.png b/public/realms/MonkOG/img/ogemoji.png deleted file mode 100644 index 9e7607c633..0000000000 Binary files a/public/realms/MonkOG/img/ogemoji.png and /dev/null differ diff --git a/public/realms/MonkeDAO/img/MonkeDAO_logo.png b/public/realms/MonkeDAO/img/MonkeDAO_logo.png deleted file mode 100644 index 5df09072fb..0000000000 Binary files a/public/realms/MonkeDAO/img/MonkeDAO_logo.png and /dev/null differ diff --git a/public/realms/MontanaLand/img/logo.png b/public/realms/MontanaLand/img/logo.png deleted file mode 100644 index c91114b98c..0000000000 Binary files a/public/realms/MontanaLand/img/logo.png and /dev/null differ diff --git a/public/realms/MorDAO/img/logo.svg b/public/realms/MorDAO/img/logo.svg deleted file mode 100644 index cbe571ff8e..0000000000 --- a/public/realms/MorDAO/img/logo.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/public/realms/N&F/img/Nick-banner.jpeg b/public/realms/N&F/img/Nick-banner.jpeg deleted file mode 100644 index 63ec372537..0000000000 Binary files a/public/realms/N&F/img/Nick-banner.jpeg and /dev/null differ diff --git a/public/realms/N&F/img/Nick.png b/public/realms/N&F/img/Nick.png deleted file mode 100644 index e76578c996..0000000000 Binary files a/public/realms/N&F/img/Nick.png and /dev/null differ diff --git a/public/realms/NFT4CauseDAO/img/logo.png b/public/realms/NFT4CauseDAO/img/logo.png deleted file mode 100644 index 437daa8ff5..0000000000 Binary files a/public/realms/NFT4CauseDAO/img/logo.png and /dev/null differ diff --git a/public/realms/NFTClubBerlin/img/logo.png b/public/realms/NFTClubBerlin/img/logo.png deleted file mode 100644 index 01a2e9fdfc..0000000000 Binary files a/public/realms/NFTClubBerlin/img/logo.png and /dev/null differ diff --git a/public/realms/NFTOFFROADFANCLUB/img/logo.png b/public/realms/NFTOFFROADFANCLUB/img/logo.png deleted file mode 100644 index 673356459f..0000000000 Binary files a/public/realms/NFTOFFROADFANCLUB/img/logo.png and /dev/null differ diff --git a/public/realms/NeoFairies/img/logo.png b/public/realms/NeoFairies/img/logo.png deleted file mode 100644 index c248daf63d..0000000000 Binary files a/public/realms/NeoFairies/img/logo.png and /dev/null differ diff --git a/public/realms/NoGoal/img/ino-128.png b/public/realms/NoGoal/img/ino-128.png deleted file mode 100644 index fdba028ace..0000000000 Binary files a/public/realms/NoGoal/img/ino-128.png and /dev/null differ diff --git a/public/realms/PANDA/img/PandaDAOlogo.png b/public/realms/PANDA/img/PandaDAOlogo.png deleted file mode 100644 index 45e395c769..0000000000 Binary files a/public/realms/PANDA/img/PandaDAOlogo.png and /dev/null differ diff --git a/public/realms/PYTH/favicon.ico b/public/realms/PYTH/favicon.ico deleted file mode 100644 index ac4f1c2869..0000000000 Binary files a/public/realms/PYTH/favicon.ico and /dev/null differ diff --git a/public/realms/PYTH/img/pyth.svg b/public/realms/PYTH/img/pyth.svg deleted file mode 100644 index 37f7276db5..0000000000 --- a/public/realms/PYTH/img/pyth.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/public/realms/PhoenixDAO/phoenixdao_logo.png b/public/realms/PhoenixDAO/phoenixdao_logo.png deleted file mode 100644 index 8070507828..0000000000 Binary files a/public/realms/PhoenixDAO/phoenixdao_logo.png and /dev/null differ diff --git a/public/realms/PixelBands/img/pixel_bands_log.png b/public/realms/PixelBands/img/pixel_bands_log.png deleted file mode 100644 index 21eeeae089..0000000000 Binary files a/public/realms/PixelBands/img/pixel_bands_log.png and /dev/null differ diff --git a/public/realms/PoorDao/img/archer.png b/public/realms/PoorDao/img/archer.png deleted file mode 100644 index 85a7ac4cb9..0000000000 Binary files a/public/realms/PoorDao/img/archer.png and /dev/null differ diff --git a/public/realms/RAIN/img/rain_logo.png b/public/realms/RAIN/img/rain_logo.png deleted file mode 100644 index 539cce17ec..0000000000 Binary files a/public/realms/RAIN/img/rain_logo.png and /dev/null differ diff --git a/public/realms/RED/RED.png b/public/realms/RED/RED.png deleted file mode 100644 index b272c0ce95..0000000000 Binary files a/public/realms/RED/RED.png and /dev/null differ diff --git a/public/realms/RIBS/img/lion_logo.png b/public/realms/RIBS/img/lion_logo.png deleted file mode 100644 index 2d861f201a..0000000000 Binary files a/public/realms/RIBS/img/lion_logo.png and /dev/null differ diff --git a/public/realms/RRADAO/rradao_logo.jpg b/public/realms/RRADAO/rradao_logo.jpg deleted file mode 100644 index 3a653ea449..0000000000 Binary files a/public/realms/RRADAO/rradao_logo.jpg and /dev/null differ diff --git a/public/realms/RadRugsDAO/img/RadRugsDAO.png b/public/realms/RadRugsDAO/img/RadRugsDAO.png deleted file mode 100644 index 82c072a114..0000000000 Binary files a/public/realms/RadRugsDAO/img/RadRugsDAO.png and /dev/null differ diff --git a/public/realms/Renpo/img/renpo_logo.png b/public/realms/Renpo/img/renpo_logo.png deleted file mode 100644 index ab7d1a6c6e..0000000000 Binary files a/public/realms/Renpo/img/renpo_logo.png and /dev/null differ diff --git a/public/realms/SBYCDAO/img/logo.png b/public/realms/SBYCDAO/img/logo.png deleted file mode 100644 index e148ef00ce..0000000000 Binary files a/public/realms/SBYCDAO/img/logo.png and /dev/null differ diff --git a/public/realms/SCTF1/img/sctf1.svg b/public/realms/SCTF1/img/sctf1.svg deleted file mode 100644 index d749bdebbb..0000000000 --- a/public/realms/SCTF1/img/sctf1.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/public/realms/SF/img/succeedfinance.png b/public/realms/SF/img/succeedfinance.png deleted file mode 100644 index 4288a72be2..0000000000 Binary files a/public/realms/SF/img/succeedfinance.png and /dev/null differ diff --git a/public/realms/SNY/img/synthetify_logo_green.svg b/public/realms/SNY/img/synthetify_logo_green.svg deleted file mode 100644 index ab67ca7f46..0000000000 --- a/public/realms/SNY/img/synthetify_logo_green.svg +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/realms/SOLI/soli_logo.png b/public/realms/SOLI/soli_logo.png deleted file mode 100644 index e9888dad90..0000000000 Binary files a/public/realms/SOLI/soli_logo.png and /dev/null differ diff --git a/public/realms/SamoDAO/SamoDAO.png b/public/realms/SamoDAO/SamoDAO.png deleted file mode 100644 index cef0cddabf..0000000000 Binary files a/public/realms/SamoDAO/SamoDAO.png and /dev/null differ diff --git a/public/realms/StreamDAO/img/stream_dao.png b/public/realms/StreamDAO/img/stream_dao.png deleted file mode 100644 index 4231615046..0000000000 Binary files a/public/realms/StreamDAO/img/stream_dao.png and /dev/null differ diff --git a/public/realms/TheOxSquad/img/TheOxSquad.png b/public/realms/TheOxSquad/img/TheOxSquad.png deleted file mode 100644 index cb126c5903..0000000000 Binary files a/public/realms/TheOxSquad/img/TheOxSquad.png and /dev/null differ diff --git a/public/realms/TheOxSquad/img/TheOxSquad_banner.jpeg b/public/realms/TheOxSquad/img/TheOxSquad_banner.jpeg deleted file mode 100644 index c86aede10a..0000000000 Binary files a/public/realms/TheOxSquad/img/TheOxSquad_banner.jpeg and /dev/null differ diff --git a/public/realms/TheSporagers/img/the_sporagers.png b/public/realms/TheSporagers/img/the_sporagers.png deleted file mode 100644 index 9f9fd78736..0000000000 Binary files a/public/realms/TheSporagers/img/the_sporagers.png and /dev/null differ diff --git a/public/realms/TheSporagers/img/the_sporagers_banner.jpeg b/public/realms/TheSporagers/img/the_sporagers_banner.jpeg deleted file mode 100644 index 13d569b916..0000000000 Binary files a/public/realms/TheSporagers/img/the_sporagers_banner.jpeg and /dev/null differ diff --git a/public/realms/UNDER/logo.png b/public/realms/UNDER/logo.png deleted file mode 100644 index 859d910d94..0000000000 Binary files a/public/realms/UNDER/logo.png and /dev/null differ diff --git a/public/realms/UNQ/img/UNQ-logo.png b/public/realms/UNQ/img/UNQ-logo.png deleted file mode 100644 index 162234c11b..0000000000 Binary files a/public/realms/UNQ/img/UNQ-logo.png and /dev/null differ diff --git a/public/realms/UXP/favicon.ico b/public/realms/UXP/favicon.ico deleted file mode 100644 index f934da5de0..0000000000 Binary files a/public/realms/UXP/favicon.ico and /dev/null differ diff --git a/public/realms/UXP/img/UXP-Black.png b/public/realms/UXP/img/UXP-Black.png deleted file mode 100644 index 53c469f3d8..0000000000 Binary files a/public/realms/UXP/img/UXP-Black.png and /dev/null differ diff --git a/public/realms/Ukraine/img/Flag_of_Ukraine.svg b/public/realms/Ukraine/img/Flag_of_Ukraine.svg deleted file mode 100644 index 8f4b0a436a..0000000000 --- a/public/realms/Ukraine/img/Flag_of_Ukraine.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/public/realms/Ukraine/img/Ukraine_Logo.png b/public/realms/Ukraine/img/Ukraine_Logo.png deleted file mode 100644 index bd9139598f..0000000000 Binary files a/public/realms/Ukraine/img/Ukraine_Logo.png and /dev/null differ diff --git a/public/realms/UkraineUnchained/img/ukraine_unchained.png b/public/realms/UkraineUnchained/img/ukraine_unchained.png deleted file mode 100644 index feb73bfa66..0000000000 Binary files a/public/realms/UkraineUnchained/img/ukraine_unchained.png and /dev/null differ diff --git a/public/realms/UkraineUnchained/img/ukraine_unchained_banner.jpeg b/public/realms/UkraineUnchained/img/ukraine_unchained_banner.jpeg deleted file mode 100644 index d149c5d1fa..0000000000 Binary files a/public/realms/UkraineUnchained/img/ukraine_unchained_banner.jpeg and /dev/null differ diff --git a/public/realms/WezeshaDAO/img/wezesha_dao_logo.png b/public/realms/WezeshaDAO/img/wezesha_dao_logo.png deleted file mode 100644 index d93ce45a26..0000000000 Binary files a/public/realms/WezeshaDAO/img/wezesha_dao_logo.png and /dev/null differ diff --git a/public/realms/WoofDAO/img/wooflogo.png b/public/realms/WoofDAO/img/wooflogo.png deleted file mode 100644 index 8138ecac2e..0000000000 Binary files a/public/realms/WoofDAO/img/wooflogo.png and /dev/null differ diff --git a/public/realms/XAPE/img/logo_xape_nobckg.png b/public/realms/XAPE/img/logo_xape_nobckg.png deleted file mode 100644 index 787aba29a9..0000000000 Binary files a/public/realms/XAPE/img/logo_xape_nobckg.png and /dev/null differ diff --git a/public/realms/XAPE/img/xapes_logo.png b/public/realms/XAPE/img/xapes_logo.png deleted file mode 100644 index 9dfac3f768..0000000000 Binary files a/public/realms/XAPE/img/xapes_logo.png and /dev/null differ diff --git a/public/realms/XPWizards/img/xpwizlogo.png b/public/realms/XPWizards/img/xpwizlogo.png deleted file mode 100644 index d3178fd8f4..0000000000 Binary files a/public/realms/XPWizards/img/xpwizlogo.png and /dev/null differ diff --git a/public/realms/blueterra/img/logo.png b/public/realms/blueterra/img/logo.png deleted file mode 100644 index e05539329e..0000000000 Binary files a/public/realms/blueterra/img/logo.png and /dev/null differ diff --git a/public/realms/devnet.json b/public/realms/devnet.json deleted file mode 100644 index 024aa9b88b..0000000000 --- a/public/realms/devnet.json +++ /dev/null @@ -1,182 +0,0 @@ -[ - { - "symbol": "UNQ", - "displayName": "UNQ Universe", - "programId": "GTesTBiEWE32WHXXE2S4XbZvA5CrEc4xs6ZgRe895dP", - "realmId": "HVywtno57PwcgWQzRaf3Pv8RKWWrF1zoqLZGULNC2jGm", - "ogImage": "/realms/UNQ/img/UNQ-logo.png" - }, - { - "symbol": "MNGO", - "displayName": "Mango DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "H2iny4dUP2ngt9p4niUWVX4TKvr1h9eSWGNdP1zvwzNQ", - "website": "https://mango.markets", - "keywords": "Mango Markets, REALM, Governance, Serum, SRM, Serum DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, ERC20, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, Trading, Fastest, Fast, SerumBTC, SerumUSD, SRM Tokens, SPL Tokens", - "twitter": "@mangomarkets", - "ogImage": "https://trade.mango.markets/assets/icons/logo.svg", - "notificationsEnabled": true - }, - { - "symbol": "SOCEAN", - "programId": "GSCN8n6XUGqPqoeubY5GM6e3JgtXbzTcpCUREQ1dVXFG", - "realmId": "4Z6bAwcBkDg8We6rRdnqK9rjsJz3aMqXAZkpoBZ3hxus", - "website": "https://www.socean.fi", - "ogImage": "https://socean-git-enhancement-orca-price-feed-lieuzhenghong.vercel.app/static/media/socnRound.c466b499.png" - }, - { - "symbol": "Governance", - "displayName": "Governance", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "FMEWULPSGR1BKVJK4K7xTjhG23NfYxeAn2bamYgNoUck" - }, - { - "symbol": "Hype-realm", - "displayName": "Hype-realm", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "Ap2qT88wk4CPENAcdZN6Q356mauZym4yrQptGXD2AqVF" - }, - { - "symbol": "czekoladowy", - "displayName": "czekoladowy", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "5VKggTk22qfm3Jpz41TYRx9RpBY37RDr4HKR1AM3D8LF" - }, - { - "symbol": "Realm-8TitF", - "displayName": "Realm-8TitF", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "22XYhMSGmPv2nHC3AwbDAP9akyd3rfVRUZt6HUd3wcY5" - }, - { - "symbol": "OMH", - "displayName": "Off My Head", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "4SsH1eg4zzwfRXBJjrKTY163U2UvW7n16B35pZVPxRpX", - "ogImage": "https://offmyhead.vercel.app/coin.png", - "website": "https://offmyhead.vercel.app", - "twitter": "@nft_omh" - }, - { - "symbol": "NEWDAO", - "displayName": "NEWDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "5eZA8mX9pVXzgbA8oES1ismVSAAgsHkEipJbxvsVYb5d" - }, - { - "symbol": "CDNL", - "displayName": "Cardinal", - "programId": "bqTjmeob6XTdfh12px2fZq4aJMpfSY1R1nHZ44VgVZD", - "realmId": "8o1tcKzRsEFAWYzi7Ge2cyotCaQW6vt5f2dy2HkWmemg", - "ogImage": "https://app.cardinal.so/assets/logo-colored.png", - "website": "https://www.cardinal.so", - "twitter": "@cardinal__so" - }, - { - "symbol": "testgm", - "displayName": "testgm", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "5jdLxZkUQLVWwe8mtR9fURFLUFyT6npjiSKzowaqyCj9" - }, - { - "symbol": "RealM_Tuto_1", - "displayName": "RealM_Tuto_1", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "756iwQL9tAdTr1mDGiu4P9zWW8FzMY1K6MUXHqkwp9Nc" - }, - { - "symbol": "SAIA", - "displayName": "SAIAdao Devnet", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "2VckEenCkkRSRik2ZpNkJN9YjcZke91nbCajYkgP5M9o" - }, - { - "symbol": "Realm-4LbqG", - "displayName": "Dev Maximilian", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "G25whFStzVjoahyiXiy7rx2G266ePaMpN4yCtMuMKDhJ" - }, - { - "symbol": "MNDE", - "displayName": "Marinade DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "Bdow7yGwdvsAjbTFHk5h8jXd7AW3bbMxwxkawNuoVqE3", - "ogImage": "https://marinade.finance/static/8665458407ac84338260b729267d0c53/ce52d/marinade-logo.avif", - "website": "https://marinade.finance/", - "twitter": "@marinadefinance" - }, - { - "symbol": "REALM99", - "displayName": "REALM99", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "62yTu6Pv172sKcrsa9sRoPfXiNsD648ZK6wGaWP8ak5j" - }, - { - "symbol": "PRDAO", - "displayName": "PRDAO-demo2", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "DYme6LFumrVj5E4xiTgeWrPx2SAvqiWFHdDjZUBJxQkN" - }, - { - "symbol": "Alpha Illuminati DAO", - "displayName": "Alpha Illuminati", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "9u3s1APW4JDxt4a2p666rYYoa3UErcT12fvNKWNFqaj7", - "ogImage": "https://media.discordapp.net/attachments/933224453326909490/952347955157950504/alpha-illuminati-logo.png", - "website": "https://www.alphailluminati.xyz", - "twitter": "@illuminatialpha" - }, - { - "symbol": "LEO", - "displayName": "LeoDaoNewYorkCity _ DEMO", - "programId": "GTesTBiEWE32WHXXE2S4XbZvA5CrEc4xs6ZgRe895dP", - "realmId": "hno4ciEEAB6P7MWkX7xWZx1RkpZqxRBJKveDg4YWoRP", - "ogImage": "https://images.squarespace-cdn.com/content/v1/5f09de13169cec7a4b6c23ac/3dd28380-4a26-40cf-b18c-684d73492feb/LeoDao.jpg", - "website": "https://leodaonyc.xyz", - "twitter": "@LeoDAONYC" - }, - { - "symbol": "FSHR", - "displayName": "Fashers", - "programId": "GTesTBiEWE32WHXXE2S4XbZvA5CrEc4xs6ZgRe895dP", - "realmId": "GwqCXifatWJvikdjkkPPsRn1RW8XGYLW8p4xwWzQ66gi", - "ogImage": "https://avatars.githubusercontent.com/u/46954203?s=400&u=6c777850a155eeb75586049e7c91dc2baeb97dd1&v=4", - "website": "https://fashers.xyz", - "twitter": "@Fashers" - }, - { - "symbol": "SquatchDAO", - "displayName": "SquatchDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "5DqXtnSqxUukgQ8ZJQhTEdF7y3cu3zQuBpREC1g3bNjf", - "ogImage": "https://raw.githubusercontent.com/Exonft/SquatchDAO/main/SquatchDAO.jpg", - "website": "www.squatchdao.com", - "twitter": "@Squatch_DAO" - }, - { - "symbol": "FORE", - "displayName": "Foresight DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "HymmUoabLo1sB8nTENxSFz1bAmobMJyGQoXqyXZ9FySB", - "ogImage": "https://www.foresight.exchange/logo.png", - "website": "https://www.foresight.exchange/", - "twitter": "@foresightmkt" - }, - { - "symbol": "PYTH", - "displayName": "Pyth DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "44xGQELUXXD1TiLEMc73RBnCxeW8XKw27LyJNpt2G8bF", - "ogImage": "/realms/PYTH/img/pyth.svg", - "website": "https://pyth.network/", - "twitter": "@PythNetwork" - }, - { - "symbol": "AXY", - "displayName": "AXY Network DAO", - "programId": "GTesTBiEWE32WHXXE2S4XbZvA5CrEc4xs6ZgRe895dP", - "realmId": "Bi65vLgphakAdFTZj6pUWweNaYaviPtSDf5VJ3WD6YL", - "ogImage": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/AXY11ExJToaGPKp7BmGjkzitfs1ta7cmjJn58Pn2t3Z1/logo.jpg", - "website": "https://axy.network/" - } -] diff --git a/public/realms/hope/img/hope_logo.svg b/public/realms/hope/img/hope_logo.svg deleted file mode 100755 index e3358d0312..0000000000 --- a/public/realms/hope/img/hope_logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/realms/mainnet-beta.json b/public/realms/mainnet-beta.json deleted file mode 100644 index c956236f46..0000000000 --- a/public/realms/mainnet-beta.json +++ /dev/null @@ -1,811 +0,0 @@ -[ - { - "symbol": "Ukraine", - "displayName": "Ukraine.SOL", - "programId": "gUAedF544JeE6NYbQakQvribHykUNgaPJqcgf3UQVnY", - "realmId": "5piGF94RbCqaogoFFWA9cYmt29qUpQejGCEjRKuwCz7d", - "bannerImage": "/realms/Ukraine/img/Flag_of_Ukraine.svg", - "ogImage": "/realms/Ukraine/img/Ukraine_Logo.png", - "sharedWalletId": "66pJhhESDjdeBBDdkKmxYYd7q6GUggYPWjxpMKNX39KV", - "sortRank":3 - }, - { - "symbol": "MNGO", - "displayName": "Mango DAO", - "programId": "GqTPL6qRf5aUuqscLh8Rg2HTxPUXfhhAXDptTLhp1t2J", - "realmId": "DPiH3H3c7t47BMxqTxLsuPQpEC6Kne8GA9VXbxpnZxFE", - "website": "https://mango.markets", - "keywords": "Mango Markets, REALM, Governance, Serum, SRM, Serum DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, ERC20, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, Trading, Fastest, Fast, SerumBTC, SerumUSD, SRM Tokens, SPL Tokens", - "twitter": "@mangomarkets", - "ogImage": "https://trade.mango.markets/assets/icons/logo.svg", - "sortRank":3 - }, - { - "symbol": "DTP", - "displayName": "The Imperium of Rain", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "6orGiJYGXYk9GT2NFoTv2ZMYpA6asMieAqdek4YRH2Dn", - "ogImage": "/realms/RAIN/img/rain_logo.png" - }, - { - "symbol": "UkraineUnchained", - "displayName": "#Unchain_Ukraine", - "programId": "gUAedF544JeE6NYbQakQvribHykUNgaPJqcgf3UQVnY", - "realmId": "HbdBjuyRtxJd4zCMCsvg64ajtxqk4vWogf8FtQpZcs54", - "bannerImage": "/realms/UkraineUnchained/img/ukraine_unchained_banner.jpeg", - "ogImage": "/realms/UkraineUnchained/img/ukraine_unchained.png", - "website": "https://unchain.fund", - "twitter": "@Unchainfund", - "sharedWalletId": "BnBe9uwucnLWpKqzgtvGU2aURRXezcqEVCoL8L6CeDgF" - }, - { - "symbol": "MangoLiquidityDAO", - "displayName": "Mango Liquidity Council", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "DnWHRVRbA2XGwWth2da7iF3Q81cqRHhqJXSPS8J3G6fo", - "website": "https://mango.markets", - "keywords": "Mango Markets, REALM, Governance, Serum, SRM, Serum DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, ERC20, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, Trading, Fastest, Fast, SerumBTC, SerumUSD, SRM Tokens, SPL Tokens", - "twitter": "@mangomarkets", - "ogImage": "https://trade.mango.markets/assets/icons/logo.svg" - }, - { - "symbol": "WEZ", - "displayName": "Wezesha DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "FEtF7V55LorZmUriVVobubPvLXoS7sfP3smzb5zR4BWz", - "website": "https://wezesha.co", - "keywords": "Wezesha DAO, Wezesha, Wezesha Coin, The Big Five NFTs Club, REALM, Governance, Serum, SRM, Serum DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, SPL-TOKEN, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, Trading, Fastest, Fast, SerumBTC, SerumUSD, SRM Tokens, SPL Tokens", - "twitter": "@WezeshaCo", - "ogImage": "/realms/WezeshaDAO/img/wezesha_dao_logo.png" - }, - { - "symbol": "BFNC", - "displayName": "BFNC DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "36YGaNUYtRbaq1fHL4inLvHDxb7W28dBxWSna64v9Tea", - "website": "https://bigfivenftclub.com", - "keywords": "Big Five NFT Club DAO, BFNC DAO, Big Five Coin, The Big Five NFT Club, REALM, Governance, Serum, SRM, Serum DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, SPL-TOKEN, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, Trading, Fastest, Fast, SerumBTC, SerumUSD, SRM Tokens, SPL Tokens", - "twitter": "@bigfivenftclub", - "ogImage": "/realms/BFNC/img/logo.png" - }, - { - "symbol": "ORCA", - "displayName": "Orca DAO", - "programId": "J9uWvULFL47gtCPvgR3oN7W357iehn5WF2Vn9MJvcSxz", - "realmId": "66Du7mXgS2KMQBUk6m9h3TszMjqZqdWhsG3Duuf69VNW", - "website": "https://www.orca.so/", - "twitter": "@orca_so", - "ogImage": "https://learn.orca.so/static/media/logomark.1ef55f8f.svg" - }, - { - "symbol": "JET", - "displayName": "Jet DAO", - "programId": "JPGov2SBA6f7XSJF5R4Si5jEJekGiyrwP2m7gSEqLUs", - "realmId": "78TbURwqF71Qk4w1Xp6Jd2gaoQb6EC7yKBh5xDJmq6qh", - "website": "https://www.jetassociation.org/", - "twitter": "@jet_association", - "ogImage": "https://govern.jetassociation.org/img/jet_assoc/assoc_turbine.jpg" - }, - { - "symbol": "The Sporagers", - "displayName": "The Sporagers", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "896vmJYkitEGhnBnRo8XxywUJu2qtgxidR9HXm5kjwrM", - "website": "https://www.thesporagers.io", - "twitter": "@TheSporagers", - "ogImage": "/realms/TheSporagers/img/the_sporagers.png", - "bannerImage": "/realms/TheSporagers/img/the_sporagers_banner.jpeg" - }, - { - "symbol": "NFT Club Berlin", - "displayName": "NFT Club Berlin", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "E5DCxoF2vjzFeaDBi9kfFDZVoxrpe6nRFfKtm1J8Qdq7", - "ogImage": "/realms/NFTClubBerlin/img/logo.png", - "website": "http://nftclub.berlin", - "twitter": "@NFTClubBerlin" - }, - { - "symbol": "POOR", - "displayName": "PoorDao (Famous Fox Edition)", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "12gEDQvesi9qSMoXcY1LSHxGqArUXZ2HemihyEShpoWf", - "website": "https://famousfoxes.com", - "twitter": "@PoorDao_FFF", - "ogImage": "/realms/PoorDao/img/archer.png" - }, - { - "symbol": "CHIAO", - "displayName": "Chiao (Chimpions)", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "41SoCf3dmToE3YNJxAzz3GqNMp9SnzzYBH7cB7f1RJ82", - "website": "https://www.chimpions.co/", - "twitter": "@TheChimpions", - "ogImage": "/realms/Chiao/img/chiao.png" - }, - { - "symbol": "PSY", - "displayName": "Psy Finance", - "programId": "GovHgfDPyQ1GwazJTDY2avSVY8GGcpmCapmmCsymRaGe", - "realmId": "FiG6YoqWnVzUmxFNukcRVXZC51HvLr6mts8nxcm7ScR8", - "website": "https://psyoptions.io", - "keywords": "PsyOptions, PsyFi, PsyFinance, REALM, Governance, Serum, SRM, DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, ERC20, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, Trading, Fastest, Fast, SerumBTC, SerumUSD, Tokens, Options, Vaults", - "twitter": "@PsyOptions", - "ogImage": "https://user-images.githubusercontent.com/32071703/149460918-3694084f-2a37-4c95-93d3-b5aaf078d444.png" - }, - { - "symbol": "SOCEAN", - "programId": "5hAykmD4YGcQ7Am3N7nC9kyELq6CThAkU82nhNKDJiCy", - "realmId": "759qyfKDMMuo9v36tW7fbGanL63mZFPNbhU7zjPrkuGK", - "website": "https://www.socean.fi", - "ogImage": "https://socean-git-enhancement-orca-price-feed-lieuzhenghong.vercel.app/static/media/socnRound.c466b499.png" - }, - { - "symbol": "Governance", - "displayName": "Governance", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "FMEWULPSGR1BKVJK4K7xTjhG23NfYxeAn2bamYgNoUck", - "ogImage": "/realms/Governance/img/spl-governance-logo.svg" - }, - { - "symbol": "Yield Farming", - "displayName": "Yield Farming", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "8eUUtRpBCg7sJ5FXfPUMiwSQNqC3FjFLkmS2oFPKoiBi" - }, - { - "symbol": "SCTF1", - "programId": "gSF1T5PdLc2EutzwAyeExvdW27ySDtFp88ri5Aymah6", - "realmId": "EtZWAeFFRC5k6uesap1F1gkHFimsL2HqttVTNAeN86o8", - "ogImage": "/realms/SCTF1/img/sctf1.svg" - }, - { - "symbol": "SERUM", - "programId": "AVoAYTs36yB5izAaBkxRG67wL1AMwG3vo41hKtUSb8is", - "realmId": "3MMDxjv1SzEFQDKryT7csAvaydYtrgMAc3L9xL9CVLCg", - "website": "https://www.projectserum.com/", - "ogImage": "https://assets.website-files.com/61284dcff241c2f0729af9f3/61285237ce2e301255d09108_logo-serum.png" - }, - { - "symbol": "OMH", - "displayName": "Off My Head", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "4SsH1eg4zzwfRXBJjrKTY163U2UvW7n16B35pZVPxRpX", - "ogImage": "https://offmyhead.vercel.app/coin.png", - "website": "https://offmyhead.vercel.app", - "twitter": "@nft_omh" - }, - { - "symbol": "FRIES", - "displayName": "Soltato", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "7wsrKBeTpqfcribDo34qr8rdSbqXbmQq9Fog2cVirK6C", - "ogImage": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/FriCEbw1V99GwrJRXPnSQ6su2TabHabNxiZ3VNsVFPPN/logo.png", - "website": "https://soltato.io", - "twitter": "@Soltato_NFT" - }, - { - "symbol": "Metaplex Foundation", - "displayName": "Metaplex Foundation", - "programId": "GmtpXy362L8cZfkRmTZMYunWVe8TyRjX5B7sodPZ63LJ", - "realmId": "2sEcHwzsNBwNoTM1yAXjtF1HTMQKUAXf8ivtdpSpo9Fv", - "ogImage": "/realms/metaplex/img/meta-white.png", - "website": "https://metaplex.com", - "twitter": "@metaplex" - }, - { - "symbol": "Metaplex Genesis", - "displayName": "Metaplex Genesis", - "programId": "GMpXgTSJt2nJ7zjD1RwbT2QyPhKqD2MjAZuEaLsfPYLF", - "realmId": "Cdui9Va8XnKVng3VGZXcfBFF6XSxbqSi2XruMc7iu817", - "ogImage": "/realms/metaplex/img/meta-white.png", - "website": "https://metaplex.com", - "twitter": "@metaplex" - }, - { - "symbol": "21DAO", - "displayName": "21DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "Dn5yLFi6ZNhkD25CX4c8qq1MV3CC2vcrH2Qujfzy22rT", - "ogImage": "/realms/21DAO/img/21dao_icon.png", - "website": "https://21dao.xyz" - }, - { - "symbol": "CDNL", - "displayName": "Cardinal", - "programId": "bqTjmeob6XTdfh12px2fZq4aJMpfSY1R1nHZ44VgVZD", - "realmId": "8o1tcKzRsEFAWYzi7Ge2cyotCaQW6vt5f2dy2HkWmemg", - "ogImage": "https://app.cardinal.so/assets/logo-colored.png", - "website": "https://www.cardinal.so", - "twitter": "@cardinal__so" - }, - { - "symbol": "gSAIL", - "displayName": "GSAIL GOVERNANCE DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "36fZRsuM3oXvb5VrEXXVmokbGnjADzVgKpW1pgQq7jXJ", - "ogImage": "https://raw.githubusercontent.com/solanasail/token-list/main/assets/mainnet/Gsai2KN28MTGcSZ1gKYFswUpFpS7EM9mvdR9c8f6iVXJ/logo.png", - "website": "https://www.solanasail.com/", - "twitter": "@SolanaSail" - }, - { - "symbol": "FAFD", - "displayName": "Friends and Family DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "371PRJu9vyU2U6WHcqorakWvz3wpfGSVhHr65BBSoaiN", - "ogImage": "/realms/FAFD/img/fafd_logo.png", - "website": "https://find-and-update.company-information.service.gov.uk/company/13753949" - }, - { - "symbol": "$HOPE", - "displayName": "The Sanctuary", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "CS3HBXBdZ44g7FdZfgPAz6nSBe4FSThg6ANuVdowTT6G", - "ogImage": "/realms/hope/img/hope_logo.svg", - "website": "https://www.solsanctuary.io" - }, - { - "symbol": "FANT", - "displayName": "Phantasia", - "programId": "5sGZEdn32y8nHax7TxEyoHuPS3UXfPWtisgm8kqxat8H", - "realmId": "4BNkheiMATVVcyJnGpjPbbPvFuKMx3cCDmkEbtnTz2iV", - "ogImage": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/FANTafPFBAt93BNJVpdu25pGPmca3RfwdsDsRrT3LX1r/logo.png", - "website": "https://phantasia.app", - "twitter": "@PhantasiaSports" - }, - { - "symbol": "MOOD", - "displayName": "Strangemood Foundation", - "programId": "smfjietFKFJ4Sbw1cqESBTpPhF4CwbMwN8kBEC1e5ui", - "realmId": "Dmn5q2SwkjZBKJGwULEWzK8zeZ2ES6JQvHKB297tAHXY", - "ogImage": "/realms/strangemood/img/logo.svg", - "website": "https://strangemood.org" - }, - { - "symbol": "GRAPE", - "displayName": "GRAPE", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "By2sVGZXwfQq6rAiAM3rNPJ9iQfb5e2QhnF4YjJ4Bip", - "ogImage": "/realms/Grape/img/grape.png", - "website": "https://grapes.network/", - "twitter": "@grapeprotocol", - "sortRank":3 - }, - { - "symbol": "RED", - "displayName": "Realms Ecosystem DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "C1tyCAEnbt4d63nbF36PGLc8gCC9DdtRXttXWGZwsAdF", - "ogImage": "/realms/RED/RED.png", - "website": "https://realms.notion.site/Realms-Ecosystem-DAO-RED-2b82519e797b4696968c5c909812f418", - "twitter": "@Realms_DAOs", - "sortRank":2 - }, - { - "symbol": "MonkeDAO", - "displayName": "MonkeDAO", - "programId": "GMnke6kxYvqoAXgbFGnu84QzvNHoqqTnijWSXYYTFQbB", - "realmId": "B1CxhV1khhj7n5mi5hebbivesqH9mvXr5Hfh2nD2UCh6", - "ogImage": "/realms/MonkeDAO/img/MonkeDAO_logo.png", - "website": "https://monkedao.io/", - "twitter": "@MonkeDAO" - }, - { - "symbol": "MonkeDAOVote", - "displayName": "MonkeDAO Vote", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "Hcenib1A54LtG4V3TkG4MFYzcLzTqzYKFnttMxAq55c2", - "ogImage": "/realms/MonkeDAO/img/MonkeDAO_logo.png", - "website": "https://monkedao.io/", - "twitter": "@MonkeDAO" - }, - { - "symbol": "MonkOG", - "displayName": "MonkOG DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "39aX7mDZ1VLpZcPWstBhQBoqwNkhf5f1KDACguvrryi6", - "ogImage": "/realms/MonkOG/img/ogemoji.png", - "twitter": "@MonkOG_DAO" - }, - { - "symbol": "NoGoal", - "displayName": "NoGoalDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "3YdSnGzJbgyq5mGoFxu4RqmrUetUCEvyDkXEFy4oi6zd", - "ogImage": "/realms/NoGoal/img/ino-128.png", - "website": "https://nogoal.click/", - "twitter": "@NoGoalFacesNFT" - }, - { - "symbol": "MNDE", - "displayName": "Marinade.Finance", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "3gmcbygQUUDgmtDtx41R7xSf3K4oFXrH9icPNijyq9pS", - "ogImage": "/realms/MNDE/img/mnde_logo.png", - "website": "https://marinade.finance/", - "twitter": "@marinadefinance" - }, - { - "symbol": "COCK", - "displayName": "Chicken Tribe", - "programId": "GCockTxUjxuMdojHiABVZ5NKp6At8eTKDiizbPjiCo4m", - "realmId": "FuqmCzaTqH1QbokY3agcYQaJqoWog1UkSrcNCDBPXusu", - "ogImage": "https://chickentribe.com/_next/image?url=%2Fimages%2FChickenTribe_Team01.svg&w=128&q=75", - "website": "https://chickentribe.com/", - "twitter": "@ChickenTribe" - }, - { - "symbol": "Kiwi", - "displayName": "Kiwi Kingd◎m", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "BkoiytgkhWBwyB7cwNPoMvi2DJ1Zxr51LMevaCBH5CiU", - "ogImage": "/realms/Kiwi/img/kiwi_logo.png", - "twitter": "@KiwiDAO" - }, - { - "symbol": "$XAPE", - "displayName": "The Exiled Apes", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "2J1YbWH991rv7ZAsUVdV2cWXNf89XNuhqUsabaAP3Hc1", - "ogImage": "/realms/XAPE/img/logo_xape_nobckg.png", - "website": "https://exiledapes.academy", - "twitter": "@ExiledApes" - }, - { - "symbol": "SF", - "displayName": "Succeed.Finance", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "CnnUUMnLcFL7ZxiGQoJaU8dgeCr3kwHn6Z1xpkWfQDHj", - "ogImage": "/realms/SF/img/succeedfinance.png", - "website": "https://www.succeed.finance", - "twitter": "@succeedfinance" - }, - { - "symbol": "IADAO", - "displayName": "Investment Analyst DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "BgezhGfctjcM8x5SsScCmX58txz8cUDikYp3ifk2vEqM", - "ogImage": "/realms/IADAO/img/IA-DAO_LOGO.png", - "website": "https://www.ia.finance" - }, - { - "symbol": "WOOFDAO", - "displayName": "WOOF DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "DGnx2hbyT16bBMQFsVuHJJnnoRSucdreyG5egVJXqk8z", - "ogImage": "/realms/WoofDAO/img/wooflogo.png", - "keywords": "WOOF", - "website": "https://woofsolana.io/", - "twitter": "@WoofSolana" - }, - { - "symbol": "NFTOFFROADFC", - "displayName": "NFT OFF ROAD FAN CLUB DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "6NaoicaQtUCgEqUuniSzpsKYN9DRaSeGa3Ludk5Mxb18", - "ogImage": "/realms/NFTOFFROADFANCLUB/img/logo.png", - "website": "https://nftoffroadfan.club/", - "twitter": "@NFT_Off_Road_FC" - }, - { - "symbol": "GoblinGold", - "displayName": "GoblinGold", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "GQW5LBignZKHxhP7SN4rRNT13LYucK3D6Eq983UzufjZ", - "ogImage": "/realms/GoblinGold/img/logo.png", - "website": "https://app.goblin.gold/", - "twitter": "@goblingold_fi" - }, - { - "symbol": "DAINV", - "displayName": "Digital Asset Investing", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "12pDfk9KHaP3rZSnPEM42xFwVLHuEMDV8cJj9zhmeHBu", - "ogImage": "/realms/DAINV/img/DAI_LOGO_2.png", - "website": "http://www.dainvest.org", - "twitter": "@dainvestors" - }, - { - "symbol": "KiwiDAO", - "displayName": "𝕂𝕚𝕨𝕚 𝔻𝔸◎", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "AvfMYqHjddR93zvmZXcQGUTkRu3GJYppTU93iKhMUWRF", - "ogImage": "/realms/KiwiDAO/img/kiwi_logo.png" - }, - { - "symbol": "FIDA", - "displayName": "Bonfida DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "6NzVDMfEBJvkFDnjPx53K7mLGW3yQdSjLhsamS8go4cn", - "website": "https://bonfida.org", - "keywords": "Bonfida, REALM, Governance, Serum, SRM, Serum DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, ERC20, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, Trading, Fastest, Fast, SerumBTC, SerumUSD, SRM Tokens, SPL Tokens", - "twitter": "@bonfida", - "ogImage": "https://bonfida.org/static/media/fida.b16d451b.svg" - }, - { - "symbol": "N&F", - "displayName": "Nick & Family", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "BuquUQDYsCBPxUsGXxWx7k9bS93kVXyPrb1wyw47fegs", - "website": "https://www.gofundme.com/f/support-nicks-fight-with-cancer?utm_campaign=p_cp+share-sheet&utm_medium=copy_link_all&utm_source=customer", - "twitter": "@NShaw89", - "ogImage": "/realms/N&F/img/Nick.png", - "bannerImage": "/realms/N&F/img/Nick-banner.jpeg" - }, - { - "symbol": "LeDAO", - "displayName": "Le DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "CGSwgi67ZKcv7dwXewSQbzD89CncB9Vmhb8adgsWNJMJ", - "twitter": "@ledao_solana", - "ogImage": "/realms/LeDao/img/leDao-logo.png" - }, - { - "symbol": "1SOL", - "displayName": "1Sol DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "26yUdUTWSfpwpNMshahupbXoQKi2NkaTECSyE45VMutU", - "website": "https://1sol.io", - "twitter": "@1solProtocol", - "ogImage": "/realms/1SolDAO/img/1SolDAO-logo.svg" - }, - { - "symbol": "NFT4CauseDAO", - "displayName": "NFT 4 Cause DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "HB9Csze8DQ54skiMzw6VvAS9oeZ2i3zTDgWuJhQMCQab", - "website": "https://www.nft4cause.app", - "twitter": "@NFT4cause", - "ogImage": "/realms/NFT4CauseDAO/img/logo.png" - }, - { - "symbol": "Bears", - "displayName": "Bears Reloaded", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "8x3bs2CUu7FZCw9zoTz29eBNwKjfJiCHjWz4T53NWLbJ", - "ogImage": "/realms/Bears/img/bearlogo.png" - }, - { - "symbol": "SlattsDAO", - "displayName": "SlattsDAO", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "8uhFgGgDWF23pNDS17a6TemzrjSrFhKN1skGXTjjRszj" - }, - { - "symbol": "metaCOLLECTIVE", - "displayName": "metaCOLLECTIVE", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "EPB9JbK5NiHoHkrRmpo9v4oJ2bKSVjfA731jeBModC1e", - "website": "https://meta-collective.digital", - "twitter": "@_metaCOLLECTIVE", - "ogImage": "https://governance.meta-collective.digital/realms/META/img/logo.png" - }, - { - "symbol": "UXP", - "displayName": "UXDProtocol", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "GBXLYo4ycRNfzuzYeudu6y2ng4afNeW14WcpM2E4JJSL", - "website": "https://uxd.fi", - "twitter": "@UXDProtocol", - "ogImage": "/realms/UXP/img/UXP-Black.png" - }, - { - "symbol": "MonkeVentures", - "displayName": "MonkeVentures", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "97jKDX5Uxh5xSPbmmfhiFodHEajSVdKkknTzzgf8GBAr" - }, - { - "symbol": "PixelBands", - "displayName": "PixelBands DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "AUYUF7z2aWNHySuWEW43pzSYL6aioKdc1pwCniyNCFBK", - "ogImage": "/realms/PixelBands/img/pixel_bands_log.png" - }, - { - "symbol": "MEDIA", - "displayName": "Media DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "3ZFBoLMRKAU1Th57wvDfmE8PYRZzYZUDNZksNczsrTuU", - "website": "https://media.network", - "keywords": "Media Network, REALM, Governance, Serum, SRM, Serum DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, ERC20, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, CDN, Web3, dCDN, Content Delivery Network, SPL Tokens, Multi Chain, Protocol, Data", - "twitter": "@Media_FDN", - "ogImage": "https://media.network/images/token/media.svg" - }, - { - "symbol": "Renpo", - "displayName": "Renpō Dao", - "programId": "GRNPT8MPw3LYY6RdjsgKeFji5kMiG1fSxnxDjDBu4s73", - "realmId": "5J2bRTkzoSXWKZMW4o5tyNsT7Zwn9dDkDt6rMz6Ze9u1", - "ogImage": "/realms/Renpo/img/renpo_logo.png" - }, - { - "symbol": "Ikohaus", - "displayName": "Ikohaus", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "WBmKxddpbtnVPXXUFCJf5BcC4qfCRZ9wsZSxTZBjdM5", - "website": "https://ikohaus.business.site", - "twitter": "@Ikohaus", - "ogImage": "/realms/Ikohaus/img/Ikohaus_Logo.png" - }, - { - "symbol": "Senshi", - "displayName": "SenshiDAO", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "2ZcZV69pMY5rrPSNSsAP7y7QgQygzAgDYKvVFvf6H9fR" - }, - { - "symbol": "DAKU", - "displayName": "DAKU DAO", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "9osGkueZJvHdZ8RbcGjgW7usUyBSCKQZSuFrujReXZpx", - "ogImage": "/realms/DAKU/img/daku_logo.png" - }, - { - "symbol": "MMCC", - "displayName": "MMCC ClubDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "6UkNFSiwje4Rs4EB31V4bj8YQYx9viGTxD3WyrM3j5R2", - "website": "https://linktr.ee/MeerkatMillionaires", - "twitter": "@mmccsolana", - "ogImage": "/realms/MMCC/img/MMCC_Logo.png" - }, - { - "symbol": "montanaland", - "displayName": "Montana Land sDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "GURMs9sYzDNPhTJxsuDvFUpoBom8VKFicbjxK57hCj4e", - "ogImage": "/realms/MontanaLand/img/logo.png", - "website": "https://montanaland.slowdao.xyz/", - "twitter": "@montanaland" - }, - { - "symbol": "$RIBS", - "displayName": "ROYAL LION DAO", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "2ChWrquGfvcECwA3DRDhkGEzidyc7fTZXxJrkzUvjnJE", - "ogImage": "/realms/RIBS/img/lion_logo.png" - }, - { - "symbol": "$PANDA", - "displayName": "Panda Fraternity DAO", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "2TTR5PXXHQFTjYedHfYQpEe1GTwwYFuoywawVnSi1RLb", - "ogImage": "/realms/PANDA/img/PandaDAOlogo.png" - }, - { - "symbol": "XPWizards", - "displayName": "XPWizardsDAO", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "7FMLXrTxwEUKoyMJdumd8A2nWkgq4bToQq5Uqds8kRsu", - "ogImage": "/realms/XPWizards/img/xpwizlogo.png" - }, - { - "symbol": "BT", - "displayName": "Blue Terra DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "DMTkorwRhKbPGioE5kr1BHDBEcwFSUepyuz66ro3MQXU", - "website": "https://blueterra.land", - "twitter": "@BlueTerraNFT", - "ogImage": "/realms/blueterra/img/logo.png" - }, - { - "symbol": "Alpha Illuminati DAO", - "displayName": "Alpha Illuminati", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "9u3s1APW4JDxt4a2p666rYYoa3UErcT12fvNKWNFqaj7", - "ogImage": "https://media.discordapp.net/attachments/933224453326909490/952347955157950504/alpha-illuminati-logo.png", - "website": "https://www.alphailluminati.xyz", - "twitter": "@illuminatialpha" - }, - { - "symbol": "SNY", - "displayName": "Synthetify", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "7oB84bSuxv9AH1iRdMp5nFLwpQApv8Yo9s1gGmDkHtSP", - "ogImage": "/realms/SNY/img/synthetify_logo_green.svg", - "website": "https://synthetify.io/", - "twitter": "@synthetify" - }, - { - "symbol": "WONDER", - "displayName": "Wonder", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "6cxM3jY1p4WAncb356Gv9bteRv8fSxaRKPK6JQVDqbkJ", - "ogImage": "/realms/wonder/img/logo.png", - "website": "https://wonderprotocol.org", - "twitter": "@wonderprotocol", - "keywords": "Wonder, Wonder Protocol, Create-To-Own, DAO, Governance, Decentralised Entertainment, DeEnt, UOC, User-Owned Content, UGC, IP, Intellectual Property, Creative Development, NFT, Tokens, Crypto" - }, - { - "symbol": "UNDER", - "displayName": "Underscore DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "Gh7DAjGoxRkFP3HXw2v1AfH6pyeGWRtXCudodFHLawDT", - "website": "https://underscoredao.com", - "keywords": "Underscore DAO, infrastructure, REALM, Governance, Serum, SRM, Serum DEX, DEFI, Decentralized Finance, Decentralised Finance, Crypto, ERC20, Ethereum, Decentralize, Solana, SOL, SPL, Cross-Chain, Trading, Fastest, Fast, SerumBTC, SerumUSD, SRM Tokens, SPL Tokens", - "twitter": "@underscoredao", - "ogImage": "/realms/UNDER/logo.png" - }, - { - "symbol": "NEOFAIRIES", - "displayName": "Neo Fairies", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "9PmmctkHPN5Br8V4gmjNuUdccrD7TtzfJ7U8mcpoBGXd", - "website": "https://neofairies.com", - "twitter": "@neofairies", - "keywords": "Neo Fairies, Fairies, Fairy, Fantasy, Punk, Create-To-Own, DAO, Governance, Decentralized Entertainment, Decentralised Entertainment, DeEnt, UOC, User-Owned Content, UGC, IP, Intellectual Property, Creative Development, NFT, Tokens, Crypto", - "ogImage": "/realms/NeoFairies/img/logo.png" - }, - { - "symbol": "$RRDG", - "displayName": "RadRugsDAO", - "programId": "Ghope52FuF6HU3AAhJuAAyS2fiqbVhkAotb7YprL5tdS", - "realmId": "12Q9JeKazwCbMDwiK4Hq9eGgCJJaE37Kt79AUpWwUPqP", - "website": "https://www.radrugs.io", - "ogImage": "/realms/RadRugsDAO/img/RadRugsDAO.png" - }, - { - "symbol": "$OXSQ", - "displayName": "The Ox Squad", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "Bf5k7t1wKvvs6NF8d4SCbreSMJKYZE1e7wBm8YeZUJmD", - "website": "https://theoxsquadnft.com", - "twitter": "@TheOxSquadNFT", - "bannerImage": "/realms/TheOxSquad/img/TheOxSquad_banner.jpeg", - "ogImage": "/realms/TheOxSquad/img/TheOxSquad.png" - }, - { - "symbol": "$ASH", - "displayName": "MorDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "2vZwtXgeE7V5ipovRbSyxDcuDM6FgozHPsFPP92wiPfz", - "website": "https://mortuary-inc.io/", - "twitter": "@MortuaryIncNFT", - "ogImage": "/realms/MorDAO/img/logo.svg" - }, - { - "symbol": "EVS", - "displayName": "Eversol DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "7pX17rs38WKHVw5mpJNBCjGXRz5eZsPj5QHAEZv1Zu4d", - "bannerImage": "/realms/EverSol/img/EverSol_Banner.jpg", - "ogImage": "/realms/EverSol/img/EverSol_Logo.png", - "website": "https://eversol.one/", - "twitter": "@eversol_pool" - }, - { - "symbol": "ALLOVR", - "displayName": "ALLOVR DAO", - "programId": "ALLGnZikNaJQeN4KCAbDjZRSzvSefUdeTpk18yfizZvT", - "realmId": "A7nud4wxpAySc7Ai11vwXtkez79tHvcEvSquFBxw4iDh", - "website": "https://www.allovr.io", - "keywords": "Fine Art, Provenance, ALLOVR, Token Economy, Artist, Art, Decentralized Art Network", - "twitter": "@allovr_protocol", - "ogImage": "https://raw.githubusercontent.com/ALLOVRStudios/ovr-program/main/img/logo.png" - }, - { - "symbol": "CARROT", - "displayName": "CARROT DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "794Cz2u7BqcqjuQBB87E8Jg8rdtG46pBodrh5sJLMJdz", - "ogImage": "https://raw.githubusercontent.com/cmgonsalves/token/main/carrot-logo.png", - "website": "https://www.begrudgedbunnies.com/", - "twitter": "@begrudgeddao" - }, - { - "symbol": "STR", - "displayName": "StreamDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "FUjE8nZ9WLch6bYMfxd2ybyfzw19odi6Yfnio9Dc2v2V", - "ogImage": "/realms/StreamDAO/img/stream_dao.png", - "website": "https://www.streamdao.org/", - "twitter": "@dao_stream" - }, - { - "symbol": "Fyfy", - "displayName": "FyfyDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "4kofKQxGvnq5nXumXJaqPnPoHfmZxgH2YUqpxGWYjZ5c", - "ogImage": "/realms/FyfyDAO/img/logo.png", - "website": "https://www.fyfy.io/", - "twitter": "@fyfyio" - }, - { - "symbol": "LoS", - "displayName": "Legion of Sol", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "8PqcJBBsZRMHQwMYrP6wx7BFrX4TNpBTWTVegGDNiFEJ", - "ogImage": "https://raw.githubusercontent.com/SolStonez/Legion-Key-Logo/main/demon_logo.png", - "website": "https://www.legionofsol.io/", - "twitter": "@legion_of_sol" - }, - { - "symbol": "SquatchDAO", - "displayName": "SquatchDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "5DqXtnSqxUukgQ8ZJQhTEdF7y3cu3zQuBpREC1g3bNjf", - "ogImage": "https://raw.githubusercontent.com/Exonft/SquatchDAO/main/SquatchDAO.jpg", - "website": "www.squatchdao.com", - "twitter": "@Squatch_DAO" - }, - { - "symbol": "RRA", - "displayName": "RRA DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "4pLWsjAJJmyUL73MyxDVcSB3iTR6Yuyx7S98EqSDqjmH", - "ogImage": "/realms/RRADAO/rradao_logo.jpg", - "website": "https://www.ruderhinos.club", - "twitter": "@RudeRhinosClub" - }, - { - "symbol": "PhoenixDAO", - "displayName": "Phoenix DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "Fvzr2TsUuUZ4HoZumH6ppa1cacWshU1YUZgGYHPHH4rz", - "ogImage": "/realms/PhoenixDAO/phoenixdao_logo.png" - }, - { - "symbol": "SOLI", - "displayName": "Solana Ecosystem Index", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "J5ViB3N7S3YRnrMpy7iSy57yYQaviJJDmrfGVT51z44o", - "ogImage": "/realms/SOLI/soli_logo.png", - "website": "https://tokens.amun.com/token/SOLI", - "twitter": "@Amun" - }, - { - "symbol": "SBYC", - "displayName": "SBYC DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "BycjQ24kBPhdzBbJanQJ1bydLGqZHf3oseGGLVcb2RWK", - "ogImage": "/realms/SBYCDAO/img/logo.png", - "website": "https://solboredyachtclub.com", - "twitter": "@SolBoredYacht" - }, - { - "symbol": "$MasoorDAO", - "displayName": "Hari's Realm", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "4PYdZHs2hwZYibkvEnpVCJpU7bD4aFUkWtYxGFU25ZWu", - "website": "https://www.linkedin.com/in/harimasoor/", - "twitter": "@HariOnChain", - "ogImage": "/realms/MasoorDAO/MasoorDAO.PNG" - }, - { - "symbol": "ADAO", - "displayName": "Astra DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "Cwh2E98xcB5qL8yuGvxdaMezRUQXwdCwcCKhYKqUPqFD", - "website": "https://www.youtube.com/channel/UCP6jlgRDcs5S68OVjleMGjg", - "twitter": "@MannyAstra", - "ogImage": "/realms/Astra/AstraPodcastLogo.PNG" - }, - { - "symbol": "CreatedBy", - "displayName": "CreatedBy DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "BE5wCCi9fg5YxUWos5A9JYACCLTPCKbcbJknTMxz76g4", - "website": "https://createdby.io", - "twitter": "@CreatedByIO", - "ogImage": "/realms/CreatedBy/CreatedBy.PNG" - }, - { - "symbol": "SAMO", - "displayName": "SamoDAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "GC6GDrJTVEY2ZxQ9NaC7n54tvz2HKM5f29LBzP7SjJ6h", - "website": "https://samoyedcoin.com", - "twitter": "@Samo_DAO", - "ogImage": "/realms/SamoDAO/SamoDAO.png" - }, - { - "symbol": "FORE", - "displayName": "Foresight DAO", - "programId": "GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw", - "realmId": "CZatgrcvaDN9ib1sQeSCJWUnBXc899ydTB9vfAHHBVfP", - "ogImage": "https://www.foresight.exchange/logo.png", - "website": "https://www.foresight.exchange/", - "twitter": "@foresightmkt" - } -] diff --git a/public/realms/metaplex/img/meta-white.png b/public/realms/metaplex/img/meta-white.png deleted file mode 100644 index 4013568e6d..0000000000 Binary files a/public/realms/metaplex/img/meta-white.png and /dev/null differ diff --git a/public/realms/socean/favicon.ico b/public/realms/socean/favicon.ico deleted file mode 100644 index b9326a6a25..0000000000 Binary files a/public/realms/socean/favicon.ico and /dev/null differ diff --git a/public/realms/socean/img/logo.svg b/public/realms/socean/img/logo.svg deleted file mode 100644 index 645fbfac38..0000000000 --- a/public/realms/socean/img/logo.svg +++ /dev/null @@ -1 +0,0 @@ -socean_logo \ No newline at end of file diff --git a/public/realms/solana/favicon.ico b/public/realms/solana/favicon.ico deleted file mode 100644 index 24b6c938aa..0000000000 Binary files a/public/realms/solana/favicon.ico and /dev/null differ diff --git a/public/realms/solana/img/logo.svg b/public/realms/solana/img/logo.svg deleted file mode 100644 index 1b8e7a6b3d..0000000000 --- a/public/realms/solana/img/logo.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/public/realms/strangemood/favicon.ico b/public/realms/strangemood/favicon.ico deleted file mode 100644 index 4108a8e350..0000000000 Binary files a/public/realms/strangemood/favicon.ico and /dev/null differ diff --git a/public/realms/strangemood/img/logo.svg b/public/realms/strangemood/img/logo.svg deleted file mode 100644 index 19f236da55..0000000000 --- a/public/realms/strangemood/img/logo.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/public/realms/wonder/img/logo.png b/public/realms/wonder/img/logo.png deleted file mode 100644 index 7a91d9a9e0..0000000000 Binary files a/public/realms/wonder/img/logo.png and /dev/null differ diff --git a/scripts/api.ts b/scripts/api.ts deleted file mode 100644 index f9c54796cf..0000000000 --- a/scripts/api.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { PublicKey } from '@solana/web3.js' -import { SanitizedObject } from 'utils/helpers' -import * as bs58 from 'bs58' -import { - GovernanceAccount, - GovernanceAccountClass, - GovernanceAccountType, - Realm, -} from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { MemcmpFilter, RpcContext } from '@solana/spl-governance' -import { GOVERNANCE_SCHEMA } from '@solana/spl-governance' -import { deserializeBorsh } from 'utils/borsh' -import { sleep } from '@project-serum/common' - -const fetch = require('node-fetch') - -export async function getRealms(rpcContext: RpcContext) { - return getGovernanceAccounts( - rpcContext.programId, - rpcContext.endpoint, - Realm, - [GovernanceAccountType.RealmV1, GovernanceAccountType.RealmV2] - ) -} - -export async function getGovernanceAccounts( - programId: PublicKey, - endpoint: string, - accountClass: GovernanceAccountClass, - accountTypes: GovernanceAccountType[], - filters: MemcmpFilter[] = [] -) { - if (accountTypes.length === 1) { - return getGovernanceAccountsImpl( - programId, - endpoint, - accountClass, - accountTypes[0], - filters - ) - } - - let accounts: Record> = {} - - for (const at of accountTypes) { - accounts = { - ...accounts, - ...(await getGovernanceAccountsImpl( - programId, - endpoint, - accountClass, - at, - filters - )), - } - - // note: if we are not using a specific RPC, then most probably we are using a public RPC - // sleep to prevent public RPC rate limits - if (!process.env.CLUSTER_URL) { - await sleep(3_000) - } - } - - return accounts -} - -async function getGovernanceAccountsImpl( - programId: PublicKey, - endpoint: string, - accountClass: GovernanceAccountClass, - accountType: GovernanceAccountType, - filters: MemcmpFilter[] = [] -) { - const getProgramAccounts = await fetch(endpoint, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - jsonrpc: '2.0', - id: 1, - method: 'getProgramAccounts', - params: [ - programId.toBase58(), - { - commitment: 'single', - encoding: 'base64', - filters: [ - { - memcmp: { - offset: 0, - bytes: bs58.encode([accountType]), - }, - }, - ...filters.map((f) => ({ - memcmp: { offset: f.offset, bytes: bs58.encode(f.bytes) }, - })), - ], - }, - ], - }), - }) - - const accounts: Record< - string, - ProgramAccount - > = new SanitizedObject({}) as Record> - try { - const response = await getProgramAccounts.json() - if ('result' in response) { - const rawAccounts = response['result'] - for (const rawAccount of rawAccounts) { - try { - const account = new SanitizedObject({ - pubkey: new PublicKey(rawAccount.pubkey), - account: new SanitizedObject({ - ...rawAccount.account, - data: [], // There is no need to keep the raw data around once we deserialize it into TAccount - }), - info: deserializeBorsh( - GOVERNANCE_SCHEMA, - accountClass, - Buffer.from(rawAccount.account.data[0], 'base64') - ), - }) as ProgramAccount - - accounts[account.pubkey.toBase58()] = account - } catch (ex) { - console.error(`Can't deserialize ${accountClass}`, ex) - } - } - } else { - console.error(`Unexpected response ${JSON.stringify(response)}`) - } - } catch (e) { - console.error(e) - } - return accounts -} diff --git a/scripts/governance-notifier.ts b/scripts/governance-notifier.ts deleted file mode 100644 index 1017cbe609..0000000000 --- a/scripts/governance-notifier.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { PublicKey } from '@solana/web3.js' -import axios from 'axios' -import { getConnectionContext } from 'utils/connection' -import { pubkeyFilter } from '@solana/spl-governance' -import { getAccountTypes, Governance, Proposal } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { getCertifiedRealmInfo } from '../models/registry/api' -import { getGovernanceAccounts } from './api' - -const fiveMinutesSeconds = 5 * 60 -const toleranceSeconds = 30 - -function errorWrapper() { - runNotifier().catch((error) => { - console.error(error) - }) -} - -// run every 5 mins, checks if a governance proposal just opened in the last 5 mins -// and notifies on WEBHOOK_URL -async function runNotifier() { - const nowInSeconds = new Date().getTime() / 1000 - - const MAINNET_RPC_NODE = - process.env.CLUSTER_URL || 'https://api.mainnet-beta.solana.com' - const connectionContext = getConnectionContext('mainnet') - - const REALM_SYMBOL = process.env.REALM_SYMBOL || 'MNGO' - const realmInfo = await getCertifiedRealmInfo(REALM_SYMBOL, connectionContext) - - const governances = await getGovernanceAccounts( - realmInfo!.programId, - MAINNET_RPC_NODE, - Governance, - getAccountTypes(Governance), - [pubkeyFilter(1, realmInfo!.realmId)!] - ) - - const governanceIds = Object.keys(governances).map((k) => new PublicKey(k)) - - const proposalsByGovernance = await Promise.all( - governanceIds.map((governanceId) => { - return getGovernanceAccounts( - realmInfo!.programId, - MAINNET_RPC_NODE, - Proposal, - getAccountTypes(Proposal), - [pubkeyFilter(1, governanceId)!] - ) - }) - ) - - const proposals: { - [proposal: string]: ProgramAccount - } = Object.assign({}, ...proposalsByGovernance) - - const realmGovernances = Object.fromEntries( - Object.entries(governances).filter(([_k, v]) => - v.account.realm.equals(realmInfo!.realmId) - ) - ) - - const realmProposals = Object.fromEntries( - Object.entries(proposals).filter(([_k, v]) => - Object.keys(realmGovernances).includes(v.account.governance.toBase58()) - ) - ) - - console.log(`- scanning all '${REALM_SYMBOL}' proposals`) - let countJustOpenedForVoting = 0 - let countVotingNotStartedYet = 0 - let countClosed = 0 - for (const k in realmProposals) { - const proposal = realmProposals[k] - - if ( - // voting is closed - proposal.account.votingCompletedAt - ) { - countClosed++ - continue - } - - if ( - // voting has not started yet - !proposal.account.votingAt - ) { - countVotingNotStartedYet++ - continue - } - - if ( - // proposal opened in last 5 mins - nowInSeconds - proposal.account.votingAt.toNumber() <= - fiveMinutesSeconds + toleranceSeconds - // proposal opened in last 24 hrs - useful to notify when bot recently stopped working - // and missed the 5 min window - // (nowInSeconds - proposal.info.votingAt.toNumber())/(60 * 60) <= - // 24 - ) { - countJustOpenedForVoting++ - - const msg = `“${ - proposal.account.name - }” proposal just opened for voting 🗳 https://dao-beta.mango.markets/dao/${escape( - REALM_SYMBOL - )}/proposal/${k}` - - console.log(msg) - if (process.env.WEBHOOK_URL) { - axios.post(process.env.WEBHOOK_URL, { content: msg }) - } - } - } - console.log( - `-- countJustOpenedForVoting: ${countJustOpenedForVoting}, countVotingNotStartedYet: ${countVotingNotStartedYet}, countClosed: ${countClosed}` - ) -} - -// start notifier immediately -errorWrapper() - -setInterval(errorWrapper, fiveMinutesSeconds * 1000) diff --git a/sentry.client.config.js b/sentry.client.config.js deleted file mode 100644 index 710b0560d3..0000000000 --- a/sentry.client.config.js +++ /dev/null @@ -1,21 +0,0 @@ -// This file configures the initialization of Sentry on the browser. -// The config you add here will be used whenever a page is visited. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ - -import * as Sentry from '@sentry/nextjs' - -const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN -const SENTRY_ENVIRONMENT = process.env.VERCEL_ENV - -Sentry.init({ - dsn: - SENTRY_DSN || - 'https://18ab56d9b27a4483a29e51d6520afbc6@o434108.ingest.sentry.io/6380292', - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1.0, - environment: SENTRY_ENVIRONMENT, - // ... - // Note: if you want to override the automatic release value, do not set a - // `release` value here - use the environment variable `SENTRY_RELEASE`, so - // that it will also get attached to your source maps -}) diff --git a/sentry.properties b/sentry.properties deleted file mode 100644 index bf6aaa8b2a..0000000000 --- a/sentry.properties +++ /dev/null @@ -1,4 +0,0 @@ -defaults.url=https://sentry.io/ -defaults.org=solana -defaults.project=realms -cli.executable=../../../.npm/_npx/a8388072043b4cbc/node_modules/@sentry/cli/bin/sentry-cli diff --git a/sentry.server.config.js b/sentry.server.config.js deleted file mode 100644 index 834aba3221..0000000000 --- a/sentry.server.config.js +++ /dev/null @@ -1,21 +0,0 @@ -// This file configures the initialization of Sentry on the server. -// The config you add here will be used whenever the server handles a request. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ - -import * as Sentry from '@sentry/nextjs' - -const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN -const SENTRY_ENVIRONMENT = process.env.VERCEL_ENV - -Sentry.init({ - dsn: - SENTRY_DSN || - 'https://18ab56d9b27a4483a29e51d6520afbc6@o434108.ingest.sentry.io/6380292', - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1.0, - environment: SENTRY_ENVIRONMENT, - // ... - // Note: if you want to override the automatic release value, do not set a - // `release` value here - use the environment variable `SENTRY_RELEASE`, so - // that it will also get attached to your source maps -}) diff --git a/stores/useGovernanceAssetsStore.tsx b/stores/useGovernanceAssetsStore.tsx deleted file mode 100644 index 174db83fc0..0000000000 --- a/stores/useGovernanceAssetsStore.tsx +++ /dev/null @@ -1,594 +0,0 @@ -import create, { State } from 'zustand' -import { - getNativeTreasuryAddress, - Governance, - GovernanceAccountType, - Realm, - TOKEN_PROGRAM_ID, -} from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { - AUXILIARY_TOKEN_ACCOUNTS, - DEFAULT_NATIVE_SOL_MINT, - DEFAULT_NFT_TREASURY_MINT, - HIDDEN_GOVERNANCES, - HIDDEN_TREASURES, - WSOL_MINT, -} from '@components/instructions/tools' -import { - AccountInfoGen, - getMultipleAccountInfoChunked, - parseMintAccountData, - parseTokenAccountData, - TokenProgramAccount, -} from '@utils/tokens' -import { ParsedAccountData, PublicKey } from '@solana/web3.js' -import { AccountInfo, MintInfo } from '@solana/spl-token' -import { AccountInfo as AccountInfoGeneric } from '@solana/web3.js' -import { TokenAccountLayout } from '@blockworks-foundation/mango-client' -import tokenService from '@utils/services/token' -import { ConnectionContext } from '@utils/connection' -import axios from 'axios' -import { - AccountType, - AccountTypeGeneric, - AccountTypeAuxiliaryToken, - AccountTypeMint, - AccountTypeNFT, - AccountTypeProgram, - AccountTypeSol, - AccountTypeToken, - AssetAccount, -} from '@utils/uiTypes/assets' - -const tokenAccountOwnerOffset = 32 - -interface SolAccInfo { - governancePk: PublicKey - acc: any - nativeSolAddress: PublicKey -} -interface GovernanceAssetsStore extends State { - governancesArray: ProgramAccount[] - governedTokenAccounts: AssetAccount[] - assetAccounts: AssetAccount[] - loadGovernedAccounts: boolean - setGovernancesArray: ( - connection: ConnectionContext, - realm: ProgramAccount, - governances: { - [governance: string]: ProgramAccount - } - ) => void - getGovernedAccounts: ( - connection: ConnectionContext, - realm: ProgramAccount - ) => void - refetchGovernanceAccounts: ( - connection: ConnectionContext, - realm: ProgramAccount, - governancePk: PublicKey - ) => void -} - -const defaultState = { - governancesArray: [], - assetAccounts: [], - governedTokenAccounts: [], - loadGovernedAccounts: false, -} - -const useGovernanceAssetsStore = create((set, _get) => ({ - ...defaultState, - setGovernancesArray: (connection, realm, governances) => { - const array = Object.keys(governances) - .filter((gpk) => !HIDDEN_GOVERNANCES.has(gpk)) - .map((key) => governances[key]) - set((s) => { - s.governancesArray = array - }) - _get().getGovernedAccounts(connection, realm) - }, - getGovernedAccounts: async (connection, realm) => { - set((s) => { - s.loadGovernedAccounts = true - s.governedTokenAccounts = [] - s.assetAccounts = [] - }) - const governancesArray = _get().governancesArray - const accounts = governancesArray.length - ? await getAccountsForGovernances(connection, realm, governancesArray) - : [] - - set((s) => { - s.governancesArray = governancesArray - s.loadGovernedAccounts = false - s.governedTokenAccounts = accounts - .filter( - (x) => - x.type === AccountType.TOKEN || - x.type === AccountType.NFT || - x.type === AccountType.SOL - ) - .filter(filterOutHiddenAccs) - s.assetAccounts = accounts.filter(filterOutHiddenAccs) - }) - }, - refetchGovernanceAccounts: async (connection, realm, governancePk) => { - set((s) => { - s.loadGovernedAccounts = false - }) - - const governancesArray = _get().governancesArray.filter( - (x) => x.pubkey.toBase58() === governancePk.toBase58() - ) - - const previousAccounts = _get().assetAccounts.filter( - (x) => x.governance?.pubkey.toBase58() !== governancePk.toBase58() - ) - const accounts = await getAccountsForGovernances( - connection, - realm, - governancesArray - ) - set((s) => { - s.loadGovernedAccounts = false - s.governedTokenAccounts = [...previousAccounts, ...accounts] - .filter( - (x) => - x.type === AccountType.TOKEN || - x.type === AccountType.NFT || - x.type === AccountType.SOL - ) - .filter(filterOutHiddenAccs) - s.assetAccounts = [...previousAccounts, ...accounts].filter( - filterOutHiddenAccs - ) - }) - }, -})) -export default useGovernanceAssetsStore - -const getTokenAccountObj = async ( - governance: ProgramAccount, - tokenAccount: TokenProgramAccount, - mintAccounts: TokenProgramAccount[] -) => { - const isNftAccount = - tokenAccount.account.mint.toBase58() === DEFAULT_NFT_TREASURY_MINT - const mint = mintAccounts.find( - (x) => x.publicKey.toBase58() === tokenAccount.account.mint.toBase58() - ) - if (isNftAccount) { - return new AccountTypeNFT(tokenAccount, mint!, governance) - } - - if ( - mint?.account.supply && - mint?.account.supply.cmpn(1) !== 0 && - mint.publicKey.toBase58() !== DEFAULT_NATIVE_SOL_MINT - ) { - return new AccountTypeToken(tokenAccount, mint!, governance) - } -} - -const getSolAccountsObj = async ( - connection: ConnectionContext, - accounts: AssetAccount[], - solAccountsInfo: SolAccInfo[], - mintAccounts: TokenProgramAccount[], - governances: ProgramAccount[] -) => { - const solAccs: AccountTypeSol[] = [] - for (const i of solAccountsInfo) { - const mint = mintAccounts.find((x) => x.publicKey.toBase58() === WSOL_MINT) - const governance = governances.find( - (x) => x.pubkey.toBase58() === i.governancePk.toBase58() - ) - const account = await getSolAccountObj( - governance!, - connection, - mint!, - accounts, - i - ) - if (account) { - solAccs.push(account) - } - } - return solAccs as AssetAccount[] -} - -const getTokenAssetAccounts = async ( - tokenAccounts: { - publicKey: PublicKey - account: AccountInfo - }[], - governances: ProgramAccount[], - realm: ProgramAccount, - connection: ConnectionContext -) => { - const accounts: AssetAccount[] = [] - const mintsPks = [...tokenAccounts.map((x) => x.account.mint)] - //WSOL is used as mint for sol accounts to calculate amounts - if (!mintsPks.find((x) => x.toBase58() === WSOL_MINT)) { - mintsPks.push(new PublicKey(WSOL_MINT)) - } - const mintAccounts = mintsPks.length - ? await getMintAccountsInfo(connection, [...mintsPks]) - : [] - const nativeSolAddresses = await Promise.all( - governances.map((x) => getNativeTreasuryAddress(realm.owner, x!.pubkey)) - ) - const govNativeSolAddress = nativeSolAddresses.map((x, index) => { - return { - governancePk: governances[index].pubkey, - nativeSolAddress: x, - } - }) - const solAccs = await getSolAccountsInfo(connection, govNativeSolAddress) - for (const tokenAccount of tokenAccounts) { - const governance = governances.find( - (x) => x.pubkey.toBase58() === tokenAccount.account.owner.toBase58() - ) - if (governance) { - const account = await getTokenAccountObj( - governance!, - tokenAccount, - mintAccounts - ) - if (account) { - accounts.push(account) - } - } else if ( - [...Object.values(AUXILIARY_TOKEN_ACCOUNTS).flatMap((x) => x)].find((x) => - x.accounts.includes(tokenAccount.publicKey.toBase58()) - ) - ) { - const mint = mintAccounts.find( - (x) => x.publicKey.toBase58() === tokenAccount.account.mint.toBase58() - ) - const account = new AccountTypeAuxiliaryToken(tokenAccount, mint) - if (account) { - accounts.push(account) - } - } - } - const solAccounts = await getSolAccountsObj( - connection, - accounts, - solAccs, - mintAccounts, - governances - ) - if (solAccounts.length) { - accounts.push(...solAccounts) - } - return accounts -} - -const getMintAccounts = ( - mintGovernances: ProgramAccount[], - mintGovernancesMintInfo: (AccountInfoGeneric | null)[] -) => { - const accounts: AccountTypeMint[] = [] - mintGovernancesMintInfo.forEach((mintAccountInfo, index) => { - const mintGovernnace = mintGovernances[index] - if (!mintAccountInfo) { - throw new Error( - `Missing mintAccountInfo for: ${mintGovernnace?.pubkey.toBase58()}` - ) - } - const data = Buffer.from(mintAccountInfo.data) - const parsedMintInfo = parseMintAccountData(data) as MintInfo - const account = new AccountTypeMint(mintGovernnace!, parsedMintInfo) - if (account) { - accounts.push(account) - } - }) - return accounts -} - -const getProgramAssetAccounts = ( - programGovernances: ProgramAccount[] -) => { - const accounts: AccountTypeProgram[] = [] - programGovernances.forEach((programGov) => { - const account = new AccountTypeProgram(programGov!) - if (account) { - accounts.push(account) - } - }) - return accounts -} - -const getGenericAssetAccounts = ( - genericGovernances: ProgramAccount[] -) => { - const accounts: AccountTypeGeneric[] = [] - genericGovernances.forEach((programGov) => { - const account = new AccountTypeGeneric(programGov) - if (account) { - accounts.push(account) - } - }) - return accounts -} - -const getGovernancesByAccountTypes = ( - governancesArray: ProgramAccount[], - types: GovernanceAccountType[] -) => { - const governancesFiltered = governancesArray.filter((gov) => - types.some((t) => gov.account?.accountType === t) - ) - return governancesFiltered -} - -const getSolAccountObj = async ( - governance: ProgramAccount, - connection: ConnectionContext, - mint: TokenProgramAccount, - accounts: AssetAccount[], - solAcc: SolAccInfo -) => { - if (solAcc.acc) { - const tokenAccountsOwnedBySolAccountInfo = await connection.current.getTokenAccountsByOwner( - solAcc.nativeSolAddress, - { - programId: TOKEN_PROGRAM_ID, - } - ) - const tokenAccountsOwnedBySolAccounts = tokenAccountsOwnedBySolAccountInfo.value.map( - (x) => { - const publicKey = x.pubkey - const data = Buffer.from(x.account.data) - const account = parseTokenAccountData(publicKey, data) - return { publicKey, account } - } - ) - - const mintAccounts = tokenAccountsOwnedBySolAccounts.length - ? await getMintAccountsInfo( - connection, - tokenAccountsOwnedBySolAccounts.map((x) => x.account.mint) - ) - : [] - for (const acc of tokenAccountsOwnedBySolAccounts) { - const account = await getTokenAccountObj(governance, acc, mintAccounts) - if (account) { - accounts.push(account) - } - } - const minRentAmount = await connection.current.getMinimumBalanceForRentExemption( - 0 - ) - const solAccount = solAcc.acc as AccountInfoGen - solAccount.lamports = - solAccount.lamports !== 0 - ? solAccount.lamports - minRentAmount - : solAccount.lamports - - return new AccountTypeSol( - mint!, - solAcc.nativeSolAddress, - solAccount, - governance - ) - } -} - -const getAccountsForGovernances = async ( - connection: ConnectionContext, - realm: ProgramAccount, - governancesArray: ProgramAccount[] -) => { - const mintGovernances = getGovernancesByAccountTypes(governancesArray, [ - GovernanceAccountType.MintGovernanceV1, - GovernanceAccountType.MintGovernanceV2, - ]) - const programGovernances = getGovernancesByAccountTypes(governancesArray, [ - GovernanceAccountType.ProgramGovernanceV1, - GovernanceAccountType.ProgramGovernanceV2, - ]) - - const genericGovernances = getGenericAssetAccounts(governancesArray) - - const mintGovernancesMintInfo = await getMultipleAccountInfoChunked( - connection.current, - mintGovernances.map((x) => x.account.governedAccount) - ) - const mintAccounts = getMintAccounts(mintGovernances, mintGovernancesMintInfo) - const programAccounts = getProgramAssetAccounts(programGovernances) - const auxiliaryTokenAccounts = AUXILIARY_TOKEN_ACCOUNTS[realm.account.name] - ?.length - ? AUXILIARY_TOKEN_ACCOUNTS[realm.account.name] - : [] - - const ownedByGovernancesTokenAccounts = await axios.request({ - url: connection.endpoint, - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - data: JSON.stringify([ - ...governancesArray.map((x) => { - return { - jsonrpc: '2.0', - id: 1, - method: 'getProgramAccounts', - params: [ - TOKEN_PROGRAM_ID.toBase58(), - { - commitment: connection.current.commitment, - encoding: 'base64', - filters: [ - { - dataSize: TokenAccountLayout.span, // number of bytes - }, - { - memcmp: { - offset: tokenAccountOwnerOffset, // number of bytes - bytes: x.pubkey.toBase58(), // base58 encoded string - }, - }, - ], - }, - ], - } - }), - ...auxiliaryTokenAccounts.map((x) => { - return { - jsonrpc: '2.0', - id: x.owner, - method: 'getProgramAccounts', - params: [ - TOKEN_PROGRAM_ID.toBase58(), - { - commitment: connection.current.commitment, - encoding: 'base64', - filters: [ - { - dataSize: TokenAccountLayout.span, // number of bytes - }, - { - memcmp: { - offset: tokenAccountOwnerOffset, // number of bytes - bytes: x.owner, // base58 encoded string - }, - }, - ], - }, - ], - } - }), - ]), - }) - const tokenAccountsJson = ownedByGovernancesTokenAccounts.data.map((x) => { - const auxiliaryMatch = auxiliaryTokenAccounts.find( - (auxAcc) => auxAcc.owner === x.id - ) - if (auxiliaryMatch) { - x.result = x.result?.filter((x) => - auxiliaryMatch.accounts.includes(x.pubkey) - ) - } - return x - }) - const tokenAccountsParsed = tokenAccountsJson.length - ? [...tokenAccountsJson.flatMap((x) => x.result)].map((x) => { - const publicKey = new PublicKey(x.pubkey) - const data = Buffer.from(x.account.data[0], 'base64') - const account = parseTokenAccountData(publicKey, data) - return { publicKey, account } - }) - : [] - - const tokenAssetAccounts = await getTokenAssetAccounts( - tokenAccountsParsed, - governancesArray, - realm, - connection - ) - const governedTokenAccounts = tokenAssetAccounts - await tokenService.fetchTokenPrices( - governedTokenAccounts - .filter((x) => x.extensions.mint?.publicKey) - .map((x) => x.extensions.mint!.publicKey.toBase58()) - ) - return [ - ...mintAccounts, - ...programAccounts, - ...governedTokenAccounts, - ...genericGovernances, - ] -} - -const getMintAccountsInfo = async ( - connection: ConnectionContext, - pubkeys: PublicKey[] -) => { - const mintAccountsInfo = await axios.request({ - url: connection.endpoint, - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - data: JSON.stringify([ - ...pubkeys.map((x) => { - return { - jsonrpc: '2.0', - id: x.toBase58(), - method: 'getAccountInfo', - params: [ - x.toBase58(), - { - commitment: connection.current.commitment, - encoding: 'base64', - }, - ], - } - }), - ]), - }) - const mintAccountsJson = mintAccountsInfo.data - const mintAccountsParsed = mintAccountsJson?.map((x) => { - const result = x.result - const publicKey = new PublicKey(x.id) - const data = Buffer.from(result.value.data[0], 'base64') - const account = parseMintAccountData(data) - return { publicKey, account } - }) - return mintAccountsParsed -} - -const getSolAccountsInfo = async ( - connection: ConnectionContext, - pubkeys: { governancePk: PublicKey; nativeSolAddress: PublicKey }[] -) => { - const solAccountsInfo = await axios.request({ - url: connection.endpoint, - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - data: JSON.stringify([ - ...pubkeys.map((x) => { - return { - jsonrpc: '2.0', - id: 1, - method: 'getAccountInfo', - params: [ - x.nativeSolAddress.toBase58(), - { - commitment: connection.current.commitment, - encoding: 'jsonParsed', - }, - ], - } - }), - ]), - }) - const solAccountsJson = solAccountsInfo.data - const solAccountsParsed = solAccountsJson?.length - ? solAccountsJson - .flatMap((x, index) => { - return { - acc: x.result.value, - ...pubkeys[index], - } - }) - .filter((x) => x.acc) - : [] - return solAccountsParsed as SolAccInfo[] -} - -const filterOutHiddenAccs = (x: AssetAccount) => { - const pubkey = typeof x.pubkey === 'string' ? x.pubkey : x.pubkey.toBase58() - return ( - HIDDEN_TREASURES.findIndex((x) => x === pubkey) === -1 && - (!x.extensions.token || - !x.extensions.token?.account.isFrozen || - x.type !== AccountType.GENERIC) - ) -} diff --git a/stores/useMembersStore.tsx b/stores/useMembersStore.tsx deleted file mode 100644 index 7a7e63e57d..0000000000 --- a/stores/useMembersStore.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import create, { State } from 'zustand' -import { ViewState } from '@components/Members/types' -import { Member, Delegates } from '@utils/uiTypes/members' - -interface MembersStore extends State { - compact: { - currentView: ViewState - currentMember: Member | null - members: Member[] - activeMembers: Member[] - delegates: Delegates | null - } - setCurrentCompactViewMember: (item: Member) => void - setCurrentCompactView: (viewState: ViewState) => void - resetCompactViewState: () => void - setMembers: (members: Member[]) => void - setDelegates: (delegates: Delegates) => void -} - -const compactDefaultState = { - currentView: ViewState.MainView, - currentMember: null, - members: [], - activeMembers: [], - delegates: null, -} - -const useMembersStore = create((set, _get) => ({ - compact: { - ...compactDefaultState, - }, - setCurrentCompactViewMember: (item) => { - set((s) => { - s.compact.currentMember = item - }) - }, - setCurrentCompactView: (viewState) => { - set((s) => { - s.compact.currentView = viewState - }) - }, - resetCompactViewState: () => { - set((s) => { - s.compact = { ...compactDefaultState } - }) - }, - setMembers: (members: Member[]) => { - const activeMembers: Member[] = members.filter( - (x) => !x.councilVotes.isZero() || !x.communityVotes.isZero() - ) - set((s) => { - s.compact.members = members - s.compact.activeMembers = activeMembers - }) - }, - setDelegates: (delegates: Delegates) => { - set((s) => { - s.compact.delegates = delegates - }) - }, -})) - -export default useMembersStore diff --git a/stores/useNotificationStore.tsx b/stores/useNotificationStore.tsx deleted file mode 100644 index 5d6a01697b..0000000000 --- a/stores/useNotificationStore.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import create, { State } from 'zustand' -import produce from 'immer' -import { persist } from 'zustand/middleware' - -interface NotificationStore extends State { - notifications: Array<{ - type: string - message: string - description?: string - txid?: string - }> - set: (x: any) => void - modalState: ModalStates -} - -export enum ModalStates { - Selection = 1, - Dialect = 2, -} - -const useNotificationStore = create( - persist( - (set, _get) => ({ - notifications: [], - set: (fn) => set(produce(fn)), - modalState: ModalStates.Selection, - }), - { - name: 'notifications', - } - ) -) - -export default useNotificationStore diff --git a/stores/useRouterHistoryStore.tsx b/stores/useRouterHistoryStore.tsx deleted file mode 100644 index ca9d78eca9..0000000000 --- a/stores/useRouterHistoryStore.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import create, { State } from 'zustand' - -interface RouterHistoryStore extends State { - history: string[] - setHistory: (history: string[]) => void -} - -const useRouterHistoryStore = create((set, _get) => ({ - history: [], - setHistory: (history) => { - set({ history: history }) - }, -})) - -export default useRouterHistoryStore diff --git a/stores/useTransactionStore.tsx b/stores/useTransactionStore.tsx deleted file mode 100644 index 284ca20f12..0000000000 --- a/stores/useTransactionStore.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import create, { State } from 'zustand' - -interface TransactionStore extends State { - isProcessing: boolean - transactionsCount: number - processedTransactions: number - hasErrors: boolean - error: any - txid: string - retryCallback: (() => Promise) | null - startProcessing: (transactionsCount: number) => void - incrementProcessedTransactions: () => void - closeTransactionProcess: () => void - showTransactionError: ( - retryCallback: () => Promise, - e: any, - txid: string - ) => void -} - -const defaultState = { - isProcessing: false, - transactionsCount: 0, - processedTransactions: 0, - retryCallback: null, - hasErrors: false, - error: '', - txid: '', -} - -const useTransactionsStore = create((set, _get) => ({ - ...defaultState, - startProcessing: (transactionsCount) => - set({ - ...defaultState, - transactionsCount: transactionsCount, - isProcessing: true, - }), - incrementProcessedTransactions: () => { - const currentCount = _get().processedTransactions - set({ - processedTransactions: currentCount + 1, - }) - }, - closeTransactionProcess: () => { - set({ - ...defaultState, - }) - }, - showTransactionError: (retryCallback, error, txid) => { - set({ - retryCallback: retryCallback, - error, - hasErrors: true, - txid: txid, - }) - }, -})) - -export default useTransactionsStore diff --git a/stores/useTreasuryAccountStore.tsx b/stores/useTreasuryAccountStore.tsx deleted file mode 100644 index ec5d39c68f..0000000000 --- a/stores/useTreasuryAccountStore.tsx +++ /dev/null @@ -1,141 +0,0 @@ -import create, { State } from 'zustand' -import { getNfts } from '@utils/tokens' -import tokenService from '@utils/services/token' -import { ConfirmedSignatureInfo, PublicKey } from '@solana/web3.js' -import { notify } from '@utils/notifications' -import { NFTWithMint } from '@utils/uiTypes/nfts' -import { Connection } from '@solana/web3.js' -import { TokenInfo } from '@solana/spl-token-registry' -import { WSOL_MINT } from '@components/instructions/tools' -import { AccountType, AssetAccount } from '@utils/uiTypes/assets' - -interface TreasuryAccountStore extends State { - currentAccount: AssetAccount | null - mintAddress: string - tokenInfo?: TokenInfo - recentActivity: ConfirmedSignatureInfo[] - - allNfts: NFTWithMint[] - governanceNfts: { - [governance: string]: NFTWithMint[] - } - isLoadingNfts: boolean - isLoadingRecentActivity: boolean - isLoadingTokenAccounts: boolean - setCurrentAccount: (account: AssetAccount, connection) => void - handleFetchRecentActivity: (account: AssetAccount, connection) => void - getNfts: ( - nftsGovernedTokenAccounts: AssetAccount[], - connection: Connection - ) => void -} - -const useTreasuryAccountStore = create((set, _get) => ({ - currentAccount: null, - mintAddress: '', - tokenInfo: undefined, - recentActivity: [], - allNfts: [], - governanceNfts: {}, - isLoadingNfts: false, - isLoadingRecentActivity: false, - isLoadingTokenAccounts: false, - getNfts: async (nftsGovernedTokenAccounts, connection) => { - set((s) => { - s.isLoadingNfts = true - }) - let realmNfts: NFTWithMint[] = [] - const nftsPerPubkey = {} - for (const acc of nftsGovernedTokenAccounts) { - const governance = acc.governance.pubkey.toBase58() - try { - const nfts = acc.governance.pubkey - ? await getNfts(connection, acc.governance.pubkey) - : [] - if (acc.isSol) { - const solAccountNfts = acc.extensions.transferAddress - ? await getNfts( - connection, - new PublicKey(acc.extensions.transferAddress!) - ) - : [] - realmNfts = [...realmNfts, ...solAccountNfts] - - nftsPerPubkey[acc.extensions.transferAddress!.toBase58()] = [ - ...solAccountNfts, - ] - } - realmNfts = [...realmNfts, ...nfts] - if (governance) { - if (nftsPerPubkey[governance]) { - nftsPerPubkey[governance] = [...nftsPerPubkey[governance], ...nfts] - } else { - nftsPerPubkey[governance] = [...nfts] - } - } - } catch (e) { - console.log(e) - notify({ - message: `Unable to fetch nfts for governance ${governance}`, - }) - } - } - set((s) => { - s.allNfts = realmNfts - s.governanceNfts = nftsPerPubkey - s.isLoadingNfts = false - }) - }, - setCurrentAccount: async (account, connection) => { - if (!account) { - set((s) => { - s.currentAccount = null - s.mintAddress = '' - s.tokenInfo = undefined - s.recentActivity = [] - }) - return - } - let mintAddress = - account && account.extensions.token - ? account.extensions.token.account.mint.toBase58() - : '' - if (account.type === AccountType.SOL) { - mintAddress = WSOL_MINT - } - const tokenInfo = tokenService.getTokenInfo(mintAddress) - set((s) => { - s.currentAccount = account - s.mintAddress = mintAddress - s.tokenInfo = mintAddress && tokenInfo ? tokenInfo : undefined - }) - _get().handleFetchRecentActivity(account, connection) - }, - handleFetchRecentActivity: async (account, connection) => { - set((s) => { - s.isLoadingRecentActivity = true - }) - let recentActivity = [] - const address = account.extensions.transferAddress - try { - recentActivity = await connection.current.getConfirmedSignaturesForAddress2( - address, - { - limit: 5, - }, - 'confirmed' - ) - } catch (e) { - notify({ - type: 'error', - message: 'Unable to fetch recent account history', - }) - } - set((s) => { - s.recentActivity = recentActivity - s.isLoadingRecentActivity = false - }) - }, -})) - -export default useTreasuryAccountStore diff --git a/stores/useVotePluginsClientStore.tsx b/stores/useVotePluginsClientStore.tsx deleted file mode 100644 index cccc868d87..0000000000 --- a/stores/useVotePluginsClientStore.tsx +++ /dev/null @@ -1,185 +0,0 @@ -import create, { State } from 'zustand' -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { NftVoterClient } from '@solana/governance-program-library' -import { SwitchboardQueueVoterClient } from '../SwitchboardVotePlugin/SwitchboardQueueVoterClient' -import { getRegistrarPDA, Registrar } from 'VoteStakeRegistry/sdk/accounts' -import { AnchorProvider, Wallet } from '@project-serum/anchor' -import { tryGetNftRegistrar, tryGetRegistrar } from 'VoteStakeRegistry/sdk/api' -import { SignerWalletAdapter } from '@solana/wallet-adapter-base' -import { ConnectionContext } from '@utils/connection' -import { ProgramAccount, Realm } from '@solana/spl-governance' -import { getNftRegistrarPDA } from 'NftVotePlugin/sdk/accounts' -import { VotingClient, VotingClientProps } from '@utils/uiTypes/VotePlugin' -import { PythClient } from 'pyth-staking-api' -import { PublicKey } from '@solana/web3.js' - -interface UseVotePluginsClientStore extends State { - state: { - //diffrent plugins to choose because we will still have functions related only to one plugin - vsrClient: VsrClient | undefined - nftClient: NftVoterClient | undefined - switchboardClient: SwitchboardQueueVoterClient | undefined - pythClient: PythClient | undefined - voteStakeRegistryRegistrar: Registrar | null - nftMintRegistrar: any - currentRealmVotingClient: VotingClient - voteStakeRegistryRegistrarPk: PublicKey | null - } - handleSetVsrClient: ( - wallet: SignerWalletAdapter | undefined, - connection: ConnectionContext - ) => void - handleSetNftClient: ( - wallet: SignerWalletAdapter | undefined, - connection: ConnectionContext - ) => void - handleSetSwitchboardClient: ( - wallet: SignerWalletAdapter | undefined, - connection: ConnectionContext - ) => void - handleSetPythClient: ( - wallet: SignerWalletAdapter | undefined, - connection: ConnectionContext - ) => void - handleSetVsrRegistrar: ( - client: VsrClient, - realm: ProgramAccount | undefined - ) => void - handleSetNftRegistrar: ( - client: NftVoterClient, - realm: ProgramAccount | undefined - ) => void - handleSetCurrentRealmVotingClient: ({ - client, - realm, - walletPk, - }: VotingClientProps) => void -} - -const defaultState = { - vsrClient: undefined, - nftClient: undefined, - switchboardClient: undefined, - pythClient: undefined, - voteStakeRegistryRegistrar: null, - voteStakeRegistryRegistrarPk: null, - nftMintRegistrar: null, - currentRealmVotingClient: new VotingClient({ - client: undefined, - realm: undefined, - walletPk: undefined, - }), -} - -const useVotePluginsClientStore = create( - (set, _get) => ({ - state: { - ...defaultState, - }, - handleSetVsrClient: async (wallet, connection) => { - const options = AnchorProvider.defaultOptions() - const provider = new AnchorProvider( - connection.current, - (wallet as unknown) as Wallet, - options - ) - const vsrClient = await VsrClient.connect( - provider, - connection.cluster === 'devnet' - ) - set((s) => { - s.state.vsrClient = vsrClient - }) - }, - handleSetVsrRegistrar: async (client, realm) => { - const clientProgramId = client!.program.programId - const { registrar } = await getRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - clientProgramId - ) - const existingRegistrar = await tryGetRegistrar(registrar, client!) - set((s) => { - s.state.voteStakeRegistryRegistrar = existingRegistrar - s.state.voteStakeRegistryRegistrarPk = registrar - }) - }, - handleSetNftClient: async (wallet, connection) => { - const options = AnchorProvider.defaultOptions() - const provider = new AnchorProvider( - connection.current, - (wallet as unknown) as Wallet, - options - ) - const nftClient = await NftVoterClient.connect( - provider, - connection.cluster === 'devnet' - ) - set((s) => { - s.state.nftClient = nftClient - }) - }, - handleSetNftRegistrar: async (client, realm) => { - const clientProgramId = client!.program.programId - const { registrar } = await getNftRegistrarPDA( - realm!.pubkey, - realm!.account.communityMint, - clientProgramId - ) - const existingRegistrar = await tryGetNftRegistrar(registrar, client!) - set((s) => { - s.state.nftMintRegistrar = existingRegistrar - }) - }, - handleSetSwitchboardClient: async (wallet, connection) => { - const options = AnchorProvider.defaultOptions() - const provider = new AnchorProvider( - connection.current, - (wallet as unknown) as Wallet, - options - ) - const switchboardClient = await SwitchboardQueueVoterClient.connect( - provider, - connection.cluster === 'devnet' - ) - set((s) => { - s.state.switchboardClient = switchboardClient - }) - }, - handleSetPythClient: async (wallet, connection) => { - if ( - connection.cluster === 'localnet' || - connection.cluster === 'devnet' - ) { - const options = AnchorProvider.defaultOptions() - const provider = new AnchorProvider( - connection.current, - (wallet as unknown) as Wallet, - options - ) - try { - const pythClient = await PythClient.connect( - provider, - connection.cluster - ) - set((s) => { - s.state.pythClient = pythClient - }) - } catch (e) { - console.error(e) - } - } - }, - handleSetCurrentRealmVotingClient: ({ client, realm, walletPk }) => { - set((s) => { - s.state.currentRealmVotingClient = new VotingClient({ - client, - realm, - walletPk, - }) - }) - }, - }) -) - -export default useVotePluginsClientStore diff --git a/stores/useWalletStore.tsx b/stores/useWalletStore.tsx deleted file mode 100644 index ccf3d7303c..0000000000 --- a/stores/useWalletStore.tsx +++ /dev/null @@ -1,579 +0,0 @@ -import create, { State } from 'zustand' -import produce from 'immer' -import { PublicKey } from '@solana/web3.js' -import { - TokenProgramAccount, - TokenAccount, - MintAccount, - tryGetMint, - getOwnedTokenAccounts, -} from '../utils/tokens' - -import { - getGovernance, - getGovernanceAccount, - getGovernanceAccounts, - getGovernanceProgramVersion, - Governance, - GOVERNANCE_CHAT_PROGRAM_ID, - Proposal, - ProposalTransaction, - Realm, - RealmConfigAccount, - SignatoryRecord, - TokenOwnerRecord, - tryGetRealmConfig, - VoteRecord, -} from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { getGovernanceChatMessages } from '@solana/spl-governance' -import { ChatMessage } from '@solana/spl-governance' -import { GoverningTokenType } from '@solana/spl-governance' -import { SignerWalletAdapter } from '@solana/wallet-adapter-base' -import { getCertifiedRealmInfo } from '@models/registry/api' -import { tryParsePublicKey } from '@tools/core/pubkey' -import type { ConnectionContext } from 'utils/connection' -import { getConnectionContext } from 'utils/connection' -import { pubkeyFilter } from '@solana/spl-governance' -import { - getTokenOwnerRecordsForRealmMintMapByOwner, - getVoteRecordsByProposalMapByVoter, - getVoteRecordsByVoterMapByProposal, -} from '@models/api' -import { accountsToPubkeyMap } from '@tools/sdk/accounts' -import { HIDDEN_PROPOSALS } from '@components/instructions/tools' -import { sleep } from '@blockworks-foundation/mango-client' - -interface WalletStore extends State { - connected: boolean - connection: ConnectionContext - current: SignerWalletAdapter | undefined - - ownVoteRecordsByProposal: { [proposal: string]: ProgramAccount } - realms: { [realm: string]: ProgramAccount } - selectedRealm: { - realm?: ProgramAccount - config?: ProgramAccount - mint?: MintAccount - programId?: PublicKey - councilMint?: MintAccount - governances: { [governance: string]: ProgramAccount } - proposals: { [proposal: string]: ProgramAccount } - /// Community token records by owner - tokenRecords: { [owner: string]: ProgramAccount } - /// Council token records by owner - councilTokenOwnerRecords: { - [owner: string]: ProgramAccount - } - mints: { [pubkey: string]: MintAccount } - programVersion: number - } - selectedProposal: { - proposal: ProgramAccount | undefined - governance: ProgramAccount | undefined - realm: ProgramAccount | undefined - instructions: { [instruction: string]: ProgramAccount } - voteRecordsByVoter: { [voter: string]: ProgramAccount } - signatories: { [signatory: string]: ProgramAccount } - chatMessages: { [message: string]: ProgramAccount } - descriptionLink?: string - proposalMint?: MintAccount - loading: boolean - tokenType?: GoverningTokenType - proposalOwner: ProgramAccount | undefined - } - providerUrl: string | undefined - tokenAccounts: TokenProgramAccount[] - set: (x: any) => void - actions: any - selectedCouncilDelegate: string | undefined - selectedCommunityDelegate: string | undefined - councilDelegateVoteRecordsByProposal: { - [proposal: string]: ProgramAccount - } - communityDelegateVoteRecordsByProposal: { - [proposal: string]: ProgramAccount - } -} - -const INITIAL_REALM_STATE = { - realm: undefined, - mint: undefined, - programId: undefined, - councilMint: undefined, - governances: {}, - proposals: {}, - tokenRecords: {}, - councilTokenOwnerRecords: {}, - loading: true, - mints: {}, - programVersion: 1, - config: undefined, -} - -const INITIAL_PROPOSAL_STATE = { - proposal: undefined, - governance: undefined, - realm: undefined, - instructions: {}, - voteRecordsByVoter: {}, - signatories: {}, - chatMessages: {}, - descriptionLink: undefined, - proposalMint: undefined, - loading: true, - proposalOwner: undefined, -} - -const useWalletStore = create((set, get) => ({ - connected: false, - connection: getConnectionContext('mainnet'), - current: undefined, - realms: {}, - ownVoteRecordsByProposal: {}, - selectedRealm: INITIAL_REALM_STATE, - selectedProposal: INITIAL_PROPOSAL_STATE, - providerUrl: undefined, - tokenAccounts: [], - switchboardProgram: undefined, - selectedCouncilDelegate: undefined, - selectedCommunityDelegate: undefined, - councilDelegateVoteRecordsByProposal: {}, - communityDelegateVoteRecordsByProposal: {}, - set: (fn) => set(produce(fn)), - actions: { - async fetchRealmBySymbol(cluster: string, symbol: string) { - const actions = get().actions - let connection = get().connection - const set = get().set - const newConnection = getConnectionContext(cluster) - if ( - connection.cluster !== newConnection.cluster || - connection.endpoint !== newConnection.endpoint - ) { - set((s) => { - s.connection = newConnection - }) - connection = get().connection - } - let programId: PublicKey | undefined - let realmId = tryParsePublicKey(symbol) - if (!realmId) { - const realmInfo = await getCertifiedRealmInfo(symbol, newConnection) - realmId = realmInfo?.realmId - programId = realmInfo?.programId - } else { - const realmAccountInfo = await connection.current.getAccountInfo( - realmId - ) - programId = realmAccountInfo?.owner - } - if (realmId && programId) { - const programVersion = await getGovernanceProgramVersion( - connection.current, - programId! - ) - set((s) => { - s.selectedRealm.programVersion = programVersion - }) - await actions.fetchAllRealms(programId) - actions.fetchRealm(programId, realmId) - } - }, - async fetchWalletTokenAccounts() { - const connection = get().connection.current - const connected = get().connected - const wallet = get().current - const walletOwner = wallet?.publicKey - const set = get().set - - if (connected && walletOwner) { - const ownedTokenAccounts = await getOwnedTokenAccounts( - connection, - walletOwner - ) - - set((state) => { - state.tokenAccounts = ownedTokenAccounts - }) - } else { - set((state) => { - state.tokenAccounts = [] - }) - } - }, - async fetchDelegateVoteRecords() { - const connection = get().connection.current - const connected = get().connected - const programId = get().selectedRealm.programId - const realmId = get().selectedRealm.realm?.pubkey - const selectedCouncilDelegate = get().selectedCouncilDelegate - const selectedCommunityDelegate = get().selectedCommunityDelegate - - const set = get().set - - if (connected && selectedCouncilDelegate && programId && realmId) { - const councilDelegateVoteRecordsByProposal = await getVoteRecordsByVoterMapByProposal( - connection, - programId, - new PublicKey(selectedCouncilDelegate) - ) - - set((state) => { - state.councilDelegateVoteRecordsByProposal = councilDelegateVoteRecordsByProposal - }) - } else { - set((state) => { - state.councilDelegateVoteRecordsByProposal = [] - }) - } - - if (connected && selectedCommunityDelegate && programId && realmId) { - const communityDelegateVoteRecordsByProposal = await getVoteRecordsByVoterMapByProposal( - connection, - programId, - new PublicKey(selectedCommunityDelegate) - ) - - set((state) => { - state.communityDelegateVoteRecordsByProposal = communityDelegateVoteRecordsByProposal - }) - } else { - set((state) => { - state.communityDelegateVoteRecordsByProposal = [] - }) - } - }, - - // selectedCouncilDelegate: string | undefined - // selectedCommunityDelegate: string | undefined - - async fetchOwnVoteRecords() { - const connection = get().connection.current - const connected = get().connected - const programId = get().selectedRealm.programId - const realmId = get().selectedRealm.realm?.pubkey - const realmMintPk = get().selectedRealm.realm?.account.communityMint - const wallet = get().current - const walletOwner = wallet?.publicKey - const set = get().set - - if (connected && walletOwner && programId && realmId) { - const [ownVoteRecordsByProposal, tokenRecords] = await Promise.all([ - getVoteRecordsByVoterMapByProposal( - connection, - programId, - walletOwner - ), - getTokenOwnerRecordsForRealmMintMapByOwner( - connection, - programId, - realmId, - realmMintPk - ), - ]) - set((state) => { - state.ownVoteRecordsByProposal = ownVoteRecordsByProposal - state.selectedRealm.tokenRecords = tokenRecords - }) - } else { - set((state) => { - state.ownVoteRecordsByProposal = [] - }) - } - }, - deselectRealm() { - const set = get().set - set((s) => { - s.selectedRealm = INITIAL_REALM_STATE - }) - }, - - // TODO: When this happens fetch vote records for selected delegate? - selectCouncilDelegate(councilDelegate) { - const set = get().set - set((s) => { - s.selectedCouncilDelegate = councilDelegate - }) - }, - selectCommunityDelegate(communityDelegate) { - const set = get().set - set((s) => { - s.selectedCommunityDelegate = communityDelegate - }) - }, - async fetchAllRealms(programId: PublicKey) { - const connection = get().connection.current - const set = get().set - - const realms = await getGovernanceAccounts(connection, programId, Realm) - - set((s) => { - s.realms = accountsToPubkeyMap(realms) - }) - }, - async fetchRealm(programId: PublicKey, realmId: PublicKey) { - const set = get().set - const connection = get().connection.current - const realms = get().realms - const realm = realms[realmId.toBase58()] - const mintsArray = ( - await Promise.all([ - realm?.account.communityMint - ? tryGetMint(connection, realm.account.communityMint) - : undefined, - realm?.account.config?.councilMint - ? tryGetMint(connection, realm.account.config.councilMint) - : undefined, - ]) - ).filter(Boolean) - - set((s) => { - s.selectedRealm.mints = Object.fromEntries( - mintsArray.map((m) => [m!.publicKey.toBase58(), m!.account]) - ) - }) - - const realmMints = get().selectedRealm.mints - const realmMintPk = realm.account.communityMint - const realmMint = realmMints[realmMintPk.toBase58()] - const realmCouncilMintPk = realm.account.config.councilMint - const realmCouncilMint = - realmCouncilMintPk && realmMints[realmCouncilMintPk.toBase58()] - const [ - governances, - tokenRecords, - councilTokenOwnerRecords, - config, - ] = await Promise.all([ - getGovernanceAccounts(connection, programId, Governance, [ - pubkeyFilter(1, realmId)!, - ]), - - getTokenOwnerRecordsForRealmMintMapByOwner( - connection, - programId, - realmId, - realmMintPk - ), - - getTokenOwnerRecordsForRealmMintMapByOwner( - connection, - programId, - realmId, - realmCouncilMintPk - ), - getRealmConfig(connection, programId, realmId), - ]) - - const governancesMap = accountsToPubkeyMap(governances) - - set((s) => { - s.selectedRealm.config = config - s.selectedRealm.realm = realm - s.selectedRealm.mint = realmMint - s.selectedRealm.programId = programId - s.selectedRealm.councilMint = realmCouncilMint - s.selectedRealm.governances = governancesMap - s.selectedRealm.tokenRecords = tokenRecords - s.selectedRealm.councilTokenOwnerRecords = councilTokenOwnerRecords - }) - get().actions.fetchOwnVoteRecords() - - const proposalsByGovernance = await Promise.all( - governances.map((g) => - getGovernanceAccounts(connection, programId, Proposal, [ - pubkeyFilter(1, g.pubkey)!, - ]) - ) - ) - - const proposals = accountsToPubkeyMap( - proposalsByGovernance - .flatMap((p) => p) - .filter((p) => !HIDDEN_PROPOSALS.has(p.pubkey.toBase58())) - ) - - set((s) => { - s.selectedRealm.proposals = proposals - s.selectedRealm.loading = false - }) - }, - - async refetchProposals() { - console.log('REFETCH PROPOSALS') - await sleep(200) - const set = get().set - const connection = get().connection.current - const realmId = get().selectedRealm.realm?.pubkey - const programId = get().selectedRealm.programId - const governances = await getGovernanceAccounts( - connection, - programId!, - Governance, - [pubkeyFilter(1, realmId)!] - ) - const proposalsByGovernance = await Promise.all( - governances.map((g) => - getGovernanceAccounts(connection, programId!, Proposal, [ - pubkeyFilter(1, g.pubkey)!, - ]) - ) - ) - const proposals = accountsToPubkeyMap( - proposalsByGovernance - .flatMap((p) => p) - .filter((p) => !HIDDEN_PROPOSALS.has(p.pubkey.toBase58())) - ) - - await set((s) => { - s.selectedRealm.proposals = proposals - }) - await get().actions.fetchOwnVoteRecords() - }, - // Fetches and updates governance for the selected realm - async fetchRealmGovernance(governancePk: PublicKey) { - const connection = get().connection.current - const set = get().set - - const governance = await getGovernance(connection, governancePk) - - set((s) => { - s.selectedRealm.governances[governancePk.toBase58()] = governance - }) - - return governance - }, - - async fetchProposal(proposalPk: string) { - if (HIDDEN_PROPOSALS.has(proposalPk)) { - return - } - - const connection = get().connection.current - const realmMints = get().selectedRealm.mints - const set = get().set - - set((s) => { - s.selectedProposal = INITIAL_PROPOSAL_STATE - }) - - const proposalPubKey = new PublicKey(proposalPk) - - const proposal = await getGovernanceAccount( - connection, - proposalPubKey, - Proposal - ) - - const proposalMint = - realmMints[proposal.account.governingTokenMint.toBase58()] - - const programId = proposal.owner - - const [ - governance, - instructions, - voteRecordsByVoter, - signatories, - chatMessages, - proposalOwner, - ] = await Promise.all([ - getGovernanceAccount( - connection, - proposal.account.governance, - Governance - ), - getGovernanceAccounts(connection, programId, ProposalTransaction, [ - pubkeyFilter(1, proposalPubKey)!, - ]), - getVoteRecordsByProposalMapByVoter( - connection, - programId, - proposalPubKey - ), - getGovernanceAccounts(connection, programId, SignatoryRecord, [ - pubkeyFilter(1, proposalPubKey)!, - ]), - getGovernanceChatMessages( - connection, - GOVERNANCE_CHAT_PROGRAM_ID, - proposalPubKey - ), - getGovernanceAccount( - connection, - proposal.account.tokenOwnerRecord, - TokenOwnerRecord - ), - ]) - - const realm = await getGovernanceAccount( - connection, - governance.account.realm, - Realm - ) - - const tokenType = realm.account.communityMint.equals( - proposal.account.governingTokenMint - ) - ? GoverningTokenType.Community - : GoverningTokenType.Council - - set((s) => { - s.selectedProposal.proposal = proposal - s.selectedProposal.descriptionLink = proposal.account.descriptionLink - s.selectedProposal.governance = governance - s.selectedProposal.realm = realm - s.selectedProposal.instructions = accountsToPubkeyMap(instructions) - s.selectedProposal.voteRecordsByVoter = voteRecordsByVoter - s.selectedProposal.signatories = accountsToPubkeyMap(signatories) - s.selectedProposal.chatMessages = accountsToPubkeyMap(chatMessages) - s.selectedProposal.proposalMint = proposalMint - s.selectedProposal.loading = false - s.selectedProposal.tokenType = tokenType - s.selectedProposal.proposalOwner = proposalOwner - }) - }, - async fetchChatMessages(proposalPubKey: PublicKey) { - const connection = get().connection.current - const set = get().set - - const chatMessages = await getGovernanceChatMessages( - connection, - GOVERNANCE_CHAT_PROGRAM_ID, - proposalPubKey - ) - - set((s) => { - s.selectedProposal.chatMessages = chatMessages - }) - }, - async fetchVoteRecords(proposal: ProgramAccount) { - const connection = get().connection.current - const set = get().set - - const programId = proposal.owner - const voteRecordsByVoter = await getVoteRecordsByProposalMapByVoter( - connection, - programId, - proposal.pubkey - ) - - console.log('voteRecords', voteRecordsByVoter) - - set((s) => { - s.selectedProposal.voteRecordsByVoter = voteRecordsByVoter - }) - }, - }, -})) - -export default useWalletStore - -const getRealmConfig = async (connection, programId, realmId) => { - try { - return await tryGetRealmConfig(connection, programId, realmId) - } catch (e) { - return null - } -} diff --git a/styles/ambit-font.css b/styles/ambit-font.css deleted file mode 100644 index 70dfd04697..0000000000 --- a/styles/ambit-font.css +++ /dev/null @@ -1,125 +0,0 @@ -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-Thin.woff2') format('woff2'), - url('/fonts/Ambit-Thin.woff') format('woff'); - font-weight: 100; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-ThinItalic.woff2') format('woff2'), - url('/fonts/Ambit-ThinItalic.woff') format('woff'); - font-weight: 100; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-ExtraLight.woff2') format('woff2'), - url('/fonts/Ambit-ExtraLight.woff') format('woff'); - font-weight: 200; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-ExtraLightItalic.woff2') format('woff2'), - url('/fonts/Ambit-ExtraLightItalic.woff') format('woff'); - font-weight: 200; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-Light.woff2') format('woff2'), - url('/fonts/Ambit-Light.woff') format('woff'); - font-weight: 300; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-LightItalic.woff2') format('woff2'), - url('/fonts/Ambit-LightItalic.woff') format('woff'); - font-weight: 300; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-Italic.woff2') format('woff2'), - url('/fonts/Ambit-Italic.woff') format('woff'); - font-weight: normal; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-Regular.woff2') format('woff2'), - url('/fonts/Ambit-Regular.woff') format('woff'); - font-weight: normal; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-SemiBold.woff2') format('woff2'), - url('/fonts/Ambit-SemiBold.woff') format('woff'); - font-weight: 600; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-SemiBoldItalic.woff2') format('woff2'), - url('/fonts/Ambit-SemiBoldItalic.woff') format('woff'); - font-weight: 600; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-Bold.woff2') format('woff2'), - url('/fonts/Ambit-Bold.woff') format('woff'); - font-weight: bold; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-BoldItalic.woff2') format('woff2'), - url('/fonts/Ambit-BoldItalic.woff') format('woff'); - font-weight: bold; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-Black.woff2') format('woff2'), - url('/fonts/Ambit-Black.woff') format('woff'); - font-weight: 900; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Ambit'; - src: url('/fonts/Ambit-BlackItalic.woff2') format('woff2'), - url('/fonts/Ambit-BlackItalic.woff') format('woff'); - font-weight: 900; - font-style: italic; - font-display: swap; -} diff --git a/styles/index.css b/styles/index.css deleted file mode 100644 index 31a842c24f..0000000000 --- a/styles/index.css +++ /dev/null @@ -1,295 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* Theme */ - -:root { - --primary-light: theme('colors.dark-theme.primary.light'); - --primary-dark: theme('colors.dark-theme.primary.dark'); - --secondary-1-light: theme('colors.dark-theme.secondary-1.light'); - --secondary-1-dark: theme('colors.dark-theme.secondary-1.dark'); - --secondary-2-light: theme('colors.dark-theme.secondary-2.light'); - --secondary-2-dark: theme('colors.dark-theme.secondary-2.dark'); - --red: theme('colors.dark-theme.red'); - --green: theme('colors.dark-theme.green'); - --orange: theme('colors.dark-theme.orange'); - --blue: theme('colors.dark-theme.blue'); - --bkg-1: theme('colors.dark-theme.bkg-1'); - --bkg-2: theme('colors.dark-theme.bkg-2'); - --bkg-3: theme('colors.dark-theme.bkg-3'); - --bkg-4: theme('colors.dark-theme.bkg-4'); - --fgd-1: theme('colors.dark-theme.fgd-1'); - --fgd-2: theme('colors.dark-theme.fgd-2'); - --fgd-3: theme('colors.dark-theme.fgd-3'); - --fgd-4: theme('colors.dark-theme.fgd-4'); -} - -[data-theme='Light'] { - --primary-light: theme('colors.light-theme.primary.light'); - --primary-dark: theme('colors.light-theme.primary.dark'); - --secondary-1-light: theme('colors.light-theme.secondary-1.light'); - --secondary-1-dark: theme('colors.light-theme.secondary-1.dark'); - --secondary-2-light: theme('colors.light-theme.secondary-2.light'); - --secondary-2-dark: theme('colors.light-theme.secondary-2.dark'); - --red: theme('colors.light-theme.red'); - --green: theme('colors.light-theme.green'); - --orange: theme('colors.light-theme.orange'); - --blue: theme('colors.light-theme.blue'); - --bkg-1: theme('colors.light-theme.bkg-1'); - --bkg-2: theme('colors.light-theme.bkg-2'); - --bkg-3: theme('colors.light-theme.bkg-3'); - --bkg-4: theme('colors.light-theme.bkg-4'); - --fgd-1: theme('colors.light-theme.fgd-1'); - --fgd-2: theme('colors.light-theme.fgd-2'); - --fgd-3: theme('colors.light-theme.fgd-3'); - --fgd-4: theme('colors.light-theme.fgd-4'); -} - -/* base */ - -* { - @apply p-0 m-0; -} - -body { - @apply text-base tracking-wide bg-bkg-1 text-fgd-1 font-body; -} - -h1 { - @apply text-2xl font-bold; -} - -h2 { - @apply mb-2 text-xl font-bold; -} - -h3 { - @apply mb-1 text-lg font-bold; -} - -h4 { - @apply mb-1 text-sm font-bold; -} - -p { - @apply text-sm leading-normal break-words text-fgd-2; -} - -tbody { - @apply border-t border-bkg-4; -} - -.hero-text { - @apply text-2xl font-bold; -} - -button { - @apply tracking-wide; -} - -.default-transition { - @apply transition-all duration-300; -} - -.markdown > h1 { - @apply mb-2 text-lg text-fgd-1; -} - -.markdown > h2 { - @apply mb-2 text-lg text-fgd-1; -} - -.markdown > p { - @apply mb-2 text-fgd-1; -} - -.markdown ul { - @apply mb-4; -} - -.markdown a { - @apply underline break-all transition-all duration-300 text-fgd-1 hover:text-fgd-2 hover:no-underline; -} - -.markdown li { - @apply mb-2 ml-6 font-normal list-disc text-fgd-2; -} - -.markdown pre { - @apply whitespace-pre-wrap; -} - -.markdown code { - @apply block mb-2 text-sm; -} - -:placeholder-shown { - @apply font-body; -} - -/* Scrollbars */ - -body::-webkit-scrollbar { - width: 8px; - background-color: var(--bkg-1); -} - -body::-webkit-scrollbar-thumb { - border-radius: 4px; - background-color: var(--bkg-4); -} - -body::-webkit-scrollbar-track { - background-color: inherit; -} - -body::-webkit-scrollbar-corner { - background-color: var(--bkg-3); -} - -.thin-scroll::-webkit-scrollbar { - width: 4px; -} - -/* Track */ -.thin-scroll::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); - -webkit-border-radius: 2px; - border-radius: 2px; -} - -/* Handle */ -.thin-scroll::-webkit-scrollbar-thumb { - -webkit-border-radius: 2px; - border-radius: 2px; - background: var(--bkg-4); -} -.thin-scroll::-webkit-scrollbar-thumb:window-inactive { - background: var(--bkg-4); -} - -.pointer { - cursor: pointer; -} - -::-webkit-calendar-picker-indicator { - filter: invert(1); -} - -.border-brand-gradient { - border-image-slice: 1; - border-image-source: linear-gradient( - 93deg, - #00c2ff 3%, - #00e4ff 50%, - #87f2ff 98% - ); -} - -.bg-brand-gradient { - @apply bg-gradient-to-r from-[#00C2FF] via-[#00E4FF] to-[#87F2FF]; -} - -.transition-from-gradient-background::before { - position: absolute; - content: ''; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 0; - opacity: 0; - transition: all 0.3s linear; - border-radius: 999px; - @apply border bg-gradient-to-r from-fgd-1 to-fgd-1; -} - -.transition-from-gradient-background:hover::before { - opacity: 1; -} - -.transition-from-gradient-background:active::before { - opacity: 1; - @apply border-fgd-3 bg-gradient-to-r from-fgd-3 to-fgd-3; -} - -.transition-from-gradient-background:disabled { - background-image: none; -} - -.transition-from-gradient-background:disabled::before { - opacity: 1; - @apply border border-fgd-4 bg-gradient-to-r from-fgd-4 to-fgd-4; -} - -.border-gradient { - border: 1px solid transparent; - background-origin: border-box; - background-clip: content-box, border-box; -} -.border-gradient.transparent-fill { - background-image: linear-gradient(var(--bkg-2), var(--bkg-2)), - linear-gradient(93deg, #00c2ff 3%, #00e4ff 50%, #87f2ff 98%); -} - -input[type='range'].with-gradient { - -webkit-appearance: none; - height: 16px; - border-radius: 5px; - background-image: linear-gradient( - to right, - #00c2ff 0%, - #00e4ff 50%, - #87f2ff 100% - ); - background-size: 50% 100%; - background-repeat: no-repeat; - @apply bg-bkg-3; -} - -input[type='range'].with-gradient::-moz-range-thumb { - -webkit-appearance: none; - cursor: ew-resize; - width: 32px; - height: 32px; - flex-grow: 0; - border-radius: 25px; - box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2); - background-color: #fff; - transition: background 0.3s ease-in-out; -} - -input[type='range'].with-gradient:disabled::-moz-range-thumb { - background-color: #1f1f20; -} - -input[type='range'].with-gradient:disabled::-webkit-slider-thumb { - background-color: #1f1f20; -} - -input[type='range'].with-gradient::-webkit-slider-thumb { - -webkit-appearance: none; - cursor: ew-resize; - width: 32px; - height: 32px; - flex-grow: 0; - border-radius: 25px; - box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2); - background-color: #fff; - transition: background 0.3s ease-in-out; -} -input[type='range'].with-gradient::-moz-range-track, -input[type='range'].with-gradient::-webkit-slider-runnable-track { - -webkit-appearance: none; - box-shadow: none; - border: none; - background: transparent; -} - -/* break-words is depricated a tailwind and CSS class, -advised to use overflow-wrap instead - see documentation below -https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#values */ -.overflow-wrap-anywhere { - overflow-wrap: anywhere; -} diff --git a/styles/typography.css b/styles/typography.css deleted file mode 100644 index 4d27ed308f..0000000000 --- a/styles/typography.css +++ /dev/null @@ -1,86 +0,0 @@ -h1.heading-xl, -h2.heading-lg, -h3.heading-base, -h4.heading-sm, -.heading-cta { - letter-spacing: -0.5px; - line-height: 110%; - @apply font-normal; -} - -h1.heading-xl { - font-size: 36px; - @apply font-serif md:text-[70px]; -} - -h2.heading-lg { - font-size: 36px; - @apply font-serif md:text-[50px]; -} - -h3.heading-base { - font-size: 24px; - @apply font-sans md:text-[36px]; -} - -h4.heading-sm { - font-size: 18px; - @apply font-sans md:text-[24px]; -} - -/* CTAs */ -.heading-cta { - font-size: 16px; - @apply font-sans md:text-[18px]; -} - -.body-base, -.body-sm, -.body-sm.font-bold, -.body-xs { - letter-spacing: 0; - line-height: 140%; - @apply font-sans font-normal; -} - -.body-lg { - font-size: 25px; -} - -.body-base { - font-size: 18px; -} - -.body-sm { - font-size: 15px; - @apply md:text-[16px]; -} - -.body-xs { - font-size: 12px; -} - -.label-base { - letter-spacing: 0; - line-height: 120%; - font-size: 16px; - @apply font-sans font-normal; -} - -.input-lg, -.input-base, -.input-sm { - letter-spacing: -0.5px; - line-height: 110%; - @apply font-sans font-normal; -} - -.input-lg { - font-size: 28px; -} -.input-base { - font-size: 25px; -} -.input-sm { - font-size: 20px; -} diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index c05f539294..0000000000 --- a/tailwind.config.js +++ /dev/null @@ -1,132 +0,0 @@ -module.exports = { - content: [ - './pages/**/*.{js,ts,jsx,tsx}', - './components/**/*.{js,ts,jsx,tsx}', - './Strategies/**/*.{js,ts,jsx,tsx}', - './VoteStakeRegistry/**/*.{js,ts,jsx,tsx}', - ], - future: { - removeDeprecatedGapUtilities: true, - purgeLayersByDefault: true, - }, - theme: { - fontFamily: { - serif: ['p22-mackinac-pro, ui-serif, serif'], - sans: ['Ambit, sans-serif'], - display: ['PT Mono, monospace'], - body: ['Inter, sans-serif'], - }, - extend: { - cursor: { - help: 'help', - }, - colors: { - 'dark-theme': { - primary: { light: '#5DC9EB', dark: '#cecece' }, - 'secondary-1': { light: '#AFD803', dark: '#6CBF00' }, - 'secondary-2': { light: '#FFCB1B', dark: '#F48F25' }, - 'bkg-1': '#17161c', - 'bkg-2': '#201F27', - 'bkg-3': '#292833', - 'bkg-4': '#363D44', - 'fgd-1': '#E5E5E6', - 'fgd-2': '#8C8F93', - 'fgd-3': '#A4ACB7', - 'fgd-4': '#40474F', - orange: '#F7A531', - red: '#FF7C7C', - green: '#30C89A', - blue: '#00e4ff', - }, - 'light-theme': { - primary: { light: '#5DC9EB', dark: '#101010' }, - 'secondary-1': { light: '#AFD803', dark: '#6CBF00' }, - 'secondary-2': { light: '#E54033', dark: '#C7251A' }, - 'fgd-1': '#3d3d3d', - 'fgd-2': '#7a7a7a', - 'fgd-3': '#adadad', - 'fgd-4': '#cccccc', - 'bkg-1': '#fcfcfc', - 'bkg-2': '#f0f0f0', - 'bkg-3': '#e0e0e0', - 'bkg-4': '#d6d6d6', - orange: '#F7A531', - red: '#cb676f', - green: '#6BBF5F', - blue: '#3F77DE', - }, - 'mango-theme': { - primary: { light: '#F2C94C', dark: '#EEB91B' }, - 'secondary-1': { light: '#AFD803', dark: '#6CBF00' }, - 'secondary-2': { light: '#E54033', dark: '#C7251A' }, - 'bkg-1': '#141125', - 'bkg-2': '#242132', - 'bkg-3': '#393549', - 'bkg-4': '#4F4B63', - 'fgd-1': '#F0EDFF', - 'fgd-2': '#FCFCFF', - 'fgd-3': '#B9B5CE', - 'fgd-4': '#706C81', - orange: '#F2C94C', - red: '#E54033', - green: '#AFD803', - blue: '#8AACEB', - }, - 'bkg-1': 'var(--bkg-1)', - 'bkg-2': 'var(--bkg-2)', - 'bkg-3': 'var(--bkg-3)', - 'bkg-4': 'var(--bkg-4)', - 'fgd-1': 'var(--fgd-1)', - 'fgd-2': 'var(--fgd-2)', - 'fgd-3': 'var(--fgd-3)', - 'fgd-4': 'var(--fgd-4)', - 'primary-light': 'var(--primary-light)', - 'primary-dark': 'var(--primary-dark)', - 'secondary-1-light': 'var(--secondary-1-light)', - 'secondary-1-dark': 'var(--secondary-1-dark)', - 'secondary-2-light': 'var(--secondary-2-light)', - 'secondary-2-dark': 'var(--secondary-2-dark)', - red: 'var(--red)', - green: 'var(--green)', - orange: 'var(--orange)', - blue: 'var(--blue)', - 'error-red': '#ff7c7c', - 'confirm-green': '#8effdd', - 'bkg-grey': '#292833', - 'night-grey': '#201F27', - }, - animation: { - 'connect-wallet-ping': - 'connect-wallet-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite', - gradient: 'gradient 4s ease-in-out infinite', - loader: 'loader 0.6s infinite alternate', - }, - keyframes: { - 'connect-wallet-ping': { - '75%, 100%': { - transform: 'scale(1.06, 1.3)', - opacity: '10%', - }, - }, - gradient: { - '0%': { - 'background-position': '15% 0%', - }, - '50%': { - 'background-position': '85% 100%', - }, - '100%': { - 'background-position': '15% 0%', - }, - }, - loader: { - to: { - opacity: 0.1, - transform: 'translate3d(0, 0, 0)', - }, - }, - }, - }, - }, - plugins: [], -} diff --git a/test/models/registry/api.test.ts b/test/models/registry/api.test.ts deleted file mode 100644 index 14e0eda86d..0000000000 --- a/test/models/registry/api.test.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { getCertifiedRealmInfo } from 'models/registry/api' -import { getConnectionContext } from 'utils/connection' -import realms from 'public/realms/mainnet-beta.json' - -test('getCertifiedRealmInfo', async () => { - const mango = realms.find(({ symbol }) => symbol === 'MNGO')! - - const realmInfo = await getCertifiedRealmInfo( - mango.symbol, - getConnectionContext('mainnet') - ) - - expect(realmInfo!.realmId.toBase58()).toEqual(mango.realmId) -}) diff --git a/test/pages/index.test.tsx b/test/pages/index.test.tsx deleted file mode 100644 index b9f0fd4b07..0000000000 --- a/test/pages/index.test.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @jest-environment jsdom - */ -import React from 'react' -import Home from '../../pages/index' -import { render, waitFor } from '@testing-library/react' -import singletonRouter from 'next/router' - -const originalRealm = process.env.REALM - -describe('Home page redirects to', () => { - afterEach(() => { - process.env.REALM = originalRealm - }) - - test('/realms when process.env.REALM is not set', async () => { - delete process.env.REALM - render() - - await waitFor(() => { - expect(singletonRouter).toMatchObject({ - pathname: '/realms', - }) - }) - }) - - test(`/dao/MNGO when process.env.REALM = 'MNGO'`, async () => { - process.env.REALM = 'MNGO' - render() - - await waitFor(() => { - expect(singletonRouter).toMatchObject({ - pathname: '/dao/MNGO', - }) - }) - }) - - test.todo(`/realms when process.env.REALM is not a valid realm symbol`) -}) diff --git a/test/setup.js b/test/setup.js deleted file mode 100644 index 02e5523043..0000000000 --- a/test/setup.js +++ /dev/null @@ -1,3 +0,0 @@ -import '@testing-library/jest-dom/extend-expect' - -jest.mock('next/router', () => require('next-router-mock')) diff --git a/tools/constants.ts b/tools/constants.ts deleted file mode 100644 index 8ee17752e7..0000000000 --- a/tools/constants.ts +++ /dev/null @@ -1,8 +0,0 @@ -import BN from 'bn.js' - -/** - * The minimum amount of community tokens to create governance and proposals, for tokens with 0 supply - */ -export const MIN_COMMUNITY_TOKENS_TO_CREATE_W_0_SUPPLY = 1000000 - -export const MAX_TOKENS_TO_DISABLE = new BN('18446744073709551615') diff --git a/tools/core/option.ts b/tools/core/option.ts deleted file mode 100644 index 771676b120..0000000000 --- a/tools/core/option.ts +++ /dev/null @@ -1,79 +0,0 @@ -// Rust style Option with typeScript twist inspired by https://gist.github.com/s-panferov/575da5a7131c285c0539 - -export interface Option { - map(fn: (a: T) => U): Option - isSome(): this is Some - isNone(): this is None - unwrap(): T - tryUnwrap(): T | undefined -} - -export function some(value: T) { - return new Some(value) -} - -export function none() { - return new None() -} - -export function option(value: T | undefined) { - return value ? some(value) : none() -} - -export class Some implements Option { - value: T - - map(fn: (a: T) => U): Option { - return new Some(fn(this.value)) - } - - constructor(value: T) { - this.value = value - } - - isSome(): this is Some { - return true - } - - isNone(): this is None { - return false - } - - unwrap(): T { - return this.value - } - - tryUnwrap(): T | undefined { - return this.unwrap() - } - - toString(): string { - return `Some(${this.value})` - } -} - -export class None implements Option { - map(_fn: (a: T) => U): Option { - return new None() - } - - isSome(): this is Some { - return false - } - - isNone(): this is None { - return true - } - - unwrap(): T { - throw new Error('None has no value') - } - - tryUnwrap(): T | undefined { - return undefined - } - - public toString(): string { - return 'None' - } -} diff --git a/tools/core/pubkey.ts b/tools/core/pubkey.ts deleted file mode 100644 index c0fad187f2..0000000000 --- a/tools/core/pubkey.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { PublicKey } from '@solana/web3.js' - -export function isPublicKey(pk: string) { - try { - new PublicKey(pk) - return true - } catch { - return false - } -} - -export function tryParsePublicKey(pk: string) { - try { - return new PublicKey(pk) - } catch { - return undefined - } -} diff --git a/tools/core/resources.ts b/tools/core/resources.ts deleted file mode 100644 index 91b4602ee7..0000000000 --- a/tools/core/resources.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// Returns resource path part by replacing prohibited characters like white spaces with '-' -export function getResourcePathPart(name: string | undefined) { - return name?.replace(' ', '-') -} diff --git a/tools/core/script.ts b/tools/core/script.ts deleted file mode 100644 index f3e5675b6b..0000000000 --- a/tools/core/script.ts +++ /dev/null @@ -1,37 +0,0 @@ -export function mapEntries(xs: any, mapFn: (kv: [string, any]) => any) { - return Object.entries(xs).map(mapFn) -} - -export function mapFromEntries( - xs: any, - mapFn: (kv: [string, any]) => [string, any] -) { - return Object.fromEntries(mapEntries(xs, mapFn)) -} - -// Converts array of items to a Map -export function arrayToMap(source: readonly T[], getKey: (item: T) => K) { - return new Map(source.map((item) => [getKey(item), item] as [K, T])) -} - -// Returns unique elements from the given source array and using the provided key selector -export function arrayToUnique( - source: readonly T[], - getKey: (item: T) => K -) { - return Array.from(arrayToMap(source, getKey).values()) -} - -export function arrayToRecord( - source: readonly T[], - getKey: (item: T) => string -) { - return source.reduce((all, a) => ({ ...all, [getKey(a)]: a }), {}) as Record< - string, - T - > -} - -export function getNameOf() { - return (name: keyof T) => name -} diff --git a/tools/core/strings.ts b/tools/core/strings.ts deleted file mode 100644 index 0004f14741..0000000000 --- a/tools/core/strings.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function equalsIgnoreCase( - str1: string | undefined, - str2: string | undefined -) { - return str1?.toUpperCase() === str2?.toUpperCase() -} - -export function endsWithIgnoreCase(string: string, searchString: string) { - return string.toUpperCase().endsWith(searchString.toUpperCase()) -} - -export function replaceIgnoreCase( - string: string, - searchString: string, - replaceValue: string -) { - const pattern = new RegExp(searchString, 'gi') - return string.replace(pattern, replaceValue) -} diff --git a/tools/governance/prepareRealmCreation.ts b/tools/governance/prepareRealmCreation.ts deleted file mode 100644 index 065ccaabdf..0000000000 --- a/tools/governance/prepareRealmCreation.ts +++ /dev/null @@ -1,325 +0,0 @@ -import { - PublicKey, - Keypair, - TransactionInstruction, - Connection, -} from '@solana/web3.js' -import { - getGovernanceProgramVersion, - WalletSigner, -} from '@solana/spl-governance' - -import { - GovernanceConfig, - SetRealmAuthorityAction, - VoteThresholdPercentage, - VoteTipping, - withCreateNativeTreasury, - withCreateMintGovernance, - withCreateRealm, - withDepositGoverningTokens, - withSetRealmAuthority, -} from '@solana/spl-governance' - -import { getWalletPublicKey } from '@utils/sendTransactions' -import { tryGetMint } from '@utils/tokens' - -import { parseMintMaxVoteWeight } from '@tools/governance/units' -import { - getTimestampFromDays, - getMintNaturalAmountFromDecimalAsBN, -} from '@tools/sdk/units' -import { withCreateMint } from '@tools/sdk/splToken/withCreateMint' -import { withCreateAssociatedTokenAccount } from '@tools/sdk/splToken/withCreateAssociatedTokenAccount' -import { withMintTo } from '@tools/sdk/splToken/withMintTo' -import { MAX_TOKENS_TO_DISABLE } from '@tools/constants' - -import BN from 'bn.js' - -interface RealmCreation { - connection: Connection - wallet: WalletSigner - programIdAddress: string - - realmName: string - tokensToGovernThreshold: number | undefined - maxVotingTimeInDays?: number - - nftCollectionCount?: number - existingCommunityMintPk: PublicKey | undefined - communityMintSupplyFactor: number | undefined - communityYesVotePercentage: number - transferCommunityMintAuthority: boolean - - createCouncil: boolean - existingCouncilMintPk: PublicKey | undefined - transferCouncilMintAuthority: boolean - councilWalletPks: PublicKey[] - - additionalRealmPlugins?: PublicKey[] -} - -export async function prepareRealmCreation({ - connection, - wallet, - programIdAddress, - - realmName, - tokensToGovernThreshold, - maxVotingTimeInDays = 3, - - nftCollectionCount = 0, - existingCommunityMintPk, - communityYesVotePercentage, - communityMintSupplyFactor: rawCMSF, - transferCommunityMintAuthority, - - createCouncil, - existingCouncilMintPk, - transferCouncilMintAuthority, - councilWalletPks, - - additionalRealmPlugins = [], -}: RealmCreation) { - const realmInstructions: TransactionInstruction[] = [] - const realmSigners: Keypair[] = [] - - const mintsSetupInstructions: TransactionInstruction[] = [] - const councilMembersInstructions: TransactionInstruction[] = [] - - const mintsSetupSigners: Keypair[] = [] - const initialCouncilTokenAmount = 1 - - const communityMintSupplyFactor = parseMintMaxVoteWeight(rawCMSF) - const walletPk = getWalletPublicKey(wallet) - const programIdPk = new PublicKey(programIdAddress) - const programVersion = await getGovernanceProgramVersion( - connection, - programIdPk - ) - - console.log( - 'Prepare realm - program and version', - programIdAddress, - programVersion - ) - const communityMintAccount = - existingCommunityMintPk && - (await tryGetMint(connection, existingCommunityMintPk)) - const zeroCommunityTokenSupply = existingCommunityMintPk - ? communityMintAccount?.account.supply.isZero() - : true - const communityMintDecimals = communityMintAccount?.account?.decimals || 6 - - console.log('Prepare realm - community mint address', existingCommunityMintPk) - console.log('Prepare realm - community mint account', communityMintAccount) - - const councilMintAccount = - existingCouncilMintPk && - (await tryGetMint(connection, existingCouncilMintPk)) - const zeroCouncilTokenSupply = existingCommunityMintPk - ? councilMintAccount?.account.supply.isZero() - : true - - console.log('Prepare realm - council mint address', existingCouncilMintPk) - console.log('Prepare realm - council mint account', councilMintAccount) - - let communityMintPk = existingCommunityMintPk - if (!communityMintPk) { - // Create community mint - communityMintPk = await withCreateMint( - connection, - mintsSetupInstructions, - mintsSetupSigners, - walletPk, - null, - communityMintDecimals, - walletPk - ) - } - - console.log( - 'Prepare realm - zero community token supply', - zeroCommunityTokenSupply, - ' | zero council token supply', - zeroCouncilTokenSupply - ) - console.log('Prepare realm - council mint address', existingCouncilMintPk) - // Create council mint - let councilMintPk - if ( - zeroCommunityTokenSupply && - zeroCouncilTokenSupply && - nftCollectionCount === 0 && - councilWalletPks.length === 0 - ) { - councilWalletPks.push(wallet.publicKey as PublicKey) - councilMintPk = await withCreateMint( - connection, - mintsSetupInstructions, - mintsSetupSigners, - walletPk, - null, - 0, - walletPk - ) - } else if (!existingCouncilMintPk && createCouncil) { - councilMintPk = await withCreateMint( - connection, - mintsSetupInstructions, - mintsSetupSigners, - walletPk, - null, - 0, - walletPk - ) - } else { - councilMintPk = existingCouncilMintPk - } - - let walletAtaPk: PublicKey | undefined - const tokenAmount = 1 - - console.log('Prepare realm - council members', councilWalletPks) - for (const teamWalletPk of councilWalletPks) { - const ataPk = await withCreateAssociatedTokenAccount( - councilMembersInstructions, - councilMintPk, - teamWalletPk, - walletPk - ) - - // Mint 1 council token to each team member - await withMintTo( - councilMembersInstructions, - councilMintPk, - ataPk, - walletPk, - tokenAmount - ) - - if (teamWalletPk.equals(walletPk)) { - walletAtaPk = ataPk - } - } - - // Convert to mint natural amount - const minCommunityTokensToCreateAsMintValue = - typeof tokensToGovernThreshold !== 'undefined' - ? getMintNaturalAmountFromDecimalAsBN( - tokensToGovernThreshold, - communityMintDecimals - ) - : MAX_TOKENS_TO_DISABLE - - const realmPk = await withCreateRealm( - realmInstructions, - programIdPk, - programVersion, - realmName, - walletPk, - communityMintPk, - walletPk, - councilMintPk, - communityMintSupplyFactor, - minCommunityTokensToCreateAsMintValue, - ...additionalRealmPlugins - ) - - // If the current wallet is in the team then deposit the council token - if (walletAtaPk) { - await withDepositGoverningTokens( - realmInstructions, - programIdPk, - programVersion, - realmPk, - walletAtaPk, - councilMintPk, - walletPk, - walletPk, - walletPk, - new BN(initialCouncilTokenAmount) - ) - } - - // Put community and council mints under the realm governance with default config - const config = new GovernanceConfig({ - voteThresholdPercentage: new VoteThresholdPercentage({ - value: communityYesVotePercentage, - }), - minCommunityTokensToCreateProposal: minCommunityTokensToCreateAsMintValue, - // Do not use instruction hold up time - minInstructionHoldUpTime: 0, - // max voting time 3 days - maxVotingTime: getTimestampFromDays(maxVotingTimeInDays), - voteTipping: VoteTipping.Strict, - proposalCoolOffTime: 0, - minCouncilTokensToCreateProposal: new BN(initialCouncilTokenAmount), - }) - - const communityMintGovPk = await withCreateMintGovernance( - realmInstructions, - programIdPk, - programVersion, - realmPk, - communityMintPk, - config, - transferCommunityMintAuthority, - walletPk, - PublicKey.default, - walletPk, - walletPk - ) - - await withCreateNativeTreasury( - realmInstructions, - programIdPk, - communityMintGovPk, - walletPk - ) - - if (councilMintPk) { - await withCreateMintGovernance( - realmInstructions, - programIdPk, - programVersion, - realmPk, - councilMintPk, - config, - transferCouncilMintAuthority, - walletPk, - PublicKey.default, - walletPk, - walletPk - ) - } - - // Set the community governance as the realm authority - if (transferCommunityMintAuthority) { - withSetRealmAuthority( - realmInstructions, - programIdPk, - programVersion, - realmPk, - walletPk, - communityMintGovPk, - SetRealmAuthorityAction.SetChecked - ) - } - - return { - communityMintGovPk, - communityMintPk, - councilMintPk, - realmPk, - realmInstructions, - realmSigners, - mintsSetupInstructions, - mintsSetupSigners, - councilMembersInstructions, - walletPk, - programIdPk, - programVersion, - minCommunityTokensToCreateAsMintValue, - } -} diff --git a/tools/governance/units.ts b/tools/governance/units.ts deleted file mode 100644 index f53dc91af7..0000000000 --- a/tools/governance/units.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { MintMaxVoteWeightSource } from '@solana/spl-governance' -import BN from 'bn.js' -import { BigNumber } from 'bignumber.js' - -export const parseMintMaxVoteWeight = (mintMaxVoteWeight) => { - let value = MintMaxVoteWeightSource.FULL_SUPPLY_FRACTION.value - if (mintMaxVoteWeight) { - const fraction = new BigNumber(mintMaxVoteWeight) - .shiftedBy(MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS) - .toString() - value = new BN(fraction) - } - - return new MintMaxVoteWeightSource({ - value, - }) -} diff --git a/tools/routing.ts b/tools/routing.ts deleted file mode 100644 index 2ad2cc1a05..0000000000 --- a/tools/routing.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { RealmInfo } from 'models/registry/api' - -export function getRealmExplorerHost(realmInfo: RealmInfo | undefined) { - return realmInfo?.symbol === 'MNGO' - ? 'dao.mango.markets' - : 'realms-explorer.com' -} diff --git a/tools/sdk/accounts.ts b/tools/sdk/accounts.ts deleted file mode 100644 index c6e2320d84..0000000000 --- a/tools/sdk/accounts.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ProgramAccount } from '@solana/spl-governance' -import { arrayToRecord } from '@tools/core/script' - -/** - * Maps the source array of account to a map keyed by pubkey of the accounts - * @param accounts - * @returns - */ -export function accountsToPubkeyMap(accounts: ProgramAccount[]) { - return arrayToRecord(accounts, (a) => a.pubkey.toBase58()) -} diff --git a/tools/sdk/bpfUpgradeableLoader/accounts.ts b/tools/sdk/bpfUpgradeableLoader/accounts.ts deleted file mode 100644 index 799b187dca..0000000000 --- a/tools/sdk/bpfUpgradeableLoader/accounts.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { getProgramDataAccount } from '@solana/spl-governance' -import { Connection, PublicKey } from '@solana/web3.js' - -export async function getProgramSlot( - connection: Connection, - programId: string -) { - const programData = await getProgramDataAccount( - connection, - new PublicKey(programId) - ) - - return programData.slot -} diff --git a/tools/sdk/bpfUpgradeableLoader/createCloseBuffer.ts b/tools/sdk/bpfUpgradeableLoader/createCloseBuffer.ts deleted file mode 100644 index f820210cbd..0000000000 --- a/tools/sdk/bpfUpgradeableLoader/createCloseBuffer.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { BPF_UPGRADE_LOADER_ID } from '@solana/spl-governance' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' - -export async function createCloseBuffer( - bufferAddress: PublicKey, - closedAccountSolReceiver: PublicKey, - upgradeAuthority: PublicKey -) { - const bpfUpgradableLoaderId = BPF_UPGRADE_LOADER_ID - - const keys = [ - { - pubkey: bufferAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: closedAccountSolReceiver, - isWritable: true, - isSigner: false, - }, - { - pubkey: upgradeAuthority, - isWritable: false, - isSigner: true, - }, - ] - - return new TransactionInstruction({ - keys, - programId: bpfUpgradableLoaderId, - data: Buffer.from([5, 0, 0, 0]), // close instruction bincode - }) -} diff --git a/tools/sdk/bpfUpgradeableLoader/createSetUpgradeAuthority.ts b/tools/sdk/bpfUpgradeableLoader/createSetUpgradeAuthority.ts deleted file mode 100644 index b71840d37b..0000000000 --- a/tools/sdk/bpfUpgradeableLoader/createSetUpgradeAuthority.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js' - -export async function createSetUpgradeAuthority( - programId: PublicKey, - upgradeAuthority: PublicKey, - newUpgradeAuthority: PublicKey, - bpfUpgradableLoaderId: PublicKey -) { - const [programDataAddress] = await PublicKey.findProgramAddress( - [programId.toBuffer()], - bpfUpgradableLoaderId - ) - - const keys = [ - { - pubkey: programDataAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: upgradeAuthority, - isWritable: false, - isSigner: true, - }, - { - pubkey: newUpgradeAuthority, - isWritable: false, - isSigner: false, - }, - ] - - return new TransactionInstruction({ - keys, - programId: bpfUpgradableLoaderId, - data: Buffer.from([4, 0, 0, 0]), // SetAuthority instruction bincode - }) -} diff --git a/tools/sdk/bpfUpgradeableLoader/createUpgradeInstruction.ts b/tools/sdk/bpfUpgradeableLoader/createUpgradeInstruction.ts deleted file mode 100644 index 379e87d610..0000000000 --- a/tools/sdk/bpfUpgradeableLoader/createUpgradeInstruction.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { - PublicKey, - SYSVAR_CLOCK_PUBKEY, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js' -import { BPF_UPGRADE_LOADER_ID } from '@utils/tokens' - -export async function createUpgradeInstruction( - programId: PublicKey, - bufferAddress: PublicKey, - upgradeAuthority: PublicKey, - spillAddress: PublicKey -) { - const bpfUpgradableLoaderId = BPF_UPGRADE_LOADER_ID - const [programDataAddress] = await PublicKey.findProgramAddress( - [programId.toBuffer()], - bpfUpgradableLoaderId - ) - - const keys = [ - { - pubkey: programDataAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: programId, - isWritable: true, - isSigner: false, - }, - { - pubkey: bufferAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: spillAddress, - isWritable: true, - isSigner: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isWritable: false, - isSigner: false, - }, - { - pubkey: SYSVAR_CLOCK_PUBKEY, - isWritable: false, - isSigner: false, - }, - { - pubkey: upgradeAuthority, - isWritable: false, - isSigner: true, - }, - ] - - return new TransactionInstruction({ - keys, - programId: bpfUpgradableLoaderId, - data: Buffer.from([3, 0, 0, 0]), // Upgrade instruction bincode - }) -} diff --git a/tools/sdk/solend/configuration.ts b/tools/sdk/solend/configuration.ts deleted file mode 100644 index 07f6af3f1e..0000000000 --- a/tools/sdk/solend/configuration.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { PublicKey } from '@solana/web3.js' - -// Describe what information should be provided for Solend -abstract class ASolendConfiguration { - abstract get programID(): PublicKey - abstract get lendingMarket(): PublicKey - abstract get lendingMarketAuthority() - abstract get createObligationConfiguration(): { - lamports: number - space: number - seed: string - } - - abstract getSupportedCollateralMintsInformation(): SupportedCollateralMintsInformation - abstract getSupportedMintInformation( - mint: SupportedMintName - ): SupportedMintInformation - abstract getReserveOfGivenMints(mintNames: SupportedMintName[]): PublicKey[] - abstract getSupportedMintNames(): SupportedMintName[] - abstract getTokenNameByReservePublicKey( - reserveToFind: PublicKey - ): string | undefined -} - -// Add here new token to support ... -export type SupportedMintName = 'USDC' -export type SupportedCollateralMintNames = 'cUSDC' - -type SupportedCollateralMintInformation = { - name: string - mint: PublicKey - decimals: number -} - -type SupportedCollateralMintsInformation = { - [key in SupportedCollateralMintNames]: SupportedCollateralMintInformation -} - -type SupportedMintInformation = { - mint: PublicKey - relatedCollateralMint: SupportedCollateralMintInformation - decimals: number - reserve: PublicKey - reserveLiquiditySupply: PublicKey - pythOracle: PublicKey - switchboardFeedAddress: PublicKey - reserveCollateralSupplySplTokenAccount: PublicKey -} - -type SupportedMintsInformation = { - [key in SupportedMintName]: SupportedMintInformation -} - -class SolendConfiguration implements ASolendConfiguration { - protected supportedCollateralMintsInformation: SupportedCollateralMintsInformation = { - cUSDC: { - name: 'Solend Protocol: cUSDC', - mint: new PublicKey('993dVFL2uXWYeoXuEBFXR4BijeXdTv4s6BzsCjJZuwqk'), - decimals: 6, - }, - } - - protected supportedMintsInformation: SupportedMintsInformation = { - USDC: { - relatedCollateralMint: this.supportedCollateralMintsInformation.cUSDC, - mint: new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'), - decimals: 6, - reserve: new PublicKey('BgxfHJDzm44T7XG68MYKx7YisTjZu73tVovyZSjJMpmw'), - reserveLiquiditySupply: new PublicKey( - '8SheGtsopRUDzdiD6v6BR9a6bqZ9QwywYQY99Fp5meNf' - ), - pythOracle: new PublicKey('Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD'), - switchboardFeedAddress: new PublicKey( - 'CZx29wKMUxaJDq6aLVQTdViPL754tTR64NAgQBUGxxHb' - ), - reserveCollateralSupplySplTokenAccount: new PublicKey( - 'UtRy8gcEu9fCkDuUrU8EmC7Uc6FZy5NCwttzG7i6nkw' - ), - }, - } - - public readonly programID = new PublicKey( - 'So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo' - ) - - public readonly lendingMarket = new PublicKey( - '4UpD2fh7xH3VP9QQaXtsS1YY3bxzWhtfpks7FatyKvdY' - ) - - public readonly lendingMarketAuthority = new PublicKey( - 'DdZR6zRFiUt4S5mg7AV1uKB2z1f1WzcNYCaTEEWPAuby' - ) - - // All of theses numbers are magic numbers we got by looking at Solend documentation & transactions - public readonly createObligationConfiguration = { - lamports: 9938880, - space: 1300, - seed: this.lendingMarket.toString().slice(0, 32), - } - - public getSupportedCollateralMintsInformation(): SupportedCollateralMintsInformation { - return this.supportedCollateralMintsInformation - } - - public getSupportedMintInformation( - mintName: SupportedMintName - ): SupportedMintInformation { - return this.supportedMintsInformation[mintName] - } - - public getReserveOfGivenMints(mintNames: SupportedMintName[]): PublicKey[] { - return mintNames.map( - (mintName) => this.supportedMintsInformation[mintName].reserve - ) - } - - public getSupportedMintNames(): SupportedMintName[] { - return Object.keys(this.supportedMintsInformation) as SupportedMintName[] - } - - public getTokenNameByReservePublicKey( - reserveToFind: PublicKey - ): string | undefined { - return Object.entries(this.supportedMintsInformation).reduce( - (tmp, [mintName, { reserve }]) => { - if (reserveToFind.toString() === reserve.toString()) { - return mintName - } - - return tmp - }, - undefined - ) - } -} - -export default new SolendConfiguration() diff --git a/tools/sdk/solend/createObligationAccount.ts b/tools/sdk/solend/createObligationAccount.ts deleted file mode 100644 index d21d12780b..0000000000 --- a/tools/sdk/solend/createObligationAccount.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { PublicKey, SystemProgram } from '@solana/web3.js' -import SolendConfiguration from './configuration' -import { deriveObligationAddressFromWalletAndSeed } from './utils' - -export async function createObligationAccount({ - fundingAddress, - walletAddress, -}: { - fundingAddress: PublicKey - walletAddress: PublicKey -}) { - const newAccountPubkey = await deriveObligationAddressFromWalletAndSeed( - walletAddress - ) - - const { - seed, - lamports, - space, - } = SolendConfiguration.createObligationConfiguration - - return SystemProgram.createAccountWithSeed({ - basePubkey: walletAddress, - fromPubkey: fundingAddress, - newAccountPubkey, - programId: SolendConfiguration.programID, - seed, - lamports, - space, - }) -} diff --git a/tools/sdk/solend/depositReserveLiquidityAndObligationCollateral.ts b/tools/sdk/solend/depositReserveLiquidityAndObligationCollateral.ts deleted file mode 100644 index ff73cedfa4..0000000000 --- a/tools/sdk/solend/depositReserveLiquidityAndObligationCollateral.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { PublicKey } from '@solana/web3.js' -import { depositReserveLiquidityAndObligationCollateralInstruction } from '@solendprotocol/solend-sdk' -import { SupportedMintName } from './configuration' - -import SolendConfiguration from './configuration' - -import { deriveObligationAddressFromWalletAndSeed } from './utils' -import { findATAAddrSync } from '@utils/ataTools' - -export async function depositReserveLiquidityAndObligationCollateral({ - obligationOwner, - liquidityAmount, - mintName, -}: { - obligationOwner: PublicKey - liquidityAmount: number | BN - mintName: SupportedMintName -}) { - const { - relatedCollateralMint, - mint, - reserve, - reserveLiquiditySupply, - pythOracle, - switchboardFeedAddress, - reserveCollateralSupplySplTokenAccount, - } = SolendConfiguration.getSupportedMintInformation(mintName) - - const reserveCollateralMint = relatedCollateralMint.mint - - const [usdcTokenAccount] = findATAAddrSync(obligationOwner, mint) - const [cusdcTokenAccount] = findATAAddrSync( - obligationOwner, - relatedCollateralMint.mint - ) - - const sourceLiquidity = usdcTokenAccount - const sourceCollateral = cusdcTokenAccount - const destinationCollateral = reserveCollateralSupplySplTokenAccount - - const obligation = await deriveObligationAddressFromWalletAndSeed( - obligationOwner - ) - - const transferAuthority = obligationOwner - - return depositReserveLiquidityAndObligationCollateralInstruction( - liquidityAmount, - - // Example: USDC token account address (owned by obligationOwner) - sourceLiquidity, - - // Destination Collateral Token Account - // Example: cUSDC's token account address (owned by obligationOwner) - sourceCollateral, - - // Solend Reserve Progam Id (must be related to sourceLiquidity) - // Complete list of reserves mint: https://docs.solend.fi/protocol/addresses - // Example: BgxfHJDzm44T7XG68MYKx7YisTjZu73tVovyZSjJMpmw for USDC reserve - reserve, - - // Solend Reserve SPL Token account address (must be related to sourceLiquidity) - // Example: 8SheGtsopRUDzdiD6v6BR9a6bqZ9QwywYQY99Fp5meNf for USDC (there are no list for it) - reserveLiquiditySupply, - - // Example: cUSDC mint (must be related to sourceLiquidity) - reserveCollateralMint, - - SolendConfiguration.lendingMarket, - SolendConfiguration.lendingMarketAuthority, - - destinationCollateral, - obligation, - obligationOwner, - pythOracle, - switchboardFeedAddress, - - // Wallet address of the one creating the proposal - transferAuthority, - SolendConfiguration.programID - ) -} diff --git a/tools/sdk/solend/initObligationAccount.ts b/tools/sdk/solend/initObligationAccount.ts deleted file mode 100644 index c957341aba..0000000000 --- a/tools/sdk/solend/initObligationAccount.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js' -import { initObligationInstruction } from '@solendprotocol/solend-sdk' -import SolendConfiguration from './configuration' -import { deriveObligationAddressFromWalletAndSeed } from './utils' - -export async function initObligationAccount({ - obligationOwner, -}: { - obligationOwner: PublicKey -}): Promise { - const obligationAddress = await deriveObligationAddressFromWalletAndSeed( - obligationOwner - ) - - return initObligationInstruction( - obligationAddress, - SolendConfiguration.lendingMarket, - obligationOwner, - SolendConfiguration.programID - ) -} diff --git a/tools/sdk/solend/refreshObligation.ts b/tools/sdk/solend/refreshObligation.ts deleted file mode 100644 index dea1229ebc..0000000000 --- a/tools/sdk/solend/refreshObligation.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { PublicKey, TransactionInstruction } from '@solana/web3.js' -import { refreshObligationInstruction } from '@solendprotocol/solend-sdk' - -import SolendConfiguration, { SupportedMintName } from './configuration' - -import { deriveObligationAddressFromWalletAndSeed } from './utils' - -// Would be nice if we could automatically detect which reserves needs to be refreshed -// based on the obligationOwner assets in solend -export async function refreshObligation({ - obligationOwner, - mintNames, -}: { - obligationOwner: PublicKey - mintNames: SupportedMintName[] -}): Promise { - const obligationAddress = await deriveObligationAddressFromWalletAndSeed( - obligationOwner - ) - - const depositReserves = SolendConfiguration.getReserveOfGivenMints(mintNames) - - return refreshObligationInstruction( - obligationAddress, - // Both deposit reserves + borrow reserves parameters leads to the same data in instruction - // they are concatenate - depositReserves, - [], - SolendConfiguration.programID - ) -} diff --git a/tools/sdk/solend/refreshReserve.ts b/tools/sdk/solend/refreshReserve.ts deleted file mode 100644 index 412868bc35..0000000000 --- a/tools/sdk/solend/refreshReserve.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { TransactionInstruction } from '@solana/web3.js' -import { refreshReserveInstruction } from '@solendprotocol/solend-sdk' - -import SolendConfiguration, { SupportedMintName } from './configuration' - -export async function refreshReserve({ - mintName, -}: { - mintName: SupportedMintName -}): Promise { - const { - reserve, - pythOracle, - switchboardFeedAddress, - } = SolendConfiguration.getSupportedMintInformation(mintName) - - return refreshReserveInstruction( - reserve, - SolendConfiguration.programID, - pythOracle, - switchboardFeedAddress - ) -} diff --git a/tools/sdk/solend/utils.ts b/tools/sdk/solend/utils.ts deleted file mode 100644 index 3c60aa982b..0000000000 --- a/tools/sdk/solend/utils.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PublicKey } from '@solana/web3.js' - -import SolendConfiguration from './configuration' - -export async function deriveObligationAddressFromWalletAndSeed( - walletAddress: PublicKey -) { - return PublicKey.createWithSeed( - walletAddress, - SolendConfiguration.createObligationConfiguration.seed, - SolendConfiguration.programID - ) -} diff --git a/tools/sdk/solend/withdrawObligationCollateralAndRedeemReserveLiquidity.ts b/tools/sdk/solend/withdrawObligationCollateralAndRedeemReserveLiquidity.ts deleted file mode 100644 index 2208a7fc52..0000000000 --- a/tools/sdk/solend/withdrawObligationCollateralAndRedeemReserveLiquidity.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { PublicKey } from '@solana/web3.js' -import { withdrawObligationCollateralAndRedeemReserveLiquidity as originalWithdrawFunction } from '@solendprotocol/solend-sdk' -import { findATAAddrSync } from '@utils/ataTools' -import SolendConfiguration, { SupportedMintName } from './configuration' - -import { deriveObligationAddressFromWalletAndSeed } from './utils' - -export async function withdrawObligationCollateralAndRedeemReserveLiquidity({ - obligationOwner, - liquidityAmount, - mintName, - destinationLiquidity, -}: { - obligationOwner: PublicKey - liquidityAmount: number | BN - mintName: SupportedMintName - destinationLiquidity?: PublicKey -}) { - const { - relatedCollateralMint, - mint, - reserve, - reserveLiquiditySupply, - reserveCollateralSupplySplTokenAccount, - } = SolendConfiguration.getSupportedMintInformation(mintName) - - const reserveCollateralMint = relatedCollateralMint.mint - - const [usdcTokenAccount] = findATAAddrSync(obligationOwner, mint) - const [cusdcTokenAccount] = findATAAddrSync( - obligationOwner, - relatedCollateralMint.mint - ) - - const obligation = await deriveObligationAddressFromWalletAndSeed( - obligationOwner - ) - - const transferAuthority = obligationOwner - const sourceCollateral = reserveCollateralSupplySplTokenAccount - const destinationCollateral = cusdcTokenAccount - const withdrawReserve = reserve - - return originalWithdrawFunction( - liquidityAmount, - sourceCollateral, - destinationCollateral, - withdrawReserve, - obligation, - SolendConfiguration.lendingMarket, - SolendConfiguration.lendingMarketAuthority, - destinationLiquidity ?? usdcTokenAccount, - reserveCollateralMint, - reserveLiquiditySupply, - obligationOwner, - transferAuthority, - SolendConfiguration.programID - ) -} diff --git a/tools/sdk/splToken/withCreateAssociatedTokenAccount.ts b/tools/sdk/splToken/withCreateAssociatedTokenAccount.ts deleted file mode 100644 index 0eea3ce6e8..0000000000 --- a/tools/sdk/splToken/withCreateAssociatedTokenAccount.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' - -export const withCreateAssociatedTokenAccount = async ( - instructions: TransactionInstruction[], - mintPk: PublicKey, - ownerPk: PublicKey, - payerPk: PublicKey -) => { - const ataPk = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - mintPk, - ownerPk, // owner - true - ) - - instructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - mintPk, - ataPk, - ownerPk, - payerPk - ) - ) - - return ataPk -} diff --git a/tools/sdk/splToken/withCreateMint.ts b/tools/sdk/splToken/withCreateMint.ts deleted file mode 100644 index 7505363a4e..0000000000 --- a/tools/sdk/splToken/withCreateMint.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { MintLayout, Token } from '@solana/spl-token' -import { - Connection, - Keypair, - PublicKey, - SystemProgram, - TransactionInstruction, -} from '@solana/web3.js' - -import { TOKEN_PROGRAM_ID } from '@utils/tokens' - -export const withCreateMint = async ( - connection: Connection, - instructions: TransactionInstruction[], - signers: Keypair[], - ownerPk: PublicKey, - freezeAuthorityPk: PublicKey | null, - decimals: number, - payerPk: PublicKey -) => { - const mintRentExempt = await connection.getMinimumBalanceForRentExemption( - MintLayout.span - ) - - const mintAccount = new Keypair() - - instructions.push( - SystemProgram.createAccount({ - fromPubkey: payerPk, - newAccountPubkey: mintAccount.publicKey, - lamports: mintRentExempt, - space: MintLayout.span, - programId: TOKEN_PROGRAM_ID, - }) - ) - signers.push(mintAccount) - - instructions.push( - Token.createInitMintInstruction( - TOKEN_PROGRAM_ID, - mintAccount.publicKey, - decimals, - ownerPk, - freezeAuthorityPk - ) - ) - return mintAccount.publicKey -} diff --git a/tools/sdk/splToken/withMintTo.ts b/tools/sdk/splToken/withMintTo.ts deleted file mode 100644 index 08d2fb24ea..0000000000 --- a/tools/sdk/splToken/withMintTo.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Token, u64 } from '@solana/spl-token' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' - -import { TOKEN_PROGRAM_ID } from '@utils/tokens' - -export const withMintTo = async ( - instructions: TransactionInstruction[], - mintPk: PublicKey, - destinationPk: PublicKey, - mintAuthorityPk: PublicKey, - amount: number | u64 -) => { - instructions.push( - Token.createMintToInstruction( - TOKEN_PROGRAM_ID, - mintPk, - destinationPk, - mintAuthorityPk, - [], - amount - ) - ) -} diff --git a/tools/sdk/units.ts b/tools/sdk/units.ts deleted file mode 100644 index e5add455a7..0000000000 --- a/tools/sdk/units.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { BN, ProgramAccount } from '@project-serum/anchor' -import { MintInfo } from '@solana/spl-token' -import { TokenInfo } from '@solana/spl-token-registry' -import { BigNumber } from 'bignumber.js' - -const SECONDS_PER_DAY = 86400 - -export function getDaysFromTimestamp(unixTimestamp: number) { - return unixTimestamp / SECONDS_PER_DAY -} - -export function getTimestampFromDays(days: number) { - return days * SECONDS_PER_DAY -} - -export function fmtBnMintDecimals(amount: BN, decimals: number) { - return new BigNumber(amount.toString()).shiftedBy(-decimals).toFormat() -} - -/// Formats mint amount (natural units) as a decimal string -export function fmtMintAmount(mint: MintInfo | undefined, mintAmount: BN) { - return mint - ? getMintDecimalAmount(mint, mintAmount).toFormat() - : new BigNumber(mintAmount.toString()).toFormat() -} - -export function fmtTokenInfoWithMint( - amount: BN, - mintInfo: ProgramAccount, - tokenInfo: TokenInfo | undefined = undefined -) { - return `${fmtBnMintDecimals(amount, mintInfo.account.decimals)} ${ - tokenInfo?.symbol - ? tokenInfo?.symbol - : `${mintInfo.publicKey.toString().substring(0, 12)}...` - }` -} - -// Converts mint amount (natural units) to decimals -export function getMintDecimalAmount(mint: MintInfo, mintAmount: BN) { - return new BigNumber(mintAmount.toString()).shiftedBy(-mint.decimals) -} -export function getBigNumberAmount(amount: BN | number) { - return typeof amount === 'number' - ? new BigNumber(amount) - : new BigNumber(amount.toString()) -} - -// Parses input string in decimals to mint amount (natural units) -// If the input is already a number then converts it to mint natural amount -export function parseMintNaturalAmountFromDecimal( - decimalAmount: string | number, - mintDecimals: number -) { - if (typeof decimalAmount === 'number') { - return getMintNaturalAmountFromDecimal(decimalAmount, mintDecimals) - } - - if (mintDecimals === 0) { - return parseInt(decimalAmount) - } - - const floatAmount = parseFloat(decimalAmount) - return getMintNaturalAmountFromDecimal(floatAmount, mintDecimals) -} - -export function parseMintNaturalAmountFromDecimalAsBN( - decimalAmount: string | number, - mintDecimals: number -) { - return new BN( - parseMintNaturalAmountFromDecimal(decimalAmount, mintDecimals).toString() - ) -} - -// Converts amount in decimals to mint amount (natural units) -export function getMintNaturalAmountFromDecimal( - decimalAmount: number, - decimals: number -) { - return new BigNumber(decimalAmount).shiftedBy(decimals).toNumber() -} - -// Converts amount in decimals to mint amount (natural units) -export function getMintNaturalAmountFromDecimalAsBN( - decimalAmount: number, - decimals: number -) { - return new BN(new BigNumber(decimalAmount).shiftedBy(decimals).toString()) -} - -// Calculates mint min amount as decimal -export function getMintMinAmountAsDecimal(mint: MintInfo) { - return new BigNumber(1).shiftedBy(-mint.decimals).toNumber() -} - -export function formatMintNaturalAmountAsDecimal( - mint: MintInfo, - naturalAmount: BN -) { - return getMintDecimalAmountFromNatural(mint, naturalAmount).toFormat() -} - -export function getMintDecimalAmountFromNatural( - mint: MintInfo, - naturalAmount: BN -) { - return new BigNumber(naturalAmount.toString()).shiftedBy(-mint.decimals) -} - -// Returns mint supply amount as decimal -export function getMintSupplyAsDecimal(mint: MintInfo) { - return new BigNumber(mint.supply.toString()) - .shiftedBy(-mint.decimals) - .toNumber() -} - -// Calculates percentage (provided as 0-100) of mint supply as BigNumber amount -export function getMintSupplyPercentageAsBigNumber( - mint: MintInfo, - percentage: number -) { - return new BigNumber( - mint.supply.mul(new BN(percentage)).toString() - ).shiftedBy(-(mint.decimals + 2)) -} - -// Calculates percentage (provided as 0-100) of mint supply as decimal amount -export function getMintSupplyPercentageAsDecimal( - mint: MintInfo, - percentage: number -) { - return getMintSupplyPercentageAsBigNumber(mint, percentage).toNumber() -} - -// Calculates percentage (provided as 0-100) of mint supply as rounded BN amount -export function getMintSupplyPercentageAsBN( - mint: MintInfo, - percentage: number -) { - return new BN( - getMintSupplyPercentageAsBigNumber(mint, percentage) - .dp(0, BigNumber.ROUND_DOWN) // BN doesn't support floating point and we have to round it - .toString() - ) -} - -// Formats percentage value showing it in human readable form -export function fmtPercentage(percentage: number) { - if (percentage === 0 || percentage === Infinity) { - return '0%' - } - - if (percentage < 0.01) { - return '<0.01%' - } - - if (percentage > 100) { - return '>100%' - } - - return `${+percentage.toFixed(2)}%` -} - -// Calculates mint supply fraction for the given natural amount as decimal amount -export function getMintSupplyFractionAsDecimalPercentage( - mint: MintInfo, - naturalAmount: BN | number -) { - return getBigNumberAmount(naturalAmount) - .multipliedBy(100) - .dividedBy(new BigNumber(mint.supply.toString())) - .toNumber() -} diff --git a/tools/validators/accounts/token.ts b/tools/validators/accounts/token.ts deleted file mode 100644 index 498d7c7341..0000000000 --- a/tools/validators/accounts/token.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copied from Explorer code https://github.com/solana-labs/solana/blob/master/explorer/src/validators/accounts/token.ts - -import { PublicKey } from '@solana/web3.js' -import { TokenProgramAccount, TokenAccount } from '@utils/tokens' -import { - Infer, - number, - optional, - enums, - boolean, - string, - type, -} from 'superstruct' -import { PublicKeyFromString } from '../pubkey' - -export type TokenAccountState = Infer -const AccountState = enums(['initialized', 'uninitialized', 'frozen']) - -const TokenAmount = type({ - decimals: number(), - uiAmountString: string(), - amount: string(), -}) - -export type TokenAccountInfo = Infer -export const TokenAccountInfo = type({ - mint: PublicKeyFromString, - owner: PublicKeyFromString, - tokenAmount: TokenAmount, - delegate: optional(PublicKeyFromString), - state: AccountState, - isNative: boolean(), - rentExemptReserve: optional(TokenAmount), - delegatedAmount: optional(TokenAmount), - closeAuthority: optional(PublicKeyFromString), -}) - -export function validateTokenAccountMint( - tokenAccount: TokenProgramAccount, - mint: PublicKey | undefined -) { - if (mint && tokenAccount.account.mint.toBase58() !== mint.toBase58()) { - throw new Error("Account mint doesn't match source account") - } -} diff --git a/tools/validators/accounts/upgradeable-program.ts b/tools/validators/accounts/upgradeable-program.ts deleted file mode 100644 index cb5a8299a1..0000000000 --- a/tools/validators/accounts/upgradeable-program.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Copied from Explorer code https://github.com/solana-labs/solana/blob/master/explorer/src/validators/accounts/upgradeable-program.ts - -import { ParsedAccountData, AccountInfo, PublicKey } from '@solana/web3.js' - -import { type, number, literal, nullable, Infer, create } from 'superstruct' -import { PublicKeyFromString } from '../pubkey' - -export type ProgramAccountInfo = Infer -export const ProgramAccountInfo = type({ - programData: PublicKeyFromString, -}) - -export type ProgramAccount = Infer -export const ProgramAccount = type({ - type: literal('program'), - info: ProgramAccountInfo, -}) - -export type ProgramDataAccountInfo = Infer -export const ProgramDataAccountInfo = type({ - authority: nullable(PublicKeyFromString), - // don't care about data yet - slot: number(), -}) - -export type ProgramDataAccount = Infer -export const ProgramDataAccount = type({ - type: literal('programData'), - info: ProgramDataAccountInfo, -}) - -export type ProgramBufferAccountInfo = Infer -export const ProgramBufferAccountInfo = type({ - authority: nullable(PublicKeyFromString), - // don't care about data yet -}) - -export type ProgramBufferAccount = Infer -export const ProgramBufferAccount = type({ - type: literal('buffer'), - info: ProgramBufferAccountInfo, -}) - -export function validateProgramBufferAccount( - info: AccountInfo, - bufferAuthority: PublicKey -) { - if ( - !('parsed' in info.data && info.data.program === 'bpf-upgradeable-loader') - ) { - throw new Error('Invalid program buffer account') - } - - let buffer: ProgramBufferAccount - - try { - buffer = create(info.data.parsed, ProgramBufferAccount) - } catch { - throw new Error('Invalid program buffer account') - } - - if (buffer.info.authority?.toBase58() !== bufferAuthority.toBase58()) { - throw new Error( - `Buffer authority must be set to governance account - ${bufferAuthority.toBase58()}` - ) - } -} diff --git a/tools/validators/pubkey.ts b/tools/validators/pubkey.ts deleted file mode 100644 index a6db5b3cdc..0000000000 --- a/tools/validators/pubkey.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { coerce, instance, string } from 'superstruct' -import { PublicKey } from '@solana/web3.js' - -export const PublicKeyFromString = coerce( - instance(PublicKey), - string(), - (value) => new PublicKey(value) -) - -export const tryParseKey = (key: string): PublicKey | null => { - try { - return new PublicKey(key) - } catch (error) { - return null - } -} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index c5b2ff3b6b..0000000000 --- a/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "target": "es6", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": false, - "strictNullChecks": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "jsx": "preserve", - "paths": { - "@components/*": ["components/*"], - "@hooks/*": ["hooks/*"], - "@tools/*": ["tools/*"], - "@models/*": ["models/*"], - "@utils/*": ["utils/*"] - }, - "incremental": true, - "isolatedModules": true - }, - "exclude": ["node_modules", ".next", "out", "docs"], - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], - "ts-node": { - "require": ["tsconfig-paths/register"], - "compilerOptions": { - "module": "commonjs" - } - } -} diff --git a/utils/Foresight/index.tsx b/utils/Foresight/index.tsx deleted file mode 100644 index 01d8a099aa..0000000000 --- a/utils/Foresight/index.tsx +++ /dev/null @@ -1,411 +0,0 @@ -import _ from 'lodash' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { - governance as foresightGov, - consts as foresightConsts, -} from '@foresight-tmp/foresight-sdk' -import { isFormValid } from '@utils/formValidation' -import { AssetAccount } from '@utils/uiTypes/assets' -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import GovernedAccountSelect from '../../pages/dao/[symbol]/proposal/components/GovernedAccountSelect' -import { Dispatch, useContext, useEffect, useState } from 'react' -import { - ForesightHasCategoryId, - ForesightHasGovernedAccount, - ForesightHasMarketId, - ForesightHasMarketListId, - ForesightMakeSetMarketMetadataParams, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' -import Input from '@components/inputs/Input' -import { SignerWalletAdapter } from '@solana/wallet-adapter-base' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' -import * as yup from 'yup' -import { ObjectSchema, StringSchema, NumberSchema } from 'yup' -import useRealm from '@hooks/useRealm' -import useWalletStore from 'stores/useWalletStore' -import { NewProposalContext } from '../../pages/dao/[symbol]/proposal/new' -import Select from '@components/inputs/Select' - -type EmptyObject = Record -type SetFormErrors = Dispatch> - -export function getFilteredTokenAccounts(): AssetAccount[] { - const { governedTokenAccountsWithoutNfts } = useGovernanceAssets() - return governedTokenAccountsWithoutNfts.filter((x) => { - const transferAddress = x.extensions.transferAddress - return ( - transferAddress?.equals(foresightGov.DEVNET_TREASURY) || - transferAddress?.equals(foresightGov.MAINNET_TREASURY) - ) - }) -} - -type HandleSetForm = ({ - propertyName, - value, -}: { - propertyName: string - value: any -}) => void - -type HandleSetInstructions = ( - val: { - governedAccount: ProgramAccount | undefined - getInstruction: GetInstruction - }, - index: number -) => void - -function makeValidateInstruction( - schema: ObjectSchema, - form: ForesightHasGovernedAccount, - setFormErrors: SetFormErrors -): () => Promise { - async function validateInstruction(): Promise { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid - } - return validateInstruction -} - -function makeHandleSetFormWithErrors( - form: T, - setForm: Dispatch>, - setFormErrors: SetFormErrors -): HandleSetForm { - function handleSetForm({ - propertyName, - value, - }: { - propertyName: string - value: any - }) { - setFormErrors({}) - setForm({ ...form, [propertyName]: value }) - } - return handleSetForm -} - -type GetInstruction = () => Promise - -type IxCreator = ( - form: T -) => Promise - -function makeGetInstruction( - ixCreator: IxCreator, - form: T, - programId: PublicKey | undefined, - wallet: SignerWalletAdapter | undefined, - schema: ObjectSchema, - setFormErrors: SetFormErrors -): GetInstruction { - const validateInstruction = makeValidateInstruction( - schema, - form, - setFormErrors - ) - async function getInstruction(): Promise { - const isValid = await validateInstruction() - let serializedInstruction = '' - if (isValid && programId && wallet?.publicKey) { - const ix = await ixCreator(form) - serializedInstruction = serializeInstructionToBase64(ix) - } - return getUiInstruction(serializedInstruction, isValid, form) - } - return getInstruction -} - -type NonDefault = Omit< - T, - 'governedAccount' -> -type ValueOf = T[keyof T] -type AllowedSchema = NumberSchema | StringSchema - -function defaultValToYupSchema( - val: ValueOf> -): AllowedSchema { - if (typeof val === 'number') { - return yup.number().required() - } - return yup.string().required() -} - -type formEntryToSchema = { - [name in keyof NonDefault]: AllowedSchema -} - -export function commonAssets( - formDefaults: NonDefault, - index: number, - governance: ProgramAccount | null -): { - inputProps: InputProps - effector: (ixCreator: IxCreator) => void - governedAccountSelect: JSX.Element - wallet: SignerWalletAdapter | undefined -} { - const extraSchemaFields: formEntryToSchema = _.mapValues( - formDefaults, - defaultValToYupSchema - ) - const schema = getSchema(extraSchemaFields) - const wallet = useWalletStore((s) => s.current) - const filteredTokenAccounts = getFilteredTokenAccounts() - const [formErrors, setFormErrors] = useState({}) - const { handleSetInstructions } = useContext(NewProposalContext) - const [form, setForm] = useState({ - governedAccount: filteredTokenAccounts[0], - ...formDefaults, - } as T) - const handleSetForm = makeHandleSetFormWithErrors( - form, - setForm, - setFormErrors - ) - const inputProps = { - form, - handleSetForm, - formErrors, - } - function effector(ixCreator: IxCreator): void { - ForesightUseEffects( - handleSetForm, - form, - handleSetInstructions, - ixCreator, - wallet, - schema, - setFormErrors, - index - ) - } - const governedAccountSelect = ( - - ) - return { - inputProps, - effector, - governedAccountSelect, - wallet, - } -} - -function ForesightUseEffects( - handleSetForm: HandleSetForm, - form: T, - handleSetInstructions: HandleSetInstructions, - ixCreator: IxCreator, - wallet: SignerWalletAdapter | undefined, - schema: ObjectSchema, - setFormErrors: SetFormErrors, - index: number -): void { - const { realmInfo } = useRealm() - const programId: PublicKey | undefined = realmInfo?.programId - const getInstruction = makeGetInstruction( - ixCreator, - form, - programId, - wallet, - schema, - setFormErrors - ) - useEffect(() => { - handleSetForm({ - propertyName: 'programId', - value: programId?.toString(), - }) - }, [programId]) - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - }, [form]) -} - -export function getSchema( - extraFields: { - [name in keyof Omit]: StringSchema | NumberSchema - } -) { - return yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - ...extraFields, - }) -} - -function getUiInstruction( - serializedInstruction: string, - isValid: boolean, - form: ForesightHasGovernedAccount -): UiInstruction { - return { - serializedInstruction: serializedInstruction, - isValid, - governance: form.governedAccount?.governance, - } -} - -function ForesightGovernedAccountSelect(props: { - filteredTokenAccounts: AssetAccount[] - form: ForesightHasGovernedAccount - handleSetForm: HandleSetForm - index: number - governance: ProgramAccount | null -}) { - const shouldBeGoverned = props.index !== 0 && props.governance - return ( - { - props.handleSetForm({ value, propertyName: 'governedAccount' }) - }} - value={props.form.governedAccount} - shouldBeGoverned={shouldBeGoverned} - governance={props.governance} - > - ) -} - -type InputProps = { - form: T - handleSetForm: HandleSetForm - formErrors: EmptyObject -} - -export function ForesightCategoryIdInput( - props: InputProps -) { - return ( - - props.handleSetForm({ - value: evt.target.value, - propertyName: 'categoryId', - }) - } - error={props.formErrors['categoryId']} - /> - ) -} - -export function ForesightMarketListIdInput( - props: InputProps -) { - return ( - - props.handleSetForm({ - value: evt.target.value, - propertyName: 'marketListId', - }) - } - error={props.formErrors['marketListId']} - /> - ) -} - -export function ForesightMarketIdInput( - props: InputProps -) { - return ( - - props.handleSetForm({ - value: evt.target.value, - propertyName: 'marketId', - }) - } - error={props.formErrors['marketId']} - /> - ) -} - -export function ForesightWinnerInput(props: InputProps) { - return ( - - props.handleSetForm({ - value: evt.target.value, - propertyName: 'winner', - }) - } - error={props.formErrors['winner']} - /> - ) -} - -export function ForesightContentInput( - props: InputProps -) { - return ( - - props.handleSetForm({ - value: evt.target.value, - propertyName: 'content', - }) - } - error={props.formErrors['content']} - /> - ) -} - -export function ForesightMarketMetadataFieldSelect( - props: InputProps -) { - return ( - - ) -} diff --git a/utils/GovernanceTools.tsx b/utils/GovernanceTools.tsx deleted file mode 100644 index c8c43e6491..0000000000 --- a/utils/GovernanceTools.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { - GovernanceConfig, - VoteThresholdPercentage, - VoteTipping, -} from '@solana/spl-governance' -import { BN } from '@project-serum/anchor' -import { - getMintNaturalAmountFromDecimal, - getTimestampFromDays, - parseMintNaturalAmountFromDecimal, -} from '@tools/sdk/units' - -export interface GovernanceConfigValues { - minTokensToCreateProposal: number | string - minInstructionHoldUpTime: number - maxVotingTime: number - voteThresholdPercentage: number - mintDecimals: number - voteTipping?: VoteTipping -} - -// Parses min tokens to create (proposal or governance) -export function parseMinTokensToCreate( - value: string | number, - mintDecimals: number -) { - return typeof value === 'string' - ? parseMintNaturalAmountFromDecimal(value, mintDecimals) - : getMintNaturalAmountFromDecimal(value, mintDecimals) -} - -export function getGovernanceConfig(values: GovernanceConfigValues) { - const minTokensToCreateProposal = parseMinTokensToCreate( - values.minTokensToCreateProposal, - values.mintDecimals - ) - - return new GovernanceConfig({ - voteThresholdPercentage: new VoteThresholdPercentage({ - value: values.voteThresholdPercentage, - }), - minCommunityTokensToCreateProposal: new BN( - minTokensToCreateProposal.toString() - ), - minInstructionHoldUpTime: getTimestampFromDays( - values.minInstructionHoldUpTime - ), - maxVotingTime: getTimestampFromDays(values.maxVotingTime), - // Use 1 as default for council tokens. - // Council tokens are rare and possession of any amount of council tokens should be sufficient to be allowed to create proposals - // If it turns to be a wrong assumption then it should be exposed in the UI - minCouncilTokensToCreateProposal: new BN(1), - voteTipping: values.voteTipping || 0, - }) -} diff --git a/utils/associated.tsx b/utils/associated.tsx deleted file mode 100644 index dff5854d56..0000000000 --- a/utils/associated.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import { - PublicKey, - SystemProgram, - SYSVAR_RENT_PUBKEY, - TransactionInstruction, -} from '@solana/web3.js' -import { TOKEN_PROGRAM_ID } from '@solana/spl-token' - -export const SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID: PublicKey = new PublicKey( - 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' -) - -export async function findAssociatedTokenAddress( - walletAddress: PublicKey, - tokenMintAddress: PublicKey -): Promise { - return ( - await PublicKey.findProgramAddress( - [ - walletAddress.toBuffer(), - TOKEN_PROGRAM_ID.toBuffer(), - tokenMintAddress.toBuffer(), - ], - SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID - ) - )[0] -} - -export async function createAssociatedTokenAccount( - fundingAddress: PublicKey, - walletAddress: PublicKey, - splTokenMintAddress: PublicKey -): Promise<[TransactionInstruction, PublicKey]> { - const associatedTokenAddress = await findAssociatedTokenAddress( - walletAddress, - splTokenMintAddress - ) - const keys = [ - { - pubkey: fundingAddress, - isSigner: true, - isWritable: true, - }, - { - pubkey: associatedTokenAddress, - isSigner: false, - isWritable: true, - }, - { - pubkey: walletAddress, - isSigner: false, - isWritable: false, - }, - { - pubkey: splTokenMintAddress, - isSigner: false, - isWritable: false, - }, - { - pubkey: SystemProgram.programId, - isSigner: false, - isWritable: false, - }, - { - pubkey: TOKEN_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - { - pubkey: SYSVAR_RENT_PUBKEY, - isSigner: false, - isWritable: false, - }, - ] - return [ - new TransactionInstruction({ - keys, - programId: SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID, - data: Buffer.from([]), - }), - associatedTokenAddress, - ] -} diff --git a/utils/ataTools.tsx b/utils/ataTools.tsx deleted file mode 100644 index 246e110ed1..0000000000 --- a/utils/ataTools.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { utils } from '@project-serum/anchor' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { Connection, PublicKey, Transaction } from '@solana/web3.js' -import type { ConnectionContext } from 'utils/connection' -import { sendTransaction } from './send' -import { tryGetAta, isExistingTokenAccount } from './validations' - -// calculate ATA -export async function createATA( - connection: Connection, - wallet, - mintPubkey: PublicKey, - owner: PublicKey, - feePayer: PublicKey -) { - const ata = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPubkey, // mint - owner, // owner - true - ) - - const transaction = new Transaction() - transaction.add( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPubkey, // mint - ata, // ata - owner, // owner of token account - feePayer // fee payer - ) - ) - await sendTransaction({ - connection, - wallet, - transaction, - }) - return ata -} - -export async function getATA({ - connection, - receiverAddress, - mintPK, - wallet, -}: { - connection: ConnectionContext - receiverAddress: PublicKey - mintPK: PublicKey - wallet: any -}) { - if (!wallet?.publicKey) { - throw 'please connect your wallet' - } - let currentAddress = receiverAddress - let needToCreateAta = false - const isExistingAccount = await isExistingTokenAccount( - connection, - receiverAddress - ) - if (!isExistingAccount) { - const existingAta = await tryGetAta( - connection.current, - mintPK, - currentAddress - ) - if (!existingAta) { - const ata = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPK, // mint - receiverAddress, // owner - true - ) - needToCreateAta = true - currentAddress = ata - } else { - currentAddress = existingAta.publicKey - } - } - return { - currentAddress, - needToCreateAta, - } -} - -export function findATAAddrSync( - wallet: PublicKey, - mintAddress: PublicKey -): [PublicKey, number] { - const seeds = [ - wallet.toBuffer(), - TOKEN_PROGRAM_ID.toBuffer(), - mintAddress.toBuffer(), - ] - return utils.publicKey.findProgramAddressSync( - seeds, - ASSOCIATED_TOKEN_PROGRAM_ID - ) -} diff --git a/utils/balance.tsx b/utils/balance.tsx deleted file mode 100644 index b5ec86c7db..0000000000 --- a/utils/balance.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { PublicKey } from '@solana/web3.js' -import BN from 'bn.js' -import { MintAccount, TokenAccount } from './tokens' - -function fixedPointToNumber(value: BN, decimals: number) { - const divisor = new BN(10).pow(new BN(decimals)) - const quotient = value.div(divisor) - const remainder = value.mod(divisor) - return quotient.toNumber() + remainder.toNumber() / divisor.toNumber() -} - -export function calculateBalance( - mints: { [pk: string]: MintAccount }, - account: TokenAccount -): number { - const mint = mints[account.mint.toBase58()] - return mint ? fixedPointToNumber(account.amount, mint.decimals) : 0 -} - -export function calculateSupply( - mints: { [pk: string]: MintAccount }, - pk: PublicKey -): number | undefined { - const mint = mints[pk.toBase58()] - return mint && fixedPointToNumber(mint.supply, mint.decimals) -} - -export function calculateNativeAmountUnsafe( - mints: { [pk: string]: MintAccount }, - pk: PublicKey, - amount: number -): BN { - const mint = mints[pk.toBase58()] - const nativeAmount = Math.round(amount * Math.pow(10, mint.decimals)) - return new BN(nativeAmount.toString()) -} diff --git a/utils/batchLoadMints.ts b/utils/batchLoadMints.ts deleted file mode 100644 index d0c79b582a..0000000000 --- a/utils/batchLoadMints.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { MintInfo, MintLayout, u64 } from '@solana/spl-token' -import { AccountInfo, Connection, PublicKey } from '@solana/web3.js' - -/** - * Returns an array with arrays of the given size. - * - * @param myArray {Array} Array to split - * @param chunkSize {Integer} Size of every group - */ -const chunkArray = (myArray: T[], chunkSize: number) => { - let index = 0 - const arrayLength = myArray.length - const tempArray: T[][] = [] - - for (index = 0; index < arrayLength; index += chunkSize) { - const myChunk = myArray.slice(index, index + chunkSize) - tempArray.push(myChunk) - } - - return tempArray -} - -const batchLoadMints = async (connection: Connection, mints: PublicKey[]) => { - const groupOfMints: PublicKey[][] = chunkArray(mints, 100) - const getMultipleAccountsInfoPromises: Promise< - (AccountInfo | null)[] - >[] = groupOfMints.map((mints) => { - return connection.getMultipleAccountsInfo(mints) - }) - const results = await Promise.all(getMultipleAccountsInfoPromises) - const infos: (AccountInfo | null)[] = results.flat() - const mintInfos: Record = {} - infos.forEach((info, index) => { - if (!info) return - const mintInfo = MintLayout.decode(info.data) - if (mintInfo.mintAuthorityOption === 0) { - mintInfo.mintAuthority = null - } else { - mintInfo.mintAuthority = new PublicKey(mintInfo.mintAuthority) - } - - mintInfo.supply = u64.fromBuffer(mintInfo.supply) - mintInfo.isInitialized = mintInfo.isInitialized !== 0 - - if (mintInfo.freezeAuthorityOption === 0) { - mintInfo.freezeAuthority = null - } else { - mintInfo.freezeAuthority = new PublicKey(mintInfo.freezeAuthority) - } - mintInfos[mints[index].toString()] = mintInfo - }) - return mintInfos -} - -export default batchLoadMints diff --git a/utils/borsh.ts b/utils/borsh.ts deleted file mode 100644 index fa277c967f..0000000000 --- a/utils/borsh.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { PublicKey } from '@solana/web3.js' -import { BinaryReader, Schema, BorshError, BinaryWriter } from 'borsh' -;(BinaryReader.prototype as any).readPubkey = function () { - const reader = (this as unknown) as BinaryReader - const array = reader.readFixedArray(32) - return new PublicKey(array) -} -;(BinaryWriter.prototype as any).writePubkey = function (value: PublicKey) { - const writer = (this as unknown) as BinaryWriter - writer.writeFixedArray(value.toBuffer()) -} - -function capitalizeFirstLetter(string: string): string { - return string.charAt(0).toUpperCase() + string.slice(1) -} - -function deserializeField( - schema: Schema, - fieldName: string, - fieldType: any, - reader: BinaryReader -): any { - try { - if (typeof fieldType === 'string') { - return (reader as any)[`read${capitalizeFirstLetter(fieldType)}`]() - } - - if (fieldType instanceof Array) { - if (typeof fieldType[0] === 'number') { - return reader.readFixedArray(fieldType[0]) - } - - return reader.readArray(() => - deserializeField(schema, fieldName, fieldType[0], reader) - ) - } - - if (fieldType.kind === 'option') { - const option = reader.readU8() - if (option) { - return deserializeField(schema, fieldName, fieldType.type, reader) - } - - return undefined - } - - return deserializeStruct(schema, fieldType, reader) - } catch (error) { - if (error instanceof BorshError) { - error.addToFieldPath(fieldName) - } - throw error - } -} - -function deserializeStruct( - schema: Schema, - classType: any, - reader: BinaryReader -) { - const structSchema = schema.get(classType) - if (!structSchema) { - throw new BorshError(`Class ${classType.name} is missing in schema`) - } - - if (structSchema.kind === 'struct') { - const result: any = {} - for (const [fieldName, fieldType] of schema.get(classType).fields) { - result[fieldName] = deserializeField(schema, fieldName, fieldType, reader) - } - return new classType(result) - } - - if (structSchema.kind === 'enum') { - const idx = reader.readU8() - if (idx >= structSchema.values.length) { - throw new BorshError(`Enum index: ${idx} is out of range`) - } - const [fieldName, fieldType] = structSchema.values[idx] - const fieldValue = deserializeField(schema, fieldName, fieldType, reader) - return new classType({ [fieldName]: fieldValue }) - } - - throw new BorshError( - `Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}` - ) -} - -/// Deserializes object from bytes using schema. -export function deserializeBorsh( - schema: Schema, - classType: any, - buffer: Buffer -): any { - const reader = new BinaryReader(buffer) - return deserializeStruct(schema, classType, reader) -} diff --git a/utils/connection.ts b/utils/connection.ts deleted file mode 100644 index 4276d38955..0000000000 --- a/utils/connection.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { EndpointTypes } from '@models/types' -import { Connection } from '@solana/web3.js' -import type { EndpointInfo } from '../@types/types' - -const ENDPOINTS: EndpointInfo[] = [ - { - name: 'mainnet', - url: process.env.MAINNET_RPC || 'https://api.dao.solana.com/', - }, - { - name: 'devnet', - url: process.env.DEVNET_RPC || 'https://api.dao.devnet.solana.com/', - }, - { - name: 'localnet', - url: 'http://127.0.0.1:8899', - }, -] - -console.log('deployed ENDPOINTS:', ENDPOINTS) - -export interface ConnectionContext { - cluster: EndpointTypes - current: Connection - endpoint: string -} - -export function getConnectionContext(cluster: string): ConnectionContext { - const ENDPOINT = ENDPOINTS.find((e) => e.name === cluster) || ENDPOINTS[0] - return { - cluster: ENDPOINT!.name as EndpointTypes, - current: new Connection(ENDPOINT!.url, 'recent'), - endpoint: ENDPOINT!.url, - } -} - -/** - * Given ConnectionContext, find the network. - * @param connectionContext - * @returns EndpointType - */ -export function getNetworkFromEndpoint(endpoint: string) { - const network = ENDPOINTS.find((e) => e.url === endpoint) - if (!network) { - console.log(endpoint, ENDPOINTS) - throw new Error('Network not found') - } - return network?.name -} diff --git a/utils/debounce.tsx b/utils/debounce.tsx deleted file mode 100644 index 0e408cbc93..0000000000 --- a/utils/debounce.tsx +++ /dev/null @@ -1,20 +0,0 @@ -class Debounce { - typingTimeout: null | ReturnType - debounce: Debounce - constructor() { - this.typingTimeout = null - return this.debounce - } - debounceFcn = (callback, timeoutDuration = 900) => { - if (!callback) { - console.log('missing argument callback') - } - if (this.typingTimeout) { - clearTimeout(this.typingTimeout) - } - this.typingTimeout = setTimeout(() => { - callback() - }, timeoutDuration) - } -} -export const debounce = new Debounce() diff --git a/utils/deserializeTokenAccount.ts b/utils/deserializeTokenAccount.ts deleted file mode 100644 index 3dc48180e2..0000000000 --- a/utils/deserializeTokenAccount.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { AccountInfo, PublicKey } from '@solana/web3.js' -import { AccountLayout } from '@solana/spl-token' -import { BN } from '@blockworks-foundation/mango-client' - -interface TokenAccount { - amount: BN - closeAuthority: PublicKey - closeAuthorityOption: number - delegate: PublicKey - delegateOption: number - delegatedAmount: BN - isNative: number - isNativeOption: number - mint: PublicKey - owner: PublicKey - state: number -} - -export interface TokenAccountWithKey extends TokenAccount { - key: PublicKey -} - -export const deserializeSplTokenAccount = ( - accountInfo: AccountInfo -): TokenAccount => { - const _accountInfo = AccountLayout.decode(accountInfo.data) - const amountBuffer = Buffer.from(_accountInfo.amount) - const amount = new BN(amountBuffer, 'hex', 'le') - const delegatedAmountBuffer = Buffer.from(_accountInfo.delegatedAmount) - const delegatedAmount = new BN(delegatedAmountBuffer, 'hex', 'le') - const isNativeBuffer = Buffer.from(_accountInfo.isNative) - const isNative = isNativeBuffer.readUIntLE(0, 8) - return { - amount, - closeAuthority: new PublicKey(_accountInfo.closeAuthority), - closeAuthorityOption: _accountInfo.closeAuthority, - delegate: new PublicKey(_accountInfo.delegate), - delegateOption: _accountInfo.delegateOption, - delegatedAmount, - isNative, - isNativeOption: _accountInfo.isNativeOption, - mint: new PublicKey(_accountInfo.mint), - owner: new PublicKey(_accountInfo.owner), - state: _accountInfo.state, - } -} diff --git a/utils/formValidation.tsx b/utils/formValidation.tsx deleted file mode 100644 index 5ab7e19f52..0000000000 --- a/utils/formValidation.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { PublicKey } from '@solana/web3.js' -import * as yup from 'yup' -import { SanitizedObject } from './helpers' - -export interface formValidation { - isValid: boolean - validationErrors: any -} - -export const isFormValid = async (schema, formValues, abortEarly = false) => { - if (!schema) { - throw 'please provide schema' - } - - const values = new SanitizedObject({ - isValid: false, - validationErrors: new SanitizedObject({}), - }) as formValidation - - try { - await schema.validate(formValues, { abortEarly }) - values.isValid = true - } catch (err) { - console.log('Validation Error', err) - - values.isValid = false - const fieldName = err.path - if ( - abortEarly && - Object.prototype.hasOwnProperty.call(schema.fields, fieldName) - ) { - values.validationErrors[fieldName] = err.errors - } else { - err.inner?.forEach((error) => { - const fieldName = error.path - if ( - error.path && - Object.prototype.hasOwnProperty.call(schema.fields, fieldName) - ) { - values.validationErrors[fieldName] = error.message - } - }) - } - } - return values -} - -export function validateSolAddress(address: string) { - try { - const pubkey = new PublicKey(address) - const isSolana = PublicKey.isOnCurve(pubkey.toBuffer()) - return isSolana - } catch (error) { - return false - } -} -export function updateUserInput(formData, schema, setValue) { - Object.keys(schema).forEach((fieldName) => { - if (formData) { - const value = formData[fieldName] - if (typeof value !== 'undefined') { - setValue(fieldName, value, { - shouldValidate: true, - shouldDirty: true, - }) - } - } - }) -} - -export function isWizardValid({ currentStep, steps, formData }) { - if (currentStep > 0 && currentStep <= steps.length + 1) { - const schema = steps - .slice(0, currentStep) - .map(({ schema }) => schema) - .reduce((prev, curr) => { - return { - ...prev, - ...curr, - } - }, {}) - try { - yup.object(schema).validateSync(formData, { context: formData }) - return true - } catch (error) { - console.log('error', error.message, error.values) - return false - } - } - return true -} diff --git a/utils/formatPercentage.ts b/utils/formatPercentage.ts deleted file mode 100644 index f8685dc8ea..0000000000 --- a/utils/formatPercentage.ts +++ /dev/null @@ -1,11 +0,0 @@ -export function formatPercentage(percentage: number) { - if (percentage === 0 || percentage === Infinity) { - return '0%' - } - - if (percentage < 0.01) { - return '<0.01%' - } - - return `${+percentage.toFixed(2)}%` -} diff --git a/utils/formatting.tsx b/utils/formatting.tsx deleted file mode 100644 index 218ba54d54..0000000000 --- a/utils/formatting.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import BN from 'bn.js' -import { PublicKey } from '@solana/web3.js' -import dayjs from 'dayjs' -const relativeTime = require('dayjs/plugin/relativeTime') - -const votePrecision = 10000 -export const calculatePct = (c: BN, total?: BN) => { - if (total?.isZero()) { - return 0 - } - - return ( - c - .mul(new BN(votePrecision)) - .div(total ?? new BN(1)) - .toNumber() * - (100 / votePrecision) - ) -} - -export const fmtTokenAmount = (c: BN, decimals?: number) => - c?.div(new BN(10).pow(new BN(decimals ?? 0))).toNumber() || 0 - -dayjs.extend(relativeTime) -//@ts-ignore -export const fmtUnixTime = (d: BN) => dayjs(d.toNumber() * 1000).fromNow() - -export function abbreviateAddress(address: PublicKey | string, size = 5) { - const base58 = typeof address === 'string' ? address : address.toBase58() - return base58.slice(0, size) + '…' + base58.slice(-size) -} - -export function precision(a) { - if (!isFinite(a)) return 0 - let e = 1, - p = 0 - while (Math.round(a * e) / e !== a) { - e *= 10 - p++ - } - return p -} diff --git a/utils/github.ts b/utils/github.ts deleted file mode 100644 index 71ecb76384..0000000000 --- a/utils/github.ts +++ /dev/null @@ -1,33 +0,0 @@ -const urlRegex = - // eslint-disable-next-line - /(https:\/\/)(gist\.github.com\/)([\w\/]{1,39}\/)([\w]{1,32})/ - -export async function fetchGistFile(gistUrl: string) { - const pieces = gistUrl.match(urlRegex) - if (pieces) { - const justIdWithoutUser = pieces[4] - if (justIdWithoutUser) { - const apiUrl = 'https://api.github.com/gists/' + justIdWithoutUser - const apiResponse = await fetch(apiUrl) - if (apiResponse.status === 200) { - const jsonContent = await apiResponse.json() - const nextUrlFileName = Object.keys(jsonContent['files'])[0] - const nextUrl = jsonContent['files'][nextUrlFileName]['raw_url'] - if (nextUrl.startsWith('https://gist.githubusercontent.com/')) { - const fileResponse = await fetch(nextUrl) - - //console.log('fetchGistFile file', gistUrl, fileResponse) - return await fileResponse.text() - } - return undefined - } else { - console.warn('could not fetchGistFile', { - gistUrl, - apiResponse: await apiResponse.text(), - }) - } - } - } - - return undefined -} diff --git a/utils/helpers.ts b/utils/helpers.ts deleted file mode 100644 index 7fe2110732..0000000000 --- a/utils/helpers.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { fetchGistFile } from './github' - -export function capitalize(str?: string) { - return str ? str?.charAt(0).toUpperCase() + str?.slice(1) : str -} - -export function chunks(array: T[], size: number): T[][] { - const result: Array = [] - let i, j - for (i = 0, j = array.length; i < j; i += size) { - result.push(array.slice(i, i + size)) - } - return result -} - -//SanitizedObject class helps prevent prototype pollution with creating obj without prototype -export class SanitizedObject { - constructor(obj) { - return Object.assign(Object.create(null), obj) - } -} - -export async function resolveProposalDescription(descriptionLink: string) { - try { - const url = new URL(descriptionLink) - return (await fetchGistFile(url.toString())) ?? descriptionLink - } catch { - return descriptionLink - } -} - -export function preventNegativeNumberInput(ev) { - const value = ev.target.value - if (!isNaN(value) && value < 0) { - ev.target.value = 0 - } else if (isNaN(value)) { - ev.target.value = value.slice(0, value.length - 1) - } -} diff --git a/utils/instructionTools.ts b/utils/instructionTools.ts deleted file mode 100644 index 7fa64a4f5e..0000000000 --- a/utils/instructionTools.ts +++ /dev/null @@ -1,574 +0,0 @@ -import { - Governance, - ProgramAccount, - serializeInstructionToBase64, -} from '@solana/spl-governance' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, - u64, -} from '@solana/spl-token' -import { SignerWalletAdapter, WalletAdapter } from '@solana/wallet-adapter-base' -import { - Keypair, - PublicKey, - SystemProgram, - TransactionInstruction, -} from '@solana/web3.js' -import { BN } from '@project-serum/anchor' -import { Marinade, MarinadeConfig } from '@marinade.finance/marinade-ts-sdk' -import { - getMintNaturalAmountFromDecimal, - parseMintNaturalAmountFromDecimal, -} from '@tools/sdk/units' -import { ConnectionContext } from 'utils/connection' -import { getATA } from './ataTools' -import { isFormValid } from './formValidation' -import { getTokenAccountsByMint } from './tokens' -import { UiInstruction } from './uiTypes/proposalCreationTypes' -import { AssetAccount } from '@utils/uiTypes/assets' - -export const validateInstruction = async ({ - schema, - form, - setFormErrors, -}): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - setFormErrors(validationErrors) - return isValid -} - -export async function getGenericTransferInstruction({ - schema, - form, - programId, - connection, - wallet, - setFormErrors, - requiredStateInfo, -}: { - schema: any - form: any - programId: PublicKey | undefined - connection: ConnectionContext - wallet: WalletAdapter | undefined - requiredStateInfo: { - /// The mint that is being transfered - mint: PublicKey - /// The TokenAccount address that will be sending the tokens - tokenSource: PublicKey - /// The number of decimals for this token's mint - mintDecimals: number - /// The governance that controls this account - governance: ProgramAccount - /// The key that has to sign for the token transfer - owner: PublicKey - } - setFormErrors: any -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - const prerequisiteInstructions: TransactionInstruction[] = [] - if (isValid && programId) { - const sourceAccount = requiredStateInfo.tokenSource - //this is the original owner - const destinationAccount = new PublicKey(form.destinationAccount) - const mintPK = requiredStateInfo.mint - const mintAmount = parseMintNaturalAmountFromDecimal( - form.amount!, - requiredStateInfo.mintDecimals - ) - - //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: destinationAccount, - mintPK, - wallet: 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) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPK, // mint - receiverAddress, // ata - destinationAccount, // owner of token account - wallet!.publicKey! // fee payer - ) - ) - } - const transferIx = Token.createTransferInstruction( - TOKEN_PROGRAM_ID, - sourceAccount, - receiverAddress, - requiredStateInfo.owner, - [], - new u64(mintAmount.toString()) - ) - serializedInstruction = serializeInstructionToBase64(transferIx) - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: requiredStateInfo.governance, - prerequisiteInstructions: prerequisiteInstructions, - } - return obj -} - -export async function getTransferInstruction({ - schema, - form, - programId, - connection, - wallet, - currentAccount, - setFormErrors, -}: { - schema: any - form: any - programId: PublicKey | undefined - connection: ConnectionContext - wallet: WalletAdapter | undefined - currentAccount: AssetAccount | null - setFormErrors: any -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - const prerequisiteInstructions: TransactionInstruction[] = [] - const governedTokenAccount = form.governedTokenAccount as AssetAccount - if ( - isValid && - programId && - governedTokenAccount.extensions?.token?.publicKey && - governedTokenAccount.extensions?.token && - governedTokenAccount.extensions?.mint?.account - ) { - const sourceAccount = governedTokenAccount.extensions.transferAddress - //this is the original owner - const destinationAccount = new PublicKey(form.destinationAccount) - const mintPK = form.governedTokenAccount.extensions.mint.publicKey - const mintAmount = parseMintNaturalAmountFromDecimal( - form.amount!, - governedTokenAccount.extensions.mint.account.decimals - ) - - //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: destinationAccount, - mintPK, - wallet: 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) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPK, // mint - receiverAddress, // ata - destinationAccount, // owner of token account - wallet!.publicKey! // fee payer - ) - ) - } - const transferIx = Token.createTransferInstruction( - TOKEN_PROGRAM_ID, - sourceAccount!, - receiverAddress, - currentAccount!.extensions!.token!.account.owner, - [], - new u64(mintAmount.toString()) - ) - serializedInstruction = serializeInstructionToBase64(transferIx) - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: currentAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - } - return obj -} - -export async function getSolTransferInstruction({ - schema, - form, - programId, - currentAccount, - setFormErrors, -}: { - schema: any - form: any - programId: PublicKey | undefined - connection: ConnectionContext - wallet: WalletAdapter | undefined - currentAccount: AssetAccount | null - setFormErrors: any -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - const prerequisiteInstructions: TransactionInstruction[] = [] - const governedTokenAccount = form.governedTokenAccount as AssetAccount - if (isValid && programId && governedTokenAccount?.extensions.mint?.account) { - const sourceAccount = governedTokenAccount.extensions.transferAddress - const destinationAccount = new PublicKey(form.destinationAccount) - //We have configured mint that has same decimals settings as SOL - const mintAmount = parseMintNaturalAmountFromDecimal( - form.amount!, - governedTokenAccount.extensions.mint.account.decimals - ) - - const transferIx = SystemProgram.transfer({ - fromPubkey: sourceAccount!, - toPubkey: destinationAccount, - lamports: mintAmount, - }) - serializedInstruction = serializeInstructionToBase64(transferIx) - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: currentAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - } - return obj -} - -export async function getTransferNftInstruction({ - schema, - form, - programId, - connection, - wallet, - currentAccount, - setFormErrors, - nftMint, -}: { - schema: any - form: any - programId: PublicKey | undefined - connection: ConnectionContext - wallet: WalletAdapter | undefined - currentAccount: AssetAccount | null - setFormErrors: any - nftMint: string -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - const prerequisiteInstructions: TransactionInstruction[] = [] - if ( - isValid && - programId && - form.governedTokenAccount?.extensions.mint?.account - ) { - const tokenAccountsWithNftMint = await getTokenAccountsByMint( - connection.current, - nftMint - ) - const isSolAccSource = tokenAccountsWithNftMint.find( - (x) => - x.account.owner.toBase58() === - form.governedTokenAccount.extensions.transferAddress.toBase58() - )?.publicKey - const isGovernanceSource = tokenAccountsWithNftMint.find( - (x) => - x.account.owner.toBase58() === - form.governedTokenAccount.governance.pubkey.toBase58() - )?.publicKey - //we find ata from connected wallet that holds the nft - const sourceAccount = isSolAccSource || isGovernanceSource - if (!sourceAccount) { - throw 'Nft ata not found for governance' - } - //this is the original owner - const destinationAccount = new PublicKey(form.destinationAccount) - const mintPK = new PublicKey(nftMint) - const mintAmount = 1 - //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: destinationAccount, - mintPK, - wallet: 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) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPK, // mint - receiverAddress, // ata - destinationAccount, // owner of token account - wallet!.publicKey! // fee payer - ) - ) - } - const transferIx = Token.createTransferInstruction( - TOKEN_PROGRAM_ID, - sourceAccount!, - receiverAddress, - isSolAccSource - ? form.governedTokenAccount.extensions.transferAddress - : form.governedTokenAccount.governance.pubkey, - [], - mintAmount - ) - serializedInstruction = serializeInstructionToBase64(transferIx) - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: currentAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - } - return obj -} - -export async function getMintInstruction({ - schema, - form, - programId, - connection, - wallet, - governedMintInfoAccount, - setFormErrors, -}: { - schema: any - form: any - programId: PublicKey | undefined - connection: ConnectionContext - wallet: WalletAdapter | undefined - governedMintInfoAccount: AssetAccount | undefined - setFormErrors: any -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - const prerequisiteInstructions: TransactionInstruction[] = [] - if (isValid && programId && form.mintAccount?.governance?.pubkey) { - //this is the original owner - const destinationAccount = new PublicKey(form.destinationAccount) - const mintPK = form.mintAccount.governance.account.governedAccount - const mintAmount = parseMintNaturalAmountFromDecimal( - form.amount!, - form.mintAccount.extensions.mint.account?.decimals - ) - - //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, - receiverAddress: destinationAccount, - mintPK, - wallet: 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) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPK, // mint - receiverAddress, // ata - destinationAccount, // owner of token account - wallet!.publicKey! // fee payer - ) - ) - } - const transferIx = Token.createMintToInstruction( - TOKEN_PROGRAM_ID, - form.mintAccount.governance.account.governedAccount, - receiverAddress, - form.mintAccount.governance!.pubkey, - [], - mintAmount - ) - serializedInstruction = serializeInstructionToBase64(transferIx) - } - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: governedMintInfoAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - } - return obj -} - -export async function getConvertToMsolInstruction({ - schema, - form, - connection, - wallet, - setFormErrors, -}: { - schema: any - form: any - connection: ConnectionContext - wallet: WalletAdapter | undefined - setFormErrors: any -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - const prerequisiteInstructions: TransactionInstruction[] = [] - let serializedInstruction = '' - - if (isValid && form.governedTokenAccount.extensions.transferAddress) { - const amount = getMintNaturalAmountFromDecimal( - form.amount, - form.governedTokenAccount.extensions.mint.account.decimals - ) - const originAccount = form.governedTokenAccount.extensions.transferAddress - let destinationAccountOwner: PublicKey - const mSolMint = new PublicKey( - 'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So' - ) - - const config = new MarinadeConfig({ - connection: connection.current, - publicKey: originAccount, - }) - const marinade = new Marinade(config) - - if (form.destinationAccount) { - const destinationAccount = form.destinationAccount.pubkey - - const mSolToken = new Token( - connection.current, - mSolMint, - TOKEN_PROGRAM_ID, - (null as unknown) as Keypair - ) - - const destinationAccountInfo = await mSolToken.getAccountInfo( - destinationAccount - ) - destinationAccountOwner = destinationAccountInfo.owner - } else { - destinationAccountOwner = originAccount - const { - currentAddress: destinationAccount, - needToCreateAta, - } = await getATA({ - connection: connection, - receiverAddress: originAccount, - mintPK: mSolMint, - wallet, - }) - if (needToCreateAta && wallet?.publicKey) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - mSolMint, - destinationAccount, - originAccount, - wallet.publicKey - ) - ) - } - } - - const { transaction } = await marinade.deposit(new BN(amount), { - mintToOwnerAddress: destinationAccountOwner, - }) - - if (transaction.instructions.length === 1) { - serializedInstruction = serializeInstructionToBase64( - transaction.instructions[0] - ) - } else if (transaction.instructions.length === 2) { - serializedInstruction = serializeInstructionToBase64( - transaction.instructions[1] - ) - } else { - throw Error( - "Marinade's stake instructions could not be calculated correctly." - ) - } - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: form.governedTokenAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - } - - return obj -} - -export const getTransferInstructionObj = async ({ - connection, - governedTokenAccount, - destinationAccount, - amount, - wallet, -}: { - connection: ConnectionContext - governedTokenAccount: AssetAccount - destinationAccount: string - amount: number | BN - wallet: SignerWalletAdapter -}) => { - const obj: { - transferInstruction: TransactionInstruction | null - ataInstruction: TransactionInstruction | null - } = { - transferInstruction: null, - ataInstruction: null, - } - const sourceAccount = governedTokenAccount.extensions.transferAddress - //this is the original owner - const destinationAccountPk = new PublicKey(destinationAccount) - const mintPK = governedTokenAccount!.extensions!.mint!.publicKey! - const mintAmount = - typeof amount === 'number' - ? parseMintNaturalAmountFromDecimal( - amount, - governedTokenAccount.extensions.mint!.account.decimals - ) - : amount - - //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: destinationAccountPk, - mintPK, - wallet: 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) { - const ataInst = Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mintPK, // mint - receiverAddress, // ata - destinationAccountPk, // owner of token account - wallet!.publicKey! // fee payer - ) - obj.ataInstruction = ataInst - } - const transferIx = Token.createTransferInstruction( - TOKEN_PROGRAM_ID, - sourceAccount!, - receiverAddress, - governedTokenAccount!.extensions!.token!.account.owner, - [], - new u64(mintAmount.toString()) - ) - obj.transferInstruction = transferIx - return obj -} diff --git a/utils/instructions/Castle/index.ts b/utils/instructions/Castle/index.ts deleted file mode 100644 index 71d3901cd6..0000000000 --- a/utils/instructions/Castle/index.ts +++ /dev/null @@ -1,398 +0,0 @@ -import { BN, WalletAdapter } from '@blockworks-foundation/mango-client' -import { - VaultConfig, - DeploymentEnvs, - Clusters, -} from '@castlefinance/vault-core' -import { VaultClient } from '@castlefinance/vault-sdk' -import { Provider } from '@castlefinance/vault-sdk/node_modules/@project-serum/anchor' -import { AnchorWallet } from '@friktion-labs/friktion-sdk/dist/cjs/src/miscUtils' -import { - serializeInstructionToBase64, - ProposalTransaction, - ProgramAccount, - WalletSigner, -} from '@solana/spl-governance' -import { - Token, - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { SignerWalletAdapter } from '@solana/wallet-adapter-base' -import { - PublicKey, - TransactionInstruction, - Keypair, - Connection, -} from '@solana/web3.js' -import { ConnectionContext, getNetworkFromEndpoint } from '@utils/connection' -import { validateInstruction } from '@utils/instructionTools' -import { AssetAccount } from '@utils/uiTypes/assets' -import { - CastleDepositForm, - CastleWithdrawForm, - UiInstruction, -} from '@utils/uiTypes/proposalCreationTypes' - -export async function getCastleDepositInstruction({ - schema, - form, - amount, - connection, - wallet, - setFormErrors, -}: { - schema: any - form: CastleDepositForm - amount: number - programId: PublicKey | undefined - connection: ConnectionContext - wallet: WalletAdapter | SignerWalletAdapter | undefined - setFormErrors: any -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - - // NOTE - this should be `let serializedInstruction = ''` but it's const so the current changeset passes eslint - let serializedInstruction = '' - - const prerequisiteInstructions: TransactionInstruction[] = [] - const governedTokenAccount = form.governedTokenAccount as AssetAccount - - const signers: Keypair[] = [] - - if ( - isValid && - amount && - amount > 0 && - governedTokenAccount?.extensions.token?.publicKey && - governedTokenAccount?.extensions.token && - governedTokenAccount?.extensions.mint?.account && - governedTokenAccount?.governance && - wallet && - wallet.publicKey - ) { - const vaultClient = await getCastleVaultClientFromForm( - wallet, - connection, - form - ) - - const reserveTokenOwner = - governedTokenAccount.extensions.token.account.owner - - // Create the DAOs LP ATA if it does not exist already - let createLpAcctIx: TransactionInstruction | undefined = undefined - const userLpTokenAccount = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - vaultClient.getLpTokenMint(), - reserveTokenOwner, - true - ) - - try { - await vaultClient.getLpTokenAccountInfo(userLpTokenAccount) - } catch (error) { - createLpAcctIx = Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - vaultClient.getLpTokenMint(), - userLpTokenAccount, - reserveTokenOwner, - wallet.publicKey - ) - } - - // Get the deposit instruction - const { decimals } = governedTokenAccount.extensions.mint.account - const depositIx = vaultClient.getDepositIx( - new BN(amount * Math.pow(10, decimals)), - reserveTokenOwner, - userLpTokenAccount, - governedTokenAccount.pubkey - ) - - // Create the LP token account if necessary - if (createLpAcctIx) { - prerequisiteInstructions.push(createLpAcctIx) - } - - serializedInstruction = serializeInstructionToBase64(depositIx) - } - - // Build + return UI instruction - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: governedTokenAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - signers, - shouldSplitIntoSeparateTxs: true, - } - - return obj -} - -export async function getCastleWithdrawInstruction({ - schema, - form, - amount, - connection, - wallet, - setFormErrors, -}: { - schema: any - form: CastleDepositForm - amount: number - programId: PublicKey | undefined - connection: ConnectionContext - wallet: WalletAdapter | SignerWalletAdapter | undefined - setFormErrors: any -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - - // NOTE - this should be `let serializedInstruction = ''` but it's const so the current changeset passes eslint - let serializedInstruction = '' - - const prerequisiteInstructions: TransactionInstruction[] = [] - const governedTokenAccount = form.governedTokenAccount as AssetAccount - - const signers: Keypair[] = [] - - if ( - isValid && - amount && - amount > 0 && - governedTokenAccount?.extensions.token?.publicKey && - governedTokenAccount?.extensions.token && - governedTokenAccount?.extensions.mint?.account && - governedTokenAccount?.governance && - wallet && - wallet.publicKey - ) { - const vaultClient = await getCastleVaultClientFromForm( - wallet, - connection, - form - ) - - const lpTokenAccountOwner = - governedTokenAccount.extensions.token.account.owner - - // Create the DAOs Reserve ATA if it does not exist already - let createReserveAcctIx: TransactionInstruction | undefined = undefined - const userReserveTokenAccount = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - vaultClient.getReserveTokenMint(), - lpTokenAccountOwner, - true - ) - - try { - await vaultClient.getReserveTokenAccountInfo(userReserveTokenAccount) - } catch (error) { - console.log('Creating reserve token account', error) - createReserveAcctIx = Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - vaultClient.getReserveTokenMint(), - userReserveTokenAccount, - lpTokenAccountOwner, - wallet.publicKey - ) - } - - // Get withdraw instruction. User selects the LP token to deposit back - // into the vault in exchange for the reserve token - const { decimals } = governedTokenAccount.extensions.mint.account - - const withdrawIx = vaultClient.getWithdrawIx( - new BN(amount * Math.pow(10, decimals)), - lpTokenAccountOwner, - governedTokenAccount.pubkey, - userReserveTokenAccount - ) - - // Create the reserve token account if necessary - if (createReserveAcctIx) { - prerequisiteInstructions.push(createReserveAcctIx) - } - - serializedInstruction = serializeInstructionToBase64(withdrawIx) - } - - // Build + return UI instruction - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: governedTokenAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - signers, - shouldSplitIntoSeparateTxs: true, - } - - return obj -} - -/** - * Pulls the reconcile amount out of the proposal - * @param connection - * @param wallet - * @param proposalTx - */ -export async function getCastleReconcileInstruction( - connection: Connection, - wallet: WalletSigner, - instruction: ProgramAccount -) { - const vaultClient = await getCastleVaultClientFromProposal( - wallet, - connection, - instruction - ) - - // Bundle reconcile and refresh into the same tx - const ix = instruction.account.getSingleInstruction() - - // Grab the amount parameter from the instruction :^) - const amount = new BN( - [...ix.data.slice(8, 16)] - .reverse() - .map((i) => `00${i.toString(16)}`.slice(-2)) - .join(''), - 16 - ).toNumber() - - return await vaultClient.getReconcileTxs(amount) -} - -/** - * Constructs refresh transaction based on network and vault and mint and strategy - * @param connection - * @param wallet - * @param instructionOption - * @returns Refresh transaction for the specified mint vault - */ -export async function getCastleRefreshInstruction( - connection: Connection, - wallet: any, - instruction: ProgramAccount -) { - const vaultClient = await getCastleVaultClientFromProposal( - wallet, - connection, - instruction - ) - - const refreshIx = vaultClient.getRefreshIx() - - return refreshIx -} - -/** - * Get the vault that matches the current network and - * pulls the vaultId from a form - * @param network - * @param instruction - * @returns - */ -const getCastleVaultClientFromForm = async ( - wallet: WalletSigner, - connection: ConnectionContext, - form: CastleDepositForm | CastleWithdrawForm -) => { - // Create a new provider - const provider = new Provider( - connection.current, - (wallet as unknown) as AnchorWallet, - { - preflightCommitment: 'confirmed', - commitment: 'confirmed', - } - ) - - const vaults = (await getCastleVaults()).filter((v) => - connection.cluster == 'mainnet' - ? v.cluster == Clusters.mainnetBeta - : v.cluster == Clusters.devnet - ) - - // Getting the vault from a user-inputted form - const vault = vaults.find((v) => v.vault_id === form.castleVaultId) - - if (!vault) { - throw new Error('Vault not found in config') - } - - // Load the vault - const vaultClient = await VaultClient.load( - provider, - new PublicKey(vault.vault_id), - connection.cluster == 'mainnet' - ? DeploymentEnvs.mainnet - : DeploymentEnvs.devnetStaging - ) - - return vaultClient -} - -/** - * Get the vault that matches the current network and - * pulls the vaultId from an instruction proposal - * @param network - * @param instruction - * @returns - */ -const getCastleVaultClientFromProposal = async ( - wallet: WalletSigner, - connection: Connection, - instruction: ProgramAccount -) => { - // Create a new provider - const provider = new Provider( - connection, - (wallet as unknown) as AnchorWallet, - { - preflightCommitment: 'confirmed', - commitment: 'confirmed', - } - ) - - const network = getNetworkFromEndpoint(connection.rpcEndpoint) - const vaults = await getCastleVaults() - - // Getting the vault from a proposal instruction - const vault = vaults - .filter((v) => - network == 'mainnet' - ? v.cluster == Clusters.mainnetBeta - : v.cluster == Clusters.devnet - ) - .find((v) => - instruction.account.instructions - .map((i) => i.accounts.map((a) => a.pubkey.toBase58())) - .flat() - .includes(v.vault_id) - ) - - if (!vault) { - throw new Error('Vault not found in config') - } - - // Load the vault - const vaultClient = await VaultClient.load( - provider, - new PublicKey(vault.vault_id), - network == 'mainnet' ? DeploymentEnvs.mainnet : DeploymentEnvs.devnetStaging - ) - - return vaultClient -} - -// Get the vaults from the config api -export const getCastleVaults = async () => { - const configResponse = await fetch('https://api.castle.finance/configs') - const vaults = (await configResponse.json()) as VaultConfig[] - return vaults -} diff --git a/utils/instructions/Friktion/index.ts b/utils/instructions/Friktion/index.ts deleted file mode 100644 index 2bf1c24892..0000000000 --- a/utils/instructions/Friktion/index.ts +++ /dev/null @@ -1,540 +0,0 @@ -import { - ConnectedVoltSDK, - FriktionSDK, - PendingDepositWithKey, - VoltSDK, -} from '@friktion-labs/friktion-sdk' -import { AnchorWallet } from '@friktion-labs/friktion-sdk/dist/cjs/src/miscUtils' -import { WSOL_MINT } from '@components/instructions/tools' -import Decimal from 'decimal.js' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { WalletAdapter } from '@solana/wallet-adapter-base' -import { - Account, - Keypair, - 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 { AssetAccount } from '@utils/uiTypes/assets' - -export async function getFriktionDepositInstruction({ - schema, - form, - amount, - connection, - wallet, - setFormErrors, -}: { - schema: any - form: any - amount: number - 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 && - amount && - 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 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 - 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) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - vaultMint, // mint - receiverAddress, // ata - governedTokenAccount.governance.pubkey, // owner of token account - wallet.publicKey! // fee payer - ) - ) - } - - let depositTokenAccountKey: 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 - ) - ) - } - depositTokenAccountKey = receiverAddress - } else { - depositTokenAccountKey = governedTokenAccount.extensions.transferAddress! - } - - try { - let decimals = 9 - - if (!governedTokenAccount.isSol) { - const underlyingAssetMintInfo = await new Token( - connection.current, - governedTokenAccount.extensions.mint.publicKey, - TOKEN_PROGRAM_ID, - (null as unknown) as Account - ).getMintInfo() - decimals = underlyingAssetMintInfo.decimals - } - - const depositIx = governedTokenAccount.isSol - ? await cVoltSDK.depositWithClaim( - new Decimal(amount), - depositTokenAccountKey, - receiverAddress, - true, - governedTokenAccount.extensions.transferAddress!, - governedTokenAccount.governance.pubkey, - decimals - ) - : 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() === - governedTokenAccount.governance?.pubkey.toString() - ) - depositIx.keys[governedAccountIndex].isSigner = true - - serializedInstruction = serializeInstructionToBase64(depositIx) - } 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 getFriktionWithdrawInstruction({ - schema, - form, - amount, - connection, - wallet, - setFormErrors, -}: { - schema: any - form: any - amount: number - 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 && - amount && - 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 vaultMint = cVoltSDK.voltVault.vaultMint - - 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 - ) - ) - } - depositTokenDest = receiverAddress - } else { - depositTokenDest = governedTokenAccount.extensions.transferAddress! - } - - //we find true receiver address if its wallet and we need to create ATA the ata address will be the receiver - 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) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - vaultMint, // mint - receiverAddress, // ata - governedTokenAccount.governance.pubkey, // owner of token account - wallet.publicKey! // fee payer - ) - ) - } - - 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 pendingDepositInfo = { - ...acct, - key: key, - } as PendingDepositWithKey - - if ( - pendingDepositInfo && - pendingDepositInfo.roundNumber.lt(voltVault.roundNumber) && - pendingDepositInfo?.numUnderlyingDeposited?.gtn(0) - ) { - 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 - ) - - const voltVault = cVoltSDK.voltVault - - 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 - ) - ) - } - 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) - ) { - const ix = await cVoltSDK.claimPendingWithdrawal(depositTokenDest) - serializedInstruction = serializeInstructionToBase64(ix) - } else { - throw new Error('No pending withdrawal 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 -} diff --git a/utils/instructions/GoblinGold/index.ts b/utils/instructions/GoblinGold/index.ts deleted file mode 100644 index e7bd8838fd..0000000000 --- a/utils/instructions/GoblinGold/index.ts +++ /dev/null @@ -1,352 +0,0 @@ -import { UiInstruction } from '../../uiTypes/proposalCreationTypes' -import { WSOL_MINT_PK } from '@components/instructions/tools' -import { Wallet, BN } from '@project-serum/anchor' -import { publicKey, struct, u32, u64, u8 } from '@project-serum/borsh' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { WalletAdapter } from '@solana/wallet-adapter-base' -import { - Keypair, - PublicKey, - TransactionInstruction, - Connection, - SystemProgram, -} from '@solana/web3.js' -import { parseMintNaturalAmountFromDecimal } from '@tools/sdk/units' -import { validateInstruction } from '@utils/instructionTools' -import { AssetAccount } from '@utils/uiTypes/assets' -import { GoblinGold } from 'goblingold-sdk' -import type { ConnectionContext } from 'utils/connection' - -// // https://github.com/solana-labs/solana-program-library/blob/master/token/js/client/token.js#L210 -export const ACCOUNT_LAYOUT = struct([ - publicKey('mint'), - publicKey('owner'), - u64('amount'), - u32('delegateOption'), - publicKey('delegate'), - u8('state'), - u32('isNativeOption'), - u64('isNative'), - u64('delegatedAmount'), - u32('closeAuthorityOption'), - publicKey('closeAuthority'), -]) - -async function createAssociatedTokenAccountIfNotExist( - connection: Connection, - mintAddress: PublicKey, - owner: PublicKey, - payer: PublicKey, - prerequisiteInstructions: TransactionInstruction[] -) { - const ataAddress = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - mintAddress, - owner, - true - ) - - const accountInfo = await connection.getAccountInfo(ataAddress) - - if (!accountInfo) { - prerequisiteInstructions.push( - Token.createAssociatedTokenAccountInstruction( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - mintAddress, - ataAddress, - owner, - payer - ) - ) - } - - return ataAddress -} - -export async function createWrappedNativeAccount( - connection: Connection, - owner: PublicKey, - payer: PublicKey, - amount: number | undefined, - prerequisiteInstructions: TransactionInstruction[] -) { - // Allocate memory for the account - const balanceNeeded = await Token.getMinBalanceRentForExemptAccount( - connection - ) - - // Create a new account - const newAccount = new Keypair() - - prerequisiteInstructions.push( - SystemProgram.createAccount({ - fromPubkey: payer, - newAccountPubkey: newAccount.publicKey, - lamports: balanceNeeded, - space: ACCOUNT_LAYOUT.span, - programId: TOKEN_PROGRAM_ID, - }) - ) - - // Assign the new account to the native token mint. - // the account will be initialized with a balance equal to the native token balance. - // (i.e. amount) - prerequisiteInstructions.push( - Token.createInitAccountInstruction( - TOKEN_PROGRAM_ID, - WSOL_MINT_PK, - newAccount.publicKey, - owner - ) - ) - - return newAccount -} - -function getGovernedAccountPk(acc: AssetAccount): PublicKey { - return (acc.isSol - ? acc.extensions.transferAddress - : acc.extensions?.token?.account?.owner) as PublicKey -} - -export async function getGoblinGoldDepositInstruction({ - schema, - form, - amount, - connection, - wallet, - setFormErrors, -}: { - schema: any - form: any - amount: number - 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 signers: Keypair[] = [] - if ( - isValid && - amount && - governedTokenAccount?.extensions.mint?.account && - governedTokenAccount?.governance && - wallet && - wallet.publicKey - ) { - // ggUSDC, ggWSOL public key - const governedTokenPk = governedTokenAccount.extensions.mint.publicKey - - // owner public key - const governedAccountPk = getGovernedAccountPk(governedTokenAccount) - - const sdk = new GoblinGold({ - connection: connection.current, - wallet: (wallet as unknown) as Wallet, - user: governedAccountPk, - }) - - const vault = await sdk.getVaultById(form.goblinGoldVaultId) - - if (!vault) { - throw new Error('Error: no vault') - } - - const strategyProgram = sdk.BestApy - - strategyProgram.setToken(vault.input.symbol) - - const transferAmount = parseMintNaturalAmountFromDecimal( - amount, - vault.input.decimals - ) - - const inputTokenMintAddress = new PublicKey(vault.input.mintAddress) - const lpTokenMintAddress = new PublicKey(vault.lp.mintAddress) - - if (vault.name !== 'Best APY') { - throw new Error("Error: strategy doesn't support") - } - - if (inputTokenMintAddress.toString() !== governedTokenPk.toString()) { - throw new Error('Error: selected governance token is not supported') - } - - let ataInputAddress: PublicKey - let ataInputKeypair: Keypair - if (governedTokenAccount.isSol) { - // If the token account is the native SOL, should create and initialize a new account on the special native token mint. And before initializing it, should send lamports to the new account. - ataInputKeypair = await createWrappedNativeAccount( - connection.current, - governedAccountPk, - wallet.publicKey, - transferAmount, - prerequisiteInstructions - ) - ataInputAddress = ataInputKeypair.publicKey - signers.push(ataInputKeypair) - } else { - ataInputAddress = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - inputTokenMintAddress, - governedAccountPk, - true - ) - } - - // In case of the treasury doesn't have the token account, create it. - const ataLpAddress = await createAssociatedTokenAccountIfNotExist( - connection.current, - lpTokenMintAddress, - governedAccountPk, - wallet.publicKey, - prerequisiteInstructions - ) - - let depositIx: TransactionInstruction - if (governedTokenAccount.isSol) { - depositIx = await strategyProgram.getDepositFromNativeIx({ - userWrappedAccount: ataInputAddress, - userLpTokenAccount: ataLpAddress, - amount: new BN(transferAmount), - }) - } else { - depositIx = await strategyProgram.getDepositIx({ - userInputTokenAccount: ataInputAddress, - userLpTokenAccount: ataLpAddress, - amount: new BN(transferAmount), - }) - } - serializedInstruction = serializeInstructionToBase64(depositIx) - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: governedTokenAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - signers, - shouldSplitIntoSeparateTxs: true, - } - - return obj -} - -export async function getGoblinGoldWithdrawInstruction({ - schema, - form, - amount, - connection, - wallet, - setFormErrors, -}: { - schema: any - form: any - amount: number - programId: PublicKey | undefined - connection: ConnectionContext - wallet: WalletAdapter | undefined - setFormErrors: any -}): Promise { - const isValid = await validateInstruction({ schema, form, setFormErrors }) - let serializedInstruction = '' - let prerequisiteInstructions: TransactionInstruction[] = [] - const governedTokenAccount = form.governedTokenAccount as AssetAccount - - const signers: Keypair[] = [] - - if ( - isValid && - amount && - governedTokenAccount?.extensions.mint?.account && - governedTokenAccount?.governance && - wallet && - wallet.publicKey - ) { - // ggUSDC, ggWSOL public key - const governedTokenPk = governedTokenAccount.extensions.mint.publicKey - - // owner public key - const governedAccountPk = getGovernedAccountPk(governedTokenAccount) - - const sdk = new GoblinGold({ - connection: connection.current, - wallet: (wallet as unknown) as Wallet, - user: governedAccountPk, - }) - - const vault = await sdk.getVaultById(form.goblinGoldVaultId) - - if (!vault) { - throw new Error('Error: no vault') - } - const strategyProgram = sdk.BestApy - - strategyProgram.setToken(vault.input.symbol) - - const transferAmount = parseMintNaturalAmountFromDecimal( - amount, - vault.lp.decimals - ) - - const lpTokenMintAddress = new PublicKey(vault.lp.mintAddress) - - if (vault.name !== 'Best APY') { - throw new Error("Error: strategy doesn't support") - } - - if (lpTokenMintAddress.toString() !== governedTokenPk.toString()) { - throw new Error('Error: selected governance token is not supported') - } - - const ataLpAddress = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, - TOKEN_PROGRAM_ID, - lpTokenMintAddress, - governedAccountPk, - true - ) - - const createVaultIxsIxs = await strategyProgram.createVaultUserTicketAccount( - { - userSigner: wallet.publicKey, - userTicketAccountOwner: governedAccountPk, - } - ) - - if (createVaultIxsIxs != null) - prerequisiteInstructions = prerequisiteInstructions.concat( - createVaultIxsIxs - ) - - const withdrawIxs = await strategyProgram.getOpenWithdrawTicketIx({ - userLpTokenAccount: ataLpAddress, - lpAmount: new BN(transferAmount), - }) - serializedInstruction = serializeInstructionToBase64(withdrawIxs) - } - - const obj: UiInstruction = { - serializedInstruction, - isValid, - governance: governedTokenAccount?.governance, - prerequisiteInstructions: prerequisiteInstructions, - signers, - shouldSplitIntoSeparateTxs: true, - } - - return obj -} diff --git a/utils/notifications.tsx b/utils/notifications.tsx deleted file mode 100644 index 8ad7ffdcea..0000000000 --- a/utils/notifications.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import useNotificationStore from '../stores/useNotificationStore' - -export function notify(newNotification: { - type?: string - message: string - description?: string - txid?: string -}) { - const { - notifications, - set: setNotificationStore, - } = useNotificationStore.getState() - - setNotificationStore((state) => { - state.notifications = [ - ...notifications, - { type: 'success', ...newNotification }, - ] - }) -} diff --git a/utils/ntext.ts b/utils/ntext.ts deleted file mode 100644 index c9dcd50690..0000000000 --- a/utils/ntext.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function ntext(count: number, singular: string, plural?: string) { - if (count === 1) { - return singular - } - - return plural || `${singular}s` -} diff --git a/utils/send.tsx b/utils/send.tsx deleted file mode 100644 index 7eb075aed2..0000000000 --- a/utils/send.tsx +++ /dev/null @@ -1,460 +0,0 @@ -import { notify } from './notifications' -import { - Commitment, - Connection, - Keypair, - RpcResponseAndContext, - SimulatedTransactionResponse, - Transaction, - TransactionSignature, -} from '@solana/web3.js' -import Wallet from '@project-serum/sol-wallet-adapter' -import { sleep } from '@project-serum/common' -import { WalletSigner } from '@solana/spl-governance' - -class TransactionError extends Error { - public txid: string - constructor(message: string, txid?: string) { - super(message) - this.txid = txid! - } -} - -export function getUnixTs() { - return new Date().getTime() / 1000 -} - -const DEFAULT_TIMEOUT = 31000 - -export async function sendTransaction({ - transaction, - wallet, - signers = [], - connection, - sendingMessage = 'Sending transaction...', - successMessage = 'Transaction confirmed', - timeout = DEFAULT_TIMEOUT, -}: { - transaction: Transaction - wallet: WalletSigner - signers?: Array - connection: Connection - sendingMessage?: string - successMessage?: string - timeout?: number -}) { - const signedTransaction = await signTransaction({ - transaction, - wallet, - signers, - connection, - }) - - return await sendSignedTransaction({ - signedTransaction, - connection, - sendingMessage, - successMessage, - timeout, - }) -} - -export async function signTransaction({ - transaction, - wallet, - signers = [], - connection, -}: { - transaction: Transaction - wallet: WalletSigner - signers?: Array - connection: Connection -}) { - transaction.recentBlockhash = ( - await connection.getLatestBlockhash('max') - ).blockhash - transaction.setSigners(wallet!.publicKey!, ...signers.map((s) => s.publicKey)) - if (signers.length > 0) { - transaction.partialSign(...signers) - } - return await wallet.signTransaction(transaction) -} - -export async function signTransactions({ - transactionsAndSigners, - wallet, - connection, -}: { - transactionsAndSigners: { - transaction: Transaction - signers?: Array - }[] - wallet: Wallet - connection: Connection -}) { - const blockhash = (await connection.getLatestBlockhash('max')).blockhash - transactionsAndSigners.forEach(({ transaction, signers = [] }) => { - transaction.recentBlockhash = blockhash - transaction.setSigners( - wallet!.publicKey!, - ...signers.map((s) => s.publicKey) - ) - if (signers?.length > 0) { - transaction.partialSign(...signers) - } - }) - - let signed - try { - signed = await wallet.signAllTransactions( - transactionsAndSigners.map(({ transaction }) => transaction) - ) - } catch (e) { - console.log(e) - } - - return signed -} - -export async function sendSignedTransaction({ - signedTransaction, - connection, - sendingMessage = 'Sending transaction...', - successMessage = 'Transaction confirmed', - timeout = DEFAULT_TIMEOUT, -}: { - signedTransaction: Transaction - connection: Connection - sendingMessage?: string - successMessage?: string - timeout?: number -}): Promise { - // debugger - console.log('raw tx') - const rawTransaction = signedTransaction.serialize() - const startTime = getUnixTs() - - console.log('raw tx', rawTransaction) - - notify({ message: sendingMessage }) - console.log('notify') - - const txid: TransactionSignature = await connection.sendRawTransaction( - rawTransaction, - { - skipPreflight: true, - } - ) - console.log('notify2') - - console.log('Started awaiting confirmation for', txid) - - let done = false - - ;(async () => { - while (!done && getUnixTs() - startTime < timeout) { - connection.sendRawTransaction(rawTransaction, { - skipPreflight: true, - }) - - await sleep(3000) - } - })() - - try { - console.log('calling confirmation sig', txid, timeout, connection) - - console.log( - 'calling signatures confirmation', - await awaitTransactionSignatureConfirmation(txid, timeout, connection) - ) - } catch (err) { - if (err.timeout) { - throw new Error('Timed out awaiting confirmation on transaction') - } - - let simulateResult: SimulatedTransactionResponse | null = null - - console.log('sined transaction', signedTransaction) - - // Simulate failed transaction to parse out an error reason - try { - console.log('start simulate') - simulateResult = ( - await simulateTransaction(connection, signedTransaction, 'single') - ).value - } catch (error) { - console.log('Error simulating: ', error) - } - - console.log('simulate result', simulateResult) - - // Parse and throw error if simulation fails - if (simulateResult && simulateResult.err) { - if (simulateResult.logs) { - console.log('simulate resultlogs', simulateResult.logs) - - for (let i = simulateResult.logs.length - 1; i >= 0; --i) { - const line = simulateResult.logs[i] - - if (line.startsWith('Program log: ')) { - throw new TransactionError( - 'Transaction failed: ' + line.slice('Program log: '.length), - txid - ) - } - } - } - throw new TransactionError(JSON.stringify(simulateResult.err), txid) - } - - console.log('transaction error lasdkasdn') - - throw new TransactionError('Transaction failed', txid) - } finally { - done = true - } - - notify({ message: successMessage, type: 'success', txid }) - - console.log('Latency', txid, getUnixTs() - startTime) - return txid -} - -/** - * Send a primary transaction and an adjacent one - */ -export async function sendSignedAndAdjacentTransactions({ - signedTransaction, - adjacentTransaction, - connection, - sendingMessage = 'Sending transaction...', - successMessage = 'Transaction confirmed', - timeout = DEFAULT_TIMEOUT, -}: { - signedTransaction: Transaction - adjacentTransaction: Transaction - connection: Connection - sendingMessage?: string - successMessage?: string - timeout?: number -}): Promise { - notify({ message: sendingMessage }) - - // Serialize both transactions - const rawTransaction = signedTransaction.serialize() - const rawAdjTransaction = adjacentTransaction.serialize() - - const proposalTxPromise = connection.sendRawTransaction(rawAdjTransaction, { - skipPreflight: true, - }) - await sleep(30) - const adjTxPromise = connection.sendRawTransaction(rawTransaction, { - skipPreflight: true, - }) - - const [proposalTxId, adjTxId] = await Promise.all([ - proposalTxPromise, - adjTxPromise, - ]) - - // Retry mechanism - let done = false - const startTime = getUnixTs() - console.log('Started awaiting confirmation for', proposalTxId) - ;(async () => { - while (!done && getUnixTs() - startTime < timeout) { - console.log('RETRYING') - connection.sendRawTransaction(rawTransaction, { - skipPreflight: true, - }) - await sleep(3000) - } - })() - - try { - console.log( - 'calling signatures confirmation', - await awaitTransactionSignatureConfirmation(adjTxId, timeout, connection), - await awaitTransactionSignatureConfirmation( - proposalTxId, - timeout, - connection - ) - ) - } catch (err) { - if (err.timeout) { - throw new Error('Timed out awaiting confirmation on transaction') - } - - let simulateResult: SimulatedTransactionResponse | null = null - - console.log('signed transaction', signedTransaction) - - // Simulate failed transaction to parse out an error reason - try { - console.log('start simulate') - simulateResult = ( - await simulateTransaction(connection, signedTransaction, 'single') - ).value - } catch (error) { - console.log('Error simulating: ', error) - } - - console.log('simulate result', simulateResult) - - // Parse and throw error if simulation fails - if (simulateResult && simulateResult.err) { - if (simulateResult.logs) { - console.log('simulate resultlogs', simulateResult.logs) - - for (let i = simulateResult.logs.length - 1; i >= 0; --i) { - const line = simulateResult.logs[i] - - if (line.startsWith('Program log: ')) { - throw new TransactionError( - 'Transaction failed: ' + line.slice('Program log: '.length), - proposalTxId - ) - } - } - } - throw new TransactionError( - JSON.stringify(simulateResult.err), - proposalTxId - ) - } - - console.log('transaction error') - - throw new TransactionError('Transaction failed', proposalTxId) - } finally { - done = true - } - - notify({ message: successMessage, type: 'success', txid: proposalTxId }) - - console.log('Latency', proposalTxId, getUnixTs() - startTime) - return proposalTxId -} - -async function awaitTransactionSignatureConfirmation( - txid: TransactionSignature, - timeout: number, - connection: Connection -) { - let done = false - const result = await new Promise((resolve, reject) => { - // eslint-disable-next-line - ;(async () => { - setTimeout(() => { - if (done) { - return - } - done = true - console.log('Timed out for txid', txid) - reject({ timeout: true }) - }, timeout) - try { - connection.onSignature( - txid, - (result) => { - console.log('WS confirmed', txid, result, result.err) - done = true - if (result.err) { - reject(result.err) - } else { - resolve(result) - } - }, - connection.commitment - ) - console.log('Set up WS connection', txid) - } catch (e) { - done = true - console.log('WS error in setup', txid, e) - } - while (!done) { - // eslint-disable-next-line - ;(async () => { - try { - const signatureStatuses = await connection.getSignatureStatuses([ - txid, - ]) - - console.log('signatures cancel proposal', signatureStatuses) - - const result = signatureStatuses && signatureStatuses.value[0] - - console.log('result signatures proosa', result, signatureStatuses) - - if (!done) { - if (!result) { - // console.log('REST null result for', txid, result); - } else if (result.err) { - console.log('REST error for', txid, result) - done = true - reject(result.err) - } - // @ts-ignore - else if ( - !( - result.confirmations || - result.confirmationStatus === 'confirmed' || - result.confirmationStatus === 'finalized' - ) - ) { - console.log('REST not confirmed', txid, result) - } else { - console.log('REST confirmed', txid, result) - done = true - resolve(result) - } - } - } catch (e) { - if (!done) { - console.log('REST connection error: txid', txid, e) - } - } - })() - await sleep(3000) - } - })() - }) - done = true - return result -} - -/** Copy of Connection.simulateTransaction that takes a commitment parameter. */ -export async function simulateTransaction( - connection: Connection, - transaction: Transaction, - commitment: Commitment -): Promise> { - // @ts-ignore - transaction.recentBlockhash = await connection._recentBlockhash( - // @ts-ignore - connection._disableBlockhashCaching - ) - - console.log('simulating transaction', transaction) - - const signData = transaction.serializeMessage() - // @ts-ignore - const wireTransaction = transaction._serialize(signData) - const encodedTransaction = wireTransaction.toString('base64') - - console.log('encoding') - const config: any = { encoding: 'base64', commitment } - const args = [encodedTransaction, config] - console.log('simulating data', args) - - // @ts-ignore - const res = await connection._rpcRequest('simulateTransaction', args) - - console.log('res simulating transaction', res) - if (res.error) { - throw new Error('failed to simulate transaction: ' + res.error.message) - } - return res.result -} diff --git a/utils/sendTransactions.tsx b/utils/sendTransactions.tsx deleted file mode 100644 index 715ee3ada0..0000000000 --- a/utils/sendTransactions.tsx +++ /dev/null @@ -1,610 +0,0 @@ -import * as Sentry from '@sentry/react' -import { SignerWalletAdapter } from '@solana/wallet-adapter-base' -import { - Commitment, - Connection, - RpcResponseAndContext, - SignatureStatus, - SimulatedTransactionResponse, - Transaction, - TransactionInstruction, - TransactionSignature, - Keypair, -} from '@solana/web3.js' -import { - closeTransactionProcessUi, - incrementProcessedTransactions, - showTransactionError, - showTransactionsProcessUi, -} from './transactionsLoader' - -interface TransactionInstructionWithType { - instructionsSet: TransactionInstruction[] - sequenceType?: SequenceType -} -interface TransactionsPlayingIndexes { - transactionsIdx: { [txIdx: number]: number }[] - sequenceType?: SequenceType -} - -interface Block { - blockhash: string - lastValidBlockHeight: number -} - -// TODO: sendTransactions() was imported from Oyster as is and needs to be reviewed and updated -// In particular common primitives should be unified with send.tsx and also ensure the same resiliency mechanism -// is used for monitoring transactions status and timeouts - -const sleep = (ttl: number) => - new Promise((resolve) => setTimeout(() => resolve(true), ttl)) - -export type WalletSigner = Pick< - SignerWalletAdapter, - 'publicKey' | 'signTransaction' | 'signAllTransactions' -> - -export function getWalletPublicKey(wallet: WalletSigner) { - if (!wallet.publicKey) { - throw new Error('Wallet not connected!') - } - - return wallet.publicKey -} - -async function awaitTransactionSignatureConfirmation( - txid: TransactionSignature, - //after that time we will start to check blockHeight - startTimeoutCheckThreshold: number, - connection: Connection, - commitment: Commitment = 'recent', - queryStatus = false, - startingBlock: Block -) { - //If the validator can’t find a slot number for the blockhash - //or if the looked up slot number is more than 151 slots lower - // than the slot number of the block being processed, the transaction will be rejected. - const timeoutBlockPeriod = 152 - const timeoutBlockHeight = - startingBlock.lastValidBlockHeight + timeoutBlockPeriod - console.log('Start block height', startingBlock?.lastValidBlockHeight) - console.log('Possible timeout block', timeoutBlockHeight) - let done = false - let startTimeoutCheck = false - let timeout = false - let status: SignatureStatus | null = { - slot: 0, - confirmations: 0, - err: null, - } - let subId = 0 - await new Promise((resolve, reject) => { - const fn = async () => { - setTimeout(() => { - if (done) { - return - } - console.log('Starting timeout check') - console.log( - 'Timeout check was set to start after', - startTimeoutCheckThreshold - ) - startTimeoutCheck = true - }, startTimeoutCheckThreshold) - try { - subId = connection.onSignature( - txid, - (result, context) => { - done = true - status = { - err: result.err, - slot: context.slot, - confirmations: 0, - } - if (result.err) { - console.log('Rejected via websocket', result.err) - Sentry.captureException( - `awaitTransactionSignatureConfirmation line 107: ${result.err}`, - { tags: { tag: 'sendTransactionsErrors' } } - ) - reject(result.err) - } else { - console.log('Resolved via websocket', result) - resolve(result) - } - }, - commitment - ) - } catch (e) { - done = true - console.error('WS error in setup', txid, e) - } - while (!done && queryStatus) { - // eslint-disable-next-line no-loop-func - const fn = async () => { - try { - const promises: [ - Promise>, - Promise? - ] = [connection.getSignatureStatuses([txid])] - //if startTimeoutThreshold passed we start to check if - //current blocks are did not passed timeoutBlockHeight threshold - if (startTimeoutCheck) { - promises.push(connection.getBlockHeight('confirmed')) - } - const [signatureStatuses, blockHeight] = await Promise.all(promises) - if ( - typeof blockHeight !== undefined && - timeoutBlockHeight <= blockHeight! - ) { - done = true - timeout = true - console.log('Tx Timeout ----') - reject({ timeout: true }) - } - - if (blockHeight) { - console.log('Timeout threshold blockheight', timeoutBlockHeight) - console.log('Current blockheight', blockHeight) - } - status = signatureStatuses && signatureStatuses.value[0] - if (!done) { - if (!status) { - console.log('REST null result for', txid, status) - } else if (status.err) { - console.log('REST error for', txid, status) - done = true - Sentry.captureException( - `awaitTransactionSignatureConfirmation line 158: ${status.err}`, - { tags: { tag: 'sendTransactionsErrors' } } - ) - reject(status.err) - } else if (!status.confirmations) { - console.log('REST no confirmations for', txid, status) - } else { - console.log('REST confirmation for', txid, status) - done = true - resolve(status) - } - } - } catch (e) { - if (!done) { - Sentry.captureException( - `awaitTransactionSignatureConfirmation line 173: ${e}`, - { tags: { tag: 'sendTransactionsErrors' } } - ) - console.log('REST connection error: txid', txid, e) - } - } - } - fn() - await sleep(2000) - } - } - fn() - }) - .catch(() => { - //@ts-ignore - if (connection._signatureSubscriptions[subId]) - connection.removeSignatureListener(subId) - }) - .then((_) => { - //@ts-ignore - if (connection._signatureSubscriptions[subId]) - connection.removeSignatureListener(subId) - }) - done = true - return { status, timeout } -} - -////////////////////////////////////////////// -export async function simulateTransaction( - connection: Connection, - transaction: Transaction, - commitment: Commitment -): Promise> { - // @ts-ignore - transaction.recentBlockhash = await connection._recentBlockhash( - // @ts-ignore - connection._disableBlockhashCaching - ) - - const signData = transaction.serializeMessage() - // @ts-ignore - const wireTransaction = transaction._serialize(signData) - const encodedTransaction = wireTransaction.toString('base64') - const config: any = { encoding: 'base64', commitment } - const args = [encodedTransaction, config] - - // @ts-ignore - const res = await connection._rpcRequest('simulateTransaction', args) - if (res.error) { - throw new Error('failed to simulate transaction: ' + res.error.message) - } - return res.result -} -/////////////////////////////////////// -export const getUnixTs = () => { - return new Date().getTime() / 1000 -} - -const DEFAULT_TIMEOUT = 60000 -///////////////////////////////////////////////// -export async function sendSignedTransaction({ - signedTransaction, - connection, - timeout = DEFAULT_TIMEOUT, - block, - transactionInstructionIdx, - showUiComponent = false, -}: { - signedTransaction: Transaction - connection: Connection - sendingMessage?: string - sentMessage?: string - successMessage?: string - timeout?: number - block: Block - transactionInstructionIdx?: number - showUiComponent?: boolean -}): Promise<{ txid: string; slot: number }> { - const rawTransaction = signedTransaction.serialize() - const startTime = getUnixTs() - let slot = 0 - const txid: TransactionSignature = await connection.sendRawTransaction( - rawTransaction, - { - skipPreflight: true, - } - ) - - console.log('Started awaiting confirmation for', txid) - let hasTimeout = false - let done = false - ;(async () => { - while (!done && getUnixTs() - startTime < timeout) { - connection.sendRawTransaction(rawTransaction, { - skipPreflight: true, - }) - await sleep(500) - } - })() - try { - const confirmation = await awaitTransactionSignatureConfirmation( - txid, - timeout, - connection, - 'recent', - true, - block - ) - if (confirmation?.status?.err) { - throw new Error('Transaction failed: Custom instruction error') - } - slot = confirmation?.status?.slot || 0 - hasTimeout = confirmation.timeout - } catch (err) { - Sentry.captureException(`sendSignedTransaction line 287: ${err}`, { - tags: { tag: 'sendTransactionsErrors' }, - }) - let simulateResult: SimulatedTransactionResponse | null = null - try { - simulateResult = ( - await simulateTransaction(connection, signedTransaction, 'single') - ).value - } catch (e) { - // - } - if (simulateResult && simulateResult.err) { - if (simulateResult.logs) { - for (let i = simulateResult.logs.length - 1; i >= 0; --i) { - const line = simulateResult.logs[i] - if (line.startsWith('Program log: ')) { - Sentry.captureException(`sendSignedTransaction line 303: ${line}`) - throw { - txInstructionIdx: transactionInstructionIdx, - error: - 'Transaction failed: ' + line.slice('Program log: '.length), - txid: txid, - } - } - } - } - Sentry.captureException( - `sendSignedTransaction line 314: ${simulateResult.err}`, - { tags: { tag: 'sendTransactionsErrors' } } - ) - throw { - txInstructionIdx: transactionInstructionIdx, - error: JSON.stringify(simulateResult.err), - txid: txid, - } - } - // throw new Error('Transaction failed'); - } finally { - done = true - } - if (hasTimeout) { - throw { - txInstructionIdx: transactionInstructionIdx, - error: 'Timed out awaiting confirmation on transaction', - txid: txid, - } - } - if (showUiComponent) { - incrementProcessedTransactions() - } - console.log('Latency', txid, getUnixTs() - startTime) - return { txid, slot } -} -export enum SequenceType { - Sequential, - Parallel, - StopOnFailure, -} -///////////////////////////////////////// -export const sendTransactions = async ( - connection: Connection, - wallet: WalletSigner, - instructionSet: TransactionInstruction[][], - signersSet: Keypair[][], - sequenceType: SequenceType = SequenceType.Parallel, - commitment: Commitment = 'singleGossip', - successCallback: (txid: string, ind: number) => void = (_txid, _ind) => null, - failCallback: (reason: string, ind: number) => boolean = (_txid, _ind) => - false, - block?: Block -): Promise => { - if (!wallet.publicKey) throw new Error('Wallet not connected!') - - const unsignedTxns: Transaction[] = [] - - if (!block) { - block = await connection.getLatestBlockhash(commitment) - } - for (let i = 0; i < instructionSet.length; i++) { - const instructions = instructionSet[i] - const signers = signersSet[i] - - if (instructions.length === 0) { - continue - } - - const transaction = new Transaction() - instructions.forEach((instruction) => transaction.add(instruction)) - transaction.recentBlockhash = block.blockhash - transaction.setSigners( - // fee payed by the wallet owner - wallet.publicKey, - ...signers.map((s) => s.publicKey) - ) - - if (signers.length > 0) { - transaction.partialSign(...signers) - } - - unsignedTxns.push(transaction) - } - const signedTxns = await wallet.signAllTransactions(unsignedTxns) - const pendingTxns: Promise<{ txid: string; slot: number }>[] = [] - - const breakEarlyObject = { breakEarly: false } - for (let i = 0; i < signedTxns.length; i++) { - const signedTxnPromise = sendSignedTransaction({ - connection, - signedTransaction: signedTxns[i], - block: block, - }) - - signedTxnPromise - .then(({ txid }) => { - successCallback(txid, i) - }) - .catch((_reason) => { - // @ts-ignore - failCallback(signedTxns[i], i) - if (sequenceType == SequenceType.StopOnFailure) { - breakEarlyObject.breakEarly = true - } - }) - - if (sequenceType != SequenceType.Parallel) { - await signedTxnPromise - if (breakEarlyObject.breakEarly) { - return i // REturn the txn we failed on by index - } - } else { - pendingTxns.push(signedTxnPromise) - } - } - - if (sequenceType != SequenceType.Parallel) { - await Promise.all(pendingTxns) - } - - return signedTxns.length -} - -///////////////////////////////////////// -export const sendTransactionsV2 = async ({ - connection, - wallet, - TransactionInstructions, - signersSet, - block, - showUiComponent = false, -}: { - connection: Connection - wallet: WalletSigner - TransactionInstructions: TransactionInstructionWithType[] - signersSet: Keypair[][] - block?: Block - showUiComponent?: boolean -}) => { - if (!wallet.publicKey) throw new Error('Wallet not connected!') - //block will be used for timeout calculation - if (!block) { - block = await connection.getLatestBlockhash('confirmed') - } - //max usable transactions per one sign is 40 - const maxTransactionsInBath = 40 - const currentTransactions = TransactionInstructions.slice( - 0, - maxTransactionsInBath - ) - const unsignedTxns: Transaction[] = [] - //this object will determine how we run transactions e.g [ParallelTx, SequenceTx, ParallelTx] - const transactionCallOrchestrator: TransactionsPlayingIndexes[] = [] - for (let i = 0; i < currentTransactions.length; i++) { - const transactionInstruction = currentTransactions[i] - const signers = signersSet[i] - - if (transactionInstruction.instructionsSet.length === 0) { - continue - } - - const transaction = new Transaction({ feePayer: wallet.publicKey }) - transactionInstruction.instructionsSet.forEach((instruction) => - transaction.add(instruction) - ) - transaction.recentBlockhash = block.blockhash - - if (signers.length > 0) { - transaction.partialSign(...signers) - } - //we take last index of unsignedTransactions to have right indexes because - //if transactions was empty - //then unsigned transactions could not mach TransactionInstructions param indexes - const currentUnsignedTxIdx = unsignedTxns.length - const currentTransactionCall = - transactionCallOrchestrator[transactionCallOrchestrator.length - 1] - //we check if last item in current transactions call type is same - //if not then we create next transaction type - if ( - currentTransactionCall && - currentTransactionCall.sequenceType === - transactionInstruction.sequenceType - ) { - //we push reflection of transactionInstruction as object value for retry. - currentTransactionCall.transactionsIdx.push({ [currentUnsignedTxIdx]: i }) - } else { - transactionCallOrchestrator.push({ - //we push reflection of transactionInstruction as object value for retry. - transactionsIdx: [{ [currentUnsignedTxIdx]: i }], - sequenceType: transactionInstruction.sequenceType, - }) - } - unsignedTxns.push(transaction) - } - console.log(transactionCallOrchestrator) - const signedTxns = await wallet.signAllTransactions(unsignedTxns) - if (showUiComponent) { - showTransactionsProcessUi(signedTxns.length) - } - console.log( - 'Transactions play type order', - transactionCallOrchestrator.map((x) => { - return { - ...x, - sequenceType: - typeof x.sequenceType !== 'undefined' - ? SequenceType[SequenceType[x.sequenceType]] - : 'Parallel', - } - }) - ) - console.log('Signed transactions', signedTxns) - try { - for (const fcn of transactionCallOrchestrator) { - if ( - typeof fcn.sequenceType === 'undefined' || - fcn.sequenceType === SequenceType.Parallel - ) { - //wait for all Parallel - await Promise.all( - fcn.transactionsIdx.map((idx) => { - const transactionIdx = Object.keys(idx)[0] - const transactionInstructionIdx = idx[transactionIdx] - return sendSignedTransaction({ - connection, - signedTransaction: signedTxns[transactionIdx], - block: block!, - transactionInstructionIdx: transactionInstructionIdx, - showUiComponent, - }) - }) - ) - } - if (fcn.sequenceType === SequenceType.Sequential) { - //wait for all Sequential - for (const idx of fcn.transactionsIdx) { - const transactionIdx = Object.keys(idx)[0] - const transactionInstructionIdx = idx[transactionIdx] - await sendSignedTransaction({ - connection, - signedTransaction: signedTxns[transactionIdx], - block, - transactionInstructionIdx: transactionInstructionIdx, - showUiComponent, - }) - } - } - } - //we call recursively our function to forward rest of transactions if - // number of them is higher then maxTransactionsInBath - if (TransactionInstructions.length > maxTransactionsInBath) { - const forwardedTransactions = TransactionInstructions.slice( - maxTransactionsInBath, - TransactionInstructions.length - ) - const forwardedSigners = signersSet.slice( - maxTransactionsInBath, - TransactionInstructions.length - ) - await sendTransactionsV2({ - connection, - wallet, - TransactionInstructions: forwardedTransactions, - signersSet: forwardedSigners, - showUiComponent, - }) - } - if (showUiComponent) { - closeTransactionProcessUi() - } - } catch (e) { - if (showUiComponent) { - const idx = e?.txInstructionIdx - const txInstructionForRetry = TransactionInstructions.slice( - idx, - TransactionInstructions.length - ) - const signersForRetry = signersSet.slice(idx, signersSet.length) - if (showUiComponent) { - showTransactionError( - () => - sendTransactionsV2({ - connection, - wallet, - TransactionInstructions: txInstructionForRetry, - signersSet: signersForRetry, - showUiComponent, - }), - e.error ? e.error : `${e}`, - e.txid - ) - } - } - throw e - } -} - -export const transactionInstructionsToTypedInstructionsSets = ( - instructionsSet: TransactionInstruction[], - type: SequenceType -): TransactionInstructionWithType => { - return { - instructionsSet: instructionsSet, - sequenceType: type, - } -} diff --git a/utils/services/token.tsx b/utils/services/token.tsx deleted file mode 100644 index c389d675c1..0000000000 --- a/utils/services/token.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import axios from 'axios' -import { TokenListProvider, TokenInfo } from '@solana/spl-token-registry' -import { notify } from '@utils/notifications' -import { WSOL_MINT } from '@components/instructions/tools' -import { MANGO_MINT } from 'Strategies/protocols/mango/tools' -const coingeckoPriceEndpoint = 'https://api.coingecko.com/api/v3/simple/price' - -class TokenService { - _tokenList: TokenInfo[] - _tokenPriceToUSDlist: any - constructor() { - this._tokenList = [] - this._tokenPriceToUSDlist = {} - } - async fetchSolanaTokenList() { - try { - const tokens = await new TokenListProvider().resolve() - const tokenList = tokens.filterByClusterSlug('mainnet-beta').getList() - if (tokenList && tokenList.length) { - this._tokenList = tokenList - } - } catch (e) { - console.log(e) - notify({ - type: 'error', - message: 'unable to fetch token list', - }) - } - } - async fetchTokenPrices(mintAddresses: string[]) { - if (mintAddresses.length) { - const mintAddressesWithSol = [...mintAddresses, WSOL_MINT, MANGO_MINT] - const tokenListRecords = this._tokenList?.filter((x) => - mintAddressesWithSol.includes(x.address) - ) - const coingeckoIds = tokenListRecords - .map((x) => x.extensions?.coingeckoId) - .join(',') - try { - const priceToUsdResponse = await axios.get( - `${coingeckoPriceEndpoint}?ids=${coingeckoIds}&vs_currencies=usd` - ) - const priceToUsd = priceToUsdResponse.data - this._tokenPriceToUSDlist = { - ...this._tokenPriceToUSDlist, - ...priceToUsd, - } - return priceToUsd - } catch (e) { - notify({ - type: 'error', - message: 'unable to fetch token prices', - }) - return {} - } - } - return {} - } - getUSDTokenPrice(mintAddress: string): number { - if (mintAddress) { - const tokenListRecord = this._tokenList?.find( - (x) => x.address === mintAddress - ) - const coingeckoId = tokenListRecord?.extensions?.coingeckoId - if (tokenListRecord && coingeckoId) { - return this._tokenPriceToUSDlist[coingeckoId]?.usd || 0 - } - return 0 - } - - return 0 - } - getTokenInfo(mintAddress: string) { - const tokenListRecord = this._tokenList?.find( - (x) => x.address === mintAddress - ) - return tokenListRecord - } - getTokenInfoFromCoingeckoId(coingeckoId: string) { - const tokenListRecord = this._tokenList?.find( - (x) => x.extensions?.coingeckoId === coingeckoId - ) - return tokenListRecord - } -} - -const tokenService = new TokenService() - -export default tokenService diff --git a/utils/splTokens.ts b/utils/splTokens.ts deleted file mode 100644 index 9d6176cd3b..0000000000 --- a/utils/splTokens.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { PublicKey } from '@solana/web3.js' -import SolendConfiguration, { - SupportedCollateralMintNames as SolendSupportedCollateralMintNames, -} from '@tools/sdk/solend/configuration' - -export type SplTokenInformation = { - name: string - mint: PublicKey - decimals: number -} - -export type SupportedSplTokenNames = - | 'USDC' - | 'WSOL' - | SolendSupportedCollateralMintNames - -export const SPL_TOKENS: { - [key in SupportedSplTokenNames]: SplTokenInformation -} = { - USDC: { - name: 'USD Coin', - mint: new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'), - decimals: 6, - }, - - WSOL: { - name: 'Wrapped SOL', - mint: new PublicKey('So11111111111111111111111111111111111111112'), - decimals: 9, - }, - - ...SolendConfiguration.getSupportedCollateralMintsInformation(), -} as const - -export type SplTokenUIName = typeof SPL_TOKENS[keyof typeof SPL_TOKENS]['name'] - -export function getSplTokenMintAddressByUIName( - nameToMatch: SplTokenUIName -): PublicKey { - const item = Object.entries(SPL_TOKENS).find( - ([_, { name }]) => name === nameToMatch - ) - - // theoretically impossible case - if (!item) { - throw new Error('Unable to find SPL token mint address by UI name') - } - - const [, { mint }] = item - - return mint -} diff --git a/utils/textToAddressList.ts b/utils/textToAddressList.ts deleted file mode 100644 index d9b9c3f4db..0000000000 --- a/utils/textToAddressList.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { validateSolAddress } from '@utils/formValidation' - -export interface Addresses { - valid: string[] - invalid: string[] -} - -export const textToAddressList = (textBlock: string): Addresses => { - const valid: string[] = [] - const invalid: string[] = [] - - textBlock.split(/[\s|,]/).forEach((address) => { - if (validateSolAddress(address)) { - valid.push(address) - } else if (address.trim() /* ignore empty strings */) { - invalid.push(address.trim()) - } - }) - - return { valid, invalid } -} diff --git a/utils/tokens.tsx b/utils/tokens.tsx deleted file mode 100644 index 0361056750..0000000000 --- a/utils/tokens.tsx +++ /dev/null @@ -1,428 +0,0 @@ -import { - Keypair, - Connection, - PublicKey, - TransactionInstruction, - Commitment, -} from '@solana/web3.js' -import { - AccountInfo, - AccountLayout, - MintInfo, - MintLayout, - Token, - u64, -} from '@solana/spl-token' -import { MintMaxVoteWeightSource } from '@solana/spl-governance' -import { chunks } from './helpers' -import { getAccountName, WSOL_MINT } from '@components/instructions/tools' -import { formatMintNaturalAmountAsDecimal } from '@tools/sdk/units' -import tokenService from './services/token' -import { getParsedNftAccountsByOwner } from '@nfteyez/sol-rayz' -import axios from 'axios' -import { notify } from './notifications' -import { NFTWithMint } from './uiTypes/nfts' -import { BN } from '@project-serum/anchor' -import { abbreviateAddress } from './formatting' -import BigNumber from 'bignumber.js' -import { AssetAccount } from '@utils/uiTypes/assets' - -export type TokenAccount = AccountInfo -export type MintAccount = MintInfo - -export type TokenProgramAccount = { - publicKey: PublicKey - account: T -} - -export async function getOwnedTokenAccounts( - connection: Connection, - publicKey: PublicKey -): Promise[]> { - const results = await connection.getTokenAccountsByOwner(publicKey, { - programId: TOKEN_PROGRAM_ID, - }) - return results.value.map((r) => { - const publicKey = r.pubkey - const data = Buffer.from(r.account.data) - const account = parseTokenAccountData(publicKey, data) - return { publicKey, account } - }) -} - -export const getTokenAccountsByMint = async ( - connection: Connection, - mint: string -): Promise[]> => { - const results = await connection.getProgramAccounts(TOKEN_PROGRAM_ID, { - filters: [ - { - dataSize: 165, - }, - { - memcmp: { - offset: 0, - bytes: mint, - }, - }, - ], - }) - return results.map((r) => { - const publicKey = r.pubkey - const data = Buffer.from(r.account.data) - const account = parseTokenAccountData(publicKey, data) - return { publicKey, account } - }) -} - -export async function tryGetMint( - connection: Connection, - publicKey: PublicKey -): Promise | undefined> { - try { - const result = await connection.getAccountInfo(publicKey) - const data = Buffer.from(result!.data) - const account = parseMintAccountData(data) - return { - publicKey, - account, - } - } catch (ex) { - console.error(`Can't fetch mint ${publicKey?.toBase58()}`, ex) - } -} - -export async function tryGetTokenAccount( - connection: Connection, - publicKey: PublicKey -): Promise | undefined> { - try { - const result = await connection.getAccountInfo(publicKey) - - if (!result?.owner.equals(TOKEN_PROGRAM_ID)) { - return undefined - } - - const data = Buffer.from(result!.data) - const account = parseTokenAccountData(publicKey, data) - return { - publicKey, - account, - } - } catch (ex) { - // This is Try method and is expected to fail and hence logging is uneccesery - // console.error(`Can't fetch token account ${publicKey?.toBase58()}`, ex) - } -} - -export async function tryGetTokenMint( - connection: Connection, - publicKey: PublicKey -): Promise | undefined> { - const tokenAccount = await tryGetTokenAccount(connection, publicKey) - return tokenAccount && tryGetMint(connection, tokenAccount.account.mint) -} - -// copied from @solana/spl-token -export const TOKEN_PROGRAM_ID = new PublicKey( - 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' -) -export const BPF_UPGRADE_LOADER_ID = new PublicKey( - 'BPFLoaderUpgradeab1e11111111111111111111111' -) -export function parseTokenAccountData( - account: PublicKey, - data: Buffer -): TokenAccount { - const accountInfo = AccountLayout.decode(data) - accountInfo.address = account - accountInfo.mint = new PublicKey(accountInfo.mint) - accountInfo.owner = new PublicKey(accountInfo.owner) - accountInfo.amount = u64.fromBuffer(accountInfo.amount) - - if (accountInfo.delegateOption === 0) { - accountInfo.delegate = null - accountInfo.delegatedAmount = new u64(0) - } else { - accountInfo.delegate = new PublicKey(accountInfo.delegate) - accountInfo.delegatedAmount = u64.fromBuffer(accountInfo.delegatedAmount) - } - - accountInfo.isInitialized = accountInfo.state !== 0 - accountInfo.isFrozen = accountInfo.state === 2 - - if (accountInfo.isNativeOption === 1) { - accountInfo.rentExemptReserve = u64.fromBuffer(accountInfo.isNative) - accountInfo.isNative = true - } else { - accountInfo.rentExemptReserve = null - accountInfo.isNative = false - } - - if (accountInfo.closeAuthorityOption === 0) { - accountInfo.closeAuthority = null - } else { - accountInfo.closeAuthority = new PublicKey(accountInfo.closeAuthority) - } - - return accountInfo -} - -export function parseMintAccountData(data: Buffer) { - const mintInfo = MintLayout.decode(data) - if (mintInfo.mintAuthorityOption === 0) { - mintInfo.mintAuthority = null - } else { - mintInfo.mintAuthority = new PublicKey(mintInfo.mintAuthority) - } - - mintInfo.supply = u64.fromBuffer(mintInfo.supply) - mintInfo.isInitialized = mintInfo.isInitialized != 0 - - if (mintInfo.freezeAuthorityOption === 0) { - mintInfo.freezeAuthority = null - } else { - mintInfo.freezeAuthority = new PublicKey(mintInfo.freezeAuthority) - } - return mintInfo -} - -export function approveTokenTransfer( - instructions: TransactionInstruction[], - cleanupInstructions: TransactionInstruction[], - account: PublicKey, - owner: PublicKey, - amount: number | u64, - autoRevoke = true, - - // if delegate is not passed ephemeral transfer authority is used - delegate?: PublicKey, - existingTransferAuthority?: Keypair -): Keypair { - const tokenProgram = TOKEN_PROGRAM_ID - const transferAuthority = existingTransferAuthority || new Keypair() - - // Coerce amount to u64 in case it's deserialized as BN which differs by buffer conversion functions only - // Without the coercion createApproveInstruction would fail because it won't be able to serialize it - if (typeof amount !== 'number') { - amount = new u64(amount.toArray()) - } - - instructions.push( - Token.createApproveInstruction( - tokenProgram, - account, - delegate ?? transferAuthority.publicKey, - owner, - [], - amount - ) - ) - - if (autoRevoke) { - cleanupInstructions.push( - Token.createRevokeInstruction(tokenProgram, account, owner, []) - ) - } - - return transferAuthority -} - -export async function getMultipleAccountInfoChunked( - connection: Connection, - keys: PublicKey[], - commitment: Commitment | undefined = 'recent' -) { - return ( - await Promise.all( - chunks(keys, 99).map((chunk) => - connection.getMultipleAccountsInfo(chunk, commitment) - ) - ) - ).flat() -} - -//TODO refactor both methods (getMintAccountLabelInfo, getTokenAccountLabelInfo) make it more common -export function getTokenAccountLabelInfo(acc: AssetAccount | undefined) { - let tokenAccount = '' - let tokenName = '' - let tokenAccountName = '' - let amount = '' - let imgUrl = '' - - if (acc?.extensions.token && acc.extensions.mint) { - const info = tokenService.getTokenInfo( - acc.extensions!.mint!.publicKey.toBase58() - ) - imgUrl = info?.logoURI ? info.logoURI : '' - tokenAccount = acc.extensions.token.publicKey.toBase58() - tokenName = info?.name - ? info.name - : abbreviateAddress(acc.extensions.mint.publicKey) - tokenAccountName = getAccountName(acc.extensions.token.publicKey) - amount = formatMintNaturalAmountAsDecimal( - acc.extensions.mint!.account, - acc.extensions.token?.account.amount - ) - } - return { - tokenAccount, - tokenName, - tokenAccountName, - amount, - imgUrl, - } -} - -export function getSolAccountLabel(acc: AssetAccount | undefined) { - let tokenAccount = '' - let tokenName = '' - let tokenAccountName = '' - let amount = '' - let imgUrl = '' - - if (acc?.extensions.mint) { - const info = tokenService.getTokenInfo(WSOL_MINT) - imgUrl = info?.logoURI ? info.logoURI : '' - tokenAccount = acc.extensions.transferAddress!.toBase58() - tokenName = 'SOL' - - tokenAccountName = acc.extensions.transferAddress - ? getAccountName(acc.extensions.transferAddress) - : '' - amount = formatMintNaturalAmountAsDecimal( - acc.extensions.mint!.account, - new BN(acc.extensions.solAccount!.lamports) - ) - } - return { - tokenAccount, - tokenName, - tokenAccountName, - amount, - imgUrl, - } -} - -export function getMintAccountLabelInfo(acc: AssetAccount | undefined) { - let account = '' - let tokenName = '' - let mintAccountName = '' - let amount = '' - let imgUrl = '' - if (acc?.extensions.mint && acc.governance) { - const info = tokenService.getTokenInfo( - acc.governance.account.governedAccount.toBase58() - ) - imgUrl = info?.logoURI ? info.logoURI : '' - account = acc.governance?.account.governedAccount.toBase58() - tokenName = info?.name ? info.name : '' - mintAccountName = getAccountName(acc.governance.account.governedAccount) - amount = formatMintNaturalAmountAsDecimal( - acc.extensions.mint.account, - acc?.extensions.mint.account.supply - ) - } - return { - account, - tokenName, - mintAccountName, - amount, - imgUrl, - } -} - -export type AccountInfoGen = { - executable: boolean - owner: PublicKey - lamports: number - data: T - rentEpoch?: number -} - -export const deserializeMint = (data: Buffer) => { - if (data.length !== MintLayout.span) { - throw new Error('Not a valid Mint') - } - - const mintInfo = MintLayout.decode(data) - - if (mintInfo.mintAuthorityOption === 0) { - mintInfo.mintAuthority = null - } else { - mintInfo.mintAuthority = new PublicKey(mintInfo.mintAuthority) - } - - mintInfo.supply = u64.fromBuffer(mintInfo.supply) - mintInfo.isInitialized = mintInfo.isInitialized !== 0 - - if (mintInfo.freezeAuthorityOption === 0) { - mintInfo.freezeAuthority = null - } else { - mintInfo.freezeAuthority = new PublicKey(mintInfo.freezeAuthority) - } - - return mintInfo as MintInfo -} - -export const getNfts = async (connection: Connection, ownerPk: PublicKey) => { - try { - const nfts = await getParsedNftAccountsByOwner({ - publicAddress: ownerPk.toBase58(), - connection: connection, - }) - const tokenAccounts = await getOwnedTokenAccounts(connection, ownerPk) - const data = Object.keys(nfts).map((key) => nfts[key]) - const arr: NFTWithMint[] = [] - for (let i = 0; i < data.length; i++) { - try { - const val = (await axios.get(data[i].data.uri)).data - const tokenAccount = tokenAccounts.find((x) => { - return ( - x.account.mint.toBase58() === data[i].mint && - x.account.amount.cmpn(0) === 1 - ) - }) - if (tokenAccount) { - arr.push({ - val, - mint: data[i].mint, - tokenAddress: tokenAccount.publicKey.toBase58(), - token: tokenAccount, - }) - } - } catch (e) { - console.log(e) - } - } - return arr - } catch (error) { - notify({ - type: 'error', - message: 'Unable to fetch nfts', - }) - } - return [] -} - -export const parseMintSupplyFraction = (fraction: string) => { - if (!fraction) { - return MintMaxVoteWeightSource.FULL_SUPPLY_FRACTION - } - - const fractionValue = new BigNumber(fraction) - .shiftedBy(MintMaxVoteWeightSource.SUPPLY_FRACTION_DECIMALS) - .toNumber() - - return new MintMaxVoteWeightSource({ - value: new BN(fractionValue), - }) -} - -export const SCALED_FACTOR_SHIFT = 9 - -export function getScaledFactor(amount: number) { - return new BN( - new BigNumber(amount.toString()).shiftedBy(SCALED_FACTOR_SHIFT).toString() - ) -} diff --git a/utils/transactionsLoader.tsx b/utils/transactionsLoader.tsx deleted file mode 100644 index 46e0752d47..0000000000 --- a/utils/transactionsLoader.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import useTransactionsStore from 'stores/useTransactionStore' - -export function showTransactionsProcessUi(transactionsCount: number) { - const { startProcessing } = useTransactionsStore.getState() - - startProcessing(transactionsCount) -} - -export function incrementProcessedTransactions() { - const { incrementProcessedTransactions } = useTransactionsStore.getState() - - incrementProcessedTransactions() -} - -export function closeTransactionProcessUi() { - const { closeTransactionProcess } = useTransactionsStore.getState() - closeTransactionProcess() -} - -export function showTransactionError( - retryCallback: () => Promise, - e: any, - txid: string -) { - const { showTransactionError } = useTransactionsStore.getState() - showTransactionError(retryCallback, e, txid) -} diff --git a/utils/treasuryTools.tsx b/utils/treasuryTools.tsx deleted file mode 100644 index c7befdd6db..0000000000 --- a/utils/treasuryTools.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { getAccountName, WSOL_MINT } from '@components/instructions/tools' -import { BN } from '@project-serum/anchor' -import { PublicKey } from '@solana/web3.js' -import { getMintDecimalAmountFromNatural } from '@tools/sdk/units' -import BigNumber from 'bignumber.js' -import { abbreviateAddress } from './formatting' -import tokenService from './services/token' -import { AccountType, AssetAccount } from './uiTypes/assets' - -export const getTreasuryAccountItemInfoV2 = (account: AssetAccount) => { - const mintAddress = - account.type === AccountType.SOL - ? WSOL_MINT - : account.extensions.mint?.publicKey.toBase58() - - const amount = - account.extensions.amount && account.extensions.mint - ? getMintDecimalAmountFromNatural( - account.extensions.mint.account, - new BN( - account.isSol - ? account.extensions.solAccount!.lamports - : account.extensions.amount - ) - ).toNumber() - : 0 - const price = tokenService.getUSDTokenPrice(mintAddress!) - const totalPrice = amount * price - const totalPriceFormatted = amount - ? new BigNumber(totalPrice).toFormat(0) - : '' - const info = tokenService.getTokenInfo(mintAddress!) - const symbol = - account.type === AccountType.NFT - ? 'NFTS' - : account.type === AccountType.SOL - ? 'SOL' - : info?.symbol - ? info.address === WSOL_MINT - ? 'wSOL' - : info?.symbol - : account.extensions.mint - ? abbreviateAddress(account.extensions.mint.publicKey) - : '' - const amountFormatted = new BigNumber(amount).toFormat() - - const logo = info?.logoURI || '' - const accountName = account.pubkey ? getAccountName(account.pubkey) : '' - const name = accountName - ? accountName - : account.extensions.transferAddress - ? abbreviateAddress(account.extensions.transferAddress as PublicKey) - : '' - - const displayPrice = - totalPriceFormatted && totalPriceFormatted !== '0' - ? totalPriceFormatted - : '' - - return { - accountName, - amountFormatted, - logo, - name, - displayPrice, - info, - symbol, - totalPrice, - } -} diff --git a/utils/uiTypes/VotePlugin.ts b/utils/uiTypes/VotePlugin.ts deleted file mode 100644 index e0ee662e0a..0000000000 --- a/utils/uiTypes/VotePlugin.ts +++ /dev/null @@ -1,497 +0,0 @@ -import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { Metadata } from '@metaplex-foundation/mpl-token-metadata' -import { NftVoterClient } from '@solana/governance-program-library' -import { - SwitchboardQueueVoterClient, - SWITCHBOARD_ADDIN_ID, -} from '../../SwitchboardVotePlugin/SwitchboardQueueVoterClient' -import { - ProgramAccount, - Realm, - SYSTEM_PROGRAM_ID, - Proposal, - TokenOwnerRecord, -} from '@solana/spl-governance' -import { PublicKey, TransactionInstruction } from '@solana/web3.js' -import { chunks } from '@utils/helpers' -import { - getNftRegistrarPDA, - getNftVoterWeightRecord, - getNftMaxVoterWeightRecord, -} from 'NftVotePlugin/sdk/accounts' -import { PythClient } from 'pyth-staking-api' -import { - getRegistrarPDA, - getVoterPDA, - getVoterWeightPDA, -} from 'VoteStakeRegistry/sdk/accounts' -import { NFTWithMint } from './nfts' - -type UpdateVoterWeightRecordTypes = - | 'castVote' - | 'commentProposal' - | 'createGovernance' - | 'createProposal' - | 'signOffProposal' - -export interface VotingClientProps { - client: - | VsrClient - | NftVoterClient - | SwitchboardQueueVoterClient - | PythClient - | undefined - realm: ProgramAccount | undefined - walletPk: PublicKey | null | undefined -} - -export interface NFTWithMeta extends NFTWithMint { - metadata: Metadata -} - -enum VotingClientType { - NoClient, - VsrClient, - NftVoterClient, - SwitchboardVoterClient, - PythClient, -} - -class AccountData { - pubkey: PublicKey - isSigner: boolean - isWritable: boolean - constructor( - pubkey: PublicKey | string, - isSigner = false, - isWritable = false - ) { - this.pubkey = typeof pubkey === 'string' ? new PublicKey(pubkey) : pubkey - this.isSigner = isSigner - this.isWritable = isWritable - } -} - -interface ProgramAddresses { - voterWeightPk: PublicKey | undefined - maxVoterWeightRecord: PublicKey | undefined -} - -//Abstract for common functions that plugins will implement -export class VotingClient { - client: - | VsrClient - | NftVoterClient - | SwitchboardQueueVoterClient - | PythClient - | undefined - realm: ProgramAccount | undefined - walletPk: PublicKey | null | undefined - votingNfts: NFTWithMeta[] - oracles: PublicKey[] - instructions: TransactionInstruction[] - clientType: VotingClientType - noClient: boolean - constructor({ client, realm, walletPk }: VotingClientProps) { - this.client = client - this.realm = realm - this.walletPk = walletPk - this.votingNfts = [] - this.oracles = [] - this.instructions = [] - this.noClient = true - this.clientType = VotingClientType.NoClient - if (this.client instanceof VsrClient) { - this.clientType = VotingClientType.VsrClient - this.noClient = false - } - if (this.client instanceof NftVoterClient) { - this.clientType = VotingClientType.NftVoterClient - this.noClient = false - } - if (this.client instanceof SwitchboardQueueVoterClient) { - this.clientType = VotingClientType.SwitchboardVoterClient - this.noClient = false - } - if (this.client instanceof PythClient) { - this.clientType = VotingClientType.PythClient - this.noClient = false - } - } - withUpdateVoterWeightRecord = async ( - instructions: TransactionInstruction[], - tokenOwnerRecord: ProgramAccount, - type: UpdateVoterWeightRecordTypes, - voterWeightTarget?: PublicKey - ): Promise => { - if (this.noClient) { - return - } - const clientProgramId = this.client!.program.programId - const realm = this.realm! - const walletPk = this.walletPk! - if ( - realm.account.communityMint.toBase58() !== - tokenOwnerRecord.account.governingTokenMint.toBase58() - ) { - return - } - - if (this.client instanceof VsrClient) { - const { registrar } = await getRegistrarPDA( - realm.pubkey, - realm.account.communityMint, - clientProgramId - ) - const { voter } = await getVoterPDA(registrar, walletPk, clientProgramId) - const { voterWeightPk } = await getVoterWeightPDA( - registrar, - walletPk, - clientProgramId - ) - const updateVoterWeightRecordIx = await this.client!.program.methods.updateVoterWeightRecord() - .accounts({ - registrar, - voter, - voterWeightRecord: voterWeightPk, - systemProgram: SYSTEM_PROGRAM_ID, - }) - .instruction() - instructions.push(updateVoterWeightRecordIx) - return { voterWeightPk, maxVoterWeightRecord: undefined } - } - - if (this.client instanceof NftVoterClient) { - const { registrar } = await getNftRegistrarPDA( - realm.pubkey, - realm.account.communityMint, - this.client!.program.programId - ) - const { - voterWeightPk, - maxVoterWeightRecord, - } = await this._withHandleNftVoterWeight( - realm, - walletPk, - clientProgramId, - instructions - ) - const remainingAccounts: AccountData[] = [] - for (let i = 0; i < this.votingNfts.length; i++) { - const nft = this.votingNfts[i] - remainingAccounts.push( - new AccountData(nft.tokenAddress), - new AccountData(nft.metadata.pubkey) - ) - } - const updateVoterWeightRecordIx = await this.client.program.methods - .updateVoterWeightRecord({ [type]: {} }) - .accounts({ - registrar: registrar, - voterWeightRecord: voterWeightPk, - }) - .remainingAccounts(remainingAccounts.slice(0, 10)) - .instruction() - instructions.push(updateVoterWeightRecordIx) - return { voterWeightPk, maxVoterWeightRecord } - } - if (this.client instanceof PythClient) { - const stakeAccount = await this.client!.stakeConnection.getMainAccount( - walletPk - ) - - const { - voterWeightAccount, - } = await this.client.stakeConnection.withUpdateVoterWeight( - instructions, - stakeAccount!, - { [type]: {} }, - voterWeightTarget - ) - - return { - voterWeightPk: voterWeightAccount, - maxVoterWeightRecord: undefined, - } - } - if (this.client instanceof SwitchboardQueueVoterClient) { - instructions.push(this.instructions[0]) - const [vwr] = await PublicKey.findProgramAddress( - [Buffer.from('VoterWeightRecord'), this.oracles[0].toBytes()], - SWITCHBOARD_ADDIN_ID - ) - return { voterWeightPk: vwr, maxVoterWeightRecord: undefined } - } - } - withCastPluginVote = async ( - instructions: TransactionInstruction[], - proposal: ProgramAccount, - tokeOwnerRecord: ProgramAccount - ): Promise => { - if (this.noClient) { - return - } - const clientProgramId = this.client!.program.programId - const realm = this.realm! - const walletPk = this.walletPk! - if ( - realm.account.communityMint.toBase58() !== - proposal.account.governingTokenMint.toBase58() - ) { - return - } - - if (this.client instanceof NftVoterClient) { - const { registrar } = await getNftRegistrarPDA( - realm.pubkey, - realm.account.communityMint, - this.client!.program.programId - ) - const { - voterWeightPk, - maxVoterWeightRecord, - } = await this._withHandleNftVoterWeight( - realm!, - walletPk, - clientProgramId, - instructions - ) - const remainingAccounts: { - pubkey: PublicKey - isSigner: boolean - isWritable: boolean - }[] = [] - const nftVoteRecordsFiltered = await this.client.program.account.nftVoteRecord.all( - [ - { - memcmp: { - offset: 8, - bytes: proposal.pubkey.toBase58(), - }, - }, - ] - ) - for (let i = 0; i < this.votingNfts.length; i++) { - const nft = this.votingNfts[i] - const [nftVoteRecord] = await PublicKey.findProgramAddress( - [ - Buffer.from('nft-vote-record'), - proposal.pubkey.toBuffer(), - new PublicKey(nft.metadata.data.mint).toBuffer(), - ], - clientProgramId - ) - if ( - !nftVoteRecordsFiltered.find( - (x) => x.publicKey.toBase58() === nftVoteRecord.toBase58() - ) - ) - remainingAccounts.push( - new AccountData(nft.tokenAddress), - new AccountData(nft.metadata.pubkey), - new AccountData(nftVoteRecord, false, true) - ) - } - //1 nft is 3 accounts - const firstFiveNfts = remainingAccounts.slice(0, 15) - const remainingNftsToChunk = remainingAccounts.slice( - 15, - remainingAccounts.length - ) - const nftsChunk = chunks(remainingNftsToChunk, 12) - for (const i of nftsChunk) { - const castNftVoteIx = await this.client.program.methods - .castNftVote(proposal.pubkey) - .accounts({ - registrar, - voterWeightRecord: voterWeightPk, - governingTokenOwner: walletPk, - payer: walletPk, - systemProgram: SYSTEM_PROGRAM_ID, - }) - .remainingAccounts(i) - .instruction() - - instructions.push(castNftVoteIx) - } - const castNftVoteIx2 = await this.client.program.methods - .castNftVote(proposal.pubkey) - .accounts({ - registrar, - voterWeightRecord: voterWeightPk, - governingTokenOwner: walletPk, - payer: walletPk, - systemProgram: SYSTEM_PROGRAM_ID, - }) - .remainingAccounts(firstFiveNfts) - .instruction() - instructions.push(castNftVoteIx2) - return { voterWeightPk, maxVoterWeightRecord } - } - - if (this.client instanceof VsrClient) { - const props = await this.withUpdateVoterWeightRecord( - instructions, - tokeOwnerRecord, - 'castVote' - ) - return props - } - if (this.client instanceof SwitchboardQueueVoterClient) { - const props = await this.withUpdateVoterWeightRecord( - instructions, - tokeOwnerRecord, - 'castVote' - ) - return props - } - if (this.client instanceof PythClient) { - const props = await this.withUpdateVoterWeightRecord( - instructions, - tokeOwnerRecord, - 'castVote', - proposal.pubkey - ) - return props - } - } - withRelinquishVote = async ( - instructions, - proposal: ProgramAccount, - voteRecordPk: PublicKey - ): Promise => { - if (this.noClient) { - return - } - const clientProgramId = this.client!.program.programId - const realm = this.realm! - const walletPk = this.walletPk! - if ( - realm.account.communityMint.toBase58() !== - proposal.account.governingTokenMint.toBase58() - ) { - return - } - - if (this.client instanceof NftVoterClient) { - const { registrar } = await getNftRegistrarPDA( - realm.pubkey, - realm.account.communityMint, - this.client!.program.programId - ) - const { - voterWeightPk, - maxVoterWeightRecord, - } = await this._withHandleNftVoterWeight( - realm!, - walletPk, - clientProgramId, - instructions - ) - const remainingAccounts: { - pubkey: PublicKey - isSigner: boolean - isWritable: boolean - }[] = [] - const nftVoteRecordsFiltered = ( - await this.client.program.account.nftVoteRecord.all([ - { - memcmp: { - offset: 8, - bytes: proposal.pubkey.toBase58(), - }, - }, - ]) - ).filter( - (x) => x.account.governingTokenOwner.toBase58() === walletPk.toBase58() - ) - for (const voteRecord of nftVoteRecordsFiltered) { - remainingAccounts.push( - new AccountData(voteRecord.publicKey, false, true) - ) - } - - const firstFiveNfts = remainingAccounts.slice(0, 5) - const remainingNftsToChunk = remainingAccounts.slice( - 5, - remainingAccounts.length - ) - const nftsChunk = chunks(remainingNftsToChunk, 12) - const relinquishNftVoteIx = await this.client.program.methods - .relinquishNftVote() - .accounts({ - registrar, - voterWeightRecord: voterWeightPk, - governance: proposal.account.governance, - proposal: proposal.pubkey, - governingTokenOwner: walletPk, - voteRecord: voteRecordPk, - beneficiary: walletPk, - }) - .remainingAccounts(firstFiveNfts) - .instruction() - instructions.push(relinquishNftVoteIx) - for (const i of nftsChunk) { - const relinquishNftVote2Ix = await this.client.program.methods - .relinquishNftVote() - .accounts({ - registrar, - voterWeightRecord: voterWeightPk, - governance: proposal.account.governance, - proposal: proposal.pubkey, - governingTokenOwner: walletPk, - voteRecord: voteRecordPk, - beneficiary: walletPk, - }) - .remainingAccounts(i) - .instruction() - instructions.push(relinquishNftVote2Ix) - } - return { voterWeightPk, maxVoterWeightRecord } - } - } - _withHandleNftVoterWeight = async ( - realm: ProgramAccount, - walletPk: PublicKey, - clientProgramId: PublicKey, - _instructions - ) => { - if (this.client instanceof NftVoterClient === false) { - throw 'Method only allowed for nft voter client' - } - const { - voterWeightPk, - voterWeightRecordBump, - } = await getNftVoterWeightRecord( - realm!.pubkey, - realm!.account.communityMint, - walletPk!, - clientProgramId - ) - - const { - maxVoterWeightRecord, - maxVoterWeightRecordBump, - } = await getNftMaxVoterWeightRecord( - realm!.pubkey, - realm!.account.communityMint, - clientProgramId - ) - - return { - voterWeightPk, - voterWeightRecordBump, - maxVoterWeightRecord, - maxVoterWeightRecordBump, - } - } - _setCurrentVoterNfts = (nfts: NFTWithMeta[]) => { - this.votingNfts = nfts - } - _setOracles = (oracles: PublicKey[]) => { - this.oracles = oracles - } - _setInstructions = (instructions: TransactionInstruction[]) => { - this.instructions = instructions - } -} diff --git a/utils/uiTypes/assets.ts b/utils/uiTypes/assets.ts deleted file mode 100644 index fd76d8678e..0000000000 --- a/utils/uiTypes/assets.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { Governance, ProgramAccount } from '@solana/spl-governance' -import { AccountInfo, MintInfo, u64 } from '@solana/spl-token' -import { ParsedAccountData, PublicKey } from '@solana/web3.js' -import { TokenProgramAccount, AccountInfoGen } from '@utils/tokens' - -interface AccountExtension { - mint?: TokenProgramAccount | undefined - transferAddress?: PublicKey - amount?: u64 - solAccount?: AccountInfoGen - token?: TokenProgramAccount -} - -export interface AssetAccount { - governance: ProgramAccount - pubkey: PublicKey - type: AccountType - extensions: AccountExtension - isSol?: boolean - isNft?: boolean - isToken?: boolean -} - -export enum AccountType { - TOKEN, - SOL, - MINT, - PROGRAM, - NFT, - GENERIC, - AuxiliaryToken, -} - -export class AccountTypeToken implements AssetAccount { - governance: ProgramAccount - type: AccountType - extensions: AccountExtension - pubkey: PublicKey - isToken: boolean - constructor( - tokenAccount: TokenProgramAccount, - mint: TokenProgramAccount, - governance: ProgramAccount - ) { - this.governance = governance - this.pubkey = tokenAccount.publicKey - this.type = AccountType.TOKEN - this.extensions = { - token: tokenAccount, - mint: mint, - transferAddress: tokenAccount!.publicKey!, - amount: tokenAccount!.account.amount, - } - this.isToken = true - } -} - -export class AccountTypeAuxiliaryToken implements AssetAccount { - governance: ProgramAccount - type: AccountType - extensions: AccountExtension - pubkey: PublicKey - constructor( - tokenAccount: TokenProgramAccount, - mint: TokenProgramAccount - ) { - this.governance = {} as any - this.pubkey = tokenAccount.publicKey - this.type = AccountType.AuxiliaryToken - this.extensions = { - token: tokenAccount, - mint: mint, - transferAddress: tokenAccount!.publicKey!, - amount: tokenAccount!.account.amount, - } - } -} - -export class AccountTypeProgram implements AssetAccount { - governance: ProgramAccount - type: AccountType - extensions: AccountExtension - pubkey: PublicKey - constructor(governance: ProgramAccount) { - this.governance = governance - this.pubkey = governance.account.governedAccount - this.type = AccountType.PROGRAM - this.extensions = {} - } -} - -export class AccountTypeMint implements AssetAccount { - governance: ProgramAccount - type: AccountType - extensions: AccountExtension - pubkey: PublicKey - constructor(governance: ProgramAccount, account: MintInfo) { - this.governance = governance - this.pubkey = governance.account.governedAccount - this.type = AccountType.MINT - this.extensions = { - mint: { - publicKey: governance.account.governedAccount, - account: account, - }, - } - } -} - -export class AccountTypeNFT implements AssetAccount { - governance: ProgramAccount - type: AccountType - extensions: AccountExtension - pubkey: PublicKey - isNft: boolean - constructor( - tokenAccount: TokenProgramAccount, - mint: TokenProgramAccount, - governance: ProgramAccount - ) { - this.governance = governance - this.pubkey = tokenAccount.publicKey - this.type = AccountType.NFT - this.extensions = { - token: tokenAccount, - mint: mint, - transferAddress: tokenAccount.account.owner, - amount: tokenAccount.account.amount, - } - this.isNft = true - } -} - -export class AccountTypeSol implements AssetAccount { - governance: ProgramAccount - type: AccountType - extensions: AccountExtension - pubkey: PublicKey - isSol: boolean - constructor( - mint: TokenProgramAccount, - solAddress: PublicKey, - solAccount: AccountInfoGen, - governance: ProgramAccount - ) { - this.governance = governance - this.type = AccountType.SOL - this.pubkey = solAddress - this.extensions = { - token: undefined, - mint: mint, - transferAddress: solAddress, - amount: new BN(solAccount.lamports), - solAccount: solAccount, - } - this.isSol = true - } -} - -export class AccountTypeGeneric implements AssetAccount { - governance: ProgramAccount - type: AccountType - extensions: AccountExtension - pubkey: PublicKey - constructor(governance: ProgramAccount) { - this.governance = governance - this.pubkey = governance.account.governedAccount - this.type = AccountType.GENERIC - this.extensions = {} - } -} diff --git a/utils/uiTypes/members.ts b/utils/uiTypes/members.ts deleted file mode 100644 index ec5f62e774..0000000000 --- a/utils/uiTypes/members.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BN } from '@project-serum/anchor' -import { PublicKey } from '@solana/web3.js' - -export interface Member { - walletAddress: string - votesCasted: number - councilVotes: BN - communityVotes: BN - hasCouncilTokenOutsideRealm?: boolean - hasCommunityTokenOutsideRealm?: boolean - delegateWalletCouncil?: PublicKey - delegateWalletCommunity?: PublicKey -} - -export interface Delegate { - communityMembers?: Array - councilMembers?: Array - communityTokenCount?: number - councilTokenCount?: number -} - -export interface Delegates { - [key: string]: Delegate -} diff --git a/utils/uiTypes/nfts.ts b/utils/uiTypes/nfts.ts deleted file mode 100644 index e758c83b6f..0000000000 --- a/utils/uiTypes/nfts.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { AccountInfo } from '@solana/spl-token' -import { TokenProgramAccount } from '@utils/tokens' - -interface NFTFiles { - type: string - uri: string -} -interface NFTProperties { - category: string - files: NFTFiles[] -} -export interface NFTData { - image: string - name: string - description: string - properties: NFTProperties - collection: { - family: string - name: string - } -} -export interface NFTWithMint { - val: NFTData - mint: string - tokenAddress: string - token: TokenProgramAccount -} diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts deleted file mode 100644 index 5d2790bab6..0000000000 --- a/utils/uiTypes/proposalCreationTypes.ts +++ /dev/null @@ -1,430 +0,0 @@ -import { Governance, InstructionData } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { RpcContext } from '@solana/spl-governance' -import { MintInfo } from '@solana/spl-token' -import { PublicKey, Keypair, TransactionInstruction } from '@solana/web3.js' -import { getNameOf } from '@tools/core/script' -import { SupportedMintName } from '@tools/sdk/solend/configuration' -import { SplTokenUIName } from '@utils/splTokens' -import { DepositWithMintAccount, Voter } from 'VoteStakeRegistry/sdk/accounts' -import { LockupKind } from 'VoteStakeRegistry/tools/types' -import { consts as foresightConsts } from '@foresight-tmp/foresight-sdk' -import { AssetAccount } from '@utils/uiTypes/assets' - -export interface UiInstruction { - serializedInstruction: string - additionalSerializedInstructions?: string[] - isValid: boolean - governance: ProgramAccount | undefined - customHoldUpTime?: number - prerequisiteInstructions?: TransactionInstruction[] - chunkSplitByDefault?: boolean - chunkBy?: number - signers?: Keypair[] - shouldSplitIntoSeparateTxs?: boolean | undefined -} -export interface SplTokenTransferForm { - destinationAccount: string - amount: number | undefined - governedTokenAccount: AssetAccount | undefined - programId: string | undefined - mintInfo: MintInfo | undefined -} - -export interface CastleDepositForm { - amount: number | undefined - governedTokenAccount: AssetAccount | undefined - castleVaultId: string - programId: string | undefined - mintInfo: MintInfo | undefined -} - -export interface CastleWithdrawForm { - amount: number | undefined - governedTokenAccount: AssetAccount | undefined - castleVaultId: string - programId: string | undefined - mintInfo: MintInfo | undefined -} - -export interface FriktionDepositForm { - amount: number | undefined - governedTokenAccount: AssetAccount | undefined - voltVaultId: string - programId: string | undefined - mintInfo: MintInfo | undefined -} - -export interface FriktionWithdrawForm { - amount: number | undefined - governedTokenAccount: AssetAccount | undefined - voltVaultId: string - 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 -} - -export interface GoblinGoldDepositForm { - amount: number | undefined - governedTokenAccount?: AssetAccount | undefined - goblinGoldVaultId: string - mintName?: SupportedMintName | undefined - mintInfo: MintInfo | undefined -} - -export interface GoblinGoldWithdrawForm { - amount: number | undefined - governedTokenAccount?: AssetAccount | undefined - goblinGoldVaultId?: string - mintName?: SupportedMintName - mintInfo: MintInfo | undefined -} - -export interface GrantForm { - destinationAccount: string - amount: number | undefined - governedTokenAccount: AssetAccount | undefined - mintInfo: MintInfo | undefined - lockupKind: LockupKind - startDateUnixSeconds: number - periods: number - allowClawback: boolean -} - -export interface ClawbackForm { - governedTokenAccount: AssetAccount | undefined - voter: Voter | null - deposit: DepositWithMintAccount | null -} - -export interface SendTokenCompactViewForm extends SplTokenTransferForm { - description: string - title: string -} - -export interface StakingViewForm { - destinationAccount: AssetAccount | undefined - amount: number | undefined - governedTokenAccount: AssetAccount | undefined - description: string - title: string -} - -export interface MintForm { - destinationAccount: string - amount: number | undefined - mintAccount: AssetAccount | undefined - programId: string | undefined -} - -export interface ProgramUpgradeForm { - governedAccount: AssetAccount | undefined - programId: string | undefined - bufferAddress: string - bufferSpillAddress?: string | undefined -} - -export const programUpgradeFormNameOf = getNameOf() - -export interface MangoMakeAddOracleForm { - governedAccount: AssetAccount | undefined - programId: string | undefined - mangoGroup: string | undefined - oracleAccount: string | undefined -} - -type NameValue = { - name: string - value: string -} - -export interface MangoMakeSetMarketModeForm { - governedAccount: AssetAccount | null - mangoGroup: NameValue | null - marketIndex: NameValue | null - marketMode: NameValue | null - marketType: NameValue | null - adminPk: string -} - -export interface MangoMakeAddSpotMarketForm { - governedAccount: AssetAccount | undefined - programId: string | undefined - mangoGroup: string | undefined - oracleAccount: string | undefined - serumAccount: string | undefined - maintLeverage: number - initLeverage: number - liquidationFee: number - optUtil: number - optRate: number - maxRate: number -} - -export interface MangoMakeChangeSpotMarketForm { - governedAccount: AssetAccount | undefined - programId: string | undefined - mangoGroup: string | undefined - baseSymbol: string | undefined - maintLeverage: number - initLeverage: number - liquidationFee: number - optUtil: number - optRate: number - maxRate: number - version: string | undefined -} - -export interface MangoMakeChangePerpMarketForm { - governedAccount: AssetAccount | undefined - programId: string | undefined - mangoGroup: string | undefined - perpMarket: string | undefined - mngoPerPeriod: string | undefined - maxDepthBps: string | undefined - lmSizeShift: string | undefined - makerFee: string | undefined - takerFee: string | undefined - maintLeverage: string | undefined - initLeverage: string | undefined - liquidationFee: string | undefined - rate: string | undefined - exp: string | undefined - targetPeriodLength: string | undefined - version: string | undefined -} - -export interface MangoMakeCreatePerpMarketForm { - governedAccount: AssetAccount | undefined - programId: string | undefined - mangoGroup: string | undefined - oracleAccount: string | undefined - baseDecimals: number - baseLotSize: number - quoteLotSize: number - mngoPerPeriod: number - maxDepthBps: number - lmSizeShift: number - makerFee: number - takerFee: number - maintLeverage: number - initLeverage: number - liquidationFee: number - rate: number - exp: number - targetPeriodLength: number - version: number -} -export interface MangoMakeChangeMaxAccountsForm { - governedAccount: AssetAccount | undefined - programId: string | undefined - mangoGroup: string | undefined - maxMangoAccounts: number -} -export interface MangoMakeChangeReferralFeeParams { - governedAccount: AssetAccount | undefined - programId: string | undefined - mangoGroup: string | undefined - refSurchargeCentibps: number - refShareCentibps: number - refMngoRequired: number -} - -export interface ForesightHasGovernedAccount { - governedAccount: AssetAccount -} - -export interface ForesightHasMarketListId extends ForesightHasGovernedAccount { - marketListId: string -} - -export interface ForesightHasMarketId extends ForesightHasMarketListId { - marketId: number -} - -export interface ForesightHasCategoryId extends ForesightHasGovernedAccount { - categoryId: string -} - -export interface ForesightMakeAddMarketListToCategoryParams - extends ForesightHasCategoryId, - ForesightHasMarketListId {} - -export interface ForesightMakeResolveMarketParams extends ForesightHasMarketId { - winner: number -} - -export interface ForesightMakeSetMarketMetadataParams - extends ForesightHasMarketId { - content: string - field: foresightConsts.MarketMetadataFieldName -} -export interface Base64InstructionForm { - governedAccount: AssetAccount | undefined - base64: string - holdUpTime: number -} - -export interface EmptyInstructionForm { - governedAccount: AssetAccount | undefined -} - -export interface SwitchboardAdmitOracleForm { - oraclePubkey: PublicKey | undefined - queuePubkey: PublicKey | undefined -} - -export interface SwitchboardRevokeOracleForm { - oraclePubkey: PublicKey | undefined - queuePubkey: PublicKey | undefined -} - -export interface CreateAssociatedTokenAccountForm { - governedAccount?: AssetAccount - splTokenMintUIName?: SplTokenUIName -} - -export interface CreateSolendObligationAccountForm { - governedAccount?: AssetAccount -} - -export interface InitSolendObligationAccountForm { - governedAccount?: AssetAccount -} - -export interface DepositReserveLiquidityAndObligationCollateralForm { - governedAccount?: AssetAccount - uiAmount: string - mintName?: SupportedMintName -} - -export interface WithdrawObligationCollateralAndRedeemReserveLiquidityForm { - governedAccount?: AssetAccount - uiAmount: string - mintName?: SupportedMintName - destinationLiquidity?: string -} - -export interface RefreshObligationForm { - governedAccount?: AssetAccount - mintName?: SupportedMintName -} - -export interface RefreshReserveForm { - governedAccount?: AssetAccount - mintName?: SupportedMintName -} - -export enum Instructions { - Transfer, - ProgramUpgrade, - Mint, - Base64, - None, - MangoAddOracle, - MangoAddSpotMarket, - MangoChangeMaxAccounts, - MangoChangePerpMarket, - MangoChangeReferralFeeParams, - MangoChangeSpotMarket, - MangoCreatePerpMarket, - MangoSetMarketMode, - Grant, - Clawback, - CreateAssociatedTokenAccount, - DepositIntoVolt, - WithdrawFromVolt, - ClaimPendingDeposit, - ClaimPendingWithdraw, - DepositIntoCastle, - WithrawFromCastle, - DepositIntoGoblinGold, - WithdrawFromGoblinGold, - CreateSolendObligationAccount, - InitSolendObligationAccount, - DepositReserveLiquidityAndObligationCollateral, - WithdrawObligationCollateralAndRedeemReserveLiquidity, - SwitchboardAdmitOracle, - SwitchboardRevokeOracle, - RefreshSolendObligation, - RefreshSolendReserve, - ForesightInitMarket, - ForesightInitMarketList, - ForesightInitCategory, - ForesightResolveMarket, - ForesightAddMarketListToCategory, - ForesightSetMarketMetadata, - RealmConfig, - CreateNftPluginRegistrar, - CreateNftPluginMaxVoterWeight, - ConfigureNftPluginCollection, - CloseTokenAccount, - VotingMintConfig, - CreateVsrRegistrar, - ChangeMakeDonation, -} - -export type createParams = [ - rpc: RpcContext, - realm: PublicKey, - governance: PublicKey, - tokenOwnerRecord: PublicKey, - name: string, - descriptionLink: string, - governingTokenMint: PublicKey, - holdUpTime: number, - proposalIndex: number, - instructionsData: InstructionData[], - isDraft: boolean -] - -export interface ComponentInstructionData { - governedAccount?: ProgramAccount | undefined - getInstruction?: () => Promise - type: any -} -export interface InstructionsContext { - instructionsData: ComponentInstructionData[] - handleSetInstructions: (val, index) => void - governance: ProgramAccount | null | undefined - setGovernance: (val) => void -} - -export interface ChangeNonprofit { - name: string - description: string - ein: string - classification: string - category: string - address_line: string - city: string - state: string - zip_code: string - icon_url: string - email?: string - website: string - socials: { - facebook?: string - instagram?: string - tiktok?: string - twitter?: string - youtube?: string - } - crypto: { - solana_address: string - ethereum_address: string - } -} diff --git a/utils/validations.tsx b/utils/validations.tsx deleted file mode 100644 index 5fa9d7b511..0000000000 --- a/utils/validations.tsx +++ /dev/null @@ -1,634 +0,0 @@ -import { PublicKey } from '@solana/web3.js' -import { ProgramBufferAccount } from '@tools/validators/accounts/upgradeable-program' -import { tryParseKey } from '@tools/validators/pubkey' -import { create } from 'superstruct' -import { tryGetTokenAccount } from './tokens' -import * as yup from 'yup' -import { - getMintNaturalAmountFromDecimal, - getMintNaturalAmountFromDecimalAsBN, -} from '@tools/sdk/units' - -import type { ConnectionContext } from 'utils/connection' -import { - AccountInfo, - ASSOCIATED_TOKEN_PROGRAM_ID, - Token, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token' -import { Connection } from '@solana/web3.js' -import { BN } from '@project-serum/anchor' -import { nftPluginsPks, vsrPluginsPks } from '@hooks/useVotingPlugins' -import { AssetAccount } from '@utils/uiTypes/assets' - -export const getValidateAccount = async ( - connection: Connection, - pubKey: PublicKey -) => { - const account = await connection.getParsedAccountInfo(pubKey) - //TODO find way to validate account without sols - if (!account) { - throw "Account doesn't exist or has no SOLs" - } - return account -} - -export const getValidatedPublickKey = (val: string) => { - const pubKey = tryParseKey(val) - if (pubKey) { - return pubKey - } else { - throw 'Provided value is not a public key' - } -} - -export const validateDoseTokenAccountMatchMint = ( - tokenAccount: AccountInfo, - mint: PublicKey -) => { - if (tokenAccount.mint.toBase58() !== mint.toBase58()) { - throw "Account mint doesn't match source account" - } -} - -export const tryGetAta = async ( - connection: Connection, - mint: PublicKey, - owner: PublicKey -) => { - //we do ATA validation - const ata = await Token.getAssociatedTokenAddress( - ASSOCIATED_TOKEN_PROGRAM_ID, // always ASSOCIATED_TOKEN_PROGRAM_ID - TOKEN_PROGRAM_ID, // always TOKEN_PROGRAM_ID - mint, // mint - owner, // owner - true - ) - const tokenAccount = await tryGetTokenAccount(connection, ata) - return tokenAccount -} - -export const isExistingTokenAccount = async ( - connection: ConnectionContext, - val: PublicKey -) => { - const account = await getValidateAccount(connection.current, val) - const isExistingTokenAccount = - account.value !== null && - (await tryGetTokenAccount(connection.current, val)) - return isExistingTokenAccount -} - -export const validateDestinationAccAddress = async ( - connection: ConnectionContext, - val: any, - governedAccount?: PublicKey -) => { - const currentConnection = connection.current - const pubKey = getValidatedPublickKey(val) - const account = await getValidateAccount(currentConnection, pubKey) - if (account?.value !== null) { - if (!governedAccount) { - throw 'Source account not provided' - } - const tokenAccount = await tryGetTokenAccount(currentConnection, pubKey) - const governedTokenAccount = await tryGetTokenAccount( - currentConnection, - governedAccount - ) - if (tokenAccount && governedTokenAccount) { - await validateDoseTokenAccountMatchMint( - tokenAccount.account, - governedTokenAccount?.account.mint - ) - } - } - - return true -} - -export const validateDestinationAccAddressWithMint = async ( - connection: ConnectionContext, - val: any, - mintPubKey: PublicKey -) => { - const currentConnection = connection.current - const pubKey = getValidatedPublickKey(val) - const account = await getValidateAccount(currentConnection, pubKey) - if (account?.value !== null) { - if (!mintPubKey) { - throw 'Source account not provided' - } - const tokenAccount = await tryGetTokenAccount(currentConnection, pubKey) - if (tokenAccount && mintPubKey) { - await validateDoseTokenAccountMatchMint(tokenAccount.account, mintPubKey) - } - } - return true -} - -export const validateAccount = async ( - connection: ConnectionContext, - val: string -) => { - const accountPk = tryParseKey(val) - - if (!accountPk) { - throw 'Provided value is not a valid account address' - } - - try { - const accountInfo = await connection.current.getAccountInfo(accountPk) - - if (!accountInfo) { - throw "account doesn't exist or has no SOLs" - } - } catch (ex) { - console.error("Can't validate account", ex) - throw "Can't validate account" - } -} - -export const validateBuffer = async ( - connection: ConnectionContext, - val: string, - governedAccount?: PublicKey -) => { - const pubKey = tryParseKey(val) - if (!governedAccount) { - throw 'Program governed account not selected' - } - if (pubKey) { - await connection.current.getParsedAccountInfo(pubKey).then((data) => { - if (!data || !data.value) { - throw "account doesn't exist or has no SOLs" - } - const info = data.value - if ( - !( - 'parsed' in info.data && - info.data.program === 'bpf-upgradeable-loader' - ) - ) { - throw 'Invalid program buffer account' - } - - let buffer: ProgramBufferAccount - - try { - buffer = create(info.data.parsed, ProgramBufferAccount) - } catch { - throw 'Invalid program buffer account' - } - - if (buffer.info.authority?.toBase58() !== governedAccount.toBase58()) { - throw `Buffer authority must be set to governance account - ${governedAccount.toBase58()}` - } - }) - } else { - throw 'Provided value is not a valid account address' - } -} - -export const getFriktionDepositSchema = ({ form }) => { - const governedTokenAccount = form.governedTokenAccount as AssetAccount - return yup.object().shape({ - governedTokenAccount: yup.object().required('Source account is required'), - amount: yup - .number() - .typeError('Amount is required') - .test( - 'amount', - 'Transfer amount must be less than the source account available amount', - async function (val: number) { - if (val && !form.governedTokenAccount) { - return this.createError({ - message: `Please select source account to validate the amount`, - }) - } - if ( - val && - governedTokenAccount && - governedTokenAccount.extensions.mint - ) { - const mintValue = getMintNaturalAmountFromDecimalAsBN( - val, - governedTokenAccount?.extensions.mint.account.decimals - ) - return !!(governedTokenAccount?.extensions.token?.publicKey && - !governedTokenAccount.isSol - ? governedTokenAccount.extensions.token.account.amount.gte( - mintValue - ) - : new BN( - governedTokenAccount.extensions.solAccount!.lamports - ).gte(mintValue)) - } - return this.createError({ - message: `Amount is required`, - }) - } - ), - }) -} - -export const getCastleDepositSchema = ({ form }) => { - const governedTokenAccount = form.governedTokenAccount as AssetAccount - return yup.object().shape({ - governedTokenAccount: yup.object().required('Source account is required'), - amount: yup - .number() - .typeError('Amount is required') - .test( - 'amount', - 'Transfer amount must be less than the source account available amount', - async function (val: number) { - const isNft = governedTokenAccount?.isNft - if (isNft) { - return true - } - if (val && !form.governedTokenAccount) { - return this.createError({ - message: `Please select source account to validate the amount`, - }) - } - if ( - val && - governedTokenAccount && - governedTokenAccount?.extensions.mint - ) { - const mintValue = getMintNaturalAmountFromDecimalAsBN( - val, - governedTokenAccount?.extensions.mint.account.decimals - ) - return !!(governedTokenAccount?.extensions.token?.publicKey && - !governedTokenAccount.isSol - ? governedTokenAccount.extensions.token.account.amount.gte( - mintValue - ) - : new BN( - governedTokenAccount.extensions.solAccount!.lamports - ).gte(mintValue)) - } - return this.createError({ - message: `Amount is required`, - }) - } - ), - }) -} - -export const getCastleWithdrawSchema = () => { - return yup.object().shape({ - governedTokenAccount: yup.object().required('Source account is required'), - amount: yup.number().typeError('Amount is required'), - }) -} - -export const getFriktionWithdrawSchema = () => { - return yup.object().shape({ - governedTokenAccount: yup.object().required('Source account is required'), - amount: yup.number().typeError('Amount is required'), - }) -} - -export const getGoblinGoldDepositSchema = ({ form }) => { - const governedTokenAccount = form.governedTokenAccount as AssetAccount - return yup.object().shape({ - governedTokenAccount: yup.object().required('Source account is required'), - goblinGoldVaultId: yup.string().required('Vault ID is required'), - amount: yup - .number() - .typeError('Amount is required') - .test( - 'amount', - 'Transfer amount must be less than the source account available amount', - async function (val: number) { - if (val && !form.governedTokenAccount) { - return this.createError({ - message: `Please select source account to validate the amount`, - }) - } - if ( - val && - governedTokenAccount && - governedTokenAccount.extensions.mint - ) { - const mintValue = getMintNaturalAmountFromDecimalAsBN( - val, - governedTokenAccount?.extensions.mint.account.decimals - ) - return !!(governedTokenAccount?.extensions.token?.publicKey && - !governedTokenAccount.isSol - ? governedTokenAccount.extensions.token.account.amount.gte( - mintValue - ) - : new BN( - governedTokenAccount.extensions.solAccount!.lamports - ).gte(mintValue)) - } - return this.createError({ - message: `Amount is required`, - }) - } - ), - }) -} - -export const getGoblinGoldWithdrawSchema = () => { - return yup.object().shape({ - governedTokenAccount: yup.object().required('Source account is required'), - goblinGoldVaultId: yup.string().required('Vault ID is required'), - amount: yup.number().typeError('Amount is required'), - }) -} - -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, - tokenAmount, - mintDecimals, - nftMode, -}: { - form: any - connection: ConnectionContext - tokenAmount?: BN - mintDecimals?: number - nftMode?: boolean -}) => { - const governedTokenAccount = form.governedTokenAccount as AssetAccount - return yup.object().shape({ - governedTokenAccount: yup.object().required('Source account is required'), - amount: yup - .number() - .typeError('Amount is required') - .test( - 'amount', - 'Transfer amount must be less than the source account available amount', - async function (val: number) { - const isNft = nftMode || governedTokenAccount?.isNft - if (isNft) { - return true - } - if (val && !form.governedTokenAccount) { - return this.createError({ - message: `Please select source account to validate the amount`, - }) - } - if ( - val && - governedTokenAccount && - governedTokenAccount?.extensions.mint - ) { - const mintValue = getMintNaturalAmountFromDecimalAsBN( - val, - typeof mintDecimals !== 'undefined' - ? mintDecimals - : governedTokenAccount?.extensions.mint.account.decimals - ) - if (tokenAmount) { - return tokenAmount.gte(mintValue) - } - return !!(governedTokenAccount?.extensions.token?.publicKey && - !governedTokenAccount.isSol - ? governedTokenAccount.extensions.token.account.amount.gte( - mintValue - ) - : new BN( - governedTokenAccount.extensions.solAccount!.lamports - ).gte(mintValue)) - } - return this.createError({ - message: `Amount is required`, - }) - } - ), - destinationAccount: yup - .string() - .test( - 'accountTests', - 'Account validation error', - async function (val: string) { - if (val) { - try { - if ( - governedTokenAccount?.extensions?.transferAddress?.toBase58() == - val - ) { - return this.createError({ - message: `Destination account address can't be same as source account`, - }) - } - await validateDestinationAccAddress( - connection, - val, - governedTokenAccount?.extensions.transferAddress - ) - return true - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Destination account is required`, - }) - } - } - ), - }) -} - -export const getMintSchema = ({ form, connection }) => { - return yup.object().shape({ - amount: yup - .number() - .typeError('Amount is required') - .test('amount', 'Invalid amount', async function (val: number) { - if (val && !form.mintAccount) { - return this.createError({ - message: `Please select mint to validate the amount`, - }) - } - if (val && form.mintAccount && form.mintAccount?.extensions.mint) { - const mintValue = getMintNaturalAmountFromDecimal( - val, - form.mintAccount?.extensions.mint.account.decimals - ) - return !!( - form.mintAccount.governance?.account.governedAccount && mintValue - ) - } - return this.createError({ - message: `Amount is required`, - }) - }), - destinationAccount: yup - .string() - .test( - 'accountTests', - 'Account validation error', - async function (val: string) { - if (val) { - try { - if (form.mintAccount?.governance) { - await validateDestinationAccAddressWithMint( - connection, - val, - form.mintAccount.governance.account.governedAccount - ) - } else { - return this.createError({ - message: `Please select mint`, - }) - } - - return true - } catch (e) { - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `Destination account is required`, - }) - } - } - ), - mintAccount: yup.object().nullable().required('Mint is required'), - }) -} - -export const getStakeSchema = ({ form }) => { - return yup.object().shape({ - amount: yup - .number() - .typeError('Amount is required') - .test('amount', 'Insufficient funds', async function (val: number) { - if (val && val > 9 * 10 ** 6) { - return this.createError({ - message: 'Amount is too large', - }) - } - if (val && !form.governedTokenAccount) { - return this.createError({ - message: 'Please pass in a source account to validate the amount', - }) - } - if ( - val && - form.governedTokenAccount && - form.governedTokenAccount?.isSol && - form.governedTokenAccount?.extensions.mint && - form.governedTokenAccount?.extensions.solAccount - ) { - const mintValue = getMintNaturalAmountFromDecimal( - val, - form.governedTokenAccount?.extensions.mint.account.decimals - ) - return !!( - form.governedTokenAccount.extensions.solAccount.owner && - form.governedTokenAccount.extensions.solAccount.lamports >= - new BN(mintValue) - ) - } - return this.createError({ message: 'Amount is required' }) - }), - governedTokenAccount: yup - .object() - .nullable() - .required('Source account is required'), - }) -} - -export const getRealmCfgSchema = ({ form }) => { - return yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Governed account is required'), - minCommunityTokensToCreateGovernance: yup - .number() - .required('Min community tokens to create governance is required'), - communityVoterWeightAddin: yup - .string() - .test( - 'communityVoterWeightAddinTest', - 'communityVoterWeightAddin validation error', - function (val: string) { - if (!form?.communityVoterWeightAddin) { - return true - } - if (val) { - try { - getValidatedPublickKey(val) - if ([...nftPluginsPks, ...vsrPluginsPks].includes(val)) { - return true - } else { - return this.createError({ - message: `Provided pubkey is not a known plugin pubkey`, - }) - } - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `communityVoterWeightAddin is required`, - }) - } - } - ), - maxCommunityVoterWeightAddin: yup - .string() - .test( - 'maxCommunityVoterWeightAddin', - 'maxCommunityVoterWeightAddin validation error', - function (val: string) { - if (!form?.maxCommunityVoterWeightAddin) { - return true - } - if (val) { - try { - getValidatedPublickKey(val) - if ([...nftPluginsPks].includes(val)) { - return true - } else { - return this.createError({ - message: `Provided pubkey is not a known plugin pubkey`, - }) - } - } catch (e) { - console.log(e) - return this.createError({ - message: `${e}`, - }) - } - } else { - return this.createError({ - message: `maxCommunityVoterWeightAddin is required`, - }) - } - } - ), - }) -} diff --git a/utils/wallet-adapters/index.ts b/utils/wallet-adapters/index.ts deleted file mode 100644 index 0b1086c3af..0000000000 --- a/utils/wallet-adapters/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { PhantomWalletAdapter } from '@solana/wallet-adapter-phantom' -import { SolletWalletAdapter } from '@solana/wallet-adapter-sollet' -import { SolflareWalletAdapter } from '@solana/wallet-adapter-solflare' -import { TorusWalletAdapter } from '@solana/wallet-adapter-torus' -import { GlowWalletAdapter } from '@solana/wallet-adapter-glow' - -export const WALLET_PROVIDERS = [ - { - name: 'Phantom', - url: 'https://phantom.app', - adapter: new PhantomWalletAdapter(), - }, - { - name: 'Torus', - url: 'https://tor.us', - adapter: new TorusWalletAdapter(), - }, - { - name: 'Glow', - url: 'https://glow.app', - adapter: new GlowWalletAdapter(), - }, - { - name: 'Solflare', - url: 'https://solflare.com', - adapter: new SolflareWalletAdapter(), - }, - { - name: 'Sollet.io', - url: 'https://www.sollet.io', - adapter: new SolletWalletAdapter({ provider: 'https://www.sollet.io' }), - }, -] - -export const DEFAULT_PROVIDER = WALLET_PROVIDERS[0] - -export const getWalletProviderByUrl = (urlOrNull) => - WALLET_PROVIDERS.find(({ url }) => url === urlOrNull) || DEFAULT_PROVIDER diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 7dcaa59072..0000000000 --- a/yarn.lock +++ /dev/null @@ -1,14759 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" - integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== - dependencies: - "@babel/highlight" "^7.16.7" - -"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz" - dependencies: - "@babel/highlight" "^7.12.13" - -"@babel/code-frame@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz" - integrity sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA== - dependencies: - "@babel/highlight" "^7.16.0" - -"@babel/compat-data@^7.13.15": - version "7.13.15" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.15.tgz" - -"@babel/compat-data@^7.16.0": - version "7.16.4" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz" - integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q== - -"@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.13.16" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.13.16.tgz" - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.16" - "@babel/helper-compilation-targets" "^7.13.16" - "@babel/helper-module-transforms" "^7.13.14" - "@babel/helpers" "^7.13.16" - "@babel/parser" "^7.13.16" - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.15" - "@babel/types" "^7.13.16" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - semver "^6.3.0" - source-map "^0.5.0" - -"@babel/core@^7.7.2": - version "7.16.5" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.16.5.tgz" - integrity sha512-wUcenlLzuWMZ9Zt8S0KmFwGlH6QKRh3vsm/dhDA3CHkiTA45YuG1XkHRcNRl73EFPXDp/d5kVOU0/y7x2w6OaQ== - dependencies: - "@babel/code-frame" "^7.16.0" - "@babel/generator" "^7.16.5" - "@babel/helper-compilation-targets" "^7.16.3" - "@babel/helper-module-transforms" "^7.16.5" - "@babel/helpers" "^7.16.5" - "@babel/parser" "^7.16.5" - "@babel/template" "^7.16.0" - "@babel/traverse" "^7.16.5" - "@babel/types" "^7.16.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - semver "^6.3.0" - source-map "^0.5.0" - -"@babel/generator@^7.13.16": - version "7.13.16" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.13.16.tgz" - dependencies: - "@babel/types" "^7.13.16" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/generator@^7.16.5", "@babel/generator@^7.7.2": - version "7.16.5" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz" - integrity sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA== - dependencies: - "@babel/types" "^7.16.0" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/helper-compilation-targets@^7.13.16": - version "7.13.16" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz" - dependencies: - "@babel/compat-data" "^7.13.15" - "@babel/helper-validator-option" "^7.12.17" - browserslist "^4.14.5" - semver "^6.3.0" - -"@babel/helper-compilation-targets@^7.16.3": - version "7.16.3" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz" - integrity sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA== - dependencies: - "@babel/compat-data" "^7.16.0" - "@babel/helper-validator-option" "^7.14.5" - browserslist "^4.17.5" - semver "^6.3.0" - -"@babel/helper-environment-visitor@^7.16.5": - version "7.16.5" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.5.tgz" - integrity sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-function-name@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz" - dependencies: - "@babel/helper-get-function-arity" "^7.12.13" - "@babel/template" "^7.12.13" - "@babel/types" "^7.12.13" - -"@babel/helper-function-name@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz" - integrity sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog== - dependencies: - "@babel/helper-get-function-arity" "^7.16.0" - "@babel/template" "^7.16.0" - "@babel/types" "^7.16.0" - -"@babel/helper-get-function-arity@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz" - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-get-function-arity@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz" - integrity sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-hoist-variables@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz" - integrity sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-member-expression-to-functions@^7.13.12": - version "7.13.12" - resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz" - dependencies: - "@babel/types" "^7.13.12" - -"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.13.12": - version "7.13.12" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz" - dependencies: - "@babel/types" "^7.13.12" - -"@babel/helper-module-imports@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz" - integrity sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-module-transforms@^7.13.14": - version "7.13.14" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz" - dependencies: - "@babel/helper-module-imports" "^7.13.12" - "@babel/helper-replace-supers" "^7.13.12" - "@babel/helper-simple-access" "^7.13.12" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/helper-validator-identifier" "^7.12.11" - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.13" - "@babel/types" "^7.13.14" - -"@babel/helper-module-transforms@^7.16.5": - version "7.16.5" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.5.tgz" - integrity sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ== - dependencies: - "@babel/helper-environment-visitor" "^7.16.5" - "@babel/helper-module-imports" "^7.16.0" - "@babel/helper-simple-access" "^7.16.0" - "@babel/helper-split-export-declaration" "^7.16.0" - "@babel/helper-validator-identifier" "^7.15.7" - "@babel/template" "^7.16.0" - "@babel/traverse" "^7.16.5" - "@babel/types" "^7.16.0" - -"@babel/helper-optimise-call-expression@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz" - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.8.0": - version "7.13.0" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz" - -"@babel/helper-plugin-utils@^7.16.5": - version "7.16.5" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz" - integrity sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ== - -"@babel/helper-replace-supers@^7.13.12": - version "7.13.12" - resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz" - dependencies: - "@babel/helper-member-expression-to-functions" "^7.13.12" - "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/traverse" "^7.13.0" - "@babel/types" "^7.13.12" - -"@babel/helper-simple-access@^7.13.12": - version "7.13.12" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz" - dependencies: - "@babel/types" "^7.13.12" - -"@babel/helper-simple-access@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz" - integrity sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-split-export-declaration@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz" - dependencies: - "@babel/types" "^7.12.13" - -"@babel/helper-split-export-declaration@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz" - integrity sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw== - dependencies: - "@babel/types" "^7.16.0" - -"@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" - integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== - -"@babel/helper-validator-identifier@^7.15.7": - version "7.15.7" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz" - integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== - -"@babel/helper-validator-option@^7.12.17": - version "7.12.17" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz" - -"@babel/helper-validator-option@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz" - integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== - -"@babel/helpers@^7.13.16": - version "7.13.17" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.17.tgz" - dependencies: - "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.17" - "@babel/types" "^7.13.17" - -"@babel/helpers@^7.16.5": - version "7.16.5" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.5.tgz" - integrity sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw== - dependencies: - "@babel/template" "^7.16.0" - "@babel/traverse" "^7.16.5" - "@babel/types" "^7.16.0" - -"@babel/highlight@^7.12.13", "@babel/highlight@^7.16.7": - version "7.16.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" - integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== - dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/highlight@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz" - integrity sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g== - dependencies: - "@babel/helper-validator-identifier" "^7.15.7" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.12.5", "@babel/parser@^7.13.16": - version "7.13.16" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.13.16.tgz" - -"@babel/parser@^7.16.0", "@babel/parser@^7.16.5", "@babel/parser@^7.7.2": - version "7.16.6" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz" - integrity sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ== - -"@babel/parser@^7.16.7": - version "7.16.12" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.16.12.tgz" - integrity sha512-VfaV15po8RiZssrkPweyvbGVSe4x2y+aciFCgn0n0/SJMR22cwofRV1mtnJQYcSB1wUTaA/X1LnA3es66MCO5A== - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.16.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.5.tgz" - integrity sha512-/d4//lZ1Vqb4mZ5xTep3dDK888j7BGM/iKqBmndBaoYAFPlPKrGU608VVBz5JeyAb6YQDjRu1UKqj86UhwWVgw== - dependencies: - "@babel/helper-plugin-utils" "^7.16.5" - -"@babel/runtime-corejs3@^7.10.2": - version "7.13.17" - resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.13.17.tgz" - dependencies: - core-js-pure "^3.0.0" - regenerator-runtime "^0.13.4" - -"@babel/runtime@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.0.tgz#49dcbcd637099a55d3a61e590a00d6861393b1b5" - integrity sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.7", "@babel/runtime@^7.7.2", "@babel/runtime@^7.9.2": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa" - integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.17.9", "@babel/runtime@^7.6.2": - version "7.18.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.3.tgz#c7b654b57f6f63cf7f8b418ac9ca04408c4579f4" - integrity sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/template@^7.12.13", "@babel/template@^7.3.3": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz" - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/parser" "^7.12.13" - "@babel/types" "^7.12.13" - -"@babel/template@^7.14.5": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz" - integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== - dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/parser" "^7.16.7" - "@babel/types" "^7.16.7" - -"@babel/template@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz" - integrity sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A== - dependencies: - "@babel/code-frame" "^7.16.0" - "@babel/parser" "^7.16.0" - "@babel/types" "^7.16.0" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.13.13", "@babel/traverse@^7.13.15", "@babel/traverse@^7.13.17": - version "7.13.17" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.17.tgz" - dependencies: - "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.16" - "@babel/helper-function-name" "^7.12.13" - "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.13.16" - "@babel/types" "^7.13.17" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.16.5", "@babel/traverse@^7.7.2": - version "7.16.5" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz" - integrity sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ== - dependencies: - "@babel/code-frame" "^7.16.0" - "@babel/generator" "^7.16.5" - "@babel/helper-environment-visitor" "^7.16.5" - "@babel/helper-function-name" "^7.16.0" - "@babel/helper-hoist-variables" "^7.16.0" - "@babel/helper-split-export-declaration" "^7.16.0" - "@babel/parser" "^7.16.5" - "@babel/types" "^7.16.0" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.13.14", "@babel/types@^7.13.16", "@babel/types@^7.13.17", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.13.17" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.13.17.tgz" - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - to-fast-properties "^2.0.0" - -"@babel/types@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz" - integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg== - dependencies: - "@babel/helper-validator-identifier" "^7.15.7" - to-fast-properties "^2.0.0" - -"@babel/types@^7.16.7": - version "7.16.8" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz" - integrity sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg== - dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - to-fast-properties "^2.0.0" - -"@bcoe/v8-coverage@^0.2.3": - 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.6.3": - version "3.6.3" - resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-3.6.3.tgz#994ff59a7b48ae20a0500be5c7fad9a1f68ace11" - integrity sha512-yQAAaMkBuhkQtNNDJTeIFzDFfduRF2XJfHM/pmAO7xkP9jLBMKCy1OVGMbY271ZL3eSC1ENQIS7OF6CJ6ONdnA== - 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.43.5" - 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/voter-stake-registry-client@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@blockworks-foundation/voter-stake-registry-client/-/voter-stake-registry-client-0.2.3.tgz#2d3f537c19635d1bdcf64ba00721dbaf98abc847" - integrity sha512-SS2cFXfVHI1dcN3zBE3MkqcXNe+47KVrk3JOiDgw2VbagxllZDAUKZRW8666HwUfmJSogVFyDwJvJD/WSBbXtQ== - dependencies: - "@project-serum/anchor" "^0.24.2" - "@project-serum/serum" "^0.13.61" - -"@cardinal/certificates@^1.2.3", "@cardinal/certificates@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@cardinal/certificates/-/certificates-1.3.0.tgz#32961546de819d0491b6fce633b63c55002d51ea" - integrity sha512-UmCxerq++uzcts4TJlh2Dtrq5wuZvM16pISmjrC4N24IYKle/9GIKc4+rwKwJjeAcaBsM0CDGUITQjH/JnanwA== - dependencies: - "@project-serum/anchor" "0.20.1" - "@saberhq/solana-contrib" "^1.12.23" - "@solana/spl-token" "^0.1.8" - typescript "^4.5.4" - -"@cardinal/namespaces-components@2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@cardinal/namespaces-components/-/namespaces-components-2.5.0.tgz#9eb7238faab8ede3d08edf4625c093d14a96b4d8" - integrity sha512-Xv9oQX8ewpx6Xta/oVm4wNFRET+btlHzKlEVFUp7FlvEzm50ncOPq2+Uxzg/SV72XvzzxMH5X3wC1JipQC9djw== - dependencies: - "@cardinal/certificates" "^1.3.0" - "@cardinal/namespaces" "^3.1.0" - "@emotion/react" "^11.7.1" - "@emotion/styled" "^11.6.0" - "@metaplex/js" "^4.2.1" - "@project-serum/anchor" "^0.20.1" - "@reach/dialog" "^0.16.2" - "@react-spring/web" "^9.4.2" - "@saberhq/solana-contrib" "^1.12.26" - "@saberhq/use-solana" "^1.12.26" - "@solana/buffer-layout" "^4.0.0" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - "@types/react" "^17.0.38" - polished "^4.1.3" - react "^17.0.2" - react-content-loader "^6.1.0" - react-device-detect "^2.1.2" - react-icons "^4.3.1" - react-use-gesture "^9.1.3" - twin.macro "^2.8.2" - typescript "^4.1.2" - -"@cardinal/namespaces-components@^2.5.5": - version "2.5.5" - resolved "https://registry.yarnpkg.com/@cardinal/namespaces-components/-/namespaces-components-2.5.5.tgz#40a4417ea751af91d1ce21163e3a26c4ca554abb" - integrity sha512-rMckp4Rravsp1AH3lc7Ub+O3PLjIBKvbx7JPlMIpAerMggZ2PzenB2DYJrpRMjdtNFTpWdtHririNvvIXGUrnA== - dependencies: - "@cardinal/certificates" "^1.3.0" - "@cardinal/namespaces" "^3.1.0" - "@emotion/react" "^11.7.1" - "@emotion/styled" "^11.6.0" - "@metaplex/js" "^4.2.1" - "@project-serum/anchor" "^0.20.1" - "@reach/dialog" "^0.16.2" - "@react-spring/web" "^9.4.2" - "@saberhq/solana-contrib" "^1.12.26" - "@saberhq/use-solana" "^1.12.26" - "@solana/buffer-layout" "^4.0.0" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - polished "^4.1.3" - react-content-loader "^6.1.0" - react-device-detect "^2.1.2" - react-icons "^4.3.1" - react-use-gesture "^9.1.3" - twin.macro "^2.8.2" - typescript "^4.1.2" - -"@cardinal/namespaces@^2.0.42": - version "2.0.59" - resolved "https://registry.npmjs.org/@cardinal/namespaces/-/namespaces-2.0.59.tgz" - integrity sha512-2waZMfLyzAKi5y7bWBPzuqP/FDSjLS5u9VhsBLfEQbNOR3BHmHrSwrYPpAfV+IrULNBSSg8jobxoD5b94C3GEQ== - dependencies: - "@cardinal/certificates" "^1.2.3" - "@cardinal/namespaces" "^2.0.42" - "@metaplex-foundation/mpl-token-metadata" "^0.0.2" - "@project-serum/anchor" "^0.20.1" - "@saberhq/solana-contrib" "^1.12.23" - "@solana/spl-token" "^0.1.8" - typescript "^4.5.4" - -"@cardinal/namespaces@^3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@cardinal/namespaces/-/namespaces-3.1.0.tgz" - integrity sha512-eX44mI0EFZrzvIHKGS/j0iUJPmCrl1av89jfSqWf6ldYYwLyENQysyOQv2az718pbJd9H5IQb+kJX0JLlQCo/w== - dependencies: - "@cardinal/certificates" "^1.2.3" - "@cardinal/namespaces" "^2.0.42" - "@metaplex-foundation/mpl-token-metadata" "^0.0.2" - "@project-serum/anchor" "^0.20.1" - "@saberhq/solana-contrib" "^1.12.23" - "@solana/spl-token" "^0.1.8" - typescript "^4.5.4" - -"@castlefinance/vault-core@^0.1.0", "@castlefinance/vault-core@^0.1.3": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@castlefinance/vault-core/-/vault-core-0.1.5.tgz#984da02fc4ca1270359c9c3283243658905eb562" - integrity sha512-Evq4CslcF5wsnMpd0oTGq4iNfjqprut25GQTQFI6mCTITFtrCa7G7cprw9jaBSXlyX/fpa3LI799VtPhrCoViA== - -"@castlefinance/vault-sdk@^2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@castlefinance/vault-sdk/-/vault-sdk-2.1.2.tgz#7006fb3c1807be2ef3db0599cf154da0513f15f2" - integrity sha512-EIKsJm8jUJqcflE2la1jvh/rkOfD3vVI07uMW9yEJ0PmzKUX7QX6PGXnENmnfqzy5NjZ5a6gTw7gOrhRuK4Ofg== - dependencies: - "@castlefinance/vault-core" "^0.1.0" - "@jet-lab/jet-engine" "^0.2.15" - "@port.finance/port-sdk" "^0.2.33" - "@project-serum/anchor" "0.18.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - "@solendprotocol/solend-sdk" "^0.4.4" - big.js "^6.1.1" - bigint-buffer "^1.1.5" - buffer-layout "^1.2.2" - -"@colors/colors@1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" - integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== - -"@cspotcode/source-map-consumer@0.8.0": - version "0.8.0" - resolved "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz" - integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== - -"@cspotcode/source-map-support@0.7.0": - version "0.7.0" - resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz" - integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== - dependencies: - "@cspotcode/source-map-consumer" "0.8.0" - -"@csstools/convert-colors@^1.4.0": - version "1.4.0" - resolved "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz" - -"@dialectlabs/react-ui@0.8.2": - version "0.8.2" - resolved "https://registry.yarnpkg.com/@dialectlabs/react-ui/-/react-ui-0.8.2.tgz#010fc1a49f4b1b022e0f4b587b51fb16874e8ba9" - integrity sha512-h6vr4p0NKY8kH2eJf3i1D2gU79jMoemBcaA3X78bCwTGlUDVXfxL9OO6fyayAQbYOwjj7oV+N3DF+ArfTEfo3A== - dependencies: - "@cardinal/namespaces-components" "2.5.0" - "@dialectlabs/web3" "^0.3.1" - "@headlessui/react" "^1.2.0" - "@project-serum/anchor" "^0.23.0" - clsx "^1.1.1" - focus-visible "^5.2.0" - react-linkify "^1.0.0-alpha" - react-media-hook "^0.4.9" - swr "^0.5.6" - -"@dialectlabs/react@0.5.1": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@dialectlabs/react/-/react-0.5.1.tgz#7c8e63a33d72458c89aa3535d3160f277ce739bd" - integrity sha512-YESGQp+oyRlX0RE3n3/CT9sPwwbPlwrEg+H7j8NxT6duB0kHYelnRCpMPOB/0tIZpcSxq0IO5Vt4NsJPYVgn0A== - dependencies: - "@dialectlabs/web3" "^0.3.1" - "@project-serum/anchor" "^0.23.0" - "@solana/web3.js" "1.38.0" - object-hash "^3.0.0" - swr "^0.5.6" - unfetch "^4.2.0" - -"@dialectlabs/web3@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@dialectlabs/web3/-/web3-0.3.1.tgz#8332c61a4cefd01ce789239bbcbb63f42941960b" - integrity sha512-h/KldrvI5OX0+m2SVrbswVAhFIJX70t1LAcdWkpKn/oX6jCdPzBTzoYJCwCkcMboknMzpbU1tAtKT8dP3Y0OMA== - dependencies: - "@project-serum/anchor" "0.23.0" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.22.0" - bytebuffer "^5.0.1" - copy-to-clipboard "^3.3.1" - ed2curve "0.3.0" - js-sha256 "^0.9.0" - tweetnacl "1.0.3" - -"@emotion/babel-plugin@^11.7.1": - version "11.7.2" - resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.7.2.tgz#fec75f38a6ab5b304b0601c74e2a5e77c95e5fa0" - integrity sha512-6mGSCWi9UzXut/ZAN6lGFu33wGR3SJisNl3c0tvlmb8XChH1b2SUvxvnOh7hvLpqyRdHHU9AiazV3Cwbk5SXKQ== - dependencies: - "@babel/helper-module-imports" "^7.12.13" - "@babel/plugin-syntax-jsx" "^7.12.13" - "@babel/runtime" "^7.13.10" - "@emotion/hash" "^0.8.0" - "@emotion/memoize" "^0.7.5" - "@emotion/serialize" "^1.0.2" - babel-plugin-macros "^2.6.1" - convert-source-map "^1.5.0" - escape-string-regexp "^4.0.0" - find-root "^1.1.0" - source-map "^0.5.7" - stylis "4.0.13" - -"@emotion/cache@^11.7.1": - version "11.7.1" - resolved "https://registry.npmjs.org/@emotion/cache/-/cache-11.7.1.tgz" - integrity sha512-r65Zy4Iljb8oyjtLeCuBH8Qjiy107dOYC6SJq7g7GV5UCQWMObY4SJDPGFjiiVpPrOJ2hmJOoBiYTC7hwx9E2A== - dependencies: - "@emotion/memoize" "^0.7.4" - "@emotion/sheet" "^1.1.0" - "@emotion/utils" "^1.0.0" - "@emotion/weak-memoize" "^0.2.5" - stylis "4.0.13" - -"@emotion/hash@^0.8.0": - version "0.8.0" - resolved "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz" - -"@emotion/is-prop-valid@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.1.2.tgz#34ad6e98e871aa6f7a20469b602911b8b11b3a95" - integrity sha512-3QnhqeL+WW88YjYbQL5gUIkthuMw7a0NGbZ7wfFVk2kg/CK5w8w5FFa0RzWjyY1+sujN0NWbtSHH6OJmWHtJpQ== - dependencies: - "@emotion/memoize" "^0.7.4" - -"@emotion/memoize@^0.7.4", "@emotion/memoize@^0.7.5": - version "0.7.5" - resolved "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz" - -"@emotion/react@^11.7.1", "@emotion/react@^11.9.0": - version "11.9.0" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.9.0.tgz#b6d42b1db3bd7511e7a7c4151dc8bc82e14593b8" - integrity sha512-lBVSF5d0ceKtfKCDQJveNAtkC7ayxpVlgOohLgXqRwqWr9bOf4TZAFFyIcNngnV6xK6X4x2ZeXq7vliHkoVkxQ== - dependencies: - "@babel/runtime" "^7.13.10" - "@emotion/babel-plugin" "^11.7.1" - "@emotion/cache" "^11.7.1" - "@emotion/serialize" "^1.0.3" - "@emotion/utils" "^1.1.0" - "@emotion/weak-memoize" "^0.2.5" - hoist-non-react-statics "^3.3.1" - -"@emotion/serialize@^1.0.2", "@emotion/serialize@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.3.tgz#99e2060c26c6292469fb30db41f4690e1c8fea63" - integrity sha512-2mSSvgLfyV3q+iVh3YWgNlUc2a9ZlDU7DjuP5MjK3AXRR0dYigCrP99aeFtaB2L/hjfEZdSThn5dsZ0ufqbvsA== - dependencies: - "@emotion/hash" "^0.8.0" - "@emotion/memoize" "^0.7.4" - "@emotion/unitless" "^0.7.5" - "@emotion/utils" "^1.0.0" - csstype "^3.0.2" - -"@emotion/sheet@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.1.0.tgz" - integrity sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g== - -"@emotion/styled@^11.6.0", "@emotion/styled@^11.8.1": - version "11.8.1" - resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.8.1.tgz#856f6f63aceef0eb783985fa2322e2bf66d04e17" - integrity sha512-OghEVAYBZMpEquHZwuelXcRjRJQOVayvbmNR0zr174NHdmMgrNkLC6TljKC5h9lZLkN5WGrdUcrKlOJ4phhoTQ== - dependencies: - "@babel/runtime" "^7.13.10" - "@emotion/babel-plugin" "^11.7.1" - "@emotion/is-prop-valid" "^1.1.2" - "@emotion/serialize" "^1.0.2" - "@emotion/utils" "^1.1.0" - -"@emotion/unitless@^0.7.5": - version "0.7.5" - resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz" - -"@emotion/utils@^1.0.0", "@emotion/utils@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.1.0.tgz#86b0b297f3f1a0f2bdb08eeac9a2f49afd40d0cf" - integrity sha512-iRLa/Y4Rs5H/f2nimczYmS5kFJEbpiVvgN3XVfZ022IYhuNA1IRSHEizcof88LtCTXtl9S2Cxt32KgaXEu72JQ== - -"@emotion/weak-memoize@^0.2.5": - version "0.2.5" - resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz" - -"@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.2" - globals "^13.15.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@ethersproject/bytes@^5.5.0": - version "5.5.0" - resolved "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.5.0.tgz" - integrity sha512-ABvc7BHWhZU9PNM/tANm/Qx4ostPGadAuQzWTr3doklZOhDlmcBqclrQe/ZXUIj3K8wC28oYeuRa+A37tX9kog== - dependencies: - "@ethersproject/logger" "^5.5.0" - -"@ethersproject/logger@^5.5.0": - version "5.5.0" - resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.5.0.tgz" - integrity sha512-rIY/6WPm7T8n3qS2vuHTUBPdXHl+rGxWxW5okDfo9J4Z0+gRRZT0msvUdIJkE4/HS29GUMziwGaaKO2bWONBrg== - -"@ethersproject/sha2@^5.5.0": - version "5.5.0" - resolved "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.5.0.tgz" - integrity sha512-B5UBoglbCiHamRVPLA110J+2uqsifpZaTmid2/7W5rbtYVz6gus6/hSDieIU/6gaKIDcOj12WnOdiymEUHIAOA== - dependencies: - "@ethersproject/bytes" "^5.5.0" - "@ethersproject/logger" "^5.5.0" - hash.js "1.1.7" - -"@fast-csv/format@4.3.5": - version "4.3.5" - resolved "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz" - integrity sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A== - dependencies: - "@types/node" "^14.0.1" - lodash.escaperegexp "^4.1.2" - lodash.isboolean "^3.0.3" - lodash.isequal "^4.5.0" - lodash.isfunction "^3.0.9" - lodash.isnil "^4.0.0" - -"@fast-csv/parse@4.3.6": - version "4.3.6" - resolved "https://registry.npmjs.org/@fast-csv/parse/-/parse-4.3.6.tgz" - integrity sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA== - dependencies: - "@types/node" "^14.0.1" - lodash.escaperegexp "^4.1.2" - lodash.groupby "^4.6.0" - lodash.isfunction "^3.0.9" - lodash.isnil "^4.0.0" - lodash.isundefined "^3.0.1" - lodash.uniq "^4.5.0" - -"@foresight-tmp/foresight-sdk@^0.1.46": - version "0.1.46" - resolved "https://registry.yarnpkg.com/@foresight-tmp/foresight-sdk/-/foresight-sdk-0.1.46.tgz#f928dde22f424cfd438f8c9116d5ce84f5b56864" - integrity sha512-fqYnT+OrRDe84OWoDGow4KB5KYX/sRP+jg0Ylz0ExdNqoewK8gLmmAg6AvPc+B9ItAhcDhEBf0H/cGG6HpIQdw== - dependencies: - "@project-serum/anchor" "^0.23.0" - "@project-serum/serum" "0.13.64" - "@solana/web3.js" "^1.37.1" - assert "^2.0.0" - axios "^0.24.0" - buffer-layout "^1.2.2" - lodash "^4.17.21" - process "^0.11.10" - -"@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" - "@project-serum/serum" "0.13.55" - "@project-serum/sol-wallet-adapter" "^0.2.0" - "@solana/spl-token" "^0.1.6" - "@solana/web3.js" "^1.21.0" - axios "^0.25.0" - big.js "^6.1.1" - bn.js "^5.2.0" - buffer-layout "^1.2.1" - dotenv "^10.0.0" - dotenv-expand "^6.0.1" - yargs "^17.0.1" - -"@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: - "@blockworks-foundation/mango-client" "3.4.5" - "@friktion-labs/entropy-client" "^1.7.3" - "@oclif/command" "^1.8.16" - "@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.12.53" - "@saberhq/solana-contrib" "1.12.53" - "@saberhq/token-utils" "1.12.53" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.42.0" - "@switchboard-xyz/switchboard-v2" "^0.0.34" - bn.js "^5.2.1" - csv-parse "^5.0.4" - decimal.js "^10.3.1" - fast-csv "^4.3.6" - superagent "^7.1.3" - -"@gar/promisify@^1.0.1": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" - integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== - -"@hapi/hoek@^9.0.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" - integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== - -"@hapi/topo@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" - integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@headlessui/react@^1.2.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.5.0.tgz#483b44ba2c8b8d4391e1d2c863898d7dd0cc0296" - integrity sha512-aaRnYxBb3MU2FNJf3Ut9RMTUqqU3as0aI1lQhgo2n9Fa67wRu14iOGqx93xB+uMNVfNwZ5B3y/Ndm7qZGuFeMQ== - -"@headlessui/react@^1.6.4": - version "1.6.4" - resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.6.4.tgz#c73084e23386bef5fb86cd16da3352c3a844bb4c" - integrity sha512-0yqz1scwbFtwljmbbKjXsSGl5ABEYNICVHZnMCWo0UtOZodo2Tpu94uOVgCRjRZ77l2WcTi2S0uidINDvG7lsA== - -"@heroicons/react@^1.0.1": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-1.0.6.tgz#35dd26987228b39ef2316db3b1245c42eb19e324" - integrity sha512-JJCXydOFWMDpCP4q13iEplA503MQO3xLoZiKum+955ZCtHINWnx26CUxVxxFQu/uLb4LW3ge15ZpzIkXKkJ8oQ== - -"@hookform/resolvers@^2.8.10": - version "2.8.10" - resolved "https://registry.yarnpkg.com/@hookform/resolvers/-/resolvers-2.8.10.tgz#b66d7a7848b1b1dd5b976a73fff36bb366666e7d" - integrity sha512-DDFtNlugsbwAhCJHYp3NcN5LvJrwSsCLPi41Wo5O8UAIbUFnBfY/jW+zKnlX57BZ4jE0j/g6R9rB3JlO89ad0g== - -"@humanwhocodes/config-array@^0.9.2": - version "0.9.2" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz" - integrity sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.4" - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@isaacs/string-locale-compare@^1.0.1", "@isaacs/string-locale-compare@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz" - integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - -"@jest/console@^27.4.2": - version "27.4.2" - resolved "https://registry.npmjs.org/@jest/console/-/console-27.4.2.tgz" - integrity sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg== - dependencies: - "@jest/types" "^27.4.2" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^27.4.2" - jest-util "^27.4.2" - slash "^3.0.0" - -"@jest/core@^27.4.5": - version "27.4.5" - resolved "https://registry.npmjs.org/@jest/core/-/core-27.4.5.tgz" - integrity sha512-3tm/Pevmi8bDsgvo73nX8p/WPng6KWlCyScW10FPEoN1HU4pwI83tJ3TsFvi1FfzsjwUlMNEPowgb/rPau/LTQ== - dependencies: - "@jest/console" "^27.4.2" - "@jest/reporters" "^27.4.5" - "@jest/test-result" "^27.4.2" - "@jest/transform" "^27.4.5" - "@jest/types" "^27.4.2" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.8.1" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-changed-files "^27.4.2" - jest-config "^27.4.5" - jest-haste-map "^27.4.5" - jest-message-util "^27.4.2" - jest-regex-util "^27.4.0" - jest-resolve "^27.4.5" - jest-resolve-dependencies "^27.4.5" - jest-runner "^27.4.5" - jest-runtime "^27.4.5" - jest-snapshot "^27.4.5" - jest-util "^27.4.2" - jest-validate "^27.4.2" - jest-watcher "^27.4.2" - micromatch "^4.0.4" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^27.4.4": - version "27.4.4" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-27.4.4.tgz" - integrity sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ== - dependencies: - "@jest/fake-timers" "^27.4.2" - "@jest/types" "^27.4.2" - "@types/node" "*" - jest-mock "^27.4.2" - -"@jest/fake-timers@^27.4.2": - version "27.4.2" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz" - integrity sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg== - dependencies: - "@jest/types" "^27.4.2" - "@sinonjs/fake-timers" "^8.0.1" - "@types/node" "*" - jest-message-util "^27.4.2" - jest-mock "^27.4.2" - jest-util "^27.4.2" - -"@jest/globals@^27.4.4": - version "27.4.4" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-27.4.4.tgz" - integrity sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ== - dependencies: - "@jest/environment" "^27.4.4" - "@jest/types" "^27.4.2" - expect "^27.4.2" - -"@jest/reporters@^27.4.5": - version "27.4.5" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.5.tgz" - integrity sha512-3orsG4vi8zXuBqEoy2LbnC1kuvkg1KQUgqNxmxpQgIOQEPeV0onvZu+qDQnEoX8qTQErtqn/xzcnbpeTuOLSiA== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.4.2" - "@jest/test-result" "^27.4.2" - "@jest/transform" "^27.4.5" - "@jest/types" "^27.4.2" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.2.4" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^4.0.3" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - jest-haste-map "^27.4.5" - jest-resolve "^27.4.5" - jest-util "^27.4.2" - jest-worker "^27.4.5" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^8.1.0" - -"@jest/source-map@^27.4.0": - version "27.4.0" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz" - integrity sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.2.4" - source-map "^0.6.0" - -"@jest/test-result@^27.4.2": - version "27.4.2" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.2.tgz" - integrity sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA== - dependencies: - "@jest/console" "^27.4.2" - "@jest/types" "^27.4.2" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^27.4.5": - version "27.4.5" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.5.tgz" - integrity sha512-n5woIn/1v+FT+9hniymHPARA9upYUmfi5Pw9ewVwXCDlK4F5/Gkees9v8vdjGdAIJ2MPHLHodiajLpZZanWzEQ== - dependencies: - "@jest/test-result" "^27.4.2" - graceful-fs "^4.2.4" - jest-haste-map "^27.4.5" - jest-runtime "^27.4.5" - -"@jest/transform@^27.4.5": - version "27.4.5" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-27.4.5.tgz" - integrity sha512-PuMet2UlZtlGzwc6L+aZmR3I7CEBpqadO03pU40l2RNY2fFJ191b9/ITB44LNOhVtsyykx0OZvj0PCyuLm7Eew== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.4.2" - babel-plugin-istanbul "^6.0.0" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.4" - jest-haste-map "^27.4.5" - jest-regex-util "^27.4.0" - jest-util "^27.4.2" - micromatch "^4.0.4" - pirates "^4.0.1" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" - -"@jest/types@^26.6.2": - version "26.6.2" - resolved "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz" - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - -"@jest/types@^27.4.2": - version "27.4.2" - resolved "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz" - integrity sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - -"@jet-lab/jet-engine@^0.2.15": - version "0.2.50" - resolved "https://registry.yarnpkg.com/@jet-lab/jet-engine/-/jet-engine-0.2.50.tgz#55dc001018a0eb012940e21563a2c40582352eeb" - integrity sha512-N73kuVmJiPoQUTAVTHX88qRVQp2w3YBhHWj089AYCx/Ao8xxHea5LggZVP/NYM+dji/13BKeCeoUoUo2S9tUGA== - dependencies: - "@project-serum/anchor" "^0.23.0" - "@project-serum/serum" "^0.13.60" - "@pythnetwork/client" "^2.5.1" - "@solana/buffer-layout" "^4.0.0" - "@solana/buffer-layout-utils" "^0.2.0" - "@solana/spl-governance" "^0.0.29" - "@solana/spl-token" "^0.2.0" - "@solana/web3.js" "^1.36.0" - eventemitter3 "^4.0.7" - lodash "^4.17.21" - react "^17.0.0" - react-dom "^17.0.0" - -"@ledgerhq/devices@^6.20.0": - version "6.20.0" - resolved "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.20.0.tgz" - integrity sha512-WehM7HGdb+nSUzyUlz1t2qJ8Tg4I+rQkOJJsx0/Dpjkx6/+1hHcX6My/apPuwh39qahqwYhjszq0H1YzGDS0Yg== - dependencies: - "@ledgerhq/errors" "^6.10.0" - "@ledgerhq/logs" "^6.10.0" - rxjs "6" - semver "^7.3.5" - -"@ledgerhq/errors@^6.10.0": - version "6.10.0" - resolved "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz" - integrity sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg== - -"@ledgerhq/hw-transport-webusb@^6.20.0": - version "6.20.0" - resolved "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.20.0.tgz" - integrity sha512-7rtgOEuEZ7/O5JofcglUVck7RXH5D8vS3zP5SjPURhvSFiJVGrtOVS+Qna7gXqGdkesDcNF0xBkwme+67n4Imw== - dependencies: - "@ledgerhq/devices" "^6.20.0" - "@ledgerhq/errors" "^6.10.0" - "@ledgerhq/hw-transport" "^6.20.0" - "@ledgerhq/logs" "^6.10.0" - -"@ledgerhq/hw-transport@^6.20.0": - version "6.20.0" - resolved "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.20.0.tgz" - integrity sha512-5KS0Y6CbWRDOv3FgNIfk53ViQOIZqMxAw0RuOexreW5GMwuYfK7ddGi4142qcu7YrxkGo7cNe42wBbx1hdXl0Q== - dependencies: - "@ledgerhq/devices" "^6.20.0" - "@ledgerhq/errors" "^6.10.0" - events "^3.3.0" - -"@ledgerhq/logs@^6.10.0": - version "6.10.0" - resolved "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz" - integrity sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw== - -"@marinade.finance/marinade-ts-sdk@^2.0.9": - version "2.0.9" - resolved "https://registry.npmjs.org/@marinade.finance/marinade-ts-sdk/-/marinade-ts-sdk-2.0.9.tgz" - integrity sha512-teXINCXLTfspXzwNKDtfluZ/wvKBQmcQH2j7SNcFAbJzK6NYo3RdYALu4IHIXMwLs9hEs7XZU8AsKKh+HSLPLA== - dependencies: - "@project-serum/anchor" "^0.18.2" - "@solana/spl-token" "^0.1.8" - borsh "^0.6.0" - -"@metaplex-foundation/mpl-auction@^0.0.2": - version "0.0.2" - resolved "https://registry.npmjs.org/@metaplex-foundation/mpl-auction/-/mpl-auction-0.0.2.tgz" - integrity sha512-4UDDi8OiQr+D6KrCNTRrqf/iDD6vi5kzRtMRtuNpywTyhX9hnbr1Zkc6Ncncbh9GZhbhcn+/h5wHgzh+xA6TnQ== - dependencies: - "@metaplex-foundation/mpl-core" "^0.0.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - -"@metaplex-foundation/mpl-core@^0.0.2": - version "0.0.2" - resolved "https://registry.npmjs.org/@metaplex-foundation/mpl-core/-/mpl-core-0.0.2.tgz" - integrity sha512-UUJ4BlYiWdDegAWmjsNQiNehwYU3QfSFWs3sv4VX0J6/ZrQ28zqosGhQ+I2ZCTEy216finJ82sZWNjuwSWCYyQ== - dependencies: - "@solana/web3.js" "^1.31.0" - bs58 "^4.0.1" - -"@metaplex-foundation/mpl-metaplex@^0.0.5": - version "0.0.5" - resolved "https://registry.npmjs.org/@metaplex-foundation/mpl-metaplex/-/mpl-metaplex-0.0.5.tgz" - integrity sha512-VRt3fiO/7/jcHwN+gWvTtpp+7wYhIcEDzMG1lOeV3yYyhz9fAT0E3LqEl2moifNTAopGCE4zYa84JA/OW+1YvA== - dependencies: - "@metaplex-foundation/mpl-auction" "^0.0.2" - "@metaplex-foundation/mpl-core" "^0.0.2" - "@metaplex-foundation/mpl-token-metadata" "^0.0.2" - "@metaplex-foundation/mpl-token-vault" "^0.0.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - -"@metaplex-foundation/mpl-token-metadata@^0.0.2": - version "0.0.2" - resolved "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-0.0.2.tgz" - integrity sha512-yKJPhFlX8MkNbSCi1iwHn4xKmguLK/xFhYa+RuYdL2seuT4CKXHj2CnR2AkcdQj46Za4/nR3jZcRFKq7QlnvBw== - dependencies: - "@metaplex-foundation/mpl-core" "^0.0.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - -"@metaplex-foundation/mpl-token-metadata@^1.2.5": - version "1.2.5" - resolved "https://registry.npmjs.org/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-1.2.5.tgz" - integrity sha512-pxRG53JsTSwXpiJJMHNulJhH8kO3hHztQ3QxslUoKw2hBYKXsg9TGsiHgNIhN2MPZGBJ2pDeK6kNGv0sd54HhA== - dependencies: - "@metaplex-foundation/mpl-core" "^0.0.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - -"@metaplex-foundation/mpl-token-vault@^0.0.2": - version "0.0.2" - resolved "https://registry.npmjs.org/@metaplex-foundation/mpl-token-vault/-/mpl-token-vault-0.0.2.tgz" - integrity sha512-JiVcow8OzUGW0KTs/E1QrAdmYGqE9EGKE6cc2gxNNBYqDeVdjYlgEa64IiGvNF9rvbI2g2Z3jw0mYuA9LD9S/A== - dependencies: - "@metaplex-foundation/mpl-core" "^0.0.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - -"@metaplex/js@^4.2.1": - version "4.11.7" - resolved "https://registry.npmjs.org/@metaplex/js/-/js-4.11.7.tgz" - integrity sha512-/8X04VEHMfWF84H2DZwLY3yg0xq75vgt/VtLuChTm8iUHkj99Whnq0NLTe0OqfhiEV0qFvT5dbLFh7x2CZqrEQ== - dependencies: - "@metaplex-foundation/mpl-auction" "^0.0.2" - "@metaplex-foundation/mpl-core" "^0.0.2" - "@metaplex-foundation/mpl-metaplex" "^0.0.5" - "@metaplex-foundation/mpl-token-metadata" "^0.0.2" - "@metaplex-foundation/mpl-token-vault" "^0.0.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.30.2" - "@types/bs58" "^4.0.1" - axios "^0.25.0" - bn.js "^5.2.0" - borsh "^0.4.0" - bs58 "^4.0.1" - buffer "^6.0.3" - crypto-hash "^1.3.0" - form-data "^4.0.0" - -"@mithraic-labs/serum-remote@^0.0.1-rc.16": - version "0.0.1-rc.16" - resolved "https://registry.yarnpkg.com/@mithraic-labs/serum-remote/-/serum-remote-0.0.1-rc.16.tgz#c7d1d8ed7b2e662dc16712ef34214ff3e5037d1a" - integrity sha512-nGzkVROoWa+DSSUstRVL3R6geXtareYwhjRQBkpCmvB1L9Ll47dVNSu9cWE8JLbfSJeFCElAjJjaLfDey8ZQqQ== - -"@next/bundle-analyzer@^12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/bundle-analyzer/-/bundle-analyzer-12.1.5.tgz#07079b892efe0a2a7e8add703ad7cacfa3cc4e88" - integrity sha512-A9MkhWCPvSp1vl0Ox7IjJ/qpugDC5YAb40btGGIPPXHQtkal107Sf8dbay4fqw4Hekee5gdS0WUMfe1BaSur7w== - dependencies: - webpack-bundle-analyzer "4.3.0" - -"@next/env@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.5.tgz#a21ba6708022d630402ca2b340316e69a0296dfc" - integrity sha512-+34yUJslfJi7Lyx6ELuN8nWcOzi27izfYnZIC1Dqv7kmmfiBVxgzR3BXhlvEMTKC2IRJhXVs2FkMY+buQe3k7Q== - -"@next/swc-android-arm-eabi@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.5.tgz#36729ab3dfd7743e82cfe536b43254dcb146620c" - integrity sha512-SKnGTdYcoN04Y2DvE0/Y7/MjkA+ltsmbuH/y/hR7Ob7tsj+8ZdOYuk+YvW1B8dY20nDPHP58XgDTSm2nA8BzzA== - -"@next/swc-android-arm64@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.1.5.tgz#52578f552305c92d0b9b81d603c9643fb71e0835" - integrity sha512-YXiqgQ/9Rxg1dXp6brXbeQM1JDx9SwUY/36JiE+36FXqYEmDYbxld9qkX6GEzkc5rbwJ+RCitargnzEtwGW0mw== - -"@next/swc-darwin-arm64@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.5.tgz#3d5b53211484c72074f4975ba0ec2b1107db300e" - integrity sha512-y8mhldb/WFZ6lFeowkGfi0cO/lBdiBqDk4T4LZLvCpoQp4Or/NzUN6P5NzBQZ5/b4oUHM/wQICEM+1wKA4qIVw== - -"@next/swc-darwin-x64@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.5.tgz#adcabb732d226453777c0d37d58eaff9328b66fd" - integrity sha512-wqJ3X7WQdTwSGi0kIDEmzw34QHISRIQ5uvC+VXmsIlCPFcMA+zM5723uh8NfuKGquDMiEMS31a83QgkuHMYbwQ== - -"@next/swc-linux-arm-gnueabihf@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.5.tgz#82a7cde67482b756bc65fbebf1dfa8a782074e93" - integrity sha512-WnhdM5duONMvt2CncAl+9pim0wBxDS2lHoo7ub/o/i1bRbs11UTzosKzEXVaTDCUkCX2c32lIDi1WcN2ZPkcdw== - -"@next/swc-linux-arm64-gnu@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.5.tgz#f82ca014504950aab751e81f467492e9be0bad5d" - integrity sha512-Jq2H68yQ4bLUhR/XQnbw3LDW0GMQn355qx6rU36BthDLeGue7YV7MqNPa8GKvrpPocEMW77nWx/1yI6w6J07gw== - -"@next/swc-linux-arm64-musl@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.5.tgz#f811ec9f4b12a978426c284c95ab2f515ddf7f9e" - integrity sha512-KgPjwdbhDqXI7ghNN8V/WAiLquc9Ebe8KBrNNEL0NQr+yd9CyKJ6KqjayVkmX+hbHzbyvbui/5wh/p3CZQ9xcQ== - -"@next/swc-linux-x64-gnu@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.5.tgz#d44857257e6d20dc841998951d584ab1f25772c3" - integrity sha512-O2ErUTvCJ6DkNTSr9pbu1n3tcqykqE/ebty1rwClzIYdOgpB3T2MfEPP+K7GhUR87wmN/hlihO9ch7qpVFDGKw== - -"@next/swc-linux-x64-musl@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.5.tgz#3cc523abadc9a2a6de680593aff06e71cc29ecef" - integrity sha512-1eIlZmlO/VRjxxzUBcVosf54AFU3ltAzHi+BJA+9U/lPxCYIsT+R4uO3QksRzRjKWhVQMRjEnlXyyq5SKJm7BA== - -"@next/swc-win32-arm64-msvc@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.5.tgz#c62232d869f1f9b22e8f24e4e7f05307c20f30ca" - integrity sha512-oromsfokbEuVb0CBLLE7R9qX3KGXucZpsojLpzUh1QJjuy1QkrPJncwr8xmWQnwgtQ6ecMWXgXPB+qtvizT9Tw== - -"@next/swc-win32-ia32-msvc@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.5.tgz#2bd9b28a9ba730d12a493e7d9d18e150fe89d496" - integrity sha512-a/51L5KzBpeZSW9LbekMo3I3Cwul+V+QKwbEIMA+Qwb2qrlcn1L9h3lt8cHqNTFt2y72ce6aTwDTw1lyi5oIRA== - -"@next/swc-win32-x64-msvc@12.1.5": - version "12.1.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.5.tgz#02f377e4d41eaaacf265e34bab9bacd8efc4a351" - integrity sha512-/SoXW1Ntpmpw3AXAzfDRaQidnd8kbZ2oSni8u5z0yw6t4RwJvmdZy1eOaAADRThWKV+2oU90++LSnXJIwBRWYQ== - -"@nfteyez/sol-rayz@^0.10.2": - version "0.10.2" - resolved "https://registry.npmjs.org/@nfteyez/sol-rayz/-/sol-rayz-0.10.2.tgz" - integrity sha512-4lj4WEVZHPHIkyfazcUQIBbjw/jl3SknSseccTmJSFh9IMsy7SoFa5jPYH1OallwZBbGmcJSnslwMv2hgZml6A== - dependencies: - "@solana/spl-name-service" "^0.1.3" - borsh "^0.6.0" - lodash.chunk "^4.2.0" - lodash.orderby "^4.6.0" - -"@nivo/annotations@0.79.1": - version "0.79.1" - resolved "https://registry.yarnpkg.com/@nivo/annotations/-/annotations-0.79.1.tgz#c1b93a1facf55e3f32e2af1b8fb0ba1bebc01910" - integrity sha512-lYso9Luu0maSDtIufwvyVt2+Wue7R9Fh3CIjuRDmNR72UjAgAVEcCar27Fy865UXGsj2hRJZ7KY/1s6kT3gu/w== - dependencies: - "@nivo/colors" "0.79.1" - "@react-spring/web" "9.3.1" - lodash "^4.17.21" - -"@nivo/axes@0.79.0": - version "0.79.0" - resolved "https://registry.yarnpkg.com/@nivo/axes/-/axes-0.79.0.tgz#6f009819b26f93a4126697152aeab5f979f1ab6c" - integrity sha512-EhSeCPxtWEuxqnifeyF/pIJEzL7pRM3rfygL+MpfT5ypu5NcXYRGQo/Bw0Vh+GF1ML+tNAE0rRvCu2jgLSdVNQ== - dependencies: - "@nivo/scales" "0.79.0" - "@react-spring/web" "9.3.1" - d3-format "^1.4.4" - d3-time-format "^3.0.0" - -"@nivo/bar@^0.79.1": - version "0.79.1" - resolved "https://registry.yarnpkg.com/@nivo/bar/-/bar-0.79.1.tgz#42d28169307e735cb84e57b4b6915195ef1c97fb" - integrity sha512-swJ2FtFeRPWJK9O6aZiqTDi2J6GrU2Z6kIHBBCXBlFmq6+vfd5AqOHytdXPTaN80JsKDBBdtY7tqRjpRPlDZwQ== - dependencies: - "@nivo/annotations" "0.79.1" - "@nivo/axes" "0.79.0" - "@nivo/colors" "0.79.1" - "@nivo/legends" "0.79.1" - "@nivo/scales" "0.79.0" - "@nivo/tooltip" "0.79.0" - "@react-spring/web" "9.3.1" - d3-scale "^3.2.3" - d3-shape "^1.2.2" - lodash "^4.17.21" - -"@nivo/colors@0.79.1": - version "0.79.1" - resolved "https://registry.yarnpkg.com/@nivo/colors/-/colors-0.79.1.tgz#0504c08b6a598bc5cb5a8b823d332a73fdc6ef43" - integrity sha512-45huBmz46OoQtfqzHrnqDJ9msebOBX84fTijyOBi8mn8iTDOK2xWgzT7cCYP3hKE58IclkibkzVyWCeJ+rUlqg== - dependencies: - d3-color "^2.0.0" - d3-scale "^3.2.3" - d3-scale-chromatic "^2.0.0" - lodash "^4.17.21" - -"@nivo/core@^0.79.0": - version "0.79.0" - resolved "https://registry.yarnpkg.com/@nivo/core/-/core-0.79.0.tgz#5755212c2058c20899990e7c8ec0e918ac00e5f5" - integrity sha512-e1iGodmGuXkF+QWAjhHVFc+lUnfBoUwaWqVcBXBfebzNc50tTJrTTMHyQczjgOIfTc8gEu23lAY4mVZCDKscig== - dependencies: - "@nivo/recompose" "0.79.0" - "@react-spring/web" "9.3.1" - d3-color "^2.0.0" - d3-format "^1.4.4" - d3-interpolate "^2.0.1" - d3-scale "^3.2.3" - d3-scale-chromatic "^2.0.0" - d3-shape "^1.3.5" - d3-time-format "^3.0.0" - lodash "^4.17.21" - -"@nivo/legends@0.79.1": - version "0.79.1" - resolved "https://registry.yarnpkg.com/@nivo/legends/-/legends-0.79.1.tgz#60b1806bba547f796e6e5b66943d65153de60c79" - integrity sha512-AoabiLherOAk3/HR/N791fONxNdwNk/gCTJC/6BKUo2nX+JngEYm3nVFmTC1R6RdjwJTeCb9Vtuc4MHA+mcgig== - -"@nivo/recompose@0.79.0": - version "0.79.0" - resolved "https://registry.yarnpkg.com/@nivo/recompose/-/recompose-0.79.0.tgz#c0c54ecabb2300ce672f3c3199f74629df33cc08" - integrity sha512-2GFnOHfA2jzTOA5mdKMwJ6myCRGoXQQbQvFFQ7B/+hnHfU/yrOVpiGt6TPAn3qReC4dyDYrzy1hr9UeQh677ig== - dependencies: - react-lifecycles-compat "^3.0.4" - -"@nivo/scales@0.79.0": - version "0.79.0" - resolved "https://registry.yarnpkg.com/@nivo/scales/-/scales-0.79.0.tgz#553b6910288080fbfbbe4d2aab1dd80e2d172e6e" - integrity sha512-5fAt5Wejp8yzAk6qmA3KU+celCxNYrrBhfvOi2ECDG8KQi+orbDnrO6qjVF6+ebfOn9az8ZVukcSeGA5HceiMg== - dependencies: - d3-scale "^3.2.3" - d3-time "^1.0.11" - d3-time-format "^3.0.0" - lodash "^4.17.21" - -"@nivo/tooltip@0.79.0": - version "0.79.0" - resolved "https://registry.yarnpkg.com/@nivo/tooltip/-/tooltip-0.79.0.tgz#3d46be8734e5d30e5387515db0c83bd1c795f442" - integrity sha512-hsJsvhDVR9P/QqIEDIttaA6aslR3tU9So1s/k2jMdppL7J9ZH/IrVx9TbIP7jDKmnU5AMIP5uSstXj9JiKLhQA== - dependencies: - "@react-spring/web" "9.3.1" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@notifi-network/notifi-axios-adapter@^0.12.1": - version "0.12.1" - resolved "https://registry.yarnpkg.com/@notifi-network/notifi-axios-adapter/-/notifi-axios-adapter-0.12.1.tgz#aae412465230b7a3d7e86c93a7d43210568282c6" - integrity sha512-vRVPN1uJHXNrxMzZ1F4OsmwbkytXy2kYBCnq+riRHKIgPykun51LGi5Y2ljW545j1YedtafY4vpPJNmMOhTuFw== - dependencies: - "@notifi-network/notifi-axios-utils" "^0.12.0" - -"@notifi-network/notifi-axios-utils@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@notifi-network/notifi-axios-utils/-/notifi-axios-utils-0.12.0.tgz#4eea3088cab39c9a2c1482e94c9d020296f42339" - integrity sha512-NVyS7x+z5wSLdNOSyxfB7XePZ1sSaSEKVPGEBnJuH5xpXkLBz1o+WlJTkA9/IcQFdSwLeLCdXGEb8jQPSjEWrA== - -"@notifi-network/notifi-core@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@notifi-network/notifi-core/-/notifi-core-0.12.0.tgz#871f16155952f8cdd2e4797ba58fb769b2730c30" - integrity sha512-O9rqcsZ7V6BDjO5nmL1t28QmS29MqTZrG9XAr/yxWD4QuMQyMrqTXyN4ue6GbtEPzzSkAsC9j69BbCrn7plXsQ== - -"@notifi-network/notifi-react-hooks@^0.12.1": - version "0.12.1" - resolved "https://registry.yarnpkg.com/@notifi-network/notifi-react-hooks/-/notifi-react-hooks-0.12.1.tgz#e84dcb751a0f0bbd9ceb2e0378b46014a9570bc7" - integrity sha512-77bxZ/r19023x+yPjzW3LBMYxL4VyP7aR6owak51x76dEUqgi/oqzOh9+YSNXXeTvwr37jhtjYE+DHMVXD+y+g== - dependencies: - "@notifi-network/notifi-axios-adapter" "^0.12.1" - "@notifi-network/notifi-axios-utils" "^0.12.0" - axios "^0.26.0" - localforage "^1.10.0" - typedoc-plugin-missing-exports "^0.22.6" - typescript "^4.5.5" - -"@npmcli/arborist@^2.3.0", "@npmcli/arborist@^2.5.0", "@npmcli/arborist@^2.9.0": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-2.10.0.tgz#424c2d73a7ae59c960b0cc7f74fed043e4316c2c" - integrity sha512-CLnD+zXG9oijEEzViimz8fbOoFVb7hoypiaf7p6giJhvYtrxLAyY3cZAMPIFQvsG731+02eMDp3LqVBNo7BaZA== - dependencies: - "@isaacs/string-locale-compare" "^1.0.1" - "@npmcli/installed-package-contents" "^1.0.7" - "@npmcli/map-workspaces" "^1.0.2" - "@npmcli/metavuln-calculator" "^1.1.0" - "@npmcli/move-file" "^1.1.0" - "@npmcli/name-from-folder" "^1.0.1" - "@npmcli/node-gyp" "^1.0.1" - "@npmcli/package-json" "^1.0.1" - "@npmcli/run-script" "^1.8.2" - bin-links "^2.2.1" - cacache "^15.0.3" - common-ancestor-path "^1.0.1" - json-parse-even-better-errors "^2.3.1" - json-stringify-nice "^1.1.4" - mkdirp "^1.0.4" - mkdirp-infer-owner "^2.0.0" - npm-install-checks "^4.0.0" - npm-package-arg "^8.1.5" - npm-pick-manifest "^6.1.0" - npm-registry-fetch "^11.0.0" - pacote "^11.3.5" - parse-conflict-json "^1.1.1" - proc-log "^1.0.0" - promise-all-reject-late "^1.0.0" - promise-call-limit "^1.0.1" - read-package-json-fast "^2.0.2" - readdir-scoped-modules "^1.1.0" - rimraf "^3.0.2" - semver "^7.3.5" - ssri "^8.0.1" - treeverse "^1.0.4" - walk-up-path "^1.0.0" - -"@npmcli/ci-detect@^1.2.0", "@npmcli/ci-detect@^1.3.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.4.0.tgz#18478bbaa900c37bfbd8a2006a6262c62e8b0fe1" - integrity sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q== - -"@npmcli/config@^2.3.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@npmcli/config/-/config-2.4.0.tgz#1447b0274f9502871dabd3ab1d8302472d515b1f" - integrity sha512-fwxu/zaZnvBJohXM3igzqa3P1IVYWi5N343XcKvKkJbAx+rTqegS5tAul4NLiMPQh6WoS5a4er6oo/ieUx1f4g== - dependencies: - ini "^2.0.0" - mkdirp-infer-owner "^2.0.0" - nopt "^5.0.0" - semver "^7.3.4" - walk-up-path "^1.0.0" - -"@npmcli/disparity-colors@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-1.0.1.tgz" - integrity sha512-kQ1aCTTU45mPXN+pdAaRxlxr3OunkyztjbbxDY/aIcPS5CnCUrx+1+NvA6pTcYR7wmLZe37+Mi5v3nfbwPxq3A== - dependencies: - ansi-styles "^4.3.0" - -"@npmcli/fs@^1.0.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" - integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== - dependencies: - "@gar/promisify" "^1.0.1" - semver "^7.3.5" - -"@npmcli/git@^2.0.7", "@npmcli/git@^2.1.0": - version "2.1.0" - resolved "https://registry.npmjs.org/@npmcli/git/-/git-2.1.0.tgz" - integrity sha512-/hBFX/QG1b+N7PZBFs0bi+evgRZcK9nWBxQKZkGoXUT5hJSwl5c4d7y8/hm+NQZRPhQ67RzFaj5UM9YeyKoryw== - dependencies: - "@npmcli/promise-spawn" "^1.3.2" - lru-cache "^6.0.0" - mkdirp "^1.0.4" - npm-pick-manifest "^6.1.1" - promise-inflight "^1.0.1" - promise-retry "^2.0.1" - semver "^7.3.5" - which "^2.0.2" - -"@npmcli/installed-package-contents@^1.0.6", "@npmcli/installed-package-contents@^1.0.7": - version "1.0.7" - resolved "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz" - integrity sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw== - dependencies: - npm-bundled "^1.1.1" - npm-normalize-package-bin "^1.0.1" - -"@npmcli/map-workspaces@^1.0.2", "@npmcli/map-workspaces@^1.0.4": - version "1.0.4" - resolved "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-1.0.4.tgz" - integrity sha512-wVR8QxhyXsFcD/cORtJwGQodeeaDf0OxcHie8ema4VgFeqwYkFsDPnSrIRSytX8xR6nKPAH89WnwTcaU608b/Q== - dependencies: - "@npmcli/name-from-folder" "^1.0.1" - glob "^7.1.6" - minimatch "^3.0.4" - read-package-json-fast "^2.0.1" - -"@npmcli/metavuln-calculator@^1.1.0": - version "1.1.1" - resolved "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-1.1.1.tgz" - integrity sha512-9xe+ZZ1iGVaUovBVFI9h3qW+UuECUzhvZPxK9RaEA2mjU26o5D0JloGYWwLYvQELJNmBdQB6rrpuN8jni6LwzQ== - dependencies: - cacache "^15.0.5" - pacote "^11.1.11" - semver "^7.3.2" - -"@npmcli/move-file@^1.0.1", "@npmcli/move-file@^1.1.0": - version "1.1.2" - resolved "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz" - integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - -"@npmcli/name-from-folder@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-1.0.1.tgz" - integrity sha512-qq3oEfcLFwNfEYOQ8HLimRGKlD8WSeGEdtUa7hmzpR8Sa7haL1KVQrvgO6wqMjhWFFVjgtrh1gIxDz+P8sjUaA== - -"@npmcli/node-gyp@^1.0.1", "@npmcli/node-gyp@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz#a912e637418ffc5f2db375e93b85837691a43a33" - integrity sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA== - -"@npmcli/package-json@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@npmcli/package-json/-/package-json-1.0.1.tgz" - integrity sha512-y6jnu76E9C23osz8gEMBayZmaZ69vFOIk8vR1FJL/wbEJ54+9aVG9rLTjQKSXfgYZEr50nw1txBBFfBZZe+bYg== - dependencies: - json-parse-even-better-errors "^2.3.1" - -"@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": - version "1.3.2" - resolved "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz" - integrity sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg== - dependencies: - infer-owner "^1.0.4" - -"@npmcli/run-script@^1.8.2", "@npmcli/run-script@^1.8.3", "@npmcli/run-script@^1.8.4", "@npmcli/run-script@^1.8.6": - version "1.8.6" - resolved "https://registry.npmjs.org/@npmcli/run-script/-/run-script-1.8.6.tgz" - integrity sha512-e42bVZnC6VluBZBAFEr3YrdqSspG3bgilyg4nSLBJ7TRGNCzxHa92XAHxQBLYg0BmgwO4b2mf3h/l5EkEWRn3g== - dependencies: - "@npmcli/node-gyp" "^1.0.2" - "@npmcli/promise-spawn" "^1.3.2" - node-gyp "^7.1.0" - read-package-json-fast "^2.0.1" - -"@oclif/command@^1.8.16": - version "1.8.16" - resolved "https://registry.npmjs.org/@oclif/command/-/command-1.8.16.tgz" - integrity sha512-rmVKYEsKzurfRU0xJz+iHelbi1LGlihIWZ7Qvmb/CBz1EkhL7nOkW4SVXmG2dA5Ce0si2gr88i6q4eBOMRNJ1w== - dependencies: - "@oclif/config" "^1.18.2" - "@oclif/errors" "^1.3.5" - "@oclif/help" "^1.0.1" - "@oclif/parser" "^3.8.6" - debug "^4.1.1" - semver "^7.3.2" - -"@oclif/config@1.18.2": - version "1.18.2" - resolved "https://registry.npmjs.org/@oclif/config/-/config-1.18.2.tgz" - integrity sha512-cE3qfHWv8hGRCP31j7fIS7BfCflm/BNZ2HNqHexH+fDrdF2f1D5S8VmXWLC77ffv3oDvWyvE9AZeR0RfmHCCaA== - dependencies: - "@oclif/errors" "^1.3.3" - "@oclif/parser" "^3.8.0" - debug "^4.1.1" - globby "^11.0.1" - is-wsl "^2.1.1" - tslib "^2.0.0" - -"@oclif/config@^1.18.2": - version "1.18.3" - resolved "https://registry.npmjs.org/@oclif/config/-/config-1.18.3.tgz" - integrity sha512-sBpko86IrTscc39EvHUhL+c++81BVTsIZ3ETu/vG+cCdi0N6vb2DoahR67A9FI2CGnxRRHjnTfa3m6LulwNATA== - dependencies: - "@oclif/errors" "^1.3.5" - "@oclif/parser" "^3.8.0" - debug "^4.1.1" - globby "^11.0.1" - is-wsl "^2.1.1" - tslib "^2.3.1" - -"@oclif/errors@1.3.5", "@oclif/errors@^1.3.3", "@oclif/errors@^1.3.5": - version "1.3.5" - resolved "https://registry.npmjs.org/@oclif/errors/-/errors-1.3.5.tgz" - integrity sha512-OivucXPH/eLLlOT7FkCMoZXiaVYf8I/w1eTAM1+gKzfhALwWTusxEx7wBmW0uzvkSg/9ovWLycPaBgJbM3LOCQ== - dependencies: - clean-stack "^3.0.0" - fs-extra "^8.1" - indent-string "^4.0.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -"@oclif/help@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@oclif/help/-/help-1.0.1.tgz" - integrity sha512-8rsl4RHL5+vBUAKBL6PFI3mj58hjPCp2VYyXD4TAa7IMStikFfOH2gtWmqLzIlxAED2EpD0dfYwo9JJxYsH7Aw== - dependencies: - "@oclif/config" "1.18.2" - "@oclif/errors" "1.3.5" - chalk "^4.1.2" - indent-string "^4.0.0" - lodash "^4.17.21" - string-width "^4.2.0" - strip-ansi "^6.0.0" - widest-line "^3.1.0" - wrap-ansi "^6.2.0" - -"@oclif/linewrap@^1.0.0": - version "1.0.0" - resolved "https://registry.npmjs.org/@oclif/linewrap/-/linewrap-1.0.0.tgz" - integrity sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw== - -"@oclif/parser@^3.8.0", "@oclif/parser@^3.8.6": - version "3.8.7" - resolved "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.7.tgz" - integrity sha512-b11xBmIUK+LuuwVGJpFs4LwQN2xj2cBWj2c4z1FtiXGrJ85h9xV6q+k136Hw0tGg1jQoRXuvuBnqQ7es7vO9/Q== - dependencies: - "@oclif/errors" "^1.3.5" - "@oclif/linewrap" "^1.0.0" - chalk "^4.1.0" - tslib "^2.3.1" - -"@polka/url@^1.0.0-next.20": - version "1.0.0-next.21" - resolved "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz" - integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== - -"@popperjs/core@^2.8.3": - version "2.9.3" - resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz" - integrity sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ== - -"@port.finance/port-sdk@^0.2.33": - version "0.2.67" - resolved "https://registry.yarnpkg.com/@port.finance/port-sdk/-/port-sdk-0.2.67.tgz#48ddd27af7b14c956fa6a2941d84edc61eb9c082" - integrity sha512-qm7IHdfP/vhSv41RHveEUsJSBOknPeWYuRwZS5oISwe1kvcOBHkuh/9GuJD24TlE9HaoO+JGq3rpn8YLFjNh8w== - dependencies: - "@project-serum/anchor" "^0.21.0" - "@saberhq/solana-contrib" "^1.12.53" - "@saberhq/token-utils" "^1.12.53" - "@solana/buffer-layout" "^3.0.0" - "@solana/spl-token" "^0.1.8" - "@solana/spl-token-registry" "^0.2.1107" - big.js "^6.1.1" - bignumber.js "^9.0.1" - buffer-layout "1.2.2" - jsbi "^4.1.0" - prettier "^2.4.1" - tiny-invariant "^1.2.0" - typescript "^4.3.5" - -"@project-serum/anchor-cli@^0.18.2": - version "0.18.2" - resolved "https://registry.npmjs.org/@project-serum/anchor-cli/-/anchor-cli-0.18.2.tgz" - integrity sha512-zZvLSa0DvsjsKSK8cU7ENqPB1tQ8WCT6dTY2IaJjWdG0UvXUTri8phnYyF5+Zti+frTdKyggOtI+i1QApOWhRQ== - -"@project-serum/anchor@0.18.2", "@project-serum/anchor@^0.18.0", "@project-serum/anchor@^0.18.2": - version "0.18.2" - resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.18.2.tgz#0f13b5c2046446b7c24cf28763eec90febb28485" - integrity sha512-uyjiN/3Ipp+4hrZRm/hG18HzGLZyvP790LXrCsGO3IWxSl28YRhiGEpKnZycfMW94R7nxdUoE3wY67V+ZHSQBQ== - dependencies: - "@project-serum/borsh" "^0.2.2" - "@solana/web3.js" "^1.17.0" - base64-js "^1.5.1" - bn.js "^5.1.2" - bs58 "^4.0.1" - buffer-layout "^1.2.0" - camelcase "^5.3.1" - 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" - toml "^3.0.0" - -"@project-serum/anchor@0.20.1", "@project-serum/anchor@^0.20.1": - version "0.20.1" - resolved "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.20.1.tgz" - integrity sha512-2TuBmGUn9qeYz6sJINJlElrBuPsaUAtYyUsJ3XplEBf1pczrANAgs5ceJUFzdiqGEWLn+84ObSdBeChT/AXYFA== - dependencies: - "@project-serum/borsh" "^0.2.2" - "@solana/web3.js" "^1.17.0" - base64-js "^1.5.1" - bn.js "^5.1.2" - bs58 "^4.0.1" - buffer-layout "^1.2.2" - camelcase "^5.3.1" - 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" - toml "^3.0.0" - -"@project-serum/anchor@0.23.0", "@project-serum/anchor@^0.23.0": - version "0.23.0" - resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.23.0.tgz#2b2eb6b51601b073e8db26663aa2d6c2f2841771" - integrity sha512-LV2/ifZOJVFTZ4GbEloXln3iVfCvO1YM8i7BBCrUm4tehP7irMx4nr4/IabHWOzrQcQElsxSP/lb1tBp+2ff8A== - dependencies: - "@project-serum/borsh" "^0.2.5" - "@solana/web3.js" "^1.36.0" - base64-js "^1.5.1" - bn.js "^5.1.2" - bs58 "^4.0.1" - buffer-layout "^1.2.2" - camelcase "^5.3.1" - 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" - toml "^3.0.0" - -"@project-serum/anchor@0.24.2", "@project-serum/anchor@^0.24.2": - version "0.24.2" - resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.24.2.tgz#a3c52a99605c80735f446ca9b3a4885034731004" - integrity sha512-0/718g8/DnEuwAidUwh5wLYphUYXhUbiClkuRNhvNoa+1Y8a4g2tJyxoae+emV+PG/Gikd/QUBNMkIcimiIRTA== - dependencies: - "@project-serum/borsh" "^0.2.5" - "@solana/web3.js" "^1.36.0" - base64-js "^1.5.1" - bn.js "^5.1.2" - bs58 "^4.0.1" - buffer-layout "^1.2.2" - camelcase "^5.3.1" - cross-fetch "^3.1.5" - crypto-hash "^1.3.0" - eventemitter3 "^4.0.7" - js-sha256 "^0.9.0" - pako "^2.0.3" - snake-case "^3.0.4" - toml "^3.0.0" - -"@project-serum/anchor@^0.11.1": - version "0.11.1" - resolved "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.11.1.tgz" - integrity sha512-oIdm4vTJkUy6GmE6JgqDAuQPKI7XM4TPJkjtoIzp69RZe0iAD9JP2XHx7lV1jLdYXeYHqDXfBt3zcq7W91K6PA== - dependencies: - "@project-serum/borsh" "^0.2.2" - "@solana/web3.js" "^1.17.0" - base64-js "^1.5.1" - bn.js "^5.1.2" - bs58 "^4.0.1" - buffer-layout "^1.2.0" - camelcase "^5.3.1" - 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" - toml "^3.0.0" - -"@project-serum/anchor@^0.16.2": - version "0.16.2" - resolved "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.16.2.tgz" - integrity sha512-wOJwObd4wOZ5tRRMCKYjeMNsEmf7vuC71KQRnw6wthhErL8c/818n4gYIZCf/1ZPl/8WPruIlmtQHDSEyy2+0Q== - dependencies: - "@project-serum/borsh" "^0.2.2" - "@solana/web3.js" "^1.17.0" - base64-js "^1.5.1" - bn.js "^5.1.2" - bs58 "^4.0.1" - buffer-layout "^1.2.0" - camelcase "^5.3.1" - 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" - toml "^3.0.0" - -"@project-serum/anchor@^0.21.0": - version "0.21.0" - resolved "https://registry.npmjs.org/@project-serum/anchor/-/anchor-0.21.0.tgz" - integrity sha512-flRuW/F+iC8mitNokx82LOXyND7Dyk6n5UUPJpQv/+NfySFrNFlzuQZaBZJ4CG5g9s8HS/uaaIz1nVkDR8V/QA== - dependencies: - "@project-serum/borsh" "^0.2.4" - "@solana/web3.js" "^1.17.0" - base64-js "^1.5.1" - bn.js "^5.1.2" - bs58 "^4.0.1" - buffer-layout "^1.2.2" - camelcase "^5.3.1" - 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" - toml "^3.0.0" - -"@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.36.0" - base64-js "^1.5.1" - bn.js "^5.1.2" - bs58 "^4.0.1" - buffer-layout "^1.2.2" - camelcase "^5.3.1" - cross-fetch "^3.1.5" - crypto-hash "^1.3.0" - eventemitter3 "^4.0.7" - 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": - version "0.2.5" - resolved "https://registry.npmjs.org/@project-serum/borsh/-/borsh-0.2.5.tgz" - integrity sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q== - dependencies: - bn.js "^5.1.2" - buffer-layout "^1.2.0" - -"@project-serum/common@^0.0.1-beta.3": - version "0.0.1-beta.3" - resolved "https://registry.npmjs.org/@project-serum/common/-/common-0.0.1-beta.3.tgz" - integrity sha512-gnQE/eUydTtto5okCgLWj1M97R9RRPJqnhKklikYI7jP/pnNhDmngSXC/dmfzED2GXSJEIKNIlxVw1k+E2Aw3w== - dependencies: - "@project-serum/serum" "^0.13.21" - bn.js "^5.1.2" - superstruct "0.8.3" - -"@project-serum/serum@0.13.55": - version "0.13.55" - resolved "https://registry.yarnpkg.com/@project-serum/serum/-/serum-0.13.55.tgz#2ac44fe7b07651274eb57ac54ea9325789df5dd7" - integrity sha512-SPQ4NsuNbBJO3mLGnTYbjt47WCXoNIcW2C9xv0gNXyG62dxgONsAEEgErKv1gT34hWCMPsXFSpatnX6ppriq7w== - dependencies: - "@project-serum/anchor" "^0.11.1" - "@solana/spl-token" "^0.1.6" - "@solana/web3.js" "^1.21.0" - bn.js "^5.1.2" - buffer-layout "^1.2.0" - -"@project-serum/serum@0.13.64": - version "0.13.64" - resolved "https://registry.yarnpkg.com/@project-serum/serum/-/serum-0.13.64.tgz#d5a9009ded8d2539ebfd12e1ff58b9028cfcdf45" - integrity sha512-33d8K3qcbiFnL1Azv5k6IYMtJYjCqqmFkf95w5W8MPB0A+5zQfOwhEfXQuBw0ExZ8ft5s9Vy8sReLyx0SsINWA== - dependencies: - "@project-serum/anchor" "^0.11.1" - "@solana/spl-token" "^0.1.6" - "@solana/web3.js" "^1.21.0" - bn.js "^5.1.2" - buffer-layout "^1.2.0" - -"@project-serum/serum@^0.13.21", "@project-serum/serum@^0.13.61": - version "0.13.61" - resolved "https://registry.yarnpkg.com/@project-serum/serum/-/serum-0.13.61.tgz#1f0e6dfa7786a71e4317593911e9915d8b2a06e6" - integrity sha512-aebaRGQ0/K7a5kJ9UXO59BAQFJILVu5jbGobU8GD2CTSy6SPceprB6/pgZmZLQIabhXWUHaZRF/wXIClgWataA== - dependencies: - "@project-serum/anchor" "^0.11.1" - "@solana/spl-token" "^0.1.6" - "@solana/web3.js" "^1.21.0" - bn.js "^5.1.2" - buffer-layout "^1.2.0" - -"@project-serum/serum@^0.13.60": - version "0.13.65" - resolved "https://registry.yarnpkg.com/@project-serum/serum/-/serum-0.13.65.tgz#6d3cf07912f13985765237f053cca716fe84b0b0" - integrity sha512-BHRqsTqPSfFB5p+MgI2pjvMBAQtO8ibTK2fYY96boIFkCI3TTwXDt2gUmspeChKO2pqHr5aKevmexzAcXxrSRA== - dependencies: - "@project-serum/anchor" "^0.11.1" - "@solana/spl-token" "^0.1.6" - "@solana/web3.js" "^1.21.0" - bn.js "^5.1.2" - buffer-layout "^1.2.0" - -"@project-serum/sol-wallet-adapter@0.2.0": - version "0.2.0" - resolved "https://registry.npmjs.org/@project-serum/sol-wallet-adapter/-/sol-wallet-adapter-0.2.0.tgz" - dependencies: - bs58 "^4.0.1" - eventemitter3 "^4.0.4" - -"@project-serum/sol-wallet-adapter@^0.2.0", "@project-serum/sol-wallet-adapter@^0.2.6": - version "0.2.6" - resolved "https://registry.npmjs.org/@project-serum/sol-wallet-adapter/-/sol-wallet-adapter-0.2.6.tgz" - integrity sha512-cpIb13aWPW8y4KzkZAPDgw+Kb+DXjCC6rZoH74MGm3I/6e/zKyGnfAuW5olb2zxonFqsYgnv7ev8MQnvSgJ3/g== - dependencies: - bs58 "^4.0.1" - eventemitter3 "^4.0.7" - -"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" - integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== - -"@protobufjs/base64@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" - integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - -"@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== - -"@protobufjs/eventemitter@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" - integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== - -"@protobufjs/fetch@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" - integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== - dependencies: - "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" - -"@protobufjs/float@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" - integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== - -"@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" - integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== - -"@protobufjs/path@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" - integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== - -"@protobufjs/pool@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" - integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== - -"@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" - integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== - -"@pythnetwork/client@^2.5.1": - version "2.5.3" - resolved "https://registry.npmjs.org/@pythnetwork/client/-/client-2.5.3.tgz" - integrity sha512-NBLxPnA6A3tZb/DYUooD4SO63UJ70s9DzzFPGXcQNBR9itcycp7aaV+UA5oUPloD/4UHL9soo2fRuDVur0gmhA== - dependencies: - "@solana/web3.js" "^1.30.2" - assert "^2.0.0" - buffer "^6.0.1" - -"@reach/dialog@^0.16.2": - version "0.16.2" - resolved "https://registry.npmjs.org/@reach/dialog/-/dialog-0.16.2.tgz" - integrity sha512-qq8oX0cROgTb8LjOKWzzNm4SqaN9b89lJHr7UyVo2aQ6WbeNzZBxqXhGywFP7dkR+hNqOJnrA59PXFWhfttA9A== - dependencies: - "@reach/portal" "0.16.2" - "@reach/utils" "0.16.0" - prop-types "^15.7.2" - react-focus-lock "^2.5.2" - react-remove-scroll "^2.4.3" - tslib "^2.3.0" - -"@reach/portal@0.16.2": - version "0.16.2" - resolved "https://registry.npmjs.org/@reach/portal/-/portal-0.16.2.tgz" - integrity sha512-9ur/yxNkuVYTIjAcfi46LdKUvH0uYZPfEp4usWcpt6PIp+WDF57F/5deMe/uGi/B/nfDweQu8VVwuMVrCb97JQ== - dependencies: - "@reach/utils" "0.16.0" - tiny-warning "^1.0.3" - tslib "^2.3.0" - -"@reach/utils@0.16.0": - version "0.16.0" - resolved "https://registry.npmjs.org/@reach/utils/-/utils-0.16.0.tgz" - integrity sha512-PCggBet3qaQmwFNcmQ/GqHSefadAFyNCUekq9RrWoaU9hh/S4iaFgf2MBMdM47eQj5i/Bk0Mm07cP/XPFlkN+Q== - dependencies: - tiny-warning "^1.0.3" - tslib "^2.3.0" - -"@react-spring/animated@~9.3.0": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@react-spring/animated/-/animated-9.3.2.tgz#bda85e92e9e9b6861c259f2dacb54270a37b0f39" - integrity sha512-pBvKydRHbTzuyaeHtxGIOvnskZxGo/S5/YK1rtYm88b9NQZuZa95Rgd3O0muFL+99nvBMBL8cvQGD0UJmsqQsg== - dependencies: - "@react-spring/shared" "~9.3.0" - "@react-spring/types" "~9.3.0" - -"@react-spring/animated@~9.4.0": - version "9.4.2" - resolved "https://registry.npmjs.org/@react-spring/animated/-/animated-9.4.2.tgz" - integrity sha512-Dzum5Ho8e+LIAegAqRyoQFakD2IVH3ZQ2nsFXJorAFq3Xjv6IVPz/+TNxb/wSvnsMludfoF+ZIf319FSFmgD5w== - dependencies: - "@react-spring/shared" "~9.4.0" - "@react-spring/types" "~9.4.0" - -"@react-spring/core@~9.3.0": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@react-spring/core/-/core-9.3.2.tgz#d1dc5810666ac18550db89c58567f28fbe04fb07" - integrity sha512-kMRjkgdQ6LJ0lmb/wQlONpghaMT83UxglXHJC6m9kZS/GKVmN//TYMEK85xN1rC5Gg+BmjG61DtLCSkkLDTfNw== - dependencies: - "@react-spring/animated" "~9.3.0" - "@react-spring/shared" "~9.3.0" - "@react-spring/types" "~9.3.0" - -"@react-spring/core@~9.4.0": - version "9.4.2" - resolved "https://registry.npmjs.org/@react-spring/core/-/core-9.4.2.tgz" - integrity sha512-Ej/ULwdx8rQtMAWEpLgwbKcQEx6vPfjyG3cxLP05zAInpCoWkYpl+sXOp9tn3r99mTNQPTTt7BgQsSnmQA8+rQ== - dependencies: - "@react-spring/animated" "~9.4.0" - "@react-spring/rafz" "~9.4.0" - "@react-spring/shared" "~9.4.0" - "@react-spring/types" "~9.4.0" - -"@react-spring/rafz@~9.3.0": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@react-spring/rafz/-/rafz-9.3.2.tgz#0cbd296cd17bbf1e7e49d3b3616884e026d5fb67" - integrity sha512-YtqNnAYp5bl6NdnDOD5TcYS40VJmB+Civ4LPtcWuRPKDAOa/XAf3nep48r0wPTmkK936mpX8aIm7h+luW59u5A== - -"@react-spring/rafz@~9.4.0": - version "9.4.2" - resolved "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.4.2.tgz" - integrity sha512-rSm+G8E/XEEpnCGtT/xYN6o8VvEXlU8wN/hyKp4Q44XAZzGSMHLIFP7pY94/MmWsxCxjkw1AxUWhiFYxWrnI5Q== - -"@react-spring/shared@~9.3.0": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@react-spring/shared/-/shared-9.3.2.tgz#967ce1d8a16d820a99e6eeb2a8f7ca9311d9dfa0" - integrity sha512-ypGQQ8w7mWnrELLon4h6mBCBxdd8j1pgLzmHXLpTC/f4ya2wdP+0WIKBWXJymIf+5NiTsXgSJra5SnHP5FBY+A== - dependencies: - "@react-spring/rafz" "~9.3.0" - "@react-spring/types" "~9.3.0" - -"@react-spring/shared@~9.4.0": - version "9.4.2" - resolved "https://registry.npmjs.org/@react-spring/shared/-/shared-9.4.2.tgz" - integrity sha512-mZtbQLpMm6Vy5+O1MSlY9KuAcMO8rdUQvtdnC7Or7y7xiZlnzj8oAILyO6Y2rD2ZC1PmgVS0gMev/8T+MykW+Q== - dependencies: - "@react-spring/rafz" "~9.4.0" - "@react-spring/types" "~9.4.0" - -"@react-spring/types@~9.3.0": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@react-spring/types/-/types-9.3.2.tgz#0277d436e50d7a824897dd7bb880f4842fbcd0fe" - integrity sha512-u+IK9z9Re4hjNkBYKebZr7xVDYTai2RNBsI4UPL/k0B6lCNSwuqWIXfKZUDVlMOeZHtDqayJn4xz6HcSkTj3FQ== - -"@react-spring/types@~9.4.0": - version "9.4.2" - resolved "https://registry.npmjs.org/@react-spring/types/-/types-9.4.2.tgz" - integrity sha512-GGiIscTM+CEUNV52anj3g5FqAZKL2+eRKtvBOAlC99qGBbvJ3qTLImrUR/I3lXY7PRuLgzI6kh34quA1oUxWYQ== - -"@react-spring/web@9.3.1": - version "9.3.1" - resolved "https://registry.yarnpkg.com/@react-spring/web/-/web-9.3.1.tgz#5b377ba7ad52e746c2b59e2738c021de3f219d0b" - integrity sha512-sisZIgFGva/Z+xKWPSfXpukF0AP3kR9ALTxlHL87fVotMUCJX5vtH/YlVcywToEFwTHKt3MpI5Wy2M+vgVEeaw== - dependencies: - "@react-spring/animated" "~9.3.0" - "@react-spring/core" "~9.3.0" - "@react-spring/shared" "~9.3.0" - "@react-spring/types" "~9.3.0" - -"@react-spring/web@^9.4.2": - version "9.4.2" - resolved "https://registry.npmjs.org/@react-spring/web/-/web-9.4.2.tgz" - integrity sha512-sWfA9NkVuvVOpjSlMkD2zcF6X3i8NSHTeH/uHCGKsN3mYqgkhvAF+E8GASO/H4KKGNhbRvgCZiwJXOtOGyUg6A== - dependencies: - "@react-spring/animated" "~9.4.0" - "@react-spring/core" "~9.4.0" - "@react-spring/shared" "~9.4.0" - "@react-spring/types" "~9.4.0" - -"@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.53" - eventemitter3 "^4.0.7" - lodash.camelcase "^4.3.0" - lodash.mapvalues "^4.6.0" - tslib "^2.3.1" - -"@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" - "@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.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== - dependencies: - "@types/promise-retry" "^1.1.3" - "@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.12.53", "@saberhq/solana-contrib@^1.13.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@saberhq/solana-contrib/-/solana-contrib-1.13.0.tgz#0e5f360cfbed90e9786d0e89db6589f8c5299bab" - integrity sha512-LNFd1KHQ9GrbeAyF61moTtIt92qC+9bRaP1nHMNyOxjp7Q0sQhBm8QrW8Nez5tz8H3OYB2ZFr7LWvQ+6ddn9fg== - dependencies: - "@solana/buffer-layout" "^4.0.0" - "@types/promise-retry" "^1.1.3" - "@types/retry" "^0.12.2" - promise-retry "^2.0.1" - retry "^0.13.1" - tiny-invariant "^1.2.0" - tslib "^2.4.0" - -"@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.53" - "@solana/buffer-layout" "^4.0.0" - "@solana/spl-token" "^0.1.8" - "@ubeswap/token-math" "^4.4.4" - tiny-invariant "^1.2.0" - tslib "^2.3.1" - -"@saberhq/token-utils@^1.12.53": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@saberhq/token-utils/-/token-utils-1.13.0.tgz#ffafb6a3a38742761a44a831c2f8d70875d6d8a8" - integrity sha512-24GxCywSRqn37Nx8tZ6w9pFjg+/RPUVbxh6pEouSBvB/H5eE3kqt5uitwIpRTIctkNcH+1x0khnEn1evk99HPg== - dependencies: - "@saberhq/solana-contrib" "^1.13.0" - "@solana/buffer-layout" "^4.0.0" - "@solana/spl-token" "^0.1.8" - "@ubeswap/token-math" "^4.4.8" - tiny-invariant "^1.2.0" - tslib "^2.4.0" - -"@saberhq/use-solana@^1.12.26": - version "1.12.35" - resolved "https://registry.npmjs.org/@saberhq/use-solana/-/use-solana-1.12.35.tgz" - integrity sha512-kUUljPOb1fXuynzqVuhe2PrmaUl3lMtfIgljhVJnsO42KshO6QnU+8bv/eqyZ67kxzIzwe6sXH6GAyzuGqK6GA== - dependencies: - "@ledgerhq/hw-transport" "^6.20.0" - "@ledgerhq/hw-transport-webusb" "^6.20.0" - "@saberhq/solana-contrib" "^1.12.35" - "@solana/wallet-adapter-base" "^0.9.2" - "@solana/wallet-adapter-clover" "^0.4.2" - "@solana/wallet-adapter-coin98" "^0.5.2" - "@solana/wallet-adapter-mathwallet" "^0.9.2" - "@solana/wallet-adapter-phantom" "^0.9.2" - "@solana/wallet-adapter-slope" "^0.5.2" - "@solana/wallet-adapter-solflare" "^0.6.2" - "@solana/wallet-adapter-sollet" "^0.10.3" - "@solana/wallet-adapter-solong" "^0.9.2" - bs58 "^4.0.1" - eventemitter3 "^4.0.7" - fast-json-stable-stringify "^2.1.0" - tiny-invariant "^1.2.0" - tslib "^2.3.1" - unstated-next "^1.1.0" - -"@sentry/browser@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/browser/-/browser-6.19.7.tgz#a40b6b72d911b5f1ed70ed3b4e7d4d4e625c0b5f" - integrity sha512-oDbklp4O3MtAM4mtuwyZLrgO1qDVYIujzNJQzXmi9YzymJCuzMLSRDvhY83NNDCRxf0pds4DShgYeZdbSyKraA== - dependencies: - "@sentry/core" "6.19.7" - "@sentry/types" "6.19.7" - "@sentry/utils" "6.19.7" - tslib "^1.9.3" - -"@sentry/cli@^1.73.0": - version "1.74.4" - resolved "https://registry.npmjs.org/@sentry/cli/-/cli-1.74.4.tgz#7df82f68045a155e1885bfcbb5d303e5259eb18e" - integrity sha512-BMfzYiedbModsNBJlKeBOLVYUtwSi99LJ8gxxE4Bp5N8hyjNIN0WVrozAVZ27mqzAuy6151Za3dpmOLO86YlGw== - dependencies: - https-proxy-agent "^5.0.0" - mkdirp "^0.5.5" - node-fetch "^2.6.7" - npmlog "^4.1.2" - progress "^2.0.3" - proxy-from-env "^1.1.0" - which "^2.0.2" - -"@sentry/core@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/core/-/core-6.19.7.tgz#156aaa56dd7fad8c89c145be6ad7a4f7209f9785" - integrity sha512-tOfZ/umqB2AcHPGbIrsFLcvApdTm9ggpi/kQZFkej7kMphjT+SGBiQfYtjyg9jcRW+ilAR4JXC9BGKsdEQ+8Vw== - dependencies: - "@sentry/hub" "6.19.7" - "@sentry/minimal" "6.19.7" - "@sentry/types" "6.19.7" - "@sentry/utils" "6.19.7" - tslib "^1.9.3" - -"@sentry/hub@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/hub/-/hub-6.19.7.tgz#58ad7776bbd31e9596a8ec46365b45cd8b9cfd11" - integrity sha512-y3OtbYFAqKHCWezF0EGGr5lcyI2KbaXW2Ik7Xp8Mu9TxbSTuwTe4rTntwg8ngPjUQU3SUHzgjqVB8qjiGqFXCA== - dependencies: - "@sentry/types" "6.19.7" - "@sentry/utils" "6.19.7" - tslib "^1.9.3" - -"@sentry/integrations@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/integrations/-/integrations-6.19.7.tgz#e6e126b692077c8731644224c754012bed65b425" - integrity sha512-yNeeFyuygJaV7Mdc5qWuDa13xVj5mVdECaaw2Xs4pfeHaXmRfRzZY17N8ypWFegKWxKBHynyQRMD10W5pBwJvA== - dependencies: - "@sentry/types" "6.19.7" - "@sentry/utils" "6.19.7" - localforage "^1.8.1" - tslib "^1.9.3" - -"@sentry/minimal@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.19.7.tgz#b3ee46d6abef9ef3dd4837ebcb6bdfd01b9aa7b4" - integrity sha512-wcYmSJOdvk6VAPx8IcmZgN08XTXRwRtB1aOLZm+MVHjIZIhHoBGZJYTVQS/BWjldsamj2cX3YGbGXNunaCfYJQ== - dependencies: - "@sentry/hub" "6.19.7" - "@sentry/types" "6.19.7" - tslib "^1.9.3" - -"@sentry/nextjs@^6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/nextjs/-/nextjs-6.19.7.tgz#2c40692d89a99ec1382189f11702b1498c91fb77" - integrity sha512-029gpqhR6gHF7zfE9oxFOf3Zm68CShDu8/6azC8mwfIfJtyLC9dqztJJi48j0Uxs+sR1TEkN5Dw3wZbfWtFd8g== - dependencies: - "@sentry/core" "6.19.7" - "@sentry/hub" "6.19.7" - "@sentry/integrations" "6.19.7" - "@sentry/node" "6.19.7" - "@sentry/react" "6.19.7" - "@sentry/tracing" "6.19.7" - "@sentry/utils" "6.19.7" - "@sentry/webpack-plugin" "1.18.8" - tslib "^1.9.3" - -"@sentry/node@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/node/-/node-6.19.7.tgz#32963b36b48daebbd559e6f13b1deb2415448592" - integrity sha512-gtmRC4dAXKODMpHXKfrkfvyBL3cI8y64vEi3fDD046uqYcrWdgoQsffuBbxMAizc6Ez1ia+f0Flue6p15Qaltg== - dependencies: - "@sentry/core" "6.19.7" - "@sentry/hub" "6.19.7" - "@sentry/types" "6.19.7" - "@sentry/utils" "6.19.7" - cookie "^0.4.1" - https-proxy-agent "^5.0.0" - lru_map "^0.3.3" - tslib "^1.9.3" - -"@sentry/react@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/react/-/react-6.19.7.tgz#58cc2d6da20f7d3b0df40638dfbbbc86c9c85caf" - integrity sha512-VzJeBg/v41jfxUYPkH2WYrKjWc4YiMLzDX0f4Zf6WkJ4v3IlDDSkX6DfmWekjTKBho6wiMkSNy2hJ1dHfGZ9jA== - dependencies: - "@sentry/browser" "6.19.7" - "@sentry/minimal" "6.19.7" - "@sentry/types" "6.19.7" - "@sentry/utils" "6.19.7" - hoist-non-react-statics "^3.3.2" - tslib "^1.9.3" - -"@sentry/tracing@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/tracing/-/tracing-6.19.7.tgz#54bb99ed5705931cd33caf71da347af769f02a4c" - integrity sha512-ol4TupNnv9Zd+bZei7B6Ygnr9N3Gp1PUrNI761QSlHtPC25xXC5ssSD3GMhBgyQrcvpuRcCFHVNNM97tN5cZiA== - dependencies: - "@sentry/hub" "6.19.7" - "@sentry/minimal" "6.19.7" - "@sentry/types" "6.19.7" - "@sentry/utils" "6.19.7" - tslib "^1.9.3" - -"@sentry/types@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/types/-/types-6.19.7.tgz#c6b337912e588083fc2896eb012526cf7cfec7c7" - integrity sha512-jH84pDYE+hHIbVnab3Hr+ZXr1v8QABfhx39KknxqKWr2l0oEItzepV0URvbEhB446lk/S/59230dlUUIBGsXbg== - -"@sentry/utils@6.19.7": - version "6.19.7" - resolved "https://registry.npmjs.org/@sentry/utils/-/utils-6.19.7.tgz#6edd739f8185fd71afe49cbe351c1bbf5e7b7c79" - integrity sha512-z95ECmE3i9pbWoXQrD/7PgkBAzJYR+iXtPuTkpBjDKs86O3mT+PXOT3BAn79w2wkn7/i3vOGD2xVr1uiMl26dA== - dependencies: - "@sentry/types" "6.19.7" - tslib "^1.9.3" - -"@sentry/webpack-plugin@1.18.8": - version "1.18.8" - resolved "https://registry.npmjs.org/@sentry/webpack-plugin/-/webpack-plugin-1.18.8.tgz#247a73a0aa9e28099a736bbe89ca0d35cbac7636" - integrity sha512-PtKr0NL62b5L3kPFGjwSNbIUwwcW5E5G6bQxAYZGpkgL1MFPnS4ND0SAsySuX0byQJRFFium5A19LpzyvQZSlQ== - dependencies: - "@sentry/cli" "^1.73.0" - -"@sideway/address@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" - integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@sideway/formula@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" - integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== - -"@sideway/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" - integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== - -"@sinonjs/commons@^1.7.0": - version "1.8.3" - resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz" - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^8.0.1": - version "8.1.0" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz" - integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== - dependencies: - "@sinonjs/commons" "^1.7.0" - -"@socket.io/component-emitter@~3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" - integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== - -"@solana/buffer-layout-utils@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" - integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g== - dependencies: - "@solana/buffer-layout" "^4.0.0" - "@solana/web3.js" "^1.32.0" - bigint-buffer "^1.1.5" - bignumber.js "^9.0.1" - -"@solana/buffer-layout@^3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz" - integrity sha512-MVdgAKKL39tEs0l8je0hKaXLQFb7Rdfb0Xg2LjFZd8Lfdazkg6xiS98uAZrEKvaoF3i4M95ei9RydkGIDMeo3w== - dependencies: - buffer "~6.0.3" - -"@solana/buffer-layout@^4.0.0": - version "4.0.0" - resolved "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz" - integrity sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ== - dependencies: - buffer "~6.0.3" - -"@solana/governance-program-library@^0.15.2": - version "0.15.2" - resolved "https://registry.yarnpkg.com/@solana/governance-program-library/-/governance-program-library-0.15.2.tgz#283b71a879710cefded401177bf6951a01cfb1ef" - integrity sha512-dxrefhnHHj+8g7bzieABjYDPkKLot7ZYM9wQfU/PPcjUfPIa8cQJEWW2t7yLeKuAiz+VTxAeV2Y73yx/TO8Lkw== - dependencies: - "@project-serum/anchor" "^0.24.2" - "@project-serum/serum" "^0.13.61" - -"@solana/spl-governance@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@solana/spl-governance/-/spl-governance-0.0.29.tgz#8a691ace5242a1174ede73657c06267184f1c4b3" - integrity sha512-+Wrk4pHKDDzw7d2gXtpplslfLwIjWIDLB4o78LSiiPCtY+fObtKabWwyH/AVWXhebSGj+bkW6j0i9/WE4xbnCg== - dependencies: - "@solana/web3.js" "^1.22.0" - bignumber.js "^9.0.1" - bn.js "^5.1.3" - borsh "^0.3.1" - bs58 "^4.0.1" - superstruct "^0.15.2" - -"@solana/spl-governance@^0.0.34": - version "0.0.34" - resolved "https://registry.yarnpkg.com/@solana/spl-governance/-/spl-governance-0.0.34.tgz#c61d81d356dbcee961bbc85e5d3538846fea57ad" - integrity sha512-tZppBiiVkUa5v+B/Ds+TqZ4yxR/vaIYLRxBk7x6R22dwk4/9SU87bVE60kRdDqTdMzqScFxIMdhaGl/fCX533A== - dependencies: - "@solana/web3.js" "^1.22.0" - bignumber.js "^9.0.1" - bn.js "^5.1.3" - borsh "^0.3.1" - bs58 "^4.0.1" - superstruct "^0.15.2" - -"@solana/spl-name-service@^0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@solana/spl-name-service/-/spl-name-service-0.1.3.tgz" - integrity sha512-NIsa5xU8Fx9nIofM/mmrNI3s472kDBtNdqI6TbhIaVeP/DTYc9m5dkjvG32T1tZdNMv0kvFIpqZ0iAJvvZ/ABg== - dependencies: - "@solana/spl-token" "0.1.6" - "@solana/web3.js" "^1.21.0" - bip32 "^2.0.6" - bn.js "^5.1.3" - borsh "^0.4.0" - bs58 "4.0.1" - buffer-layout "^1.2.0" - core-util-is "^1.0.2" - crypto "^1.0.1" - crypto-ts "^1.0.2" - fs "^0.0.1-security" - tweetnacl "^1.0.3" - webpack-dev-server "^3.11.2" - -"@solana/spl-token-registry@^0.2.1107": - version "0.2.3797" - resolved "https://registry.yarnpkg.com/@solana/spl-token-registry/-/spl-token-registry-0.2.3797.tgz#48e5ca97c2dc064724ac4997aeb96abb2278a28c" - integrity sha512-NrRVdM66Kvjef4bYQc9ynJvJtNW/JIWu7PvtuwqwR9R5Omzr5Cm5JWyM5NQDcDO/L8F8xJ8BYXA7PUKu0AkUxA== - dependencies: - cross-fetch "3.0.6" - -"@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" - -"@solana/spl-token@0.1.6": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.6.tgz#fa136b0a3db84f07a99bc0e54cf4e91f2d6da2e8" - integrity sha512-fYj+a3w1bqWN6Ibf85XF3h2JkuxevI3Spvqi+mjsNqVUEo2AgxxTZmujNLn/jIzQDNdWkBfF/wYzH5ikcGHmfw== - dependencies: - "@babel/runtime" "^7.10.5" - "@solana/web3.js" "^1.12.0" - bn.js "^5.1.0" - buffer "6.0.3" - buffer-layout "^1.2.0" - dotenv "10.0.0" - -"@solana/spl-token@0.1.8", "@solana/spl-token@^0.1.6", "@solana/spl-token@^0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.8.tgz#f06e746341ef8d04165e21fc7f555492a2a0faa6" - integrity sha512-LZmYCKcPQDtJgecvWOgT/cnoIQPWjdH+QVyzPcFvyDUiT0DiRjZaam4aqNUyvchLFhzgunv3d9xOoyE34ofdoQ== - dependencies: - "@babel/runtime" "^7.10.5" - "@solana/web3.js" "^1.21.0" - bn.js "^5.1.0" - buffer "6.0.3" - buffer-layout "^1.2.0" - dotenv "10.0.0" - -"@solana/spl-token@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.2.0.tgz#329bb6babb5de0f9c40035ddb1657f01a8347acd" - integrity sha512-RWcn31OXtdqIxmkzQfB2R+WpsJOVS6rKuvpxJFjvik2LyODd+WN58ZP3Rpjpro03fscGAkzlFuP3r42doRJgyQ== - dependencies: - "@solana/buffer-layout" "^4.0.0" - "@solana/buffer-layout-utils" "^0.2.0" - "@solana/web3.js" "^1.32.0" - start-server-and-test "^1.14.0" - -"@solana/wallet-adapter-base@^0.9.1", "@solana/wallet-adapter-base@^0.9.2": - version "0.9.2" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.2.tgz" - integrity sha512-lHMHE506oKIJM8Tm/yBUpwR2tOdBADQqKhES/U64oAoACprulLBSGx0A+v7NP3rlcTmBMSh7qSQnf5Iic6jexQ== - dependencies: - "@solana/web3.js" "^1.20.0" - eventemitter3 "^4.0.0" - -"@solana/wallet-adapter-base@^0.9.3", "@solana/wallet-adapter-base@^0.9.4", "@solana/wallet-adapter-base@^0.9.5": - version "0.9.5" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.5.tgz#6780dd096d30f0e1ffc9c7869029ec37b2a2fc9e" - integrity sha512-KCrSB2s8lA38Bd+aPvHlwPEHZU1owD6LSCikjumUaR3HCcpv+V1lxgQX+tdNaDyEVTKlAYNd0uJU+yQfQlkiOA== - dependencies: - "@solana/web3.js" "^1.36.0" - eventemitter3 "^4.0.0" - -"@solana/wallet-adapter-clover@^0.4.2": - version "0.4.2" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-clover/-/wallet-adapter-clover-0.4.2.tgz" - integrity sha512-HXK6xxst1Fc3+E3ZaqYHiJFCzdoeQ08CWBTb6LCagJsb2m+GEuomz7Tr59nPpME0UN7evKwgztJIhQmZhnzACg== - dependencies: - "@solana/wallet-adapter-base" "^0.9.1" - "@solana/web3.js" "^1.20.0" - -"@solana/wallet-adapter-coin98@^0.5.2": - version "0.5.2" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-coin98/-/wallet-adapter-coin98-0.5.2.tgz" - integrity sha512-WjosOpOoFf+Nm4Z0Oli4N2u/bgbZoOXS/anFcimHE+NFI3PoD02u67WLuRWz95X7ID9HzopCGH0YOtpzK5Wt8g== - dependencies: - "@solana/wallet-adapter-base" "^0.9.1" - "@solana/web3.js" "^1.20.0" - "@types/bs58" "^4.0.1" - bs58 "^4.0.0" - -"@solana/wallet-adapter-glow@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-glow/-/wallet-adapter-glow-0.1.1.tgz#4db395b2ccf73eb2d6c1d9362e26cbfd260fc19f" - integrity sha512-ZYVNtplMAbUQUAzWQ+bhPpIiUO2Jz8Pvx6Ypas+xuZJBgc0vb+iaYFGLHEdg+SE19P20QIPQE75qPRQvsMqpCQ== - dependencies: - "@solana/wallet-adapter-base" "^0.9.3" - "@solana/web3.js" "^1.36.0" - -"@solana/wallet-adapter-mathwallet@^0.9.2": - version "0.9.2" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-mathwallet/-/wallet-adapter-mathwallet-0.9.2.tgz" - integrity sha512-seCpyllK7sx38NBIevTILFKNkLxU9Ij4Ss1EO1OHbr9QOoCMQN7xnsRRvS3OemrKe/ZKhP5Shy2e81bo9xJBaw== - dependencies: - "@solana/wallet-adapter-base" "^0.9.1" - "@solana/web3.js" "^1.20.0" - -"@solana/wallet-adapter-phantom@^0.9.2": - version "0.9.2" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-phantom/-/wallet-adapter-phantom-0.9.2.tgz" - integrity sha512-ooYz+EnwjNqAnNt5OwfRJykL/GbASDCuZ0V+TBeUki8NC0d1lPJsiPR0Bgs3e192eTxzE2SnD6cGePOiSP3MEw== - dependencies: - "@solana/wallet-adapter-base" "^0.9.1" - "@solana/web3.js" "^1.20.0" - -"@solana/wallet-adapter-phantom@^0.9.3": - version "0.9.3" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-phantom/-/wallet-adapter-phantom-0.9.3.tgz#68832deccf43af0043d70498fcd11a9006e27b46" - integrity sha512-XBDgG5BzxRolHW2OchaIccvsPeQ0PKl/Xy303x7oHS3rW+HUwjIMqaKKpmV66A6rMr1x+ytL+tp6p7t3M2oD3Q== - dependencies: - "@solana/wallet-adapter-base" "^0.9.3" - "@solana/web3.js" "^1.20.0" - -"@solana/wallet-adapter-slope@^0.5.2": - version "0.5.2" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-slope/-/wallet-adapter-slope-0.5.2.tgz" - integrity sha512-maeZBvbQmohkwG1/7T31GoZIP9qdykrEOLF+ApA+OMbaCMyi25a1zx1CRoVm66QO488pywG+8u+GAZj9BK0bEA== - dependencies: - "@solana/wallet-adapter-base" "^0.9.1" - "@solana/web3.js" "^1.20.0" - "@types/bs58" "^4.0.1" - bs58 "^4.0.0" - -"@solana/wallet-adapter-solflare@^0.6.2": - version "0.6.2" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-solflare/-/wallet-adapter-solflare-0.6.2.tgz" - integrity sha512-w/Gpe07d/S2tSbmsT7DrhovoUYx0o6Rk2ZKyMY5JEBCjIYOs3O75KO72B7qS22s5Eiv8NRzqmNaKAOGIDIDyOQ== - dependencies: - "@solana/wallet-adapter-base" "^0.9.1" - "@solana/web3.js" "^1.20.0" - -"@solana/wallet-adapter-solflare@^0.6.6": - version "0.6.6" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-solflare/-/wallet-adapter-solflare-0.6.6.tgz" - integrity sha512-4H4FbRpvUeCGQ9HevLpCc9hCtwjRL4pf7kk/4QoGdu+jLbXo1doKTiT8sY1svksNS8JWrcr0kn7SpePmiy7xhg== - dependencies: - "@solana/wallet-adapter-base" "^0.9.4" - "@solana/web3.js" "^1.20.0" - "@solflare-wallet/sdk" "^1.0.11" - -"@solana/wallet-adapter-sollet@^0.10.3": - version "0.10.3" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-sollet/-/wallet-adapter-sollet-0.10.3.tgz" - integrity sha512-2CXFWhRu+/00LV0xcuhGFQ9zinPqQ9eRKV19v8+yJEUE9MDCI8qCS92O+t44FNTbImL5cgh/2ettreDM/GkzSQ== - dependencies: - "@project-serum/sol-wallet-adapter" "^0.2.6" - "@solana/wallet-adapter-base" "^0.9.1" - "@solana/web3.js" "^1.20.0" - -"@solana/wallet-adapter-sollet@^0.11.1": - version "0.11.1" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-sollet/-/wallet-adapter-sollet-0.11.1.tgz#021ec1c8f402601c8898175e1fb39b504a25cb43" - integrity sha512-lRgz8+57g2piBqxYHA4HqKuHY/gDCVY5vCqEa2pColfKtIETqKRcpF1P34R4MD5mLuMjLEQP9Hjt285NIOeVjQ== - dependencies: - "@project-serum/sol-wallet-adapter" "^0.2.6" - "@solana/wallet-adapter-base" "^0.9.4" - "@solana/web3.js" "^1.20.0" - -"@solana/wallet-adapter-solong@^0.9.2": - version "0.9.2" - resolved "https://registry.npmjs.org/@solana/wallet-adapter-solong/-/wallet-adapter-solong-0.9.2.tgz" - integrity sha512-PKTfQmmCwl7w8cRVHQmrLTEO2Vz/LN8YcrDDJhUnXF45cJ27fHriXjY6BtqoteDbOZQs4QKEccDcG5WLsY4U8w== - dependencies: - "@solana/wallet-adapter-base" "^0.9.1" - "@solana/web3.js" "^1.20.0" - -"@solana/wallet-adapter-torus@^0.11.11": - version "0.11.11" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-torus/-/wallet-adapter-torus-0.11.11.tgz#74092f409df97eab964b73b8992a59a6d97f1c56" - integrity sha512-U6qt2QEkMwOVUV19jbsXlzW8a2ff/vo34SXEGekFXe8hg847u2N8GmByDRdnEyAqbQ9TZPbbiPjID7xhLZY6Wg== - dependencies: - "@solana/wallet-adapter-base" "^0.9.4" - "@solana/web3.js" "^1.20.0" - "@toruslabs/solana-embed" "^0.1.5" - assert "^2.0.0" - process "^0.11.10" - stream-browserify "^3.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" - integrity sha512-Crpls2cG7m2fot83ahgTpc7VrPKSMcKOlq12+nYDexKV+uasV25Ylk8SMLHoUp02TyMugKOYHsangUhsrF5ptw== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^4.0.0" - bn.js "^5.0.0" - borsh "^0.7.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.12.0", "@solana/web3.js@^1.17.0", "@solana/web3.js@^1.20.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.22.0", "@solana/web3.js@^1.29.2", "@solana/web3.js@^1.30.2", "@solana/web3.js@^1.31.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.37.1": - version "1.41.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.41.0.tgz#f83af98d4ead2b45aa064036d8bdb006a83d1bae" - integrity sha512-m8NDOorYficxn/SbPTCJH1Rwnv/bBIkSr1HABzdSSshRjf92ndrilMCNp61egNGMyd+hAjKfNJkHM5bKvPu5iA== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^4.0.0" - bn.js "^5.0.0" - borsh "^0.7.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.32.0": - version "1.41.4" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.41.4.tgz#595aa29a4a61c181b8c8f5cf0bbef80b4739cfab" - integrity sha512-2/mjqUcGsBkLEvKxA+rWFE1vODBycAMa62r3wm3Uzb6nmsXQQNTotB+6YoeLQmF0mxVoy8ZA+/QENzBkGkPzSg== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^4.0.0" - "@solana/buffer-layout-utils" "^0.2.0" - bn.js "^5.0.0" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.1" - cross-fetch "^3.1.4" - fast-stable-stringify "^1.0.0" - jayson "^3.4.4" - js-sha3 "^0.8.0" - rpc-websockets "^7.4.2" - secp256k1 "^4.0.2" - sinon-chai "^3.7.0" - superstruct "^0.14.2" - tweetnacl "^1.0.0" - -"@solana/web3.js@^1.35.0": - version "1.43.5" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.43.5.tgz#ab12bb6ab3fff0a08e8c7453b4fc4cda9f66df11" - integrity sha512-/PF4Fp+2jvCt9R3hYrf+tVUZXpPXZaHcwpaY/ytgdcswy8YiYf2snug52BJTCTlxwiXJipS4JpIo7rJJO0nN6w== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^4.0.0" - bigint-buffer "^1.1.5" - bn.js "^5.0.0" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.1" - fast-stable-stringify "^1.0.0" - jayson "^3.4.4" - js-sha3 "^0.8.0" - node-fetch "2" - rpc-websockets "^7.4.2" - secp256k1 "^4.0.2" - superstruct "^0.14.2" - tweetnacl "^1.0.0" - -"@solana/web3.js@^1.42.0": - version "1.43.1" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.43.1.tgz#f0cfffe7feb798563440f9ca0b0e9ba099e13967" - integrity sha512-s6TRcWz3rYvxM8gg1eQmUAUJQeoXIFMG9MbSWb/uRrLU0q7Xd9Ic1PNbACp1n1O0wyCogTAyFWXXPK476aIVSg== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^4.0.0" - bigint-buffer "^1.1.5" - bn.js "^5.0.0" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.1" - cross-fetch "^3.1.4" - fast-stable-stringify "^1.0.0" - 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.43.5": - version "1.44.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.44.0.tgz#233f7bd268520a0ce852ff7f92ded150c5fad0f5" - integrity sha512-KHf7o8sM5FlxYGHGroD7IJeCCOmjFITdBIXq4cO5xPFQ8O6Y26FWfYqIXqY1dXI29t240g0m1GYPssCp5UVgZg== - dependencies: - "@babel/runtime" "^7.12.5" - "@ethersproject/sha2" "^5.5.0" - "@solana/buffer-layout" "^4.0.0" - bigint-buffer "^1.1.5" - bn.js "^5.0.0" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.1" - fast-stable-stringify "^1.0.0" - jayson "^3.4.4" - js-sha3 "^0.8.0" - node-fetch "2" - rpc-websockets "^7.4.2" - secp256k1 "^4.0.2" - superstruct "^0.14.2" - tweetnacl "^1.0.0" - -"@solendprotocol/solend-sdk@^0.4.4": - version "0.4.9" - resolved "https://registry.yarnpkg.com/@solendprotocol/solend-sdk/-/solend-sdk-0.4.9.tgz#c0e3f24148c4951bf0cfdf16c884bc4ffbb42b7b" - integrity sha512-tVsvE0kap58/eMeeSonv0tEiqlnvYC0x90MXKoGz2D0oyQBx9Eneba5wXDh9FJ3S5S2RFqwXIAnmdOzTLZzV/A== - dependencies: - "@pythnetwork/client" "^2.5.1" - "@solana/buffer-layout" "^3.0.0" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - axios "^0.24.0" - bignumber.js "^9.0.2" - bn.js "^5.2.0" - buffer "^6.0.3" - buffer-layout "^1.2.0" - isomorphic-fetch "^3.0.0" - -"@solendprotocol/solend-sdk@^0.5.5": - version "0.5.5" - resolved "https://registry.yarnpkg.com/@solendprotocol/solend-sdk/-/solend-sdk-0.5.5.tgz#a8077532e1ca2ecd7d619fee4f339cd6b33e4a04" - integrity sha512-7eZSM/vl7Bijbg3n/vnO4z5p3VX7eb453pKkVeiT6FmQuC403GrNU3wUz3TVJZlzhsg76X81udK2qZaOKaWrZQ== - dependencies: - "@pythnetwork/client" "^2.5.1" - "@solana/buffer-layout" "^3.0.0" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.31.0" - axios "^0.24.0" - bignumber.js "^9.0.2" - bn.js "^5.2.0" - buffer "^6.0.3" - buffer-layout "^1.2.0" - isomorphic-fetch "^3.0.0" - -"@solflare-wallet/sdk@^1.0.11": - version "1.0.11" - resolved "https://registry.npmjs.org/@solflare-wallet/sdk/-/sdk-1.0.11.tgz" - integrity sha512-zm+snfxpxfEvPytz0CdPn+LSMLrtYIl8qDjC2jhey4hWTkkZmumgKMKfNb9w6cpHtGgWiQkxSP2KI48xuKmuxw== - dependencies: - "@project-serum/sol-wallet-adapter" "0.2.0" - bs58 "^4.0.1" - eventemitter3 "^4.0.7" - uuid "^8.3.2" - -"@switchboard-xyz/switchboard-api@^0.2.150", "@switchboard-xyz/switchboard-api@^0.2.61": - version "0.2.179" - resolved "https://registry.npmjs.org/@switchboard-xyz/switchboard-api/-/switchboard-api-0.2.179.tgz" - integrity sha512-8YW+9+qaNlEwdTPwu03nNR9XnmO9ODrg9HG6JeDdmu2f/89IIXd4vte2MI29Ij+8C1GZ+4QARP3O3qIdbGk39w== - dependencies: - "@solana/web3.js" "^1.17.0" - "@switchboard-xyz/switchboard-api" "^0.2.61" - form-data "^4.0.0" - protobufjs "^6.10.2" - rpc-websockets "^7.4.12" - typedoc "^0.20.36" - ws "^7.4.6" - -"@switchboard-xyz/switchboard-v2@^0.0.110": - version "0.0.110" - resolved "https://registry.yarnpkg.com/@switchboard-xyz/switchboard-v2/-/switchboard-v2-0.0.110.tgz#b01b74fa368d33659f0b2b7b232eee7f8193dc53" - integrity sha512-T5bgO/SA66fwQbAYBFqP5KOhiQ4JUQG06XUMhxtLgyWQ0qYrpjC1EINyaq0TZzEB6r6cjZufvYBTFA3zhPKydg== - dependencies: - "@project-serum/anchor" "^0.24.2" - "@solana/spl-governance" "^0.0.34" - assert "^2.0.0" - big.js "^6.1.1" - bs58 "^4.0.1" - chan "^0.6.1" - crypto-js "^4.0.0" - long "^4.0.0" - mocha "^9.1.1" - node-fetch "^3.2.3" - protobufjs "^6.11.3" - -"@switchboard-xyz/switchboard-v2@^0.0.34": - version "0.0.34" - resolved "https://registry.npmjs.org/@switchboard-xyz/switchboard-v2/-/switchboard-v2-0.0.34.tgz" - integrity sha512-7yFWF2A/S4EwP3SEDQGS3HXptDlLLVctCDmDtxDpWL4mlU6RuK/4kntGyGs+s65uIaKpqvJtA1IUow1nX7yE6A== - dependencies: - "@project-serum/anchor" "^0.18.0" - "@project-serum/anchor-cli" "^0.18.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.29.2" - "@switchboard-xyz/switchboard-api" "^0.2.150" - assert "^2.0.0" - big.js "^6.1.1" - bs58 "^4.0.1" - buffer-layout "^1.2.0" - chan "^0.6.1" - crypto-js "^4.0.0" - dotenv "^8.6.0" - events "^3.3.0" - fs "0.0.1-security" - i "^0.3.7" - long "^4.0.0" - microseconds "^0.2.0" - mz "^2.7.0" - node-fetch "^2.6.1" - npm "^7.24.1" - prompt-sync "^4.1.6" - protobufjs "^6.10.2" - readline-sync "^1.4.10" - resolve-dir "^1.0.1" - set-interval-async "1.0.34" - ts-proto "^1.79.0" - typescript "^4.2.4" - wait-for-event "^2.0.1" - ws "^7.4.6" - -"@testing-library/dom@^7.28.1": - version "7.30.4" - resolved "https://registry.npmjs.org/@testing-library/dom/-/dom-7.30.4.tgz" - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/runtime" "^7.12.5" - "@types/aria-query" "^4.2.0" - aria-query "^4.2.2" - chalk "^4.1.0" - dom-accessibility-api "^0.5.4" - lz-string "^1.4.4" - pretty-format "^26.6.2" - -"@testing-library/jest-dom@^5.16.4": - version "5.16.4" - resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-5.16.4.tgz#938302d7b8b483963a3ae821f1c0808f872245cd" - integrity sha512-Gy+IoFutbMQcky0k+bqqumXZ1cTGswLsFqmNLzNdSKkU9KGV2u9oXhukCbbJ9/LRPKiqwxEE8VpV/+YZlfkPUA== - dependencies: - "@babel/runtime" "^7.9.2" - "@types/testing-library__jest-dom" "^5.9.1" - aria-query "^5.0.0" - chalk "^3.0.0" - css "^3.0.0" - css.escape "^1.5.1" - dom-accessibility-api "^0.5.6" - lodash "^4.17.15" - redent "^3.0.0" - -"@testing-library/react@^11.2.5": - version "11.2.6" - resolved "https://registry.npmjs.org/@testing-library/react/-/react-11.2.6.tgz" - dependencies: - "@babel/runtime" "^7.12.5" - "@testing-library/dom" "^7.28.1" - -"@tippyjs/react@^4.2.6": - version "4.2.6" - resolved "https://registry.yarnpkg.com/@tippyjs/react/-/react-4.2.6.tgz#971677a599bf663f20bb1c60a62b9555b749cc71" - integrity sha512-91RicDR+H7oDSyPycI13q3b7o4O60wa2oRbjlz2fyRLmHImc4vyDwuUP8NtZaN0VARJY5hybvDYrFzhY9+Lbyw== - dependencies: - tippy.js "^6.3.1" - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@toruslabs/base-controllers@^1.6.1": - version "1.6.18" - resolved "https://registry.yarnpkg.com/@toruslabs/base-controllers/-/base-controllers-1.6.18.tgz#a45737e062bb530504df22e4836088da0d57fd26" - integrity sha512-C/NGlVeB9x3H5c/+tX4ZTnFYpDzb9Sz+G/061s24Rubr+MRsjncaG7zN8C1y48D83JUvUkSJX9MAFt3m7aTFFA== - dependencies: - "@toruslabs/broadcast-channel" "^4.13.0" - "@toruslabs/http-helpers" "^2.2.0" - "@toruslabs/openlogin-jrpc" "^1.7.3" - async-mutex "^0.3.2" - bignumber.js "^9.0.2" - bowser "^2.11.0" - eth-rpc-errors "^4.0.3" - ethereumjs-util "^7.1.4" - json-rpc-random-id "^1.0.1" - lodash "^4.17.21" - loglevel "^1.8.0" - -"@toruslabs/broadcast-channel@^4.13.0": - version "4.13.0" - resolved "https://registry.yarnpkg.com/@toruslabs/broadcast-channel/-/broadcast-channel-4.13.0.tgz#f47a3624a70f9e395d0412bcde5bf2035e7c39f0" - integrity sha512-qPpVzLtqjiLRNW5C5xnCNwzWNBcGLSx/rC8C7UTP08Z9HnTIP3JxR+NbdtjR7/AjA2VemdcLQq3n+trJf9gUKQ== - dependencies: - "@babel/runtime" "^7.17.9" - "@toruslabs/eccrypto" "^1.1.8" - "@toruslabs/metadata-helpers" "^2.5.0" - bowser "^2.11.0" - detect-node "^2.1.0" - keccak "^3.0.2" - loglevel "^1.8.0" - microtime "3.0.0" - oblivious-set "1.1.1" - p-queue "6.6.2" - rimraf "^3.0.2" - socket.io-client "^4.5.0" - unload "^2.3.1" - -"@toruslabs/eccrypto@^1.1.8": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@toruslabs/eccrypto/-/eccrypto-1.1.8.tgz#ce1eac9c3964a091cdc74956a62036b5719a41eb" - integrity sha512-5dIrO2KVqvnAPOPfJ2m6bnjp9vav9GIcCZXiXRW/bJuIDRLVxJhVvRlleF4oaEZPq5yX5piHq5jVHagNNS0jOQ== - dependencies: - acorn "^8.4.1" - elliptic "^6.5.4" - es6-promise "^4.2.8" - nan "^2.14.2" - optionalDependencies: - secp256k1 "^3.8.0" - -"@toruslabs/http-helpers@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@toruslabs/http-helpers/-/http-helpers-2.2.0.tgz#c494984701ff60eb93c0eaef279daa93b5bcea81" - integrity sha512-xkzZZuE+DmWmJBTYneCrMJY24izNQCOdoJMpsXKQx20Va/rTQvNPbdkpx9LBf/pisk8jOwETNAfFQ8YTBc/bZw== - dependencies: - lodash.merge "^4.6.2" - loglevel "^1.8.0" - -"@toruslabs/metadata-helpers@^2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@toruslabs/metadata-helpers/-/metadata-helpers-2.5.0.tgz#691bb02d663c5e489b27a641364b1d0283a59ba6" - integrity sha512-zhAAGhPcy5Fz68Zg3FXXmYKHHsFBCWsxXurSbdPMFldDrq9GwKChbAbvKBF0sz+juhEOO5gX1BbVah580YVobg== - dependencies: - "@toruslabs/eccrypto" "^1.1.8" - "@toruslabs/http-helpers" "^2.2.0" - elliptic "^6.5.4" - json-stable-stringify "^1.0.1" - keccak "^3.0.2" - -"@toruslabs/openlogin-jrpc@^1.4.0", "@toruslabs/openlogin-jrpc@^1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@toruslabs/openlogin-jrpc/-/openlogin-jrpc-1.7.3.tgz#0bbdc2f7989b4a1f19b8a54d3e66721d424d185f" - integrity sha512-xjixDKPLZN7T5hCjwmGTU58NttdZiHn3YlK6II2z4v8IifPUwoquYP08XfaE79ksxamgDYkGERf7bQGkV5Wf5w== - dependencies: - "@toruslabs/openlogin-utils" "^1.7.0" - end-of-stream "^1.4.4" - eth-rpc-errors "^4.0.3" - events "^3.3.0" - fast-safe-stringify "^2.1.1" - once "^1.4.0" - pump "^3.0.0" - readable-stream "^3.6.0" - -"@toruslabs/openlogin-utils@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@toruslabs/openlogin-utils/-/openlogin-utils-1.7.0.tgz#1762e2f1f67590d0c6cb8e4c4ade82d59ba13a18" - integrity sha512-y+j22v+h6EfzN4sfFnmtmMrcxEdkScdJOAgbtvX42BpUYOuFa1Tv0SZjdtsGGDE4g5szmL3rb9NGMHdBF1rZtg== - dependencies: - base64url "^3.0.1" - keccak "^3.0.2" - randombytes "^2.1.0" - -"@toruslabs/solana-embed@^0.1.5": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@toruslabs/solana-embed/-/solana-embed-0.1.6.tgz#c21ba9fe485ce33975577cb909cc2a168485e6cb" - integrity sha512-+WcF97qLTyW6xJ/oDmsLRc4KUN0w8/0pPx2QstcUV0OPgV3VON9LXgRFmSLXNvBVjFzie7aOWJFORUIL6Odqhw== - dependencies: - "@solana/web3.js" "^1.35.0" - "@toruslabs/base-controllers" "^1.6.1" - "@toruslabs/http-helpers" "^2.2.0" - "@toruslabs/openlogin-jrpc" "^1.4.0" - eth-rpc-errors "^4.0.3" - fast-deep-equal "^3.1.3" - is-stream "^2.0.0" - lodash-es "^4.17.21" - loglevel "^1.8.0" - pump "^3.0.0" - -"@tsconfig/node10@^1.0.7": - version "1.0.8" - resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz" - integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== - -"@tsconfig/node12@^1.0.7": - version "1.0.9" - resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz" - integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== - -"@tsconfig/node14@^1.0.0": - version "1.0.1" - resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz" - integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== - -"@tsconfig/node16@^1.0.2": - version "1.0.2" - resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz" - integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== - -"@types/aria-query@^4.2.0": - version "4.2.1" - resolved "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.1.tgz" - -"@types/babel__core@^7.0.0": - version "7.1.14" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz" - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__core@^7.1.14": - version "7.1.17" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.17.tgz" - integrity sha512-6zzkezS9QEIL8yCBvXWxPTJPNuMeECJVxSOhxNY/jfq9LxOTHivaYTqr37n9LknWWRTIkzqH2UilS5QFvfa90A== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.2" - resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz" - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.0" - resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz" - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.11.1" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz" - dependencies: - "@babel/types" "^7.3.0" - -"@types/bn.js@^4.11.5": - version "4.11.6" - resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - -"@types/bn.js@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" - integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== - dependencies: - "@types/node" "*" - -"@types/bs58@^4.0.1": - version "4.0.1" - resolved "https://registry.npmjs.org/@types/bs58/-/bs58-4.0.1.tgz" - integrity sha512-yfAgiWgVLjFCmRv8zAcOIHywYATEwiTVccTLnRp6UxTNavT55M9d/uhK3T03St/+8/z/wW+CRjGKUNmEqoHHCA== - dependencies: - base-x "^3.0.6" - -"@types/connect@^3.4.33": - version "3.4.35" - resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== - dependencies: - "@types/node" "*" - -"@types/d3-array@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-3.0.3.tgz#87d990bf504d14ad6b16766979d04e943c046dac" - integrity sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ== - -"@types/d3-axis@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-axis/-/d3-axis-3.0.1.tgz#6afc20744fa5cc0cbc3e2bd367b140a79ed3e7a8" - integrity sha512-zji/iIbdd49g9WN0aIsGcwcTBUkgLsCSwB+uH+LPVDAiKWENMtI3cJEWt+7/YYwelMoZmbBfzA3qCdrZ2XFNnw== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-brush@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-brush/-/d3-brush-3.0.1.tgz#ae5f17ce391935ca88b29000e60ee20452c6357c" - integrity sha512-B532DozsiTuQMHu2YChdZU0qsFJSio3Q6jmBYGYNp3gMDzBmuFFgPt9qKA4VYuLZMp4qc6eX7IUFUEsvHiXZAw== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-chord@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-chord/-/d3-chord-3.0.1.tgz#54c8856c19c8e4ab36a53f73ba737de4768ad248" - integrity sha512-eQfcxIHrg7V++W8Qxn6QkqBNBokyhdWSAS73AbkbMzvLQmVVBviknoz2SRS/ZJdIOmhcmmdCRE/NFOm28Z1AMw== - -"@types/d3-color@*": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-3.1.0.tgz#6594da178ded6c7c3842f3cc0ac84b156f12f2d4" - integrity sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA== - -"@types/d3-contour@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-contour/-/d3-contour-3.0.1.tgz#9ff4e2fd2a3910de9c5097270a7da8a6ef240017" - integrity sha512-C3zfBrhHZvrpAAK3YXqLWVAGo87A4SvJ83Q/zVJ8rFWJdKejUnDYaWZPkA8K84kb2vDA/g90LTQAz7etXcgoQQ== - dependencies: - "@types/d3-array" "*" - "@types/geojson" "*" - -"@types/d3-delaunay@*": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-delaunay/-/d3-delaunay-6.0.1.tgz#006b7bd838baec1511270cb900bf4fc377bbbf41" - integrity sha512-tLxQ2sfT0p6sxdG75c6f/ekqxjyYR0+LwPrsO1mbC9YDBzPJhs2HbJJRrn8Ez1DBoHRo2yx7YEATI+8V1nGMnQ== - -"@types/d3-dispatch@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-dispatch/-/d3-dispatch-3.0.1.tgz#a1b18ae5fa055a6734cb3bd3cbc6260ef19676e3" - integrity sha512-NhxMn3bAkqhjoxabVJWKryhnZXXYYVQxaBnbANu0O94+O/nX9qSjrA1P1jbAQJxJf+VC72TxDX/YJcKue5bRqw== - -"@types/d3-drag@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-drag/-/d3-drag-3.0.1.tgz#fb1e3d5cceeee4d913caa59dedf55c94cb66e80f" - integrity sha512-o1Va7bLwwk6h03+nSM8dpaGEYnoIG19P0lKqlic8Un36ymh9NSkNFX1yiXMKNMx8rJ0Kfnn2eovuFaL6Jvj0zA== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-dsv@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-dsv/-/d3-dsv-3.0.0.tgz#f3c61fb117bd493ec0e814856feb804a14cfc311" - integrity sha512-o0/7RlMl9p5n6FQDptuJVMxDf/7EDEv2SYEO/CwdG2tr1hTfUVi0Iavkk2ax+VpaQ/1jVhpnj5rq1nj8vwhn2A== - -"@types/d3-ease@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-ease/-/d3-ease-3.0.0.tgz#c29926f8b596f9dadaeca062a32a45365681eae0" - integrity sha512-aMo4eaAOijJjA6uU+GIeW018dvy9+oH5Y2VPPzjjfxevvGQ/oRDs+tfYC9b50Q4BygRR8yE2QCLsrT0WtAVseA== - -"@types/d3-fetch@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-fetch/-/d3-fetch-3.0.1.tgz#f9fa88b81aa2eea5814f11aec82ecfddbd0b8fe0" - integrity sha512-toZJNOwrOIqz7Oh6Q7l2zkaNfXkfR7mFSJvGvlD/Ciq/+SQ39d5gynHJZ/0fjt83ec3WL7+u3ssqIijQtBISsw== - dependencies: - "@types/d3-dsv" "*" - -"@types/d3-force@*": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/d3-force/-/d3-force-3.0.3.tgz#76cb20d04ae798afede1ea6e41750763ff5a9c82" - integrity sha512-z8GteGVfkWJMKsx6hwC3SiTSLspL98VNpmvLpEFJQpZPq6xpA1I8HNBDNSpukfK0Vb0l64zGFhzunLgEAcBWSA== - -"@types/d3-format@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-format/-/d3-format-3.0.1.tgz#194f1317a499edd7e58766f96735bdc0216bb89d" - integrity sha512-5KY70ifCCzorkLuIkDe0Z9YTf9RR2CjBX1iaJG+rgM/cPP+sO+q9YdQ9WdhQcgPj1EQiJ2/0+yUkkziTG6Lubg== - -"@types/d3-geo@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-geo/-/d3-geo-3.0.2.tgz#e7ec5f484c159b2c404c42d260e6d99d99f45d9a" - integrity sha512-DbqK7MLYA8LpyHQfv6Klz0426bQEf7bRTvhMy44sNGVyZoWn//B0c+Qbeg8Osi2Obdc9BLLXYAKpyWege2/7LQ== - dependencies: - "@types/geojson" "*" - -"@types/d3-hierarchy@*": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/d3-hierarchy/-/d3-hierarchy-3.1.0.tgz#4561bb7ace038f247e108295ef77b6a82193ac25" - integrity sha512-g+sey7qrCa3UbsQlMZZBOHROkFqx7KZKvUpRzI/tAp/8erZWpYq7FgNKvYwebi2LaEiVs1klhUfd3WCThxmmWQ== - -"@types/d3-interpolate@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-interpolate/-/d3-interpolate-3.0.1.tgz#e7d17fa4a5830ad56fe22ce3b4fac8541a9572dc" - integrity sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw== - dependencies: - "@types/d3-color" "*" - -"@types/d3-path@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-3.0.0.tgz#939e3a784ae4f80b1fde8098b91af1776ff1312b" - integrity sha512-0g/A+mZXgFkQxN3HniRDbXMN79K3CdTpLsevj+PXiTcb2hVyvkZUBg37StmgCQkaD84cUJ4uaDAWq7UJOQy2Tg== - -"@types/d3-polygon@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-polygon/-/d3-polygon-3.0.0.tgz#5200a3fa793d7736fa104285fa19b0dbc2424b93" - integrity sha512-D49z4DyzTKXM0sGKVqiTDTYr+DHg/uxsiWDAkNrwXYuiZVd9o9wXZIo+YsHkifOiyBkmSWlEngHCQme54/hnHw== - -"@types/d3-quadtree@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-quadtree/-/d3-quadtree-3.0.2.tgz#433112a178eb7df123aab2ce11c67f51cafe8ff5" - integrity sha512-QNcK8Jguvc8lU+4OfeNx+qnVy7c0VrDJ+CCVFS9srBo2GL9Y18CnIxBdTF3v38flrGy5s1YggcoAiu6s4fLQIw== - -"@types/d3-random@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-random/-/d3-random-3.0.1.tgz#5c8d42b36cd4c80b92e5626a252f994ca6bfc953" - integrity sha512-IIE6YTekGczpLYo/HehAy3JGF1ty7+usI97LqraNa8IiDur+L44d0VOjAvFQWJVdZOJHukUJw+ZdZBlgeUsHOQ== - -"@types/d3-scale-chromatic@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#103124777e8cdec85b20b51fd3397c682ee1e954" - integrity sha512-dsoJGEIShosKVRBZB0Vo3C8nqSDqVGujJU6tPznsBJxNJNwMF8utmS83nvCBKQYPpjCzaaHcrf66iTRpZosLPw== - -"@types/d3-scale@*": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-4.0.2.tgz#41be241126af4630524ead9cb1008ab2f0f26e69" - integrity sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA== - dependencies: - "@types/d3-time" "*" - -"@types/d3-selection@*": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/d3-selection/-/d3-selection-3.0.2.tgz#23e48a285b24063630bbe312cc0cfe2276de4a59" - integrity sha512-d29EDd0iUBrRoKhPndhDY6U/PYxOWqgIZwKTooy2UkBfU7TNZNpRho0yLWPxlatQrFWk2mnTu71IZQ4+LRgKlQ== - -"@types/d3-shape@*": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/d3-shape/-/d3-shape-3.1.0.tgz#1d87a6ddcf28285ef1e5c278ca4bdbc0658f3505" - integrity sha512-jYIYxFFA9vrJ8Hd4Se83YI6XF+gzDL1aC5DCsldai4XYYiVNdhtpGbA/GM6iyQ8ayhSp3a148LY34hy7A4TxZA== - dependencies: - "@types/d3-path" "*" - -"@types/d3-time-format@*": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-time-format/-/d3-time-format-4.0.0.tgz#ee7b6e798f8deb2d9640675f8811d0253aaa1946" - integrity sha512-yjfBUe6DJBsDin2BMIulhSHmr5qNR5Pxs17+oW4DoVPyVIXZ+m6bs7j1UVKP08Emv6jRmYrYqxYzO63mQxy1rw== - -"@types/d3-time@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-3.0.0.tgz#e1ac0f3e9e195135361fa1a1d62f795d87e6e819" - integrity sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg== - -"@types/d3-timer@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/d3-timer/-/d3-timer-3.0.0.tgz#e2505f1c21ec08bda8915238e397fb71d2fc54ce" - integrity sha512-HNB/9GHqu7Fo8AQiugyJbv6ZxYz58wef0esl4Mv828w1ZKpAshw/uFWVDUcIB9KKFeFKoxS3cHY07FFgtTRZ1g== - -"@types/d3-transition@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-transition/-/d3-transition-3.0.1.tgz#c9a96125567173d6163a6985b874f79154f4cc3d" - integrity sha512-Sv4qEI9uq3bnZwlOANvYK853zvpdKEm1yz9rcc8ZTsxvRklcs9Fx4YFuGA3gXoQN/c/1T6QkVNjhaRO/cWj94g== - dependencies: - "@types/d3-selection" "*" - -"@types/d3-zoom@*": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/d3-zoom/-/d3-zoom-3.0.1.tgz#4bfc7e29625c4f79df38e2c36de52ec3e9faf826" - integrity sha512-7s5L9TjfqIYQmQQEUcpMAcBOahem7TRoSO/+Gkz02GbMVuULiZzjF2BOdw291dbO2aNon4m2OdFsRGaCq2caLQ== - dependencies: - "@types/d3-interpolate" "*" - "@types/d3-selection" "*" - -"@types/d3@^7.4.0": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@types/d3/-/d3-7.4.0.tgz#fc5cac5b1756fc592a3cf1f3dc881bf08225f515" - integrity sha512-jIfNVK0ZlxcuRDKtRS/SypEyOQ6UHaFQBKv032X45VvxSJ6Yi5G9behy9h6tNTHTDGh5Vq+KbmBjUWLgY4meCA== - dependencies: - "@types/d3-array" "*" - "@types/d3-axis" "*" - "@types/d3-brush" "*" - "@types/d3-chord" "*" - "@types/d3-color" "*" - "@types/d3-contour" "*" - "@types/d3-delaunay" "*" - "@types/d3-dispatch" "*" - "@types/d3-drag" "*" - "@types/d3-dsv" "*" - "@types/d3-ease" "*" - "@types/d3-fetch" "*" - "@types/d3-force" "*" - "@types/d3-format" "*" - "@types/d3-geo" "*" - "@types/d3-hierarchy" "*" - "@types/d3-interpolate" "*" - "@types/d3-path" "*" - "@types/d3-polygon" "*" - "@types/d3-quadtree" "*" - "@types/d3-random" "*" - "@types/d3-scale" "*" - "@types/d3-scale-chromatic" "*" - "@types/d3-selection" "*" - "@types/d3-shape" "*" - "@types/d3-time" "*" - "@types/d3-time-format" "*" - "@types/d3-timer" "*" - "@types/d3-transition" "*" - "@types/d3-zoom" "*" - -"@types/debug@^4.0.0": - version "4.1.7" - resolved "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz" - integrity sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg== - dependencies: - "@types/ms" "*" - -"@types/express-serve-static-core@^4.17.9": - version "4.17.28" - resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz" - integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/geojson@*": - version "7946.0.8" - resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.8.tgz#30744afdb385e2945e22f3b033f897f76b1f12ca" - integrity sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA== - -"@types/glob@^7.1.1": - version "7.2.0" - resolved "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -"@types/graceful-fs@^4.1.2": - version "4.1.5" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz" - dependencies: - "@types/node" "*" - -"@types/hast@^2.0.0": - version "2.3.4" - resolved "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz" - integrity sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g== - dependencies: - "@types/unist" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.3" - resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz" - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz" - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@*", "@types/jest@^27.4.1": - version "27.4.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.4.1.tgz#185cbe2926eaaf9662d340cc02e548ce9e11ab6d" - integrity sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw== - dependencies: - jest-matcher-utils "^27.0.0" - pretty-format "^27.0.0" - -"@types/json-schema@^7.0.9": - version "7.0.9" - resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz" - integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - -"@types/lodash@^4.14.159": - version "4.14.178" - resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.178.tgz" - integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== - -"@types/lodash@^4.14.175": - version "4.14.175" - resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.175.tgz" - integrity sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw== - -"@types/long@^4.0.1": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" - integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== - -"@types/mdast@^3.0.0": - version "3.0.10" - resolved "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz" - integrity sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA== - dependencies: - "@types/unist" "*" - -"@types/mdurl@^1.0.0": - version "1.0.2" - resolved "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz" - integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA== - -"@types/minimatch@*": - version "3.0.5" - resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz" - integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== - -"@types/ms@*": - version "0.7.31" - resolved "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz" - integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== - -"@types/node@*", "@types/node@>=13.7.0": - version "17.0.38" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.38.tgz#f8bb07c371ccb1903f3752872c89f44006132947" - integrity sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g== - -"@types/node@10.12.18": - version "10.12.18" - resolved "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz" - integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== - -"@types/node@^12.12.54": - version "12.20.42" - resolved "https://registry.npmjs.org/@types/node/-/node-12.20.42.tgz" - integrity sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw== - -"@types/node@^14.0.1", "@types/node@^14.14.25": - version "14.18.12" - resolved "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz" - integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A== - -"@types/object-hash@^1.3.0": - version "1.3.4" - resolved "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz" - integrity sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA== - -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - -"@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== - dependencies: - "@types/node" "*" - -"@types/prettier@^2.1.5": - version "2.4.2" - resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz" - integrity sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA== - -"@types/promise-retry@^1.1.3": - version "1.1.3" - resolved "https://registry.npmjs.org/@types/promise-retry/-/promise-retry-1.1.3.tgz" - integrity sha512-LxIlEpEX6frE3co3vCO2EUJfHIta1IOmhDlcAsR4GMMv9hev1iTI9VwberVGkePJAuLZs5rMucrV8CziCfuJMw== - dependencies: - "@types/retry" "*" - -"@types/prop-types@*": - version "15.7.3" - resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz" - -"@types/qs@*": - version "6.9.7" - resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/range-parser@*": - version "1.2.4" - resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== - -"@types/react@^17.0.38", "@types/react@^17.0.44": - version "17.0.44" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" - integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - -"@types/retry@*", "@types/retry@^0.12.1": - version "0.12.1" - resolved "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz" - integrity sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g== - -"@types/retry@^0.12.2": - version "0.12.2" - resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" - integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== - -"@types/scheduler@*": - version "0.16.1" - resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz" - -"@types/secp256k1@^4.0.1": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" - integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== - dependencies: - "@types/node" "*" - -"@types/stack-utils@^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz" - -"@types/testing-library__jest-dom@^5.9.1": - version "5.14.2" - resolved "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.2.tgz" - integrity sha512-vehbtyHUShPxIa9SioxDwCvgxukDMH//icJG90sXQBUm5lJOHLT5kNeU9tnivhnA/TkOFMzGIXN2cTc4hY8/kg== - dependencies: - "@types/jest" "*" - -"@types/unist@*", "@types/unist@^2.0.0": - version "2.0.6" - resolved "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz" - integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== - -"@types/ws@^7.4.4": - version "7.4.7" - resolved "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz" - integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== - dependencies: - "@types/node" "*" - -"@types/yargs-parser@*": - version "20.2.0" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz" - -"@types/yargs@^15.0.0": - version "15.0.13" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz" - dependencies: - "@types/yargs-parser" "*" - -"@types/yargs@^16.0.0": - version "16.0.4" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz" - integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== - dependencies: - "@types/yargs-parser" "*" - -"@typescript-eslint/eslint-plugin@^5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz#bfc22e0191e6404ab1192973b3b4ea0461c1e878" - integrity sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg== - dependencies: - "@typescript-eslint/scope-manager" "5.21.0" - "@typescript-eslint/type-utils" "5.21.0" - "@typescript-eslint/utils" "5.21.0" - debug "^4.3.2" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.2.0" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/parser@^5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.18.0.tgz#2bcd4ff21df33621df33e942ccb21cb897f004c6" - integrity sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ== - dependencies: - "@typescript-eslint/scope-manager" "5.18.0" - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/typescript-estree" "5.18.0" - debug "^4.3.2" - -"@typescript-eslint/scope-manager@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz#a7d7b49b973ba8cebf2a3710eefd457ef2fb5505" - integrity sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ== - dependencies: - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/visitor-keys" "5.18.0" - -"@typescript-eslint/scope-manager@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz#a4b7ed1618f09f95e3d17d1c0ff7a341dac7862e" - integrity sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ== - dependencies: - "@typescript-eslint/types" "5.21.0" - "@typescript-eslint/visitor-keys" "5.21.0" - -"@typescript-eslint/type-utils@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz#ff89668786ad596d904c21b215e5285da1b6262e" - integrity sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw== - dependencies: - "@typescript-eslint/utils" "5.21.0" - debug "^4.3.2" - tsutils "^3.21.0" - -"@typescript-eslint/types@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" - integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== - -"@typescript-eslint/types@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.21.0.tgz#8cdb9253c0dfce3f2ab655b9d36c03f72e684017" - integrity sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA== - -"@typescript-eslint/typescript-estree@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" - integrity sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ== - dependencies: - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/visitor-keys" "5.18.0" - debug "^4.3.2" - globby "^11.0.4" - is-glob "^4.0.3" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/typescript-estree@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz#9f0c233e28be2540eaed3df050f0d54fb5aa52de" - integrity sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg== - dependencies: - "@typescript-eslint/types" "5.21.0" - "@typescript-eslint/visitor-keys" "5.21.0" - debug "^4.3.2" - globby "^11.0.4" - is-glob "^4.0.3" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/utils@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.21.0.tgz#51d7886a6f0575e23706e5548c7e87bce42d7c18" - integrity sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q== - dependencies: - "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.21.0" - "@typescript-eslint/types" "5.21.0" - "@typescript-eslint/typescript-estree" "5.21.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - -"@typescript-eslint/visitor-keys@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60" - integrity sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg== - dependencies: - "@typescript-eslint/types" "5.18.0" - eslint-visitor-keys "^3.0.0" - -"@typescript-eslint/visitor-keys@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz#453fb3662409abaf2f8b1f65d515699c888dd8ae" - integrity sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA== - dependencies: - "@typescript-eslint/types" "5.21.0" - eslint-visitor-keys "^3.0.0" - -"@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== - dependencies: - big.js "^6.1.1" - decimal.js-light "^2.5.1" - tiny-invariant "^1.2.0" - toformat "^2.0.0" - tslib "^2.4.0" - -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - -JSONStream@^1.3.5: - version "1.3.5" - resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -abab@^2.0.3, abab@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz" - -abbrev@1, abbrev@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz" - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - -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" - resolved "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz" - integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A== - dependencies: - acorn "^7.0.0" - acorn-walk "^7.0.0" - xtend "^4.0.2" - -acorn-walk@^7.0.0, acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn-walk@^8.0.0, acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^7.0.0, acorn@^7.1.1: - version "7.4.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: - 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" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -agentkeepalive@^4.1.3: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" - integrity sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA== - dependencies: - debug "^4.1.0" - depd "^1.1.2" - humanize-ms "^1.2.1" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - -ajv-keywords@^3.1.0: - version "3.5.2" - resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-colors@4.1.1, ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-colors@^3.0.0: - version "3.2.4" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz" - integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== - -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" - dependencies: - type-fest "^0.21.3" - -ansi-html-community@0.0.8: - version "0.0.8" - resolved "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz" - integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-regex@^5.0.0, ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -ansicolors@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" - integrity sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk= - -ansistyles@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ansistyles/-/ansistyles-0.1.3.tgz#5de60415bda071bb37127854c864f41b23254539" - integrity sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk= - -any-promise@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -anymatch@^3.0.3, anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -"aproba@^1.0.3 || ^2.0.0", aproba@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -archy@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" - integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= - -are-we-there-yet@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz" - integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - -are-we-there-yet@~1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" - integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -arg@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/arg/-/arg-5.0.1.tgz" - integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -aria-query@^4.2.2: - version "4.2.2" - resolved "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz" - dependencies: - "@babel/runtime" "^7.10.2" - "@babel/runtime-corejs3" "^7.10.2" - -aria-query@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz" - integrity sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg== - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-flatten@^2.1.0: - version "2.1.2" - resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - -array-includes@^3.1.2, array-includes@^3.1.4: - version "3.1.4" - resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz" - integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - get-intrinsic "^1.1.1" - is-string "^1.0.7" - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz" - integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= - dependencies: - array-uniq "^1.0.1" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -array.prototype.flatmap@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz" - integrity sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.19.0" - -asap@^2.0.0: - version "2.0.6" - resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" - integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= - -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== - dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz" - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async-mutex@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.3.2.tgz#1485eda5bda1b0ec7c8df1ac2e815757ad1831df" - integrity sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA== - dependencies: - tslib "^2.3.1" - -async@^2.6.2: - version "2.6.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" - integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== - dependencies: - lodash "^4.17.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -autoprefixer@^10.2.5: - version "10.2.5" - resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.2.5.tgz" - dependencies: - browserslist "^4.16.3" - caniuse-lite "^1.0.30001196" - colorette "^1.2.2" - fraction.js "^4.0.13" - normalize-range "^0.1.2" - postcss-value-parser "^4.1.0" - -autoprefixer@^9.6.1: - version "9.8.6" - resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz" - dependencies: - browserslist "^4.12.0" - caniuse-lite "^1.0.30001109" - colorette "^1.2.1" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.32" - postcss-value-parser "^4.1.0" - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - -axios@^0.21.1: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - -axios@^0.24.0: - version "0.24.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" - integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== - dependencies: - follow-redirects "^1.14.4" - -axios@^0.25.0: - version "0.25.0" - resolved "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz" - integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g== - dependencies: - follow-redirects "^1.14.7" - -axios@^0.26.0, axios@^0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" - integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== - dependencies: - follow-redirects "^1.14.8" - -babel-jest@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.5.tgz" - integrity sha512-3uuUTjXbgtODmSv/DXO9nZfD52IyC2OYTFaXGRzL0kpykzroaquCrD5+lZNafTvZlnNqZHt5pb0M08qVBZnsnA== - dependencies: - "@jest/transform" "^27.4.5" - "@jest/types" "^27.4.2" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^27.4.0" - chalk "^4.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - -babel-plugin-istanbul@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^4.0.0" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^27.4.0: - version "27.4.0" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz" - integrity sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" - "@types/babel__traverse" "^7.0.6" - -babel-plugin-macros@^2.6.1, babel-plugin-macros@^2.8.0: - version "2.8.0" - resolved "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz" - dependencies: - "@babel/runtime" "^7.7.2" - cosmiconfig "^6.0.0" - resolve "^1.12.0" - -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^27.4.0: - version "27.4.0" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz" - integrity sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg== - dependencies: - babel-plugin-jest-hoist "^27.4.0" - babel-preset-current-node-syntax "^1.0.0" - -bail@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/bail/-/bail-2.0.1.tgz" - integrity sha512-d5FoTAr2S5DSUPKl85WNm2yUwsINN8eidIdIwsOge2t33DaOfOdSmmsI11jMN3GmALCXaw+Y6HMVHDzePshFAA== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base-x@^3.0.2, base-x@^3.0.6: - version "3.0.9" - resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.3.1, base64-js@^1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base64url@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" - integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.npmjs.org/base/-/base-0.11.2.tgz" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -big.js@^6.1.1: - version "6.1.1" - resolved "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz" - integrity sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg== - -bigint-buffer@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" - integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== - dependencies: - bindings "^1.3.0" - -bignumber.js@^9.0.1, bignumber.js@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" - integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== - -bin-links@^2.2.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-2.3.0.tgz#1ff241c86d2c29b24ae52f49544db5d78a4eb967" - integrity sha512-JzrOLHLwX2zMqKdyYZjkDgQGT+kHDkIhv2/IK2lJ00qLxV4TmFoHi8drDBb6H5Zrz1YfgHkai4e2MGPqnoUhqA== - dependencies: - cmd-shim "^4.0.1" - mkdirp-infer-owner "^2.0.0" - npm-normalize-package-bin "^1.0.0" - read-cmd-shim "^2.0.0" - rimraf "^3.0.0" - write-file-atomic "^3.0.3" - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -binary-extensions@^2.0.0, binary-extensions@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bindings@^1.3.0, bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bip32@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz" - integrity sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA== - dependencies: - "@types/node" "10.12.18" - bs58check "^2.1.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - tiny-secp256k1 "^1.1.3" - typeforce "^1.11.5" - wif "^2.0.6" - -bip66@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" - integrity sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw== - dependencies: - safe-buffer "^5.0.1" - -blakejs@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" - integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== - -bluebird@3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@^4.11.8, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -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: - version "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" - integrity sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA== - dependencies: - bytes "3.1.1" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.8.1" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.9.6" - raw-body "2.4.2" - type-is "~1.6.18" - -bonjour@^3.5.0: - version "3.5.0" - resolved "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz" - integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU= - dependencies: - array-flatten "^2.1.0" - deep-equal "^1.0.1" - dns-equal "^1.0.0" - dns-txt "^2.0.2" - multicast-dns "^6.0.1" - multicast-dns-service-types "^1.1.0" - -borsh@^0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/borsh/-/borsh-0.3.1.tgz" - integrity sha512-gJoSTnhwLxN/i2+15Y7uprU8h3CKI+Co4YKZKvrGYUy0FwHWM20x5Sx7eU8Xv4HQqV+7rb4r3P7K1cBIQe3q8A== - dependencies: - "@types/bn.js" "^4.11.5" - bn.js "^5.0.0" - bs58 "^4.0.0" - text-encoding-utf-8 "^1.0.2" - -borsh@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/borsh/-/borsh-0.4.0.tgz" - integrity sha512-aX6qtLya3K0AkT66CmYWCCDr77qsE9arV05OmdFpmat9qu8Pg9J5tBUPDztAW5fNh/d/MyVG/OYziP52Ndzx1g== - dependencies: - "@types/bn.js" "^4.11.5" - bn.js "^5.0.0" - bs58 "^4.0.0" - text-encoding-utf-8 "^1.0.2" - -borsh@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/borsh/-/borsh-0.6.0.tgz" - integrity sha512-sl5k89ViqsThXQpYa9XDtz1sBl3l1lI313cFUY1HKr+wvMILnb+58xpkqTNrYbelh99dY7K8usxoCusQmqix9Q== - dependencies: - bn.js "^5.2.0" - bs58 "^4.0.0" - text-encoding-utf-8 "^1.0.2" - -borsh@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" - integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== - dependencies: - bn.js "^5.2.0" - bs58 "^4.0.0" - text-encoding-utf-8 "^1.0.2" - -bowser@^2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" - integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.0.6, browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.3, browserslist@^4.6.4: - version "4.16.5" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.16.5.tgz" - dependencies: - caniuse-lite "^1.0.30001214" - colorette "^1.2.2" - electron-to-chromium "^1.3.719" - escalade "^3.1.1" - node-releases "^1.1.71" - -browserslist@^4.17.5: - version "4.19.1" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz" - integrity sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A== - dependencies: - caniuse-lite "^1.0.30001286" - electron-to-chromium "^1.4.17" - escalade "^3.1.1" - node-releases "^2.0.1" - picocolors "^1.0.0" - -bs58@4.0.1, bs58@^4.0.0, bs58@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= - dependencies: - base-x "^3.0.2" - -bs58check@<3.0.0, bs58check@^2.1.1, bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz" - -buffer-indexof@^1.0.0: - version "1.1.1" - resolved "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz" - integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== - -buffer-layout@1.2.2, buffer-layout@^1.2.0, buffer-layout@^1.2.1, buffer-layout@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz" - integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - -buffer@6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.1.tgz" - integrity sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3, buffer@~6.0.3: - version "6.0.3" - resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -bufferutil@^4.0.1: - version "4.0.6" - resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz" - integrity sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw== - dependencies: - node-gyp-build "^4.3.0" - -builtins@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz" - integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= - -bytebuffer@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" - integrity sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0= - dependencies: - long "~3" - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -bytes@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz" - integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg== - -bytes@^3.0.0: - version "3.1.2" - resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -cacache@^15.0.3, cacache@^15.0.5, cacache@^15.2.0, cacache@^15.3.0: - version "15.3.0" - resolved "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz" - integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== - dependencies: - "@npmcli/fs" "^1.0.0" - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^6.0.0" - minipass "^3.1.1" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.0.2" - unique-filename "^1.1.1" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase-css@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz" - integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== - -camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -camelcase@^6.2.0: - version "6.2.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz" - integrity sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA== - -caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001196, caniuse-lite@^1.0.30001214, caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001286: - version "1.0.30001327" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001327.tgz" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -ccount@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz" - integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.0.0: - version "4.1.1" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz" - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.1.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chan@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/chan/-/chan-0.6.1.tgz" - integrity sha1-7ArRMuW8YsJ+8QzL/E2NzYygBkA= - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" - -character-entities-legacy@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-2.0.0.tgz" - integrity sha512-YwaEtEvWLpFa6Wh3uVLrvirA/ahr9fki/NUd/Bd4OR6EdJ8D22hovYQEOUCBfQfcqnC4IAMGMsHXY1eXgL4ZZA== - -character-entities@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/character-entities/-/character-entities-2.0.0.tgz" - integrity sha512-oHqMj3eAuJ77/P5PaIRcqk+C3hdfNwyCD2DAUcD5gyXkegAuF2USC40CEqPscDk4I8FRGMTojGJQkXDsN5QlJA== - -character-reference-invalid@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.0.tgz" - integrity sha512-pE3Z15lLRxDzWJy7bBHBopRwfI20sbrMVLQTC7xsPglCHf4Wv1e167OgYAFP78co2XlhojDyAqA+IAJse27//g== - -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" - integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= - -chokidar@3.5.3, chokidar@^3.5.2, chokidar@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - -ci-info@^3.2.0: - version "3.3.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz" - integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== - -cidr-regex@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/cidr-regex/-/cidr-regex-3.1.1.tgz" - integrity sha512-RBqYd32aDwbCMFJRL6wHOlDNYJsPNTt8vC82ErHF5vKt8QQzxm1FrkW8s/R5pVrXMf17sba09Uoy91PKiddAsw== - dependencies: - ip-regex "^4.1.0" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -circular-json@^0.5.9: - version "0.5.9" - resolved "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz" - integrity sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ== - -cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -classnames@2.x, classnames@^2.2.1, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz" - -clean-set@^1.1.1: - version "1.1.2" - resolved "https://registry.npmjs.org/clean-set/-/clean-set-1.1.2.tgz" - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" - -clean-stack@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz" - integrity sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg== - dependencies: - escape-string-regexp "4.0.0" - -cli-columns@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/cli-columns/-/cli-columns-3.1.2.tgz" - integrity sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4= - dependencies: - string-width "^2.0.0" - strip-ansi "^3.0.1" - -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz" - dependencies: - restore-cursor "^3.1.0" - -cli-table3@^0.6.0: - version "0.6.2" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.2.tgz#aaf5df9d8b5bf12634dc8b3040806a0c07120d2a" - integrity sha512-QyavHCaIC80cMivimWu4aWHilIpiDpfm3hGmqAmXVL1UsnbLuBSMd21hTX6VY4ZSDSM73ESLeF8TOYId3rBTbw== - dependencies: - string-width "^4.2.0" - optionalDependencies: - "@colors/colors" "1.5.0" - -cli-truncate@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz" - dependencies: - slice-ansi "^3.0.0" - string-width "^4.2.0" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - -clsx@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" - integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== - -cmd-shim@^4.0.1: - version "4.1.0" - resolved "https://registry.npmjs.org/cmd-shim/-/cmd-shim-4.1.0.tgz" - integrity sha512-lb9L7EM4I/ZRVuljLPEtUJOP+xiQVknZ4ZMpMgEp4JzNldPb27HU03hi6K1/6CoIuit/Zm/LQXySErFeXxDprw== - dependencies: - mkdirp-infer-owner "^2.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0, color-convert@^1.9.3: - version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@^1.0.0, color-name@^1.1.4, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-string@^1.6.0, color-string@^1.9.0: - version "1.9.0" - resolved "https://registry.npmjs.org/color-string/-/color-string-1.9.0.tgz" - integrity sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - -color-support@^1.1.2: - version "1.1.3" - resolved "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -color@^3.1.3: - version "3.2.1" - resolved "https://registry.npmjs.org/color/-/color-3.2.1.tgz" - integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA== - dependencies: - color-convert "^1.9.3" - color-string "^1.6.0" - -color@^4.0.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/color/-/color-4.2.1.tgz#498aee5fce7fc982606c8875cab080ac0547c884" - integrity sha512-MFJr0uY4RvTQUKvPq7dh9grVOTYSFeXja2mBXioCGjnjJoXrAp9jJ1NQTDR73c9nwBSAQiNKloKl5zq9WB9UPw== - dependencies: - color-convert "^2.0.1" - color-string "^1.9.0" - -colorette@^1.2.1, colorette@^1.2.2: - version "1.4.0" - resolved "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz" - integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== - -colors@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - -columnify@~1.5.4: - version "1.5.4" - resolved "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz" - integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= - dependencies: - strip-ansi "^3.0.0" - wcwidth "^1.0.0" - -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -comma-separated-tokens@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.2.tgz" - integrity sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg== - -commander@7: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@^2.20.3: - version "2.20.3" - resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^6.2.0: - version "6.2.1" - resolved "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz" - -commander@^8.0.0: - version "8.3.0" - resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -common-ancestor-path@^1.0.1: - version "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.3.0: - version "1.3.0" - 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: - version "2.0.18" - resolved "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@^1.7.4: - version "1.7.4" - resolved "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" - debug "2.6.9" - on-headers "~1.0.2" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -connect-history-api-fallback@^1.6.0: - version "1.6.0" - resolved "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== - -console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz" - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz" - integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== - -cookie@^0.4.1: - version "0.4.2" - 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" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -copy-to-clipboard@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae" - integrity sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw== - dependencies: - toggle-selection "^1.0.6" - -core-js-pure@^3.0.0: - version "3.11.0" - resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.11.0.tgz" - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -core-util-is@^1.0.2, core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz" - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.7.2" - -cosmiconfig@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz" - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -cosmiconfig@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz" - integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-fetch@3.0.6: - version "3.0.6" - resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.0.6.tgz" - integrity sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ== - dependencies: - node-fetch "2.6.1" - -cross-fetch@^3.1.4, cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -crypto-hash@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz" - integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== - -crypto-js@^4.0.0: - version "4.1.1" - resolved "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz" - integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== - -crypto-ts@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/crypto-ts/-/crypto-ts-1.0.2.tgz" - integrity sha1-wq5HtC8aiv/PM73b4yg5gxUMigU= - dependencies: - tslib "^1.7.1" - -crypto@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz" - integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig== - -css-blank-pseudo@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz" - dependencies: - postcss "^7.0.5" - -css-color-names@^0.0.4: - version "0.0.4" - resolved "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz" - integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= - -css-has-pseudo@^0.10.0: - version "0.10.0" - resolved "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-0.10.0.tgz" - dependencies: - postcss "^7.0.6" - postcss-selector-parser "^5.0.0-rc.4" - -css-prefers-color-scheme@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-3.1.1.tgz" - dependencies: - postcss "^7.0.5" - -css-unit-converter@^1.1.1: - version "1.1.2" - resolved "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.2.tgz" - integrity sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA== - -css.escape@^1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz" - integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s= - -css@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/css/-/css-3.0.0.tgz" - integrity sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ== - dependencies: - inherits "^2.0.4" - source-map "^0.6.1" - source-map-resolve "^0.6.0" - -cssdb@^4.4.0: - version "4.4.0" - resolved "https://registry.npmjs.org/cssdb/-/cssdb-4.4.0.tgz" - -cssesc@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz" - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz" - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz" - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz" - dependencies: - cssom "~0.3.6" - -csstype@^3.0.2: - version "3.0.8" - resolved "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz" - -csv-parse@^5.0.4: - version "5.0.4" - resolved "https://registry.npmjs.org/csv-parse/-/csv-parse-5.0.4.tgz" - integrity sha512-5AIdl8l6n3iYQYxan5djB5eKDa+vBnhfWZtRpJTcrETWfVLYN0WSj3L9RwvgYt+psoO77juUr8TG8qpfGZifVQ== - -d3-array@2, d3-array@^2.3.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.12.1.tgz#e20b41aafcdffdf5d50928004ececf815a465e81" - integrity sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ== - dependencies: - internmap "^1.0.0" - -"d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3: - version "3.1.6" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.1.6.tgz#0342c835925826f49b4d16eb7027aec334ffc97d" - integrity sha512-DCbBBNuKOeiR9h04ySRBMW52TFVc91O9wJziuyXw6Ztmy8D3oZbmCkOO3UHKC7ceNJsN2Mavo9+vwV8EAEUXzA== - dependencies: - internmap "1 - 2" - -d3-axis@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322" - integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== - -d3-brush@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c" - integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ== - dependencies: - d3-dispatch "1 - 3" - d3-drag "2 - 3" - d3-interpolate "1 - 3" - d3-selection "3" - d3-transition "3" - -d3-chord@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966" - integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g== - dependencies: - d3-path "1 - 3" - -"d3-color@1 - 2", d3-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-2.0.0.tgz#8d625cab42ed9b8f601a1760a389f7ea9189d62e" - integrity sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ== - -"d3-color@1 - 3", d3-color@3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" - integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== - -d3-contour@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-3.0.1.tgz#2c64255d43059599cd0dba8fe4cc3d51ccdd9bbd" - integrity sha512-0Oc4D0KyhwhM7ZL0RMnfGycLN7hxHB8CMmwZ3+H26PWAG0ozNuYG5hXSDNgmP1SgJkQMrlG6cP20HoaSbvcJTQ== - dependencies: - d3-array "2 - 3" - -d3-delaunay@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.2.tgz#7fd3717ad0eade2fc9939f4260acfb503f984e92" - integrity sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ== - dependencies: - delaunator "5" - -"d3-dispatch@1 - 3", d3-dispatch@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e" - integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== - -"d3-drag@2 - 3", d3-drag@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba" - integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg== - dependencies: - d3-dispatch "1 - 3" - d3-selection "3" - -"d3-dsv@1 - 3", d3-dsv@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" - integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== - dependencies: - commander "7" - iconv-lite "0.6" - rw "1" - -"d3-ease@1 - 3", d3-ease@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4" - integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== - -d3-fetch@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22" - integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw== - dependencies: - d3-dsv "1 - 3" - -d3-force@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4" - integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg== - dependencies: - d3-dispatch "1 - 3" - d3-quadtree "1 - 3" - d3-timer "1 - 3" - -"d3-format@1 - 2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-2.0.0.tgz#a10bcc0f986c372b729ba447382413aabf5b0767" - integrity sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA== - -"d3-format@1 - 3", d3-format@3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" - integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== - -d3-format@^1.4.4: - version "1.4.5" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.5.tgz#374f2ba1320e3717eb74a9356c67daee17a7edb4" - integrity sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ== - -d3-geo@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.0.1.tgz#4f92362fd8685d93e3b1fae0fd97dc8980b1ed7e" - integrity sha512-Wt23xBych5tSy9IYAM1FR2rWIBFWa52B/oF/GYe5zbdHrg08FU8+BuI6X4PvTwPDdqdAdq04fuWJpELtsaEjeA== - dependencies: - d3-array "2.5.0 - 3" - -d3-hierarchy@3: - version "3.1.2" - resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6" - integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA== - -"d3-interpolate@1 - 2", "d3-interpolate@1.2.0 - 2", d3-interpolate@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-2.0.1.tgz#98be499cfb8a3b94d4ff616900501a64abc91163" - integrity sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ== - dependencies: - d3-color "1 - 2" - -"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" - integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== - dependencies: - d3-color "1 - 3" - -d3-path@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" - integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== - -"d3-path@1 - 3", d3-path@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.0.1.tgz#f09dec0aaffd770b7995f1a399152bf93052321e" - integrity sha512-gq6gZom9AFZby0YLduxT1qmrp4xpBA1YZr19OI717WIdKE2OM5ETq5qrHLb301IgxhLwcuxvGZVLeeWc/k1I6w== - -d3-polygon@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398" - integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== - -"d3-quadtree@1 - 3", d3-quadtree@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f" - integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== - -d3-random@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" - integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== - -d3-scale-chromatic@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#15b4ceb8ca2bb0dcb6d1a641ee03d59c3b62376a" - integrity sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g== - dependencies: - d3-color "1 - 3" - d3-interpolate "1 - 3" - -d3-scale-chromatic@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-2.0.0.tgz#c13f3af86685ff91323dc2f0ebd2dabbd72d8bab" - integrity sha512-LLqy7dJSL8yDy7NRmf6xSlsFZ6zYvJ4BcWFE4zBrOPnQERv9zj24ohnXKRbyi9YHnYV+HN1oEO3iFK971/gkzA== - dependencies: - d3-color "1 - 2" - d3-interpolate "1 - 2" - -d3-scale@4: - version "4.0.2" - resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" - integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== - dependencies: - d3-array "2.10.0 - 3" - d3-format "1 - 3" - d3-interpolate "1.2.0 - 3" - d3-time "2.1.1 - 3" - d3-time-format "2 - 4" - -d3-scale@^3.2.3: - version "3.3.0" - resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-3.3.0.tgz#28c600b29f47e5b9cd2df9749c206727966203f3" - integrity sha512-1JGp44NQCt5d1g+Yy+GeOnZP7xHo0ii8zsQp6PGzd+C1/dl0KGsp9A7Mxwp+1D1o4unbTTxVdU/ZOIEBoeZPbQ== - dependencies: - d3-array "^2.3.0" - d3-format "1 - 2" - d3-interpolate "1.2.0 - 2" - d3-time "^2.1.1" - d3-time-format "2 - 3" - -"d3-selection@2 - 3", d3-selection@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31" - integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== - -d3-shape@3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.1.0.tgz#c8a495652d83ea6f524e482fca57aa3f8bc32556" - integrity sha512-tGDh1Muf8kWjEDT/LswZJ8WF85yDZLvVJpYU9Nq+8+yW1Z5enxrmXOhTArlkaElU+CTn0OTVNli+/i+HP45QEQ== - dependencies: - d3-path "1 - 3" - -d3-shape@^1.2.2, d3-shape@^1.3.5: - version "1.3.7" - resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" - integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== - dependencies: - d3-path "1" - -"d3-time-format@2 - 3", d3-time-format@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-3.0.0.tgz#df8056c83659e01f20ac5da5fdeae7c08d5f1bb6" - integrity sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag== - dependencies: - d3-time "1 - 2" - -"d3-time-format@2 - 4", d3-time-format@4: - version "4.1.0" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" - integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== - dependencies: - d3-time "1 - 3" - -"d3-time@1 - 2", d3-time@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-2.1.1.tgz#e9d8a8a88691f4548e68ca085e5ff956724a6682" - integrity sha512-/eIQe/eR4kCQwq7yxi7z4c6qEXf2IYGcjoWB5OOQy4Tq9Uv39/947qlDcN2TLkiTzQWzvnsuYPB9TrWaNfipKQ== - dependencies: - d3-array "2" - -"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975" - integrity sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ== - dependencies: - d3-array "2 - 3" - -d3-time@^1.0.11: - version "1.1.0" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1" - integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA== - -"d3-timer@1 - 3", d3-timer@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0" - integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== - -"d3-transition@2 - 3", d3-transition@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f" - integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w== - dependencies: - d3-color "1 - 3" - d3-dispatch "1 - 3" - d3-ease "1 - 3" - d3-interpolate "1 - 3" - d3-timer "1 - 3" - -d3-zoom@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3" - integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw== - dependencies: - d3-dispatch "1 - 3" - d3-drag "2 - 3" - d3-interpolate "1 - 3" - d3-selection "2 - 3" - d3-transition "2 - 3" - -d3@^7.4.4: - version "7.4.4" - resolved "https://registry.yarnpkg.com/d3/-/d3-7.4.4.tgz#bfbf87487c37d3196efebd5a63e3a0ed8299d8ff" - integrity sha512-97FE+MYdAlV3R9P74+R3Uar7wUKkIFu89UWMjEaDhiJ9VxKvqaMxauImy8PC2DdBkdM2BxJOIoLxPrcZUyrKoQ== - dependencies: - d3-array "3" - d3-axis "3" - d3-brush "3" - d3-chord "3" - d3-color "3" - d3-contour "3" - d3-delaunay "6" - d3-dispatch "3" - d3-drag "3" - d3-dsv "3" - d3-ease "3" - d3-fetch "3" - d3-force "3" - d3-format "3" - d3-geo "3" - d3-hierarchy "3" - d3-interpolate "3" - d3-path "3" - d3-polygon "3" - d3-quadtree "3" - d3-random "3" - d3-scale "4" - d3-scale-chromatic "3" - d3-selection "3" - d3-shape "3" - d3-time "3" - d3-time-format "4" - d3-timer "3" - d3-transition "3" - d3-zoom "3" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -data-uri-to-buffer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b" - integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA== - -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz" - dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - -dataloader@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz" - integrity sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw== - -dayjs@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.1.tgz#90b33a3dda3417258d48ad2771b415def6545eb0" - integrity sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA== - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - dependencies: - ms "2.0.0" - -debug@4, debug@4.3.3, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - -debug@4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - -debug@^3.1.1, debug@^3.2.6: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.2.0: - version "4.3.1" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz" - dependencies: - ms "2.1.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== - dependencies: - ms "2.1.2" - -debuglog@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz" - integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= - -decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -decimal.js-light@^2.5.1: - version "2.5.1" - resolved "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz" - integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg== - -decimal.js@^10.2.1, decimal.js@^10.3.1: - version "10.3.1" - resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz" - integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== - -decode-named-character-reference@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.1.tgz" - integrity sha512-YV/0HQHreRwKb7uBopyIkLG17jG6Sv2qUchk9qSoVJ2f+flwRsPNBO0hAnjt6mTNYUT+vw9Gy2ihXg4sUWPi2w== - dependencies: - character-entities "^2.0.0" - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" - -deep-equal@^1.0.1: - version "1.1.1" - resolved "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz" - integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== - dependencies: - is-arguments "^1.0.4" - is-date-object "^1.0.1" - is-regex "^1.0.4" - object-is "^1.0.1" - object-keys "^1.1.1" - regexp.prototype.flags "^1.2.0" - -deep-is@^0.1.3, deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" - -default-gateway@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz" - integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA== - dependencies: - execa "^1.0.0" - ip-regex "^2.1.0" - -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - dependencies: - clone "^1.0.2" - -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -defined@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -del@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/del/-/del-4.1.1.tgz" - integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== - dependencies: - "@types/glob" "^7.1.1" - globby "^6.1.0" - is-path-cwd "^2.0.0" - is-path-in-cwd "^2.0.0" - p-map "^2.0.0" - pify "^4.0.1" - rimraf "^2.6.3" - -delaunator@5: - version "5.0.0" - resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.0.tgz#60f052b28bd91c9b4566850ebf7756efe821d81b" - integrity sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw== - dependencies: - robust-predicates "^3.0.0" - -delay@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz" - integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -depd@^1.1.2, depd@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -dequal@2.0.2, dequal@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/dequal/-/dequal-2.0.2.tgz" - integrity sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug== - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" - -detect-node-es@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz" - integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== - -detect-node@2.1.0, detect-node@^2.0.4, detect-node@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" - integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== - -detective@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz" - integrity sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg== - dependencies: - acorn-node "^1.6.1" - defined "^1.0.0" - minimist "^1.1.1" - -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= - dependencies: - asap "^2.0.0" - wrappy "1" - -didyoumean@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" - integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== - -diff-sequences@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" - integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== - -diff@5.0.0, diff@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dlv@^1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz" - integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz" - integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= - -dns-packet@^1.3.1: - version "1.3.4" - resolved "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz" - integrity sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA== - dependencies: - ip "^1.1.0" - safe-buffer "^5.0.1" - -dns-txt@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz" - integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= - dependencies: - buffer-indexof "^1.0.0" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - dependencies: - esutils "^2.0.2" - -dom-accessibility-api@^0.5.4, dom-accessibility-api@^0.5.6: - version "0.5.10" - resolved "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.10.tgz" - integrity sha512-Xu9mD0UjrJisTmv7lmVSDMagQcU9R5hwAbxsaAE/35XPnPLJobbuREfV/rraiSaEj/UOvgrzQs66zyTWTlyd+g== - -dom-align@^1.7.0: - version "1.12.0" - resolved "https://registry.npmjs.org/dom-align/-/dom-align-1.12.0.tgz" - -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz" - dependencies: - webidl-conversions "^5.0.0" - -dot-case@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" - integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - -dotenv-expand@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-6.0.1.tgz" - integrity sha512-GNHcCOyRKLCXWnH3L/+sJ04PQxxgTOZDCPuQQnqkqPMGIilyoxHZ2JUNmh2VWKCfzVKH/AZsqcbuSYlDDVb/xw== - -dotenv@10.0.0, dotenv@^10.0.0: - version "10.0.0" - resolved "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz" - integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== - -dotenv@^8.6.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" - integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== - -drbg.js@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" - integrity sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g== - dependencies: - browserify-aes "^1.0.6" - create-hash "^1.1.2" - create-hmac "^1.1.4" - -dset@^2.0.1: - version "2.1.0" - resolved "https://registry.npmjs.org/dset/-/dset-2.1.0.tgz" - -duplexer@^0.1.2, duplexer@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ed2curve@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/ed2curve/-/ed2curve-0.3.0.tgz#322b575152a45305429d546b071823a93129a05d" - integrity sha512-8w2fmmq3hv9rCrcI7g9hms2pMunQr1JINfcjwR9tAyZqhtyaMN991lF/ZfHfr5tzZQ8c7y7aBgZbjfbd0fjFwQ== - dependencies: - tweetnacl "1.x.x" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.3.719: - version "1.3.720" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.720.tgz" - -electron-to-chromium@^1.4.17: - version "1.4.21" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.21.tgz" - integrity sha512-T04U2ciApGbm+dESFEBbewi2Xt0Dgyww8M4n4sOt9lnmFuYbaHEDWCROkx4jvAZDUWWry9YOdnAs+7468q80Qg== - -elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emittery@^0.8.1: - version "0.8.1" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -encoding@^0.1.12, encoding@^0.1.13: - version "0.1.13" - resolved "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -end-of-stream@^1.1.0, end-of-stream@^1.4.4: - version "1.4.4" - resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" - dependencies: - once "^1.4.0" - -engine.io-client@~6.2.1: - version "6.2.2" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.2.2.tgz#c6c5243167f5943dcd9c4abee1bfc634aa2cbdd0" - integrity sha512-8ZQmx0LQGRTYkHuogVZuGSpDqYZtCM/nv8zQ68VZ+JkOpazJ7ICdsSpaO6iXwvaU30oFg5QJOJWj8zWqhbKjkQ== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - engine.io-parser "~5.0.3" - ws "~8.2.3" - xmlhttprequest-ssl "~2.0.0" - -engine.io-parser@~5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" - integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== - -enhanced-resolve@^5.7.0: - version "5.9.3" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" - integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -enquirer@^2.3.6: - version "2.3.6" - resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz" - dependencies: - ansi-colors "^4.1.1" - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -err-code@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" - integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== - -errno@^0.1.3: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: - version "1.19.1" - resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz" - integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - is-callable "^1.2.4" - is-negative-zero "^2.0.1" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.1" - is-string "^1.0.7" - is-weakref "^1.0.1" - object-inspect "^1.11.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz" - integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= - -es6-promise@^4.0.3, es6-promise@^4.2.8: - version "4.2.8" - resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" - -escape-string-regexp@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz" - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -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.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" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz#4717de5227f55f3801a5fd51a16a4fa22b5914d2" - integrity sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ== - dependencies: - array-includes "^3.1.4" - array.prototype.flatmap "^1.2.5" - doctrine "^2.1.0" - estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.1.2" - object.entries "^1.1.5" - object.fromentries "^2.0.5" - object.hasown "^1.1.0" - object.values "^1.1.5" - prop-types "^15.8.1" - resolve "^2.0.0-next.3" - semver "^6.3.0" - string.prototype.matchall "^4.0.6" - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.0.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@^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.3.0" - "@humanwhocodes/config-array" "^0.9.2" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - 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.15.0" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -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.1" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - -esprima@^4.0.0, esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eth-rpc-errors@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz#6ddb6190a4bf360afda82790bb7d9d5e724f423a" - integrity sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg== - dependencies: - fast-safe-stringify "^2.0.6" - -ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereumjs-util@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz#a6885bcdd92045b06f596c7626c3e89ab3312458" - integrity sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A== - dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - rlp "^2.2.4" - -event-stream@=3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" - integrity sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE= - dependencies: - duplexer "~0.1.1" - from "~0" - map-stream "~0.1.0" - pause-stream "0.0.11" - split "0.3" - stream-combiner "~0.0.4" - through "~2.3.1" - -eventemitter3@^4.0.0, eventemitter3@^4.0.4, eventemitter3@^4.0.7: - version "4.0.7" - resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -events@^3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -eventsource@^1.0.7: - version "1.1.1" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.1.1.tgz#4544a35a57d7120fba4fa4c86cb4023b2c09df2f" - integrity sha512-qV5ZC0h7jYIAOhArFJgSfdyz6rALJyb270714o7ZtNnw2WSJ+eexhKtE0O8LYPRsHZHf2osHKZBxGPvm3kPkCA== - dependencies: - original "^1.0.0" - -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@5.1.1, execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz" - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= - dependencies: - homedir-polyfill "^1.0.1" - -expect@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/expect/-/expect-27.4.2.tgz" - integrity sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg== - dependencies: - "@jest/types" "^27.4.2" - ansi-styles "^5.0.0" - jest-get-type "^27.4.0" - jest-matcher-utils "^27.4.2" - jest-message-util "^27.4.2" - jest-regex-util "^27.4.0" - -express@^4.17.1: - version "4.17.2" - resolved "https://registry.npmjs.org/express/-/express-4.17.2.tgz" - integrity sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.4.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.9.6" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.17.2" - serve-static "1.14.2" - setprototypeof "1.2.0" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@^3.0.0, extend@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0, extsprintf@^1.2.0: - version "1.3.0" - resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -eyes@^0.1.8: - version "0.1.8" - resolved "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" - integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= - -fast-csv@^4.3.6: - version "4.3.6" - resolved "https://registry.npmjs.org/fast-csv/-/fast-csv-4.3.6.tgz" - integrity sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw== - dependencies: - "@fast-csv/format" "4.3.5" - "@fast-csv/parse" "4.3.6" - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - -fast-glob@^3.1.1: - version "3.2.7" - resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz" - integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-glob@^3.2.11, fast-glob@^3.2.7, fast-glob@^3.2.9: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - -fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" - integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== - -fast-stable-stringify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" - integrity sha1-XFVDRisiru79NtBbNOUceMuG0xM= - -fastest-levenshtein@^1.0.12: - version "1.0.12" - resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz" - integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== - -fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== - dependencies: - reusify "^1.0.4" - -faye-websocket@^0.11.3: - version "0.11.4" - resolved "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz" - integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== - dependencies: - websocket-driver ">=0.5.1" - -fb-watchman@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz" - dependencies: - bser "2.1.1" - -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.1.5" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.1.5.tgz#0077bf5f3fcdbd9d75a0b5362f77dbb743489863" - integrity sha512-N64ZpKqoLejlrwkIAnb9iLSA3Vx/kjgzpcDhygcqJ2KKjky8nCgUQ+dzXtbrLaWZGZNmNfQTsiQ0weZ1svglHg== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - -figures@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz" - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - dependencies: - flat-cache "^3.0.4" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -find-root@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz" - -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find@^0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/find/-/find-0.3.0.tgz" - integrity sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw== - dependencies: - traverse-chain "~0.1.0" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -flatted@^3.1.0: - version "3.2.5" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" - integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== - -flatten@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" - integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== - -focus-lock@^0.10.1: - version "0.10.2" - resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.10.2.tgz#561c62bae8387ecba1dd8e58a6df5ec29835c644" - integrity sha512-DSaI/UHZ/02sg1P616aIWgToQcrKKBmcCvomDZ1PZvcJFj350PnWhSJxJ76T3e5/GbtQEARIACtbrdlrF9C5kA== - dependencies: - tslib "^2.0.3" - -focus-visible@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/focus-visible/-/focus-visible-5.2.0.tgz#3a9e41fccf587bd25dcc2ef045508284f0a4d6b3" - integrity sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ== - -follow-redirects@^1.0.0, follow-redirects@^1.14.4, follow-redirects@^1.14.7, follow-redirects@^1.14.8: - version "1.14.9" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" - integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== - -follow-redirects@^1.14.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4" - integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ== - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - -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" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fp-ts@^2.12.1: - version "2.12.1" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.12.1.tgz#e389488bfd1507af06bd5965e97367edcd4fabad" - integrity sha512-oxvgqUYR6O9VkKXrxkJ0NOyU0FrE705MeqgBUMEPWyTu6Pwn768cJbHChw2XOBlgFLKfIHxjr2OOBFpv2mUGZw== - -fraction.js@^4.0.13: - version "4.2.0" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" - integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -from@~0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" - integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= - -fs-extra@^10.0.0: - version "10.0.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz" - integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-extra@^8.1: - version "8.1.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-minipass@^2.0.0, fs-minipass@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fs@0.0.1-security, fs@^0.0.1-security: - version "0.0.1-security" - resolved "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz" - integrity sha1-invTcYa23d84E/I4WLV+yq9eQdQ= - -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - -gauge@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" - integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.2" - console-control-strings "^1.0.0" - has-unicode "^2.0.1" - object-assign "^4.1.1" - signal-exit "^3.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.2" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - -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-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" - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - -get-nonce@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz" - integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== - -get-own-enumerable-property-symbols@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - -get-stream@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz" - dependencies: - pump "^3.0.0" - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.1, glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@7.2.0, glob@^7.0.0, glob@^7.0.3, glob@^7.1.2, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.1, glob@^7.1.3: - version "7.1.6" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - -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" - -globby@^11.0.1: - version "11.1.0" - resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -globby@^11.0.4: - version "11.0.4" - resolved "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz" - integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz" - integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= - dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -goblingold-sdk@^1.2.35: - version "1.2.35" - resolved "https://registry.yarnpkg.com/goblingold-sdk/-/goblingold-sdk-1.2.35.tgz#918ba1dddadfbf12132d10f0d841d62525612e68" - integrity sha512-TiDwIenuLKrlCzlZVYXxALa2YOfR/tG3GxHc5w7qv2UXqAZDnQ9eIUJVEk/FMR20dX/MPrfxfiJxXH8zVO8xrg== - dependencies: - "@project-serum/anchor" "^0.24.2" - "@solana/buffer-layout" "^4.0.0" - "@solana/buffer-layout-utils" "^0.2.0" - "@solana/spl-token" "^0.2.0" - "@solana/web3.js" "^1.42.0" - isomorphic-unfetch "^3.1.0" - sha256-uint8array "^0.10.3" - typescript "^4.6.2" - -graceful-fs@^4.1.11, graceful-fs@^4.2.4: - version "4.2.8" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz" - integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== - -graceful-fs@^4.1.2, graceful-fs@^4.2.3, graceful-fs@^4.2.8: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.9" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -gzip-size@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz" - integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== - dependencies: - duplexer "^0.1.2" - -handle-thing@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz" - integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== - -handlebars@^4.7.7: - version "4.7.7" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" - integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.0" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-bigints@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbols@^1.0.1, has-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has-unicode@^2.0.0, has-unicode@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: - version "1.1.7" - resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -hex-color-regex@^1.1.0: - version "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" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: - version "3.3.2" - resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" - dependencies: - react-is "^16.7.0" - -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - -hosted-git-info@^4.0.1, hosted-git-info@^4.0.2: - version "4.1.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" - integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== - dependencies: - lru-cache "^6.0.0" - -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz" - integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - -hsl-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz" - integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= - -hsla-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz" - integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= - -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz" - dependencies: - whatwg-encoding "^1.0.5" - -html-entities@^1.3.1: - version "1.4.0" - resolved "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz" - integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - -html-tags@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz" - integrity sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg== - -http-cache-semantics@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" - integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= - -http-errors@1.8.1: - version "1.8.1" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz" - integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-parser-js@>=0.5.1: - version "0.5.5" - resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz" - integrity sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA== - -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -http-proxy-middleware@0.19.1: - version "0.19.1" - resolved "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz" - integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== - dependencies: - http-proxy "^1.17.0" - is-glob "^4.0.0" - lodash "^4.17.11" - micromatch "^3.1.10" - -http-proxy@^1.17.0: - version "1.18.1" - resolved "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" - integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= - dependencies: - ms "^2.0.0" - -husky@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz" - -i@^0.3.7: - version "0.3.7" - resolved "https://registry.npmjs.org/i/-/i-0.3.7.tgz" - integrity sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q== - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@0.6, iconv-lite@^0.6.2: - version "0.6.3" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore-walk@^3.0.3: - version "3.0.4" - resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz" - integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== - dependencies: - minimatch "^3.0.4" - -ignore@^5.1.4, ignore@^5.1.8, ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== - -immediate@~3.0.5: - version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" - integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= - -immer@^9.0.12: - version "9.0.12" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.12.tgz#2d33ddf3ee1d247deab9d707ca472c8c942a0f20" - integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA== - -import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-local@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - -import-local@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz" - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz" - -infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@^1.3.4: - version "1.3.8" - resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -ini@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz" - integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== - -init-package-json@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/init-package-json/-/init-package-json-2.0.5.tgz" - integrity sha512-u1uGAtEFu3VA6HNl/yUWw57jmKEMx8SKOxHhxjGnOFUiIlFnohKDFg4ZrPpv9wWqk44nDxGJAtqjdQFm+9XXQA== - dependencies: - npm-package-arg "^8.1.5" - promzard "^0.3.0" - read "~1.0.1" - read-package-json "^4.1.1" - semver "^7.3.5" - validate-npm-package-license "^3.0.4" - validate-npm-package-name "^3.0.0" - -inline-style-parser@0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz" - integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== - -internal-ip@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz" - integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== - dependencies: - default-gateway "^4.2.0" - ipaddr.js "^1.9.0" - -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz" - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - -"internmap@1 - 2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" - integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== - -internmap@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/internmap/-/internmap-1.0.1.tgz#0017cc8a3b99605f0302f2b198d272e015e5df95" - integrity sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw== - -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - -invariant@^2.2.4: - version "2.2.4" - resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -ip-regex@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz" - integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= - -ip-regex@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz" - integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== - -ip@^1.1.0, ip@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= - -ipaddr.js@1.9.1, ipaddr.js@^1.9.0: - version "1.9.1" - resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-absolute-url@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz" - integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-alphabetical@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.0.tgz" - integrity sha512-5OV8Toyq3oh4eq6sbWTYzlGdnMT/DPI5I0zxUBxjiigQsZycpkKF3kskkao3JyYGuYDHvhgJF+DrjMQp9SX86w== - -is-alphanumerical@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.0.tgz" - integrity sha512-t+2GlJ+hO9yagJ+jU3+HSh80VKvz/3cG2cxbGGm4S0hjKuhWQXgPVUVOZz3tqZzMjhmphZ+1TIJTlRZRoe6GCQ== - dependencies: - is-alphabetical "^2.0.0" - is-decimal "^2.0.0" - -is-arguments@^1.0.4: - version "1.1.1" - resolved "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-buffer@^2.0.0: - version "2.0.5" - resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-callable@^1.1.4, is-callable@^1.2.4: - version "1.2.4" - resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz" - integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== - -is-cidr@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/is-cidr/-/is-cidr-4.0.2.tgz" - integrity sha512-z4a1ENUajDbEl/Q6/pVBpTR1nBjjEE1X7qb7bmWYanNnPoKAvUCPFKeXV6Fe4mgTkWKBqiHIcwsI3SndiO5FeA== - dependencies: - cidr-regex "^3.1.1" - -is-color-stop@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz" - integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= - dependencies: - css-color-names "^0.0.4" - hex-color-regex "^1.1.0" - hsl-regex "^1.0.0" - hsla-regex "^1.0.0" - rgb-regex "^1.0.1" - rgba-regex "^1.0.0" - -is-core-module@^2.2.0, is-core-module@^2.8.1: - version "2.8.1" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz" - integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== - dependencies: - has "^1.0.3" - -is-core-module@^2.5.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== - dependencies: - has "^1.0.3" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-decimal@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.0.tgz" - integrity sha512-QfrfjQV0LjoWQ1K1XSoEZkTAzSa14RKVMa5zg3SdAfzEmQzRM4+tbSFWb78creCeA9rNBzaZal92opi1TwPWZw== - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-hexadecimal@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.0.tgz" - integrity sha512-vGOtYkiaxwIiR0+Ng/zNId+ZZehGfINwTzdrDqc6iubbnQWhnPuYymOzOKUDqa2cSl59yHnEh2h6MvRLQsyNug== - -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz" - integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU= - -is-nan@^1.2.1: - version "1.3.2" - resolved "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - -is-negative-zero@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz" - integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== - -is-number-object@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz" - integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz" - -is-path-cwd@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz" - integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== - -is-path-in-cwd@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz" - integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== - dependencies: - is-path-inside "^2.1.0" - -is-path-inside@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz" - integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== - dependencies: - path-is-inside "^1.0.2" - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-plain-obj@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.0.0.tgz" - integrity sha512-NXRbBtUdBioI73y/HmOhogw/U5msYPC9DAtGkJXeFcFWSFZw0mCUsPxk/snTuJHzNKA8kLBK4rH97RMB1BfCXw== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - -is-regex@^1.0.4, is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz" - -is-shared-array-buffer@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz" - integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz" - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.3, is-typed-array@^1.1.7: - version "1.1.8" - resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz" - integrity sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" - has-tostringtag "^1.0.0" - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" - -is-weakref@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz" - integrity sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ== - dependencies: - call-bind "^1.0.0" - -is-windows@^1.0.1, is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - -is-wsl@^2.1.1: - version "2.2.0" - resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isomorphic-fetch@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz" - integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA== - dependencies: - node-fetch "^2.6.1" - whatwg-fetch "^3.4.1" - -isomorphic-unfetch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" - integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== - dependencies: - node-fetch "^2.6.1" - unfetch "^4.2.0" - -isomorphic-ws@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz" - integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -istanbul-lib-coverage@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz" - -istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz" - dependencies: - "@babel/core" "^7.7.5" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz" - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz" - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jayson@^3.4.4: - version "3.6.6" - resolved "https://registry.npmjs.org/jayson/-/jayson-3.6.6.tgz" - integrity sha512-f71uvrAWTtrwoww6MKcl9phQTC+56AopLyEenWvKVAIMz+q0oVGj6tenLZ7Z6UiPBkJtKLj4kt0tACllFQruGQ== - dependencies: - "@types/connect" "^3.4.33" - "@types/express-serve-static-core" "^4.17.9" - "@types/lodash" "^4.14.159" - "@types/node" "^12.12.54" - "@types/ws" "^7.4.4" - JSONStream "^1.3.5" - commander "^2.20.3" - delay "^5.0.0" - es6-promisify "^5.0.0" - eyes "^0.1.8" - isomorphic-ws "^4.0.1" - json-stringify-safe "^5.0.1" - lodash "^4.17.20" - uuid "^8.3.2" - ws "^7.4.5" - -jest-changed-files@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz" - integrity sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A== - dependencies: - "@jest/types" "^27.4.2" - execa "^5.0.0" - throat "^6.0.1" - -jest-circus@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.5.tgz" - integrity sha512-eTNWa9wsvBwPykhMMShheafbwyakcdHZaEYh5iRrQ0PFJxkDP/e3U/FvzGuKWu2WpwUA3C3hPlfpuzvOdTVqnw== - dependencies: - "@jest/environment" "^27.4.4" - "@jest/test-result" "^27.4.2" - "@jest/types" "^27.4.2" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - expect "^27.4.2" - is-generator-fn "^2.0.0" - jest-each "^27.4.2" - jest-matcher-utils "^27.4.2" - jest-message-util "^27.4.2" - jest-runtime "^27.4.5" - jest-snapshot "^27.4.5" - jest-util "^27.4.2" - pretty-format "^27.4.2" - slash "^3.0.0" - stack-utils "^2.0.3" - throat "^6.0.1" - -jest-cli@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.5.tgz" - integrity sha512-hrky3DSgE0u7sQxaCL7bdebEPHx5QzYmrGuUjaPLmPE8jx5adtvGuOlRspvMoVLTTDOHRnZDoRLYJuA+VCI7Hg== - dependencies: - "@jest/core" "^27.4.5" - "@jest/test-result" "^27.4.2" - "@jest/types" "^27.4.2" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - import-local "^3.0.2" - jest-config "^27.4.5" - jest-util "^27.4.2" - jest-validate "^27.4.2" - prompts "^2.0.1" - yargs "^16.2.0" - -jest-config@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-27.4.5.tgz" - integrity sha512-t+STVJtPt+fpqQ8GBw850NtSQbnDOw/UzdPfzDaHQ48/AylQlW7LHj3dH+ndxhC1UxJ0Q3qkq7IH+nM1skwTwA== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.4.5" - "@jest/types" "^27.4.2" - babel-jest "^27.4.5" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.1" - graceful-fs "^4.2.4" - jest-circus "^27.4.5" - jest-environment-jsdom "^27.4.4" - jest-environment-node "^27.4.4" - jest-get-type "^27.4.0" - jest-jasmine2 "^27.4.5" - jest-regex-util "^27.4.0" - jest-resolve "^27.4.5" - jest-runner "^27.4.5" - jest-util "^27.4.2" - jest-validate "^27.4.2" - micromatch "^4.0.4" - pretty-format "^27.4.2" - slash "^3.0.0" - -jest-diff@^27.4.2, jest-diff@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" - integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== - dependencies: - chalk "^4.0.0" - diff-sequences "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-docblock@^27.4.0: - version "27.4.0" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz" - integrity sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg== - dependencies: - detect-newline "^3.0.0" - -jest-each@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-27.4.2.tgz" - integrity sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg== - dependencies: - "@jest/types" "^27.4.2" - chalk "^4.0.0" - jest-get-type "^27.4.0" - jest-util "^27.4.2" - pretty-format "^27.4.2" - -jest-environment-jsdom@^27.4.4: - version "27.4.4" - resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.4.tgz" - integrity sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA== - dependencies: - "@jest/environment" "^27.4.4" - "@jest/fake-timers" "^27.4.2" - "@jest/types" "^27.4.2" - "@types/node" "*" - jest-mock "^27.4.2" - jest-util "^27.4.2" - jsdom "^16.6.0" - -jest-environment-node@^27.4.4: - version "27.4.4" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.4.tgz" - integrity sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA== - dependencies: - "@jest/environment" "^27.4.4" - "@jest/fake-timers" "^27.4.2" - "@jest/types" "^27.4.2" - "@types/node" "*" - jest-mock "^27.4.2" - jest-util "^27.4.2" - -jest-get-type@^27.4.0: - version "27.4.0" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz" - integrity sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ== - -jest-get-type@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" - integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== - -jest-haste-map@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.5.tgz" - integrity sha512-oJm1b5qhhPs78K24EDGifWS0dELYxnoBiDhatT/FThgB9yxqUm5F6li3Pv+Q+apMBmmPNzOBnZ7ZxWMB1Leq1Q== - dependencies: - "@jest/types" "^27.4.2" - "@types/graceful-fs" "^4.1.2" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - jest-regex-util "^27.4.0" - jest-serializer "^27.4.0" - jest-util "^27.4.2" - jest-worker "^27.4.5" - micromatch "^4.0.4" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" - -jest-jasmine2@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.5.tgz" - integrity sha512-oUnvwhJDj2LhOiUB1kdnJjkx8C5PwgUZQb9urF77mELH9DGR4e2GqpWQKBOYXWs5+uTN9BGDqRz3Aeg5Wts7aw== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.4.4" - "@jest/source-map" "^27.4.0" - "@jest/test-result" "^27.4.2" - "@jest/types" "^27.4.2" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.4.2" - is-generator-fn "^2.0.0" - jest-each "^27.4.2" - jest-matcher-utils "^27.4.2" - jest-message-util "^27.4.2" - jest-runtime "^27.4.5" - jest-snapshot "^27.4.5" - jest-util "^27.4.2" - pretty-format "^27.4.2" - throat "^6.0.1" - -jest-leak-detector@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.2.tgz" - integrity sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw== - dependencies: - jest-get-type "^27.4.0" - pretty-format "^27.4.2" - -jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.4.2: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" - integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== - dependencies: - chalk "^4.0.0" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-message-util@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.2.tgz" - integrity sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.4.2" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.4" - micromatch "^4.0.4" - pretty-format "^27.4.2" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.2.tgz" - integrity sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA== - dependencies: - "@jest/types" "^27.4.2" - "@types/node" "*" - -jest-pnp-resolver@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz" - -jest-regex-util@^27.4.0: - version "27.4.0" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz" - integrity sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg== - -jest-resolve-dependencies@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.5.tgz" - integrity sha512-elEVvkvRK51y037NshtEkEnukMBWvlPzZHiL847OrIljJ8yIsujD2GXRPqDXC4rEVKbcdsy7W0FxoZb4WmEs7w== - dependencies: - "@jest/types" "^27.4.2" - jest-regex-util "^27.4.0" - jest-snapshot "^27.4.5" - -jest-resolve@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.5.tgz" - integrity sha512-xU3z1BuOz/hUhVUL+918KqUgK+skqOuUsAi7A+iwoUldK6/+PW+utK8l8cxIWT9AW7IAhGNXjSAh1UYmjULZZw== - dependencies: - "@jest/types" "^27.4.2" - chalk "^4.0.0" - graceful-fs "^4.2.4" - jest-haste-map "^27.4.5" - jest-pnp-resolver "^1.2.2" - jest-util "^27.4.2" - jest-validate "^27.4.2" - resolve "^1.20.0" - resolve.exports "^1.1.0" - slash "^3.0.0" - -jest-runner@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.5.tgz" - integrity sha512-/irauncTfmY1WkTaRQGRWcyQLzK1g98GYG/8QvIPviHgO1Fqz1JYeEIsSfF+9mc/UTA6S+IIHFgKyvUrtiBIZg== - dependencies: - "@jest/console" "^27.4.2" - "@jest/environment" "^27.4.4" - "@jest/test-result" "^27.4.2" - "@jest/transform" "^27.4.5" - "@jest/types" "^27.4.2" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.8.1" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-docblock "^27.4.0" - jest-environment-jsdom "^27.4.4" - jest-environment-node "^27.4.4" - jest-haste-map "^27.4.5" - jest-leak-detector "^27.4.2" - jest-message-util "^27.4.2" - jest-resolve "^27.4.5" - jest-runtime "^27.4.5" - jest-util "^27.4.2" - jest-worker "^27.4.5" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runtime@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.5.tgz" - integrity sha512-CIYqwuJQXHQtPd/idgrx4zgJ6iCb6uBjQq1RSAGQrw2S8XifDmoM1Ot8NRd80ooAm+ZNdHVwsktIMGlA1F1FAQ== - dependencies: - "@jest/console" "^27.4.2" - "@jest/environment" "^27.4.4" - "@jest/globals" "^27.4.4" - "@jest/source-map" "^27.4.0" - "@jest/test-result" "^27.4.2" - "@jest/transform" "^27.4.5" - "@jest/types" "^27.4.2" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - execa "^5.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.4" - jest-haste-map "^27.4.5" - jest-message-util "^27.4.2" - jest-mock "^27.4.2" - jest-regex-util "^27.4.0" - jest-resolve "^27.4.5" - jest-snapshot "^27.4.5" - jest-util "^27.4.2" - jest-validate "^27.4.2" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^16.2.0" - -jest-serializer@^27.4.0: - version "27.4.0" - resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz" - integrity sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.4" - -jest-snapshot@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.5.tgz" - integrity sha512-eCi/iM1YJFrJWiT9de4+RpWWWBqsHiYxFG9V9o/n0WXs6GpW4lUt4FAHAgFPTLPqCUVzrMQmSmTZSgQzwqR7IQ== - dependencies: - "@babel/core" "^7.7.2" - "@babel/generator" "^7.7.2" - "@babel/parser" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.4.5" - "@jest/types" "^27.4.2" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^27.4.2" - graceful-fs "^4.2.4" - jest-diff "^27.4.2" - jest-get-type "^27.4.0" - jest-haste-map "^27.4.5" - jest-matcher-utils "^27.4.2" - jest-message-util "^27.4.2" - jest-resolve "^27.4.5" - jest-util "^27.4.2" - natural-compare "^1.4.0" - pretty-format "^27.4.2" - semver "^7.3.2" - -jest-util@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz" - integrity sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA== - dependencies: - "@jest/types" "^27.4.2" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.4" - picomatch "^2.2.3" - -jest-validate@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.2.tgz" - integrity sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A== - dependencies: - "@jest/types" "^27.4.2" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^27.4.0" - leven "^3.1.0" - pretty-format "^27.4.2" - -jest-watcher@^27.4.2: - version "27.4.2" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.2.tgz" - integrity sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg== - dependencies: - "@jest/test-result" "^27.4.2" - "@jest/types" "^27.4.2" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - jest-util "^27.4.2" - string-length "^4.0.1" - -jest-worker@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.5.tgz" - integrity sha512-f2s8kEdy15cv9r7q4KkzGXvlY0JTcmCbMHZBfSQDwW77REr45IDWwd0lksDFeVHH2jJ5pqb90T77XscrjeGzzg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^27.4.5: - version "27.4.5" - resolved "https://registry.npmjs.org/jest/-/jest-27.4.5.tgz" - integrity sha512-uT5MiVN3Jppt314kidCk47MYIRilJjA/l2mxwiuzzxGUeJIvA8/pDaJOAX5KWvjAo7SCydcW0/4WEtgbLMiJkg== - dependencies: - "@jest/core" "^27.4.5" - import-local "^3.0.2" - jest-cli "^27.4.5" - -joi@^17.4.0: - version "17.6.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.0.tgz#0bb54f2f006c09a96e75ce687957bd04290054b2" - integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.0" - "@sideway/pinpoint" "^2.0.0" - -js-sha256@^0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz" - integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== - -js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbi@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/jsbi/-/jsbi-4.1.0.tgz" - integrity sha512-384Z4keIsJtYpnVggsxaB255MZctILbxv+ihtwoWPF7KNOlYHn1LFpRnUw5qsAspUAA2+I7qzjVJxVYtHVjxNw== - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsdom@^16.6.0: - version "16.7.0" - resolved "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz" - integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== - dependencies: - abab "^2.0.5" - acorn "^8.2.4" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" - escodegen "^2.0.0" - form-data "^3.0.0" - html-encoding-sniffer "^2.0.1" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.0" - parse5 "6.0.1" - saxes "^5.0.1" - symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.6" - xml-name-validator "^3.0.0" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" - -json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-rpc-random-id@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" - integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - -json-stringify-nice@^1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz" - integrity sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw== - -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json3@^3.3.3: - version "3.3.3" - resolved "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz" - integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2: - version "2.2.0" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz" - dependencies: - minimist "^1.2.5" - -jsonc-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" - integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsonparse@^1.2.0, jsonparse@^1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -"jsx-ast-utils@^2.4.1 || ^3.0.0": - version "3.2.0" - resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz" - dependencies: - array-includes "^3.1.2" - object.assign "^4.1.2" - -just-diff-apply@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/just-diff-apply/-/just-diff-apply-3.1.2.tgz#710d8cda00c65dc4e692df50dbe9bac5581c2193" - integrity sha512-TCa7ZdxCeq6q3Rgms2JCRHTCfWAETPZ8SzYUbkYF6KR3I03sN29DaOIC+xyWboIcMvjAsD5iG2u/RWzHD8XpgQ== - -just-diff@^3.0.1: - version "3.1.1" - resolved "https://registry.npmjs.org/just-diff/-/just-diff-3.1.1.tgz" - integrity sha512-sdMWKjRq8qWZEjDcVA6llnUT8RDEBIfOiGpYFPYa9u+2c39JCsejktSP7mj5eRid5EIvTzIpQ2kDOCw1Nq9BjQ== - -keccak@^3.0.0, keccak@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" - integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - readable-stream "^3.6.0" - -killable@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz" - integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" - -kleur@^4.0.3: - version "4.1.4" - resolved "https://registry.npmjs.org/kleur/-/kleur-4.1.4.tgz" - integrity sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA== - -lazy-ass@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" - integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -libnpmaccess@^4.0.2: - version "4.0.3" - resolved "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-4.0.3.tgz" - integrity sha512-sPeTSNImksm8O2b6/pf3ikv4N567ERYEpeKRPSmqlNt1dTZbvgpJIzg5vAhXHpw2ISBsELFRelk0jEahj1c6nQ== - dependencies: - aproba "^2.0.0" - minipass "^3.1.1" - npm-package-arg "^8.1.2" - npm-registry-fetch "^11.0.0" - -libnpmdiff@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/libnpmdiff/-/libnpmdiff-2.0.4.tgz" - integrity sha512-q3zWePOJLHwsLEUjZw3Kyu/MJMYfl4tWCg78Vl6QGSfm4aXBUSVzMzjJ6jGiyarsT4d+1NH4B1gxfs62/+y9iQ== - dependencies: - "@npmcli/disparity-colors" "^1.0.1" - "@npmcli/installed-package-contents" "^1.0.7" - binary-extensions "^2.2.0" - diff "^5.0.0" - minimatch "^3.0.4" - npm-package-arg "^8.1.1" - pacote "^11.3.0" - tar "^6.1.0" - -libnpmexec@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/libnpmexec/-/libnpmexec-2.0.1.tgz" - integrity sha512-4SqBB7eJvJWmUKNF42Q5qTOn20DRjEE4TgvEh2yneKlAiRlwlhuS9MNR45juWwmoURJlf2K43bozlVt7OZiIOw== - dependencies: - "@npmcli/arborist" "^2.3.0" - "@npmcli/ci-detect" "^1.3.0" - "@npmcli/run-script" "^1.8.4" - chalk "^4.1.0" - mkdirp-infer-owner "^2.0.0" - npm-package-arg "^8.1.2" - pacote "^11.3.1" - proc-log "^1.0.0" - read "^1.0.7" - read-package-json-fast "^2.0.2" - walk-up-path "^1.0.0" - -libnpmfund@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/libnpmfund/-/libnpmfund-1.1.0.tgz" - integrity sha512-Kfmh3pLS5/RGKG5WXEig8mjahPVOxkik6lsbH4iX0si1xxNi6eeUh/+nF1MD+2cgalsQif3O5qyr6mNz2ryJrQ== - dependencies: - "@npmcli/arborist" "^2.5.0" - -libnpmhook@^6.0.2: - version "6.0.3" - resolved "https://registry.npmjs.org/libnpmhook/-/libnpmhook-6.0.3.tgz" - integrity sha512-3fmkZJibIybzmAvxJ65PeV3NzRc0m4xmYt6scui5msocThbEp4sKFT80FhgrCERYDjlUuFahU6zFNbJDHbQ++g== - dependencies: - aproba "^2.0.0" - npm-registry-fetch "^11.0.0" - -libnpmorg@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/libnpmorg/-/libnpmorg-2.0.3.tgz" - integrity sha512-JSGl3HFeiRFUZOUlGdiNcUZOsUqkSYrg6KMzvPZ1WVZ478i47OnKSS0vkPmX45Pai5mTKuwIqBMcGWG7O8HfdA== - dependencies: - aproba "^2.0.0" - npm-registry-fetch "^11.0.0" - -libnpmpack@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/libnpmpack/-/libnpmpack-2.0.1.tgz" - integrity sha512-He4/jxOwlaQ7YG7sIC1+yNeXeUDQt8RLBvpI68R3RzPMZPa4/VpxhlDo8GtBOBDYoU8eq6v1wKL38sq58u4ibQ== - dependencies: - "@npmcli/run-script" "^1.8.3" - npm-package-arg "^8.1.0" - pacote "^11.2.6" - -libnpmpublish@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-4.0.2.tgz" - integrity sha512-+AD7A2zbVeGRCFI2aO//oUmapCwy7GHqPXFJh3qpToSRNU+tXKJ2YFUgjt04LPPAf2dlEH95s6EhIHM1J7bmOw== - dependencies: - normalize-package-data "^3.0.2" - npm-package-arg "^8.1.2" - npm-registry-fetch "^11.0.0" - semver "^7.1.3" - ssri "^8.0.1" - -libnpmsearch@^3.1.1: - version "3.1.2" - resolved "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-3.1.2.tgz" - integrity sha512-BaQHBjMNnsPYk3Bl6AiOeVuFgp72jviShNBw5aHaHNKWqZxNi38iVNoXbo6bG/Ccc/m1To8s0GtMdtn6xZ1HAw== - dependencies: - npm-registry-fetch "^11.0.0" - -libnpmteam@^2.0.3: - version "2.0.4" - resolved "https://registry.npmjs.org/libnpmteam/-/libnpmteam-2.0.4.tgz" - integrity sha512-FPrVJWv820FZFXaflAEVTLRWZrerCvfe7ZHSMzJ/62EBlho2KFlYKjyNEsPW3JiV7TLSXi3vo8u0gMwIkXSMTw== - dependencies: - aproba "^2.0.0" - npm-registry-fetch "^11.0.0" - -libnpmversion@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/libnpmversion/-/libnpmversion-1.2.1.tgz" - integrity sha512-AA7x5CFgBFN+L4/JWobnY5t4OAHjQuPbAwUYJ7/NtHuyLut5meb+ne/aj0n7PWNiTGCJcRw/W6Zd2LoLT7EZuQ== - dependencies: - "@npmcli/git" "^2.0.7" - "@npmcli/run-script" "^1.8.4" - json-parse-even-better-errors "^2.3.1" - semver "^7.3.5" - stringify-package "^1.0.1" - -lie@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" - integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4= - dependencies: - immediate "~3.0.5" - -lilconfig@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" - integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -linkify-it@^2.0.3: - version "2.2.0" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf" - integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw== - dependencies: - uc.micro "^1.0.1" - -lint-staged@^10.0.10: - version "10.5.4" - resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.4.tgz" - dependencies: - chalk "^4.1.0" - cli-truncate "^2.1.0" - commander "^6.2.0" - cosmiconfig "^7.0.0" - debug "^4.2.0" - dedent "^0.7.0" - enquirer "^2.3.6" - execa "^4.1.0" - listr2 "^3.2.2" - log-symbols "^4.0.0" - micromatch "^4.0.2" - normalize-path "^3.0.0" - please-upgrade-node "^3.2.0" - string-argv "0.3.1" - stringify-object "^3.3.0" - -listr2@^3.2.2: - version "3.7.1" - resolved "https://registry.npmjs.org/listr2/-/listr2-3.7.1.tgz" - dependencies: - chalk "^4.1.0" - cli-truncate "^2.1.0" - figures "^3.2.0" - indent-string "^4.0.0" - log-update "^4.0.0" - p-map "^4.0.0" - rxjs "^6.6.7" - through "^2.3.8" - wrap-ansi "^7.0.0" - -localforage@^1.10.0, localforage@^1.8.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" - integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== - dependencies: - lie "3.1.1" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash-es@^4.17.21: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz" - integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz" - integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= - -lodash.chunk@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz" - integrity sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw= - -lodash.escaperegexp@^4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz" - integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= - -lodash.flatmap@^4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz" - -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz" - -lodash.groupby@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz" - integrity sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E= - -lodash.isboolean@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz" - integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= - -lodash.isequal@^4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz" - integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= - -lodash.isfunction@^3.0.9: - version "3.0.9" - resolved "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz" - integrity sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw== - -lodash.isnil@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz" - integrity sha1-SeKM1VkBNFjIFMVHnTxmOiG/qmw= - -lodash.isundefined@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz" - integrity sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g= - -lodash.mapvalues@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz" - integrity sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw= - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" - -lodash.orderby@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/lodash.orderby/-/lodash.orderby-4.6.0.tgz" - integrity sha1-5pfwTOXXhSL1TZM4syuBozk+TrM= - -lodash.topath@^4.5.2: - version "4.5.2" - resolved "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz" - integrity sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak= - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" - integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= - -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@4.1.0, log-symbols@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -log-update@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz" - dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" - -loglevel@^1.6.8, loglevel@^1.8.0: - version "1.8.0" - resolved "https://registry.npmjs.org/loglevel/-/loglevel-1.8.0.tgz" - integrity sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA== - -long@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - -long@~3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= - -longest-streak@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/longest-streak/-/longest-streak-3.0.1.tgz" - integrity sha512-cHlYSUpL2s7Fb3394mYxwTYj8niTaNHUCLr0qdiCXQfSjfuA7CKofpX2uSwEfFDQ0EB7JcnMnm+GjbqqoinYYg== - -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -lru_map@^0.3.3: - version "0.3.3" - resolved "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" - integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= - -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.npmjs.org/lz-string/-/lz-string-1.4.4.tgz" - -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" - dependencies: - semver "^6.0.0" - -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -make-fetch-happen@^9.0.1, make-fetch-happen@^9.1.0: - version "9.1.0" - resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz" - integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== - dependencies: - agentkeepalive "^4.1.3" - cacache "^15.2.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" - minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.2" - promise-retry "^2.0.1" - socks-proxy-agent "^6.0.0" - ssri "^8.0.0" - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz" - dependencies: - tmpl "1.0.x" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-stream@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" - integrity sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -markdown-table@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.2.tgz" - integrity sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA== - -marked@~2.0.3: - version "2.0.7" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.7.tgz#bc5b857a09071b48ce82a1f7304913a993d4b7d1" - integrity sha512-BJXxkuIfJchcXOJWTT2DOL+yFWifFv2yGYOUzvXg8Qz610QKw+sHCvTMYwA+qWGhlA2uivBezChZ/pBy1tWdkQ== - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -mdast-util-definitions@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.0.tgz" - integrity sha512-5hcR7FL2EuZ4q6lLMUK5w4lHT2H3vqL9quPvYZ/Ku5iifrirfMHiGdhxdXMUbUkDmz5I+TYMd7nbaxUhbQkfpQ== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - unist-util-visit "^3.0.0" - -mdast-util-find-and-replace@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.1.0.tgz" - integrity sha512-1w1jbqAd13oU78QPBf5223+xB+37ecNtQ1JElq2feWols5oEYAl+SgNDnOZipe7NfLemoEt362yUS15/wip4mw== - dependencies: - escape-string-regexp "^5.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^4.0.0" - -mdast-util-from-markdown@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.0.0.tgz" - integrity sha512-uj2G60sb7z1PNOeElFwCC9b/Se/lFXuLhVKFOAY2EHz/VvgbupTQRNXPoZl7rGpXYL6BNZgcgaybrlSWbo7n/g== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - mdast-util-to-string "^3.0.0" - micromark "^3.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - parse-entities "^3.0.0" - unist-util-stringify-position "^3.0.0" - -mdast-util-gfm-autolink-literal@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.2.tgz" - integrity sha512-FzopkOd4xTTBeGXhXSBU0OCDDh5lUj2rd+HQqG92Ld+jL4lpUfgX2AT2OHAVP9aEeDKp7G92fuooSZcYJA3cRg== - dependencies: - "@types/mdast" "^3.0.0" - ccount "^2.0.0" - mdast-util-find-and-replace "^2.0.0" - micromark-util-character "^1.0.0" - -mdast-util-gfm-footnote@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-1.0.1.tgz" - integrity sha512-p+PrYlkw9DeCRkTVw1duWqPRHX6Ywh2BNKJQcZbCwAuP/59B0Lk9kakuAd7KbQprVO4GzdW8eS5++A9PUSqIyw== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - micromark-util-normalize-identifier "^1.0.0" - -mdast-util-gfm-strikethrough@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-1.0.1.tgz" - integrity sha512-zKJbEPe+JP6EUv0mZ0tQUyLQOC+FADt0bARldONot/nefuISkaZFlmVK4tU6JgfyZGrky02m/I6PmehgAgZgqg== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm-table@^1.0.0: - version "1.0.4" - resolved "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-1.0.4.tgz" - integrity sha512-aEuoPwZyP4iIMkf2cLWXxx3EQ6Bmh2yKy9MVCg4i6Sd3cX80dcLEfXO/V4ul3pGH9czBK4kp+FAl+ZHmSUt9/w== - dependencies: - markdown-table "^3.0.0" - mdast-util-from-markdown "^1.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm-task-list-item@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-1.0.1.tgz" - integrity sha512-KZ4KLmPdABXOsfnM6JHUIjxEvcx2ulk656Z/4Balw071/5qgnhz+H1uGtf2zIGnrnvDC8xR4Fj9uKbjAFGNIeA== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-2.0.1.tgz" - integrity sha512-42yHBbfWIFisaAfV1eixlabbsa6q7vHeSPY+cg+BBjX51M8xhgMacqH9g6TftB/9+YkcI0ooV4ncfrJslzm/RQ== - dependencies: - mdast-util-from-markdown "^1.0.0" - mdast-util-gfm-autolink-literal "^1.0.0" - mdast-util-gfm-footnote "^1.0.0" - mdast-util-gfm-strikethrough "^1.0.0" - mdast-util-gfm-table "^1.0.0" - mdast-util-gfm-task-list-item "^1.0.0" - mdast-util-to-markdown "^1.0.0" - -mdast-util-to-hast@^11.0.0: - version "11.2.0" - resolved "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-11.2.0.tgz" - integrity sha512-KSYbg4PA9wk5YwoCZCPxbUAjdYunNN5TqTXoZp/9taRDGQS65cL2fFgKc78l0f3deg4p1LP9xdhmMuUrhAUSZA== - dependencies: - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - "@types/mdurl" "^1.0.0" - mdast-util-definitions "^5.0.0" - mdurl "^1.0.0" - unist-builder "^3.0.0" - unist-util-generated "^2.0.0" - unist-util-position "^4.0.0" - unist-util-visit "^3.0.0" - -mdast-util-to-markdown@^1.0.0, mdast-util-to-markdown@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.3.0.tgz" - integrity sha512-6tUSs4r+KK4JGTTiQ7FfHmVOaDrLQJPmpjD6wPMlHGUVXoG9Vjc3jIeP+uyBWRf8clwB2blM+W7+KrlMYQnftA== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - longest-streak "^3.0.0" - mdast-util-to-string "^3.0.0" - micromark-util-decode-string "^1.0.0" - unist-util-visit "^4.0.0" - zwitch "^2.0.0" - -mdast-util-to-string@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.1.0.tgz" - integrity sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA== - -mdurl@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz" - integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -"memoize-one@>=3.1.1 <6": - version "5.2.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" - integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== - -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0, merge2@^1.4.1: - version "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: - version "1.1.2" - 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" - resolved "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz" - integrity sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA== - dependencies: - decode-named-character-reference "^1.0.0" - micromark-factory-destination "^1.0.0" - micromark-factory-label "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-factory-title "^1.0.0" - micromark-factory-whitespace "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-chunked "^1.0.0" - micromark-util-classify-character "^1.0.0" - micromark-util-html-tag-name "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-subtokenize "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.1" - uvu "^0.5.0" - -micromark-core-commonmark@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.1.tgz" - integrity sha512-vEOw8hcQ3nwHkKKNIyP9wBi8M50zjNajtmI+cCUWcVfJS+v5/3WCh4PLKf7PPRZFUutjzl4ZjlHwBWUKfb/SkA== - dependencies: - micromark-factory-destination "^1.0.0" - micromark-factory-label "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-factory-title "^1.0.0" - micromark-factory-whitespace "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-chunked "^1.0.0" - micromark-util-classify-character "^1.0.0" - micromark-util-html-tag-name "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-subtokenize "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.1" - parse-entities "^3.0.0" - -micromark-extension-gfm-autolink-literal@^1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-1.0.3.tgz" - integrity sha512-i3dmvU0htawfWED8aHMMAzAVp/F0Z+0bPh3YrbTPPL1v4YAlCZpy5rBO5p0LPYiZo0zFVkoYh7vDU7yQSiCMjg== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-footnote@^1.0.0: - version "1.0.4" - resolved "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-1.0.4.tgz" - integrity sha512-E/fmPmDqLiMUP8mLJ8NbJWJ4bTw6tS+FEQS8CcuDtZpILuOb2kjLqPEeAePF1djXROHXChM/wPJw0iS4kHCcIg== - dependencies: - micromark-core-commonmark "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-strikethrough@^1.0.0: - version "1.0.4" - resolved "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.4.tgz" - integrity sha512-/vjHU/lalmjZCT5xt7CcHVJGq8sYRm80z24qAKXzaHzem/xsDYb2yLL+NNVbYvmpLx3O7SYPuGL5pzusL9CLIQ== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-classify-character "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-table@^1.0.0: - version "1.0.5" - resolved "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-1.0.5.tgz" - integrity sha512-xAZ8J1X9W9K3JTJTUL7G6wSKhp2ZYHrFk5qJgY/4B33scJzE2kpfRL6oiw/veJTbt7jiM/1rngLlOKPWr1G+vg== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-tagfilter@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-1.0.1.tgz" - integrity sha512-Ty6psLAcAjboRa/UKUbbUcwjVAv5plxmpUTy2XC/3nJFL37eHej8jrHrRzkqcpipJliuBH30DTs7+3wqNcQUVA== - dependencies: - micromark-util-types "^1.0.0" - -micromark-extension-gfm-task-list-item@^1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-1.0.3.tgz" - integrity sha512-PpysK2S1Q/5VXi72IIapbi/jliaiOFzv7THH4amwXeYXLq3l1uo8/2Be0Ac1rEwK20MQEsGH2ltAZLNY2KI/0Q== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-2.0.1.tgz" - integrity sha512-p2sGjajLa0iYiGQdT0oelahRYtMWvLjy8J9LOCxzIQsllMCGLbsLW+Nc+N4vi02jcRJvedVJ68cjelKIO6bpDA== - dependencies: - micromark-extension-gfm-autolink-literal "^1.0.0" - micromark-extension-gfm-footnote "^1.0.0" - micromark-extension-gfm-strikethrough "^1.0.0" - micromark-extension-gfm-table "^1.0.0" - micromark-extension-gfm-tagfilter "^1.0.0" - micromark-extension-gfm-task-list-item "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-destination@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz" - integrity sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-label@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.0.0.tgz" - integrity sha512-XWEucVZb+qBCe2jmlOnWr6sWSY6NHx+wtpgYFsm4G+dufOf6tTQRRo0bdO7XSlGPu5fyjpJenth6Ksnc5Mwfww== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-space@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz" - integrity sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-title@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.0.0.tgz" - integrity sha512-flvC7Gx0dWVWorXuBl09Cr3wB5FTuYec8pMGVySIp2ZlqTcIjN/lFohZcP0EG//krTptm34kozHk7aK/CleCfA== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-whitespace@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz" - integrity sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-character@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.1.0.tgz" - integrity sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg== - dependencies: - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-chunked@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz" - integrity sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-classify-character@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz" - integrity sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-combine-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz" - integrity sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-decode-numeric-character-reference@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz" - integrity sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-decode-string@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz" - integrity sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q== - dependencies: - decode-named-character-reference "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-symbol "^1.0.0" - -micromark-util-encode@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.0.tgz" - integrity sha512-cJpFVM768h6zkd8qJ1LNRrITfY4gwFt+tziPcIf71Ui8yFzY9wG3snZQqiWVq93PG4Sw6YOtcNiKJfVIs9qfGg== - -micromark-util-html-tag-name@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.0.0.tgz" - integrity sha512-NenEKIshW2ZI/ERv9HtFNsrn3llSPZtY337LID/24WeLqMzeZhBEE6BQ0vS2ZBjshm5n40chKtJ3qjAbVV8S0g== - -micromark-util-normalize-identifier@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz" - integrity sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-resolve-all@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz" - integrity sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw== - dependencies: - micromark-util-types "^1.0.0" - -micromark-util-sanitize-uri@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.0.0.tgz" - integrity sha512-cCxvBKlmac4rxCGx6ejlIviRaMKZc0fWm5HdCHEeDWRSkn44l6NdYVRyU+0nT1XC72EQJMZV8IPHF+jTr56lAg== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-encode "^1.0.0" - micromark-util-symbol "^1.0.0" - -micromark-util-subtokenize@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.0.tgz" - integrity sha512-EsnG2qscmcN5XhkqQBZni/4oQbLFjz9yk3ZM/P8a3YUjwV6+6On2wehr1ALx0MxK3+XXXLTzuBKHDFeDFYRdgQ== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-symbol@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.0.tgz" - integrity sha512-NZA01jHRNCt4KlOROn8/bGi6vvpEmlXld7EHcRH+aYWUfL3Wc8JLUNNlqUMKa0hhz6GrpUWsHtzPmKof57v0gQ== - -micromark-util-types@^1.0.0, micromark-util-types@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.1.tgz" - integrity sha512-UT0ylWEEy80RFYzK9pEaugTqaxoD/j0Y9WhHpSyitxd99zjoQz7JJ+iKuhPAgOW2MiPSUAx+c09dcqokeyaROA== - -micromark@^3.0.0: - version "3.0.5" - resolved "https://registry.npmjs.org/micromark/-/micromark-3.0.5.tgz" - integrity sha512-QfjERBnPw0G9mxhOCkkbRP0n8SX8lIBLrEKeEVceviUukqVMv3hWE4AgNTOK/W6GWqtPvvIHg2Apl3j1Dxm6aQ== - dependencies: - "@types/debug" "^4.0.0" - debug "^4.0.0" - micromark-core-commonmark "^1.0.1" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-chunked "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-encode "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-subtokenize "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.1" - parse-entities "^3.0.0" - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -micromatch@^4.0.2: - version "4.0.4" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz" - integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== - dependencies: - braces "^3.0.1" - picomatch "^2.2.3" - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -microseconds@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/microseconds/-/microseconds-0.2.0.tgz#233b25f50c62a65d861f978a4a4f8ec18797dc39" - integrity sha512-n7DHHMjR1avBbSpsTBj6fmMGh2AGrifVV4e+WYc3Q9lO+xnSZ3NyhcBND3vzzatt05LFhoKFRxrIyklmLlUtyA== - -microtime@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/microtime/-/microtime-3.0.0.tgz#d140914bde88aa89b4f9fd2a18620b435af0f39b" - integrity sha512-SirJr7ZL4ow2iWcb54bekS4aWyBQNVcEDBiwAz9D/sTgY59A+uE8UJU15cp5wyZmPBwg/3zf8lyCJ5NUe1nVlQ== - dependencies: - node-addon-api "^1.2.0" - node-gyp-build "^3.8.0" - -mime-db@1.47.0: - version "1.47.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz" - -mime-db@1.51.0, "mime-db@>= 1.43.0 < 2": - version "1.51.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.30" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz" - dependencies: - mime-db "1.47.0" - -mime-types@~2.1.17, mime-types@~2.1.24: - version "2.1.34" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== - dependencies: - mime-db "1.51.0" - -mime-types@~2.1.19: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mime@2.6.0, mime@^2.4.4: - version "2.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" - integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" - -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimatch@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" - integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^3.0.0, minimatch@^3.0.4, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - dependencies: - minipass "^3.0.0" - -minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: - version "1.4.1" - resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz" - integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== - dependencies: - minipass "^3.1.0" - minipass-sized "^1.0.3" - minizlib "^2.0.0" - optionalDependencies: - encoding "^0.1.12" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-json-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz" - integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== - dependencies: - jsonparse "^1.3.1" - minipass "^3.0.0" - -minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: - version "1.2.4" - resolved "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - dependencies: - minipass "^3.0.0" - -minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: - version "3.1.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" - integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== - dependencies: - yallist "^4.0.0" - -minizlib@^2.0.0, minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp-infer-owner@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz" - integrity sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw== - dependencies: - chownr "^2.0.0" - infer-owner "^1.0.4" - mkdirp "^1.0.3" - -mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mkdirp@^0.5.5: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mocha@^9.1.1: - version "9.2.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" - integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.3" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - growl "1.10.5" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "4.2.1" - ms "2.1.3" - nanoid "3.3.1" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - which "2.0.2" - workerpool "6.2.0" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -modern-normalize@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/modern-normalize/-/modern-normalize-1.1.0.tgz" - integrity sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA== - -mri@^1.1.0: - version "1.2.0" - resolved "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz" - integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== - -mrmime@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz" - integrity sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.2: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multicast-dns-service-types@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz" - integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= - -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz" - integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== - dependencies: - dns-packet "^1.3.1" - thunky "^1.0.2" - -mute-stream@~0.0.4: - version "0.0.8" - resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - -mz@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - -nan@^2.12.1, nan@^2.13.2: - version "2.15.0" - resolved "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz" - integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== - -nan@^2.14.0, nan@^2.14.2: - version "2.16.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" - integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== - -nanoclone@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/nanoclone/-/nanoclone-0.2.1.tgz" - integrity sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA== - -nanoid@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" - integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== - -nanoid@^3.1.30: - version "3.3.2" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.2.tgz#c89622fafb4381cd221421c69ec58547a1eec557" - integrity sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA== - -nanoid@^3.3.1: - version "3.3.3" - 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" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -negotiator@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -next-router-mock@^0.6.7: - version "0.6.7" - resolved "https://registry.yarnpkg.com/next-router-mock/-/next-router-mock-0.6.7.tgz#8883ed81f245074462e72199fe94002cd85db5e2" - integrity sha512-y3yFyTkplpmvCpy1TnOuMTUQDLt2wg9RwTwvg9WcCRko4lqkBYAQM+ph5sqtNpKQ1xngDwzjPjshVBQJvhb/hg== - -next-themes@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.1.1.tgz#122113a458bf1d1be5ffed66778ab924c106f82a" - integrity sha512-Iqxt6rhS/KfK/iHJ0tfFjTcdLEAI0AgwFuAFrMwLOPK5e+MI3I+fzyvBoS+VaOS+NldUiazurhgwYhrfV0VXsQ== - -next-transpile-modules@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/next-transpile-modules/-/next-transpile-modules-8.0.0.tgz" - integrity sha512-Q2f2yB0zMJ8KJbIYAeZoIxG6cSfVk813zr6B5HzsLMBVcJ3FaF8lKr7WG66n0KlHCwjLSmf/6EkgI6QQVWHrDw== - dependencies: - enhanced-resolve "^5.7.0" - escalade "^3.1.1" - -next@^12.1.5: - version "12.1.5" - resolved "https://registry.yarnpkg.com/next/-/next-12.1.5.tgz#7a07687579ddce61ee519493e1c178d83abac063" - integrity sha512-YGHDpyfgCfnT5GZObsKepmRnne7Kzp7nGrac07dikhutWQug7hHg85/+sPJ4ZW5Q2pDkb+n0FnmLkmd44htIJQ== - dependencies: - "@next/env" "12.1.5" - caniuse-lite "^1.0.30001283" - postcss "8.4.5" - styled-jsx "5.0.1" - optionalDependencies: - "@next/swc-android-arm-eabi" "12.1.5" - "@next/swc-android-arm64" "12.1.5" - "@next/swc-darwin-arm64" "12.1.5" - "@next/swc-darwin-x64" "12.1.5" - "@next/swc-linux-arm-gnueabihf" "12.1.5" - "@next/swc-linux-arm64-gnu" "12.1.5" - "@next/swc-linux-arm64-musl" "12.1.5" - "@next/swc-linux-x64-gnu" "12.1.5" - "@next/swc-linux-x64-musl" "12.1.5" - "@next/swc-win32-arm64-msvc" "12.1.5" - "@next/swc-win32-ia32-msvc" "12.1.5" - "@next/swc-win32-x64-msvc" "12.1.5" - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -no-case@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz" - integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== - dependencies: - lower-case "^2.0.2" - tslib "^2.0.3" - -node-addon-api@^1.2.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" - integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== - -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-emoji@^1.11.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" - integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== - dependencies: - lodash "^4.17.21" - -node-fetch@2, node-fetch@2.6.7, node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -node-fetch@2.6.1, node-fetch@^2.6.1: - version "2.6.1" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-fetch@^3.2.3: - version "3.2.6" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.6.tgz#6d4627181697a9d9674aae0d61548e0d629b31b9" - integrity sha512-LAy/HZnLADOVkVPubaxHDft29booGglPFDr2Hw0J1AercRh01UiVFm++KMDnJeH9sHgNB4hsXPii7Sgym/sTbw== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - -node-forge@^0.10.0: - version "0.10.0" - resolved "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz" - integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== - -node-gyp-build@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.9.0.tgz#53a350187dd4d5276750da21605d1cb681d09e25" - integrity sha512-zLcTg6P4AbcHPq465ZMFNXx7XpKKJh+7kkN699NiQWisR2uWYOWNWqRHAmbnmKiL4e9aLSlmy5U7rEMUXV59+A== - -node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz" - integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== - -node-gyp@^7.1.0, node-gyp@^7.1.2: - version "7.1.2" - resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz" - integrity sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.3" - nopt "^5.0.0" - npmlog "^4.1.2" - request "^2.88.2" - rimraf "^3.0.2" - semver "^7.3.2" - tar "^6.0.2" - which "^2.0.2" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" - -node-modules-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz" - -node-releases@^1.1.71: - version "1.1.71" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz" - -node-releases@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz" - integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== - -nopt@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz" - integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== - dependencies: - abbrev "1" - -normalize-package-data@^3.0.0, normalize-package-data@^3.0.2: - version "3.0.3" - resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz" - integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== - dependencies: - hosted-git-info "^4.0.1" - is-core-module "^2.5.0" - semver "^7.3.4" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" - -npm-audit-report@^2.1.5: - version "2.1.5" - resolved "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-2.1.5.tgz" - integrity sha512-YB8qOoEmBhUH1UJgh1xFAv7Jg1d+xoNhsDYiFQlEFThEBui0W1vIz2ZK6FVg4WZjwEdl7uBQlm1jy3MUfyHeEw== - dependencies: - chalk "^4.0.0" - -npm-bundled@^1.1.1: - version "1.1.2" - resolved "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz" - integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-install-checks@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz" - integrity sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w== - dependencies: - semver "^7.1.1" - -npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.0, npm-package-arg@^8.1.1, npm-package-arg@^8.1.2, npm-package-arg@^8.1.5: - version "8.1.5" - resolved "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.5.tgz" - integrity sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q== - dependencies: - hosted-git-info "^4.0.1" - semver "^7.3.4" - validate-npm-package-name "^3.0.0" - -npm-packlist@^2.1.4: - version "2.2.2" - resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.2.tgz" - integrity sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg== - dependencies: - glob "^7.1.6" - ignore-walk "^3.0.3" - npm-bundled "^1.1.1" - npm-normalize-package-bin "^1.0.1" - -npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.0, npm-pick-manifest@^6.1.1: - version "6.1.1" - resolved "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz" - integrity sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA== - dependencies: - npm-install-checks "^4.0.0" - npm-normalize-package-bin "^1.0.1" - npm-package-arg "^8.1.2" - semver "^7.3.4" - -npm-profile@^5.0.3: - version "5.0.4" - resolved "https://registry.npmjs.org/npm-profile/-/npm-profile-5.0.4.tgz" - integrity sha512-OKtU7yoAEBOnc8zJ+/uo5E4ugPp09sopo+6y1njPp+W99P8DvQon3BJYmpvyK2Bf1+3YV5LN1bvgXRoZ1LUJBA== - dependencies: - npm-registry-fetch "^11.0.0" - -npm-registry-fetch@^11.0.0: - version "11.0.0" - resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz" - integrity sha512-jmlgSxoDNuhAtxUIG6pVwwtz840i994dL14FoNVZisrmZW5kWd63IUTNv1m/hyRSGSqWjCUp/YZlS1BJyNp9XA== - dependencies: - make-fetch-happen "^9.0.1" - minipass "^3.1.3" - minipass-fetch "^1.3.0" - minipass-json-stream "^1.0.1" - minizlib "^2.0.0" - npm-package-arg "^8.0.0" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npm-run-path@^4.0.0, npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npm-user-validate@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.1.tgz" - integrity sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw== - -npm@^7.24.1: - version "7.24.2" - resolved "https://registry.npmjs.org/npm/-/npm-7.24.2.tgz" - integrity sha512-120p116CE8VMMZ+hk8IAb1inCPk4Dj3VZw29/n2g6UI77urJKVYb7FZUDW8hY+EBnfsjI/2yrobBgFyzo7YpVQ== - dependencies: - "@isaacs/string-locale-compare" "^1.1.0" - "@npmcli/arborist" "^2.9.0" - "@npmcli/ci-detect" "^1.2.0" - "@npmcli/config" "^2.3.0" - "@npmcli/map-workspaces" "^1.0.4" - "@npmcli/package-json" "^1.0.1" - "@npmcli/run-script" "^1.8.6" - abbrev "~1.1.1" - ansicolors "~0.3.2" - ansistyles "~0.1.3" - archy "~1.0.0" - cacache "^15.3.0" - chalk "^4.1.2" - chownr "^2.0.0" - cli-columns "^3.1.2" - cli-table3 "^0.6.0" - columnify "~1.5.4" - fastest-levenshtein "^1.0.12" - glob "^7.2.0" - graceful-fs "^4.2.8" - hosted-git-info "^4.0.2" - ini "^2.0.0" - init-package-json "^2.0.5" - is-cidr "^4.0.2" - json-parse-even-better-errors "^2.3.1" - libnpmaccess "^4.0.2" - libnpmdiff "^2.0.4" - libnpmexec "^2.0.1" - libnpmfund "^1.1.0" - libnpmhook "^6.0.2" - libnpmorg "^2.0.2" - libnpmpack "^2.0.1" - libnpmpublish "^4.0.1" - libnpmsearch "^3.1.1" - libnpmteam "^2.0.3" - libnpmversion "^1.2.1" - make-fetch-happen "^9.1.0" - minipass "^3.1.3" - minipass-pipeline "^1.2.4" - mkdirp "^1.0.4" - mkdirp-infer-owner "^2.0.0" - ms "^2.1.2" - node-gyp "^7.1.2" - nopt "^5.0.0" - npm-audit-report "^2.1.5" - npm-install-checks "^4.0.0" - npm-package-arg "^8.1.5" - npm-pick-manifest "^6.1.1" - npm-profile "^5.0.3" - npm-registry-fetch "^11.0.0" - npm-user-validate "^1.0.1" - npmlog "^5.0.1" - opener "^1.5.2" - pacote "^11.3.5" - parse-conflict-json "^1.1.1" - qrcode-terminal "^0.12.0" - read "~1.0.7" - read-package-json "^4.1.1" - read-package-json-fast "^2.0.3" - readdir-scoped-modules "^1.1.0" - rimraf "^3.0.2" - semver "^7.3.5" - ssri "^8.0.1" - tar "^6.1.11" - text-table "~0.2.0" - tiny-relative-date "^1.3.0" - treeverse "^1.0.4" - validate-npm-package-name "~3.0.0" - which "^2.0.2" - write-file-atomic "^3.0.3" - -npmlog@^4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -npmlog@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz" - integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== - dependencies: - are-we-there-yet "^2.0.0" - console-control-strings "^1.1.0" - gauge "^3.0.0" - set-blocking "^2.0.0" - -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -nwsapi@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-hash@^1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz" - integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== - -object-hash@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" - integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== - -object-hash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" - integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== - -object-inspect@^1.11.0, object-inspect@^1.9.0: - version "1.11.0" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== - -object-is@^1.0.1: - version "1.1.5" - resolved "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.entries@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz" - integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.fromentries@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz" - integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.hasown@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.0.tgz" - integrity sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -object.values@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz" - integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -oblivious-set@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/oblivious-set/-/oblivious-set-1.1.1.tgz#d9d38e9491d51f27a5c3ec1681d2ba40aa81e98b" - integrity sha512-Oh+8fK09mgGmAshFdH6hSVco6KZmd1tTwNFWj35OvzdmJTMZtAkbn05zar2iG3v6sDs1JLEtOiBGNb6BHwkb2w== - -obuf@^1.0.0, obuf@^1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz" - integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "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.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= - dependencies: - wrappy "1" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -opener@^1.5.2: - version "1.5.2" - resolved "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz" - integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== - -opn@^5.5.0: - version "5.5.0" - resolved "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz" - integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== - dependencies: - is-wsl "^1.1.0" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz" - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -original@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" - integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== - dependencies: - url-parse "^1.4.3" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" - dependencies: - aggregate-error "^3.0.0" - -p-queue@6.6.2: - version "6.6.2" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" - integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ== - dependencies: - eventemitter3 "^4.0.4" - p-timeout "^3.2.0" - -p-retry@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz" - integrity sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w== - dependencies: - retry "^0.12.0" - -p-timeout@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" - integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - dependencies: - p-finally "^1.0.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -pacote@^11.1.11, pacote@^11.2.6, pacote@^11.3.0, pacote@^11.3.1, pacote@^11.3.5: - version "11.3.5" - resolved "https://registry.npmjs.org/pacote/-/pacote-11.3.5.tgz" - integrity sha512-fT375Yczn4zi+6Hkk2TBe1x1sP8FgFsEIZ2/iWaXY2r/NkhDJfxbcn5paz1+RTFCyNf+dPnaoBDJoAxXSU8Bkg== - dependencies: - "@npmcli/git" "^2.1.0" - "@npmcli/installed-package-contents" "^1.0.6" - "@npmcli/promise-spawn" "^1.2.0" - "@npmcli/run-script" "^1.8.2" - cacache "^15.0.5" - chownr "^2.0.0" - fs-minipass "^2.1.0" - infer-owner "^1.0.4" - minipass "^3.1.3" - mkdirp "^1.0.3" - npm-package-arg "^8.0.1" - npm-packlist "^2.1.4" - npm-pick-manifest "^6.0.0" - npm-registry-fetch "^11.0.0" - promise-retry "^2.0.1" - read-package-json-fast "^2.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.1.0" - -pako@^2.0.3: - version "2.0.4" - resolved "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz" - integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-conflict-json@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-1.1.1.tgz" - integrity sha512-4gySviBiW5TRl7XHvp1agcS7SOe0KZOjC//71dzZVWJrY9hCrgtvl5v3SyIxCZ4fZF47TxD9nfzmxcx76xmbUw== - dependencies: - json-parse-even-better-errors "^2.3.0" - just-diff "^3.0.1" - just-diff-apply "^3.0.0" - -parse-entities@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/parse-entities/-/parse-entities-3.0.0.tgz" - integrity sha512-AJlcIFDNPEP33KyJLguv0xJc83BNvjxwpuUIcetyXUsLpVXAUCePJ5kIoYtEN2R1ac0cYaRu/vk9dVFkewHQhQ== - dependencies: - character-entities "^2.0.0" - character-entities-legacy "^2.0.0" - character-reference-invalid "^2.0.0" - is-alphanumerical "^2.0.0" - is-decimal "^2.0.0" - is-hexadecimal "^2.0.0" - -parse-json@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= - -parse5@6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" - -parseurl@~1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - -path-parse@^1.0.6, path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pause-stream@0.0.11: - version "0.0.11" - resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" - integrity sha1-/lo0sMvOErWqaitAPuLnO2AvFEU= - dependencies: - through "~2.3" - -pbkdf2@^3.0.17: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -picocolors@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" - integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pirates@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz" - dependencies: - node-modules-regexp "^1.0.0" - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - dependencies: - find-up "^4.0.0" - -please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz" - dependencies: - semver-compare "^1.0.0" - -polished@^4.1.3: - version "4.1.4" - resolved "https://registry.npmjs.org/polished/-/polished-4.1.4.tgz" - integrity sha512-Nq5Mbza+Auo7N3sQb1QMFaQiDO+4UexWuSGR7Cjb4Sw11SZIJcrrFtiZ+L0jT9MBsUsxDboHVASbCLbE1rnECg== - dependencies: - "@babel/runtime" "^7.16.7" - -portfinder@^1.0.26: - version "1.0.28" - resolved "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz" - integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== - dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.5" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -postcss-attribute-case-insensitive@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.2.tgz" - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^6.0.2" - -postcss-color-functional-notation@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-2.0.1.tgz" - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-color-gray@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/postcss-color-gray/-/postcss-color-gray-5.0.0.tgz" - dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.5" - postcss-values-parser "^2.0.0" - -postcss-color-hex-alpha@^5.0.3: - version "5.0.3" - resolved "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-5.0.3.tgz" - dependencies: - postcss "^7.0.14" - postcss-values-parser "^2.0.1" - -postcss-color-mod-function@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/postcss-color-mod-function/-/postcss-color-mod-function-3.0.3.tgz" - dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-color-rebeccapurple@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-4.0.1.tgz" - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-custom-media@^7.0.8: - version "7.0.8" - resolved "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-7.0.8.tgz" - dependencies: - postcss "^7.0.14" - -postcss-custom-properties@^8.0.11: - version "8.0.11" - resolved "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-8.0.11.tgz" - dependencies: - postcss "^7.0.17" - postcss-values-parser "^2.0.1" - -postcss-custom-selectors@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-5.1.2.tgz" - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" - -postcss-dir-pseudo-class@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-5.0.0.tgz" - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" - -postcss-double-position-gradients@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-1.0.0.tgz" - dependencies: - postcss "^7.0.5" - postcss-values-parser "^2.0.0" - -postcss-env-function@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/postcss-env-function/-/postcss-env-function-2.0.2.tgz" - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-focus-visible@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-focus-visible/-/postcss-focus-visible-4.0.0.tgz" - dependencies: - postcss "^7.0.2" - -postcss-focus-within@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-focus-within/-/postcss-focus-within-3.0.0.tgz" - dependencies: - postcss "^7.0.2" - -postcss-font-variant@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-4.0.1.tgz" - dependencies: - postcss "^7.0.2" - -postcss-gap-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-2.0.0.tgz" - dependencies: - postcss "^7.0.2" - -postcss-image-set-function@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/postcss-image-set-function/-/postcss-image-set-function-3.0.1.tgz" - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-initial@^3.0.0: - version "3.0.4" - resolved "https://registry.npmjs.org/postcss-initial/-/postcss-initial-3.0.4.tgz" - dependencies: - postcss "^7.0.2" - -postcss-js@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/postcss-js/-/postcss-js-3.0.3.tgz" - integrity sha512-gWnoWQXKFw65Hk/mi2+WTQTHdPD5UJdDXZmX073EY/B3BWnYjO4F4t0VneTCnCGQ5E5GsCdMkzPaTXwl3r5dJw== - dependencies: - camelcase-css "^2.0.1" - postcss "^8.1.6" - -postcss-js@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.0.tgz#31db79889531b80dc7bc9b0ad283e418dce0ac00" - integrity sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ== - dependencies: - camelcase-css "^2.0.1" - -postcss-lab-function@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-2.0.1.tgz" - dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-load-config@^3.1.0: - version "3.1.4" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" - integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== - dependencies: - lilconfig "^2.0.5" - yaml "^1.10.2" - -postcss-logical@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-logical/-/postcss-logical-3.0.0.tgz" - dependencies: - postcss "^7.0.2" - -postcss-media-minmax@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-media-minmax/-/postcss-media-minmax-4.0.0.tgz" - dependencies: - postcss "^7.0.2" - -postcss-nested@5.0.6: - version "5.0.6" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.6.tgz#466343f7fc8d3d46af3e7dba3fcd47d052a945bc" - integrity sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA== - dependencies: - postcss-selector-parser "^6.0.6" - -postcss-nesting@^7.0.0: - version "7.0.1" - resolved "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-7.0.1.tgz" - dependencies: - postcss "^7.0.2" - -postcss-overflow-shorthand@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/postcss-overflow-shorthand/-/postcss-overflow-shorthand-2.0.0.tgz" - dependencies: - postcss "^7.0.2" - -postcss-page-break@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-2.0.0.tgz" - dependencies: - postcss "^7.0.2" - -postcss-place@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/postcss-place/-/postcss-place-4.0.1.tgz" - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-preset-env@^6.7.0: - version "6.7.0" - resolved "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.7.0.tgz" - dependencies: - autoprefixer "^9.6.1" - browserslist "^4.6.4" - caniuse-lite "^1.0.30000981" - css-blank-pseudo "^0.1.4" - css-has-pseudo "^0.10.0" - css-prefers-color-scheme "^3.1.1" - cssdb "^4.4.0" - postcss "^7.0.17" - postcss-attribute-case-insensitive "^4.0.1" - postcss-color-functional-notation "^2.0.1" - postcss-color-gray "^5.0.0" - postcss-color-hex-alpha "^5.0.3" - postcss-color-mod-function "^3.0.3" - postcss-color-rebeccapurple "^4.0.1" - postcss-custom-media "^7.0.8" - postcss-custom-properties "^8.0.11" - postcss-custom-selectors "^5.1.2" - postcss-dir-pseudo-class "^5.0.0" - postcss-double-position-gradients "^1.0.0" - postcss-env-function "^2.0.2" - postcss-focus-visible "^4.0.0" - postcss-focus-within "^3.0.0" - postcss-font-variant "^4.0.0" - postcss-gap-properties "^2.0.0" - postcss-image-set-function "^3.0.1" - postcss-initial "^3.0.0" - postcss-lab-function "^2.0.1" - postcss-logical "^3.0.0" - postcss-media-minmax "^4.0.0" - postcss-nesting "^7.0.0" - postcss-overflow-shorthand "^2.0.0" - postcss-page-break "^2.0.0" - postcss-place "^4.0.1" - postcss-pseudo-class-any-link "^6.0.0" - postcss-replace-overflow-wrap "^3.0.0" - postcss-selector-matches "^4.0.0" - postcss-selector-not "^4.0.0" - -postcss-pseudo-class-any-link@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-6.0.0.tgz" - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" - -postcss-replace-overflow-wrap@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-3.0.0.tgz" - dependencies: - postcss "^7.0.2" - -postcss-selector-matches@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-selector-matches/-/postcss-selector-matches-4.0.0.tgz" - dependencies: - balanced-match "^1.0.0" - postcss "^7.0.2" - -postcss-selector-not@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-4.0.1.tgz" - dependencies: - balanced-match "^1.0.0" - postcss "^7.0.2" - -postcss-selector-parser@^5.0.0-rc.3, postcss-selector-parser@^5.0.0-rc.4: - version "5.0.0" - resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz" - dependencies: - cssesc "^2.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.0.9: - version "6.0.9" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz#ee71c3b9ff63d9cd130838876c13a2ec1a992b2f" - integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-value-parser@^3.3.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" - integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== - -postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz" - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss@8.4.5: - version "8.4.5" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz" - integrity sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg== - dependencies: - nanoid "^3.1.30" - picocolors "^1.0.0" - source-map-js "^1.0.1" - -postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: - version "7.0.39" - resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz" - integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== - dependencies: - picocolors "^0.2.1" - source-map "^0.6.1" - -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== - dependencies: - nanoid "^3.3.1" - 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" - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" - -prettier@^2.0.2: - version "2.2.1" - resolved "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz" - -prettier@^2.4.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" - integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== - -prettier@^2.5.1: - version "2.5.1" - resolved "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz" - integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== - -pretty-format@^26.6.2: - version "26.6.2" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz" - dependencies: - "@jest/types" "^26.6.2" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^17.0.1" - -pretty-format@^27.0.0, pretty-format@^27.4.2, pretty-format@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" - integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== - dependencies: - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^17.0.1" - -pretty-hrtime@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz" - integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= - -proc-log@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/proc-log/-/proc-log-1.0.0.tgz" - integrity sha512-aCk8AO51s+4JyuYGg3Q/a6gnrlDO09NpVWePtjp7xwphcoQ04x5WAfCyugcsbLooWcMJ87CLkD4+604IckEdhg== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -progress@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -promise-all-reject-late@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz" - integrity sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw== - -promise-call-limit@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-1.0.1.tgz" - integrity sha512-3+hgaa19jzCGLuSCbieeRsu5C2joKfYn8pY6JAuXFRVfF4IO+L7UPpFWNTeWT9pM7uhskvbPPd/oEOktCn317Q== - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz" - integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= - -promise-retry@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz" - integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - dependencies: - err-code "^2.0.2" - retry "^0.12.0" - -prompt-sync@^4.1.6: - version "4.2.0" - resolved "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz" - integrity sha512-BuEzzc5zptP5LsgV5MZETjDaKSWfchl5U9Luiu8SKp7iZWD5tZalOxvNcZRwv+d2phNFr8xlbxmFNcRKfJOzJw== - dependencies: - strip-ansi "^5.0.0" - -prompts@^2.0.1: - version "2.4.1" - resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz" - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -promzard@^0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz" - integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= - dependencies: - read "1" - -prop-types@^15.0.0, prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - -property-expr@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/property-expr/-/property-expr-2.0.4.tgz" - integrity sha512-sFPkHQjVKheDNnPvotjQmm3KD3uk1fWKUN7CrpdbwmUx3CrG3QiM8QpTSimvig5vTXmTvjz7+TDvXOI9+4rkcg== - -property-information@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/property-information/-/property-information-6.0.1.tgz" - integrity sha512-F4WUUAF7fMeF4/JUFHNBWDaKDXi2jbvqBW/y6o5wsf3j19wTZ7S60TmtB5HoBhtgw7NKQRMWuz5vk2PR0CygUg== - -protobufjs@^6.10.2, protobufjs@^6.11.3, protobufjs@^6.8.8: - version "6.11.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" - integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" ">=13.7.0" - long "^4.0.0" - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -ps-tree@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" - integrity sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA== - dependencies: - event-stream "=3.3.4" - -psl@^1.1.28, psl@^1.1.33: - version "1.8.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -purgecss@^4.0.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/purgecss/-/purgecss-4.1.3.tgz#683f6a133c8c4de7aa82fe2746d1393b214918f7" - integrity sha512-99cKy4s+VZoXnPxaoM23e5ABcP851nC2y2GROkkjS8eJaJtlciGavd7iYAw2V84WeBqggZ12l8ef44G99HmTaw== - dependencies: - commander "^8.0.0" - glob "^7.1.7" - postcss "^8.3.5" - postcss-selector-parser "^6.0.6" - -pyth-staking-api@^1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/pyth-staking-api/-/pyth-staking-api-1.2.8.tgz#09dbc66f17bc1c0cc1c168815b86115c8c022ff1" - integrity sha512-majfEGXDNEYeDurJnoEdfy4GXojCnUoWikrArMcBgx9IpKSSnCUpmRv2pRbFC/xzvjOSN5sGXvGLGS5XfA6DMQ== - dependencies: - "@project-serum/anchor" "0.24.2" - "@solana/spl-governance" "^0.0.34" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.36.0" - encoding "^0.1.13" - pyth-staking-wasm "0.3.2" - ts-node "^10.7.0" - typescript "^4.3.5" - -pyth-staking-wasm@0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/pyth-staking-wasm/-/pyth-staking-wasm-0.3.2.tgz#56c67e63797bb9d7cd4a546bdc80d47174ee6940" - integrity sha512-hfUVBJDLZK+HWAH9m1DnPyWUc9d/Nce5Okc5h1OulsoDQ9taAJBgsQr8UACnNXupoTYBlykfwUFTJ6cnxd0FEw== - -qrcode-terminal@^0.12.0: - version "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" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -range-parser@^1.2.1, range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.2: - version "2.4.2" - resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz" - integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ== - dependencies: - bytes "3.1.1" - http-errors "1.8.1" - iconv-lite "0.4.24" - unpipe "1.0.0" - -rc-align@^4.0.0: - version "4.0.9" - resolved "https://registry.npmjs.org/rc-align/-/rc-align-4.0.9.tgz" - dependencies: - "@babel/runtime" "^7.10.1" - classnames "2.x" - dom-align "^1.7.0" - rc-util "^5.3.0" - resize-observer-polyfill "^1.5.1" - -rc-motion@^2.0.0: - version "2.4.3" - resolved "https://registry.npmjs.org/rc-motion/-/rc-motion-2.4.3.tgz" - dependencies: - "@babel/runtime" "^7.11.1" - classnames "^2.2.1" - rc-util "^5.2.1" - -rc-slider@^9.7.5: - version "9.7.5" - resolved "https://registry.yarnpkg.com/rc-slider/-/rc-slider-9.7.5.tgz#193141c68e99b1dc3b746daeb6bf852946f5b7f4" - integrity sha512-LV/MWcXFjco1epPbdw1JlLXlTgmWpB9/Y/P2yinf8Pg3wElHxA9uajN21lJiWtZjf5SCUekfSP6QMJfDo4t1hg== - dependencies: - "@babel/runtime" "^7.10.1" - classnames "^2.2.5" - rc-tooltip "^5.0.1" - rc-util "^5.16.1" - shallowequal "^1.1.0" - -rc-tooltip@^5.0.1: - version "5.1.0" - resolved "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.1.0.tgz" - dependencies: - "@babel/runtime" "^7.11.2" - rc-trigger "^5.0.0" - -rc-trigger@^5.0.0: - version "5.2.5" - resolved "https://registry.npmjs.org/rc-trigger/-/rc-trigger-5.2.5.tgz" - dependencies: - "@babel/runtime" "^7.11.2" - classnames "^2.2.6" - rc-align "^4.0.0" - rc-motion "^2.0.0" - rc-util "^5.5.0" - -rc-util@^5.16.1, rc-util@^5.2.1, rc-util@^5.3.0, rc-util@^5.5.0: - version "5.20.0" - resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-5.20.0.tgz#05915902313292cb3f0e8da9401a403be00c3f58" - integrity sha512-sHm129TjpUiJZuHCgX5moead5yag4ukIIZuwkK1SSlFMUceEx64sZNgJZJN7YQ9NJyDpabfJ8310fkcCXeyTog== - dependencies: - "@babel/runtime" "^7.12.5" - react-is "^16.12.0" - shallowequal "^1.1.0" - -react-clientside-effect@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/react-clientside-effect/-/react-clientside-effect-1.2.5.tgz" - integrity sha512-2bL8qFW1TGBHozGGbVeyvnggRpMjibeZM2536AKNENLECutp2yfs44IL8Hmpn8qjFQ2K7A9PnYf3vc7aQq/cPA== - dependencies: - "@babel/runtime" "^7.12.13" - -react-content-loader@^6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/react-content-loader/-/react-content-loader-6.1.0.tgz" - integrity sha512-S4/+doQrNs0PGDgUYCGGfdFjGax8dMQzYkWcSSxfaUcUjFkbnikWARuX9lWkglocIVhxnn3lxNb6uEWFFUzNUw== - -react-device-detect@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/react-device-detect/-/react-device-detect-2.1.2.tgz" - integrity sha512-N42xttwez3ECgu4KpOL2ICesdfoz8NCBfmc1rH9FRYSjH7NmMyANPSrQ3EvAtJyj/6TzJNhrANSO38iXjCB2Ug== - dependencies: - ua-parser-js "^0.7.30" - -react-dom@^17.0.0: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" - -react-dom@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.0.0.tgz#26b88534f8f1dbb80853e1eabe752f24100d8023" - integrity sha512-XqX7uzmFo0pUceWFCt7Gff6IyIMzFUn7QMZrbrQfGxtaxXZIcGQzoNpRLE3fQLnS4XzLLPMZX2T9TRcSrasicw== - dependencies: - loose-envify "^1.1.0" - scheduler "^0.21.0" - -react-focus-lock@^2.5.2: - version "2.7.1" - resolved "https://registry.npmjs.org/react-focus-lock/-/react-focus-lock-2.7.1.tgz" - integrity sha512-ImSeVmcrLKNMqzUsIdqOkXwTVltj79OPu43oT8tVun7eIckA4VdM7UmYUFo3H/UC2nRVgagMZGFnAOQEDiDYcA== - dependencies: - "@babel/runtime" "^7.0.0" - focus-lock "^0.10.1" - prop-types "^15.6.2" - react-clientside-effect "^1.2.5" - use-callback-ref "^1.2.5" - use-sidecar "^1.0.5" - -react-headless-pagination@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/react-headless-pagination/-/react-headless-pagination-0.1.0.tgz" - integrity sha512-B+t+9PafVL4M0SYoVwcPelmWvnGzvTijF1BI0iHcq44vXy1brwFi62d8a8GlipIxvvBIYoghmVqTLiFmlElG1A== - -react-hook-form@^7.31.3: - version "7.31.3" - resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.31.3.tgz#b61bafb9a7435f91695351a7a9f714d8c4df0121" - integrity sha512-NVZdCWViIWXXXlQ3jxVQH0NuNfwPf8A/0KvuCxrM9qxtP1qYosfR2ZudarziFrVOC7eTUbWbm1T4OyYCwv9oSQ== - -react-icons@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/react-icons/-/react-icons-4.3.1.tgz" - integrity sha512-cB10MXLTs3gVuXimblAdI71jrJx8njrJZmNMEMC+sQu5B/BIOmlsAjskdqpn81y8UBVEGuHODd7/ci5DvoSzTQ== - -react-is@^16.12.0, react-is@^16.13.1, react-is@^16.7.0: - version "16.13.1" - resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" - -react-is@^17.0.0, react-is@^17.0.1: - version "17.0.2" - resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz" - -react-lifecycles-compat@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" - integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== - -react-linkify@^1.0.0-alpha: - version "1.0.0-alpha" - resolved "https://registry.yarnpkg.com/react-linkify/-/react-linkify-1.0.0-alpha.tgz#b391c7b88e3443752fafe76a95ca4434e82e70d5" - integrity sha512-7gcIUvJkAXXttt1fmBK9cwn+1jTa4hbKLGCZ9J1U6EOkyb2/+LKL1Z28d9rtDLMnpvImlNlLPdTPooorl5cpmg== - dependencies: - linkify-it "^2.0.3" - tlds "^1.199.0" - -react-markdown@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/react-markdown/-/react-markdown-7.0.0.tgz" - integrity sha512-qdWfKxMgdKF3kHAV5pmcB12fAvytPoTpYwKTO6O/I3HujrK7sKIv6j4RnXVNLrNUh+TaBk+KtqpGzIKslX2rDg== - dependencies: - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - comma-separated-tokens "^2.0.0" - prop-types "^15.0.0" - property-information "^6.0.0" - react-is "^17.0.0" - remark-parse "^10.0.0" - remark-rehype "^9.0.0" - space-separated-tokens "^2.0.0" - style-to-object "^0.3.0" - unified "^10.0.0" - unist-util-visit "^4.0.0" - vfile "^5.0.0" - -react-media-hook@^0.4.9: - version "0.4.9" - resolved "https://registry.yarnpkg.com/react-media-hook/-/react-media-hook-0.4.9.tgz#7e57092f5800c53787dc9e912ad09e749dfb7bc7" - integrity sha512-FZr/2xA1+23vDJ1IZ794yLqMRRkBoCNOiJATdtTfB5GyVc5djf8FL2qEB/68pSkiNgHdHsmKknMSDr0sC4zBKQ== - -react-portal@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/react-portal/-/react-portal-4.2.2.tgz#bff1e024147d6041ba8c530ffc99d4c8248f49fa" - integrity sha512-vS18idTmevQxyQpnde0Td6ZcUlv+pD8GTyR42n3CHUQq9OHi1C4jDE4ZWEbEsrbrLRhSECYiao58cvocwMtP7Q== - dependencies: - prop-types "^15.5.8" - -react-remove-scroll-bar@^2.1.0: - version "2.2.0" - resolved "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.2.0.tgz" - integrity sha512-UU9ZBP1wdMR8qoUs7owiVcpaPwsQxUDC2lypP6mmixaGlARZa7ZIBx1jcuObLdhMOvCsnZcvetOho0wzPa9PYg== - dependencies: - react-style-singleton "^2.1.0" - tslib "^1.0.0" - -react-remove-scroll@^2.4.3: - version "2.4.3" - resolved "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.4.3.tgz" - integrity sha512-lGWYXfV6jykJwbFpsuPdexKKzp96f3RbvGapDSIdcyGvHb7/eqyn46C7/6h+rUzYar1j5mdU+XECITHXCKBk9Q== - dependencies: - react-remove-scroll-bar "^2.1.0" - react-style-singleton "^2.1.0" - tslib "^1.0.0" - use-callback-ref "^1.2.3" - use-sidecar "^1.0.1" - -react-style-singleton@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.1.1.tgz" - integrity sha512-jNRp07Jza6CBqdRKNgGhT3u9umWvils1xsuMOjZlghBDH2MU0PL2WZor4PGYjXpnRCa9DQSlHMs/xnABWOwYbA== - dependencies: - get-nonce "^1.0.0" - invariant "^2.2.4" - tslib "^1.0.0" - -react-use-gesture@^9.1.3: - version "9.1.3" - resolved "https://registry.npmjs.org/react-use-gesture/-/react-use-gesture-9.1.3.tgz" - integrity sha512-CdqA2SmS/fj3kkS2W8ZU8wjTbVBAIwDWaRprX7OKaj7HlGwBasGEFggmk5qNklknqk9zK/h8D355bEJFTpqEMg== - -react-virtualized-auto-sizer@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.6.tgz#66c5b1c9278064c5ef1699ed40a29c11518f97ca" - integrity sha512-7tQ0BmZqfVF6YYEWcIGuoR3OdYe8I/ZFbNclFlGOC3pMqunkYF/oL30NCjSGl9sMEb17AnzixDz98Kqc3N76HQ== - -react-window@^1.8.7: - version "1.8.7" - resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.7.tgz#5e9fd0d23f48f432d7022cdb327219353a15f0d4" - integrity sha512-JHEZbPXBpKMmoNO1bNhoXOOLg/ujhL/BU4IqVU9r8eQPcy5KQnGHIHDRkJ0ns9IM5+Aq5LNwt3j8t3tIrePQzA== - dependencies: - "@babel/runtime" "^7.0.0" - memoize-one ">=3.1.1 <6" - -react@^17.0.0, react@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - -react@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.1.0.tgz#6f8620382decb17fdc5cc223a115e2adbf104890" - integrity sha512-4oL8ivCz5ZEPyclFQXaNksK3adutVS8l2xzZU0cqEFrE9Sb7fC0EFK5uEk74wIreL1DERyjvsU915j1pcT2uEQ== - dependencies: - loose-envify "^1.1.0" - -read-cmd-shim@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz" - integrity sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw== - -read-package-json-fast@^2.0.1, read-package-json-fast@^2.0.2, read-package-json-fast@^2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz" - integrity sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ== - dependencies: - json-parse-even-better-errors "^2.3.0" - npm-normalize-package-bin "^1.0.1" - -read-package-json@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.1.tgz" - integrity sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw== - dependencies: - glob "^7.1.1" - json-parse-even-better-errors "^2.3.0" - normalize-package-data "^3.0.0" - npm-normalize-package-bin "^1.0.0" - -read@1, read@^1.0.7, read@~1.0.1, read@~1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/read/-/read-1.0.7.tgz" - integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= - dependencies: - mute-stream "~0.0.4" - -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.0.6, readable-stream@^3.5.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdir-scoped-modules@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz" - integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== - dependencies: - debuglog "^1.0.1" - dezalgo "^1.0.0" - graceful-fs "^4.1.2" - once "^1.3.0" - -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -readline-sync@^1.4.10: - version "1.4.10" - resolved "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz" - integrity sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw== - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - -reduce-css-calc@^2.1.8: - version "2.1.8" - resolved "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.8.tgz" - integrity sha512-8liAVezDmUcH+tdzoEGrhfbGcP7nOV4NkGE3a74+qqvE7nt9i4sKLGBuZNOnpI4WiGksiNPklZxva80061QiPg== - dependencies: - css-unit-converter "^1.1.1" - postcss-value-parser "^3.3.0" - -regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4: - version "0.13.9" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz" - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -remark-gfm@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz" - integrity sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-gfm "^2.0.0" - micromark-extension-gfm "^2.0.0" - unified "^10.0.0" - -remark-parse@^10.0.0: - version "10.0.0" - resolved "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.0.tgz" - integrity sha512-07ei47p2Xl7Bqbn9H2VYQYirnAFJPwdMuypdozWsSbnmrkgA2e2sZLZdnDNrrsxR4onmIzH/J6KXqKxCuqHtPQ== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-from-markdown "^1.0.0" - unified "^10.0.0" - -remark-rehype@^9.0.0: - version "9.0.0" - resolved "https://registry.npmjs.org/remark-rehype/-/remark-rehype-9.0.0.tgz" - integrity sha512-SFA+mPWu45ynFPKeT3h5eNNVAYoMp3wizr3KSKh1IQ9L6dLSyD25/df6/vv8EW8ji3O3dnZGdbLQl592Tn+ydg== - dependencies: - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-to-hast "^11.0.0" - unified "^10.0.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.4" - resolved "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz" - integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -request@^2.88.2: - version "2.88.2" - resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resize-observer-polyfill@^1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz" - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" - dependencies: - resolve-from "^5.0.0" - -resolve-dir@^1.0.0, resolve-dir@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== - -resolve@^1.1.6, resolve@^1.12.0, resolve@^1.20.0, resolve@^1.22.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" - integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== - dependencies: - is-core-module "^2.8.1" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^2.0.0-next.3: - version "2.0.0-next.3" - resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz" - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz" - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= - -retry@^0.13.1: - version "0.13.1" - resolved "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz" - integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rgb-regex@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz" - integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= - -rgba-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz" - integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= - -rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.2.4: - version "2.2.7" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" - integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== - dependencies: - bn.js "^5.2.0" - -robust-predicates@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a" - integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g== - -rpc-websockets@^7.4.12: - version "7.4.17" - resolved "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.4.17.tgz" - integrity sha512-eolVi/qlXS13viIUH9aqrde902wzSLAai0IjmOZSRefp5I3CSG/vCnD0c0fDSYCWuEyUoRL1BHQA8K1baEUyow== - dependencies: - "@babel/runtime" "^7.11.2" - circular-json "^0.5.9" - eventemitter3 "^4.0.7" - uuid "^8.3.0" - ws "^7.4.5" - optionalDependencies: - bufferutil "^4.0.1" - utf-8-validate "^5.0.2" - -rpc-websockets@^7.4.2: - version "7.4.16" - resolved "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.4.16.tgz" - integrity sha512-0b7OVhutzwRIaYAtJo5tqtaQTWKfwAsKnaThOSOy+VkhVdleNUgb8eZnWSdWITRZZEigV5uPEIDr5KZe4DBrdQ== - dependencies: - "@babel/runtime" "^7.11.2" - circular-json "^0.5.9" - eventemitter3 "^4.0.7" - uuid "^8.3.0" - ws "^7.4.5" - optionalDependencies: - bufferutil "^4.0.1" - utf-8-validate "^5.0.2" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rw@1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" - integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== - -rxjs@6, rxjs@^6.6.7: - version "6.6.7" - resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz" - dependencies: - tslib "^1.9.0" - -rxjs@^7.1.0: - version "7.5.5" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.5.tgz#2ebad89af0f560f460ad5cc4213219e1f7dd4e9f" - integrity sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw== - dependencies: - tslib "^2.1.0" - -sade@^1.7.3: - version "1.8.1" - resolved "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz" - integrity sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A== - dependencies: - mri "^1.1.0" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz" - dependencies: - xmlchars "^2.2.0" - -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - -scheduler@^0.21.0: - version "0.21.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.21.0.tgz#6fd2532ff5a6d877b6edb12f00d8ab7e8f308820" - integrity sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ== - dependencies: - loose-envify "^1.1.0" - -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - -scrypt-js@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -secp256k1@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" - integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== - dependencies: - bindings "^1.5.0" - bip66 "^1.1.5" - bn.js "^4.11.8" - create-hash "^1.2.0" - drbg.js "^1.0.1" - elliptic "^6.5.2" - nan "^2.14.0" - safe-buffer "^5.1.2" - -secp256k1@^4.0.1, secp256k1@^4.0.2: - version "4.0.3" - resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz" - integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz" - integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= - -selfsigned@^1.10.8: - version "1.10.11" - resolved "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz" - integrity sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA== - dependencies: - node-forge "^0.10.0" - -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz" - -semver@^5.5.0: - version "5.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -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.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: - version "7.3.5" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - 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" - integrity sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "1.8.1" - mime "1.6.0" - ms "2.1.3" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serve-index@^1.9.1: - version "1.9.1" - resolved "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.14.2: - version "1.14.2" - resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz" - integrity sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.2" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-interval-async@1.0.34: - version "1.0.34" - resolved "https://registry.npmjs.org/set-interval-async/-/set-interval-async-1.0.34.tgz" - integrity sha512-wwDVmeXwOaumkZ7FizY0ux8N0fk4KM1Bq7DfBGHxjD/NSSjcvSlj4D6HHIxzu415QngUr0YW97TXl/s1Ou/BHQ== - dependencies: - "@babel/runtime" "7.5.0" - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -sha256-uint8array@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/sha256-uint8array/-/sha256-uint8array-0.10.3.tgz#322a91413f78f518e0b9c8f8e982cc2e629b59c7" - integrity sha512-SFTs87RfXVulKrhhP6B5/qcFruOKQZaKf6jY9V4PJ7NOG0qIlQP6XL4pQq5xagsuP/Wd55S7tUBJpRajEsDUEQ== - -shallowequal@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - -shelljs@^0.8.4: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -shiki@^0.9.3: - version "0.9.15" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.9.15.tgz#2481b46155364f236651319d2c18e329ead6fa44" - integrity sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw== - dependencies: - jsonc-parser "^3.0.0" - vscode-oniguruma "^1.6.1" - vscode-textmate "5.2.0" - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.0, signal-exit@^3.0.3: - version "3.0.6" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz" - integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ== - -signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz" - -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz" - integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= - dependencies: - is-arrayish "^0.3.1" - -sinon-chai@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-3.7.0.tgz#cfb7dec1c50990ed18c153f1840721cf13139783" - integrity sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g== - -sirv@^1.0.7: - version "1.0.19" - resolved "https://registry.npmjs.org/sirv/-/sirv-1.0.19.tgz" - integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== - dependencies: - "@polka/url" "^1.0.0-next.20" - mrmime "^1.0.0" - totalist "^1.0.0" - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz" - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz" - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -smart-buffer@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -snake-case@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz" - integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -socket.io-client@^4.5.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.1.tgz#cab8da71976a300d3090414e28c2203a47884d84" - integrity sha512-e6nLVgiRYatS+AHXnOnGi4ocOpubvOUCGhyWw8v+/FxW8saHkinG6Dfhi9TU0Kt/8mwJIAASxvw6eujQmjdZVA== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.2" - engine.io-client "~6.2.1" - socket.io-parser "~4.2.0" - -socket.io-parser@~4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.0.tgz#3f01e5bc525d94aa52a97ed5cbc12e229bbc4d6b" - integrity sha512-tLfmEwcEwnlQTxFB7jibL/q2+q8dlVQzj4JdRLJ/W/G1+Fu9VSxCx1Lo+n1HvXxKnM//dUuD0xgiA7tQf57Vng== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - -sockjs-client@^1.5.0: - version "1.5.2" - resolved "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.2.tgz" - integrity sha512-ZzRxPBISQE7RpzlH4tKJMQbHM9pabHluk0WBaxAQ+wm/UieeBVBou0p4wVnSQGN9QmpAZygQ0cDIypWuqOFmFQ== - dependencies: - debug "^3.2.6" - eventsource "^1.0.7" - faye-websocket "^0.11.3" - inherits "^2.0.4" - json3 "^3.3.3" - url-parse "^1.5.3" - -sockjs@^0.3.21: - version "0.3.24" - resolved "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz" - integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== - dependencies: - faye-websocket "^0.11.3" - uuid "^8.3.2" - websocket-driver "^0.7.4" - -socks-proxy-agent@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz#f6b5229cc0cbd6f2f202d9695f09d871e951c85e" - integrity sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ== - dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" - -socks@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" - integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA== - dependencies: - ip "^1.1.5" - smart-buffer "^4.2.0" - -source-map-js@^1.0.1, source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-resolve@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz" - integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - -source-map-support@^0.5.6: - version "0.5.19" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz" - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz" - -space-separated-tokens@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.1.tgz" - integrity sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.11" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" - integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== - -spdy-transport@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz" - integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== - dependencies: - debug "^4.1.0" - detect-node "^2.0.4" - hpack.js "^2.1.6" - obuf "^1.1.2" - readable-stream "^3.0.6" - wbuf "^1.7.3" - -spdy@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz" - integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== - dependencies: - debug "^4.1.0" - handle-thing "^2.0.0" - http-deceiver "^1.2.7" - select-hose "^2.0.0" - spdy-transport "^3.0.0" - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -split@0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" - integrity sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8= - dependencies: - through "2" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - -sshpk@^1.7.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" - integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -ssri@^8.0.0, ssri@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz" - integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== - dependencies: - minipass "^3.1.1" - -stack-utils@^2.0.3: - version "2.0.5" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz" - integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== - dependencies: - escape-string-regexp "^2.0.0" - -start-server-and-test@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/start-server-and-test/-/start-server-and-test-1.14.0.tgz#c57f04f73eac15dd51733b551d775b40837fdde3" - integrity sha512-on5ELuxO2K0t8EmNj9MtVlFqwBMxfWOhu4U7uZD1xccVpFlOQKR93CSe0u98iQzfNxRyaNTb/CdadbNllplTsw== - dependencies: - bluebird "3.7.2" - check-more-types "2.24.0" - debug "4.3.2" - execa "5.1.1" - lazy-ass "1.6.0" - ps-tree "1.2.0" - wait-on "6.0.0" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -stream-browserify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - -stream-combiner@~0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" - integrity sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ= - dependencies: - duplexer "~0.1.1" - -string-argv@0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz" - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -string-similarity@^4.0.3: - version "4.0.4" - resolved "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string.prototype.matchall@^4.0.6: - version "4.0.6" - resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.6.tgz" - integrity sha512-6WgDX8HmQqvEd7J+G6VtAahhsQIssiZ8zl7zKh1VDMFyL3hRTJP4FTNA3RbIp2TOQ9AYNDcc7e3fH0Qbup+DBg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - get-intrinsic "^1.1.1" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.3.1" - side-channel "^1.0.4" - -string.prototype.trimend@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz" - integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string.prototype.trimstart@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz" - integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -stringify-object@^3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz" - dependencies: - get-own-enumerable-property-symbols "^3.0.0" - is-obj "^1.0.1" - is-regexp "^1.0.0" - -stringify-package@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz" - integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -style-to-object@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.3.0.tgz#b1b790d205991cc783801967214979ee19a76e46" - integrity sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA== - dependencies: - inline-style-parser "0.1.1" - -styled-jsx@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.1.tgz#78fecbbad2bf95ce6cd981a08918ce4696f5fc80" - integrity sha512-+PIZ/6Uk40mphiQJJI1202b+/dYeTVd9ZnMPR80pgiWbjIwvN2zIp4r9et0BgqBuShh48I0gttPlAXA7WVvBxw== - -stylis@4.0.13: - version "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" - integrity sha512-LbtbFpktW1FcwxVIJlxdk7bCyBq/GzOx2FSFLRLTUhWIA1gHkYPIl3aXRG5mBdGZtnPNT6t+4eEcLDCMOuBHww== - dependencies: - kind-of "^6.0.2" - tiny-invariant "^1.0.6" - -superstruct@^0.14.2: - version "0.14.2" - resolved "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz" - integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== - -superstruct@^0.15.2: - version "0.15.3" - resolved "https://registry.npmjs.org/superstruct/-/superstruct-0.15.3.tgz" - integrity sha512-wilec1Rg3FtKuRjRyCt70g5W29YUEuaLnybdVQUI+VQ7m0bw8k7TzrRv5iYmo6IpjLVrwxP5t3RgjAVqhYh4Fg== - -superstruct@^0.15.4: - version "0.15.4" - resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.15.4.tgz#e3381dd84ca07e704e19f69eda74eee1a5efb1f9" - integrity sha512-eOoMeSbP9ZJChNOm/9RYjE+F36rYR966AAqeG3xhQB02j2sfAUXDp4EQ/7bAOqnlJnuFDB8yvOu50SocvKpUEw== - -supports-color@8.1.1, supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-hyperlinks@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz" - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -swr@^0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/swr/-/swr-0.5.7.tgz#bb6a56ad1c61da719d182c1137198554d5a78aac" - integrity sha512-Jh1Efgu8nWZV9rU4VLUMzBzcwaZgi4znqbVXvAtUy/0JzSiN6bNjLaJK8vhY/Rtp7a83dosz5YuehfBNwC/ZoQ== - dependencies: - dequal "2.0.2" - -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - -tailwindcss@^2.2.7: - version "2.2.19" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.19.tgz#540e464832cd462bb9649c1484b0a38315c2653c" - integrity sha512-6Ui7JSVtXadtTUo2NtkBBacobzWiQYVjYW0ZnKaP9S1ZCKQ0w7KVNz+YSDI/j7O7KCMHbOkz94ZMQhbT9pOqjw== - dependencies: - arg "^5.0.1" - bytes "^3.0.0" - chalk "^4.1.2" - chokidar "^3.5.2" - color "^4.0.1" - cosmiconfig "^7.0.1" - detective "^5.2.0" - didyoumean "^1.2.2" - dlv "^1.1.3" - fast-glob "^3.2.7" - fs-extra "^10.0.0" - glob-parent "^6.0.1" - html-tags "^3.1.0" - is-color-stop "^1.1.0" - is-glob "^4.0.1" - lodash "^4.17.21" - lodash.topath "^4.5.2" - modern-normalize "^1.1.0" - node-emoji "^1.11.0" - normalize-path "^3.0.0" - object-hash "^2.2.0" - postcss-js "^3.0.3" - postcss-load-config "^3.1.0" - postcss-nested "5.0.6" - postcss-selector-parser "^6.0.6" - postcss-value-parser "^4.1.0" - pretty-hrtime "^1.0.3" - purgecss "^4.0.3" - quick-lru "^5.1.1" - reduce-css-calc "^2.1.8" - resolve "^1.20.0" - tmp "^0.2.1" - -tailwindcss@^3.0.23: - version "3.0.23" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.0.23.tgz#c620521d53a289650872a66adfcb4129d2200d10" - integrity sha512-+OZOV9ubyQ6oI2BXEhzw4HrqvgcARY38xv3zKcjnWtMIZstEsXdI9xftd1iB7+RbOnj2HOEzkA0OyB5BaSxPQA== - dependencies: - arg "^5.0.1" - chalk "^4.1.2" - chokidar "^3.5.3" - color-name "^1.1.4" - cosmiconfig "^7.0.1" - detective "^5.2.0" - didyoumean "^1.2.2" - dlv "^1.1.3" - fast-glob "^3.2.11" - glob-parent "^6.0.2" - is-glob "^4.0.3" - normalize-path "^3.0.0" - object-hash "^2.2.0" - postcss "^8.4.6" - postcss-js "^4.0.0" - postcss-load-config "^3.1.0" - postcss-nested "5.0.6" - postcss-selector-parser "^6.0.9" - postcss-value-parser "^4.2.0" - quick-lru "^5.1.1" - resolve "^1.22.0" - -tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -tar@^6.0.2, tar@^6.1.0, tar@^6.1.11: - version "6.1.11" - resolved "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz" - integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^3.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz" - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-encoding-utf-8@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz" - integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== - -text-table@^0.2.0, text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz" - integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.1" - resolved "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz" - integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== - dependencies: - any-promise "^1.0.0" - -throat@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz" - integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== - -through@2, "through@>=2.2.7 <3", through@^2.3.8, through@~2.3, through@~2.3.1: - version "2.3.8" - resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -thunky@^1.0.2: - version "1.1.0" - resolved "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz" - integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - -timsort@^0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz" - -tiny-invariant@^1.0.6, tiny-invariant@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.2.0.tgz#a1141f86b672a9148c72e978a19a73b9b94a15a9" - integrity sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg== - -tiny-relative-date@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz" - integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== - -tiny-secp256k1@^1.1.3: - version "1.1.6" - resolved "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz" - integrity sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA== - dependencies: - bindings "^1.3.0" - bn.js "^4.11.8" - create-hmac "^1.1.7" - elliptic "^6.4.0" - nan "^2.13.2" - -tiny-warning@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz" - integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== - -tippy.js@^6.3.1: - version "6.3.1" - resolved "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.1.tgz" - integrity sha512-JnFncCq+rF1dTURupoJ4yPie5Cof978inW6/4S6kmWV7LL9YOSEVMifED3KdrVPEG+Z/TFH2CDNJcQEfaeuQww== - dependencies: - "@popperjs/core" "^2.8.3" - -tlds@^1.199.0: - version "1.231.0" - resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.231.0.tgz#93880175cd0a06fdf7b5b5b9bcadff9d94813e39" - integrity sha512-L7UQwueHSkGxZHQBXHVmXW64oi+uqNtzFt2x6Ssk7NVnpIbw16CRs4eb/jmKOZ9t2JnqZ/b3Cfvo97lnXqKrhw== - -tmp@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" - -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz" - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toformat@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/toformat/-/toformat-2.0.0.tgz" - integrity sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ== - -toggle-selection@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" - integrity sha1-bkWxJj8gF/oKzH2J14sVuL932jI= - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -toml@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz" - integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== - -toposort@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz" - integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= - -totalist@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz" - integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== - -tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz" - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tr46@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/tr46/-/tr46-2.0.2.tgz" - dependencies: - punycode "^2.1.1" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= - -traverse-chain@~0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz" - integrity sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE= - -treeverse@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/treeverse/-/treeverse-1.0.4.tgz" - integrity sha512-whw60l7r+8ZU8Tu/Uc2yxtc4ZTZbR/PF3u1IPNKGQ6p8EICLb3Z2lAgoqw9bqYd8IkgnsaOcLzYHFckjqNsf0g== - -trough@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/trough/-/trough-2.0.2.tgz" - integrity sha512-FnHq5sTMxC0sk957wHDzRnemFnNBvt/gSY99HzK8F7UP5WAbvP70yX5bd7CjEQkN+TjdxwI7g7lJ6podqrG2/w== - -ts-node@^10.7.0: - version "10.7.0" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5" - integrity sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A== - dependencies: - "@cspotcode/source-map-support" "0.7.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.0" - yn "3.1.1" - -ts-poet@^4.5.0: - version "4.10.0" - resolved "https://registry.npmjs.org/ts-poet/-/ts-poet-4.10.0.tgz" - integrity sha512-V5xzt+LDMVtxWvK12WVwHhGHTA//CeoPdWOqka0mMjlRqq7RPKYSfWEnzJdMmhNbd34BwZuZpip4mm+nqEcbQA== - dependencies: - lodash "^4.17.15" - prettier "^2.5.1" - -ts-proto-descriptors@1.6.0: - version "1.6.0" - resolved "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.6.0.tgz" - integrity sha512-Vrhue2Ti99us/o76mGy28nF3W/Uanl1/8detyJw2yyRwiBC5yxy+hEZqQ/ZX2PbZ1vyCpJ51A9L4PnCCnkBMTQ== - dependencies: - long "^4.0.0" - protobufjs "^6.8.8" - -ts-proto@^1.79.0: - version "1.107.0" - resolved "https://registry.npmjs.org/ts-proto/-/ts-proto-1.107.0.tgz" - integrity sha512-g9/x0Uh/gov5gG0w/0ulNV2W6RXmBYc12Z3pSLbMKMDvrmEOAvYCbPl8qxAiu9DCNh6gY7asO9aVrP6+2QNWCA== - dependencies: - "@types/object-hash" "^1.3.0" - dataloader "^1.4.0" - object-hash "^1.3.1" - protobufjs "^6.8.8" - ts-poet "^4.5.0" - ts-proto-descriptors "1.6.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== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@^1.0.0, tslib@^1.7.1, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.0.0, tslib@^2.0.3, tslib@^2.3.0, tslib@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - -tslib@^2.1.0, tslib@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== - -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@1.0.3, tweetnacl@1.x.x, tweetnacl@^1.0.0, tweetnacl@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -twin.macro@^2.4.0, twin.macro@^2.8.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/twin.macro/-/twin.macro-2.8.2.tgz#7f1344b4b1c3811da93a62fa204fe08999df7a75" - integrity sha512-2Vg09mp+nA70AWUedJ8WRgB2me3buq7JGbOnjHnFnNaBzomVu5k7lJ9YGpByIlre+UYr7QRhtlj7+IUKxvCrUA== - dependencies: - "@babel/parser" "^7.12.5" - "@babel/template" "^7.14.5" - autoprefixer "^10.2.5" - babel-plugin-macros "^2.8.0" - chalk "^4.1.0" - clean-set "^1.1.1" - color "^3.1.3" - dset "^2.0.1" - lodash.flatmap "^4.5.0" - lodash.get "^4.4.2" - lodash.merge "^4.6.2" - postcss "^8.1.8" - string-similarity "^4.0.3" - tailwindcss "^2.2.7" - timsort "^0.3.0" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - dependencies: - prelude-ls "^1.2.1" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" - dependencies: - prelude-ls "~1.1.2" - -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== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedoc-default-themes@^0.12.10: - version "0.12.10" - resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.12.10.tgz#614c4222fe642657f37693ea62cad4dafeddf843" - integrity sha512-fIS001cAYHkyQPidWXmHuhs8usjP5XVJjWB8oZGqkTowZaz3v7g3KDZeeqE82FBrmkAnIBOY3jgy7lnPnqATbA== - -typedoc-plugin-missing-exports@^0.22.6: - version "0.22.6" - resolved "https://registry.yarnpkg.com/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-0.22.6.tgz#7467c60f1cd26507124103f0b9bca271d5aa8d71" - integrity sha512-1uguGQqa+c5f33nWS3v1mm0uAx4Ii1lw4Kx2zQksmYFKNEWTmrmMXbMNBoBg4wu0p4dFCNC7JIWPoRzpNS6pFA== - -typedoc@^0.20.36: - version "0.20.37" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.20.37.tgz#9b9417149cb815e3d569fc300b5d2c6e4e6c5d93" - integrity sha512-9+qDhdc4X00qTNOtii6QX2z7ndAeWVOso7w3MPSoSJdXlVhpwPfm1yEp4ooKuWA9fiQILR8FKkyjmeqa13hBbw== - dependencies: - colors "^1.4.0" - fs-extra "^9.1.0" - handlebars "^4.7.7" - lodash "^4.17.21" - lunr "^2.3.9" - marked "~2.0.3" - minimatch "^3.0.0" - progress "^2.0.3" - shelljs "^0.8.4" - shiki "^0.9.3" - typedoc-default-themes "^0.12.10" - -typeforce@^1.11.5: - version "1.18.0" - resolved "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz" - integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== - -typescript@^4.1.2, typescript@^4.5.4: - version "4.5.5" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz" - integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== - -typescript@^4.2.4: - version "4.6.2" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz" - integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== - -typescript@^4.3.5, typescript@^4.6.2: - version "4.6.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" - integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== - -typescript@^4.5.5, typescript@^4.6.3: - version "4.6.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c" - integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw== - -ua-parser-js@^0.7.30: - version "0.7.31" - resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz" - integrity sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ== - -uc.micro@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" - integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== - -uglify-js@^3.1.4: - version "3.15.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.4.tgz#fa95c257e88f85614915b906204b9623d4fa340d" - integrity sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA== - -unbox-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz" - integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== - dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.1" - has-symbols "^1.0.2" - which-boxed-primitive "^1.0.2" - -unfetch@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" - integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== - -unified@^10.0.0: - version "10.1.0" - resolved "https://registry.npmjs.org/unified/-/unified-10.1.0.tgz" - integrity sha512-4U3ru/BRXYYhKbwXV6lU6bufLikoAavTwev89H5UxY8enDFaAT2VXmIXYNm6hb5oHPng/EXr77PVyDFcptbk5g== - dependencies: - "@types/unist" "^2.0.0" - bail "^2.0.0" - extend "^3.0.0" - is-buffer "^2.0.0" - is-plain-obj "^4.0.0" - trough "^2.0.0" - vfile "^5.0.0" - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz" - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -unist-builder@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/unist-builder/-/unist-builder-3.0.0.tgz" - integrity sha512-GFxmfEAa0vi9i5sd0R2kcrI9ks0r82NasRq5QHh2ysGngrc6GiqD5CDf1FjPenY4vApmFASBIIlk/jj5J5YbmQ== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-generated@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.0.tgz" - integrity sha512-TiWE6DVtVe7Ye2QxOVW9kqybs6cZexNwTwSMVgkfjEReqy/xwGpAXb99OxktoWwmL+Z+Epb0Dn8/GNDYP1wnUw== - -unist-util-is@^5.0.0: - version "5.1.1" - resolved "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.1.1.tgz" - integrity sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ== - -unist-util-position@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.1.tgz" - integrity sha512-mgy/zI9fQ2HlbOtTdr2w9lhVaiFUHWQnZrFF2EUoVOqtAUdzqMtNiD99qA5a1IcjWVR8O6aVYE9u7Z2z1v0SQA== - -unist-util-stringify-position@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.0.tgz" - integrity sha512-SdfAl8fsDclywZpfMDTVDxA2V7LjtRDTOFd44wUJamgl6OlVngsqWjxvermMYf60elWHbxhuRCZml7AnuXCaSA== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-visit-parents@^4.0.0: - version "4.1.1" - resolved "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-4.1.1.tgz" - integrity sha512-1xAFJXAKpnnJl8G7K5KgU7FY55y3GcLIXqkzUj5QF/QVP7biUm0K0O2oqVkYsdjzJKifYeWn9+o6piAK2hGSHw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - -unist-util-visit-parents@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.0.0.tgz" - integrity sha512-CVaLOYPM/EaFTYMytbaju3Tw4QI3DHnHFnL358FkEu0hZOzSm/hqBdVwOQDR60jF5ZzhB1tlZlRH0ll/yekZIQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - -unist-util-visit@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-3.1.0.tgz" - integrity sha512-Szoh+R/Ll68QWAyQyZZpQzZQm2UPbxibDvaY8Xc9SUtYgPsDzx5AWSk++UUt2hJuow8mvwR+rG+LQLw+KsuAKA== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^4.0.0" - -unist-util-visit@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.0.0.tgz" - integrity sha512-3HWTvrtU10/E7qgPznBfiOyG0TXj9W8c1GSfaI8L9GkaG1pLePiQPZ7E35a0R3ToQ/zcy4Im6aZ9WBgOTnv1MQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^5.0.0" - -universalify@^0.1.0, universalify@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -unload@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/unload/-/unload-2.3.1.tgz#9d16862d372a5ce5cb630ad1309c2fd6e35dacfe" - integrity sha512-MUZEiDqvAN9AIDRbbBnVYVvfcR6DrjCqeU2YQMmliFZl9uaBUjTkhuDQkBiyAy8ad5bx1TXVbqZ3gg7namsWjA== - dependencies: - "@babel/runtime" "^7.6.2" - detect-node "2.1.0" - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -unstated-next@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/unstated-next/-/unstated-next-1.1.0.tgz" - integrity sha512-AAn47ZncPvgBGOvMcn8tSRxsrqwf2VdAPxLASTuLJvZt4rhKfDvUkmYZLGfclImSfTVMv7tF4ynaVxin0JjDCA== - -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-parse@^1.4.3: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -url-parse@^1.5.3: - version "1.5.4" - resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.4.tgz" - integrity sha512-ITeAByWWoqutFClc/lRZnFplgXgEZr3WJ6XngMM/N9DMIm4K8zXPCZ1Jdu0rERwO84w1WC5wkle2ubwTA4NTBg== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.npmjs.org/url/-/url-0.11.0.tgz" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use-callback-ref@^1.2.3, use-callback-ref@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.2.5.tgz" - integrity sha512-gN3vgMISAgacF7sqsLPByqoePooY3n2emTH59Ur5d/M8eg4WTWu1xp8i8DHjohftIyEx0S08RiYxbffr4j8Peg== - -use-sidecar@^1.0.1, use-sidecar@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.0.5.tgz" - integrity sha512-k9jnrjYNwN6xYLj1iaGhonDghfvmeTmYjAiGvOr7clwKfPjMXJf4/HOr7oT5tJwYafgp2tG2l3eZEOfoELiMcA== - dependencies: - detect-node-es "^1.1.0" - tslib "^1.9.3" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/use/-/use-3.1.1.tgz" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -utf-8-validate@^5.0.2: - version "5.0.8" - resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.8.tgz" - integrity sha512-k4dW/Qja1BYDl2qD4tOMB9PFVha/UJtxTc1cXYOe3WwA/2m0Yn4qB7wLMpJyLJ/7DR0XnTut3HsCSzDT4ZvKgA== - dependencies: - node-gyp-build "^4.3.0" - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util@^0.12.0: - version "0.12.4" - resolved "https://registry.npmjs.org/util/-/util-0.12.4.tgz" - integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuid@^8.3.0, uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -uvu@^0.5.0: - version "0.5.3" - resolved "https://registry.npmjs.org/uvu/-/uvu-0.5.3.tgz" - integrity sha512-brFwqA3FXzilmtnIyJ+CxdkInkY/i4ErvP7uV0DnUVxQcQ55reuHphorpF+tZoVHK2MniZ/VJzI7zJQoc9T9Yw== - dependencies: - dequal "^2.0.0" - diff "^5.0.0" - kleur "^4.0.3" - sade "^1.7.3" - -v8-compile-cache-lib@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz" - integrity sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA== - -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz" - -v8-to-istanbul@^8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz" - integrity sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" - -validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -validate-npm-package-name@^3.0.0, validate-npm-package-name@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz" - integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= - dependencies: - builtins "^1.0.3" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vfile-message@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/vfile-message/-/vfile-message-3.0.2.tgz" - integrity sha512-UUjZYIOg9lDRwwiBAuezLIsu9KlXntdxwG+nXnjuQAHvBpcX3x0eN8h+I7TkY5nkCXj+cWVp4ZqebtGBvok8ww== - dependencies: - "@types/unist" "^2.0.0" - unist-util-stringify-position "^3.0.0" - -vfile@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/vfile/-/vfile-5.1.0.tgz" - integrity sha512-4o7/DJjEaFPYSh0ckv5kcYkJTHQgCKdL8ozMM1jLAxO9ox95IzveDPXCZp08HamdWq8JXTkClDvfAKaeLQeKtg== - dependencies: - "@types/unist" "^2.0.0" - is-buffer "^2.0.0" - unist-util-stringify-position "^3.0.0" - vfile-message "^3.0.0" - -vscode-oniguruma@^1.6.1: - version "1.6.2" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz#aeb9771a2f1dbfc9083c8a7fdd9cccaa3f386607" - integrity sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA== - -vscode-textmate@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" - integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== - -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz" - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz" - dependencies: - xml-name-validator "^3.0.0" - -wait-for-event@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/wait-for-event/-/wait-for-event-2.0.1.tgz" - integrity sha512-CuUBvs/TnLfmgJvCVTXDU8yl3DyTilEzMYUe7mlGWtiQU1gndKT/lvdaUatG4AVwq+3heXugYTILZDOm4etc2Q== - -wait-on@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-6.0.0.tgz#7e9bf8e3d7fe2daecbb7a570ac8ca41e9311c7e7" - integrity sha512-tnUJr9p5r+bEYXPUdRseolmz5XqJTTj98JgOsfBn7Oz2dxfE2g3zw1jE+Mo8lopM3j3et/Mq1yW7kKX6qw7RVw== - dependencies: - axios "^0.21.1" - joi "^17.4.0" - lodash "^4.17.21" - minimist "^1.2.5" - rxjs "^7.1.0" - -walk-up-path@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz" - integrity sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg== - -walker@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz" - dependencies: - makeerror "1.0.x" - -wbuf@^1.1.0, wbuf@^1.7.3: - version "1.7.3" - resolved "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz" - integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== - dependencies: - minimalistic-assert "^1.0.0" - -wcwidth@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= - dependencies: - defaults "^1.0.3" - -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= - -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz" - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz" - -webpack-bundle-analyzer@4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.3.0.tgz" - integrity sha512-J3TPm54bPARx6QG8z4cKBszahnUglcv70+N+8gUqv2I5KOFHJbzBiLx+pAp606so0X004fxM7hqRu10MLjJifA== - dependencies: - acorn "^8.0.4" - acorn-walk "^8.0.0" - chalk "^4.1.0" - commander "^6.2.0" - gzip-size "^6.0.0" - lodash "^4.17.20" - opener "^1.5.2" - sirv "^1.0.7" - ws "^7.3.1" - -webpack-dev-middleware@^3.7.2: - version "3.7.3" - resolved "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz" - integrity sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== - dependencies: - memory-fs "^0.4.1" - mime "^2.4.4" - mkdirp "^0.5.1" - range-parser "^1.2.1" - webpack-log "^2.0.0" - -webpack-dev-server@^3.11.2: - version "3.11.3" - resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.3.tgz" - integrity sha512-3x31rjbEQWKMNzacUZRE6wXvUFuGpH7vr0lIEbYpMAG9BOxi0928QU1BBswOAP3kg3H1O4hiS+sq4YyAn6ANnA== - dependencies: - ansi-html-community "0.0.8" - bonjour "^3.5.0" - chokidar "^2.1.8" - compression "^1.7.4" - connect-history-api-fallback "^1.6.0" - debug "^4.1.1" - del "^4.1.1" - express "^4.17.1" - html-entities "^1.3.1" - http-proxy-middleware "0.19.1" - import-local "^2.0.0" - internal-ip "^4.3.0" - ip "^1.1.5" - is-absolute-url "^3.0.3" - killable "^1.0.1" - loglevel "^1.6.8" - opn "^5.5.0" - p-retry "^3.0.1" - portfinder "^1.0.26" - schema-utils "^1.0.0" - selfsigned "^1.10.8" - semver "^6.3.0" - serve-index "^1.9.1" - sockjs "^0.3.21" - sockjs-client "^1.5.0" - spdy "^4.0.2" - strip-ansi "^3.0.1" - supports-color "^6.1.0" - url "^0.11.0" - webpack-dev-middleware "^3.7.2" - webpack-log "^2.0.0" - ws "^6.2.1" - yargs "^13.3.2" - -webpack-log@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz" - integrity sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== - dependencies: - ansi-colors "^3.0.0" - uuid "^3.3.2" - -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: - version "0.7.4" - resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz" - dependencies: - iconv-lite "0.4.24" - -whatwg-fetch@^3.4.1: - version "3.6.2" - resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz" - integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA== - -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz" - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.5.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.5.0.tgz" - dependencies: - lodash "^4.7.0" - tr46 "^2.0.2" - webidl-conversions "^6.1.0" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which-typed-array@^1.1.2: - version "1.1.7" - resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz" - integrity sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.18.5" - foreach "^2.0.5" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.7" - -which@2.0.2, which@^2.0.1, which@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -which@^1.2.14, which@^1.2.9: - version "1.3.1" - resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0, wide-align@^1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" - integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== - dependencies: - string-width "^1.0.2 || 2 || 3 || 4" - -widest-line@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz" - integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== - dependencies: - string-width "^4.0.0" - -wif@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz" - integrity sha1-CNP1IFbGZnkplyb63g1DKudLRwQ= - dependencies: - bs58check "<3.0.0" - -word-wrap@^1.2.3, word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - -workerpool@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" - integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - -ws@^6.2.1: - version "6.2.2" - resolved "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz" - integrity sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw== - dependencies: - async-limiter "~1.0.0" - -ws@^7.3.1: - version "7.5.7" - resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz" - integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== - -ws@^7.4.5, ws@^7.4.6: - version "7.5.6" - resolved "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz" - integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== - -ws@~8.2.3: - version "8.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" - integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz" - -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz" - -xmlhttprequest-ssl@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" - integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== - -xtend@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: - version "1.10.2" - resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-parser@^21.0.0: - version "21.0.0" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz" - integrity sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0, yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^13.3.2: - version "13.3.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@^17.0.1: - version "17.3.1" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz" - integrity sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.0.0" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -yup@^0.32.11: - version "0.32.11" - resolved "https://registry.npmjs.org/yup/-/yup-0.32.11.tgz" - integrity sha512-Z2Fe1bn+eLstG8DRR6FTavGD+MeAwyfmouhHsIUgaADz8jvFKbO/fXc2trJKZg+5EBjh4gGm3iU/t3onKlXHIg== - dependencies: - "@babel/runtime" "^7.15.4" - "@types/lodash" "^4.14.175" - lodash "^4.17.21" - lodash-es "^4.17.21" - nanoclone "^0.2.1" - property-expr "^2.0.4" - toposort "^2.0.2" - -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: - version "2.0.2" - resolved "https://registry.npmjs.org/zwitch/-/zwitch-2.0.2.tgz" - integrity sha512-JZxotl7SxAJH0j7dN4pxsTV6ZLXoLdGME+PsjkL/DaBrVryK9kTGq06GfKrwcSOqypP+fdXGoCHE36b99fWVoA==