UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

61 lines (60 loc) 3.39 kB
import { type AbiEventName, type AbiFunctionName, type Address, type DecodeEventParams, type DecodeTransactionParams, type DecodedEvent, type DecodedTransaction, type DelayedMessageExecution, type FullContractState, type ProviderRpcClient, type SendExternalDelayedParams, type SendInternalParams, type Transaction } from 'everscale-inpage-provider'; import { type VoteEscrowProposalAbi } from '../../models/vote-escrow-proposal/abi'; export declare enum VoteEscrowProposalState { Pending = 0, Active = 1, Canceled = 2, Failed = 3, Succeeded = 4, Expired = 5, Queued = 6, Executed = 7 } export interface VoteEscrowProposalOverview { againstVotes: string; description: string; endTime: number; executionTime: number; forVotes: string; proposer: Address; quorumVotes: string; startTime: number; state: VoteEscrowProposalState; } export interface VoteEscrowProposalEvmAction { callData: string; chainId: string; signature: string; target: string; value: string; } export interface VoteEscrowProposalTvmAction { payload: string; target: Address; value: string; } export interface VoteEscrowProposalConfig { gracePeriod: number; quorumVotes: string; threshold: string; timeLock: number; votingDelay: number; votingPeriod: number; } export interface VoteEscrowProposalActions { evmActions: VoteEscrowProposalEvmAction[]; tvmActions: VoteEscrowProposalTvmAction[]; } export type VoteEscrowProposalDecodedEvent = DecodedEvent<typeof VoteEscrowProposalAbi, AbiEventName<typeof VoteEscrowProposalAbi>>; export type VoteEscrowProposalDecodedTransaction = DecodedTransaction<typeof VoteEscrowProposalAbi, AbiFunctionName<typeof VoteEscrowProposalAbi>>; export declare abstract class VoteEscrowProposalUtils { static cancel(provider: ProviderRpcClient, proposalAddress: Address | string, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<DelayedMessageExecution>; static queue(provider: ProviderRpcClient, proposalAddress: Address | string, args: SendExternalDelayedParams): Promise<DelayedMessageExecution>; static execute(provider: ProviderRpcClient, proposalAddress: Address | string, args: SendExternalDelayedParams): Promise<DelayedMessageExecution>; static getOverview(connection: ProviderRpcClient, proposalAddress: Address | string, cachedState?: FullContractState): Promise<VoteEscrowProposalOverview>; static getConfig(connection: ProviderRpcClient, proposalAddress: Address | string, cachedState?: FullContractState): Promise<VoteEscrowProposalConfig>; static getActions(connection: ProviderRpcClient, proposalAddress: Address | string, cachedState?: FullContractState): Promise<VoteEscrowProposalActions>; static decodeEvent(connection: ProviderRpcClient, daoRootAddress: Address | string, args: DecodeEventParams<typeof VoteEscrowProposalAbi>): Promise<VoteEscrowProposalDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, daoRootAddress: Address | string, args: DecodeTransactionParams<typeof VoteEscrowProposalAbi>): Promise<VoteEscrowProposalDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, daoRootAddress: Address | string, transaction: Transaction): Promise<VoteEscrowProposalDecodedEvent[]>; }