@q-dev/gdk-sdk
Version:
Typescript Library to interact with GDK Contracts
87 lines (86 loc) • 2.39 kB
TypeScript
import { CallOverrides } from "ethers";
export type FnArgsWithoutOverrides<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P extends [...infer Rest, any?] ? Rest : any : never;
/**
* Helps specify gasBuffer in non-payable transactions.
*/
export interface QNonPayableTx extends CallOverrides {
/**
* @field factor to be applied on the gas limit vs. the estimated gas use.
* 1.3 would mean 30% above estimate.
*/
gasBuffer?: string | number;
}
/**
* Helps specify sent value in Q in payable transactions.
*/
export type QPayableTx = QNonPayableTx & {
/**
* @field sent amount in Q.
* 1 would mean 10^18 Wei.
*/
qAmount?: string | number;
};
/**
* Helps specify gasBuffer in non-payable transactions.
*/
export interface TxOptions extends CallOverrides {
/**
* @field factor to be applied on the gas limit vs. the estimated gas use.
* 1.3 would mean 30% above estimate.
*/
gasBuffer?: string | number;
}
export interface CreateVotingParameters {
remark: string;
situation: string;
callData: string;
}
export declare enum DefaultVotingSituations {
General = "General Update Vote",
ConfigurationParameter = "Configuration Parameter Vote",
RegularParameter = "Regular Parameter Vote",
Membership = "Membership Vote",
Constitution = "Constitution Vote",
PermissionManager = "Permission Manager Vote",
DAORegistry = "DAO Registry Vote"
}
export declare enum EventNames {
DeployedDAORegistry = "DeployedDAORegistry",
DeployedDAOPanelVoting = "DeployedDAOPanelVoting",
DeployedDAOParameterStorage = "DeployedDAOParameterStorage",
DeployedDAOMemberStorage = "DeployedDAOMemberStorage"
}
export declare enum ParameterType {
NONE = 0,
ADDRESS = 1,
UINT256 = 2,
STRING = 3,
BYTES = 4,
BOOL = 5
}
export declare enum VotingType {
NonRestricted = 0,
Restricted = 1,
PartiallyRestricted = 2
}
export interface DecodedData {
functionName: string;
arguments: any;
abiFunction: string;
}
export interface VotingSituationInfo {
name: string;
isExternal: boolean;
externalLink: string;
}
export declare enum ProposalStatuses {
none = 0,
pending = 1,
rejected = 2,
accepted = 3,
passed = 4,
executed = 5,
expired = 6,
underReview = 7,
underEvaluation = 8
}