
/* 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 TestLogContractArtifactJson from '../artifacts/test_log_contract-TestLog.json' with { type: 'json' };
export const TestLogContractArtifact = loadContractArtifact(TestLogContractArtifactJson as NoirCompiledContract);


      export type ExampleEvent1 = {
        value2: AztecAddressLike
value3: (bigint | number)
      }
    

      export type ExampleEvent0 = {
        value0: FieldLike
value1: FieldLike
      }
    

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

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

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

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

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

  /** Type-safe wrappers for the public methods exposed by the contract. */
  public declare methods: {
    
    /** emit_encrypted_events(other: struct, preimages: array) */
    emit_encrypted_events: ((other: AztecAddressLike, preimages: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** emit_unencrypted_events(preimages: array) */
    emit_unencrypted_events: ((preimages: 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'>;

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

  
    public static get events(): { ExampleEvent1: {abiType: AbiType, eventSelector: EventSelector, fieldNames: string[] }, ExampleEvent0: {abiType: AbiType, eventSelector: EventSelector, fieldNames: string[] } } {
    return {
      ExampleEvent1: {
        abiType: {
    "kind": "struct",
    "fields": [
        {
            "name": "value2",
            "type": {
                "kind": "struct",
                "fields": [
                    {
                        "name": "inner",
                        "type": {
                            "kind": "field"
                        }
                    }
                ],
                "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
            }
        },
        {
            "name": "value3",
            "type": {
                "kind": "integer",
                "sign": "unsigned",
                "width": 8
            }
        }
    ],
    "path": "TestLog::ExampleEvent1"
},
        eventSelector: EventSelector.fromString("0x4dc4df75"),
        fieldNames: ["value2","value3"],
      },
ExampleEvent0: {
        abiType: {
    "kind": "struct",
    "fields": [
        {
            "name": "value0",
            "type": {
                "kind": "field"
            }
        },
        {
            "name": "value1",
            "type": {
                "kind": "field"
            }
        }
    ],
    "path": "TestLog::ExampleEvent0"
},
        eventSelector: EventSelector.fromString("0xd45c041b"),
        fieldNames: ["value0","value1"],
      }
    };
  }
  
}
