[
    { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
    {
        "inputs": [
            { "internalType": "address", "name": "target", "type": "address" }
        ],
        "name": "AddressEmptyCode",
        "type": "error"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "account", "type": "address" }
        ],
        "name": "AddressInsufficientBalance",
        "type": "error"
    },
    { "inputs": [], "name": "AmountIsZero", "type": "error" },
    { "inputs": [], "name": "AmountTooBig", "type": "error" },
    { "inputs": [], "name": "AmountTooLow", "type": "error" },
    { "inputs": [], "name": "ApprovalFailed", "type": "error" },
    { "inputs": [], "name": "CBRIsNull", "type": "error" },
    { "inputs": [], "name": "CBRIsTooHigh", "type": "error" },
    { "inputs": [], "name": "EnforcedPause", "type": "error" },
    { "inputs": [], "name": "ExpectedPause", "type": "error" },
    {
        "inputs": [
            { "internalType": "uint256", "name": "deadline", "type": "uint256" }
        ],
        "name": "ExpiredSignature",
        "type": "error"
    },
    { "inputs": [], "name": "FailedInnerCall", "type": "error" },
    {
        "inputs": [
            { "internalType": "address", "name": "account", "type": "address" },
            { "internalType": "uint256", "name": "currentNonce", "type": "uint256" }
        ],
        "name": "InvalidAccountNonce",
        "type": "error"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "approvalDeadline",
                "type": "uint256"
            },
            { "internalType": "uint256", "name": "intentDeadline", "type": "uint256" }
        ],
        "name": "InvalidDeadline",
        "type": "error"
    },
    { "inputs": [], "name": "InvalidInitialization", "type": "error" },
    {
        "inputs": [
            { "internalType": "address", "name": "account", "type": "address" },
            { "internalType": "uint256", "name": "amount", "type": "uint256" }
        ],
        "name": "InvalidOrderAmount",
        "type": "error"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "owner", "type": "address" }
        ],
        "name": "InvalidSigner",
        "type": "error"
    },
    { "inputs": [], "name": "InvalidToken", "type": "error" },
    { "inputs": [], "name": "MathOverflowedMulDiv", "type": "error" },
    { "inputs": [], "name": "NoOrdersIdsProvided", "type": "error" },
    { "inputs": [], "name": "NotAuthorized", "type": "error" },
    { "inputs": [], "name": "NotInitializing", "type": "error" },
    { "inputs": [], "name": "NullContract", "type": "error" },
    { "inputs": [], "name": "RedeemFeeTooBig", "type": "error" },
    { "inputs": [], "name": "RedeemMustBePaused", "type": "error" },
    { "inputs": [], "name": "RedeemMustNotBePaused", "type": "error" },
    { "inputs": [], "name": "ReentrancyGuardReentrantCall", "type": "error" },
    {
        "inputs": [
            { "internalType": "address", "name": "token", "type": "address" }
        ],
        "name": "SafeERC20FailedOperation",
        "type": "error"
    },
    { "inputs": [], "name": "SameValue", "type": "error" },
    { "inputs": [], "name": "SwapMustBePaused", "type": "error" },
    { "inputs": [], "name": "SwapMustNotBePaused", "type": "error" },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "cbrCoef",
                "type": "uint256"
            }
        ],
        "name": "CBRActivated",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [],
        "name": "CBRDeactivated",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [],
        "name": "EIP712DomainChanged",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint64",
                "name": "version",
                "type": "uint64"
            }
        ],
        "name": "Initialized",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "owner",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "uint256",
                "name": "nonce",
                "type": "uint256"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "tokenSwapped",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "totalAmountInTokenDecimals",
                "type": "uint256"
            }
        ],
        "name": "IntentConsumed",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "owner",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "uint256",
                "name": "nonce",
                "type": "uint256"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "tokenSwapped",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amountInTokenDecimals",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amountInUSD",
                "type": "uint256"
            }
        ],
        "name": "IntentMatched",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "signer",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "uint256",
                "name": "nonceInvalidated",
                "type": "uint256"
            }
        ],
        "name": "NonceInvalidated",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "newThreshold",
                "type": "uint256"
            }
        ],
        "name": "NonceThresholdSet",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "address",
                "name": "account",
                "type": "address"
            }
        ],
        "name": "Paused",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "redeemer",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "rwaToken",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amountRedeemed",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "returnedRwaAmount",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "stableFeeAmount",
                "type": "uint256"
            }
        ],
        "name": "Redeem",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "redeemFee",
                "type": "uint256"
            }
        ],
        "name": "RedeemFeeUpdated",
        "type": "event"
    },
    { "anonymous": false, "inputs": [], "name": "RedeemPaused", "type": "event" },
    {
        "anonymous": false,
        "inputs": [],
        "name": "RedeemUnPaused",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "owner",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "tokenSwapped",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amount",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "amountInUSD",
                "type": "uint256"
            }
        ],
        "name": "Swap",
        "type": "event"
    },
    { "anonymous": false, "inputs": [], "name": "SwapPaused", "type": "event" },
    { "anonymous": false, "inputs": [], "name": "SwapUnPaused", "type": "event" },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "address",
                "name": "account",
                "type": "address"
            }
        ],
        "name": "Unpaused",
        "type": "event"
    },
    {
        "inputs": [],
        "name": "DOMAIN_SEPARATOR",
        "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "DaoCollateralStorageV0Location",
        "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint256", "name": "coefficient", "type": "uint256" }
        ],
        "name": "activateCBR",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "cbrCoef",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "deactivateCBR",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "eip712Domain",
        "outputs": [
            { "internalType": "bytes1", "name": "fields", "type": "bytes1" },
            { "internalType": "string", "name": "name", "type": "string" },
            { "internalType": "string", "name": "version", "type": "string" },
            { "internalType": "uint256", "name": "chainId", "type": "uint256" },
            {
                "internalType": "address",
                "name": "verifyingContract",
                "type": "address"
            },
            { "internalType": "bytes32", "name": "salt", "type": "bytes32" },
            { "internalType": "uint256[]", "name": "extensions", "type": "uint256[]" }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "_registryContract",
                "type": "address"
            },
            { "internalType": "uint256", "name": "_redeemFee", "type": "uint256" }
        ],
        "name": "initialize",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "_registryContract",
                "type": "address"
            }
        ],
        "name": "initializeV1",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "invalidateNonce",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint256", "name": "newNonce", "type": "uint256" }
        ],
        "name": "invalidateUpToNonce",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "isCBROn",
        "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "isRedeemPaused",
        "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "isSwapPaused",
        "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "nonceThreshold",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "owner", "type": "address" }
        ],
        "name": "nonces",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "owner", "type": "address" }
        ],
        "name": "orderAmountTakenCurrentNonce",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "pause",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "pauseRedeem",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "pauseSwap",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "paused",
        "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "rwaToken", "type": "address" },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            { "internalType": "uint256", "name": "minAmountOut", "type": "uint256" }
        ],
        "name": "redeem",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "rwaToken", "type": "address" },
            { "internalType": "uint256", "name": "amount", "type": "uint256" }
        ],
        "name": "redeemDao",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "redeemFee",
        "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint256", "name": "threshold", "type": "uint256" }
        ],
        "name": "setNonceThreshold",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "uint256", "name": "_redeemFee", "type": "uint256" }
        ],
        "name": "setRedeemFee",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "rwaToken", "type": "address" },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            { "internalType": "uint256", "name": "minAmountOut", "type": "uint256" }
        ],
        "name": "swap",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "rwaToken", "type": "address" },
            {
                "internalType": "uint256",
                "name": "amountInTokenDecimals",
                "type": "uint256"
            },
            { "internalType": "bool", "name": "partialMatching", "type": "bool" },
            {
                "internalType": "uint256[]",
                "name": "orderIdsToTake",
                "type": "uint256[]"
            },
            {
                "components": [
                    { "internalType": "uint256", "name": "deadline", "type": "uint256" },
                    { "internalType": "uint8", "name": "v", "type": "uint8" },
                    { "internalType": "bytes32", "name": "r", "type": "bytes32" },
                    { "internalType": "bytes32", "name": "s", "type": "bytes32" }
                ],
                "internalType": "struct Approval",
                "name": "approval",
                "type": "tuple"
            }
        ],
        "name": "swapRWAtoStbc",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256[]",
                "name": "orderIdsToTake",
                "type": "uint256[]"
            },
            {
                "components": [
                    { "internalType": "uint256", "name": "deadline", "type": "uint256" },
                    { "internalType": "uint8", "name": "v", "type": "uint8" },
                    { "internalType": "bytes32", "name": "r", "type": "bytes32" },
                    { "internalType": "bytes32", "name": "s", "type": "bytes32" }
                ],
                "internalType": "struct Approval",
                "name": "approval",
                "type": "tuple"
            },
            {
                "components": [
                    { "internalType": "address", "name": "recipient", "type": "address" },
                    { "internalType": "address", "name": "rwaToken", "type": "address" },
                    {
                        "internalType": "uint256",
                        "name": "amountInTokenDecimals",
                        "type": "uint256"
                    },
                    { "internalType": "uint256", "name": "deadline", "type": "uint256" },
                    { "internalType": "bytes", "name": "signature", "type": "bytes" }
                ],
                "internalType": "struct Intent",
                "name": "intent",
                "type": "tuple"
            },
            { "internalType": "bool", "name": "partialMatching", "type": "bool" }
        ],
        "name": "swapRWAtoStbcIntent",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            { "internalType": "address", "name": "rwaToken", "type": "address" },
            { "internalType": "uint256", "name": "amount", "type": "uint256" },
            { "internalType": "uint256", "name": "minAmountOut", "type": "uint256" },
            { "internalType": "uint256", "name": "deadline", "type": "uint256" },
            { "internalType": "uint8", "name": "v", "type": "uint8" },
            { "internalType": "bytes32", "name": "r", "type": "bytes32" },
            { "internalType": "bytes32", "name": "s", "type": "bytes32" }
        ],
        "name": "swapWithPermit",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "unpause",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "unpauseRedeem",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "unpauseSwap",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    }
]
