import { TransactionsProposedEvent } from "@uma/contracts-node/typechain/core/ethers/OptimisticGovernor"; import { MonitoringParams } from "./common"; type OptimisticGovernorTransaction = [to: string, operation: 0, value: string, data: string]; interface BaseTransaction { formatted: OptimisticGovernorTransaction; } interface GnosisSafe { network: string; moduleAddress: string; transactions: BaseTransaction[]; } interface OsnapPluginData { safes: GnosisSafe[]; } interface OsnapPlugin { oSnap: OsnapPluginData; } interface LegacyOsnapPluginData { safe: GnosisSafe; } interface LegacyOsnapPlugin { oSnap: LegacyOsnapPluginData; } export interface MainTransaction { to: string; data: string; value: string; operation: "0" | "1"; } export interface SafeSnapSafe { txs: { mainTransaction: MainTransaction; }[]; network: string; umaAddress: string; } interface SafeSnapPluginData { safes: SafeSnapSafe[]; } interface SafeSnapPlugin { safeSnap: SafeSnapPluginData; } interface SnapshotProposalIpfs { space: string; type: string; choices: string[]; plugins: SafeSnapPlugin | OsnapPlugin | LegacyOsnapPlugin; } export interface SnapshotProposalGraphql extends Omit { id: string; ipfs: string; state: string; space: { id: string; }; start: number; end: number; scores: number[]; quorum: number; scores_total: number; } export interface GraphqlData { proposals: SnapshotProposalGraphql[]; } export type VerificationResponse = { verified: true; } | { verified: false; error: string; serverError?: boolean; }; export interface RulesParameters { space: string; quorum: number; votingPeriod: number; } export declare const isSnapshotProposalGraphql: (proposal: unknown) => proposal is SnapshotProposalGraphql; export declare const translateToSafeSnap: (plugin: SafeSnapPlugin | LegacyOsnapPlugin | OsnapPlugin) => SafeSnapPlugin; export declare const parseRules: (rules: string) => RulesParameters | null; export declare const verifyVoteOutcome: (proposal: SnapshotProposalGraphql, proposalTime: number, approvalIndex: number) => VerificationResponse; export declare const isMatchingSafe: (safe: SafeSnapSafe, chainId: number, ogAddress: string) => boolean; export declare const onChainTxsMatchSnapshot: (proposalEvent: TransactionsProposedEvent, safe: SafeSnapSafe) => boolean; export declare const verifyIpfs: (graphqlProposal: SnapshotProposalGraphql, params: MonitoringParams) => Promise; export declare const verifyRules: (parsedRules: RulesParameters, proposal: SnapshotProposalGraphql) => VerificationResponse; export declare const verifyProposal: (transaction: TransactionsProposedEvent, params: MonitoringParams) => Promise; export {};