@mean-finance/dca-v2-periphery
Version:
💱 Periphery smart contracts of DCA V2 by mean.finance
226 lines (225 loc) • 6.17 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "ILegacyDCAHub",
"sourceName": "contracts/interfaces/ILegacyDCAHub.sol",
"abi": [
{
"inputs": [
{
"internalType": "address[]",
"name": "tokens",
"type": "address[]"
},
{
"components": [
{
"internalType": "uint8",
"name": "indexTokenA",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "indexTokenB",
"type": "uint8"
}
],
"internalType": "struct IDCAHubSwapHandler.PairIndexes[]",
"name": "pairs",
"type": "tuple[]"
}
],
"name": "getNextSwapInfo",
"outputs": [
{
"components": [
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "reward",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "toProvide",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "platformFee",
"type": "uint256"
}
],
"internalType": "struct ILegacyDCAHub.TokenInSwap[]",
"name": "tokens",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "address",
"name": "tokenA",
"type": "address"
},
{
"internalType": "address",
"name": "tokenB",
"type": "address"
},
{
"internalType": "uint256",
"name": "ratioAToB",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "ratioBToA",
"type": "uint256"
},
{
"internalType": "bytes1",
"name": "intervalsInSwap",
"type": "bytes1"
}
],
"internalType": "struct ILegacyDCAHub.PairInSwap[]",
"name": "pairs",
"type": "tuple[]"
}
],
"internalType": "struct ILegacyDCAHub.SwapInfo",
"name": "swapInformation",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "tokens",
"type": "address[]"
},
{
"components": [
{
"internalType": "uint8",
"name": "indexTokenA",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "indexTokenB",
"type": "uint8"
}
],
"internalType": "struct IDCAHubSwapHandler.PairIndexes[]",
"name": "pairsToSwap",
"type": "tuple[]"
},
{
"internalType": "address",
"name": "rewardRecipient",
"type": "address"
},
{
"internalType": "address",
"name": "callbackHandler",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "borrow",
"type": "uint256[]"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"name": "swap",
"outputs": [
{
"components": [
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "reward",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "toProvide",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "platformFee",
"type": "uint256"
}
],
"internalType": "struct ILegacyDCAHub.TokenInSwap[]",
"name": "tokens",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "address",
"name": "tokenA",
"type": "address"
},
{
"internalType": "address",
"name": "tokenB",
"type": "address"
},
{
"internalType": "uint256",
"name": "ratioAToB",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "ratioBToA",
"type": "uint256"
},
{
"internalType": "bytes1",
"name": "intervalsInSwap",
"type": "bytes1"
}
],
"internalType": "struct ILegacyDCAHub.PairInSwap[]",
"name": "pairs",
"type": "tuple[]"
}
],
"internalType": "struct ILegacyDCAHub.SwapInfo",
"name": "",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}