/* tslint:disable */
/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run `yarn prepare` inside your local packages/contract-schema
 *
 * @module @truffle/contract-schema/spec
 */ /** */

/**
 * Interface description returned by compiler for source
 */
export type Abi = (
  | {
      type: "event";
      name: string;
      inputs: {
        [k: string]: any;
      }[];
      anonymous: boolean;
    }
  | {
      type: "error";
      name: string;
      inputs: {
        [k: string]: any;
      }[];
    }
  | (
      | {
          [k: string]: any;
        }
      | {
          [k: string]: any;
        }
    )
  | (
      | {
          [k: string]: any;
        }
      | {
          [k: string]: any;
        }
    )
  | {
      type: "receive";
      stateMutability: "payable";
    }
  | (
      | {
          [k: string]: any;
        }
      | {
          [k: string]: any;
        }
    )
)[];
export type Metadata = string;
export type Source = string;
export type SourcePath = string;
export type SchemaVersion = string;
export type GeneratedSources = {
  id?: number;
  language?: string;
  name?: string;
  contents?: string;
  ast?: {
    [k: string]: any;
  };
}[];

/**
 * Describes a contract consumable by Truffle, possibly including deployed instances on networks
 */
export interface ContractObject {
  /**
   * Name used to identify the contract
   */
  contractName?: string;
  abi: Abi;
  metadata?: Metadata;
  /**
   * Bytecode sent as contract-creation transaction data, with unresolved link references
   */
  bytecode?: string;
  /**
   * On-chain deployed contract bytecode, with unresolved link references
   */
  deployedBytecode?: string;
  /**
   * Source mapping for contract-creation transaction data bytecode
   */
  sourceMap?: string;
  /**
   * Source mapping for contract bytecode
   */
  deployedSourceMap?: string;
  source?: Source;
  sourcePath?: SourcePath;
  ast?: Ast;
  legacyAST?: LegacyAst;
  compiler?: {
    name?: string;
    version?: string;
    [k: string]: any;
  };
  networks?: {
    [k: string]: NetworkObject;
  };
  schemaVersion?: SchemaVersion;
  updatedAt?: string;
  networkType?: string;
  devdoc?: NatSpec;
  userdoc?: NatSpec;
  immutableReferences?: ImmutableReferences;
  generatedSources?: GeneratedSources;
  deployedGeneratedSources?: GeneratedSources;
  db?: {
    /**
     * Reference to @truffle/db canonical ID object for correlation purposes
     *
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^[a-zA-Z0-9]+$".
     */
    [k: string]: {
      id?: string;
      [k: string]: any;
    };
  };
  /**
   * This interface was referenced by `ContractObject`'s JSON-Schema definition
   * via the `patternProperty` "^x-".
   */
  [k: string]:
    | string
    | boolean
    | number
    | {
        [k: string]: any;
      }
    | any[];
}
export interface Ast {
  [k: string]: any;
}
export interface LegacyAst {
  [k: string]: any;
}
/**
 * This interface was referenced by `undefined`'s JSON-Schema definition
 * via the `patternProperty` "^[a-zA-Z0-9]+$".
 */
export interface NetworkObject {
  /**
   * This interface was referenced by `undefined`'s JSON-Schema definition
   * via the `patternProperty` "^[a-zA-Z_][a-zA-Z0-9_]*$".
   */
  address?: string;
  transactionHash?: string;
  events?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^0x[a-fA-F0-9]{64}$".
     */
    [k: string]: {
      type: "event";
      name: string;
      inputs: {
        [k: string]: any;
      }[];
      anonymous: boolean;
    };
  };
  links?: {
    /**
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^[a-zA-Z_][a-zA-Z0-9_]*$".
     */
    [k: string]: string;
  };
  db?: {
    /**
     * Reference to @truffle/db canonical ID object for correlation purposes
     *
     * This interface was referenced by `undefined`'s JSON-Schema definition
     * via the `patternProperty` "^[a-zA-Z0-9]+$".
     */
    [k: string]: {
      id?: string;
      [k: string]: any;
    };
  };
}
export interface NatSpec {
  [k: string]: any;
}
export interface ImmutableReferences {
  /**
   * This interface was referenced by `ImmutableReferences`'s JSON-Schema definition
   * via the `patternProperty` "[1-9][0-9]*".
   */
  [k: string]: {
    start?: number;
    length?: number;
  }[];
}
