{"compiler":{"version":"0.6.10+commit.00c0fcaf"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"contract IController","name":"_controller","type":"address"},{"internalType":"contract IWETH","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_component","type":"address"},{"indexed":false,"internalType":"string","name":"_newExchangeName","type":"string"}],"name":"AssetExchangeExecutionParamUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_component","type":"address"},{"indexed":false,"internalType":"string","name":"_newWrapAdapterName","type":"string"},{"indexed":false,"internalType":"address","name":"_newUnderlyingToken","type":"address"}],"name":"AssetWrapExecutionParamUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_ckToken","type":"address"},{"indexed":false,"internalType":"address","name":"_issuer","type":"address"},{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"address","name":"_hookContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"_ckMintQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_issuedTokenReturned","type":"uint256"}],"name":"CKTokenIssued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_ckToken","type":"address"},{"indexed":false,"internalType":"address","name":"_redeemer","type":"address"},{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"CKTokenRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract ICKToken","name":"_ckToken","type":"address"},{"indexed":true,"internalType":"address","name":"_sendToken","type":"address"},{"indexed":true,"internalType":"address","name":"_receiveToken","type":"address"},{"indexed":false,"internalType":"contract IExchangeAdapter","name":"_exchangeAdapter","type":"address"},{"indexed":false,"internalType":"uint256","name":"_totalSendAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_totalReceiveAmount","type":"uint256"}],"name":"ComponentExchanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract ICKToken","name":"_ckToken","type":"address"},{"indexed":true,"internalType":"address","name":"_underlyingToken","type":"address"},{"indexed":true,"internalType":"address","name":"_wrappedToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_underlyingQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_wrappedQuantity","type":"uint256"},{"indexed":false,"internalType":"string","name":"_integrationName","type":"string"}],"name":"ComponentUnwrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract ICKToken","name":"_ckToken","type":"address"},{"indexed":true,"internalType":"address","name":"_underlyingToken","type":"address"},{"indexed":true,"internalType":"address","name":"_wrappedToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_underlyingQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_wrappedQuantity","type":"uint256"},{"indexed":false,"internalType":"string","name":"_integrationName","type":"string"}],"name":"ComponentWrapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"controller","outputs":[{"internalType":"contract IController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"exchangeInfo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ICKToken","name":"_ckToken","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bool","name":"_isIssue","type":"bool"}],"name":"getRequiredComponentIssuanceUnits","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ICKToken","name":"_ckToken","type":"address"},{"internalType":"contract IManagerIssuanceHook","name":"_preIssueHook","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICKToken","name":"_ckToken","type":"address"},{"internalType":"uint256","name":"_minCkTokenRec","type":"uint256"},{"internalType":"address[]","name":"_midTokens","type":"address[]"},{"internalType":"uint256[]","name":"_weightings","type":"uint256[]"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bool","name":"_returnDust","type":"bool"}],"name":"issueWithEther2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract ICKToken","name":"_ckToken","type":"address"},{"internalType":"address","name":"_issueToken","type":"address"},{"internalType":"uint256","name":"_issueTokenQuantity","type":"uint256"},{"internalType":"uint256","name":"_minCkTokenRec","type":"uint256"},{"internalType":"address[]","name":"_midTokens","type":"address[]"},{"internalType":"uint256[]","name":"_weightings","type":"uint256[]"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bool","name":"_returnDust","type":"bool"}],"name":"issueWithSingleToken2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICKToken","name":"","type":"address"}],"name":"managerIssuanceHook","outputs":[{"internalType":"contract IManagerIssuanceHook","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ICKToken","name":"_ckToken","type":"address"},{"internalType":"uint256","name":"_ckTokenQuantity","type":"uint256"},{"internalType":"address","name":"_redeemToken","type":"address"},{"internalType":"address[]","name":"_midTokens","type":"address[]"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_minRedeemTokenToRec","type":"uint256"}],"name":"redeemToSingleToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_components","type":"address[]"},{"internalType":"string[]","name":"_exchangeNames","type":"string[]"}],"name":"setExchanges","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_components","type":"address[]"},{"internalType":"string[]","name":"_wrapAdapterNames","type":"string[]"},{"internalType":"address[]","name":"_underlyingTokens","type":"address[]"}],"name":"setWrapAdapters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"wrapInfo","outputs":[{"internalType":"string","name":"wrapAdapterName","type":"string"},{"internalType":"address","name":"underlyingToken","type":"address"}],"stateMutability":"view","type":"function"}],"devdoc":{"author":"Cook Finance The IssuanceModule is a module that enables users to issue and redeem CKTokens that contain default and  non-debt external Positions. Managers are able to set an external contract hook that is called before an issuance is called.","methods":{"getRequiredComponentIssuanceUnits(address,uint256,bool)":{"params":{"_ckToken":"Instance of the CKToken to issue","_isIssue":"Boolean whether the quantity is issuance or redemption","_quantity":"Quantity of CKToken to issue"},"returns":{"_0":"address[]            List of component addresses","_1":"uint256[]            List of component units required for a given CKToken quantity"}},"initialize(address,address)":{"params":{"_ckToken":"Instance of the CKToken to issue","_preIssueHook":"Instance of the Manager Contract with the Pre-Issuance Hook function"}},"issueWithEther2(address,uint256,address[],uint256[],address,bool)":{"params":{"_ckToken":"Instance of the CKToken contract","_midTokens":"The mid tokens in swap route","_minCkTokenRec":"The minimum amount of CKToken to receive","_returnDust":"If to return left components","_to":"Address to mint CKToken to","_weightings":"Eth distribution for each component"}},"issueWithSingleToken2(address,address,uint256,uint256,address[],uint256[],address,bool)":{"params":{"_ckToken":"Instance of the CKToken contract","_issueToken":"token used to issue with","_issueTokenQuantity":"amount of issue tokens","_midTokens":"The mid tokens in swap route","_minCkTokenRec":"The minimum amount of CKToken to receive","_returnDust":"If to return left components","_to":"Address to mint CKToken to","_weightings":"Eth distribution for each component"}},"owner()":{"details":"Returns the address of the current owner."},"redeemToSingleToken(address,uint256,address,address[],address,uint256)":{"params":{"_ckToken":"Instance of the CKToken contract","_ckTokenQuantity":"Quantity of the CKToken to redeem","_midTokens":"The mid tokens in swap route","_minRedeemTokenToRec":"Minimum redeem to to receive","_redeemToken":"Address of redeem token","_to":"Address to redeem CKToken to"}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"setExchanges(address[],string[])":{"params":{"_components":"Array of components","_exchangeNames":"Array of exchange names mapping to correct component"}},"setWrapAdapters(address[],string[],address[])":{"params":{"_components":"Array of components","_underlyingTokens":"Array of underlying tokens mapping to correct component","_wrapAdapterNames":"Array of wrap adapter names mapping to correct component"}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"title":"IssuanceModule"},"userdoc":{"methods":{"constructor":"Set state controller state variable","getRequiredComponentIssuanceUnits(address,uint256,bool)":{"notice":"Retrieves the addresses and units required to issue/redeem a particular quantity of CKToken."},"initialize(address,address)":{"notice":"Initializes this module to the CKToken with issuance-related hooks. Only callable by the CKToken's manager. Hook addresses are optional. Address(0) means that no hook will be called"},"issueWithEther2(address,uint256,address[],uint256[],address,bool)":{"notice":"Issue ckToken with a specified amount of Eth. "},"issueWithSingleToken2(address,address,uint256,uint256,address[],uint256[],address,bool)":{"notice":"Issue ckToken with a specified amount of a single asset with specification"},"redeemToSingleToken(address,uint256,address,address[],address,uint256)":{"notice":"Burns a user's CKToken of specified quantity, unwinds external positions, and exchange components to the specified token and return to the specified address. Does not work for debt/negative external positions."},"removeModule()":{"notice":"Removes this module from the CKToken, via call by the CKToken. Left with empty logic here because there are no check needed to verify removal."},"setExchanges(address[],string[])":{"notice":"OWNER ONLY: Set exchange for passed components of the CKToken. Can be called at anytime."},"setWrapAdapters(address[],string[],address[])":{"notice":"OWNER ONLY: Set wrap adapters for passed components of the CKToken. Can be called at anytime."}}}},"settings":{"compilationTarget":{"IssuanceModuleV2.sol":"IssuanceModuleV2"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"remappings":[]},"sources":{"IssuanceModuleV2.sol":{"keccak256":"0x95f64b0c36358d5ab4b44a8217a52d8c03674874b4c5e28a7229f960bc4c3691","license":"MIT","urls":["bzz-raw://892ed9e32dd6949ba4b51f72234e5865fc2440b9966f20fbe02937ef2f01a721","dweb:/ipfs/QmU3NcMySSGZo4jJ9WGEW9t3AGB6usyxdK1McV7BUnN3XQ"]}},"version":1}