
/* 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 UpdatableContractArtifactJson from '../artifacts/updatable_contract-Updatable.json' with { type: 'json' };
export const UpdatableContractArtifact = loadContractArtifact(UpdatableContractArtifactJson as NoirCompiledContract);



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

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

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

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

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

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

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

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

    /** initialize(initial_value: field) */
    initialize: ((initial_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_dispatch(selector: field) */
    public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

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

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

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

    /** update_to(new_class_id: struct) */
    update_to: ((new_class_id: WrappedFieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
  };

  
}
