import { SourceUnit } from 'solidity-ast'; import { BN } from 'bn.js'; export interface Deployer { provider: TruffleProvider; deploy(contract: ContractClass, ...args: unknown[]): Promise; } export interface ContractClass { new (address: string): ContractInstance; 'new'(...args: unknown[]): ContractInstance; deployed(): Promise; at(address: string): Promise; detectNetwork(): void; setProvider(provider: TruffleProvider): void; defaults(defaults: ContractClassDefaults): void; bytecode: string; currentProvider: TruffleProvider; class_defaults: ContractClassDefaults; contractName: string; address?: string; transactionHash?: string; networks?: { [id: string]: NetworkObject; }; } export interface NetworkObject { address?: string; transactionHash?: string; links: { [libName: string]: string; }; } export interface ContractClassDefaults { from: string; gas: number; gasPrice: number; } export interface ContractInstance { address: string; transactionHash?: string; contract: { methods: { [name: string]: (...args: unknown[]) => { encodeABI(): string; }; }; }; [other: string]: any; } export interface TruffleArtifact { contractName: string; sourcePath: string; source: string; bytecode: string; compiler: { name: string; version: string; }; ast?: SourceUnit; } type TruffleProviderResult = { result: any; error: { message: string; }; }; type TruffleProviderSend = (args: { method: string; params: unknown[]; id: string; jsonrpc: '2.0'; }, callback: (err: Error | null, value: TruffleProviderResult) => void) => void; export type TruffleProvider = { send: TruffleProviderSend; } | { sendAsync: TruffleProviderSend; }; export interface TruffleConfig { provider: TruffleProvider; contracts_build_directory: string; contracts_directory: string; from: string; gas: number; gasPrice: number; } export declare function getTruffleConfig(): TruffleConfig; export declare function getTruffleDefaults(): ContractClassDefaults; export declare function getTruffleProvider(): TruffleProvider; export declare const TruffleContract: (artifact: unknown) => ContractClass; export type TruffleTxOptions = { /** * This should be an address */ from?: string; /** * This should be an address */ to?: string; gas?: string | number | typeof BN; gasPrice?: string | number | typeof BN; maxFeePerGas?: string | number | typeof BN; maxPriorityFeePerGas?: string | number | typeof BN; value?: string | number | typeof BN; /** * This should be a bytestring (even-length hex string, with "0x") */ data?: string; nonce?: string | number | typeof BN; /** * This represents a number, but for compatibility purposes * it should be given as a hex string. It should be in the * range of 0x00 to 0xbf. */ type?: string; accessList?: { /** * This should be an address */ address: string; /** * These should be 32-byte bytestrings */ storageKeys: string[]; }[]; /** * Quorum-specific; this should be an array of base64-encoded strings, * each of which encodes a 32-byte bytestring */ privateFor?: string[]; /** * Truffle-specific; if set to false, the deployer won't deploy this * contract if one has already been deployed */ overwrite?: boolean; }; export {}; //# sourceMappingURL=truffle.d.ts.map