Contract 0xa4361ff34949bef0605a10ad7b50fe1e22c92e3b 4

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x53e29f0dd3ef4fc07476f195f3e68156bb8ebfd5469faed68d5feba48a9d52e30x60806040162053242022-06-18 18:01:47167 days 12 hrs ago0xc36142c497053c42bdaa14737bf80e71daa984c5 IN  Create: ConnectV2AaveV2Avalanche0 AVAX0.0648486840
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ConnectV2AaveV2Avalanche

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 v2.
 * @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 } from "./interface.sol";

abstract contract AaveResolver is Events, Helpers {
	/**
	 * @dev Deposit AVAX/ERC20_Token.
	 * @notice Deposit a token to Aave v2 for lending / collaterization.
	 * @param token The address of the token to deposit.(For AVAX: 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.getLendingPool());

		bool isAVAX = token == avaxAddr;
		address _token = isAVAX ? wavaxAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

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

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

		aave.deposit(_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 Withdraw AVAX/ERC20_Token.
	 * @notice Withdraw deposited token from Aave v2
	 * @param token The address of the token to withdraw.(For AVAX: 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.getLendingPool());
		bool isAVAX = token == avaxAddr;
		address _token = isAVAX ? wavaxAddr : 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);

		convertWavaxToAvax(isAVAX, tokenContract, _amt);

		setUint(setId, _amt);

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

	/**
	 * @dev Borrow AVAX/ERC20_Token.
	 * @notice Borrow a token using Aave v2
	 * @param token The address of the token to borrow.(For AVAX: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param amt The amount of the token to borrow.
	 * @param rateMode The type of borrow 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.getLendingPool());

		bool isAVAX = token == avaxAddr;
		address _token = isAVAX ? wavaxAddr : token;

		aave.borrow(_token, _amt, rateMode, referralCode, address(this));
		convertWavaxToAvax(isAVAX, TokenInterface(_token), _amt);

		setUint(setId, _amt);

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

	/**
	 * @dev Payback borrowed AVAX/ERC20_Token.
	 * @notice Payback debt owed.
	 * @param token The address of the token to payback.(For AVAX: 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.getLendingPool());

		bool isAVAX = token == avaxAddr;
		address _token = isAVAX ? wavaxAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

		if (_amt == uint256(-1)) {
			uint256 _amtDSA = isAVAX
				? address(this).balance
				: tokenContract.balanceOf(address(this));
			uint256 _amtDebt = getPaybackBalance(_token, rateMode);
			_amt = _amtDSA <= _amtDebt ? _amtDSA : _amtDebt;
		}

		if (isAVAX) convertAvaxToWavax(isAVAX, 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 AVAX/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 AVAX: 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.getLendingPool());

		bool isAVAX = token == avaxAddr;
		address _token = isAVAX ? wavaxAddr : token;

		TokenInterface tokenContract = TokenInterface(_token);

		if (_amt == uint256(-1)) {
			uint256 _amtDSA = isAVAX
				? address(this).balance
				: tokenContract.balanceOf(address(this));
			uint256 _amtDebt = getOnBehalfOfPaybackBalance(
				_token,
				rateMode,
				onBehalfOf
			);
			_amt = _amtDSA <= _amtDebt ? _amtDSA : _amtDebt;
		}

		if (isAVAX) convertAvaxToWavax(isAVAX, 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.getLendingPool());

		for (uint256 i = 0; i < _length; i++) {
			bool isAvax = tokens[i] == avaxAddr;
			address _token = isAvax ? wavaxAddr : tokens[i];

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

		_eventName = "LogEnableCollateral(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 AVAX: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 * @param currentRateMode Current Rate mode. (Stable = 1, Variable = 2)
	 */
	function swapBorrowRateMode(address token, uint256 currentRateMode)
		external
		payable
		returns (string memory _eventName, bytes memory _eventParam)
	{
		AaveInterface aave = AaveInterface(aaveProvider.getLendingPool());

		bool isAVAX = token == avaxAddr;
		address _token = isAVAX ? wavaxAddr : token;

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

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

contract ConnectV2AaveV2Avalanche is AaveResolver {
	string public constant name = "AaveV2-v1.1";
}

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 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 } from "./interfaces.sol";


abstract contract Stores {

  /**
   * @dev Return avax address
   */
  address constant internal avaxAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

  /**
   * @dev Return Wrapped AVAX address
   */
  address constant internal wavaxAddr = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7;

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

  /**
   * @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 { AaveLendingPoolProviderInterface, AaveDataProviderInterface } from "./interface.sol";

abstract contract Helpers is DSMath, Basic {
	/**
	 * @dev Aave Lending Pool Provider
	 */
	AaveLendingPoolProviderInterface internal constant aaveProvider =
		AaveLendingPoolProviderInterface(
			0xb6A86025F0FE1862B372cb0ca18CE3EDe02A318f
		);

	/**
	 * @dev Aave Protocol Data Provider
	 */
	AaveDataProviderInterface internal constant aaveData =
		AaveDataProviderInterface(0x65285E9dfab318f57051ab2b139ccCf232945451);

	/**
	 * @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 AVAX: 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 AVAX: 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 AVAX: 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 AVAX: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
	 */
	function getCollateralBalance(address token)
		internal
		view
		returns (uint256 bal)
	{
		(bal, , , , , , , , ) = aaveData.getUserReserveData(
			token,
			address(this)
		);
	}
}

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 LogSwapRateMode(address indexed token, uint256 rateMode);
	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 deposit(address _asset, uint256 _amount, address _onBehalfOf, uint16 _referralCode) external;
    function withdraw(address _asset, uint256 _amount, address _to) external;
    function borrow(
        address _asset,
        uint256 _amount,
        uint256 _interestRateMode,
        uint16 _referralCode,
        address _onBehalfOf
    ) external;
    function repay(address _asset, uint256 _amount, uint256 _rateMode, address _onBehalfOf) external;
    function setUserUseReserveAsCollateral(address _asset, bool _useAsCollateral) external;
    function swapBorrowRateMode(address _asset, uint256 _rateMode) external;
}

interface AaveLendingPoolProviderInterface {
    function getLendingPool() 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
    );
}

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

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

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) == avaxAddr ? address(this).balance : token.balanceOf(address(this));
    }

    function getTokensDec(TokenInterface buyAddr, TokenInterface sellAddr) internal view returns(uint buyDec, uint sellDec) {
        buyDec = address(buyAddr) == avaxAddr ?  18 : buyAddr.decimals();
        sellDec = address(sellAddr) == avaxAddr ?  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 changeAvaxAddress(address buy, address sell) internal pure returns(TokenInterface _buy, TokenInterface _sell){
        _buy = buy == avaxAddr ? TokenInterface(wavaxAddr) : TokenInterface(buy);
        _sell = sell == avaxAddr ? TokenInterface(wavaxAddr) : TokenInterface(sell);
    }

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

    function convertWavaxToAvax(bool isAvax, TokenInterface token, uint amount) internal {
       if(isAvax) {
            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":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":"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":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":"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":"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":"currentRateMode","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"}]

608060405234801561001057600080fd5b50611c5f806100206000396000f3fe60806040526004361061007b5760003560e01c806394ba89a21161004e57806394ba89a21461029c578063bd1cde59146102c8578063ce88b43914610310578063da2b65c8146103485761007b565b806306fdde03146100805780634532d7761461010a5780634e5e60e7146102205780636abcd3de1461025e575b600080fd5b34801561008c57600080fd5b506100956103b8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101426004803603608081101561012057600080fd5b506001600160a01b0381351690602081013590604081013590606001356103df565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561018357818101518382015260200161016b565b50505050905090810190601f1680156101b05780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156101e35781810151838201526020016101cb565b50505050905090810190601f1680156102105780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b610142600480360360a081101561023657600080fd5b506001600160a01b0381351690602081013590604081013590606081013590608001356106b1565b610142600480360360a081101561027457600080fd5b506001600160a01b03813516906020810135906040810135906060810135906080013561093a565b610142600480360360408110156102b257600080fd5b506001600160a01b038135169060200135610b0a565b610142600480360360c08110156102de57600080fd5b506001600160a01b03813581169160208101359160408201359160608101359091169060808101359060a00135610cb6565b6101426004803603608081101561032657600080fd5b506001600160a01b038135169060208101359060408101359060600135610f60565b6101426004803603602081101561035e57600080fd5b81019060208101813564010000000081111561037957600080fd5b82018360208201111561038b57600080fd5b803590602001918460208302840111640100000000831117156103ad57600080fd5b50909250905061124c565b6040518060400160405280600b81526020016a4161766556322d76312e3160a81b81525081565b60608060006103ee85876114cb565b9050600073b6a86025f0fe1862b372cb0ca18ce3ede02a318f6001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561043f57600080fd5b505afa158015610453573d6000803e3d6000fd5b505050506040513d602081101561046957600080fd5b505190506001600160a01b03881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1460008161049a57896104b0565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c75b905060008190506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561050657600080fd5b505afa15801561051a573d6000803e3d6000fd5b505050506040513d602081101561053057600080fd5b505160408051631a4ca37b60e21b81526001600160a01b038681166004830152602482018a90523060448301529151929350908716916369328dec9160648082019260009290919082900301818387803b15801561058d57600080fd5b505af11580156105a1573d6000803e3d6000fd5b505050506000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156105f457600080fd5b505afa158015610608573d6000803e3d6000fd5b505050506040513d602081101561061e57600080fd5b5051905061062c8183611567565b9650610639858489611573565b6106438a886115e8565b6040518060600160405280602c8152602001611b86602c913998508c878c8c60405160200180856001600160a01b0316815260200184815260200183815260200182815260200194505050505060405160208183030381529060405297505050505050505094509492505050565b60608060006106c085886114cb565b9050600073b6a86025f0fe1862b372cb0ca18ce3ede02a318f6001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561071157600080fd5b505afa158015610725573d6000803e3d6000fd5b505050506040513d602081101561073b57600080fd5b505190506001600160a01b03891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1460008161076c578a610782565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c75b9050806000198514156108345760008361080d57604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156107dc57600080fd5b505afa1580156107f0573d6000803e3d6000fd5b505050506040513d602081101561080657600080fd5b505161080f565b475b9050600061081d848d611665565b90508082111561082d578061082f565b815b965050505b821561084557610845838287611723565b610850818587611782565b6040805163573ade8160e01b81526001600160a01b03848116600483015260248201889052604482018d905230606483015291519186169163573ade819160848082019260009290919082900301818387803b1580156108af57600080fd5b505af11580156108c3573d6000803e3d6000fd5b505050506108d188866115e8565b604051806060016040528060338152602001611bf760339139604080516001600160a01b03909e1660208f01528d81019690965260608d019a909a52505050506080880194909452505060a0808601919091528151808603909101815260c09094019052929050565b606080600061094985886114cb565b9050600073b6a86025f0fe1862b372cb0ca18ce3ede02a318f6001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561099a57600080fd5b505afa1580156109ae573d6000803e3d6000fd5b505050506040513d60208110156109c457600080fd5b505190506001600160a01b03891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146000816109f5578a610a0b565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c75b6040805163a415bcad60e01b81526001600160a01b03808416600483015260248201889052604482018d9052610c9c606483015230608483015291519293509085169163a415bcad9160a48082019260009290919082900301818387803b158015610a7557600080fd5b505af1158015610a89573d6000803e3d6000fd5b50505050610a98828286611573565b610aa287856115e8565b604051806060016040528060328152602001611b5460329139604080516001600160a01b03909d1660208e01528c81019590955260608c01999099525050506080880194909452505060a0808601919091528151808603909101815260c09094019052929050565b606080600073b6a86025f0fe1862b372cb0ca18ce3ede02a318f6001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5c57600080fd5b505afa158015610b70573d6000803e3d6000fd5b505050506040513d6020811015610b8657600080fd5b505190506001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081610bb75786610bcd565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c75b90506000610bdb8288611665565b1115610c5157826001600160a01b03166394ba89a282886040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610c3857600080fd5b505af1158015610c4c573d6000803e3d6000fd5b505050505b505060408051808201825260208082527f4c6f6753776170526174654d6f646528616464726573732c75696e74323536298183015282516001600160a01b03909816908801528682019590955280518087038201815260609096019052509193915050565b6060806000610cc585896114cb565b9050600073b6a86025f0fe1862b372cb0ca18ce3ede02a318f6001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1657600080fd5b505afa158015610d2a573d6000803e3d6000fd5b505050506040513d6020811015610d4057600080fd5b505190506001600160a01b038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14600081610d71578b610d87565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c75b905080600019851415610e3a57600083610e1257604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b158015610de157600080fd5b505afa158015610df5573d6000803e3d6000fd5b505050506040513d6020811015610e0b57600080fd5b5051610e14565b475b90506000610e23848e8e6118c9565b905080821115610e335780610e35565b815b965050505b8215610e4b57610e4b838287611723565b610e56818587611782565b6040805163573ade8160e01b81526001600160a01b03848116600483015260248201889052604482018e90528c8116606483015291519186169163573ade819160848082019260009290919082900301818387803b158015610eb757600080fd5b505af1158015610ecb573d6000803e3d6000fd5b50505050610ed988866115e8565b604051806080016040528060458152602001611bb26045913996508c858c8c8c8c60405160200180876001600160a01b03168152602001868152602001858152602001846001600160a01b03168152602001838152602001828152602001965050505050505060405160208183030381529060405295505050505050965096945050505050565b6060806000610f6f85876114cb565b9050600073b6a86025f0fe1862b372cb0ca18ce3ede02a318f6001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d6020811015610fea57600080fd5b505190506001600160a01b03881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1460008161101b5789611031565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c75b905080821561105d576000198514611049578461104b565b475b9450611058838287611723565b6110e2565b600019851461106c57846110df565b604080516370a0823160e01b815230600482015290516001600160a01b038316916370a08231916024808301926020929190829003018186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b50515b94505b6110ed818587611782565b6040805163e8eda9df60e01b81526001600160a01b03848116600483015260248201889052306044830152610c9c606483015291519186169163e8eda9df9160848082019260009290919082900301818387803b15801561114d57600080fd5b505af1158015611161573d6000803e3d6000fd5b5050505061116e82611997565b6111dd5760408051635a3b74b960e01b81526001600160a01b03848116600483015260016024830152915191861691635a3b74b99160448082019260009290919082900301818387803b1580156111c457600080fd5b505af11580156111d8573d6000803e3d6000fd5b505050505b6111e788866115e8565b6040518060600160405280602b8152602001611b29602b9139604080516001600160a01b03909d1660208e01528c81019690965260608c0199909952505050506080808801949094528051808803909401845260a09096019095525090939092509050565b6060808280611299576040805162461bcd60e51b81526020600482015260146024820152730c0b5d1bdad95b9ccb5b9bdd0b585b1b1bddd95960621b604482015290519081900360640190fd5b600073b6a86025f0fe1862b372cb0ca18ce3ede02a318f6001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112e857600080fd5b505afa1580156112fc573d6000803e3d6000fd5b505050506040513d602081101561131257600080fd5b5051905060005b8281101561143857600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee88888481811061134457fe5b905060200201356001600160a01b03166001600160a01b03161490506000816113885788888481811061137357fe5b905060200201356001600160a01b031661139e565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c75b905060006113ab82611a33565b1180156113be57506113bc81611997565b155b1561142e5760408051635a3b74b960e01b81526001600160a01b03838116600483015260016024830152915191861691635a3b74b99160448082019260009290919082900301818387803b15801561141557600080fd5b505af1158015611429573d6000803e3d6000fd5b505050505b5050600101611319565b506040518060400160405280601e81526020017f4c6f67456e61626c65436f6c6c61746572616c28616464726573735b5d2900008152509350858560405160200180806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509350505050604051602081830303815290604052925050509250929050565b6000821561155e57733254ce8f5b1c82431b8f21df01918342215825c26001600160a01b031663a9c70eaa846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561152d57600080fd5b505af1158015611541573d6000803e3d6000fd5b505050506040513d602081101561155757600080fd5b5051611560565b815b9392505050565b60006115608383611acb565b82156115e357611584828383611782565b816001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156115ca57600080fd5b505af11580156115de573d6000803e3d6000fd5b505050505b505050565b81156116615760408051631878f25160e21b815260048101849052602481018390529051733254ce8f5b1c82431b8f21df01918342215825c2916361e3c94491604480830192600092919082900301818387803b15801561164857600080fd5b505af115801561165c573d6000803e3d6000fd5b505050505b5050565b604080516328dd2d0160e01b81526001600160a01b03841660048201523060248201529051600091829182917365285e9dfab318f57051ab2b139cccf232945451916328dd2d019160448082019261012092909190829003018186803b1580156116ce57600080fd5b505afa1580156116e2573d6000803e3d6000fd5b505050506040513d6101208110156116f957600080fd5b506020810151604090910151909250905060018414611718578061171a565b815b95945050505050565b82156115e357816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561176457600080fd5b505af1158015611778573d6000803e3d6000fd5b5050505050505050565b826001600160a01b031663095ea7b383836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156117d957600080fd5b505af19250505080156117ea575060015b6115e3576040805163095ea7b360e01b81526001600160a01b03848116600483015260006024830181905292519086169263095ea7b3926044808201939182900301818387803b15801561183d57600080fd5b505af1158015611851573d6000803e3d6000fd5b50505050826001600160a01b031663095ea7b383836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156118ac57600080fd5b505af11580156118c0573d6000803e3d6000fd5b505050506115e3565b60008060007365285e9dfab318f57051ab2b139cccf2329454516001600160a01b03166328dd2d0187866040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b03168152602001925050506101206040518083038186803b15801561194157600080fd5b505afa158015611955573d6000803e3d6000fd5b505050506040513d61012081101561196c57600080fd5b50602081015160409091015190925090506001851461198b578061198d565b815b9695505050505050565b604080516328dd2d0160e01b81526001600160a01b038316600482015230602482015290516000917365285e9dfab318f57051ab2b139cccf232945451916328dd2d019160448082019261012092909190829003018186803b1580156119fc57600080fd5b505afa158015611a10573d6000803e3d6000fd5b505050506040513d610120811015611a2757600080fd5b50610100015192915050565b604080516328dd2d0160e01b81526001600160a01b038316600482015230602482015290516000917365285e9dfab318f57051ab2b139cccf232945451916328dd2d019160448082019261012092909190829003018186803b158015611a9857600080fd5b505afa158015611aac573d6000803e3d6000fd5b505050506040513d610120811015611ac357600080fd5b505192915050565b600082821115611b22576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe4c6f674465706f73697428616464726573732c75696e743235362c75696e743235362c75696e74323536294c6f67426f72726f7728616464726573732c75696e743235362c75696e743235362c75696e743235362c75696e74323536294c6f67576974686472617728616464726573732c75696e743235362c75696e743235362c75696e74323536294c6f675061796261636b4f6e426568616c664f6628616464726573732c75696e743235362c75696e743235362c616464726573732c75696e743235362c75696e74323536294c6f675061796261636b28616464726573732c75696e743235362c75696e743235362c75696e743235362c75696e7432353629a2646970667358221220bcb1ac9860eaafb6e2c8022f4a6f11015029b27b810db2993842dca28d80f63764736f6c63430007060033

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.