UNPKG

@augmentedfinance/protocol-v1

Version:

Augmented Protocol smart contracts

397 lines (396 loc) 7.92 kB
[ { "inputs": [ { "internalType": "contract IFlashLoanAddressProvider", "name": "addressesProvider", "type": "address" }, { "internalType": "contract IUniswapV2Router02ForAdapter", "name": "uniswapRouter", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "fromAsset", "type": "address" }, { "indexed": false, "internalType": "address", "name": "toAsset", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "fromAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "receivedAmount", "type": "uint256" } ], "name": "Swapped", "type": "event" }, { "inputs": [], "name": "ADDRESSES_PROVIDER", "outputs": [ { "internalType": "contract IFlashLoanAddressProvider", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ADDRESS_PROVIDER", "outputs": [ { "internalType": "contract IFlashLoanAddressProvider", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "FLASHLOAN_PREMIUM_TOTAL", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "LENDING_POOL", "outputs": [ { "internalType": "contract ILendingPool", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_SLIPPAGE_PERCENT", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ORACLE", "outputs": [ { "internalType": "contract IPriceOracleGetter", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "UNISWAP_ROUTER", "outputs": [ { "internalType": "contract IUniswapV2Router02ForAdapter", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "USD_ADDRESS", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "WETH_ADDRESS", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "assets", "type": "address[]" }, { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "premiums", "type": "uint256[]" }, { "internalType": "address", "name": "initiator", "type": "address" }, { "internalType": "bytes", "name": "params", "type": "bytes" } ], "name": "executeOperation", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountOut", "type": "uint256" }, { "internalType": "address", "name": "reserveIn", "type": "address" }, { "internalType": "address", "name": "reserveOut", "type": "address" } ], "name": "getAmountsIn", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "address[]", "name": "", "type": "address[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "address", "name": "reserveIn", "type": "address" }, { "internalType": "address", "name": "reserveOut", "type": "address" } ], "name": "getAmountsOut", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "address[]", "name": "", "type": "address[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "collateralAsset", "type": "address" }, { "internalType": "address", "name": "debtAsset", "type": "address" }, { "internalType": "uint256", "name": "collateralAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtRepayAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtRateMode", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "internalType": "struct IBaseUniswapAdapter.PermitSignature", "name": "permitSignature", "type": "tuple" }, { "internalType": "bool", "name": "useEthPath", "type": "bool" } ], "name": "swapAndRepay", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "sweepToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]