
/* Autogenerated file, do not edit! */

/* eslint-disable */
import {
  type AbiType,
  AztecAddress,
  type AztecAddressLike,
  CompleteAddress,
  Contract,
  type ContractArtifact,
  ContractBase,
  ContractFunctionInteraction,
  type ContractInstanceWithAddress,
  type ContractMethod,
  type ContractStorageLayout,
  decodeFromAbi,
  DeployMethod,
  EthAddress,
  type EthAddressLike,
  EventSelector,
  type FieldLike,
  Fr,
  type FunctionSelectorLike,
  loadContractArtifact,
  loadContractArtifactForPublic,
  type NoirCompiledContract,
  Point,
  type PublicKey,
  PublicKeys,
  type Wallet,
  type U128Like,
  type WrappedFieldLike,
} from '@aztec/aztec.js';
import ParentContractArtifactJson from '../artifacts/parent_contract-Parent.json' with { type: 'json' };
export const ParentContractArtifact = loadContractArtifact(ParentContractArtifactJson as NoirCompiledContract);



/**
 * Type-safe interface for contract Parent;
 */
export class ParentContract extends ContractBase {
  
  private constructor(
    instance: ContractInstanceWithAddress,
    wallet: Wallet,
  ) {
    super(instance, ParentContractArtifact, wallet);
  }
  

  
  /**
   * Creates a contract instance.
   * @param address - The deployed contract's address.
   * @param wallet - The wallet to use when interacting with the contract.
   * @returns A promise that resolves to a new Contract instance.
   */
  public static async at(
    address: AztecAddress,
    wallet: Wallet,
  ) {
    return Contract.at(address, ParentContract.artifact, wallet) as Promise<ParentContract>;
  }

  
  /**
   * Creates a tx to deploy a new instance of this contract.
   */
  public static deploy(wallet: Wallet, ) {
    return new DeployMethod<ParentContract>(PublicKeys.default(), wallet, ParentContractArtifact, ParentContract.at, Array.from(arguments).slice(1));
  }

  /**
   * Creates a tx to deploy a new instance of this contract using the specified public keys hash to derive the address.
   */
  public static deployWithPublicKeys(publicKeys: PublicKeys, wallet: Wallet, ) {
    return new DeployMethod<ParentContract>(publicKeys, wallet, ParentContractArtifact, ParentContract.at, Array.from(arguments).slice(2));
  }

  /**
   * Creates a tx to deploy a new instance of this contract using the specified constructor method.
   */
  public static deployWithOpts<M extends keyof ParentContract['methods']>(
    opts: { publicKeys?: PublicKeys; method?: M; wallet: Wallet },
    ...args: Parameters<ParentContract['methods'][M]>
  ) {
    return new DeployMethod<ParentContract>(
      opts.publicKeys ?? PublicKeys.default(),
      opts.wallet,
      ParentContractArtifact,
      ParentContract.at,
      Array.from(arguments).slice(1),
      opts.method ?? 'constructor',
    );
  }
  

  
  /**
   * Returns this contract's artifact.
   */
  public static get artifact(): ContractArtifact {
    return ParentContractArtifact;
  }

  /**
   * Returns this contract's artifact with public bytecode.
   */
  public static get artifactForPublic(): ContractArtifact {
    return loadContractArtifactForPublic(ParentContractArtifactJson as NoirCompiledContract);
  }
  

  

  /** Type-safe wrappers for the public methods exposed by the contract. */
  public declare methods: {
    
    /** enqueue_call_to_child(target_contract: struct, target_selector: struct, target_value: field) */
    enqueue_call_to_child: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, target_value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** enqueue_call_to_child_twice(target_contract: struct, target_selector: struct, target_value: field) */
    enqueue_call_to_child_twice: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, target_value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** enqueue_call_to_child_with_many_args_and_recurse(remaining_recursions: integer) */
    enqueue_call_to_child_with_many_args_and_recurse: ((remaining_recursions: (bigint | number)) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** enqueue_call_to_pub_entry_point(target_contract: struct, target_selector: struct, target_value: field) */
    enqueue_call_to_pub_entry_point: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, target_value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** enqueue_calls_to_child_with_nested_first(target_contract: struct, target_selector: struct) */
    enqueue_calls_to_child_with_nested_first: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** enqueue_calls_to_child_with_nested_last(target_contract: struct, target_selector: struct) */
    enqueue_calls_to_child_with_nested_last: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** enqueue_calls_to_pub_entry_point(target_contract: struct, target_selector: struct, target_value: field) */
    enqueue_calls_to_pub_entry_point: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, target_value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** enqueue_static_call_to_pub_function(target_contract: struct, target_selector: struct, args: array) */
    enqueue_static_call_to_pub_function: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, args: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** enqueue_static_nested_call_to_pub_function(target_contract: struct, target_selector: struct, args: array) */
    enqueue_static_nested_call_to_pub_function: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, args: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** entry_point(target_contract: struct, target_selector: struct) */
    entry_point: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** private_call(target_contract: struct, target_selector: struct, args: array) */
    private_call: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, args: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** private_nested_static_call(target_contract: struct, target_selector: struct, args: array) */
    private_nested_static_call: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, args: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** private_static_call(target_contract: struct, target_selector: struct, args: array) */
    private_static_call: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, args: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** process_message(message_ciphertext: struct, message_context: struct) */
    process_message: ((message_ciphertext: FieldLike[], message_context: { tx_hash: FieldLike, unique_note_hashes_in_tx: FieldLike[], first_nullifier_in_tx: FieldLike, recipient: AztecAddressLike }) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** pub_entry_point(target_contract: struct, target_selector: struct, init_value: field) */
    pub_entry_point: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, init_value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** pub_entry_point_twice(target_contract: struct, target_selector: struct, init_value: field) */
    pub_entry_point_twice: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, init_value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** public_call_with_max_over_n_args(_args: array) */
    public_call_with_max_over_n_args: ((_args: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** public_dispatch(selector: field) */
    public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** public_nested_static_call(target_contract: struct, target_selector: struct, args: array) */
    public_nested_static_call: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, args: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** public_static_call(target_contract: struct, target_selector: struct, args: array) */
    public_static_call: ((target_contract: AztecAddressLike, target_selector: FunctionSelectorLike, args: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** sync_private_state() */
    sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
  };

  
}
