/* Autogenerated file, do not edit! */ /* eslint-disable */ import { loadContractArtifact, loadContractArtifactForPublic } from '@aztec/aztec.js/abi';
import { Contract, ContractBase, DeployMethod } from '@aztec/aztec.js/contracts';
import { Fr } from '@aztec/aztec.js/fields';
import CounterContractArtifactJson from '../artifacts/counter_contract-Counter.json' with {
    type: 'json'
};
export const CounterContractArtifact = loadContractArtifact(CounterContractArtifactJson);
/**
 * Type-safe interface for contract Counter;
 */ export class CounterContract extends ContractBase {
    constructor(address, wallet){
        super(address, CounterContractArtifact, 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.
   */ static at(address, wallet) {
        return Contract.at(address, CounterContract.artifact, wallet);
    }
    /**
   * 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`.
   */ static deploy(wallet, headstart, owner, instantiation) {
        return DeployMethod.create(wallet, {
            artifact: CounterContractArtifact,
            postDeployCtor: (instance, wallet)=>CounterContract.at(instance.address, wallet),
            args: [
                headstart,
                owner
            ]
        }, instantiation);
    }
    /**
   * Creates a tx to deploy a new instance of this contract using the specified constructor method.
   */ static deployWithOpts(opts, ...args) {
        return DeployMethod.create(opts.wallet, {
            artifact: CounterContractArtifact,
            postDeployCtor: (instance, wallet)=>CounterContract.at(instance.address, wallet),
            args,
            constructorNameOrArtifact: opts.method ?? 'constructor'
        }, opts.instantiation);
    }
    /**
   * Returns this contract's artifact.
   */ static get artifact() {
        return CounterContractArtifact;
    }
    /**
   * Returns this contract's artifact with public bytecode.
   */ static get artifactForPublic() {
        return loadContractArtifactForPublic(CounterContractArtifactJson);
    }
    static get storage() {
        return {
            counters: {
                slot: new Fr(1n)
            }
        };
    }
}
