import { ContractType, TokenProperties, MultiSigProperties, ERC3668Properties, ContractInfo, TokenPair, TokenPairInfo } from '../abi/contract';
import { EthereumClient } from '../eth/client';
import { AbiRepository } from '../abi/repo';
import { LRUCache } from '@splunkdlt/cache';
import { LogConfigSchema } from '../config';
export declare type Value = string | number | boolean | Array<string | number | boolean>;
export declare type DecodedStruct = {
    [k: string]: Value | DecodedStruct;
} | DecodedStruct[];
export interface FunctionCall {
    /** Function name */
    name: string;
    /** Function signature (name and parameter types) */
    signature: string;
    /** List of decoded parameters */
    params: Array<{
        /** Paramter name - omitted if the function call was decoded anonymously */
        name?: string;
        /** Data type */
        type: string;
        /** Decoded value */
        value: Value | DecodedStruct;
    }>;
    /**
     * A map of parameter names and their decoded value.
     * Omitted if the function call was decoded anonymously
     */
    args?: {
        [name: string]: Value | DecodedStruct;
    };
    extra?: {
        [name: string]: Value;
    };
}
export interface ClassificationResources {
    ethClient: EthereumClient;
    abiRepo: AbiRepository;
    contractInfoCache: LRUCache<string, Promise<ContractInfo>>;
}
export declare type ContractProperties = TokenProperties & MultiSigProperties & ERC3668Properties & TokenPair;
export declare class Classification {
    private logging;
    private ethClient;
    private abiRepo;
    private contractInfoCache;
    contractIgnoreCache: LRUCache<string, boolean>;
    constructor({ ethClient, abiRepo, contractInfoCache }: ClassificationResources, logging: LogConfigSchema);
    private removeAddressPadding;
    /**
     * Uses the supplied storageSlot from the proxy contract's
     * reference in memory to retrieve the address of the
     * implementation contract
     *
     * @param address
     * @param network
     * @param storageSlot
     */
    private getImplementationContractAddressFromStorage;
    /**
     * Uses the contract code to determine, and then retrieve
     * a cloned contract address
     *
     * @param tokenId
     * @param network
     * @param code
     * @returns string | null
     */
    private getClonedContractAddress;
    /**
     * Returns whether this contract code
     * conforms to the ERC20 token standards
     *
     * @param code
     */
    private isErc20ContractCode;
    /**
     * Returns whether this contract code
     * implements the ERC721 interfaceId
     *
     * @param code
     */
    isErc721ContractCode(code: string): boolean;
    /**
     * Returns whether this contract code
     * conforms to the ERC1155 contract standards
     *
     * @param code
     */
    private isErc1155ContractCode;
    private getImplementationAddress;
    private getErc1822StorageSlot;
    /**
     * Attempts to classify the contract type.
     */
    classifyContract({ address, code, contractType }: {
        address: string;
        code: string;
        contractType?: ContractType;
    }): Promise<ContractType>;
    getNFTId(address: string, index: number): Promise<string | undefined>;
    getNFTUri(address: string, id: string): Promise<string | undefined>;
    determineNFTUri(address: string, callInfo: FunctionCall, toInfo: ContractInfo): Promise<string | undefined>;
    getExtraData(address: string, callInfo: FunctionCall, toInfo: ContractInfo, input?: string): Promise<FunctionCall>;
    private tryParseDecimals;
    getTokenPair(address: string): Promise<{
        token0: TokenPairInfo | undefined;
        token1: TokenPairInfo | undefined;
    }>;
    getContractProperties(address: string, contractType: ContractType): Promise<Partial<ContractProperties> | undefined>;
    private canReceive;
    private usesEip1967StorageSlot;
    private usesOpenZeppelinStorageSlot;
    private usesPolygonStorageSlot;
    private usesEip1822StorageSlot;
    private usesGnosisSafeStorageSlot;
    private isWallet;
    private isErc897Proxy;
    private isErc1967Proxy;
    private isErc1822Proxy;
    private isGnosisSafe;
    private isOldGonsisMultiSig;
    private isErc721;
    private isErc721Receiver;
    private hasErc721MetadataExtension;
    private hasErc721EnumerationExtension;
    private hasErc721BaseUriSupport;
    private hasErc721TokenUriSupport;
    private getErc721IdByIndex;
    private getErc721UriById;
    private isErc1155;
    private isErc1155Receiver;
    private hasErc1155MetadataExtension;
    private isErc20;
    private isMinimalProxyClone;
    private isMetaProxyClone;
    private isSimpleMultisigClone;
    private isClone;
    private isDiamondProxy;
    private supportsInterfaceBytecode;
    private isFlashLoanLender;
    private isFlashLoanReciever;
    private hasErc1820AcceptMagicHex;
    private hasErc1820CanImplementInterface;
    private hasErc1820GetInterfaceImplementer;
    private hasErc1820SetInterfaceImplementer;
    private hasErc1820UpdateErc165Cache;
    private isErc1820Registry;
    private isErc3668;
    implementsErc721: (code: string) => boolean;
    hasTokenPair: (code: string) => boolean;
}
