ethereum-storage
Version:
Storage protocol built on ethereum using datapoint archetecture and a registry contract for handling royalties.
60 lines • 2.11 kB
TypeScript
/**
* ESP Deployment Information and Utilities
*
* Re-exports esp.deployments.ts with additional utility functions
*/
import { DataPointStorage, DataPointRegistry } from '../typechain-types';
import { Provider } from 'ethers';
export { espDeployments, default } from '../esp.deployments';
export interface LocalDeploymentData {
chainId: number;
dps: {
contractAddress: string;
deployerAddress: string;
txHash?: string;
deployedAt?: string;
};
dpr: {
contractAddress: string;
deployerAddress: string;
txHash?: string;
deployedAt?: string;
constructors: {
ownerAddress: string;
dpsAddress: string;
royaltyRate: string;
};
};
}
export declare function getContractAddress(chainId: number, contract: 'dps' | 'dpr'): any;
export declare function getDeploymentInfo(chainId: number, contract: 'dps' | 'dpr'): any;
export declare function getSupportedChainIds(): number[];
export declare function loadContract(chainId: number, contract: 'dps' | 'dpr', provider?: Provider | null): undefined | DataPointStorage | DataPointRegistry;
/**
* Add a localhost deployment to your local package copy
* This allows testing with your own deployed contracts without testnet tokens
*
* @param deploymentData - The deployment information to add
* @param options - Configuration options
*/
export declare function addLocalhostDeployment(deploymentData: LocalDeploymentData, options?: {
overwrite?: boolean;
description?: string;
}): void;
/**
* Remove a localhost deployment from your local package copy
*
* @param chainId - The chain ID to remove (must be localhost: 31337 or 1337)
*/
export declare function removeLocalhostDeployment(chainId: number): void;
/**
* List all deployments including any localhost ones you've added
*/
export declare function listAllDeployments(): {
[chainId: number]: any;
};
/**
* Check if a localhost deployment exists
*/
export declare function hasLocalhostDeployment(chainId?: number): boolean;
//# sourceMappingURL=deployments.d.ts.map