feat(explorer): new proposals index page (#2925)
This commit is contained in:
parent
57a8955795
commit
d4ecb88fb4
227
apps/explorer/src/app/components/proposals/proposals-table.tsx
Normal file
227
apps/explorer/src/app/components/proposals/proposals-table.tsx
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
import type { ProposalListFieldsFragment } from '@vegaprotocol/governance';
|
||||||
|
import { VoteProgress } from '@vegaprotocol/governance';
|
||||||
|
import type { AgGridReact } from 'ag-grid-react';
|
||||||
|
import { AgGridColumn } from 'ag-grid-react';
|
||||||
|
import type {
|
||||||
|
VegaICellRendererParams,
|
||||||
|
VegaValueFormatterParams,
|
||||||
|
} from '@vegaprotocol/ui-toolkit';
|
||||||
|
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
|
||||||
|
import { AgGridDynamic as AgGrid } from '@vegaprotocol/ui-toolkit';
|
||||||
|
import { useLayoutEffect, useMemo, useRef, useState } from 'react';
|
||||||
|
import type { RowClickedEvent } from 'ag-grid-community';
|
||||||
|
import {
|
||||||
|
getDateTimeFormat,
|
||||||
|
NetworkParams,
|
||||||
|
t,
|
||||||
|
useNetworkParams,
|
||||||
|
} from '@vegaprotocol/react-helpers';
|
||||||
|
import { ProposalStateMapping } from '@vegaprotocol/types';
|
||||||
|
import BigNumber from 'bignumber.js';
|
||||||
|
import { DApp, TOKEN_PROPOSAL, useLinks } from '@vegaprotocol/environment';
|
||||||
|
import { BREAKPOINT_MD } from '../../config/breakpoints';
|
||||||
|
import { JsonViewerDialog } from '../dialogs/json-viewer-dialog';
|
||||||
|
|
||||||
|
type ProposalTermsDialog = {
|
||||||
|
open: boolean;
|
||||||
|
title: string;
|
||||||
|
content: unknown;
|
||||||
|
};
|
||||||
|
type ProposalsTableProps = {
|
||||||
|
data: ProposalListFieldsFragment[] | null;
|
||||||
|
};
|
||||||
|
export const ProposalsTable = ({ data }: ProposalsTableProps) => {
|
||||||
|
const { params } = useNetworkParams([
|
||||||
|
NetworkParams.governance_proposal_market_requiredMajority,
|
||||||
|
]);
|
||||||
|
const tokenLink = useLinks(DApp.Token);
|
||||||
|
const requiredMajorityPercentage = useMemo(() => {
|
||||||
|
const requiredMajority =
|
||||||
|
params?.governance_proposal_market_requiredMajority ?? 1;
|
||||||
|
return new BigNumber(requiredMajority).times(100);
|
||||||
|
}, [params?.governance_proposal_market_requiredMajority]);
|
||||||
|
|
||||||
|
const gridRef = useRef<AgGridReact>(null);
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
const showColumnsOnDesktop = () => {
|
||||||
|
gridRef.current?.columnApi.setColumnsVisible(
|
||||||
|
['voting', 'cDate', 'eDate', 'type'],
|
||||||
|
window.innerWidth > BREAKPOINT_MD
|
||||||
|
);
|
||||||
|
gridRef.current?.columnApi.setColumnWidth(
|
||||||
|
'actions',
|
||||||
|
window.innerWidth > BREAKPOINT_MD ? 221 : 80
|
||||||
|
);
|
||||||
|
};
|
||||||
|
window.addEventListener('resize', showColumnsOnDesktop);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener('resize', showColumnsOnDesktop);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const [dialog, setDialog] = useState<ProposalTermsDialog>({
|
||||||
|
open: false,
|
||||||
|
title: '',
|
||||||
|
content: null,
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AgGrid
|
||||||
|
ref={gridRef}
|
||||||
|
rowData={data}
|
||||||
|
getRowId={({ data }: { data: ProposalListFieldsFragment }) =>
|
||||||
|
data.id || data.rationale.title
|
||||||
|
}
|
||||||
|
overlayNoRowsTemplate={t('This chain has no markets')}
|
||||||
|
domLayout="autoHeight"
|
||||||
|
defaultColDef={{
|
||||||
|
flex: 1,
|
||||||
|
resizable: true,
|
||||||
|
sortable: true,
|
||||||
|
filter: true,
|
||||||
|
filterParams: { buttons: ['reset'] },
|
||||||
|
autoHeight: true,
|
||||||
|
}}
|
||||||
|
suppressCellFocus={true}
|
||||||
|
onRowClicked={({ data, event }: RowClickedEvent) => {
|
||||||
|
if (
|
||||||
|
(event?.target as HTMLElement).tagName.toUpperCase() !== 'BUTTON'
|
||||||
|
) {
|
||||||
|
const proposalPage = tokenLink(
|
||||||
|
TOKEN_PROPOSAL.replace(':id', data.id)
|
||||||
|
);
|
||||||
|
window.open(proposalPage, '_blank');
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AgGridColumn
|
||||||
|
colId="title"
|
||||||
|
headerName={t('Title')}
|
||||||
|
field="rationale.title"
|
||||||
|
flex={2}
|
||||||
|
wrapText={true}
|
||||||
|
/>
|
||||||
|
<AgGridColumn
|
||||||
|
colId="type"
|
||||||
|
maxWidth={180}
|
||||||
|
hide={window.innerWidth <= BREAKPOINT_MD}
|
||||||
|
headerName={t('Type')}
|
||||||
|
field="terms.change.__typename"
|
||||||
|
/>
|
||||||
|
<AgGridColumn
|
||||||
|
maxWidth={100}
|
||||||
|
headerName={t('State')}
|
||||||
|
field="state"
|
||||||
|
valueFormatter={({
|
||||||
|
value,
|
||||||
|
}: VegaValueFormatterParams<ProposalListFieldsFragment, 'state'>) => {
|
||||||
|
return value ? ProposalStateMapping[value] : '-';
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<AgGridColumn
|
||||||
|
colId="voting"
|
||||||
|
maxWidth={100}
|
||||||
|
hide={window.innerWidth <= BREAKPOINT_MD}
|
||||||
|
headerName={t('Voting')}
|
||||||
|
cellRenderer={({
|
||||||
|
data,
|
||||||
|
}: VegaICellRendererParams<ProposalListFieldsFragment>) => {
|
||||||
|
if (data) {
|
||||||
|
const yesTokens = new BigNumber(data.votes.yes.totalTokens);
|
||||||
|
const noTokens = new BigNumber(data.votes.no.totalTokens);
|
||||||
|
const totalTokensVoted = yesTokens.plus(noTokens);
|
||||||
|
const yesPercentage = totalTokensVoted.isZero()
|
||||||
|
? new BigNumber(0)
|
||||||
|
: yesTokens.multipliedBy(100).dividedBy(totalTokensVoted);
|
||||||
|
return (
|
||||||
|
<div className="uppercase flex h-full items-center justify-center pt-2">
|
||||||
|
<VoteProgress
|
||||||
|
threshold={requiredMajorityPercentage}
|
||||||
|
progress={yesPercentage}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return '-';
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<AgGridColumn
|
||||||
|
colId="cDate"
|
||||||
|
maxWidth={150}
|
||||||
|
hide={window.innerWidth <= BREAKPOINT_MD}
|
||||||
|
headerName={t('Closing date')}
|
||||||
|
field="terms.closingDatetime"
|
||||||
|
valueFormatter={({
|
||||||
|
value,
|
||||||
|
}: VegaValueFormatterParams<
|
||||||
|
ProposalListFieldsFragment,
|
||||||
|
'terms.closingDatetime'
|
||||||
|
>) => {
|
||||||
|
return value ? getDateTimeFormat().format(new Date(value)) : '-';
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<AgGridColumn
|
||||||
|
colId="eDate"
|
||||||
|
maxWidth={150}
|
||||||
|
hide={window.innerWidth <= BREAKPOINT_MD}
|
||||||
|
headerName={t('Enactment date')}
|
||||||
|
field="terms.enactmentDatetime"
|
||||||
|
valueFormatter={({
|
||||||
|
value,
|
||||||
|
}: VegaValueFormatterParams<
|
||||||
|
ProposalListFieldsFragment,
|
||||||
|
'terms.enactmentDatetime'
|
||||||
|
>) => {
|
||||||
|
return value ? getDateTimeFormat().format(new Date(value)) : '-';
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<AgGridColumn
|
||||||
|
colId="actions"
|
||||||
|
minWidth={window.innerWidth > BREAKPOINT_MD ? 221 : 80}
|
||||||
|
maxWidth={221}
|
||||||
|
sortable={false}
|
||||||
|
filter={false}
|
||||||
|
resizable={false}
|
||||||
|
cellRenderer={({
|
||||||
|
data,
|
||||||
|
}: VegaICellRendererParams<ProposalListFieldsFragment>) => {
|
||||||
|
const proposalPage = tokenLink(
|
||||||
|
TOKEN_PROPOSAL.replace(':id', data?.id || '')
|
||||||
|
);
|
||||||
|
const openDialog = () => {
|
||||||
|
if (!data) return;
|
||||||
|
setDialog({
|
||||||
|
open: true,
|
||||||
|
title: data.rationale.title,
|
||||||
|
content: data.terms,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div className="pb-1">
|
||||||
|
<button
|
||||||
|
className="underline max-md:hidden"
|
||||||
|
onClick={openDialog}
|
||||||
|
>
|
||||||
|
{t('View terms')}
|
||||||
|
</button>{' '}
|
||||||
|
<ExternalLink className="max-md:hidden" href={proposalPage}>
|
||||||
|
{t('Open in Governance')}
|
||||||
|
</ExternalLink>
|
||||||
|
<ExternalLink className="md:hidden" href={proposalPage}>
|
||||||
|
{t('Open')}
|
||||||
|
</ExternalLink>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</AgGrid>
|
||||||
|
<JsonViewerDialog
|
||||||
|
open={dialog.open}
|
||||||
|
onChange={(isOpen) => setDialog({ ...dialog, open: isOpen })}
|
||||||
|
title={dialog.title}
|
||||||
|
content={dialog.content}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
@ -1,82 +0,0 @@
|
|||||||
query ExplorerProposals {
|
|
||||||
proposalsConnection {
|
|
||||||
edges {
|
|
||||||
node {
|
|
||||||
id
|
|
||||||
rationale {
|
|
||||||
title
|
|
||||||
description
|
|
||||||
}
|
|
||||||
reference
|
|
||||||
state
|
|
||||||
datetime
|
|
||||||
rejectionReason
|
|
||||||
party {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
terms {
|
|
||||||
closingDatetime
|
|
||||||
enactmentDatetime
|
|
||||||
change {
|
|
||||||
... on NewMarket {
|
|
||||||
instrument {
|
|
||||||
name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
... on UpdateMarket {
|
|
||||||
marketId
|
|
||||||
}
|
|
||||||
... on NewAsset {
|
|
||||||
__typename
|
|
||||||
symbol
|
|
||||||
source {
|
|
||||||
... on BuiltinAsset {
|
|
||||||
maxFaucetAmountMint
|
|
||||||
}
|
|
||||||
... on ERC20 {
|
|
||||||
contractAddress
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
... on UpdateNetworkParameter {
|
|
||||||
networkParameter {
|
|
||||||
key
|
|
||||||
value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
votes {
|
|
||||||
yes {
|
|
||||||
totalTokens
|
|
||||||
totalNumber
|
|
||||||
votes {
|
|
||||||
value
|
|
||||||
party {
|
|
||||||
id
|
|
||||||
stakingSummary {
|
|
||||||
currentStakeAvailable
|
|
||||||
}
|
|
||||||
}
|
|
||||||
datetime
|
|
||||||
}
|
|
||||||
}
|
|
||||||
no {
|
|
||||||
totalTokens
|
|
||||||
totalNumber
|
|
||||||
votes {
|
|
||||||
value
|
|
||||||
party {
|
|
||||||
id
|
|
||||||
stakingSummary {
|
|
||||||
currentStakeAvailable
|
|
||||||
}
|
|
||||||
}
|
|
||||||
datetime
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,122 +0,0 @@
|
|||||||
import * as Types from '@vegaprotocol/types';
|
|
||||||
|
|
||||||
import { gql } from '@apollo/client';
|
|
||||||
import * as Apollo from '@apollo/client';
|
|
||||||
const defaultOptions = {} as const;
|
|
||||||
export type ExplorerProposalsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
|
||||||
|
|
||||||
|
|
||||||
export type ExplorerProposalsQuery = { __typename?: 'Query', proposalsConnection?: { __typename?: 'ProposalsConnection', edges?: Array<{ __typename?: 'ProposalEdge', node: { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string }, party: { __typename?: 'Party', id: string }, terms: { __typename?: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename: 'NewAsset', symbol: string, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string } } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket', instrument: { __typename?: 'InstrumentConfiguration', name: string } } | { __typename?: 'UpdateAsset' } | { __typename?: 'UpdateMarket', marketId: string } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } }, votes: { __typename?: 'ProposalVotes', yes: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, votes?: Array<{ __typename?: 'Vote', value: Types.VoteValue, datetime: any, party: { __typename?: 'Party', id: string, stakingSummary: { __typename?: 'StakingSummary', currentStakeAvailable: string } } }> | null }, no: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, votes?: Array<{ __typename?: 'Vote', value: Types.VoteValue, datetime: any, party: { __typename?: 'Party', id: string, stakingSummary: { __typename?: 'StakingSummary', currentStakeAvailable: string } } }> | null } } } } | null> | null } | null };
|
|
||||||
|
|
||||||
|
|
||||||
export const ExplorerProposalsDocument = gql`
|
|
||||||
query ExplorerProposals {
|
|
||||||
proposalsConnection {
|
|
||||||
edges {
|
|
||||||
node {
|
|
||||||
id
|
|
||||||
rationale {
|
|
||||||
title
|
|
||||||
description
|
|
||||||
}
|
|
||||||
reference
|
|
||||||
state
|
|
||||||
datetime
|
|
||||||
rejectionReason
|
|
||||||
party {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
terms {
|
|
||||||
closingDatetime
|
|
||||||
enactmentDatetime
|
|
||||||
change {
|
|
||||||
... on NewMarket {
|
|
||||||
instrument {
|
|
||||||
name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
... on UpdateMarket {
|
|
||||||
marketId
|
|
||||||
}
|
|
||||||
... on NewAsset {
|
|
||||||
__typename
|
|
||||||
symbol
|
|
||||||
source {
|
|
||||||
... on BuiltinAsset {
|
|
||||||
maxFaucetAmountMint
|
|
||||||
}
|
|
||||||
... on ERC20 {
|
|
||||||
contractAddress
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
... on UpdateNetworkParameter {
|
|
||||||
networkParameter {
|
|
||||||
key
|
|
||||||
value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
votes {
|
|
||||||
yes {
|
|
||||||
totalTokens
|
|
||||||
totalNumber
|
|
||||||
votes {
|
|
||||||
value
|
|
||||||
party {
|
|
||||||
id
|
|
||||||
stakingSummary {
|
|
||||||
currentStakeAvailable
|
|
||||||
}
|
|
||||||
}
|
|
||||||
datetime
|
|
||||||
}
|
|
||||||
}
|
|
||||||
no {
|
|
||||||
totalTokens
|
|
||||||
totalNumber
|
|
||||||
votes {
|
|
||||||
value
|
|
||||||
party {
|
|
||||||
id
|
|
||||||
stakingSummary {
|
|
||||||
currentStakeAvailable
|
|
||||||
}
|
|
||||||
}
|
|
||||||
datetime
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* __useExplorerProposalsQuery__
|
|
||||||
*
|
|
||||||
* To run a query within a React component, call `useExplorerProposalsQuery` and pass it any options that fit your needs.
|
|
||||||
* When your component renders, `useExplorerProposalsQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
||||||
* you can use to render your UI.
|
|
||||||
*
|
|
||||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* const { data, loading, error } = useExplorerProposalsQuery({
|
|
||||||
* variables: {
|
|
||||||
* },
|
|
||||||
* });
|
|
||||||
*/
|
|
||||||
export function useExplorerProposalsQuery(baseOptions?: Apollo.QueryHookOptions<ExplorerProposalsQuery, ExplorerProposalsQueryVariables>) {
|
|
||||||
const options = {...defaultOptions, ...baseOptions}
|
|
||||||
return Apollo.useQuery<ExplorerProposalsQuery, ExplorerProposalsQueryVariables>(ExplorerProposalsDocument, options);
|
|
||||||
}
|
|
||||||
export function useExplorerProposalsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ExplorerProposalsQuery, ExplorerProposalsQueryVariables>) {
|
|
||||||
const options = {...defaultOptions, ...baseOptions}
|
|
||||||
return Apollo.useLazyQuery<ExplorerProposalsQuery, ExplorerProposalsQueryVariables>(ExplorerProposalsDocument, options);
|
|
||||||
}
|
|
||||||
export type ExplorerProposalsQueryHookResult = ReturnType<typeof useExplorerProposalsQuery>;
|
|
||||||
export type ExplorerProposalsLazyQueryHookResult = ReturnType<typeof useExplorerProposalsLazyQuery>;
|
|
||||||
export type ExplorerProposalsQueryResult = Apollo.QueryResult<ExplorerProposalsQuery, ExplorerProposalsQueryVariables>;
|
|
@ -1,63 +1 @@
|
|||||||
import { t } from '@vegaprotocol/react-helpers';
|
export * from './proposals-page';
|
||||||
import React from 'react';
|
|
||||||
import { RouteTitle } from '../../components/route-title';
|
|
||||||
import { SubHeading } from '../../components/sub-heading';
|
|
||||||
import { Loader, SyntaxHighlighter } from '@vegaprotocol/ui-toolkit';
|
|
||||||
import { useExplorerProposalsQuery } from './__generated__/Proposals';
|
|
||||||
import { useDocumentTitle } from '../../hooks/use-document-title';
|
|
||||||
import EmptyList from '../../components/empty-list/empty-list';
|
|
||||||
|
|
||||||
const Governance = () => {
|
|
||||||
const { data, loading } = useExplorerProposalsQuery({
|
|
||||||
errorPolicy: 'ignore',
|
|
||||||
});
|
|
||||||
|
|
||||||
useDocumentTitle();
|
|
||||||
|
|
||||||
if (!data || !data.proposalsConnection || !data.proposalsConnection.edges) {
|
|
||||||
if (!loading) {
|
|
||||||
return (
|
|
||||||
<section>
|
|
||||||
<RouteTitle data-testid="governance-header">
|
|
||||||
{t('Governance Proposals')}
|
|
||||||
</RouteTitle>
|
|
||||||
|
|
||||||
<EmptyList
|
|
||||||
heading={t('This chain has no proposals')}
|
|
||||||
label={t('0 proposals')}
|
|
||||||
/>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return <Loader />;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const proposals = data?.proposalsConnection?.edges.map((e) => {
|
|
||||||
return e?.node;
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<section>
|
|
||||||
<RouteTitle data-testid="governance-header">
|
|
||||||
{t('Governance Proposals')}
|
|
||||||
</RouteTitle>
|
|
||||||
{proposals.map((p) => {
|
|
||||||
if (!p || !p.id) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<React.Fragment key={p.id}>
|
|
||||||
<SubHeading>
|
|
||||||
{p.rationale.title || p.rationale.description}
|
|
||||||
</SubHeading>
|
|
||||||
<SyntaxHighlighter data={p} />
|
|
||||||
</React.Fragment>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Governance;
|
|
||||||
|
33
apps/explorer/src/app/routes/governance/proposals-page.tsx
Normal file
33
apps/explorer/src/app/routes/governance/proposals-page.tsx
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import { proposalsDataProvider } from '@vegaprotocol/governance';
|
||||||
|
import { t, useDataProvider } from '@vegaprotocol/react-helpers';
|
||||||
|
import { AsyncRenderer } from '@vegaprotocol/ui-toolkit';
|
||||||
|
import { ProposalsTable } from '../../components/proposals/proposals-table';
|
||||||
|
import { RouteTitle } from '../../components/route-title';
|
||||||
|
import { useScrollToLocation } from '../../hooks/scroll-to-location';
|
||||||
|
import { useDocumentTitle } from '../../hooks/use-document-title';
|
||||||
|
|
||||||
|
export const Proposals = () => {
|
||||||
|
useScrollToLocation();
|
||||||
|
|
||||||
|
const { data, loading, error } = useDataProvider({
|
||||||
|
dataProvider: proposalsDataProvider,
|
||||||
|
});
|
||||||
|
|
||||||
|
useDocumentTitle([t('Governance Proposals')]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section>
|
||||||
|
<RouteTitle data-testid="proposals-heading">
|
||||||
|
{t('Governance proposals')}
|
||||||
|
</RouteTitle>
|
||||||
|
<AsyncRenderer
|
||||||
|
noDataMessage={t('This chain has no proposals')}
|
||||||
|
data={data}
|
||||||
|
loading={loading}
|
||||||
|
error={error}
|
||||||
|
>
|
||||||
|
<ProposalsTable data={data} />
|
||||||
|
</AsyncRenderer>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
};
|
@ -1,6 +1,6 @@
|
|||||||
import { AssetPage, AssetsPage } from './assets';
|
import { AssetPage, AssetsPage } from './assets';
|
||||||
import BlockPage from './blocks';
|
import BlockPage from './blocks';
|
||||||
import Governance from './governance';
|
import { Proposals } from './governance';
|
||||||
import Home from './home';
|
import Home from './home';
|
||||||
import OraclePage from './oracles';
|
import OraclePage from './oracles';
|
||||||
import Oracles from './oracles/home';
|
import Oracles from './oracles/home';
|
||||||
@ -84,7 +84,7 @@ const governanceRoutes: Route[] = flags.governance
|
|||||||
path: Routes.GOVERNANCE,
|
path: Routes.GOVERNANCE,
|
||||||
name: 'Governance proposals',
|
name: 'Governance proposals',
|
||||||
text: t('Governance Proposals'),
|
text: t('Governance Proposals'),
|
||||||
element: <Governance />,
|
element: <Proposals />,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: [];
|
: [];
|
||||||
|
@ -25,12 +25,38 @@ const generateProposal = (code: string): ProposalListFieldsFragment => ({
|
|||||||
totalWeight: '',
|
totalWeight: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
__typename: 'ProposalTerms',
|
__typename: 'ProposalTerms',
|
||||||
closingDatetime: '',
|
closingDatetime: '',
|
||||||
enactmentDatetime: undefined,
|
enactmentDatetime: undefined,
|
||||||
change: {
|
change: {
|
||||||
__typename: 'NewMarket',
|
__typename: 'NewMarket',
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
code: code,
|
code: code,
|
||||||
@ -42,6 +68,34 @@ const generateProposal = (code: string): ProposalListFieldsFragment => ({
|
|||||||
id: 'A',
|
id: 'A',
|
||||||
name: 'A',
|
name: 'A',
|
||||||
symbol: 'A',
|
symbol: 'A',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '',
|
||||||
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { t, useDataProvider } from '@vegaprotocol/react-helpers';
|
import { t, useDataProvider } from '@vegaprotocol/react-helpers';
|
||||||
import { proposalsListDataProvider } from '@vegaprotocol/governance';
|
import { proposalsDataProvider } from '@vegaprotocol/governance';
|
||||||
import take from 'lodash/take';
|
import take from 'lodash/take';
|
||||||
import * as Types from '@vegaprotocol/types';
|
import * as Types from '@vegaprotocol/types';
|
||||||
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
|
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
|
||||||
@ -19,7 +19,7 @@ export const ProposedMarkets = () => {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
const { data } = useDataProvider({
|
const { data } = useDataProvider({
|
||||||
dataProvider: proposalsListDataProvider,
|
dataProvider: proposalsDataProvider,
|
||||||
variables,
|
variables,
|
||||||
skipUpdates: true,
|
skipUpdates: true,
|
||||||
});
|
});
|
||||||
|
@ -1,16 +1,140 @@
|
|||||||
fragment NewMarketFields on NewMarket {
|
fragment NewMarketFields on NewMarket {
|
||||||
instrument {
|
instrument {
|
||||||
code
|
|
||||||
name
|
name
|
||||||
|
code
|
||||||
futureProduct {
|
futureProduct {
|
||||||
settlementAsset {
|
settlementAsset {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
symbol
|
symbol
|
||||||
|
decimals
|
||||||
|
quantum
|
||||||
|
}
|
||||||
|
quoteName
|
||||||
|
dataSourceSpecForSettlementData {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceDefinitionInternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfigurationTime {
|
||||||
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
... on DataSourceDefinitionExternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfiguration {
|
||||||
|
signers {
|
||||||
|
signer {
|
||||||
|
... on PubKey {
|
||||||
|
key
|
||||||
|
}
|
||||||
|
... on ETHAddress {
|
||||||
|
address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filters {
|
||||||
|
key {
|
||||||
|
name
|
||||||
|
type
|
||||||
|
}
|
||||||
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataSourceSpecForTradingTermination {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceDefinitionInternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfigurationTime {
|
||||||
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on DataSourceDefinitionExternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfiguration {
|
||||||
|
signers {
|
||||||
|
signer {
|
||||||
|
... on PubKey {
|
||||||
|
key
|
||||||
|
}
|
||||||
|
... on ETHAddress {
|
||||||
|
address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filters {
|
||||||
|
key {
|
||||||
|
name
|
||||||
|
type
|
||||||
|
}
|
||||||
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataSourceSpecBinding {
|
||||||
|
settlementDataProperty
|
||||||
|
tradingTerminationProperty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
decimalPlaces
|
||||||
|
riskParameters {
|
||||||
|
... on LogNormalRiskModel {
|
||||||
|
riskAversionParameter
|
||||||
|
tau
|
||||||
|
params {
|
||||||
|
mu
|
||||||
|
r
|
||||||
|
sigma
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on SimpleRiskModel {
|
||||||
|
params {
|
||||||
|
factorLong
|
||||||
|
factorShort
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
metadata
|
||||||
|
# priceMonitoringParameters {
|
||||||
|
# triggers {
|
||||||
|
# horizonSecs
|
||||||
|
# probability
|
||||||
|
# auctionExtensionSecs
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
# liquidityMonitoringParameters {
|
||||||
|
# targetStakeParameters {
|
||||||
|
# timeWindow
|
||||||
|
# scalingFactor
|
||||||
|
# }
|
||||||
|
# triggeringRatio
|
||||||
|
# auctionExtensionSecs
|
||||||
|
# }
|
||||||
|
lpPriceRange
|
||||||
|
# linearSlippageFactor
|
||||||
|
# quadraticSlippageFactor
|
||||||
|
}
|
||||||
|
|
||||||
fragment UpdateMarketFields on UpdateMarket {
|
fragment UpdateMarketFields on UpdateMarket {
|
||||||
marketId
|
marketId
|
||||||
@ -19,8 +143,93 @@ fragment UpdateMarketFields on UpdateMarket {
|
|||||||
code
|
code
|
||||||
product {
|
product {
|
||||||
quoteName
|
quoteName
|
||||||
|
dataSourceSpecForSettlementData {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceDefinitionInternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfigurationTime {
|
||||||
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on DataSourceDefinitionExternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfiguration {
|
||||||
|
signers {
|
||||||
|
signer {
|
||||||
|
... on PubKey {
|
||||||
|
key
|
||||||
|
}
|
||||||
|
... on ETHAddress {
|
||||||
|
address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filters {
|
||||||
|
key {
|
||||||
|
name
|
||||||
|
type
|
||||||
|
}
|
||||||
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataSourceSpecForTradingTermination {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceDefinitionInternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfigurationTime {
|
||||||
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on DataSourceDefinitionExternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfiguration {
|
||||||
|
signers {
|
||||||
|
signer {
|
||||||
|
... on PubKey {
|
||||||
|
key
|
||||||
|
}
|
||||||
|
... on ETHAddress {
|
||||||
|
address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filters {
|
||||||
|
key {
|
||||||
|
name
|
||||||
|
type
|
||||||
|
}
|
||||||
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataSourceSpecBinding {
|
||||||
|
settlementDataProperty
|
||||||
|
tradingTerminationProperty
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
metadata
|
||||||
priceMonitoringParameters {
|
priceMonitoringParameters {
|
||||||
triggers {
|
triggers {
|
||||||
horizonSecs
|
horizonSecs
|
||||||
@ -34,6 +243,7 @@ fragment UpdateMarketFields on UpdateMarket {
|
|||||||
scalingFactor
|
scalingFactor
|
||||||
}
|
}
|
||||||
triggeringRatio
|
triggeringRatio
|
||||||
|
# auctionExtensionSecs
|
||||||
}
|
}
|
||||||
riskParameters {
|
riskParameters {
|
||||||
__typename
|
__typename
|
||||||
@ -58,6 +268,23 @@ fragment UpdateMarketFields on UpdateMarket {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fragment NewAssetFields on NewAsset {
|
||||||
|
name
|
||||||
|
symbol
|
||||||
|
decimals
|
||||||
|
quantum
|
||||||
|
source {
|
||||||
|
... on BuiltinAsset {
|
||||||
|
maxFaucetAmountMint
|
||||||
|
}
|
||||||
|
... on ERC20 {
|
||||||
|
contractAddress
|
||||||
|
lifetimeLimit
|
||||||
|
withdrawThreshold
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fragment UpdateAssetFields on UpdateAsset {
|
fragment UpdateAssetFields on UpdateAsset {
|
||||||
assetId
|
assetId
|
||||||
quantum
|
quantum
|
||||||
@ -69,11 +296,26 @@ fragment UpdateAssetFields on UpdateAsset {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fragment UpdateNetworkParameterFiels on UpdateNetworkParameter {
|
||||||
|
networkParameter {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fragment ProposalListFields on Proposal {
|
fragment ProposalListFields on Proposal {
|
||||||
id
|
id
|
||||||
|
rationale {
|
||||||
|
title
|
||||||
|
description
|
||||||
|
}
|
||||||
reference
|
reference
|
||||||
state
|
state
|
||||||
datetime
|
datetime
|
||||||
|
rejectionReason
|
||||||
|
party {
|
||||||
|
id
|
||||||
|
}
|
||||||
votes {
|
votes {
|
||||||
yes {
|
yes {
|
||||||
totalTokens
|
totalTokens
|
||||||
@ -86,19 +328,32 @@ fragment ProposalListFields on Proposal {
|
|||||||
totalWeight
|
totalWeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
errorDetails
|
||||||
|
rejectionReason
|
||||||
|
requiredMajority
|
||||||
|
requiredParticipation
|
||||||
|
requiredLpMajority
|
||||||
|
requiredLpParticipation
|
||||||
terms {
|
terms {
|
||||||
closingDatetime
|
closingDatetime
|
||||||
enactmentDatetime
|
enactmentDatetime
|
||||||
change {
|
change {
|
||||||
|
__typename
|
||||||
... on NewMarket {
|
... on NewMarket {
|
||||||
...NewMarketFields
|
...NewMarketFields
|
||||||
}
|
}
|
||||||
... on UpdateMarket {
|
... on UpdateMarket {
|
||||||
...UpdateMarketFields
|
...UpdateMarketFields
|
||||||
}
|
}
|
||||||
|
... on NewAsset {
|
||||||
|
...NewAssetFields
|
||||||
|
}
|
||||||
... on UpdateAsset {
|
... on UpdateAsset {
|
||||||
...UpdateAssetFields
|
...UpdateAssetFields
|
||||||
}
|
}
|
||||||
|
... on UpdateNetworkParameter {
|
||||||
|
...UpdateNetworkParameterFiels
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -10,7 +10,7 @@ const getData = (responseData: ProposalsListQuery | null) =>
|
|||||||
?.filter((edge) => Boolean(edge?.node))
|
?.filter((edge) => Boolean(edge?.node))
|
||||||
.map((edge) => edge?.node as ProposalListFieldsFragment) || null;
|
.map((edge) => edge?.node as ProposalListFieldsFragment) || null;
|
||||||
|
|
||||||
export const proposalsListDataProvider = makeDataProvider<
|
export const proposalsDataProvider = makeDataProvider<
|
||||||
ProposalsListQuery,
|
ProposalsListQuery,
|
||||||
ProposalListFieldsFragment[],
|
ProposalListFieldsFragment[],
|
||||||
never,
|
never,
|
||||||
|
@ -40,6 +40,21 @@ export const marketUpdateProposal: ProposalListFieldsFragment = {
|
|||||||
totalWeight: '1',
|
totalWeight: '1',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
__typename: 'ProposalTerms',
|
__typename: 'ProposalTerms',
|
||||||
closingDatetime: '',
|
closingDatetime: '',
|
||||||
@ -50,7 +65,33 @@ export const marketUpdateProposal: ProposalListFieldsFragment = {
|
|||||||
instrument: {
|
instrument: {
|
||||||
code: '',
|
code: '',
|
||||||
product: {
|
product: {
|
||||||
|
__typename: 'UpdateFutureProduct',
|
||||||
quoteName: '',
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
priceMonitoringParameters: {
|
priceMonitoringParameters: {
|
||||||
@ -92,10 +133,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-15T12:44:34Z',
|
closingDatetime: '2022-11-15T12:44:34Z',
|
||||||
enactmentDatetime: '2022-11-15T12:44:54Z',
|
enactmentDatetime: '2022-11-15T12:44:54Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'ETHUSD',
|
code: 'ETHUSD',
|
||||||
name: 'ETHUSD',
|
name: 'ETHUSD',
|
||||||
@ -104,8 +171,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
||||||
name: 'tDAI TEST',
|
name: 'tDAI TEST',
|
||||||
symbol: 'tDAI',
|
symbol: 'tDAI',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -136,10 +231,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-15T12:39:41Z',
|
closingDatetime: '2022-11-15T12:39:41Z',
|
||||||
enactmentDatetime: '2022-11-15T12:39:51Z',
|
enactmentDatetime: '2022-11-15T12:39:51Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'ETHUSD',
|
code: 'ETHUSD',
|
||||||
name: 'ETHUSD',
|
name: 'ETHUSD',
|
||||||
@ -148,8 +269,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
||||||
name: 'tDAI TEST',
|
name: 'tDAI TEST',
|
||||||
symbol: 'tDAI',
|
symbol: 'tDAI',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -180,10 +329,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-14T16:24:24Z',
|
closingDatetime: '2022-11-14T16:24:24Z',
|
||||||
enactmentDatetime: '2022-11-14T16:24:34Z',
|
enactmentDatetime: '2022-11-14T16:24:34Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'LINKUSD',
|
code: 'LINKUSD',
|
||||||
name: 'LINKUSD',
|
name: 'LINKUSD',
|
||||||
@ -192,8 +367,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee',
|
id: 'eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee',
|
||||||
name: 'mUSDT-II',
|
name: 'mUSDT-II',
|
||||||
symbol: 'mUSDT-II',
|
symbol: 'mUSDT-II',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -224,10 +427,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:32:22Z',
|
closingDatetime: '2022-11-11T16:32:22Z',
|
||||||
enactmentDatetime: '2022-11-11T16:32:32Z',
|
enactmentDatetime: '2022-11-11T16:32:32Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'LINKUSD',
|
code: 'LINKUSD',
|
||||||
name: 'LINKUSD',
|
name: 'LINKUSD',
|
||||||
@ -236,8 +465,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee',
|
id: 'eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee',
|
||||||
name: 'mUSDT-II',
|
name: 'mUSDT-II',
|
||||||
symbol: 'mUSDT-II',
|
symbol: 'mUSDT-II',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -268,10 +525,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-14T09:40:57Z',
|
closingDatetime: '2022-11-14T09:40:57Z',
|
||||||
enactmentDatetime: '2022-11-14T09:41:17Z',
|
enactmentDatetime: '2022-11-14T09:41:17Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'ETHUSD',
|
code: 'ETHUSD',
|
||||||
name: 'ETHUSD',
|
name: 'ETHUSD',
|
||||||
@ -280,8 +563,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
||||||
name: 'tDAI TEST',
|
name: 'tDAI TEST',
|
||||||
symbol: 'tDAI',
|
symbol: 'tDAI',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -312,10 +623,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:32:22Z',
|
closingDatetime: '2022-11-11T16:32:22Z',
|
||||||
enactmentDatetime: '2022-11-11T16:32:32Z',
|
enactmentDatetime: '2022-11-11T16:32:32Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'LINKUSD',
|
code: 'LINKUSD',
|
||||||
name: 'LINKUSD',
|
name: 'LINKUSD',
|
||||||
@ -324,8 +661,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee',
|
id: 'eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee',
|
||||||
name: 'mUSDT-II',
|
name: 'mUSDT-II',
|
||||||
symbol: 'mUSDT-II',
|
symbol: 'mUSDT-II',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -356,10 +721,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:28:25Z',
|
closingDatetime: '2022-11-11T16:28:25Z',
|
||||||
enactmentDatetime: '2022-11-11T16:30:35Z',
|
enactmentDatetime: '2022-11-11T16:30:35Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'ETHDAI.MF21',
|
code: 'ETHDAI.MF21',
|
||||||
name: 'ETHDAI Monthly (Dec 2022)',
|
name: 'ETHDAI Monthly (Dec 2022)',
|
||||||
@ -368,8 +759,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
||||||
name: 'tDAI TEST',
|
name: 'tDAI TEST',
|
||||||
symbol: 'tDAI',
|
symbol: 'tDAI',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -400,10 +819,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:28:25Z',
|
closingDatetime: '2022-11-11T16:28:25Z',
|
||||||
enactmentDatetime: '2022-11-11T16:30:35Z',
|
enactmentDatetime: '2022-11-11T16:30:35Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'AAPL.MF21',
|
code: 'AAPL.MF21',
|
||||||
name: 'Apple Monthly (Dec 2022)',
|
name: 'Apple Monthly (Dec 2022)',
|
||||||
@ -412,8 +857,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'c9fe6fc24fce121b2cc72680543a886055abb560043fda394ba5376203b7527d',
|
id: 'c9fe6fc24fce121b2cc72680543a886055abb560043fda394ba5376203b7527d',
|
||||||
name: 'tUSDC TEST',
|
name: 'tUSDC TEST',
|
||||||
symbol: 'tUSDC',
|
symbol: 'tUSDC',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -444,10 +917,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:28:25Z',
|
closingDatetime: '2022-11-11T16:28:25Z',
|
||||||
enactmentDatetime: '2022-11-11T16:30:35Z',
|
enactmentDatetime: '2022-11-11T16:30:35Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'BTCUSD.MF21',
|
code: 'BTCUSD.MF21',
|
||||||
name: 'BTCUSD Monthly (Dec 2022)',
|
name: 'BTCUSD Monthly (Dec 2022)',
|
||||||
@ -456,8 +955,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
||||||
name: 'tDAI TEST',
|
name: 'tDAI TEST',
|
||||||
symbol: 'tDAI',
|
symbol: 'tDAI',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -488,10 +1015,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:28:25Z',
|
closingDatetime: '2022-11-11T16:28:25Z',
|
||||||
enactmentDatetime: '2022-11-11T16:30:35Z',
|
enactmentDatetime: '2022-11-11T16:30:35Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'TSLA.QM21',
|
code: 'TSLA.QM21',
|
||||||
name: 'Tesla Quarterly (Feb 2023)',
|
name: 'Tesla Quarterly (Feb 2023)',
|
||||||
@ -500,8 +1053,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: '177e8f6c25a955bd18475084b99b2b1d37f28f3dec393fab7755a7e69c3d8c3b',
|
id: '177e8f6c25a955bd18475084b99b2b1d37f28f3dec393fab7755a7e69c3d8c3b',
|
||||||
name: 'tEURO TEST',
|
name: 'tEURO TEST',
|
||||||
symbol: 'tEURO',
|
symbol: 'tEURO',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -532,10 +1113,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:28:25Z',
|
closingDatetime: '2022-11-11T16:28:25Z',
|
||||||
enactmentDatetime: '2022-11-11T16:30:35Z',
|
enactmentDatetime: '2022-11-11T16:30:35Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'AAVEDAI.MF21',
|
code: 'AAVEDAI.MF21',
|
||||||
name: 'AAVEDAI Monthly (Dec 2022)',
|
name: 'AAVEDAI Monthly (Dec 2022)',
|
||||||
@ -544,8 +1151,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
||||||
name: 'tDAI TEST',
|
name: 'tDAI TEST',
|
||||||
symbol: 'tDAI',
|
symbol: 'tDAI',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -576,10 +1211,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:28:25Z',
|
closingDatetime: '2022-11-11T16:28:25Z',
|
||||||
enactmentDatetime: '2022-11-11T16:30:35Z',
|
enactmentDatetime: '2022-11-11T16:30:35Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'ETHBTC.QM21',
|
code: 'ETHBTC.QM21',
|
||||||
name: 'ETHBTC Quarterly (Feb 2023)',
|
name: 'ETHBTC Quarterly (Feb 2023)',
|
||||||
@ -588,8 +1249,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'cee709223217281d7893b650850ae8ee8a18b7539b5658f9b4cc24de95dd18ad',
|
id: 'cee709223217281d7893b650850ae8ee8a18b7539b5658f9b4cc24de95dd18ad',
|
||||||
name: 'tBTC TEST',
|
name: 'tBTC TEST',
|
||||||
symbol: 'tBTC',
|
symbol: 'tBTC',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
@ -620,10 +1309,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
},
|
},
|
||||||
__typename: 'ProposalVotes',
|
__typename: 'ProposalVotes',
|
||||||
},
|
},
|
||||||
|
requiredMajority: '',
|
||||||
|
party: {
|
||||||
|
__typename: 'Party',
|
||||||
|
id: '',
|
||||||
|
},
|
||||||
|
rationale: {
|
||||||
|
__typename: 'ProposalRationale',
|
||||||
|
description: '',
|
||||||
|
title: '',
|
||||||
|
},
|
||||||
|
requiredParticipation: '',
|
||||||
|
errorDetails: '',
|
||||||
|
rejectionReason: null,
|
||||||
|
requiredLpMajority: '',
|
||||||
|
requiredLpParticipation: '',
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: '2022-11-11T16:28:25Z',
|
closingDatetime: '2022-11-11T16:28:25Z',
|
||||||
enactmentDatetime: '2022-11-11T16:30:35Z',
|
enactmentDatetime: '2022-11-11T16:30:35Z',
|
||||||
change: {
|
change: {
|
||||||
|
decimalPlaces: 1,
|
||||||
|
lpPriceRange: '',
|
||||||
|
riskParameters: {
|
||||||
|
__typename: 'SimpleRiskModel',
|
||||||
|
params: {
|
||||||
|
__typename: 'SimpleRiskModelParams',
|
||||||
|
factorLong: 0,
|
||||||
|
factorShort: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
metadata: [],
|
||||||
instrument: {
|
instrument: {
|
||||||
code: 'UNIDAI.MF21',
|
code: 'UNIDAI.MF21',
|
||||||
name: 'UNIDAI Monthly (Dec 2022)',
|
name: 'UNIDAI Monthly (Dec 2022)',
|
||||||
@ -632,8 +1347,36 @@ const proposalListFields: ProposalListFieldsFragment[] = [
|
|||||||
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
id: 'b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663',
|
||||||
name: 'tDAI TEST',
|
name: 'tDAI TEST',
|
||||||
symbol: 'tDAI',
|
symbol: 'tDAI',
|
||||||
|
decimals: 1,
|
||||||
|
quantum: '1',
|
||||||
__typename: 'Asset',
|
__typename: 'Asset',
|
||||||
},
|
},
|
||||||
|
quoteName: '',
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
__typename: 'DataSourceSpecToFutureBinding',
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
__typename: 'DataSourceDefinition',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename: 'FutureProduct',
|
__typename: 'FutureProduct',
|
||||||
},
|
},
|
||||||
__typename: 'InstrumentConfiguration',
|
__typename: 'InstrumentConfiguration',
|
||||||
|
@ -12,7 +12,7 @@ subscription ProposalEvent($partyId: ID!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment UpdateNetworkParameterFields on Proposal {
|
fragment UpdateNetworkParameterProposal on Proposal {
|
||||||
id
|
id
|
||||||
state
|
state
|
||||||
datetime
|
datetime
|
||||||
@ -20,10 +20,7 @@ fragment UpdateNetworkParameterFields on Proposal {
|
|||||||
enactmentDatetime
|
enactmentDatetime
|
||||||
change {
|
change {
|
||||||
... on UpdateNetworkParameter {
|
... on UpdateNetworkParameter {
|
||||||
networkParameter {
|
...UpdateNetworkParameterFiels
|
||||||
key
|
|
||||||
value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,7 +30,7 @@ subscription OnUpdateNetworkParameters {
|
|||||||
busEvents(types: [Proposal], batchSize: 0) {
|
busEvents(types: [Proposal], batchSize: 0) {
|
||||||
event {
|
event {
|
||||||
... on Proposal {
|
... on Proposal {
|
||||||
...UpdateNetworkParameterFields
|
...UpdateNetworkParameterProposal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import * as Types from '@vegaprotocol/types';
|
import * as Types from '@vegaprotocol/types';
|
||||||
|
|
||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
|
import { UpdateNetworkParameterFielsFragmentDoc } from '../../proposals-data-provider/__generated__/Proposals';
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from '@apollo/client';
|
||||||
const defaultOptions = {} as const;
|
const defaultOptions = {} as const;
|
||||||
export type ProposalEventFieldsFragment = { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null };
|
export type ProposalEventFieldsFragment = { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null };
|
||||||
@ -12,7 +13,7 @@ export type ProposalEventSubscriptionVariables = Types.Exact<{
|
|||||||
|
|
||||||
export type ProposalEventSubscription = { __typename?: 'Subscription', proposals: { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null } };
|
export type ProposalEventSubscription = { __typename?: 'Subscription', proposals: { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null } };
|
||||||
|
|
||||||
export type UpdateNetworkParameterFieldsFragment = { __typename?: 'Proposal', id?: string | null, state: Types.ProposalState, datetime: any, terms: { __typename?: 'ProposalTerms', enactmentDatetime?: any | null, change: { __typename?: 'NewAsset' } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket' } | { __typename?: 'UpdateAsset' } | { __typename?: 'UpdateMarket' } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } } };
|
export type UpdateNetworkParameterProposalFragment = { __typename?: 'Proposal', id?: string | null, state: Types.ProposalState, datetime: any, terms: { __typename?: 'ProposalTerms', enactmentDatetime?: any | null, change: { __typename?: 'NewAsset' } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket' } | { __typename?: 'UpdateAsset' } | { __typename?: 'UpdateMarket' } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } } };
|
||||||
|
|
||||||
export type OnUpdateNetworkParametersSubscriptionVariables = Types.Exact<{ [key: string]: never; }>;
|
export type OnUpdateNetworkParametersSubscriptionVariables = Types.Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
@ -35,8 +36,8 @@ export const ProposalEventFieldsFragmentDoc = gql`
|
|||||||
errorDetails
|
errorDetails
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const UpdateNetworkParameterFieldsFragmentDoc = gql`
|
export const UpdateNetworkParameterProposalFragmentDoc = gql`
|
||||||
fragment UpdateNetworkParameterFields on Proposal {
|
fragment UpdateNetworkParameterProposal on Proposal {
|
||||||
id
|
id
|
||||||
state
|
state
|
||||||
datetime
|
datetime
|
||||||
@ -44,15 +45,12 @@ export const UpdateNetworkParameterFieldsFragmentDoc = gql`
|
|||||||
enactmentDatetime
|
enactmentDatetime
|
||||||
change {
|
change {
|
||||||
... on UpdateNetworkParameter {
|
... on UpdateNetworkParameter {
|
||||||
networkParameter {
|
...UpdateNetworkParameterFiels
|
||||||
key
|
|
||||||
value
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
${UpdateNetworkParameterFielsFragmentDoc}`;
|
||||||
`;
|
|
||||||
export const ProposalEventDocument = gql`
|
export const ProposalEventDocument = gql`
|
||||||
subscription ProposalEvent($partyId: ID!) {
|
subscription ProposalEvent($partyId: ID!) {
|
||||||
proposals(partyId: $partyId) {
|
proposals(partyId: $partyId) {
|
||||||
@ -88,12 +86,12 @@ export const OnUpdateNetworkParametersDocument = gql`
|
|||||||
busEvents(types: [Proposal], batchSize: 0) {
|
busEvents(types: [Proposal], batchSize: 0) {
|
||||||
event {
|
event {
|
||||||
... on Proposal {
|
... on Proposal {
|
||||||
...UpdateNetworkParameterFields
|
...UpdateNetworkParameterProposal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${UpdateNetworkParameterFieldsFragmentDoc}`;
|
${UpdateNetworkParameterProposalFragmentDoc}`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __useOnUpdateNetworkParametersSubscription__
|
* __useOnUpdateNetworkParametersSubscription__
|
||||||
|
@ -9,11 +9,11 @@ import { useToasts } from '@vegaprotocol/ui-toolkit';
|
|||||||
import { ExternalLink, Intent } from '@vegaprotocol/ui-toolkit';
|
import { ExternalLink, Intent } from '@vegaprotocol/ui-toolkit';
|
||||||
import compact from 'lodash/compact';
|
import compact from 'lodash/compact';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import type { UpdateNetworkParameterFieldsFragment } from './__generated__/Proposal';
|
import type { UpdateNetworkParameterProposalFragment } from './__generated__/Proposal';
|
||||||
import { useOnUpdateNetworkParametersSubscription } from './__generated__/Proposal';
|
import { useOnUpdateNetworkParametersSubscription } from './__generated__/Proposal';
|
||||||
|
|
||||||
const CLOSE_AFTER = 5000;
|
const CLOSE_AFTER = 5000;
|
||||||
type Proposal = UpdateNetworkParameterFieldsFragment;
|
type Proposal = UpdateNetworkParameterProposalFragment;
|
||||||
|
|
||||||
const UpdateNetworkParameterToastContent = ({
|
const UpdateNetworkParameterToastContent = ({
|
||||||
proposal,
|
proposal,
|
||||||
|
@ -5,7 +5,7 @@ import { ProposalState } from '@vegaprotocol/types';
|
|||||||
import type { ReactNode } from 'react';
|
import type { ReactNode } from 'react';
|
||||||
import { useUpdateNetworkParametersToasts } from './use-update-network-paramaters-toasts';
|
import { useUpdateNetworkParametersToasts } from './use-update-network-paramaters-toasts';
|
||||||
import type {
|
import type {
|
||||||
UpdateNetworkParameterFieldsFragment,
|
UpdateNetworkParameterProposalFragment,
|
||||||
OnUpdateNetworkParametersSubscription,
|
OnUpdateNetworkParametersSubscription,
|
||||||
} from './__generated__/Proposal';
|
} from './__generated__/Proposal';
|
||||||
import { OnUpdateNetworkParametersDocument } from './__generated__/Proposal';
|
import { OnUpdateNetworkParametersDocument } from './__generated__/Proposal';
|
||||||
@ -23,7 +23,7 @@ const generateUpdateNetworkParametersProposal = (
|
|||||||
key: string,
|
key: string,
|
||||||
value: string,
|
value: string,
|
||||||
state: ProposalState = ProposalState.STATE_OPEN
|
state: ProposalState = ProposalState.STATE_OPEN
|
||||||
): UpdateNetworkParameterFieldsFragment => ({
|
): UpdateNetworkParameterProposalFragment => ({
|
||||||
__typename: 'Proposal',
|
__typename: 'Proposal',
|
||||||
id: Math.random().toString(),
|
id: Math.random().toString(),
|
||||||
datetime: Math.random().toString(),
|
datetime: Math.random().toString(),
|
||||||
|
@ -14,30 +14,18 @@ import {
|
|||||||
useUpdateProposal,
|
useUpdateProposal,
|
||||||
} from './use-update-proposal';
|
} from './use-update-proposal';
|
||||||
|
|
||||||
|
type Proposal = Pick<ProposalListFieldsFragment, 'terms'> &
|
||||||
|
Pick<ProposalListFieldsFragment, 'state'> &
|
||||||
|
Pick<ProposalListFieldsFragment, 'id'>;
|
||||||
|
|
||||||
const generateUpdateAssetProposal = (
|
const generateUpdateAssetProposal = (
|
||||||
id: string,
|
id: string,
|
||||||
quantum = '',
|
quantum = '',
|
||||||
lifetimeLimit = '',
|
lifetimeLimit = '',
|
||||||
withdrawThreshold = ''
|
withdrawThreshold = ''
|
||||||
): ProposalListFieldsFragment => ({
|
): Proposal => ({
|
||||||
reference: '',
|
id,
|
||||||
state: Schema.ProposalState.STATE_OPEN,
|
state: Schema.ProposalState.STATE_OPEN,
|
||||||
datetime: '',
|
|
||||||
votes: {
|
|
||||||
__typename: undefined,
|
|
||||||
yes: {
|
|
||||||
__typename: undefined,
|
|
||||||
totalTokens: '',
|
|
||||||
totalNumber: '',
|
|
||||||
totalWeight: '',
|
|
||||||
},
|
|
||||||
no: {
|
|
||||||
__typename: undefined,
|
|
||||||
totalTokens: '',
|
|
||||||
totalNumber: '',
|
|
||||||
totalWeight: '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
terms: {
|
terms: {
|
||||||
__typename: 'ProposalTerms',
|
__typename: 'ProposalTerms',
|
||||||
closingDatetime: '',
|
closingDatetime: '',
|
||||||
@ -120,25 +108,8 @@ const generateUpdateMarketProposal = (
|
|||||||
riskParametersType:
|
riskParametersType:
|
||||||
| 'UpdateMarketLogNormalRiskModel'
|
| 'UpdateMarketLogNormalRiskModel'
|
||||||
| 'UpdateMarketSimpleRiskModel' = 'UpdateMarketLogNormalRiskModel'
|
| 'UpdateMarketSimpleRiskModel' = 'UpdateMarketLogNormalRiskModel'
|
||||||
): ProposalListFieldsFragment => ({
|
): Proposal => ({
|
||||||
reference: '',
|
|
||||||
state: Schema.ProposalState.STATE_OPEN,
|
state: Schema.ProposalState.STATE_OPEN,
|
||||||
datetime: '',
|
|
||||||
votes: {
|
|
||||||
__typename: undefined,
|
|
||||||
yes: {
|
|
||||||
__typename: undefined,
|
|
||||||
totalTokens: '',
|
|
||||||
totalNumber: '',
|
|
||||||
totalWeight: '',
|
|
||||||
},
|
|
||||||
no: {
|
|
||||||
__typename: undefined,
|
|
||||||
totalTokens: '',
|
|
||||||
totalNumber: '',
|
|
||||||
totalWeight: '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
terms: {
|
terms: {
|
||||||
__typename: 'ProposalTerms',
|
__typename: 'ProposalTerms',
|
||||||
closingDatetime: '',
|
closingDatetime: '',
|
||||||
@ -155,6 +126,28 @@ const generateUpdateMarketProposal = (
|
|||||||
: undefined,
|
: undefined,
|
||||||
code,
|
code,
|
||||||
product: {
|
product: {
|
||||||
|
dataSourceSpecBinding: {
|
||||||
|
settlementDataProperty: '',
|
||||||
|
tradingTerminationProperty: '',
|
||||||
|
},
|
||||||
|
dataSourceSpecForSettlementData: {
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataSourceSpecForTradingTermination: {
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceDefinitionInternal',
|
||||||
|
sourceType: {
|
||||||
|
__typename: 'DataSourceSpecConfigurationTime',
|
||||||
|
conditions: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
__typename:
|
__typename:
|
||||||
quoteName.length > 0 ? 'UpdateFutureProduct' : undefined,
|
quoteName.length > 0 ? 'UpdateFutureProduct' : undefined,
|
||||||
quoteName,
|
quoteName,
|
||||||
@ -195,7 +188,7 @@ const generateUpdateMarketProposal = (
|
|||||||
});
|
});
|
||||||
|
|
||||||
const mockDataProviderData: {
|
const mockDataProviderData: {
|
||||||
data: ProposalListFieldsFragment[];
|
data: Proposal[];
|
||||||
error: Error | undefined;
|
error: Error | undefined;
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
} = {
|
} = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { proposalsListDataProvider } from '..';
|
import { proposalsDataProvider } from '..';
|
||||||
import * as Schema from '@vegaprotocol/types';
|
import * as Schema from '@vegaprotocol/types';
|
||||||
import { useDataProvider } from '@vegaprotocol/react-helpers';
|
import { useDataProvider } from '@vegaprotocol/react-helpers';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
@ -42,7 +42,7 @@ export const useUpdateProposal = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const { data, loading, error } = useDataProvider({
|
const { data, loading, error } = useDataProvider({
|
||||||
dataProvider: proposalsListDataProvider,
|
dataProvider: proposalsDataProvider,
|
||||||
variables,
|
variables,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ const fieldGetters = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const isChangeProposed = (
|
export const isChangeProposed = (
|
||||||
proposal: ProposalListFieldsFragment | undefined,
|
proposal: Pick<ProposalListFieldsFragment, 'terms'>,
|
||||||
field: UpdateProposalField
|
field: UpdateProposalField
|
||||||
) => {
|
) => {
|
||||||
if (proposal) {
|
if (proposal) {
|
||||||
|
@ -4,7 +4,7 @@ import {
|
|||||||
} from '@vegaprotocol/ui-toolkit';
|
} from '@vegaprotocol/ui-toolkit';
|
||||||
import { useDataProvider } from '@vegaprotocol/react-helpers';
|
import { useDataProvider } from '@vegaprotocol/react-helpers';
|
||||||
import * as Types from '@vegaprotocol/types';
|
import * as Types from '@vegaprotocol/types';
|
||||||
import { proposalsListDataProvider } from '../proposals-data-provider';
|
import { proposalsDataProvider } from '../proposals-data-provider';
|
||||||
import { useCallback, useMemo, useRef } from 'react';
|
import { useCallback, useMemo, useRef } from 'react';
|
||||||
import type { AgGridReact } from 'ag-grid-react';
|
import type { AgGridReact } from 'ag-grid-react';
|
||||||
import { useColumnDefs } from './use-column-defs';
|
import { useColumnDefs } from './use-column-defs';
|
||||||
@ -30,7 +30,7 @@ export const ProposalsList = () => {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
const { data, loading, error, reload } = useDataProvider({
|
const { data, loading, error, reload } = useDataProvider({
|
||||||
dataProvider: proposalsListDataProvider,
|
dataProvider: proposalsDataProvider,
|
||||||
variables,
|
variables,
|
||||||
});
|
});
|
||||||
const filteredData = getNewMarketProposals(data || []);
|
const filteredData = getNewMarketProposals(data || []);
|
||||||
|
@ -14,18 +14,9 @@ import type {
|
|||||||
} from '@vegaprotocol/ui-toolkit';
|
} from '@vegaprotocol/ui-toolkit';
|
||||||
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
|
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
|
||||||
import { ProposalStateMapping } from '@vegaprotocol/types';
|
import { ProposalStateMapping } from '@vegaprotocol/types';
|
||||||
import type {
|
import type { ProposalListFieldsFragment } from '../proposals-data-provider/__generated__/Proposals';
|
||||||
ProposalListFieldsFragment,
|
|
||||||
NewMarketFieldsFragment,
|
|
||||||
} from '../proposals-data-provider/__generated__/Proposals';
|
|
||||||
import { VoteProgress } from '../voting-progress';
|
import { VoteProgress } from '../voting-progress';
|
||||||
|
|
||||||
const instrumentGuard = (
|
|
||||||
change?: ProposalListFieldsFragment['terms']['change']
|
|
||||||
): change is NewMarketFieldsFragment => {
|
|
||||||
return change?.__typename === 'NewMarket';
|
|
||||||
};
|
|
||||||
|
|
||||||
export const useColumnDefs = () => {
|
export const useColumnDefs = () => {
|
||||||
const { VEGA_TOKEN_URL } = useEnvironment();
|
const { VEGA_TOKEN_URL } = useEnvironment();
|
||||||
const { params } = useNetworkParams([
|
const { params } = useNetworkParams([
|
||||||
@ -53,7 +44,7 @@ export const useColumnDefs = () => {
|
|||||||
'terms.change.instrument.code'
|
'terms.change.instrument.code'
|
||||||
>) => {
|
>) => {
|
||||||
const { change } = data?.terms || {};
|
const { change } = data?.terms || {};
|
||||||
if (instrumentGuard(change) && VEGA_TOKEN_URL) {
|
if (change?.__typename === 'NewMarket' && VEGA_TOKEN_URL) {
|
||||||
if (data?.id) {
|
if (data?.id) {
|
||||||
const link = `${VEGA_TOKEN_URL}/proposals/${data.id}`;
|
const link = `${VEGA_TOKEN_URL}/proposals/${data.id}`;
|
||||||
return (
|
return (
|
||||||
|
@ -46,6 +46,7 @@ export const ExternalLink = ({ children, className, ...props }: LinkProps) => (
|
|||||||
className={classNames(className, 'inline-flex items-baseline')}
|
className={classNames(className, 'inline-flex items-baseline')}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
data-testid="external-link"
|
data-testid="external-link"
|
||||||
|
rel="noreferrer nofollow noopener"
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{typeof children === 'string' ? (
|
{typeof children === 'string' ? (
|
||||||
|
Loading…
Reference in New Issue
Block a user