
/* Autogenerated file, do not edit! */

/* eslint-disable */
import { AztecAddress, CompleteAddress } from '@aztec/aztec.js/addresses';
import { type AbiType, type AztecAddressLike, type ContractArtifact, EventSelector, decodeFromAbi, type EthAddressLike, type FieldLike, type FunctionSelectorLike, loadContractArtifact, loadContractArtifactForPublic, type NoirCompiledContract, type OptionLike, type U128Like, type WrappedFieldLike } from '@aztec/aztec.js/abi';
import { Contract, ContractBase, ContractFunctionInteraction, type ContractMethod, type ContractStorageLayout, DeployMethod } from '@aztec/aztec.js/contracts';
import { EthAddress } from '@aztec/aztec.js/addresses';
import { Fr, Point } from '@aztec/aztec.js/fields';
import { type PublicKey, PublicKeys } from '@aztec/aztec.js/keys';
import type { Wallet } from '@aztec/aztec.js/wallet';
import GenericProxyContractArtifactJson from '../artifacts/generic_proxy_contract-GenericProxy.json' with { type: 'json' };
export const GenericProxyContractArtifact = loadContractArtifact(GenericProxyContractArtifactJson as NoirCompiledContract);



/**
 * Type-safe interface for contract GenericProxy;
 */
export class GenericProxyContract extends ContractBase {
  
  private constructor(
    address: AztecAddress,
    wallet: Wallet,
  ) {
    super(address, GenericProxyContractArtifact, 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 new Contract instance.
   */
  public static at(
    address: AztecAddress,
    wallet: Wallet,
  ): GenericProxyContract {
    return Contract.at(address, GenericProxyContract.artifact, wallet) as GenericProxyContract;
  }

  
  /**
   * Creates a tx to deploy a new instance of this contract.
   */
  public static deploy(wallet: Wallet, ) {
    return new DeployMethod<GenericProxyContract>(PublicKeys.default(), wallet, GenericProxyContractArtifact, (instance, wallet) => GenericProxyContract.at(instance.address, wallet), 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<GenericProxyContract>(publicKeys, wallet, GenericProxyContractArtifact, (instance, wallet) => GenericProxyContract.at(instance.address, wallet), 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 GenericProxyContract['methods']>(
    opts: { publicKeys?: PublicKeys; method?: M; wallet: Wallet },
    ...args: Parameters<GenericProxyContract['methods'][M]>
  ) {
    return new DeployMethod<GenericProxyContract>(
      opts.publicKeys ?? PublicKeys.default(),
      opts.wallet,
      GenericProxyContractArtifact,
      (instance, wallet) => GenericProxyContract.at(instance.address, wallet),
      Array.from(arguments).slice(1),
      opts.method ?? 'constructor',
    );
  }
  

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

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

  

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

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

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

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

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

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

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

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

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

    /** forward_private_8(target: struct, selector: struct, args: array) */
    forward_private_8: ((target: AztecAddressLike, 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'>;

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

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

  
}
