import _m0 from "protobufjs/minimal";
import { AccountID, ContractID, Key, StakingInfo, TokenRelationship } from "./basic_types";
import { Duration } from "./duration";
import { QueryHeader } from "./query_header";
import { ResponseHeader } from "./response_header";
import { Timestamp } from "./timestamp";
export declare const protobufPackage = "proto";
/**
* Get information about a smart contract instance. This includes the account that it uses, the file
* containing its initcode (if a file was used to initialize the contract), and the time when it will expire.
*/
export interface ContractGetInfoQuery {
/**
* standard info sent from client to node, including the signed payment, and what kind of
* response is requested (cost, state proof, both, or neither).
*/
header: QueryHeader | undefined;
/** the contract for which information is requested */
contractID: ContractID | undefined;
}
/** Response when the client sends the node ContractGetInfoQuery */
export interface ContractGetInfoResponse {
/**
* standard response from node to client, including the requested fields: cost, or state proof,
* or both, or neither
*/
header: ResponseHeader | undefined;
/** the information about this contract instance (a state proof can be generated for this) */
contractInfo: ContractGetInfoResponse_ContractInfo | undefined;
}
export interface ContractGetInfoResponse_ContractInfo {
/** ID of the contract instance, in the format used in transactions */
contractID: ContractID | undefined;
/**
* ID of the cryptocurrency account owned by the contract instance, in the format used in
* transactions
*/
accountID: AccountID | undefined;
/**
* ID of both the contract instance and the cryptocurrency account owned by the contract
* instance, in the format used by Solidity
*/
contractAccountID: string;
/**
* the state of the instance and its fields can be modified arbitrarily if this key signs a
* transaction to modify it. If this is null, then such modifications are not possible, and
* there is no administrator that can override the normal operation of this smart contract
* instance. Note that if it is created with no admin keys, then there is no administrator
* to authorize changing the admin keys, so there can never be any admin keys for that
* instance.
*/
adminKey: Key | undefined;
/** the current time at which this contract instance (and its account) is set to expire */
expirationTime: Timestamp | undefined;
/**
* the expiration time will extend every this many seconds. If there are insufficient funds,
* then it extends as long as possible. If the account is empty when it expires, then it is
* deleted.
*/
autoRenewPeriod: Duration | undefined;
/**
* number of bytes of storage being used by this instance (which affects the cost to extend
* the expiration time)
*/
storage: number;
/** the memo associated with the contract (max 100 bytes) */
memo: string;
/** The current balance, in tinybars */
balance: number;
/** Whether the contract has been deleted */
deleted: boolean;
/**
* [DEPRECATED] The metadata of the tokens associated to the contract. This field was
* deprecated by HIP-367, which allowed
* an account to be associated to an unlimited number of tokens. This scale makes it more
* efficient for users to consult mirror nodes to review their token associations.
*
* @deprecated
*/
tokenRelationships: TokenRelationship[];
/** The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs. */
ledgerId: Uint8Array;
/**
* ID of the an account to charge for auto-renewal of this contract. If not set, or set to an account with zero hbar
* balance, the contract's own hbar balance will be used to cover auto-renewal fees.
*/
autoRenewAccountId: AccountID | undefined;
/** The maximum number of tokens that a contract can be implicitly associated with. */
maxAutomaticTokenAssociations: number;
/** Staking metadata for this contract. */
stakingInfo: StakingInfo | undefined;
}
export declare const ContractGetInfoQuery: {
encode(message: ContractGetInfoQuery, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ContractGetInfoQuery;
fromJSON(object: any): ContractGetInfoQuery;
toJSON(message: ContractGetInfoQuery): unknown;
create(base?: DeepPartial): ContractGetInfoQuery;
fromPartial(object: DeepPartial): ContractGetInfoQuery;
};
export declare const ContractGetInfoResponse: {
encode(message: ContractGetInfoResponse, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ContractGetInfoResponse;
fromJSON(object: any): ContractGetInfoResponse;
toJSON(message: ContractGetInfoResponse): unknown;
create(base?: DeepPartial): ContractGetInfoResponse;
fromPartial(object: DeepPartial): ContractGetInfoResponse;
};
export declare const ContractGetInfoResponse_ContractInfo: {
encode(message: ContractGetInfoResponse_ContractInfo, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ContractGetInfoResponse_ContractInfo;
fromJSON(object: any): ContractGetInfoResponse_ContractInfo;
toJSON(message: ContractGetInfoResponse_ContractInfo): unknown;
create(base?: DeepPartial): ContractGetInfoResponse_ContractInfo;
fromPartial(object: DeepPartial): ContractGetInfoResponse_ContractInfo;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {
$case: string;
} ? {
[K in keyof Omit]?: DeepPartial;
} & {
$case: T["$case"];
} : T extends {} ? {
[K in keyof T]?: DeepPartial;
} : Partial;
export {};
//# sourceMappingURL=contract_get_info.d.ts.map