/* Autogenerated file, do not edit! */
import { EventSelector, loadContractArtifact, loadContractArtifactForPublic } from '@aztec/aztec.js/abi';
import { Contract, ContractBase, DeployMethod } from '@aztec/aztec.js/contracts';
import { Fr } from '@aztec/aztec.js/fields';
import TokenContractArtifactJson from '../../target/token_contract-Token.json' with { type: 'json' };
export const TokenContractArtifact = loadContractArtifact(TokenContractArtifactJson);
/**
 * Type-safe interface for contract Token;
 */
export class TokenContract extends ContractBase {
    constructor(address, wallet) {
        super(address, TokenContractArtifact, 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, TokenContract.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, name, symbol, decimals, initial_supply, to, auth_contract, instantiation) {
        return DeployMethod.create(wallet, {
            artifact: TokenContractArtifact,
            postDeployCtor: (instance, wallet) => TokenContract.at(instance.address, wallet),
            args: [name, symbol, decimals, initial_supply, to, auth_contract],
        }, 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: TokenContractArtifact,
            postDeployCtor: (instance, wallet) => TokenContract.at(instance.address, wallet),
            args,
            constructorNameOrArtifact: opts.method ?? 'constructor',
        }, opts.instantiation);
    }
    /**
     * Returns this contract's artifact.
     */
    static get artifact() {
        return TokenContractArtifact;
    }
    /**
     * Returns this contract's artifact with public bytecode.
     */
    static get artifactForPublic() {
        return loadContractArtifactForPublic(TokenContractArtifactJson);
    }
    static get storage() {
        return {
            name: {
                slot: new Fr(1n),
            },
            symbol: {
                slot: new Fr(3n),
            },
            decimals: {
                slot: new Fr(5n),
            },
            private_balances: {
                slot: new Fr(7n),
            },
            total_supply: {
                slot: new Fr(8n),
            },
            public_balances: {
                slot: new Fr(9n),
            },
            minter: {
                slot: new Fr(10n),
            },
            auth_contract: {
                slot: new Fr(12n),
            }
        };
    }
    static get events() {
        return {
            Transfer: {
                abiType: {
                    "kind": "struct",
                    "fields": [
                        {
                            "name": "from",
                            "type": {
                                "kind": "struct",
                                "fields": [
                                    {
                                        "name": "inner",
                                        "type": {
                                            "kind": "field"
                                        }
                                    }
                                ],
                                "path": "authorization_contract::aztec::protocol_types::address::aztec_address::AztecAddress"
                            }
                        },
                        {
                            "name": "to",
                            "type": {
                                "kind": "struct",
                                "fields": [
                                    {
                                        "name": "inner",
                                        "type": {
                                            "kind": "field"
                                        }
                                    }
                                ],
                                "path": "authorization_contract::aztec::protocol_types::address::aztec_address::AztecAddress"
                            }
                        },
                        {
                            "name": "amount",
                            "type": {
                                "kind": "integer",
                                "sign": "unsigned",
                                "width": 128
                            }
                        }
                    ],
                    "path": "Token::Transfer"
                },
                eventSelector: EventSelector.fromString("0x70a1894e"),
                fieldNames: ["from", "to", "amount"],
            }
        };
    }
}
