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


      export type ExampleNestedEvent = {
        nested: { a: FieldLike, b: FieldLike, c: AztecAddressLike }
extra_value: FieldLike
      }
    

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

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

  
  /**
   * 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: {
    
    /** deliver_squashed_and_surviving_notes(other: struct) */
    deliver_squashed_and_surviving_notes: ((other: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** emit_encrypted_events(other: struct, preimages: array) */
    emit_encrypted_events: ((other: AztecAddressLike, preimages: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** emit_encrypted_events_nested(other: struct, num_nested_calls: integer) */
    emit_encrypted_events_nested: ((other: AztecAddressLike, num_nested_calls: (bigint | number)) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** emit_nested_event(a: field, b: field, c: struct, extra: field) */
    emit_nested_event: ((a: FieldLike, b: FieldLike, c: AztecAddressLike, extra: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

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

    /** emit_three_raw_private_logs_diff_lengths(tag1: field, payload1: field, tag2: field, payload2: array, tag3: field, payload3: array) */
    emit_three_raw_private_logs_diff_lengths: ((tag1: FieldLike, payload1: FieldLike, tag2: FieldLike, payload2: FieldLike[], tag3: FieldLike, payload3: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

    /** emit_unencrypted_events(preimages: array) */
    emit_unencrypted_events: ((preimages: FieldLike[]) => 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(): { ExampleNestedEvent: {abiType: AbiType, eventSelector: EventSelector, fieldNames: string[] }, ExampleEvent1: {abiType: AbiType, eventSelector: EventSelector, fieldNames: string[] }, ExampleEvent0: {abiType: AbiType, eventSelector: EventSelector, fieldNames: string[] } } {
    return {
      ExampleNestedEvent: {
        abiType: {
    "kind": "struct",
    "fields": [
        {
            "name": "nested",
            "type": {
                "kind": "struct",
                "fields": [
                    {
                        "name": "a",
                        "type": {
                            "kind": "field"
                        }
                    },
                    {
                        "name": "b",
                        "type": {
                            "kind": "field"
                        }
                    },
                    {
                        "name": "c",
                        "type": {
                            "kind": "struct",
                            "fields": [
                                {
                                    "name": "inner",
                                    "type": {
                                        "kind": "field"
                                    }
                                }
                            ],
                            "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
                        }
                    }
                ],
                "path": "TestLog::NestedStruct"
            }
        },
        {
            "name": "extra_value",
            "type": {
                "kind": "field"
            }
        }
    ],
    "path": "TestLog::ExampleNestedEvent"
},
        eventSelector: EventSelector.fromString("0xc76ae47b"),
        fieldNames: ["nested","extra_value"],
      },
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"],
      }
    };
  }
  
}
