@broxus/js-core
Version:
MobX-based JavaScript Core library
30 lines (29 loc) • 2.92 kB
TypeScript
import { type AbiEventName, type AbiFunctionName, type Address, type DecodeEventParams, type DecodeTransactionParams, type DecodedAbiFunctionInputs, type DecodedEvent, type DecodedTransaction, type DelayedMessageExecution, type FullContractState, type ProviderRpcClient, type SendInternalParams, type Transaction } from 'everscale-inpage-provider';
import { type VoteEscrowDaoRootAbi } from '../../models/vote-escrow-dao-root/abi';
import { type VoteEscrowProposalEvmAction, type VoteEscrowProposalTvmAction } from '../../models/vote-escrow-proposal';
export interface VoteEscrowDaoRootProposalConfiguration {
gracePeriod: string;
quorumVotes: string;
threshold: string;
timeLock: string;
votingDelay: string;
votingPeriod: string;
}
export interface VoteEscrowDaoRootProposeAbiParams {
description: string;
evmActions?: VoteEscrowProposalEvmAction[];
tvmActions?: VoteEscrowProposalTvmAction[];
}
export type VoteEscrowCalcTvmActionsValueAbiParams = DecodedAbiFunctionInputs<typeof VoteEscrowDaoRootAbi, 'calcTonActionsValue'>;
export type VoteEscrowDaoRootDecodedEvent = DecodedEvent<typeof VoteEscrowDaoRootAbi, AbiEventName<typeof VoteEscrowDaoRootAbi>>;
export type VoteEscrowDaoRootDecodedTransaction = DecodedTransaction<typeof VoteEscrowDaoRootAbi, AbiFunctionName<typeof VoteEscrowDaoRootAbi>>;
export declare abstract class VoteEscrowDaoRootUtils {
static propose(provider: ProviderRpcClient, daoRootAddress: Address | string, params: VoteEscrowDaoRootProposeAbiParams, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<DelayedMessageExecution>;
static calcTvmActionsValue(connection: ProviderRpcClient, daoRootAddress: Address | string, params: VoteEscrowCalcTvmActionsValueAbiParams, cachedState?: FullContractState): Promise<string>;
static getVoteEscrowRoot(connection: ProviderRpcClient, daoRootAddress: Address | string, cachedState?: FullContractState): Promise<Address>;
static expectedProposalAddress(connection: ProviderRpcClient, daoRootAddress: Address | string, proposalId: string | number, cachedState?: FullContractState): Promise<Address>;
static proposalConfiguration(connection: ProviderRpcClient, daoRootAddress: Address | string, cachedState?: FullContractState): Promise<VoteEscrowDaoRootProposalConfiguration>;
static decodeEvent(connection: ProviderRpcClient, daoRootAddress: Address | string, args: DecodeEventParams<typeof VoteEscrowDaoRootAbi>): Promise<VoteEscrowDaoRootDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, daoRootAddress: Address | string, args: DecodeTransactionParams<typeof VoteEscrowDaoRootAbi>): Promise<VoteEscrowDaoRootDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, daoRootAddress: Address | string, transaction: Transaction): Promise<VoteEscrowDaoRootDecodedEvent[]>;
}