[
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "_derivative",
                "type": "address"
            },
            {
                "internalType": "contract ISynthereumFinder",
                "name": "_finder",
                "type": "address"
            },
            {
                "internalType": "uint8",
                "name": "_version",
                "type": "uint8"
            },
            {
                "components": [
                    {
                        "internalType": "address",
                        "name": "admin",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "maintainer",
                        "type": "address"
                    },
                    {
                        "internalType": "address",
                        "name": "liquidityProvider",
                        "type": "address"
                    }
                ],
                "internalType": "struct ISynthereumPoolOnChainPriceFeed.Roles",
                "name": "_roles",
                "type": "tuple"
            },
            {
                "internalType": "uint256",
                "name": "_startingCollateralization",
                "type": "uint256"
            },
            {
                "components": [
                    {
                        "components": [
                            {
                                "internalType": "uint256",
                                "name": "rawValue",
                                "type": "uint256"
                            }
                        ],
                        "internalType": "struct FixedPoint.Unsigned",
                        "name": "feePercentage",
                        "type": "tuple"
                    },
                    {
                        "internalType": "address[]",
                        "name": "feeRecipients",
                        "type": "address[]"
                    },
                    {
                        "internalType": "uint32[]",
                        "name": "feeProportions",
                        "type": "uint32[]"
                    }
                ],
                "internalType": "struct ISynthereumPoolOnChainPriceFeed.Fee",
                "name": "_fee",
                "type": "tuple"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "constructor"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "pool",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "derivative",
                "type": "address"
            }
        ],
        "name": "AddDerivative",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "account",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "sourcePool",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "destPool",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "numTokensSent",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "destNumTokensReceived",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "feePaid",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "address",
                "name": "recipient",
                "type": "address"
            }
        ],
        "name": "Exchange",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "account",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "pool",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "collateralSent",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "numTokensReceived",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "feePaid",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "address",
                "name": "recipient",
                "type": "address"
            }
        ],
        "name": "Mint",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "account",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "pool",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "numTokensSent",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "collateralReceived",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "feePaid",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "address",
                "name": "recipient",
                "type": "address"
            }
        ],
        "name": "Redeem",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "pool",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "derivative",
                "type": "address"
            }
        ],
        "name": "RemoveDerivative",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            },
            {
                "indexed": true,
                "internalType": "bytes32",
                "name": "previousAdminRole",
                "type": "bytes32"
            },
            {
                "indexed": true,
                "internalType": "bytes32",
                "name": "newAdminRole",
                "type": "bytes32"
            }
        ],
        "name": "RoleAdminChanged",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "account",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "sender",
                "type": "address"
            }
        ],
        "name": "RoleGranted",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "account",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "sender",
                "type": "address"
            }
        ],
        "name": "RoleRevoked",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "feePercentage",
                "type": "uint256"
            }
        ],
        "name": "SetFeePercentage",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "internalType": "address[]",
                "name": "feeRecipients",
                "type": "address[]"
            },
            {
                "indexed": false,
                "internalType": "uint32[]",
                "name": "feeProportions",
                "type": "uint32[]"
            }
        ],
        "name": "SetFeeRecipients",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "account",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "pool",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "numTokens",
                "type": "uint256"
            },
            {
                "indexed": false,
                "internalType": "uint256",
                "name": "collateralSettled",
                "type": "uint256"
            }
        ],
        "name": "Settlement",
        "type": "event"
    },
    {
        "inputs": [],
        "name": "DEFAULT_ADMIN_ROLE",
        "outputs": [
            {
                "internalType": "bytes32",
                "name": "",
                "type": "bytes32"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "LIQUIDITY_PROVIDER_ROLE",
        "outputs": [
            {
                "internalType": "bytes32",
                "name": "",
                "type": "bytes32"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "MAINTAINER_ROLE",
        "outputs": [
            {
                "internalType": "bytes32",
                "name": "",
                "type": "bytes32"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "derivative",
                "type": "address"
            }
        ],
        "name": "addDerivative",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "collateralAmount",
                "type": "uint256"
            }
        ],
        "name": "calculateFee",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "fee",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "collateralToken",
        "outputs": [
            {
                "internalType": "contract IERC20",
                "name": "collateralCurrency",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "derivative",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "collateralAmount",
                "type": "uint256"
            }
        ],
        "name": "depositIntoDerivative",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "components": [
                    {
                        "internalType": "contract IDerivative",
                        "name": "derivative",
                        "type": "address"
                    },
                    {
                        "internalType": "contract ISynthereumPoolGeneral",
                        "name": "destPool",
                        "type": "address"
                    },
                    {
                        "internalType": "contract IDerivative",
                        "name": "destDerivative",
                        "type": "address"
                    },
                    {
                        "internalType": "uint256",
                        "name": "numTokens",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "minDestNumTokens",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "feePercentage",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "expiration",
                        "type": "uint256"
                    },
                    {
                        "internalType": "address",
                        "name": "recipient",
                        "type": "address"
                    }
                ],
                "internalType": "struct ISynthereumPoolOnChainPriceFeed.ExchangeParams",
                "name": "exchangeParams",
                "type": "tuple"
            }
        ],
        "name": "exchange",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "destNumTokensMinted",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "feePaid",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "srcDerivative",
                "type": "address"
            },
            {
                "internalType": "contract IDerivative",
                "name": "derivative",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "collateralAmount",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "numTokens",
                "type": "uint256"
            }
        ],
        "name": "exchangeMint",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "derivative",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "collateralAmount",
                "type": "uint256"
            }
        ],
        "name": "fastWithdraw",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "amountWithdrawn",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getAllDerivatives",
        "outputs": [
            {
                "internalType": "contract IDerivative[]",
                "name": "",
                "type": "address[]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getFeeInfo",
        "outputs": [
            {
                "components": [
                    {
                        "components": [
                            {
                                "internalType": "uint256",
                                "name": "rawValue",
                                "type": "uint256"
                            }
                        ],
                        "internalType": "struct FixedPoint.Unsigned",
                        "name": "feePercentage",
                        "type": "tuple"
                    },
                    {
                        "internalType": "address[]",
                        "name": "feeRecipients",
                        "type": "address[]"
                    },
                    {
                        "internalType": "uint32[]",
                        "name": "feeProportions",
                        "type": "uint32[]"
                    }
                ],
                "internalType": "struct ISynthereumPoolOnChainPriceFeed.Fee",
                "name": "fee",
                "type": "tuple"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getPriceFeedIdentifier",
        "outputs": [
            {
                "internalType": "bytes32",
                "name": "identifier",
                "type": "bytes32"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            }
        ],
        "name": "getRoleAdmin",
        "outputs": [
            {
                "internalType": "bytes32",
                "name": "",
                "type": "bytes32"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            },
            {
                "internalType": "uint256",
                "name": "index",
                "type": "uint256"
            }
        ],
        "name": "getRoleMember",
        "outputs": [
            {
                "internalType": "address",
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            }
        ],
        "name": "getRoleMemberCount",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "getStartingCollateralization",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "startingCollateralRatio",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            },
            {
                "internalType": "address",
                "name": "account",
                "type": "address"
            }
        ],
        "name": "grantRole",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            },
            {
                "internalType": "address",
                "name": "account",
                "type": "address"
            }
        ],
        "name": "hasRole",
        "outputs": [
            {
                "internalType": "bool",
                "name": "",
                "type": "bool"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address",
                "name": "derivative",
                "type": "address"
            }
        ],
        "name": "isDerivativeAdmitted",
        "outputs": [
            {
                "internalType": "bool",
                "name": "isAdmitted",
                "type": "bool"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "components": [
                    {
                        "internalType": "contract IDerivative",
                        "name": "derivative",
                        "type": "address"
                    },
                    {
                        "internalType": "uint256",
                        "name": "minNumTokens",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "collateralAmount",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "feePercentage",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "expiration",
                        "type": "uint256"
                    },
                    {
                        "internalType": "address",
                        "name": "recipient",
                        "type": "address"
                    }
                ],
                "internalType": "struct ISynthereumPoolOnChainPriceFeed.MintParams",
                "name": "mintParams",
                "type": "tuple"
            }
        ],
        "name": "mint",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "syntheticTokensMinted",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "feePaid",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "components": [
                    {
                        "internalType": "contract IDerivative",
                        "name": "derivative",
                        "type": "address"
                    },
                    {
                        "internalType": "uint256",
                        "name": "numTokens",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "minCollateral",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "feePercentage",
                        "type": "uint256"
                    },
                    {
                        "internalType": "uint256",
                        "name": "expiration",
                        "type": "uint256"
                    },
                    {
                        "internalType": "address",
                        "name": "recipient",
                        "type": "address"
                    }
                ],
                "internalType": "struct ISynthereumPoolOnChainPriceFeed.RedeemParams",
                "name": "redeemParams",
                "type": "tuple"
            }
        ],
        "name": "redeem",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "collateralRedeemed",
                "type": "uint256"
            },
            {
                "internalType": "uint256",
                "name": "feePaid",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "derivative",
                "type": "address"
            }
        ],
        "name": "removeDerivative",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            },
            {
                "internalType": "address",
                "name": "account",
                "type": "address"
            }
        ],
        "name": "renounceRole",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "role",
                "type": "bytes32"
            },
            {
                "internalType": "address",
                "name": "account",
                "type": "address"
            }
        ],
        "name": "revokeRole",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "components": [
                    {
                        "components": [
                            {
                                "internalType": "uint256",
                                "name": "rawValue",
                                "type": "uint256"
                            }
                        ],
                        "internalType": "struct FixedPoint.Unsigned",
                        "name": "feePercentage",
                        "type": "tuple"
                    },
                    {
                        "internalType": "address[]",
                        "name": "feeRecipients",
                        "type": "address[]"
                    },
                    {
                        "internalType": "uint32[]",
                        "name": "feeProportions",
                        "type": "uint32[]"
                    }
                ],
                "internalType": "struct ISynthereumPoolOnChainPriceFeed.Fee",
                "name": "_fee",
                "type": "tuple"
            }
        ],
        "name": "setFee",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "_feePercentage",
                "type": "uint256"
            }
        ],
        "name": "setFeePercentage",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "address[]",
                "name": "_feeRecipients",
                "type": "address[]"
            },
            {
                "internalType": "uint32[]",
                "name": "_feeProportions",
                "type": "uint32[]"
            }
        ],
        "name": "setFeeRecipients",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "startingCollateralRatio",
                "type": "uint256"
            }
        ],
        "name": "setStartingCollateralization",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "derivative",
                "type": "address"
            }
        ],
        "name": "settleEmergencyShutdown",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "amountSettled",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "derivative",
                "type": "address"
            }
        ],
        "name": "slowWithdrawPassedRequest",
        "outputs": [
            {
                "internalType": "uint256",
                "name": "amountWithdrawn",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "contract IDerivative",
                "name": "derivative",
                "type": "address"
            },
            {
                "internalType": "uint256",
                "name": "collateralAmount",
                "type": "uint256"
            }
        ],
        "name": "slowWithdrawRequest",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "synthereumFinder",
        "outputs": [
            {
                "internalType": "contract ISynthereumFinder",
                "name": "finder",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "syntheticToken",
        "outputs": [
            {
                "internalType": "contract IERC20",
                "name": "syntheticCurrency",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "syntheticTokenSymbol",
        "outputs": [
            {
                "internalType": "string",
                "name": "symbol",
                "type": "string"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "version",
        "outputs": [
            {
                "internalType": "uint8",
                "name": "poolVersion",
                "type": "uint8"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "internalType": "uint256",
                "name": "collateralAmount",
                "type": "uint256"
            }
        ],
        "name": "withdrawFromPool",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    }
]
