dop-stick
Version:
Source control tooling for versionable-upgradeable smart contracts
101 lines • 2.53 kB
TypeScript
import { ethers } from 'ethers';
export interface TypechainFactoryConfig {
typechainPath: string;
enableCache?: boolean;
}
export interface ContractMetadata {
abi: any[];
bytecode: string;
name: string;
functions: FunctionMetadata[];
events?: EventMetadata[];
}
export interface FunctionMetadata {
name: string;
inputs: any[];
outputs: any[];
stateMutability: string;
signature: string;
selector: string;
}
export interface EventMetadata {
name: string;
inputs: any[];
signature: string;
}
export interface ParamMetadata {
name: string;
type: string;
indexed?: boolean;
components?: ParamMetadata[];
}
export interface FactoryCache {
factories: Map<string, ethers.ContractFactory>;
metadata: Map<string, ContractMetadata>;
lastUpdate: number;
}
export interface DeploymentEvent {
type: DeploymentEventType;
timestamp: number;
contractName: string;
address?: string;
transactionHash?: string;
status: 'pending' | 'success' | 'failed';
error?: string;
gasUsed?: string;
effectiveGasPrice?: string;
blockNumber?: number;
network: {
chainId: number;
name: string;
};
}
export declare enum DeploymentEventType {
DEPLOYMENT_STARTED = "DEPLOYMENT_STARTED",
DEPLOYMENT_SUBMITTED = "DEPLOYMENT_SUBMITTED",
DEPLOYMENT_CONFIRMED = "DEPLOYMENT_CONFIRMED",
DEPLOYMENT_FAILED = "DEPLOYMENT_FAILED",
VERIFICATION_STARTED = "VERIFICATION_STARTED",
VERIFICATION_COMPLETED = "VERIFICATION_COMPLETED",
VERIFICATION_FAILED = "VERIFICATION_FAILED"
}
export interface DeploymentHistory {
deployments: DeploymentRecord[];
lastUpdate: number;
}
export interface DeploymentRecord {
contractName: string;
address: string;
deploymentDate: number;
network: {
chainId: number;
name: string;
};
constructor: {
args: any[];
types: string[];
};
transaction: {
hash: string;
blockNumber: number;
gasUsed: string;
effectiveGasPrice: string;
};
verified: boolean;
events: DeploymentEvent[];
}
export interface FactoryMetadata {
abi: any[];
bytecode: string;
functions: FunctionMetadata[];
events?: EventMetadata[];
linkReferences?: {
[filePath: string]: {
[libraryName: string]: Array<{
start: number;
length: number;
}>;
};
};
}
//# sourceMappingURL=types.d.ts.map