1.0.6 • Published 6 months ago
@types/contract-proxy-kit v1.0.6
Installation
npm install --save @types/contract-proxy-kit
Summary
This package contains type definitions for contract-proxy-kit (https://github.com/gnosis/contract-proxy-kit#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/contract-proxy-kit.
index.d.ts
// Type definitions for contract-proxy-kit 1.0
// Project: https://github.com/gnosis/contract-proxy-kit#readme
// Definitions by: Alan Lu <https://github.com/cag>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.6
import { ethers } from 'ethers';
export = CPK;
declare namespace CPK {
interface NetworkConfigEntry {
masterCopyAddress: string;
proxyFactoryAddress: string;
multiSendAddress: string;
fallbackHandlerAddress: string;
}
interface CommonConfig {
networks?: {
[id: string]: NetworkConfigEntry;
} | undefined;
}
interface Web3SpecificConfig extends CommonConfig {
web3: object;
ownerAccount?: string | undefined;
}
interface EthersSpecificConfig extends CommonConfig {
ethers: typeof ethers;
signer: ethers.Signer;
}
type CPKConfig = Web3SpecificConfig | EthersSpecificConfig;
interface Transaction {
operation: number | string | object;
to: string;
value: number | string | object;
data: string;
}
type TransactionOptions = object;
interface TransactionResult {
hash: string;
promiEvent?: object | undefined;
transactionResponse?: ethers.providers.TransactionResponse | undefined;
}
}
declare class CPK {
static CALL: 0;
static DELEGATECALL: 1;
static create(opts: CPK.CPKConfig): Promise<CPK>;
getOwnerAccount(): Promise<string>;
get address(): string;
execTransactions(
transactions: ReadonlyArray<CPK.Transaction>,
options?: CPK.TransactionOptions,
): Promise<CPK.TransactionResult>;
}
Additional Details
- Last updated: Thu, 08 Jul 2021 09:08:10 GMT
- Dependencies: @types/ethers
- Global values: none
Credits
These definitions were written by Alan Lu.