"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SwapHandler__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
const ethers_1 = require("ethers");
const _abi = [
    {
        type: "constructor",
        inputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "activateCoreAccount",
        inputs: [
            {
                name: "erc20EVMAddress",
                type: "address",
                internalType: "address",
            },
            {
                name: "erc20CoreIndex",
                type: "uint64",
                internalType: "uint64",
            },
            {
                name: "amountEVM",
                type: "uint256",
                internalType: "uint256",
            },
            {
                name: "decimalDiff",
                type: "int8",
                internalType: "int8",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "cancelOrderByCloid",
        inputs: [
            {
                name: "spotIndex",
                type: "uint32",
                internalType: "uint32",
            },
            {
                name: "cloid",
                type: "uint128",
                internalType: "uint128",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "parentHandler",
        inputs: [],
        outputs: [
            {
                name: "",
                type: "address",
                internalType: "address",
            },
        ],
        stateMutability: "view",
    },
    {
        type: "function",
        name: "submitSpotLimitOrder",
        inputs: [
            {
                name: "finalTokenInfo",
                type: "tuple",
                internalType: "struct FinalTokenInfo",
                components: [
                    {
                        name: "spotIndex",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "isBuy",
                        type: "bool",
                        internalType: "bool",
                    },
                    {
                        name: "feePpm",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "suggestedDiscountBps",
                        type: "uint32",
                        internalType: "uint32",
                    },
                    {
                        name: "swapHandler",
                        type: "address",
                        internalType: "contract SwapHandler",
                    },
                ],
            },
            {
                name: "limitPriceX1e8",
                type: "uint64",
                internalType: "uint64",
            },
            {
                name: "sizeX1e8",
                type: "uint64",
                internalType: "uint64",
            },
            {
                name: "cloid",
                type: "uint128",
                internalType: "uint128",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "sweepErc20",
        inputs: [
            {
                name: "token",
                type: "address",
                internalType: "address",
            },
            {
                name: "amount",
                type: "uint256",
                internalType: "uint256",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "transferFundsToSelfOnCore",
        inputs: [
            {
                name: "erc20EVMAddress",
                type: "address",
                internalType: "address",
            },
            {
                name: "erc20CoreIndex",
                type: "uint64",
                internalType: "uint64",
            },
            {
                name: "amountEVM",
                type: "uint256",
                internalType: "uint256",
            },
            {
                name: "decimalDiff",
                type: "int8",
                internalType: "int8",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "function",
        name: "transferFundsToUserOnCore",
        inputs: [
            {
                name: "erc20CoreIndex",
                type: "uint64",
                internalType: "uint64",
            },
            {
                name: "to",
                type: "address",
                internalType: "address",
            },
            {
                name: "amountCore",
                type: "uint64",
                internalType: "uint64",
            },
        ],
        outputs: [],
        stateMutability: "nonpayable",
    },
    {
        type: "error",
        name: "InvalidTif",
        inputs: [],
    },
    {
        type: "error",
        name: "LimitPxIsZero",
        inputs: [],
    },
    {
        type: "error",
        name: "OrderSizeIsZero",
        inputs: [],
    },
];
const _bytecode = " ";
const isSuperArgs = (xs) => xs.length > 1;
class SwapHandler__factory extends ethers_1.ContractFactory {
    constructor(...args) {
        if (isSuperArgs(args)) {
            super(...args);
        }
        else {
            super(_abi, _bytecode, args[0]);
        }
    }
    deploy(overrides) {
        return super.deploy(overrides || {});
    }
    getDeployTransaction(overrides) {
        return super.getDeployTransaction(overrides || {});
    }
    attach(address) {
        return super.attach(address);
    }
    connect(signer) {
        return super.connect(signer);
    }
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.SwapHandler__factory = SwapHandler__factory;
SwapHandler__factory.bytecode = _bytecode;
SwapHandler__factory.abi = _abi;
