dop-stick
Version:
Source control tooling for versionable-upgradeable smart contracts
63 lines • 1.66 kB
TypeScript
/**
* Enum for diamond cut actions
*/
export declare enum DiamondCutAction {
Add = 0,
Replace = 1,
Remove = 2
}
/**
* Type alias for diamond cut action values
*/
export type DiamondCutActionType = DiamondCutAction;
/**
* Interface for collision details during validation
*/
export interface CollisionDetail {
/** Function selector (bytes4) */
selector: string;
/** Human-readable function signature */
signature: string;
/** Address of facet where function exists (if applicable) */
existingFacet?: string;
}
/**
* Interface for a diamond cut operation
*/
export interface FacetCut {
/** Address of the facet to be cut */
facetAddress: string;
/** Action to perform (Add/Replace/Remove) */
action: DiamondCutActionType;
/** Array of function selectors */
functionSelectors: string[];
}
export interface FacetInfo {
facetAddress: string;
functionSelectors: string[];
}
export interface DiamondCutParams {
facetCuts: FacetCut[];
initAddress: string;
initCalldata: string;
}
export interface DiamondFacet {
facetAddress: string;
functionSelectors: Array<string>;
}
export interface DiamondLoupeResponse {
facets: DiamondFacet[];
}
export interface DiamondConstructorPattern {
pattern: ConstructorParam[];
validation: (constructor: any) => boolean;
}
export interface ConstructorParam {
name: string;
type: string;
isArray?: boolean;
isStruct?: boolean;
structFields?: Record<string, string>;
}
export type DiamondStandardType = 'standard-type-1' | 'standard-type-2' | 'standard-type-3' | 'custom';
//# sourceMappingURL=diamond.d.ts.map