import { AbiItem } from 'web3-utils';

export const izumiSwapContractAbi: AbiItem[] = [
    {
        inputs: [{ internalType: 'bytes[]', name: 'data', type: 'bytes[]' }],
        name: 'multicall',
        outputs: [{ internalType: 'bytes[]', name: 'results', type: 'bytes[]' }],
        stateMutability: 'payable',
        type: 'function'
    },
    {
        inputs: [
            { internalType: 'address', name: 'tokenX', type: 'address' },
            { internalType: 'address', name: 'tokenY', type: 'address' },
            { internalType: 'uint24', name: 'fee', type: 'uint24' }
        ],
        name: 'pool',
        outputs: [{ internalType: 'address', name: '', type: 'address' }],
        stateMutability: 'view',
        type: 'function'
    },
    { inputs: [], name: 'refundETH', outputs: [], stateMutability: 'payable', type: 'function' },
    {
        inputs: [
            {
                components: [
                    { internalType: 'bytes', name: 'path', type: 'bytes' },
                    { internalType: 'address', name: 'recipient', type: 'address' },
                    { internalType: 'uint128', name: 'amount', type: 'uint128' },
                    { internalType: 'uint256', name: 'minAcquired', type: 'uint256' },
                    { internalType: 'uint256', name: 'deadline', type: 'uint256' }
                ],
                internalType: 'struct Swap.SwapAmountParams',
                name: 'params',
                type: 'tuple'
            }
        ],
        name: 'swapAmount',
        outputs: [
            { internalType: 'uint256', name: 'cost', type: 'uint256' },
            { internalType: 'uint256', name: 'acquire', type: 'uint256' }
        ],
        stateMutability: 'payable',
        type: 'function'
    },
    {
        inputs: [
            {
                components: [
                    { internalType: 'bytes', name: 'path', type: 'bytes' },
                    { internalType: 'address', name: 'recipient', type: 'address' },
                    { internalType: 'uint128', name: 'desire', type: 'uint128' },
                    { internalType: 'uint256', name: 'maxPayed', type: 'uint256' },
                    { internalType: 'uint256', name: 'deadline', type: 'uint256' }
                ],
                internalType: 'struct Swap.SwapDesireParams',
                name: 'params',
                type: 'tuple'
            }
        ],
        name: 'swapDesire',
        outputs: [
            { internalType: 'uint256', name: 'cost', type: 'uint256' },
            { internalType: 'uint256', name: 'acquire', type: 'uint256' }
        ],
        stateMutability: 'payable',
        type: 'function'
    },
    {
        inputs: [
            {
                components: [
                    { internalType: 'address', name: 'tokenX', type: 'address' },
                    { internalType: 'address', name: 'tokenY', type: 'address' },
                    { internalType: 'uint24', name: 'fee', type: 'uint24' },
                    { internalType: 'int24', name: 'boundaryPt', type: 'int24' },
                    { internalType: 'address', name: 'recipient', type: 'address' },
                    { internalType: 'uint128', name: 'amount', type: 'uint128' },
                    { internalType: 'uint256', name: 'maxPayed', type: 'uint256' },
                    { internalType: 'uint256', name: 'minAcquired', type: 'uint256' },
                    { internalType: 'uint256', name: 'deadline', type: 'uint256' }
                ],
                internalType: 'struct Swap.SwapParams',
                name: 'swapParams',
                type: 'tuple'
            }
        ],
        name: 'swapX2Y',
        outputs: [],
        stateMutability: 'payable',
        type: 'function'
    },
    {
        inputs: [
            { internalType: 'uint256', name: 'x', type: 'uint256' },
            { internalType: 'uint256', name: 'y', type: 'uint256' },
            { internalType: 'bytes', name: 'data', type: 'bytes' }
        ],
        name: 'swapX2YCallback',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function'
    },
    {
        inputs: [
            {
                components: [
                    { internalType: 'address', name: 'tokenX', type: 'address' },
                    { internalType: 'address', name: 'tokenY', type: 'address' },
                    { internalType: 'uint24', name: 'fee', type: 'uint24' },
                    { internalType: 'int24', name: 'boundaryPt', type: 'int24' },
                    { internalType: 'address', name: 'recipient', type: 'address' },
                    { internalType: 'uint128', name: 'amount', type: 'uint128' },
                    { internalType: 'uint256', name: 'maxPayed', type: 'uint256' },
                    { internalType: 'uint256', name: 'minAcquired', type: 'uint256' },
                    { internalType: 'uint256', name: 'deadline', type: 'uint256' }
                ],
                internalType: 'struct Swap.SwapParams',
                name: 'swapParams',
                type: 'tuple'
            }
        ],
        name: 'swapX2YDesireY',
        outputs: [],
        stateMutability: 'payable',
        type: 'function'
    },
    {
        inputs: [
            {
                components: [
                    { internalType: 'address', name: 'tokenX', type: 'address' },
                    { internalType: 'address', name: 'tokenY', type: 'address' },
                    { internalType: 'uint24', name: 'fee', type: 'uint24' },
                    { internalType: 'int24', name: 'boundaryPt', type: 'int24' },
                    { internalType: 'address', name: 'recipient', type: 'address' },
                    { internalType: 'uint128', name: 'amount', type: 'uint128' },
                    { internalType: 'uint256', name: 'maxPayed', type: 'uint256' },
                    { internalType: 'uint256', name: 'minAcquired', type: 'uint256' },
                    { internalType: 'uint256', name: 'deadline', type: 'uint256' }
                ],
                internalType: 'struct Swap.SwapParams',
                name: 'swapParams',
                type: 'tuple'
            }
        ],
        name: 'swapY2X',
        outputs: [],
        stateMutability: 'payable',
        type: 'function'
    },
    {
        inputs: [
            { internalType: 'uint256', name: 'x', type: 'uint256' },
            { internalType: 'uint256', name: 'y', type: 'uint256' },
            { internalType: 'bytes', name: 'data', type: 'bytes' }
        ],
        name: 'swapY2XCallback',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function'
    },
    {
        inputs: [
            {
                components: [
                    { internalType: 'address', name: 'tokenX', type: 'address' },
                    { internalType: 'address', name: 'tokenY', type: 'address' },
                    { internalType: 'uint24', name: 'fee', type: 'uint24' },
                    { internalType: 'int24', name: 'boundaryPt', type: 'int24' },
                    { internalType: 'address', name: 'recipient', type: 'address' },
                    { internalType: 'uint128', name: 'amount', type: 'uint128' },
                    { internalType: 'uint256', name: 'maxPayed', type: 'uint256' },
                    { internalType: 'uint256', name: 'minAcquired', type: 'uint256' },
                    { internalType: 'uint256', name: 'deadline', type: 'uint256' }
                ],
                internalType: 'struct Swap.SwapParams',
                name: 'swapParams',
                type: 'tuple'
            }
        ],
        name: 'swapY2XDesireX',
        outputs: [],
        stateMutability: 'payable',
        type: 'function'
    },
    {
        inputs: [
            { internalType: 'address', name: 'token', type: 'address' },
            { internalType: 'uint256', name: 'minAmount', type: 'uint256' },
            { internalType: 'address', name: 'recipient', type: 'address' }
        ],
        name: 'sweepToken',
        outputs: [],
        stateMutability: 'payable',
        type: 'function'
    },
    {
        inputs: [
            { internalType: 'uint256', name: 'minAmount', type: 'uint256' },
            { internalType: 'address', name: 'recipient', type: 'address' }
        ],
        name: 'unwrapWETH9',
        outputs: [],
        stateMutability: 'payable',
        type: 'function'
    },
    { stateMutability: 'payable', type: 'receive' }
];
