Splitter

The GraphQL queries that can be performed on the Splitter ADO.

Response Interface

export interface SplitterResponse<T> {
  splitter: T;
}

queryConfig

Queries a splitter contract for its config.

export async function queryConfig(
  contractAddress: string
): Promise<SplitterConfig> {
  const resp = await query<QuerySplitterConfig, QuerySplitterConfigResponse>(
    QUERY_SPLITTER_CONFIG,
    { contractAddress }
  );

  return resp.splitter.config;
}
NameTypeDescription

contractAddress

string

The contract address of the splitter we want to query the config for.

QuerySplitterConfig

export interface QuerySplitterConfig extends ContractAddressQuery {}

QuerySplitterConfigResponse

export type QuerySplitterConfigResponse = SplitterResponse<{
  config: SplitterConfig;
}>;
NameTypeDescription

config

The config of the splitter we queried.

SplitterConfig

export interface SplitterConfig {
  locked: boolean;
  recipients: RecipientPercentage[];
}
NameTypeDescription

locked

boolean

Whether the splitter is locked or not.

recipients

The recipients of the funds sent to the splitter.

RecipientPercentage

export interface RecipientPercentage {
  percent: string;
  recipient: Recipient;
}
NameTypeDescription

percent

string

The percent for the recipient.

recipient

The recipient of the above percentage.

Last updated