
/* 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 StatefulTestContractArtifactJson from '../artifacts/stateful_test_contract-StatefulTest.json' with { type: 'json' };
export const StatefulTestContractArtifact = loadContractArtifact(StatefulTestContractArtifactJson as NoirCompiledContract);



/**
 * Type-safe interface for contract StatefulTest;
 */
export class StatefulTestContract extends ContractBase {
  
  private constructor(
    instance: ContractInstanceWithAddress,
    wallet: Wallet,
  ) {
    super(instance, StatefulTestContractArtifact, 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, StatefulTestContract.artifact, wallet) as Promise<StatefulTestContract>;
  }

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

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

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

  public static get storage(): ContractStorageLayout<'notes' | 'public_values'> {
      return {
        notes: {
      slot: new Fr(1n),
    },
public_values: {
      slot: new Fr(2n),
    }
      } as ContractStorageLayout<'notes' | 'public_values'>;
    }
    

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

    /** create_note(owner: struct, value: field) */
    create_note: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** create_note_no_init_check(owner: struct, value: field) */
    create_note_no_init_check: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** destroy_and_create(recipient: struct, amount: field) */
    destroy_and_create: ((recipient: AztecAddressLike, amount: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** destroy_and_create_no_init_check(recipient: struct, amount: field) */
    destroy_and_create_no_init_check: ((recipient: AztecAddressLike, amount: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** get_public_value(owner: struct) */
    get_public_value: ((owner: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** increment_public_value(owner: struct, value: field) */
    increment_public_value: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** increment_public_value_no_init_check(owner: struct, value: field) */
    increment_public_value_no_init_check: ((owner: AztecAddressLike, value: 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_constructor(owner: struct, value: field) */
    public_constructor: ((owner: AztecAddressLike, value: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

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

    /** summed_values(owner: struct) */
    summed_values: ((owner: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

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

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

  
}
