
/* 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 OffchainEffectContractArtifactJson from '../artifacts/offchain_effect_contract-OffchainEffect.json' with { type: 'json' };
export const OffchainEffectContractArtifact = loadContractArtifact(OffchainEffectContractArtifactJson as NoirCompiledContract);


      export type TestEvent = {
        a: (bigint | number)
b: (bigint | number)
c: (bigint | number)
      }
    

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

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

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

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

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

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

    /** emit_note_as_offchain_message(value: integer, owner: struct) */
    emit_note_as_offchain_message: ((value: (bigint | number), owner: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** emit_offchain_effects(effects: struct) */
    emit_offchain_effects: ((effects: { data: FieldLike[], next_contract: AztecAddressLike }[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

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

    /** get_note_value(owner: struct) */
    get_note_value: ((owner: AztecAddressLike) => 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_private_state() */
    sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
  };

  
    public static get events(): { TestEvent: {abiType: AbiType, eventSelector: EventSelector, fieldNames: string[] } } {
    return {
      TestEvent: {
        abiType: {
    "kind": "struct",
    "fields": [
        {
            "name": "a",
            "type": {
                "kind": "integer",
                "sign": "unsigned",
                "width": 64
            }
        },
        {
            "name": "b",
            "type": {
                "kind": "integer",
                "sign": "unsigned",
                "width": 64
            }
        },
        {
            "name": "c",
            "type": {
                "kind": "integer",
                "sign": "unsigned",
                "width": 64
            }
        }
    ],
    "path": "OffchainEffect::TestEvent"
},
        eventSelector: EventSelector.fromString("0x391e1d6c"),
        fieldNames: ["a","b","c"],
      }
    };
  }
  
}
