
/* 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 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(
    address: AztecAddress,
    wallet: Wallet,
  ) {
    super(address, 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 new Contract instance.
   */
  public static at(
    address: AztecAddress,
    wallet: Wallet,
  ): OffchainEffectContract {
    return Contract.at(address, OffchainEffectContract.artifact, wallet) as OffchainEffectContract;
  }

  
  /**
   * 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<OffchainEffectContract>(
      wallet,
      {
        artifact: OffchainEffectContractArtifact,
        postDeployCtor: (instance, wallet) => OffchainEffectContract.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 OffchainEffectContract['methods']>(
    opts: { method?: M; wallet: Wallet; instantiation?: DeployInstantiationOptions },
    ...args: Parameters<OffchainEffectContract['methods'][M]>
  ) {
    return DeployMethod.create<OffchainEffectContract>(
      opts.wallet,
      {
        artifact: OffchainEffectContractArtifact,
        postDeployCtor: (instance, wallet) => OffchainEffectContract.at(instance.address, wallet),
        args,
        constructorNameOrArtifact: opts.method ?? 'constructor',
      },
      opts.instantiation,
    );
  }
  

  
  /**
   * 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: {
    
    /** call_deliver_offchain_message(ciphertext: array, recipient: struct) */
    call_deliver_offchain_message: ((ciphertext: FieldLike[], recipient: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** 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'>;

    /** 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'>;

    /** view_deliver_offchain_message(ciphertext: array, recipient: struct) */
    view_deliver_offchain_message: ((ciphertext: FieldLike[], recipient: AztecAddressLike) => 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"],
      }
    };
  }
  
}
