
/* 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, type DeployInstantiationOptions, 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 PublicFnsWithEmitReproContractArtifactJson from '../artifacts/public_fns_with_emit_repro_contract-PublicFnsWithEmitRepro.json' with { type: 'json' };
export const PublicFnsWithEmitReproContractArtifact = loadContractArtifact(PublicFnsWithEmitReproContractArtifactJson as NoirCompiledContract);


      export type Updated = {
        new_value: (bigint | number)
      }
    

/**
 * Type-safe interface for contract PublicFnsWithEmitRepro;
 */
export class PublicFnsWithEmitReproContract extends ContractBase {
  
  private constructor(
    address: AztecAddress,
    wallet: Wallet,
  ) {
    super(address, PublicFnsWithEmitReproContractArtifact, 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,
  ): PublicFnsWithEmitReproContract {
    return Contract.at(address, PublicFnsWithEmitReproContract.artifact, wallet) as PublicFnsWithEmitReproContract;
  }

  
  /**
   * Creates a tx to deploy a new instance of this contract.
   * @param instantiation - Optional address-affecting parameters (salt, deployer / universalDeploy, publicKeys).
   *                       Salt defaults to a random value; the deployer is locked lazily from the first send-time `from`.
   */
  public static deploy(wallet: Wallet, instantiation?: DeployInstantiationOptions) {
    return DeployMethod.create<PublicFnsWithEmitReproContract>(
      wallet,
      {
        artifact: PublicFnsWithEmitReproContractArtifact,
        postDeployCtor: (instance, wallet) => PublicFnsWithEmitReproContract.at(instance.address, wallet),
        args: [],
      },
      instantiation,
    );
  }

  /**
   * Creates a tx to deploy a new instance of this contract using the specified constructor method.
   */
  public static deployWithOpts<M extends keyof PublicFnsWithEmitReproContract['methods']>(
    opts: { method?: M; wallet: Wallet; instantiation?: DeployInstantiationOptions },
    ...args: Parameters<PublicFnsWithEmitReproContract['methods'][M]>
  ) {
    return DeployMethod.create<PublicFnsWithEmitReproContract>(
      opts.wallet,
      {
        artifact: PublicFnsWithEmitReproContractArtifact,
        postDeployCtor: (instance, wallet) => PublicFnsWithEmitReproContract.at(instance.address, wallet),
        args,
        constructorNameOrArtifact: opts.method ?? 'constructor',
      },
      opts.instantiation,
    );
  }
  

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /** offchain_receive(messages: struct) */
    offchain_receive: ((messages: { ciphertext: FieldLike[], recipient: AztecAddressLike, tx_hash: OptionLike<FieldLike>, anchor_block_timestamp: (bigint | number) }[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

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

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

  
    public static get events(): { Updated: {abiType: AbiType, eventSelector: EventSelector, fieldNames: string[] } } {
    return {
      Updated: {
        abiType: {
    "kind": "struct",
    "fields": [
        {
            "name": "new_value",
            "type": {
                "kind": "integer",
                "sign": "unsigned",
                "width": 64
            }
        }
    ],
    "path": "PublicFnsWithEmitRepro::Updated"
},
        eventSelector: EventSelector.fromString("0xd0f08c57"),
        fieldNames: ["new_value"],
      }
    };
  }
  
}
