import { StateMutabilityType, AbiInput, AbiOutput, AbiType } from 'web3-utils'; export declare namespace ethereum { export type Web3AbiType = AbiType | 'receive'; interface IEthereumAccount { address: string; balance: number; privateKey?: string; isValidAddress?: boolean | void; } interface IWeb3AbiItem { anonymous?: boolean; constant?: boolean; inputs?: AbiInput[]; name?: string; outputs?: AbiOutput[]; payable?: boolean; stateMutability?: StateMutabilityType; type: Web3AbiType; gas?: number; } interface ISolcSelectedContractOutput { abi: IWeb3AbiItem[]; evm: { bytecode: { object: string; opcodes: string; sourceMap: string; }; gasEstimation: { creation: { codeDepositCost: string; executionCost: string; totalCost: string; }; }; }; } /** * Deploy options passed to Metamask * unit only support 'wei' and 'gwei' */ enum unit { wei = 'wei', gwei = 'gwei' } interface IDeployOptions { storageLimit?: number; gasLimit?: number; gasPrice?: string; payPrice?: string; } interface IDeployUiOptions { gasLimit: string; gasLimitErrorMsg: string; unit: string; value: string; valueErrorMsg: string; } interface IDeployContractActionData { contractName: string; solcCompiledOutput: ISolcSelectedContractOutput; account: IEthereumAccount; deployOptions: IDeployOptions; constructorArgs: Record; path: string[]; } interface IInteractContractActionData { interactArgs: Record; contractAddress: string; abiEntryIdx: number; accountAddress: string; abi: IWeb3AbiItem[]; chainId: string; payableValue?: string; } interface ICalldataActionData { contractName: string; contractAddress: string; accountAddress: string; abi: IWeb3AbiItem[]; chainId: string; calldata?: string; payableValue?: string | number; } }