Contract 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd 4

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xaf67236feb7de48c2e44d554189b0e234530c657dd1a8d76fdd78d83260468900x60806040150108492022-06-18 17:15:59166 days 6 hrs ago0xc36142c497053c42bdaa14737bf80e71daa984c5 IN  Create: ConnectV2AaveV3Arbitrum0 ETH0.013231615525 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xbe623c5a368455dd1af9242f0afaf5bec50523b1294870a8775deaa0c187b452426422252022-12-01 7:37:4115 hrs 40 mins ago 0x4db3d22a2cd01b6208ec62d62dfb3e39482348f2 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0xbe623c5a368455dd1af9242f0afaf5bec50523b1294870a8775deaa0c187b452426422252022-12-01 7:37:4115 hrs 40 mins ago 0x4db3d22a2cd01b6208ec62d62dfb3e39482348f2 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x919f18be45626dea484673bde7816ef07107f5c46f8d948304119d94178610fc425447162022-11-30 21:20:151 day 1 hr ago 0xcbf3b7e6f7f26a71da8c2534415e55949bd035e0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x729a2776617e1f4f27dc4c992f4a49f66962309079a72637b6b9ed6247501df0418884732022-11-28 13:28:253 days 9 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x729a2776617e1f4f27dc4c992f4a49f66962309079a72637b6b9ed6247501df0418884732022-11-28 13:28:253 days 9 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0xd37f61c1da58aea3fd9ce5b7f80511d63a890280d509aedb733ff62f8c7fbfcd418881112022-11-28 13:26:353 days 9 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0xd37f61c1da58aea3fd9ce5b7f80511d63a890280d509aedb733ff62f8c7fbfcd418881112022-11-28 13:26:353 days 9 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x8aa38f8c2aa15bcfaa0630dfbf725979776cd65e41b6f60df934be9b3f438bab417953692022-11-28 5:16:333 days 18 hrs ago 0x8cd2c3d94ba7519da6ceb257770ff9b7e53e5d69 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x67b142de5659460900553c06553735a4277d968e901b80da881aa86abfabea75417483452022-11-28 0:28:443 days 22 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x67b142de5659460900553c06553735a4277d968e901b80da881aa86abfabea75417483452022-11-28 0:28:443 days 22 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x123f7a7a63ca5d39cdd42560cddcb952068f85978ee09d45aaf0f59c2661b143417482032022-11-28 0:27:313 days 22 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x123f7a7a63ca5d39cdd42560cddcb952068f85978ee09d45aaf0f59c2661b143417482032022-11-28 0:27:313 days 22 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x5b0f8103af0d5b3ad0f7c12baeb088c3bb1db94c8d70baa5f78d05b07dd0d600417481072022-11-28 0:26:403 days 22 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x5b0f8103af0d5b3ad0f7c12baeb088c3bb1db94c8d70baa5f78d05b07dd0d600417481072022-11-28 0:26:403 days 22 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x0e0af3ad1a09ddc924451d49bed6f73c393f26c88b2e32241eba01b65677b221412673132022-11-26 4:26:095 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x0e0af3ad1a09ddc924451d49bed6f73c393f26c88b2e32241eba01b65677b221412673132022-11-26 4:26:095 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0xea963a2d0959d0acd478fe49da63a3dd498fb92dfe8115d800fe573356bfc31c412671052022-11-26 4:25:055 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0xea963a2d0959d0acd478fe49da63a3dd498fb92dfe8115d800fe573356bfc31c412671052022-11-26 4:25:055 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x9dc88b97d374bcf760be5578308ffdf6a9e1c50c0d7724fc8051e4c700ab9be3412669712022-11-26 4:24:165 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x9dc88b97d374bcf760be5578308ffdf6a9e1c50c0d7724fc8051e4c700ab9be3412669712022-11-26 4:24:165 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x1a8dd3eb01e3eeb76692f78c96a7522ae7f272e3fb752e2cf24c161039bcd371412667752022-11-26 4:23:065 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x1a8dd3eb01e3eeb76692f78c96a7522ae7f272e3fb752e2cf24c161039bcd371412667752022-11-26 4:23:065 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0xf15ad8ca5fbfbd14c786a731626e11677e1d61b21db0c719323e859d73f3fed2412662382022-11-26 4:19:495 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0xf15ad8ca5fbfbd14c786a731626e11677e1d61b21db0c719323e859d73f3fed2412662382022-11-26 4:19:495 days 18 hrs ago 0xd3692f99aefc0ad608ae9d821d184374d63b17d0 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
0x8c58369c397ad5ffa539da6751f4452f215e8f030652bde5779941054298d9c1412536922022-11-26 3:08:495 days 20 hrs ago 0xc9f1d4a17d91d69809a5b2f4c22ec2c033d8173d 0x09cadcbe6fe623f01b7bc37635b97abf385d46dd0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ConnectV2AaveV3Arbitrum

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : main.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

/**
 * @title Aave v3.
 * @dev Lending & Borrowing.
 */

import { TokenInterface } from "../../../common/interfaces.sol";
import { Stores } from "../../../common/stores.sol";
import { Helpers } from "./helpers.sol";
import { Events } from "./events.sol";
import { AaveInterface, DTokenInterface } from "./interface.sol";

abstract contract AaveResolver is Events, Helpers {
	/**
	 * @dev Deposit ETH/ERC20_Token.
	 * @notice Deposit a token to Aave v2 for lending / collaterization.
	 * @param token The address of the token to deposit.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to deposit. (For max: `uint256(-1)`)
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens deposited.
	 */
	function deposit(
		address token,
		uint256 amt,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _amt = getUint(getId, amt);

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

		if (isEth) {
			_amt = _amt == uint256(-1) ? address(this).balance : _amt;
			convertEthToWeth(isEth, tokenContract, _amt);
		} else {
			_amt = _amt == uint256(-1)
				? tokenContract.balanceOf(address(this))
				: _amt;
		}

		approve(tokenContract, address(aave), _amt);

		aave.supply(_token, _amt, address(this), referralCode);

		if (!getIsColl(_token)) {
			aave.setUserUseReserveAsCollateral(_token, true);
		}

		setUint(setId, _amt);

		_eventName = "LogDeposit(address,uint256,uint256,uint256)";
		_eventParam = abi.encode(token, _amt, getId, setId);
	}

	/**
	 * @dev Deposit ETH/ERC20_Token without collateral
	 * @notice Deposit a token to Aave v3 without enabling it as collateral.
	 * @param token The address of the token to deposit.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to deposit. (For max: `uint256(-1)`)
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens deposited.
	 */
	function depositWithoutCollateral(
		address token,
		uint256 amt,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _amt = getUint(getId, amt);

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

		if (isEth) {
			_amt = _amt == uint256(-1) ? address(this).balance : _amt;
			convertEthToWeth(isEth, tokenContract, _amt);
		} else {
			_amt = _amt == uint256(-1)
				? tokenContract.balanceOf(address(this))
				: _amt;
		}

		approve(tokenContract, address(aave), _amt);

		aave.supply(_token, _amt, address(this), referralCode);

		if (getCollateralBalance(_token) > 0 && getIsColl(_token)) {
			aave.setUserUseReserveAsCollateral(_token, false);
		}

		setUint(setId, _amt);

		_eventName = "LogDepositWithoutCollateral(address,uint256,uint256,uint256)";
		_eventParam = abi.encode(token, _amt, getId, setId);
	}

	/**
	 * @dev Withdraw ETH/ERC20_Token.
	 * @notice Withdraw deposited token from Aave v2
	 * @param token The address of the token to withdraw.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to withdraw. (For max: `uint256(-1)`)
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens withdrawn.
	 */
	function withdraw(
		address token,
		uint256 amt,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _amt = getUint(getId, amt);

		AaveInterface aave = AaveInterface(aaveProvider.getPool());
		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

		uint256 initialBal = tokenContract.balanceOf(address(this));
		aave.withdraw(_token, _amt, address(this));
		uint256 finalBal = tokenContract.balanceOf(address(this));

		_amt = sub(finalBal, initialBal);

		convertWethToEth(isEth, tokenContract, _amt);

		setUint(setId, _amt);

		_eventName = "LogWithdraw(address,uint256,uint256,uint256)";
		_eventParam = abi.encode(token, _amt, getId, setId);
	}

	/**
	 * @dev Borrow ETH/ERC20_Token.
	 * @notice Borrow a token using Aave v2
	 * @param token The address of the token to borrow.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to borrow.
	 * @param rateMode The type of debt. (For Stable: 1, Variable: 2)
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens borrowed.
	 */
	function borrow(
		address token,
		uint256 amt,
		uint256 rateMode,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _amt = getUint(getId, amt);

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		aave.borrow(_token, _amt, rateMode, referralCode, address(this));
		convertWethToEth(isEth, TokenInterface(_token), _amt);

		setUint(setId, _amt);

		_eventName = "LogBorrow(address,uint256,uint256,uint256,uint256)";
		_eventParam = abi.encode(token, _amt, rateMode, getId, setId);
	}

	/**
	 * @dev Borrow ETH/ERC20_Token on behalf of a user.
	 * @notice Borrow a token using Aave v3 on behalf of a user
	 * @param token The address of the token to borrow.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to borrow.
	 * @param rateMode The type of debt. (For Stable: 1, Variable: 2)
	 * @param onBehalfOf The user who will incur the debt
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens borrowed.
	 */
	function borrowOnBehalfOf(
		address token,
		uint256 amt,
		uint256 rateMode,
		address onBehalfOf,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _amt = getUint(getId, amt);

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		aave.borrow(_token, _amt, rateMode, referralCode, onBehalfOf);
		convertWethToEth(isEth, TokenInterface(_token), _amt);

		setUint(setId, _amt);

		_eventName = "LogBorrowOnBehalfOf(address,uint256,uint256,address,uint256,uint256)";
		_eventParam = abi.encode(
			token,
			_amt,
			rateMode,
			onBehalfOf,
			getId,
			setId
		);
	}

	/**
	 * @dev Payback borrowed ETH/ERC20_Token.
	 * @notice Payback debt owed.
	 * @param token The address of the token to payback.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to payback. (For max: `uint256(-1)`)
	 * @param rateMode The type of debt paying back. (For Stable: 1, Variable: 2)
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens paid back.
	 */
	function payback(
		address token,
		uint256 amt,
		uint256 rateMode,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _amt = getUint(getId, amt);

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

		_amt = _amt == uint256(-1) ? getPaybackBalance(_token, rateMode) : _amt;

		if (isEth) convertEthToWeth(isEth, tokenContract, _amt);

		approve(tokenContract, address(aave), _amt);

		aave.repay(_token, _amt, rateMode, address(this));

		setUint(setId, _amt);

		_eventName = "LogPayback(address,uint256,uint256,uint256,uint256)";
		_eventParam = abi.encode(token, _amt, rateMode, getId, setId);
	}

	/**
	 * @dev Payback borrowed ETH/ERC20_Token using aTokens.
	 * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the equivalent debt tokens.
	 * @param token The address of the token to payback.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to payback. (For max: `uint256(-1)`)
	 * @param rateMode The type of debt paying back. (For Stable: 1, Variable: 2)
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens paid back.
	 */
	function paybackWithATokens(
		address token,
		uint256 amt,
		uint256 rateMode,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _amt = getUint(getId, amt);

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

		_amt = _amt == uint256(-1) ? getPaybackBalance(_token, rateMode) : _amt;

		if (isEth) convertEthToWeth(isEth, tokenContract, _amt);

		approve(tokenContract, address(aave), _amt);

		aave.repayWithATokens(_token, _amt, rateMode);

		setUint(setId, _amt);

		_eventName = "LogPayback(address,uint256,uint256,uint256,uint256)";
		_eventParam = abi.encode(token, _amt, rateMode, getId, setId);
	}

	/**
	 * @dev Payback borrowed ETH/ERC20_Token on behalf of a user.
	 * @notice Payback debt owed on behalf os a user.
	 * @param token The address of the token to payback.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to payback. (For max: `uint256(-1)`)
	 * @param rateMode The type of debt paying back. (For Stable: 1, Variable: 2)
	 * @param onBehalfOf Address of user who's debt to repay.
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens paid back.
	 */
	function paybackOnBehalfOf(
		address token,
		uint256 amt,
		uint256 rateMode,
		address onBehalfOf,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _amt = getUint(getId, amt);

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

		_amt = _amt == uint256(-1)
			? getOnBehalfOfPaybackBalance(_token, rateMode, onBehalfOf)
			: _amt;

		if (isEth) convertEthToWeth(isEth, tokenContract, _amt);

		approve(tokenContract, address(aave), _amt);

		aave.repay(_token, _amt, rateMode, onBehalfOf);

		setUint(setId, _amt);

		_eventName = "LogPaybackOnBehalfOf(address,uint256,uint256,address,uint256,uint256)";
		_eventParam = abi.encode(
			token,
			_amt,
			rateMode,
			onBehalfOf,
			getId,
			setId
		);
	}

	/**
	 * @dev Enable collateral
	 * @notice Enable an array of tokens as collateral
	 * @param tokens Array of tokens to enable collateral
	 */
	function enableCollateral(address[] calldata tokens)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _length = tokens.length;
		require(_length > 0, "0-tokens-not-allowed");

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		for (uint256 i = 0; i < _length; i++) {
			bool isEth = tokens[i] == ethAddr;
			address _token = isEth ? wethAddr : tokens[i];

			if (getCollateralBalance(_token) > 0 && !getIsColl(_token)) {
				aave.setUserUseReserveAsCollateral(_token, true);
			}
		}

		_eventName = "LogEnableCollateral(address[])";
		_eventParam = abi.encode(tokens);
	}

	/**
	 * @dev Disable collateral
	 * @notice Disable an array of tokens as collateral
	 * @param tokens Array of tokens to disable as collateral
	 */
	function disableCollateral(address[] calldata tokens)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		uint256 _length = tokens.length;
		require(_length > 0, "0-tokens-not-allowed");

		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		for (uint256 i = 0; i < _length; i++) {
			bool isEth = tokens[i] == ethAddr;
			address _token = isEth ? wethAddr : tokens[i];
			if (getCollateralBalance(_token) > 0 && getIsColl(_token)) {
				aave.setUserUseReserveAsCollateral(_token, false);
			}
		}

		_eventName = "LogDisableCollateral(address[])";
		_eventParam = abi.encode(tokens);
	}

	/**
	 * @dev Swap borrow rate mode
	 * @notice Swaps user borrow rate mode between variable and stable
	 * @param token The address of the token to swap borrow rate.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param rateMode current rate mode. (Stable = 1, Variable = 2)
	 */
	function swapBorrowRateMode(address token, uint256 rateMode)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		if (getPaybackBalance(_token, rateMode) > 0) {
			aave.swapBorrowRateMode(_token, rateMode);
		}

		_eventName = "LogSwapRateMode(address,uint256)";
		_eventParam = abi.encode(token, rateMode);
	}

	/**
	 * @dev Set user e-mode
	 * @notice Updates the user's e-mode category
	 * @param categoryId The category Id of the e-mode user want to set
	 */
	function setUserEMode(uint8 categoryId)
		external
		returns (string memory _eventName, bytes memory _eventParam)
	{
		AaveInterface aave = AaveInterface(aaveProvider.getPool());

		aave.setUserEMode(categoryId);

		_eventName = "LogSetUserEMode(uint8)";
		_eventParam = abi.encode(categoryId);
	}

	/**
	 * @dev Approve Delegation
	 * @notice Gives approval to delegate debt tokens
	 * @param token The address of token
	 * @param amount The amount
	 * @param rateMode The type of debt
	 * @param delegateTo The address to whom the user is delegating
	 * @param getId ID to retrieve amt.
	 * @param setId ID stores the amount of tokens delegated.
	 */
	function delegateBorrow(
		address token,
		uint256 amount,
		uint256 rateMode,
		address delegateTo,
		uint256 getId,
		uint256 setId
	)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		require(rateMode == 1 || rateMode == 2, "Invalid debt type");
		uint256 _amt = getUint(getId, amount);

		bool isEth = token == ethAddr;
		address _token = isEth ? wethAddr : token;

		address _dToken = getDTokenAddr(_token, rateMode);
		DTokenInterface(_dToken).approveDelegation(delegateTo, _amt);

		setUint(setId, _amt);

		_eventName = "LogDelegateBorrow(address,uint256,uint256,address,uint256,uint256)";
		_eventParam = abi.encode(
			token,
			_amt,
			rateMode,
			delegateTo,
			getId,
			setId
		);
	}
}

contract ConnectV2AaveV3Arbitrum is AaveResolver {
	string public constant name = "AaveV3-v1.2";
}

File 2 of 9 : interfaces.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma abicoder v2;

interface TokenInterface {
    function approve(address, uint256) external;
    function transfer(address, uint) external;
    function transferFrom(address, address, uint) external;
    function deposit() external payable;
    function withdraw(uint) external;
    function balanceOf(address) external view returns (uint);
    function decimals() external view returns (uint);
}

interface MemoryInterface {
    function getUint(uint id) external returns (uint num);
    function setUint(uint id, uint val) external;
}

interface InstaMapping {
    function cTokenMapping(address) external view returns (address);
    function gemJoinMapping(bytes32) external view returns (address);
}

interface AccountInterface {
    function enable(address) external;
    function disable(address) external;
    function isAuth(address) external view returns (bool);
}

interface InstaConnectors {
    function isConnectors(string[] calldata) external returns (bool, address[] memory);
}

File 3 of 9 : stores.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

import { MemoryInterface, InstaMapping } from "./interfaces.sol";


abstract contract Stores {

  /**
   * @dev Return ethereum address
   */
  address constant internal ethAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

  /**
   * @dev Return Wrapped ETH address
   */
  address constant internal wethAddr = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1;

  /**
   * @dev Return memory variable address
   */
  MemoryInterface constant internal instaMemory = MemoryInterface(0xc109f7Ef06152c3a63dc7254fD861E612d3Ac571);

  /**
   * @dev Get Uint value from InstaMemory Contract.
   */
  function getUint(uint getId, uint val) internal returns (uint returnVal) {
    returnVal = getId == 0 ? val : instaMemory.getUint(getId);
  }

  /**
  * @dev Set Uint value in InstaMemory Contract.
  */
  function setUint(uint setId, uint val) virtual internal {
    if (setId != 0) instaMemory.setUint(setId, val);
  }

}

File 4 of 9 : helpers.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

import { DSMath } from "../../../common/math.sol";
import { Basic } from "../../../common/basic.sol";
import { AavePoolProviderInterface, AaveDataProviderInterface } from "./interface.sol";

abstract contract Helpers is DSMath, Basic {
	/**
	 * @dev Aave Pool Provider
	 */
	AavePoolProviderInterface internal constant aaveProvider =
		AavePoolProviderInterface(0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb); // Arbitrum address - PoolAddressesProvider

	/**
	 * @dev Aave Pool Data Provider
	 */
	AaveDataProviderInterface internal constant aaveData =
		AaveDataProviderInterface(0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654); //Arbitrum address - PoolDataProvider

	/**
	 * @dev Aave Referral Code
	 */
	uint16 internal constant referralCode = 3228;

	/**
	 * @dev Checks if collateral is enabled for an asset
	 * @param token token address of the asset.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 */

	function getIsColl(address token) internal view returns (bool isCol) {
		(, , , , , , , , isCol) = aaveData.getUserReserveData(
			token,
			address(this)
		);
	}

	/**
	 * @dev Get total debt balance & fee for an asset
	 * @param token token address of the debt.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param rateMode Borrow rate mode (Stable = 1, Variable = 2)
	 */
	function getPaybackBalance(address token, uint256 rateMode)
		internal
		view
		returns (uint256)
	{
		(, uint256 stableDebt, uint256 variableDebt, , , , , , ) = aaveData
			.getUserReserveData(token, address(this));
		return rateMode == 1 ? stableDebt : variableDebt;
	}

	/**
	 * @dev Get OnBehalfOf user's total debt balance & fee for an asset
	 * @param token token address of the debt.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param rateMode Borrow rate mode (Stable = 1, Variable = 2)
	 */
	function getOnBehalfOfPaybackBalance(address token, uint256 rateMode, address onBehalfOf)
		internal
		view
		returns (uint256)
	{
		(, uint256 stableDebt, uint256 variableDebt, , , , , , ) = aaveData
			.getUserReserveData(token, onBehalfOf);
		return rateMode == 1 ? stableDebt : variableDebt;
	}

	/**
	 * @dev Get total collateral balance for an asset
	 * @param token token address of the collateral.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 */
	function getCollateralBalance(address token)
		internal
		view
		returns (uint256 bal)
	{
		(bal, , , , , , , , ) = aaveData.getUserReserveData(
			token,
			address(this)
		);
	}

	/**
	 * @dev Get debt token address for an asset
	 * @param token token address of the asset
	 * @param rateMode Debt type: stable-1, variable-2
	 */
	function getDTokenAddr(address token, uint256 rateMode)
		internal
		view
		returns(address dToken)
	{
		if (rateMode == 1) {
			(, dToken, ) = aaveData.getReserveTokensAddresses(token);
		} else {
			(, , dToken) = aaveData.getReserveTokensAddresses(token);
		}
	}
}

File 5 of 9 : events.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

contract Events {
	event LogDeposit(
		address indexed token,
		uint256 tokenAmt,
		uint256 getId,
		uint256 setId
	);
	event LogWithdraw(
		address indexed token,
		uint256 tokenAmt,
		uint256 getId,
		uint256 setId
	);
	event LogBorrow(
		address indexed token,
		uint256 tokenAmt,
		uint256 indexed rateMode,
		uint256 getId,
		uint256 setId
	);
	event LogPayback(
		address indexed token,
		uint256 tokenAmt,
		uint256 indexed rateMode,
		uint256 getId,
		uint256 setId
	);
	event LogEnableCollateral(address[] tokens);
	event LogDisableCollateral(address[] tokens);
	event LogSwapRateMode(address indexed token, uint256 rateMode);
	event LogSetUserEMode(uint8 categoryId);
	event LogDelegateBorrow(
		address token,
		uint256 amount,
		uint256 rateMode,
		address delegateTo,
		uint256 getId,
		uint256 setId
	);
	event LogDepositWithoutCollateral(
		address token,
		uint256 amt,
		uint256 getId,
		uint256 setId
	);
	event LogBorrowOnBehalfOf(
		address token,
		uint256 amt,
		uint256 rateMode,
		address onBehalfOf,
		uint256 getId,
		uint256 setId
	);
	event LogPaybackOnBehalfOf(
		address token,
		uint256 amt,
		uint256 rateMode,
		address onBehalfOf,
		uint256 getId,
		uint256 setId
	);
}

File 6 of 9 : interface.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

interface AaveInterface {
	function supply(
		address asset,
		uint256 amount,
		address onBehalfOf,
		uint16 referralCode
	) external;

	function withdraw(
		address asset,
		uint256 amount,
		address to
	) external returns (uint256);

	function borrow(
		address asset,
		uint256 amount,
		uint256 interestRateMode,
		uint16 referralCode,
		address onBehalfOf
	) external;

	function repay(
		address asset,
		uint256 amount,
		uint256 interestRateMode,
		address onBehalfOf
	) external returns (uint256);

	function repayWithATokens(
		address asset,
		uint256 amount,
		uint256 interestRateMode
	) external returns (uint256);

	function setUserUseReserveAsCollateral(address asset, bool useAsCollateral)
		external;

	function swapBorrowRateMode(address asset, uint256 interestRateMode)
		external;

	function setUserEMode(uint8 categoryId) external;
}

interface AavePoolProviderInterface {
	function getPool() external view returns (address);
}

interface AaveDataProviderInterface {
	function getReserveTokensAddresses(address _asset)
		external
		view
		returns (
			address aTokenAddress,
			address stableDebtTokenAddress,
			address variableDebtTokenAddress
		);

	function getUserReserveData(address _asset, address _user)
		external
		view
		returns (
			uint256 currentATokenBalance,
			uint256 currentStableDebt,
			uint256 currentVariableDebt,
			uint256 principalStableDebt,
			uint256 scaledVariableDebt,
			uint256 stableBorrowRate,
			uint256 liquidityRate,
			uint40 stableRateLastUpdated,
			bool usageAsCollateralEnabled
		);

	function getReserveEModeCategory(address asset)
		external
		view
		returns (uint256);
}

interface AaveAddressProviderRegistryInterface {
	function getAddressesProvidersList()
		external
		view
		returns (address[] memory);
}

interface ATokenInterface {
	function balanceOf(address _user) external view returns (uint256);
}

interface DTokenInterface {
	function approveDelegation(address delegatee, uint256 amount) external;
}

File 7 of 9 : math.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";

contract DSMath {
  uint constant WAD = 10 ** 18;
  uint constant RAY = 10 ** 27;

  function add(uint x, uint y) internal pure returns (uint z) {
    z = SafeMath.add(x, y);
  }

  function sub(uint x, uint y) internal virtual pure returns (uint z) {
    z = SafeMath.sub(x, y);
  }

  function mul(uint x, uint y) internal pure returns (uint z) {
    z = SafeMath.mul(x, y);
  }

  function div(uint x, uint y) internal pure returns (uint z) {
    z = SafeMath.div(x, y);
  }

  function wmul(uint x, uint y) internal pure returns (uint z) {
    z = SafeMath.add(SafeMath.mul(x, y), WAD / 2) / WAD;
  }

  function wdiv(uint x, uint y) internal pure returns (uint z) {
    z = SafeMath.add(SafeMath.mul(x, WAD), y / 2) / y;
  }

  function rdiv(uint x, uint y) internal pure returns (uint z) {
    z = SafeMath.add(SafeMath.mul(x, RAY), y / 2) / y;
  }

  function rmul(uint x, uint y) internal pure returns (uint z) {
    z = SafeMath.add(SafeMath.mul(x, y), RAY / 2) / RAY;
  }

  function toInt(uint x) internal pure returns (int y) {
    y = int(x);
    require(y >= 0, "int-overflow");
  }

  function toRad(uint wad) internal pure returns (uint rad) {
    rad = mul(wad, 10 ** 27);
  }

}

File 8 of 9 : basic.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

import { TokenInterface } from "./interfaces.sol";
import { Stores } from "./stores.sol";
import { DSMath } from "./math.sol";

abstract contract Basic is DSMath, Stores {

    function convert18ToDec(uint _dec, uint256 _amt) internal pure returns (uint256 amt) {
        amt = (_amt / 10 ** (18 - _dec));
    }

    function convertTo18(uint _dec, uint256 _amt) internal pure returns (uint256 amt) {
        amt = mul(_amt, 10 ** (18 - _dec));
    }

    function getTokenBal(TokenInterface token) internal view returns(uint _amt) {
        _amt = address(token) == ethAddr ? address(this).balance : token.balanceOf(address(this));
    }

    function getTokensDec(TokenInterface buyAddr, TokenInterface sellAddr) internal view returns(uint buyDec, uint sellDec) {
        buyDec = address(buyAddr) == ethAddr ?  18 : buyAddr.decimals();
        sellDec = address(sellAddr) == ethAddr ?  18 : sellAddr.decimals();
    }

    function encodeEvent(string memory eventName, bytes memory eventParam) internal pure returns (bytes memory) {
        return abi.encode(eventName, eventParam);
    }

    function approve(TokenInterface token, address spender, uint256 amount) internal {
        try token.approve(spender, amount) {

        } catch {
            token.approve(spender, 0);
            token.approve(spender, amount);
        }
    }

    function changeEthAddress(address buy, address sell) internal pure returns(TokenInterface _buy, TokenInterface _sell){
        _buy = buy == ethAddr ? TokenInterface(wethAddr) : TokenInterface(buy);
        _sell = sell == ethAddr ? TokenInterface(wethAddr) : TokenInterface(sell);
    }

    function convertEthToWeth(bool isEth, TokenInterface token, uint amount) internal {
        if(isEth) token.deposit{value: amount}();
    }

    function convertWethToEth(bool isEth, TokenInterface token, uint amount) internal {
       if(isEth) {
            approve(token, address(token), amount);
            token.withdraw(amount);
        }
    }
}

File 9 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmt","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"rateMode","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rateMode","type":"uint256"},{"indexed":false,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogBorrowOnBehalfOf","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rateMode","type":"uint256"},{"indexed":false,"internalType":"address","name":"delegateTo","type":"address"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogDelegateBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogDepositWithoutCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"LogDisableCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"LogEnableCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmt","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"rateMode","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogPayback","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rateMode","type":"uint256"},{"indexed":false,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogPaybackOnBehalfOf","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"categoryId","type":"uint8"}],"name":"LogSetUserEMode","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"rateMode","type":"uint256"}],"name":"LogSwapRateMode","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"getId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"setId","type":"uint256"}],"name":"LogWithdraw","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"rateMode","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"borrow","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"rateMode","type":"uint256"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"borrowOnBehalfOf","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rateMode","type":"uint256"},{"internalType":"address","name":"delegateTo","type":"address"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"delegateBorrow","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"depositWithoutCollateral","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"disableCollateral","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"enableCollateral","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"rateMode","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"payback","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"rateMode","type":"uint256"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"paybackOnBehalfOf","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"rateMode","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"paybackWithATokens","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"categoryId","type":"uint8"}],"name":"setUserEMode","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"rateMode","type":"uint256"}],"name":"swapBorrowRateMode","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"},{"internalType":"uint256","name":"getId","type":"uint256"},{"internalType":"uint256","name":"setId","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b50612aff806100206000396000f3fe6080604052600436106100dd5760003560e01c806389952fa11161007f578063ce88b43911610059578063ce88b4391461046d578063da2b65c8146104a5578063fae4202114610515578063fe89c24814610585576100dd565b806389952fa1146103b157806394ba89a2146103f9578063bd1cde5914610425576100dd565b80634e5e60e7116100bb5780634e5e60e7146102af5780636abcd3de146102ed57806377613a8a1461032b57806386b5b44514610369576100dd565b806306fdde03146100e257806328530a471461016c5780634532d77614610277575b600080fd5b3480156100ee57600080fd5b506100f76105bd565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017857600080fd5b506101996004803603602081101561018f57600080fd5b503560ff166105e4565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b838110156101da5781810151838201526020016101c2565b50505050905090810190601f1680156102075780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561023a578181015183820152602001610222565b50505050905090810190601f1680156102675780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b6101996004803603608081101561028d57600080fd5b506001600160a01b03813516906020810135906040810135906060013561071a565b610199600480360360a08110156102c557600080fd5b506001600160a01b0381351690602081013590604081013590606081013590608001356109fc565b610199600480360360a081101561030357600080fd5b506001600160a01b038135169060208101359060408101359060608101359060800135610c07565b610199600480360360a081101561034157600080fd5b506001600160a01b038135169060208101359060408101359060608101359060800135610dd7565b610199600480360360c081101561037f57600080fd5b506001600160a01b03813581169160208101359160408201359160608101359091169060808101359060a00135610f41565b610199600480360360c08110156103c757600080fd5b506001600160a01b03813581169160208101359160408201359160608101359091169060808101359060a0013561111e565b6101996004803603604081101561040f57600080fd5b506001600160a01b0381351690602001356112c2565b610199600480360360c081101561043b57600080fd5b506001600160a01b03813581169160208101359160408201359160608101359091169060808101359060a0013561146e565b6101996004803603608081101561048357600080fd5b506001600160a01b03813516906020810135906040810135906060013561169a565b610199600480360360208110156104bb57600080fd5b8101906020810181356401000000008111156104d657600080fd5b8201836020820111156104e857600080fd5b8035906020019184602083028401116401000000008311171561050a57600080fd5b509092509050611986565b6101996004803603602081101561052b57600080fd5b81019060208101813564010000000081111561054657600080fd5b82018360208201111561055857600080fd5b8035906020019184602083028401116401000000008311171561057a57600080fd5b509092509050611c05565b6101996004803603608081101561059b57600080fd5b506001600160a01b038135169060208101359060408101359060600135611e7f565b6040518060400160405280600b81526020016a20b0bb32ab1996bb18971960a91b81525081565b606080600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561063657600080fd5b505afa15801561064a573d6000803e3d6000fd5b505050506040513d602081101561066057600080fd5b5051604080516328530a4760e01b815260ff8716600482015290519192506001600160a01b038316916328530a479160248082019260009290919082900301818387803b1580156106b057600080fd5b505af11580156106c4573d6000803e3d6000fd5b505060408051808201825260168152754c6f6753657455736572454d6f64652875696e74382960501b602080830191909152825160ff909916898201528251808a03909101815297820190915296945050505050565b6060806000610729858761217c565b9050600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561077a57600080fd5b505afa15801561078e573d6000803e3d6000fd5b505050506040513d60208110156107a457600080fd5b505190506001600160a01b03881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146000816107d557896107eb565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b905060008190506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561084157600080fd5b505afa158015610855573d6000803e3d6000fd5b505050506040513d602081101561086b57600080fd5b505160408051631a4ca37b60e21b81526001600160a01b038681166004830152602482018a90523060448301529151929350908716916369328dec916064808201926020929091908290030181600087803b1580156108c957600080fd5b505af11580156108dd573d6000803e3d6000fd5b505050506040513d60208110156108f357600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b038516916370a0823191602480820192602092909190829003018186803b15801561093f57600080fd5b505afa158015610953573d6000803e3d6000fd5b505050506040513d602081101561096957600080fd5b505190506109778183612218565b9650610984858489612224565b61098e8a88612299565b6040518060600160405280602c81526020016129a0602c913998508c878c8c60405160200180856001600160a01b0316815260200184815260200183815260200182815260200194505050505060405160208183030381529060405297505050505050505094509492505050565b6060806000610a0b858861217c565b9050600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5c57600080fd5b505afa158015610a70573d6000803e3d6000fd5b505050506040513d6020811015610a8657600080fd5b505190506001600160a01b03891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081610ab7578a610acd565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b9050806000198514610adf5784610ae9565b610ae9828b612316565b94508215610afc57610afc8382876123d6565b610b07818587612435565b6040805163573ade8160e01b81526001600160a01b03848116600483015260248201889052604482018d905230606483015291519186169163573ade81916084808201926020929091908290030181600087803b158015610b6757600080fd5b505af1158015610b7b573d6000803e3d6000fd5b505050506040513d6020811015610b9157600080fd5b50610b9e90508886612299565b604051806060016040528060338152602001612a9760339139604080516001600160a01b03909e1660208f01528d81019690965260608d019a909a52505050506080880194909452505060a0808601919091528151808603909101815260c09094019052929050565b6060806000610c16858861217c565b9050600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c6757600080fd5b505afa158015610c7b573d6000803e3d6000fd5b505050506040513d6020811015610c9157600080fd5b505190506001600160a01b03891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081610cc2578a610cd8565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b6040805163a415bcad60e01b81526001600160a01b03808416600483015260248201889052604482018d9052610c9c606483015230608483015291519293509085169163a415bcad9160a48082019260009290919082900301818387803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b50505050610d65828286612224565b610d6f8785612299565b60405180606001604052806032815260200161296e60329139604080516001600160a01b03909d1660208e01528c81019590955260608c01999099525050506080880194909452505060a0808601919091528151808603909101815260c09094019052929050565b6060806000610de6858861217c565b9050600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3757600080fd5b505afa158015610e4b573d6000803e3d6000fd5b505050506040513d6020811015610e6157600080fd5b505190506001600160a01b03891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081610e92578a610ea8565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b9050806000198514610eba5784610ec4565b610ec4828b612316565b94508215610ed757610ed78382876123d6565b610ee2818587612435565b836001600160a01b0316632dad97d483878d6040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050602060405180830381600087803b158015610b6757600080fd5b6060806000610f50858961217c565b9050600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa157600080fd5b505afa158015610fb5573d6000803e3d6000fd5b505050506040513d6020811015610fcb57600080fd5b505190506001600160a01b038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081610ffc578b611012565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b6040805163a415bcad60e01b81526001600160a01b03808416600483015260248201889052604482018e9052610c9c60648301528c8116608483015291519293509085169163a415bcad9160a48082019260009290919082900301818387803b15801561107e57600080fd5b505af1158015611092573d6000803e3d6000fd5b505050506110a1828286612224565b6110ab8785612299565b604051806080016040528060448152602001612a5360449139604080516001600160a01b039e8f16602082015280820196909652606086019b909b529b9098166080840152505060a0810194909452505060c0808301919091528351808303909101815260e09091019092525091929050565b60608085600114806111305750856002145b611175576040805162461bcd60e51b8152602060048201526011602482015270496e76616c69642064656274207479706560781b604482015290519081900360640190fd5b6000611181858961217c565b90506001600160a01b03891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146000816111b0578a6111c6565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b905060006111d4828b61257c565b9050806001600160a01b031663c04a8a108a866040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b5050505061124f8785612299565b604051806080016040528060428152602001612a1160429139604080516001600160a01b039e8f16602082015280820196909652606086019b909b529b9098166080840152505060a0810194909452505060c0808301919091528351808303909101815260e09091019092525091929050565b606080600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d602081101561133e57600080fd5b505190506001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1460008161136f5786611385565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b905060006113938288612316565b111561140957826001600160a01b03166394ba89a282886040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156113f057600080fd5b505af1158015611404573d6000803e3d6000fd5b505050505b505060408051808201825260208082527f4c6f6753776170526174654d6f646528616464726573732c75696e74323536298183015282516001600160a01b03909816908801528682019590955280518087038201815260609096019052509193915050565b606080600061147d858961217c565b9050600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ce57600080fd5b505afa1580156114e2573d6000803e3d6000fd5b505050506040513d60208110156114f857600080fd5b505190506001600160a01b038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081611529578b61153f565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b9050806000198514611551578461155c565b61155c828c8c6126a7565b9450821561156f5761156f8382876123d6565b61157a818587612435565b6040805163573ade8160e01b81526001600160a01b03848116600483015260248201889052604482018e90528c8116606483015291519186169163573ade81916084808201926020929091908290030181600087803b1580156115dc57600080fd5b505af11580156115f0573d6000803e3d6000fd5b505050506040513d602081101561160657600080fd5b5061161390508886612299565b6040518060800160405280604581526020016129cc6045913996508c858c8c8c8c60405160200180876001600160a01b03168152602001868152602001858152602001846001600160a01b03168152602001838152602001828152602001965050505050505060405160208183030381529060405295505050505050965096945050505050565b60608060006116a9858761217c565b9050600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116fa57600080fd5b505afa15801561170e573d6000803e3d6000fd5b505050506040513d602081101561172457600080fd5b505190506001600160a01b03881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081611755578961176b565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b90508082156117975760001985146117835784611785565b475b94506117928382876123d6565b61181c565b60001985146117a65784611819565b604080516370a0823160e01b815230600482015290516001600160a01b038316916370a08231916024808301926020929190829003018186803b1580156117ec57600080fd5b505afa158015611800573d6000803e3d6000fd5b505050506040513d602081101561181657600080fd5b50515b94505b611827818587612435565b6040805163617ba03760e01b81526001600160a01b03848116600483015260248201889052306044830152610c9c606483015291519186169163617ba0379160848082019260009290919082900301818387803b15801561188757600080fd5b505af115801561189b573d6000803e3d6000fd5b505050506118a882612775565b6119175760408051635a3b74b960e01b81526001600160a01b03848116600483015260016024830152915191861691635a3b74b99160448082019260009290919082900301818387803b1580156118fe57600080fd5b505af1158015611912573d6000803e3d6000fd5b505050505b6119218886612299565b6040518060600160405280602b8152602001612907602b9139604080516001600160a01b03909d1660208e01528c81019690965260608c0199909952505050506080808801949094528051808803909401845260a09096019095525090939092509050565b60608082806119d3576040805162461bcd60e51b81526020600482015260146024820152730c0b5d1bdad95b9ccb5b9bdd0b585b1b1bddd95960621b604482015290519081900360640190fd5b600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a2257600080fd5b505afa158015611a36573d6000803e3d6000fd5b505050506040513d6020811015611a4c57600080fd5b5051905060005b82811015611b7257600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee888884818110611a7e57fe5b905060200201356001600160a01b03166001600160a01b0316149050600081611ac257888884818110611aad57fe5b905060200201356001600160a01b0316611ad8565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b90506000611ae582612811565b118015611af85750611af681612775565b155b15611b685760408051635a3b74b960e01b81526001600160a01b03838116600483015260016024830152915191861691635a3b74b99160448082019260009290919082900301818387803b158015611b4f57600080fd5b505af1158015611b63573d6000803e3d6000fd5b505050505b5050600101611a53565b506040518060400160405280601e81526020017f4c6f67456e61626c65436f6c6c61746572616c28616464726573735b5d2900008152509350858560405160200180806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509350505050604051602081830303815290604052925050509250929050565b6060808280611c52576040805162461bcd60e51b81526020600482015260146024820152730c0b5d1bdad95b9ccb5b9bdd0b585b1b1bddd95960621b604482015290519081900360640190fd5b600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ca157600080fd5b505afa158015611cb5573d6000803e3d6000fd5b505050506040513d6020811015611ccb57600080fd5b5051905060005b82811015611dec57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee888884818110611cfd57fe5b905060200201356001600160a01b03166001600160a01b0316149050600081611d4157888884818110611d2c57fe5b905060200201356001600160a01b0316611d57565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b90506000611d6482612811565b118015611d755750611d7581612775565b15611de25760408051635a3b74b960e01b81526001600160a01b038381166004830152600060248301819052925190871692635a3b74b9926044808201939182900301818387803b158015611dc957600080fd5b505af1158015611ddd573d6000803e3d6000fd5b505050505b5050600101611cd2565b506040518060400160405280601f81526020017f4c6f6744697361626c65436f6c6c61746572616c28616464726573735b5d29008152509350858560405160200180806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509350505050604051602081830303815290604052925050509250929050565b6060806000611e8e858761217c565b9050600073a97684ead0e402dc232d5a977953df7ecbab3cdb6001600160a01b031663026b1d5f6040518163ffffffff1660e01b815260040160206040518083038186803b158015611edf57600080fd5b505afa158015611ef3573d6000803e3d6000fd5b505050506040513d6020811015611f0957600080fd5b505190506001600160a01b03881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081611f3a5789611f50565b7382af49447d8a07e3bd95bd0d56f35241523fbab15b9050808215611f7c576000198514611f685784611f6a565b475b9450611f778382876123d6565b612001565b6000198514611f8b5784611ffe565b604080516370a0823160e01b815230600482015290516001600160a01b038316916370a08231916024808301926020929190829003018186803b158015611fd157600080fd5b505afa158015611fe5573d6000803e3d6000fd5b505050506040513d6020811015611ffb57600080fd5b50515b94505b61200c818587612435565b6040805163617ba03760e01b81526001600160a01b03848116600483015260248201889052306044830152610c9c606483015291519186169163617ba0379160848082019260009290919082900301818387803b15801561206c57600080fd5b505af1158015612080573d6000803e3d6000fd5b50505050600061208f83612811565b1180156120a057506120a082612775565b1561210d5760408051635a3b74b960e01b81526001600160a01b038481166004830152600060248301819052925190871692635a3b74b9926044808201939182900301818387803b1580156120f457600080fd5b505af1158015612108573d6000803e3d6000fd5b505050505b6121178886612299565b6040518060600160405280603c8152602001612932603c9139604080516001600160a01b03909d1660208e01528c81019690965260608c0199909952505050506080808801949094528051808803909401845260a09096019095525090939092509050565b6000821561220f5773c109f7ef06152c3a63dc7254fd861e612d3ac5716001600160a01b031663a9c70eaa846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156121de57600080fd5b505af11580156121f2573d6000803e3d6000fd5b505050506040513d602081101561220857600080fd5b5051612211565b815b9392505050565b600061221183836128a9565b821561229457612235828383612435565b816001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561227b57600080fd5b505af115801561228f573d6000803e3d6000fd5b505050505b505050565b81156123125760408051631878f25160e21b81526004810184905260248101839052905173c109f7ef06152c3a63dc7254fd861e612d3ac571916361e3c94491604480830192600092919082900301818387803b1580156122f957600080fd5b505af115801561230d573d6000803e3d6000fd5b505050505b5050565b604080516328dd2d0160e01b81526001600160a01b03841660048201523060248201529051600091829182917369fa688f1dc47d4b5d8029d5a35fb7a548310654916328dd2d019160448082019261012092909190829003018186803b15801561237f57600080fd5b505afa158015612393573d6000803e3d6000fd5b505050506040513d6101208110156123aa57600080fd5b5060208101516040909101519092509050600184146123c957806123cb565b815b925050505b92915050565b821561229457816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561241757600080fd5b505af115801561242b573d6000803e3d6000fd5b5050505050505050565b826001600160a01b031663095ea7b383836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561248c57600080fd5b505af192505050801561249d575060015b612294576040805163095ea7b360e01b81526001600160a01b03848116600483015260006024830181905292519086169263095ea7b3926044808201939182900301818387803b1580156124f057600080fd5b505af1158015612504573d6000803e3d6000fd5b50505050826001600160a01b031663095ea7b383836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561255f57600080fd5b505af1158015612573573d6000803e3d6000fd5b50505050612294565b6000816001141561261757604080516334924edb60e21b81526001600160a01b038516600482015290517369fa688f1dc47d4b5d8029d5a35fb7a5483106549163d2493b6c916024808301926060929190829003018186803b1580156125e157600080fd5b505afa1580156125f5573d6000803e3d6000fd5b505050506040513d606081101561260b57600080fd5b506020015190506123d0565b604080516334924edb60e21b81526001600160a01b038516600482015290517369fa688f1dc47d4b5d8029d5a35fb7a5483106549163d2493b6c916024808301926060929190829003018186803b15801561267157600080fd5b505afa158015612685573d6000803e3d6000fd5b505050506040513d606081101561269b57600080fd5b50604001519392505050565b60008060007369fa688f1dc47d4b5d8029d5a35fb7a5483106546001600160a01b03166328dd2d0187866040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b03168152602001925050506101206040518083038186803b15801561271f57600080fd5b505afa158015612733573d6000803e3d6000fd5b505050506040513d61012081101561274a57600080fd5b506020810151604090910151909250905060018514612769578061276b565b815b9695505050505050565b604080516328dd2d0160e01b81526001600160a01b038316600482015230602482015290516000917369fa688f1dc47d4b5d8029d5a35fb7a548310654916328dd2d019160448082019261012092909190829003018186803b1580156127da57600080fd5b505afa1580156127ee573d6000803e3d6000fd5b505050506040513d61012081101561280557600080fd5b50610100015192915050565b604080516328dd2d0160e01b81526001600160a01b038316600482015230602482015290516000917369fa688f1dc47d4b5d8029d5a35fb7a548310654916328dd2d019160448082019261012092909190829003018186803b15801561287657600080fd5b505afa15801561288a573d6000803e3d6000fd5b505050506040513d6101208110156128a157600080fd5b505192915050565b600082821115612900576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe4c6f674465706f73697428616464726573732c75696e743235362c75696e743235362c75696e74323536294c6f674465706f736974576974686f7574436f6c6c61746572616c28616464726573732c75696e743235362c75696e743235362c75696e74323536294c6f67426f72726f7728616464726573732c75696e743235362c75696e743235362c75696e743235362c75696e74323536294c6f67576974686472617728616464726573732c75696e743235362c75696e743235362c75696e74323536294c6f675061796261636b4f6e426568616c664f6628616464726573732c75696e743235362c75696e743235362c616464726573732c75696e743235362c75696e74323536294c6f6744656c6567617465426f72726f7728616464726573732c75696e743235362c75696e743235362c616464726573732c75696e743235362c75696e74323536294c6f67426f72726f774f6e426568616c664f6628616464726573732c75696e743235362c75696e743235362c616464726573732c75696e743235362c75696e74323536294c6f675061796261636b28616464726573732c75696e743235362c75696e743235362c75696e743235362c75696e7432353629a26469706673582212203876bdd640322b6c0bde900bba4047c1700a25ee247e2b15158d07b69b678cd764736f6c63430007060033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.