Gelato-automations/deployments/mainnet/ConnectGelatoDataFullRefinanceMaker.json

161 lines
78 KiB
JSON

{
"address": "0xbBC0D2f339FA222e42d56BA8918125743fDcE072",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "address",
"name": "connectGelatoProviderPayment",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "connectorID",
"outputs": [
{
"internalType": "uint256",
"name": "_type",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_vaultId",
"type": "uint256"
},
{
"internalType": "address",
"name": "_colToken",
"type": "address"
}
],
"name": "getDataAndCastMakerToCompound",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_vaultAId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_vaultBId",
"type": "uint256"
},
{
"internalType": "address",
"name": "_colToken",
"type": "address"
},
{
"internalType": "string",
"name": "_colType",
"type": "string"
}
],
"name": "getDataAndCastMakerToMaker",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0x5e479484f328bfca1abebd07bb64dd1a8ad33729114d7c864d9a77b6f7c7926c",
"receipt": {
"to": null,
"from": "0xe1F076849B781b1395Fd332dC1758Dbc129be6EC",
"contractAddress": "0xbBC0D2f339FA222e42d56BA8918125743fDcE072",
"transactionIndex": 181,
"gasUsed": "1951563",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xdf0f59000003e7ff6daafd5e1a4a9d52d529cc14b268f7b91a91b2f4d5d9912a",
"transactionHash": "0x5e479484f328bfca1abebd07bb64dd1a8ad33729114d7c864d9a77b6f7c7926c",
"logs": [],
"blockNumber": 11274058,
"cumulativeGasUsed": "12064603",
"status": 1,
"byzantium": true
},
"args": [53, "0xc65C7f3cb264b181810D3E86291639F0811Acf1E"],
"solcInputHash": "d1d4184366927728b52537856ecb8f22",
"metadata": "{\"compiler\":{\"version\":\"0.7.4+commit.3f05b770\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"connectGelatoProviderPayment\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"connectorID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_type\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vaultId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_colToken\",\"type\":\"address\"}],\"name\":\"getDataAndCastMakerToCompound\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vaultAId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_vaultBId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_colToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_colType\",\"type\":\"string\"}],\"name\":\"getDataAndCastMakerToMaker\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"connectorID()\":{\"details\":\"Connector Details\"},\"getDataAndCastMakerToCompound(uint256,address)\":{\"details\":\"payable to be compatible in conjunction with DSA.cast payable target\",\"params\":{\"_colToken\":\"vault's col token address .\",\"_vaultId\":\"Id of the unsafe vault of the client.\"}},\"getDataAndCastMakerToMaker(uint256,uint256,address,string)\":{\"details\":\"payable to be compatible in conjunction with DSA.cast payable target\",\"params\":{\"_colToken\":\"vault's col token address .\",\"_colType\":\"colType of the new vault. example : ETH-B, ETH-A.\",\"_vaultAId\":\"Id of the unsafe vault of the client of Vault A Collateral.\",\"_vaultBId\":\"Id of the vault B Collateral of the client.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getDataAndCastMakerToCompound(uint256,address)\":{\"notice\":\"Entry Point for DSA.cast DebtBridge from Maker to Compound\"},\"getDataAndCastMakerToMaker(uint256,uint256,address,string)\":{\"notice\":\"Entry Point for DSA.cast DebtBridge from e.g ETH-A to ETH-B\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts/connectors/ConnectGelatoDataFullRefinanceMaker.sol\":\"ConnectGelatoDataFullRefinanceMaker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/constants/CDebtBridge.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nfunction GAS_COSTS_FOR_FULL_REFINANCE() pure returns (uint256[4] memory) {\\n return [uint256(2519000), 3140500, 3971000, 4345000];\\n}\\n\",\"keccak256\":\"0x4c1d06084af7595096eab19ea6598ff8b795c024f682912fbdc97590a2840e78\",\"license\":\"UNLICENSED\"},\"contracts/constants/CGelato.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {\\n IGelatoGasPriceOracle\\n} from \\\"../interfaces/gelato/IGelatoGasPriceOracle.sol\\\";\\n\\nIGelatoGasPriceOracle constant GELATO_GAS_PRICE_ORACLE = IGelatoGasPriceOracle(\\n 0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C\\n);\\n\",\"keccak256\":\"0xc74081014a09fb9211119b434c31dc97a3a937b13b45de9f9abcebfb56c7e9ba\",\"license\":\"UNLICENSED\"},\"contracts/constants/CInstaDapp.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\n// InstaDapp\\naddress constant INSTA_MEMORY = 0x8a5419CfC711B2343c17a6ABf4B2bAFaBb06957F;\\n\\n// Connectors\\naddress constant CONNECT_MAKER = 0xac02030d8a8F49eD04b2f52C394D3F901A10F8A9;\\naddress constant CONNECT_COMPOUND = 0x07F81230d73a78f63F0c2A3403AD281b067d28F8;\\naddress constant INSTA_POOL_V2 = 0x3150e5A805577366816A1ddc7330c6Ea17070c05;\\n\\n// Tokens\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\naddress constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\\n\\n// Insta Pool\\naddress constant INSTA_POOL_RESOLVER = 0xa004a5afBa04b74037E9E52bA1f7eb02b5E61509;\\nuint256 constant ROUTE_1_TOLERANCE = 1005e15;\\n\",\"keccak256\":\"0x1c980f6b4c33fa08844f7b1d72c0ef1a8a9294548ceb091c7bfeaa06c8774578\",\"license\":\"UNLICENSED\"},\"contracts/constants/CMaker.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\naddress constant MCD_MANAGER = 0x5ef30b9986345249bc32d8928B7ee64DE9435E39;\\n\",\"keccak256\":\"0x216362392e679feeaebba65883e7ab77e5a96e1a881f9305d83f3d3881fbddc4\",\"license\":\"UNLICENSED\"},\"contracts/contracts/connectors/ConnectGelatoDataFullRefinanceMaker.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\npragma experimental ABIEncoderV2;\\n\\nimport {GelatoBytes} from \\\"../../lib/GelatoBytes.sol\\\";\\nimport {sub} from \\\"../../vendor/DSMath.sol\\\";\\nimport {\\n AccountInterface,\\n ConnectorInterface\\n} from \\\"../../interfaces/InstaDapp/IInstaDapp.sol\\\";\\nimport {\\n IConnectInstaPoolV2\\n} from \\\"../../interfaces/InstaDapp/connectors/IConnectInstaPoolV2.sol\\\";\\nimport {\\n DAI,\\n CONNECT_MAKER,\\n CONNECT_COMPOUND,\\n INSTA_POOL_V2\\n} from \\\"../../constants/CInstaDapp.sol\\\";\\nimport {\\n _getMakerVaultDebt,\\n _getMakerVaultCollateralBalance\\n} from \\\"../../functions/dapps/FMaker.sol\\\";\\nimport {\\n _encodeFlashPayback\\n} from \\\"../../functions/InstaDapp/connectors/FInstaPoolV2.sol\\\";\\nimport {\\n _encodePaybackMakerVault,\\n _encodedWithdrawMakerVault,\\n _encodeOpenMakerVault,\\n _encodedDepositMakerVault,\\n _encodeBorrowMakerVault\\n} from \\\"../../functions/InstaDapp/connectors/FConnectMaker.sol\\\";\\nimport {\\n _encodePayGelatoProvider\\n} from \\\"../../functions/InstaDapp/connectors/FConnectGelatoProviderPayment.sol\\\";\\nimport {\\n _encodeDepositCompound,\\n _encodeBorrowCompound\\n} from \\\"../../functions/InstaDapp/connectors/FConnectCompound.sol\\\";\\nimport {_getGelatoProviderFees} from \\\"../../functions/gelato/FGelato.sol\\\";\\nimport {\\n _getFlashLoanRoute,\\n _getGasCostMakerToMaker,\\n _getGasCostMakerToCompound,\\n _getRealisedDebt\\n} from \\\"../../functions/gelato/FGelatoDebtBridge.sol\\\";\\n\\ncontract ConnectGelatoDataFullRefinanceMaker is ConnectorInterface {\\n using GelatoBytes for bytes;\\n\\n // solhint-disable const-name-snakecase\\n string public constant override name =\\n \\\"ConnectGelatoDataFullRefinanceMaker-v1.0\\\";\\n uint256 internal immutable _id;\\n address internal immutable _connectGelatoProviderPayment;\\n\\n constructor(uint256 id, address connectGelatoProviderPayment) {\\n _id = id;\\n _connectGelatoProviderPayment = connectGelatoProviderPayment;\\n }\\n\\n /// @dev Connector Details\\n function connectorID()\\n external\\n view\\n override\\n returns (uint256 _type, uint256 id)\\n {\\n (_type, id) = (1, _id); // Should put specific value.\\n }\\n\\n /// @notice Entry Point for DSA.cast DebtBridge from e.g ETH-A to ETH-B\\n /// @dev payable to be compatible in conjunction with DSA.cast payable target\\n /// @param _vaultAId Id of the unsafe vault of the client of Vault A Collateral.\\n /// @param _vaultBId Id of the vault B Collateral of the client.\\n /// @param _colToken vault's col token address .\\n /// @param _colType colType of the new vault. example : ETH-B, ETH-A.\\n function getDataAndCastMakerToMaker(\\n uint256 _vaultAId,\\n uint256 _vaultBId,\\n address _colToken,\\n string calldata _colType\\n ) external payable {\\n (address[] memory targets, bytes[] memory datas) =\\n _dataMakerToMaker(_vaultAId, _vaultBId, _colToken, _colType);\\n\\n _cast(targets, datas);\\n }\\n\\n /// @notice Entry Point for DSA.cast DebtBridge from Maker to Compound\\n /// @dev payable to be compatible in conjunction with DSA.cast payable target\\n /// @param _vaultId Id of the unsafe vault of the client.\\n /// @param _colToken vault's col token address .\\n function getDataAndCastMakerToCompound(uint256 _vaultId, address _colToken)\\n external\\n payable\\n {\\n (address[] memory targets, bytes[] memory datas) =\\n _dataMakerToCompound(_vaultId, _colToken);\\n\\n _cast(targets, datas);\\n }\\n\\n function _cast(address[] memory targets, bytes[] memory datas) internal {\\n // Instapool V2 / FlashLoan call\\n bytes memory castData =\\n abi.encodeWithSelector(\\n AccountInterface.cast.selector,\\n targets,\\n datas,\\n msg.sender // msg.sender == GelatoCore\\n );\\n\\n (bool success, bytes memory returndata) =\\n address(this).delegatecall(castData);\\n if (!success) {\\n returndata.revertWithError(\\n \\\"ConnectGelatoDataFullRefinanceMaker._cast:\\\"\\n );\\n }\\n }\\n\\n /* solhint-disable function-max-lines */\\n\\n function _dataMakerToMaker(\\n uint256 _vaultAId,\\n uint256 _vaultBId,\\n address _colToken,\\n string calldata _colType\\n ) internal view returns (address[] memory targets, bytes[] memory datas) {\\n targets = new address[](1);\\n targets[0] = INSTA_POOL_V2;\\n\\n uint256 wDaiToBorrow = _getRealisedDebt(_getMakerVaultDebt(_vaultAId));\\n uint256 wColToWithdrawFromMaker =\\n _getMakerVaultCollateralBalance(_vaultAId);\\n uint256 route = _getFlashLoanRoute(DAI, wDaiToBorrow);\\n uint256 gasCost = _getGasCostMakerToMaker(_vaultBId == 0, route);\\n uint256 gasFeesPaidFromCol = _getGelatoProviderFees(gasCost);\\n\\n (address[] memory _targets, bytes[] memory _datas) =\\n _vaultBId == 0\\n ? _spellsMakerToNewMakerVault(\\n _vaultAId,\\n _colToken,\\n _colType,\\n wDaiToBorrow,\\n wColToWithdrawFromMaker,\\n gasFeesPaidFromCol\\n )\\n : _spellsMakerToMaker(\\n _vaultAId,\\n _vaultBId,\\n _colToken,\\n wDaiToBorrow,\\n wColToWithdrawFromMaker,\\n gasFeesPaidFromCol\\n );\\n\\n datas = new bytes[](1);\\n datas[0] = abi.encodeWithSelector(\\n IConnectInstaPoolV2.flashBorrowAndCast.selector,\\n DAI,\\n wDaiToBorrow,\\n route,\\n abi.encode(_targets, _datas)\\n );\\n }\\n\\n function _spellsMakerToNewMakerVault(\\n uint256 _vaultAId,\\n address _colToken,\\n string calldata _colType,\\n uint256 _wDaiToBorrow,\\n uint256 _wColToWithdrawFromMaker,\\n uint256 _gasFeesPaidFromCol\\n ) internal view returns (address[] memory targets, bytes[] memory datas) {\\n targets = new address[](7);\\n targets[0] = CONNECT_MAKER; // payback\\n targets[1] = CONNECT_MAKER; // withdraw\\n targets[2] = CONNECT_MAKER; // open new B vault\\n targets[3] = CONNECT_MAKER; // deposit\\n targets[4] = CONNECT_MAKER; // borrow\\n targets[5] = _connectGelatoProviderPayment; // payProvider\\n targets[6] = INSTA_POOL_V2; // flashPayback\\n\\n datas = new bytes[](7);\\n datas[0] = _encodePaybackMakerVault(_vaultAId, uint256(-1), 0, 600);\\n datas[1] = _encodedWithdrawMakerVault(_vaultAId, uint256(-1), 0, 0);\\n datas[2] = _encodeOpenMakerVault(_colType);\\n datas[3] = _encodedDepositMakerVault(\\n 0,\\n sub(_wColToWithdrawFromMaker, _gasFeesPaidFromCol),\\n 0,\\n 0\\n );\\n datas[4] = _encodeBorrowMakerVault(0, 0, 600, 0);\\n datas[5] = _encodePayGelatoProvider(\\n _colToken,\\n _gasFeesPaidFromCol,\\n 0,\\n 0\\n );\\n datas[6] = _encodeFlashPayback(DAI, _wDaiToBorrow, 0, 0);\\n }\\n\\n function _spellsMakerToMaker(\\n uint256 _vaultAId,\\n uint256 _vaultBId,\\n address _colToken,\\n uint256 _wDaiToBorrow,\\n uint256 _wColToWithdrawFromMaker,\\n uint256 _gasFeesPaidFromCol\\n ) internal view returns (address[] memory targets, bytes[] memory datas) {\\n targets = new address[](6);\\n targets[0] = CONNECT_MAKER; // payback\\n targets[1] = CONNECT_MAKER; // withdraw\\n targets[2] = CONNECT_MAKER; // deposit\\n targets[3] = CONNECT_MAKER; // borrow\\n targets[4] = _connectGelatoProviderPayment; // payProvider\\n targets[5] = INSTA_POOL_V2; // flashPayback\\n\\n datas = new bytes[](6);\\n datas[0] = _encodePaybackMakerVault(_vaultAId, uint256(-1), 0, 600);\\n datas[1] = _encodedWithdrawMakerVault(_vaultAId, uint256(-1), 0, 0);\\n datas[2] = _encodedDepositMakerVault(\\n _vaultBId,\\n sub(_wColToWithdrawFromMaker, _gasFeesPaidFromCol),\\n 0,\\n 0\\n );\\n datas[3] = _encodeBorrowMakerVault(_vaultBId, 0, 600, 0);\\n datas[4] = _encodePayGelatoProvider(\\n _colToken,\\n _gasFeesPaidFromCol,\\n 0,\\n 0\\n );\\n datas[5] = _encodeFlashPayback(DAI, _wDaiToBorrow, 0, 0);\\n }\\n\\n function _dataMakerToCompound(uint256 _vaultId, address _colToken)\\n internal\\n view\\n returns (address[] memory targets, bytes[] memory datas)\\n {\\n targets = new address[](1);\\n targets[0] = INSTA_POOL_V2;\\n\\n uint256 wDaiToBorrow = _getRealisedDebt(_getMakerVaultDebt(_vaultId));\\n uint256 wColToWithdrawFromMaker =\\n _getMakerVaultCollateralBalance(_vaultId);\\n uint256 route = _getFlashLoanRoute(DAI, wDaiToBorrow);\\n uint256 gasCost = _getGasCostMakerToCompound(route);\\n uint256 gasFeesPaidFromCol = _getGelatoProviderFees(gasCost);\\n\\n address[] memory _targets = new address[](6);\\n _targets[0] = CONNECT_MAKER; // payback\\n _targets[1] = CONNECT_MAKER; // withdraw\\n _targets[2] = CONNECT_COMPOUND; // deposit\\n _targets[3] = CONNECT_COMPOUND; // borrow\\n _targets[4] = _connectGelatoProviderPayment; // payProvider\\n _targets[5] = INSTA_POOL_V2; // flashPayback\\n\\n bytes[] memory _datas = new bytes[](6);\\n _datas[0] = _encodePaybackMakerVault(_vaultId, uint256(-1), 0, 600);\\n _datas[1] = _encodedWithdrawMakerVault(_vaultId, uint256(-1), 0, 0);\\n _datas[2] = _encodeDepositCompound(\\n _colToken,\\n sub(wColToWithdrawFromMaker, gasFeesPaidFromCol),\\n 0,\\n 0\\n );\\n _datas[3] = _encodeBorrowCompound(DAI, 0, 600, 0);\\n _datas[4] = _encodePayGelatoProvider(\\n _colToken,\\n gasFeesPaidFromCol,\\n 0,\\n 0\\n );\\n _datas[5] = _encodeFlashPayback(DAI, wDaiToBorrow, 0, 0);\\n\\n datas = new bytes[](1);\\n datas[0] = abi.encodeWithSelector(\\n IConnectInstaPoolV2.flashBorrowAndCast.selector,\\n DAI,\\n wDaiToBorrow,\\n route,\\n abi.encode(_targets, _datas)\\n );\\n }\\n\\n /* solhint-enable function-max-lines */\\n}\\n\",\"keccak256\":\"0x8e42960a3e2c06c8ace2598ab5eb66fa8fd26e1ddc0dbde90c590db811e10b93\",\"license\":\"UNLICENSED\"},\"contracts/functions/InstaDapp/connectors/FConnectCompound.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {\\n IConnectCompound\\n} from \\\"../../../interfaces/InstaDapp/connectors/IConnectCompound.sol\\\";\\n\\nfunction _encodeDepositCompound(\\n address _token,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n) pure returns (bytes memory) {\\n return\\n abi.encodeWithSelector(\\n IConnectCompound.deposit.selector,\\n _token,\\n _amt,\\n _getId,\\n _setId\\n );\\n}\\n\\nfunction _encodeBorrowCompound(\\n address _token,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n) pure returns (bytes memory) {\\n return\\n abi.encodeWithSelector(\\n IConnectCompound.borrow.selector,\\n _token,\\n _amt,\\n _getId,\\n _setId\\n );\\n}\\n\",\"keccak256\":\"0xd71789a60590449043d5fe89591854f618432cc33f05bd33a357175a8f015d37\",\"license\":\"UNLICENSED\"},\"contracts/functions/InstaDapp/connectors/FConnectGelatoProviderPayment.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {\\n IConnectGelatoProviderPayment\\n} from \\\"../../../interfaces/InstaDapp/connectors/IConnectGelatoProviderPayment.sol\\\";\\n\\nfunction _encodePayGelatoProvider(\\n address _token,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n) pure returns (bytes memory) {\\n return\\n abi.encodeWithSelector(\\n IConnectGelatoProviderPayment.payProvider.selector,\\n _token,\\n _amt,\\n _getId,\\n _setId\\n );\\n}\\n\",\"keccak256\":\"0x2839ff2319f6aae7ea923c7048f088e89f71bb13b6a523fc82870e67e22a197e\",\"license\":\"UNLICENSED\"},\"contracts/functions/InstaDapp/connectors/FConnectMaker.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {\\n IConnectMaker\\n} from \\\"../../../interfaces/InstaDapp/connectors/IConnectMaker.sol\\\";\\n\\nfunction _encodeOpenMakerVault(string memory _colType)\\n pure\\n returns (bytes memory)\\n{\\n return abi.encodeWithSelector(IConnectMaker.open.selector, _colType);\\n}\\n\\nfunction _encodeBorrowMakerVault(\\n uint256 _vaultId,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n) pure returns (bytes memory) {\\n return\\n abi.encodeWithSelector(\\n IConnectMaker.borrow.selector,\\n _vaultId,\\n _amt,\\n _getId,\\n _setId\\n );\\n}\\n\\nfunction _encodedDepositMakerVault(\\n uint256 _vaultId,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n) pure returns (bytes memory) {\\n return\\n abi.encodeWithSelector(\\n IConnectMaker.deposit.selector,\\n _vaultId,\\n _amt,\\n _getId,\\n _setId\\n );\\n}\\n\\nfunction _encodePaybackMakerVault(\\n uint256 _vaultId,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n) pure returns (bytes memory) {\\n return\\n abi.encodeWithSelector(\\n IConnectMaker.payback.selector,\\n _vaultId,\\n _amt,\\n _getId,\\n _setId\\n );\\n}\\n\\nfunction _encodedWithdrawMakerVault(\\n uint256 _vaultId,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n) pure returns (bytes memory) {\\n return\\n abi.encodeWithSelector(\\n IConnectMaker.withdraw.selector,\\n _vaultId,\\n _amt,\\n _getId,\\n _setId\\n );\\n}\\n\",\"keccak256\":\"0xfa8041540cf9da58828fac9ba047fb07b6bcbbbad32104509b39fd80179b268e\",\"license\":\"UNLICENSED\"},\"contracts/functions/InstaDapp/connectors/FInstaPoolV2.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {\\n IConnectInstaPoolV2\\n} from \\\"../../../interfaces/InstaDapp/connectors/IConnectInstaPoolV2.sol\\\";\\n\\nfunction _encodeFlashPayback(\\n address _token,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n) pure returns (bytes memory) {\\n return\\n abi.encodeWithSelector(\\n IConnectInstaPoolV2.flashPayback.selector,\\n _token,\\n _amt,\\n _getId,\\n _setId\\n );\\n}\\n\",\"keccak256\":\"0x8fe117434ff22e07779d28853cd904266601d05801b879831e10ba1e2dd01052\",\"license\":\"UNLICENSED\"},\"contracts/functions/dapps/FMaker.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {MCD_MANAGER} from \\\"../../constants/CMaker.sol\\\";\\nimport {IMcdManager} from \\\"../../interfaces/dapps/Maker/IMcdManager.sol\\\";\\nimport {IVat} from \\\"../../interfaces/dapps/Maker/IVat.sol\\\";\\nimport {RAY, sub, mul} from \\\"../../vendor/DSMath.sol\\\";\\n\\nfunction _getMakerVaultDebt(uint256 _vaultId) view returns (uint256 wad) {\\n IMcdManager manager = IMcdManager(MCD_MANAGER);\\n\\n (bytes32 ilk, address urn) = _getVaultData(manager, _vaultId);\\n IVat vat = IVat(manager.vat());\\n (, uint256 rate, , , ) = vat.ilks(ilk);\\n (, uint256 art) = vat.urns(ilk, urn);\\n uint256 dai = vat.dai(urn);\\n\\n uint256 rad = sub(mul(art, rate), dai);\\n wad = rad / RAY;\\n\\n wad = mul(wad, RAY) < rad ? wad + 1 : wad;\\n}\\n\\nfunction _getMakerRawVaultDebt(uint256 _vaultId) view returns (uint256 tab) {\\n IMcdManager manager = IMcdManager(MCD_MANAGER);\\n\\n (bytes32 ilk, address urn) = _getVaultData(manager, _vaultId);\\n IVat vat = IVat(manager.vat());\\n (, uint256 rate, , , ) = vat.ilks(ilk);\\n (, uint256 art) = vat.urns(ilk, urn);\\n\\n uint256 rad = mul(art, rate);\\n\\n tab = rad / RAY;\\n tab = mul(tab, RAY) < rad ? tab + 1 : tab;\\n}\\n\\nfunction _getMakerVaultCollateralBalance(uint256 _vaultId)\\n view\\n returns (uint256)\\n{\\n IMcdManager manager = IMcdManager(MCD_MANAGER);\\n\\n IVat vat = IVat(manager.vat());\\n (bytes32 ilk, address urn) = _getVaultData(manager, _vaultId);\\n (uint256 ink, ) = vat.urns(ilk, urn);\\n\\n return ink;\\n}\\n\\nfunction _getVaultData(IMcdManager manager, uint256 vault)\\n view\\n returns (bytes32 ilk, address urn)\\n{\\n ilk = manager.ilks(vault);\\n urn = manager.urns(vault);\\n}\\n\",\"keccak256\":\"0x916f03bd9a6b88bba93ae455dfecc525f78962b8a446d3151abca20876fe354e\",\"license\":\"UNLICENSED\"},\"contracts/functions/gelato/FGelato.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {GELATO_GAS_PRICE_ORACLE} from \\\"../../constants/CGelato.sol\\\";\\nimport {mul} from \\\"../../vendor/DSMath.sol\\\";\\n\\nfunction _getGelatoGasPrice() view returns (uint256) {\\n return uint256(GELATO_GAS_PRICE_ORACLE.latestAnswer());\\n}\\n\\nfunction _getGelatoProviderFees(uint256 _gas) view returns (uint256) {\\n return mul(_gas, _getGelatoGasPrice());\\n}\\n\",\"keccak256\":\"0x378a768c27c9c3d867e95cb9a2cf7cb032eafcbe0e8ff1f692ca2ed546213ac3\",\"license\":\"UNLICENSED\"},\"contracts/functions/gelato/FGelatoDebtBridge.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\npragma experimental ABIEncoderV2;\\n\\nimport {add, sub, wmul, wdiv} from \\\"../../vendor/DSMath.sol\\\";\\nimport {\\n INSTA_POOL_RESOLVER,\\n ROUTE_1_TOLERANCE\\n} from \\\"../../constants/CInstaDapp.sol\\\";\\nimport {GAS_COSTS_FOR_FULL_REFINANCE} from \\\"../../constants/CDebtBridge.sol\\\";\\nimport {\\n IInstaPoolResolver\\n} from \\\"../../interfaces/InstaDapp/resolvers/IInstaPoolResolver.sol\\\";\\n\\nfunction _wCalcCollateralToWithdraw(\\n uint256 _wMinColRatioA,\\n uint256 _wMinColRatioB,\\n uint256 _wColPrice,\\n uint256 _wPricedCol,\\n uint256 _wDebtOnA\\n) pure returns (uint256) {\\n return\\n wdiv(\\n sub(\\n _wPricedCol,\\n wdiv(\\n sub(\\n wmul(_wMinColRatioA, _wPricedCol),\\n wmul(_wMinColRatioA, wmul(_wMinColRatioB, _wDebtOnA))\\n ),\\n sub(_wMinColRatioA, _wMinColRatioB)\\n )\\n ),\\n _wColPrice\\n );\\n}\\n\\nfunction _wCalcDebtToRepay(\\n uint256 _wMinColRatioA,\\n uint256 _wMinColRatioB,\\n uint256 _wPricedCol,\\n uint256 _wDebtOnA\\n) pure returns (uint256) {\\n return\\n sub(\\n _wDebtOnA,\\n wmul(\\n wdiv(1e18, _wMinColRatioA),\\n wdiv(\\n sub(\\n wmul(_wMinColRatioA, _wPricedCol),\\n wmul(_wMinColRatioA, wmul(_wMinColRatioB, _wDebtOnA))\\n ),\\n sub(_wMinColRatioA, _wMinColRatioB)\\n )\\n )\\n );\\n}\\n\\nfunction _getFlashLoanRoute(address _tokenA, uint256 _wTokenADebtToMove)\\n view\\n returns (uint256)\\n{\\n IInstaPoolResolver.RouteData memory rData =\\n IInstaPoolResolver(INSTA_POOL_RESOLVER).getTokenLimit(_tokenA);\\n\\n if (rData.dydx > _wTokenADebtToMove) return 0;\\n if (rData.maker > _wTokenADebtToMove) return 1;\\n if (rData.compound > _wTokenADebtToMove) return 2;\\n if (rData.aave > _wTokenADebtToMove) return 3;\\n revert(\\\"FGelatoDebtBridge._getFlashLoanRoute: illiquid\\\");\\n}\\n\\nfunction _getGasCostMakerToMaker(bool _newVault, uint256 _route)\\n pure\\n returns (uint256)\\n{\\n _checkRouteIndex(_route);\\n return\\n _newVault\\n ? add(GAS_COSTS_FOR_FULL_REFINANCE()[_route], 0)\\n : GAS_COSTS_FOR_FULL_REFINANCE()[_route];\\n}\\n\\nfunction _getGasCostMakerToCompound(uint256 _route) pure returns (uint256) {\\n _checkRouteIndex(_route);\\n return GAS_COSTS_FOR_FULL_REFINANCE()[_route];\\n}\\n\\nfunction _getRealisedDebt(uint256 _debtToMove) pure returns (uint256) {\\n return wmul(_debtToMove, ROUTE_1_TOLERANCE);\\n}\\n\\nfunction _checkRouteIndex(uint256 _route) pure {\\n require(\\n _route <= 4,\\n \\\"FGelatoDebtBridge._getGasCostMakerToMaker: invalid route index\\\"\\n );\\n}\\n\",\"keccak256\":\"0x385b9f1dfd0b35bba15a3c53dc23604e0d76f179882b31446099e55bdb762a84\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/InstaDapp/IInstaDapp.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\npragma experimental ABIEncoderV2;\\n\\n/// @notice Interface InstaDapp Index\\ninterface IndexInterface {\\n function connectors(uint256 version) external view returns (address);\\n\\n function list() external view returns (address);\\n}\\n\\n/// @notice Interface InstaDapp List\\ninterface ListInterface {\\n function accountID(address _account) external view returns (uint64);\\n}\\n\\n/// @notice Interface InstaDapp InstaMemory\\ninterface MemoryInterface {\\n function setUint(uint256 _id, uint256 _val) external;\\n\\n function getUint(uint256 _id) external returns (uint256);\\n}\\n\\n/// @notice Interface InstaDapp Defi Smart Account wallet\\ninterface AccountInterface {\\n function cast(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n address _origin\\n ) external payable returns (bytes32[] memory responses);\\n\\n function version() external view returns (uint256);\\n\\n function isAuth(address user) external view returns (bool);\\n\\n function shield() external view returns (bool);\\n}\\n\\ninterface ConnectorInterface {\\n function connectorID() external view returns (uint256 _type, uint256 _id);\\n\\n function name() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x535bfd49d6813232ed96c2b8b4dae5f0659222091d1571e09e8bcbb32bc9dd92\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/InstaDapp/connectors/IConnectCompound.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\ninterface IConnectCompound {\\n function borrow(\\n address token,\\n uint256 amt,\\n uint256 getId,\\n uint256 setId\\n ) external payable;\\n\\n function deposit(\\n address token,\\n uint256 amt,\\n uint256 getId,\\n uint256 setId\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x3e2079b26d77cf6a1826636aadee94042a6bc273b7109e792880ef8c5e731cd5\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/InstaDapp/connectors/IConnectGelatoProviderPayment.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {ConnectorInterface} from \\\"../IInstaDapp.sol\\\";\\n\\ninterface IConnectGelatoProviderPayment is ConnectorInterface {\\n function setProvider(address _provider) external;\\n\\n function payProvider(\\n address _token,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n ) external payable;\\n\\n function gelatoProvider() external view returns (address);\\n\\n // solhint-disable-next-line func-name-mixedcase\\n function GELATO_CORE() external pure returns (address);\\n}\\n\",\"keccak256\":\"0x60ecfd91c4455a509d441b0ce208da1ec0289e4f5d9acc55220b3cc17c0f0adc\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/InstaDapp/connectors/IConnectInstaPoolV2.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\ninterface IConnectInstaPoolV2 {\\n function flashBorrowAndCast(\\n address token,\\n uint256 amt,\\n uint256 route,\\n bytes memory data\\n ) external payable;\\n\\n function flashPayback(\\n address token,\\n uint256 amt,\\n uint256 getId,\\n uint256 setId\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x30c1635f1efcf446ce7352a3a4c66a1b38e71e6203783d940639a8cceeb36e5e\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/InstaDapp/connectors/IConnectMaker.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\ninterface IConnectMaker {\\n function payback(\\n uint256 vault,\\n uint256 amt,\\n uint256 getId,\\n uint256 setId\\n ) external payable;\\n\\n function borrow(\\n uint256 vault,\\n uint256 amt,\\n uint256 getId,\\n uint256 setId\\n ) external payable;\\n\\n function open(string calldata colType)\\n external\\n payable\\n returns (uint256 vault);\\n\\n function withdraw(\\n uint256 vault,\\n uint256 amt,\\n uint256 getId,\\n uint256 setId\\n ) external payable;\\n\\n function deposit(\\n uint256 vault,\\n uint256 amt,\\n uint256 getId,\\n uint256 setId\\n ) external payable;\\n}\\n\",\"keccak256\":\"0xc8c479e941784f6b470b2244e777f1cdc0a7a8e2af55de3dae199018e6d9d131\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/InstaDapp/resolvers/IInstaPoolResolver.sol\":{\"content\":\"// \\\"SPDX-License-Identifier: UNLICENSED\\\"\\npragma solidity 0.7.4;\\npragma experimental ABIEncoderV2;\\n\\ninterface IInstaPoolResolver {\\n struct RouteData {\\n uint256 dydx;\\n uint256 maker;\\n uint256 compound;\\n uint256 aave;\\n }\\n\\n function getTokenLimit(address token)\\n external\\n view\\n returns (RouteData memory);\\n}\\n\",\"keccak256\":\"0x036703684cf8156fdc57c8d6ed583b2d273688e1dd26cf78c19bf2fbb59c7885\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/dapps/Maker/IMcdManager.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\ninterface IMcdManager {\\n function ilks(uint256) external view returns (bytes32);\\n\\n function urns(uint256) external view returns (address);\\n\\n function vat() external view returns (address);\\n}\\n\",\"keccak256\":\"0x16e87079710830c27477ce17aeb5baa531868c81680fdb354a72c6ba9b54c799\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/dapps/Maker/IVat.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\ninterface IVat {\\n function ilks(bytes32)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function dai(address) external view returns (uint256);\\n\\n function urns(bytes32, address) external view returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0xde979af6019a257b13de06e94180a344fe8cd2e7dc0790988b8f6204a01f95e8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/gelato/IGelatoGasPriceOracle.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\ninterface IGelatoGasPriceOracle {\\n function latestAnswer() external view returns (int256);\\n}\\n\",\"keccak256\":\"0x0fee271af60cac14cba61a365efbaaa6c214965e2ea9ce70c1a2eb62b8d57db5\",\"license\":\"UNLICENSED\"},\"contracts/lib/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9038c820e041814ca2311bf582f2123171865b36c9438a7c6f85eb99406ec45c\",\"license\":\"UNLICENSED\"},\"contracts/vendor/DSMath.sol\":{\"content\":\"// \\\"SPDX-License-Identifier: AGPL-3.0-or-later\\\"\\n/// math.sol -- mixin for inline numerical wizardry\\n\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity 0.7.4;\\n\\nfunction add(uint x, uint y) pure returns (uint z) {\\n require((z = x + y) >= x, \\\"ds-math-add-overflow\\\");\\n}\\nfunction sub(uint x, uint y) pure returns (uint z) {\\n require((z = x - y) <= x, \\\"ds-math-sub-underflow\\\");\\n}\\nfunction mul(uint x, uint y) pure returns (uint z) {\\n require(y == 0 || (z = x * y) / y == x, \\\"ds-math-mul-overflow\\\");\\n}\\n\\nfunction min(uint x, uint y) pure returns (uint z) {\\n return x <= y ? x : y;\\n}\\nfunction max(uint x, uint y) pure returns (uint z) {\\n return x >= y ? x : y;\\n}\\nfunction imin(int x, int y) pure returns (int z) {\\n return x <= y ? x : y;\\n}\\nfunction imax(int x, int y) pure returns (int z) {\\n return x >= y ? x : y;\\n}\\n\\nuint constant WAD = 10 ** 18;\\nuint constant RAY = 10 ** 27;\\n\\n//rounds to zero if x*y < WAD / 2\\nfunction wmul(uint x, uint y) pure returns (uint z) {\\n z = add(mul(x, y), WAD / 2) / WAD;\\n}\\n//rounds to zero if x*y < WAD / 2\\nfunction rmul(uint x, uint y) pure returns (uint z) {\\n z = add(mul(x, y), RAY / 2) / RAY;\\n}\\n//rounds to zero if x*y < WAD / 2\\nfunction wdiv(uint x, uint y) pure returns (uint z) {\\n z = add(mul(x, WAD), y / 2) / y;\\n}\\n//rounds to zero if x*y < RAY / 2\\nfunction rdiv(uint x, uint y) pure returns (uint z) {\\n z = add(mul(x, RAY), y / 2) / y;\\n}\\n\\n// This famous algorithm is called \\\"exponentiation by squaring\\\"\\n// and calculates x^n with x as fixed-point and n as regular unsigned.\\n//\\n// It's O(log n), instead of O(n) for naive repeated multiplication.\\n//\\n// These facts are why it works:\\n//\\n// If n is even, then x^n = (x^2)^(n/2).\\n// If n is odd, then x^n = x * x^(n-1),\\n// and applying the equation for even x gives\\n// x^n = x * (x^2)^((n-1) / 2).\\n//\\n// Also, EVM division is flooring and\\n// floor[(n-1) / 2] = floor[n / 2].\\n//\\nfunction rpow(uint x, uint n) pure returns (uint z) {\\n z = n % 2 != 0 ? x : RAY;\\n\\n for (n /= 2; n != 0; n /= 2) {\\n x = rmul(x, x);\\n\\n if (n % 2 != 0) {\\n z = rmul(z, x);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x78264c5d3029a613d0c7a875efa73b1826a9b22b296b608f831f5e8e69359c88\",\"license\":\"AGPL-3.0-or-later\"}},\"version\":1}",
"bytecode": "0x60c060405234801561001057600080fd5b5060405162002306380380620023068339810160408190526100319161004c565b60809190915260601b6001600160601b03191660a052610087565b6000806040838503121561005e578182fd5b825160208401519092506001600160a01b038116811461007c578182fd5b809150509250929050565b60805160a05160601c61224e620000b8600039806105e95280610edb528061120e525080610123525061224e6000f3fe60806040526004361061003f5760003560e01c806306fdde031461004457806345c4b9b51461006f578063e588576e14610084578063eb15f78114610097575b600080fd5b34801561005057600080fd5b506100596100ba565b60405161006691906120ce565b60405180910390f35b61008261007d366004611ea7565b6100d6565b005b610082610092366004611e7c565b6100fd565b3480156100a357600080fd5b506100ac61011e565b60405161006692919061218c565b6040518060600160405280602881526020016121c76028913981565b6060806100e68787878787610145565b915091506100f48282610316565b50505050505050565b60608061010a84846103fa565b915091506101188282610316565b50505050565b6001907f000000000000000000000000000000000000000000000000000000000000000090565b60408051600180825281830190925260609182919060208083019080368337019050509150733150e5a805577366816a1ddc7330c6ea17070c058260008151811061018c57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006101bf6101ba8961088e565b610af3565b905060006101cc89610b0f565b905060006101ee736b175474e89094c44da98b954eedeac495271d0f84610c30565b905060006101fd8a1583610d42565b9050600061020a82610d98565b90506060808c15610228576102238e8e8e8a8a88610dab565b610237565b6102378e8d8d8d8b8b8961109b565b604080516001808252818301909252929450909250816020015b6060815260200190600190039081610251579050509750638d0a9b1b60e01b736b175474e89094c44da98b954eedeac495271d0f8887858560405160200161029a929190612062565b60408051601f19818403018152908290526102ba9493929160240161202b565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050886000815181106102fa57fe5b6020026020010181905250505050505050509550959350505050565b606063e0e90acf60e01b83833360405160240161033593929190612090565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050905060006060306001600160a01b0316836040516103869190611ffb565b600060405180830381855af49150503d80600081146103c1576040519150601f19603f3d011682016040523d82523d6000602084013e6103c6565b606091505b5091509150816103f3576103f36040518060600160405280602a81526020016121ef602a91398290611420565b5050505050565b60408051600180825281830190925260609182919060208083019080368337019050509150733150e5a805577366816a1ddc7330c6ea17070c058260008151811061044157fe5b60200260200101906001600160a01b031690816001600160a01b031681525050600061046f6101ba8661088e565b9050600061047c86610b0f565b9050600061049e736b175474e89094c44da98b954eedeac495271d0f84610c30565b905060006104ab8261170f565b905060006104b882610d98565b60408051600680825260e08201909252919250606091906020820160c08036833701905050905073ac02030d8a8f49ed04b2f52c394d3f901a10f8a98160008151811061050157fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a98160018151811061054357fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507307f81230d73a78f63f0c2a3403ad281b067d28f88160028151811061058557fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507307f81230d73a78f63f0c2a3403ad281b067d28f8816003815181106105c757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000008160048151811061061557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050733150e5a805577366816a1ddc7330c6ea17070c058160058151811061065757fe5b6001600160a01b03929092166020928302919091019091015260408051600680825260e08201909252606091816020015b60608152602001906001900390816106885790505090506106b08b6000196000610258611738565b816000815181106106bd57fe5b60200260200101819052506106d78b60001960008061178d565b816001815181106106e457fe5b60200260200101819052506107058a6106fd88866117e2565b600080611832565b8160028151811061071257fe5b6020026020010181905250610741736b175474e89094c44da98b954eedeac495271d0f6000610258600061188f565b8160038151811061074e57fe5b60200260200101819052506107668a846000806118ec565b8160048151811061077357fe5b602002602001018190525061079f736b175474e89094c44da98b954eedeac495271d0f88600080611949565b816005815181106107ac57fe5b602090810291909101015260408051600180825281830190925290816020015b60608152602001906001900390816107cc579050509750638d0a9b1b60e01b736b175474e89094c44da98b954eedeac495271d0f88878585604051602001610815929190612062565b60408051601f19818403018152908290526108359493929160240161202b565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050508860008151811061087557fe5b6020026020010181905250505050505050509250929050565b6000735ef30b9986345249bc32d8928b7ee64de9435e3981806108b183866119a6565b915091506000836001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f057600080fd5b505afa158015610904573d6000803e3d6000fd5b505050506040513d602081101561091a57600080fd5b505160408051636cb1c69b60e11b81526004810186905290519192506000916001600160a01b0384169163d9638d369160248083019260a0929190829003018186803b15801561096957600080fd5b505afa15801561097d573d6000803e3d6000fd5b505050506040513d60a081101561099357600080fd5b5060200151604080516309092f9760e21b8152600481018790526001600160a01b038681166024830152825193945060009390861692632424be5c9260448082019391829003018186803b1580156109ea57600080fd5b505afa1580156109fe573d6000803e3d6000fd5b505050506040513d6040811015610a1457600080fd5b5060209081015160408051633612d9a360e11b81526001600160a01b038881166004830152915192945060009391871692636c25b34692602480840193919291829003018186803b158015610a6857600080fd5b505afa158015610a7c573d6000803e3d6000fd5b505050506040513d6020811015610a9257600080fd5b505190506000610aab610aa58486611a9b565b836117e2565b90506b033b2e3c9fd0803ce80000008104985080610ad58a6b033b2e3c9fd0803ce8000000611a9b565b10610ae05788610ae5565b886001015b9a9950505050505050505050565b6000610b0782670df27a2cdf448000611afe565b90505b919050565b600080735ef30b9986345249bc32d8928b7ee64de9435e3990506000816001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6457600080fd5b505afa158015610b78573d6000803e3d6000fd5b505050506040513d6020811015610b8e57600080fd5b50519050600080610b9f84876119a6565b915091506000836001600160a01b0316632424be5c84846040518363ffffffff1660e01b815260040180838152602001826001600160a01b0316815260200192505050604080518083038186803b158015610bf957600080fd5b505afa158015610c0d573d6000803e3d6000fd5b505050506040513d6040811015610c2357600080fd5b5051979650505050505050565b6000610c3a611dc0565b604051635a860c8760e01b815273a004a5afba04b74037e9e52ba1f7eb02b5e6150990635a860c8790610c71908790600401612017565b60806040518083038186803b158015610c8957600080fd5b505afa158015610c9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc19190611e1d565b90508281600001511115610cd9576000915050610d3c565b8281602001511115610cef576001915050610d3c565b8281604001511115610d05576002915050610d3c565b8281606001511115610d1b576003915050610d3c565b60405162461bcd60e51b8152600401610d339061213e565b60405180910390fd5b92915050565b6000610d4d82611b33565b82610d6f57610d5a611b57565b8260048110610d6557fe5b6020020151610d91565b610d91610d7a611b57565b8360048110610d8557fe5b60200201516000611b91565b9392505050565b6000610b0782610da6611be0565b611a9b565b60408051600680825260e082019092526060918291906020820160c08036833701905050915073ac02030d8a8f49ed04b2f52c394d3f901a10f8a982600081518110610df357fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a982600181518110610e3557fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a982600281518110610e7757fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a982600381518110610eb957fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000082600481518110610f0757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050733150e5a805577366816a1ddc7330c6ea17070c0582600581518110610f4957fe5b6001600160a01b039290921660209283029190910182015260408051600680825260e082019092529182015b6060815260200190600190039081610f75579050509050610f9d886000196000610258611738565b81600081518110610faa57fe5b6020026020010181905250610fc48860001960008061178d565b81600181518110610fd157fe5b6020026020010181905250610ff287610fea86866117e2565b600080611c60565b81600281518110610fff57fe5b602002602001018190525061101a8760006102586000611cb5565b8160038151811061102757fe5b602002602001018190525061103f86846000806118ec565b8160048151811061104c57fe5b6020026020010181905250611078736b175474e89094c44da98b954eedeac495271d0f86600080611949565b8160058151811061108557fe5b6020026020010181905250965096945050505050565b60408051600780825261010082019092526060918291906020820160e08036833701905050915073ac02030d8a8f49ed04b2f52c394d3f901a10f8a9826000815181106110e457fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a98260018151811061112657fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a98260028151811061116857fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a9826003815181106111aa57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a9826004815181106111ec57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000008260058151811061123a57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050733150e5a805577366816a1ddc7330c6ea17070c058260068151811061127c57fe5b6001600160a01b039290921660209283029190910182015260408051600780825261010082019092529182015b60608152602001906001900390816112a95790505090506112d1896000196000610258611738565b816000815181106112de57fe5b60200260200101819052506112f88960001960008061178d565b8160018151811061130557fe5b602002602001018190525061134f87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611d0a92505050565b8160028151811061135c57fe5b60200260200101819052506113766000610fea86866117e2565b8160038151811061138357fe5b602002602001018190525061139e6000806102586000611cb5565b816004815181106113ab57fe5b60200260200101819052506113c388846000806118ec565b816005815181106113d057fe5b60200260200101819052506113fc736b175474e89094c44da98b954eedeac495271d0f86600080611949565b8160068151811061140957fe5b602002602001018190525097509795505050505050565b602082518161142b57fe5b066004141561164857602082015162461bcd60e51b6001600160e01b0319821614156115865760448301925081836040516020018083805190602001908083835b6020831061148b5780518252601f19909201916020918201910161146c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106114d35780518252601f1990920191602091820191016114b4565b51815160209384036101000a60001901801990921691161790526040805192909401828103601f190183529384905262461bcd60e51b84526004840181815282516024860152825192975095508594506044909301928601915080838360005b8381101561154b578181015183820152602001611533565b50505050905090810190601f1680156115785780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b816040516020018082805190602001908083835b602083106115b95780518252601f19909201916020918201910161159a565b51815160001960209485036101000a0190811690199091161790526e2737a2b93937b929b2b632b1ba37b960891b9390910192835260408051601019818603018152600f85019182905262461bcd60e51b90915260138401828152815160338601528151919650945084936053019250908501908083836000831561154b578181015183820152602001611533565b806040516020018082805190602001908083835b6020831061167b5780518252601f19909201916020918201910161165c565b51815160001960209485036101000a01908116901990911617905273556e657870656374656452657475726e6461746160601b9390910192835260408051600b19818603018152601485019182905262461bcd60e51b90915260188401828152815160388601528151919650945084936058019250908501908083836000831561154b578181015183820152602001611533565b600061171a82611b33565b611722611b57565b826004811061172d57fe5b602002015192915050565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316636af06d1b60e11b179052949350505050565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b03166319d3ec6d60e21b179052949350505050565b80820382811115610d3c576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b604080516001600160a01b0386166024820152604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b031663ce88b43960e01b179052949350505050565b604080516001600160a01b0386166024820152604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316631c5d526160e11b179052949350505050565b604080516001600160a01b0386166024820152604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316631b5dd97960e21b179052949350505050565b604080516001600160a01b0386166024820152604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316630427301d60e31b179052949350505050565b600080836001600160a01b0316632c2cb9fd846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156119ed57600080fd5b505afa158015611a01573d6000803e3d6000fd5b505050506040513d6020811015611a1757600080fd5b505160408051632726b07360e01b81526004810186905290519193506001600160a01b03861691632726b07391602480820192602092909190829003018186803b158015611a6457600080fd5b505afa158015611a78573d6000803e3d6000fd5b505050506040513d6020811015611a8e57600080fd5b5051919491935090915050565b6000811580611ab657505080820282828281611ab357fe5b04145b610d3c576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b6000670de0b6b3a7640000611b24611b168585611a9b565b6706f05b59d3b20000611b91565b81611b2b57fe5b049392505050565b6004811115611b545760405162461bcd60e51b8152600401610d33906120e1565b50565b611b5f611de8565b604051806080016040528062266fd88152602001622feb948152602001623c97b8815260200162424ca8815250905090565b80820182811015610d3c576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b600073169e633a2d1e6c10dd91238ba11c4a708dfef37c6001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2f57600080fd5b505afa158015611c43573d6000803e3d6000fd5b505050506040513d6020811015611c5957600080fd5b5051905090565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316632505c3d960e01b179052949350505050565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b031663088eca4160e11b179052949350505050565b60405160206024820181815283516044840152835160609363e4dcb06b60e01b9386939283926064019185019080838360005b83811015611d55578181015183820152602001611d3d565b50505050905090810190601f168015611d825780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990961695909517909452509192505050919050565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b60405180608001604052806004906020820280368337509192915050565b80356001600160a01b0381168114610b0a57600080fd5b600060808284031215611e2e578081fd5b6040516080810181811067ffffffffffffffff82111715611e4b57fe5b8060405250825181526020830151602082015260408301516040820152606083015160608201528091505092915050565b60008060408385031215611e8e578081fd5b82359150611e9e60208401611e06565b90509250929050565b600080600080600060808688031215611ebe578081fd5b8535945060208601359350611ed560408701611e06565b9250606086013567ffffffffffffffff80821115611ef1578283fd5b818801915088601f830112611f04578283fd5b813581811115611f12578384fd5b896020828501011115611f23578384fd5b9699959850939650602001949392505050565b6000815180845260208085019450808401835b83811015611f6e5781516001600160a01b031687529582019590820190600101611f49565b509495945050505050565b60008282518085526020808601955080818302840101818601855b84811015611fc257601f19868403018952611fb0838351611fcf565b98840198925090830190600101611f94565b5090979650505050505050565b60008151808452611fe781602086016020860161219a565b601f01601f19169290920160200192915050565b6000825161200d81846020870161219a565b9190910192915050565b6001600160a01b0391909116815260200190565b600060018060a01b0386168252846020830152836040830152608060608301526120586080830184611fcf565b9695505050505050565b6000604082526120756040830185611f36565b82810360208401526120878185611f79565b95945050505050565b6000606082526120a36060830186611f36565b82810360208401526120b58186611f79565b91505060018060a01b0383166040830152949350505050565b600060208252610d916020830184611fcf565b6020808252603e908201527f4647656c61746f446562744272696467652e5f676574476173436f73744d616b60408201527f6572546f4d616b65723a20696e76616c696420726f75746520696e6465780000606082015260800190565b6020808252602e908201527f4647656c61746f446562744272696467652e5f676574466c6173684c6f616e5260408201526d1bdd5d194e881a5b1b1a5c5d5a5960921b606082015260800190565b918252602082015260400190565b60005b838110156121b557818101518382015260200161219d565b83811115610118575050600091015256fe436f6e6e65637447656c61746f4461746146756c6c526566696e616e63654d616b65722d76312e30436f6e6e65637447656c61746f4461746146756c6c526566696e616e63654d616b65722e5f636173743aa264697066735822122016e13381d3b62adf876904fc6de5be4dc1fa98fa493314ae0e59f807d0289fed64736f6c63430007040033",
"deployedBytecode": "0x60806040526004361061003f5760003560e01c806306fdde031461004457806345c4b9b51461006f578063e588576e14610084578063eb15f78114610097575b600080fd5b34801561005057600080fd5b506100596100ba565b60405161006691906120ce565b60405180910390f35b61008261007d366004611ea7565b6100d6565b005b610082610092366004611e7c565b6100fd565b3480156100a357600080fd5b506100ac61011e565b60405161006692919061218c565b6040518060600160405280602881526020016121c76028913981565b6060806100e68787878787610145565b915091506100f48282610316565b50505050505050565b60608061010a84846103fa565b915091506101188282610316565b50505050565b6001907f000000000000000000000000000000000000000000000000000000000000000090565b60408051600180825281830190925260609182919060208083019080368337019050509150733150e5a805577366816a1ddc7330c6ea17070c058260008151811061018c57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006101bf6101ba8961088e565b610af3565b905060006101cc89610b0f565b905060006101ee736b175474e89094c44da98b954eedeac495271d0f84610c30565b905060006101fd8a1583610d42565b9050600061020a82610d98565b90506060808c15610228576102238e8e8e8a8a88610dab565b610237565b6102378e8d8d8d8b8b8961109b565b604080516001808252818301909252929450909250816020015b6060815260200190600190039081610251579050509750638d0a9b1b60e01b736b175474e89094c44da98b954eedeac495271d0f8887858560405160200161029a929190612062565b60408051601f19818403018152908290526102ba9493929160240161202b565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050886000815181106102fa57fe5b6020026020010181905250505050505050509550959350505050565b606063e0e90acf60e01b83833360405160240161033593929190612090565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050905060006060306001600160a01b0316836040516103869190611ffb565b600060405180830381855af49150503d80600081146103c1576040519150601f19603f3d011682016040523d82523d6000602084013e6103c6565b606091505b5091509150816103f3576103f36040518060600160405280602a81526020016121ef602a91398290611420565b5050505050565b60408051600180825281830190925260609182919060208083019080368337019050509150733150e5a805577366816a1ddc7330c6ea17070c058260008151811061044157fe5b60200260200101906001600160a01b031690816001600160a01b031681525050600061046f6101ba8661088e565b9050600061047c86610b0f565b9050600061049e736b175474e89094c44da98b954eedeac495271d0f84610c30565b905060006104ab8261170f565b905060006104b882610d98565b60408051600680825260e08201909252919250606091906020820160c08036833701905050905073ac02030d8a8f49ed04b2f52c394d3f901a10f8a98160008151811061050157fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a98160018151811061054357fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507307f81230d73a78f63f0c2a3403ad281b067d28f88160028151811061058557fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507307f81230d73a78f63f0c2a3403ad281b067d28f8816003815181106105c757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000008160048151811061061557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050733150e5a805577366816a1ddc7330c6ea17070c058160058151811061065757fe5b6001600160a01b03929092166020928302919091019091015260408051600680825260e08201909252606091816020015b60608152602001906001900390816106885790505090506106b08b6000196000610258611738565b816000815181106106bd57fe5b60200260200101819052506106d78b60001960008061178d565b816001815181106106e457fe5b60200260200101819052506107058a6106fd88866117e2565b600080611832565b8160028151811061071257fe5b6020026020010181905250610741736b175474e89094c44da98b954eedeac495271d0f6000610258600061188f565b8160038151811061074e57fe5b60200260200101819052506107668a846000806118ec565b8160048151811061077357fe5b602002602001018190525061079f736b175474e89094c44da98b954eedeac495271d0f88600080611949565b816005815181106107ac57fe5b602090810291909101015260408051600180825281830190925290816020015b60608152602001906001900390816107cc579050509750638d0a9b1b60e01b736b175474e89094c44da98b954eedeac495271d0f88878585604051602001610815929190612062565b60408051601f19818403018152908290526108359493929160240161202b565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050508860008151811061087557fe5b6020026020010181905250505050505050509250929050565b6000735ef30b9986345249bc32d8928b7ee64de9435e3981806108b183866119a6565b915091506000836001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f057600080fd5b505afa158015610904573d6000803e3d6000fd5b505050506040513d602081101561091a57600080fd5b505160408051636cb1c69b60e11b81526004810186905290519192506000916001600160a01b0384169163d9638d369160248083019260a0929190829003018186803b15801561096957600080fd5b505afa15801561097d573d6000803e3d6000fd5b505050506040513d60a081101561099357600080fd5b5060200151604080516309092f9760e21b8152600481018790526001600160a01b038681166024830152825193945060009390861692632424be5c9260448082019391829003018186803b1580156109ea57600080fd5b505afa1580156109fe573d6000803e3d6000fd5b505050506040513d6040811015610a1457600080fd5b5060209081015160408051633612d9a360e11b81526001600160a01b038881166004830152915192945060009391871692636c25b34692602480840193919291829003018186803b158015610a6857600080fd5b505afa158015610a7c573d6000803e3d6000fd5b505050506040513d6020811015610a9257600080fd5b505190506000610aab610aa58486611a9b565b836117e2565b90506b033b2e3c9fd0803ce80000008104985080610ad58a6b033b2e3c9fd0803ce8000000611a9b565b10610ae05788610ae5565b886001015b9a9950505050505050505050565b6000610b0782670df27a2cdf448000611afe565b90505b919050565b600080735ef30b9986345249bc32d8928b7ee64de9435e3990506000816001600160a01b03166336569e776040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6457600080fd5b505afa158015610b78573d6000803e3d6000fd5b505050506040513d6020811015610b8e57600080fd5b50519050600080610b9f84876119a6565b915091506000836001600160a01b0316632424be5c84846040518363ffffffff1660e01b815260040180838152602001826001600160a01b0316815260200192505050604080518083038186803b158015610bf957600080fd5b505afa158015610c0d573d6000803e3d6000fd5b505050506040513d6040811015610c2357600080fd5b5051979650505050505050565b6000610c3a611dc0565b604051635a860c8760e01b815273a004a5afba04b74037e9e52ba1f7eb02b5e6150990635a860c8790610c71908790600401612017565b60806040518083038186803b158015610c8957600080fd5b505afa158015610c9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc19190611e1d565b90508281600001511115610cd9576000915050610d3c565b8281602001511115610cef576001915050610d3c565b8281604001511115610d05576002915050610d3c565b8281606001511115610d1b576003915050610d3c565b60405162461bcd60e51b8152600401610d339061213e565b60405180910390fd5b92915050565b6000610d4d82611b33565b82610d6f57610d5a611b57565b8260048110610d6557fe5b6020020151610d91565b610d91610d7a611b57565b8360048110610d8557fe5b60200201516000611b91565b9392505050565b6000610b0782610da6611be0565b611a9b565b60408051600680825260e082019092526060918291906020820160c08036833701905050915073ac02030d8a8f49ed04b2f52c394d3f901a10f8a982600081518110610df357fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a982600181518110610e3557fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a982600281518110610e7757fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a982600381518110610eb957fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000082600481518110610f0757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050733150e5a805577366816a1ddc7330c6ea17070c0582600581518110610f4957fe5b6001600160a01b039290921660209283029190910182015260408051600680825260e082019092529182015b6060815260200190600190039081610f75579050509050610f9d886000196000610258611738565b81600081518110610faa57fe5b6020026020010181905250610fc48860001960008061178d565b81600181518110610fd157fe5b6020026020010181905250610ff287610fea86866117e2565b600080611c60565b81600281518110610fff57fe5b602002602001018190525061101a8760006102586000611cb5565b8160038151811061102757fe5b602002602001018190525061103f86846000806118ec565b8160048151811061104c57fe5b6020026020010181905250611078736b175474e89094c44da98b954eedeac495271d0f86600080611949565b8160058151811061108557fe5b6020026020010181905250965096945050505050565b60408051600780825261010082019092526060918291906020820160e08036833701905050915073ac02030d8a8f49ed04b2f52c394d3f901a10f8a9826000815181106110e457fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a98260018151811061112657fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a98260028151811061116857fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a9826003815181106111aa57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073ac02030d8a8f49ed04b2f52c394d3f901a10f8a9826004815181106111ec57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000008260058151811061123a57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050733150e5a805577366816a1ddc7330c6ea17070c058260068151811061127c57fe5b6001600160a01b039290921660209283029190910182015260408051600780825261010082019092529182015b60608152602001906001900390816112a95790505090506112d1896000196000610258611738565b816000815181106112de57fe5b60200260200101819052506112f88960001960008061178d565b8160018151811061130557fe5b602002602001018190525061134f87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611d0a92505050565b8160028151811061135c57fe5b60200260200101819052506113766000610fea86866117e2565b8160038151811061138357fe5b602002602001018190525061139e6000806102586000611cb5565b816004815181106113ab57fe5b60200260200101819052506113c388846000806118ec565b816005815181106113d057fe5b60200260200101819052506113fc736b175474e89094c44da98b954eedeac495271d0f86600080611949565b8160068151811061140957fe5b602002602001018190525097509795505050505050565b602082518161142b57fe5b066004141561164857602082015162461bcd60e51b6001600160e01b0319821614156115865760448301925081836040516020018083805190602001908083835b6020831061148b5780518252601f19909201916020918201910161146c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106114d35780518252601f1990920191602091820191016114b4565b51815160209384036101000a60001901801990921691161790526040805192909401828103601f190183529384905262461bcd60e51b84526004840181815282516024860152825192975095508594506044909301928601915080838360005b8381101561154b578181015183820152602001611533565b50505050905090810190601f1680156115785780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b816040516020018082805190602001908083835b602083106115b95780518252601f19909201916020918201910161159a565b51815160001960209485036101000a0190811690199091161790526e2737a2b93937b929b2b632b1ba37b960891b9390910192835260408051601019818603018152600f85019182905262461bcd60e51b90915260138401828152815160338601528151919650945084936053019250908501908083836000831561154b578181015183820152602001611533565b806040516020018082805190602001908083835b6020831061167b5780518252601f19909201916020918201910161165c565b51815160001960209485036101000a01908116901990911617905273556e657870656374656452657475726e6461746160601b9390910192835260408051600b19818603018152601485019182905262461bcd60e51b90915260188401828152815160388601528151919650945084936058019250908501908083836000831561154b578181015183820152602001611533565b600061171a82611b33565b611722611b57565b826004811061172d57fe5b602002015192915050565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316636af06d1b60e11b179052949350505050565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b03166319d3ec6d60e21b179052949350505050565b80820382811115610d3c576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b604080516001600160a01b0386166024820152604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b031663ce88b43960e01b179052949350505050565b604080516001600160a01b0386166024820152604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316631c5d526160e11b179052949350505050565b604080516001600160a01b0386166024820152604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316631b5dd97960e21b179052949350505050565b604080516001600160a01b0386166024820152604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316630427301d60e31b179052949350505050565b600080836001600160a01b0316632c2cb9fd846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156119ed57600080fd5b505afa158015611a01573d6000803e3d6000fd5b505050506040513d6020811015611a1757600080fd5b505160408051632726b07360e01b81526004810186905290519193506001600160a01b03861691632726b07391602480820192602092909190829003018186803b158015611a6457600080fd5b505afa158015611a78573d6000803e3d6000fd5b505050506040513d6020811015611a8e57600080fd5b5051919491935090915050565b6000811580611ab657505080820282828281611ab357fe5b04145b610d3c576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b6000670de0b6b3a7640000611b24611b168585611a9b565b6706f05b59d3b20000611b91565b81611b2b57fe5b049392505050565b6004811115611b545760405162461bcd60e51b8152600401610d33906120e1565b50565b611b5f611de8565b604051806080016040528062266fd88152602001622feb948152602001623c97b8815260200162424ca8815250905090565b80820182811015610d3c576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b600073169e633a2d1e6c10dd91238ba11c4a708dfef37c6001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2f57600080fd5b505afa158015611c43573d6000803e3d6000fd5b505050506040513d6020811015611c5957600080fd5b5051905090565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b0316632505c3d960e01b179052949350505050565b6040805160248101869052604481018590526064810184905260848082018490528251808303909101815260a49091019091526020810180516001600160e01b031663088eca4160e11b179052949350505050565b60405160206024820181815283516044840152835160609363e4dcb06b60e01b9386939283926064019185019080838360005b83811015611d55578181015183820152602001611d3d565b50505050905090810190601f168015611d825780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990961695909517909452509192505050919050565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b60405180608001604052806004906020820280368337509192915050565b80356001600160a01b0381168114610b0a57600080fd5b600060808284031215611e2e578081fd5b6040516080810181811067ffffffffffffffff82111715611e4b57fe5b8060405250825181526020830151602082015260408301516040820152606083015160608201528091505092915050565b60008060408385031215611e8e578081fd5b82359150611e9e60208401611e06565b90509250929050565b600080600080600060808688031215611ebe578081fd5b8535945060208601359350611ed560408701611e06565b9250606086013567ffffffffffffffff80821115611ef1578283fd5b818801915088601f830112611f04578283fd5b813581811115611f12578384fd5b896020828501011115611f23578384fd5b9699959850939650602001949392505050565b6000815180845260208085019450808401835b83811015611f6e5781516001600160a01b031687529582019590820190600101611f49565b509495945050505050565b60008282518085526020808601955080818302840101818601855b84811015611fc257601f19868403018952611fb0838351611fcf565b98840198925090830190600101611f94565b5090979650505050505050565b60008151808452611fe781602086016020860161219a565b601f01601f19169290920160200192915050565b6000825161200d81846020870161219a565b9190910192915050565b6001600160a01b0391909116815260200190565b600060018060a01b0386168252846020830152836040830152608060608301526120586080830184611fcf565b9695505050505050565b6000604082526120756040830185611f36565b82810360208401526120878185611f79565b95945050505050565b6000606082526120a36060830186611f36565b82810360208401526120b58186611f79565b91505060018060a01b0383166040830152949350505050565b600060208252610d916020830184611fcf565b6020808252603e908201527f4647656c61746f446562744272696467652e5f676574476173436f73744d616b60408201527f6572546f4d616b65723a20696e76616c696420726f75746520696e6465780000606082015260800190565b6020808252602e908201527f4647656c61746f446562744272696467652e5f676574466c6173684c6f616e5260408201526d1bdd5d194e881a5b1b1a5c5d5a5960921b606082015260800190565b918252602082015260400190565b60005b838110156121b557818101518382015260200161219d565b83811115610118575050600091015256fe436f6e6e65637447656c61746f4461746146756c6c526566696e616e63654d616b65722d76312e30436f6e6e65637447656c61746f4461746146756c6c526566696e616e63654d616b65722e5f636173743aa264697066735822122016e13381d3b62adf876904fc6de5be4dc1fa98fa493314ae0e59f807d0289fed64736f6c63430007040033",
"devdoc": {
"kind": "dev",
"methods": {
"connectorID()": {
"details": "Connector Details"
},
"getDataAndCastMakerToCompound(uint256,address)": {
"details": "payable to be compatible in conjunction with DSA.cast payable target",
"params": {
"_colToken": "vault's col token address .",
"_vaultId": "Id of the unsafe vault of the client."
}
},
"getDataAndCastMakerToMaker(uint256,uint256,address,string)": {
"details": "payable to be compatible in conjunction with DSA.cast payable target",
"params": {
"_colToken": "vault's col token address .",
"_colType": "colType of the new vault. example : ETH-B, ETH-A.",
"_vaultAId": "Id of the unsafe vault of the client of Vault A Collateral.",
"_vaultBId": "Id of the vault B Collateral of the client."
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"getDataAndCastMakerToCompound(uint256,address)": {
"notice": "Entry Point for DSA.cast DebtBridge from Maker to Compound"
},
"getDataAndCastMakerToMaker(uint256,uint256,address,string)": {
"notice": "Entry Point for DSA.cast DebtBridge from e.g ETH-A to ETH-B"
}
},
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}