Contract 0x2217aec3440e8fd6d49a118b1502e539f88dba55 5

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x570f57e7ef6daaf582c86e5536bc59b738234aef3c9102deeb67d8ba83741483Initialize Lendi...391217982022-11-18 18:24:25468 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.000076480.1
0xd31b15dd47796c4836bc037d8e954390a96cfc0b0aef34fa9393d297f322693cInitialize Lendi...391217882022-11-18 18:24:22468 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.000076480.1
0x25b384be87fba296b527f1ae6e146289c1abf245a29a6e8d1a56250f82965ed8Create Borrowabl...391217582022-11-18 18:24:13468 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.00032310.1
0xdb6d9fdadeeb877cc50308215daf004cc2fa7fa6e918219b2982ee5eb8b6cedcCreate Borrowabl...391217532022-11-18 18:24:09468 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.000323090.1
0xe01a4faa2c19c0224782b39b3ecbc75ed4e06ea1913bfad5e08de916195de0c9Create Collatera...391217432022-11-18 18:24:07468 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.000296520.1
0x50a76e7f27f32e73106d48c3dd52d1cfc94a5b5523649be268180a3d731f872cCreate Borrowabl...391217322022-11-18 18:24:03468 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.00032310.1
0x3b63b9c6e786f18b52b1f6e62d4b87f61bbd351a33a19d2b4cc5be7d3caf64b1Create Borrowabl...391217192022-11-18 18:24:00468 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.000323090.1
0x1d3f6b01b594c8e1d0c3f327bb0cf78bd57bbf743d6af4f5f23eddf64c9d7f0cCreate Collatera...391217112022-11-18 18:23:57468 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.000298230.1
0xf2a5d31ee9fb4d4ea4db68941f191795a8dce707eb2a7532cd6fbe9a2c13fdb5_set Reserves Ma...383600492022-11-15 18:02:56471 days 12 hrs ago0x1e6bf02f5bad0a8aa93df20955feff295d97f969 IN  0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH0.000030530.1
0xbd73de2ac1b13a384b72210e56a1a4ac75a4c902a6a286d33124faa717b2f9a30x60806040383596512022-11-15 18:00:34471 days 12 hrs ago0x5b0390bccca1f040d8993eb6e4ce8ded93721765 IN  Create: Factory0 ETH0.000679060.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa7aa8a5e8419913fe59607e739b2c8434da55395677ba023f8542999d59bb73a720567082023-03-21 8:15:52345 days 22 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x6982cd6cb19c29eba5930075d7109cbda94bfb76ce5b81bc2150469d2f6f736c720528422023-03-21 7:59:57345 days 22 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xb632e22dba36e70ce4cb1924c8796b40ee86cb5fcd7639f4a1b8c680b5020386719838402023-03-21 3:15:15346 days 3 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x5be549376fd6582b29ce0703d5d9bfbd9e2a5cd6f9cc1dfa7f7f806817927f3c719695262023-03-21 2:15:56346 days 4 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x5200f97a442ddc030b5689e736db2d6ed06295e1b4097ada953bba361f0bfbb4719269092023-03-20 23:14:53346 days 7 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xb9d9c8d688fa368880d84900bd71e1ea3437e765e94a158436a665192a1456c5718850782023-03-20 20:15:10346 days 10 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x1ca2901425405f5229592991872770326b45678dc59e97e87bb99ff52105f061718748732023-03-20 19:32:22346 days 11 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x7e438c864fdbfd60d2e269d2ac845b68e3bc2c0c5305acdea8369eaab7917480718251682023-03-20 16:06:35346 days 14 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x9af8a5072052bc832c3d7c28e3d75491caeb31f56bfda5f5c0ad30c262aae03e718250252023-03-20 16:05:59346 days 14 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xab5f923afbd299a5f189b6e5761c7125bb4d0e55a405c0c673b492982cf9ed3b718249962023-03-20 16:05:52346 days 14 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xa01109512595e27340b1c802372e125f77e016177d41a40ea6d12ba8f70dbf1a718127002023-03-20 15:15:13346 days 15 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xd5abd1baa43cf3579235b2d98da386535240109cb8c99b0fc740626da490838f717847602023-03-20 13:20:23346 days 17 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xe43c5cbb6addb08e4ff998363d826a922dd25228f488ad5f0889f737fdb967ad717835792023-03-20 13:15:33346 days 17 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xcc6618863e97b6601e27d172007c78ac256f29467acdf36ac6d9ed915e0268bb717690202023-03-20 12:15:50346 days 18 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xc951a362bfc6e83877c139edfa7e37dc51967ddefdcfb9eb1c27d01ed8db79de717414392023-03-20 10:22:56346 days 20 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xb1f00227b126a69b5b8a6b2ca679853077878bc5403e1ebee6dcaf8193b858c2717102832023-03-20 8:14:46346 days 22 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xfcd538246eccb677bb3ce86cea9de9174f21c39d78fe19fba214ef4759e9721a716917522023-03-20 6:57:40346 days 23 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xdec1a207ee6ea30d798a8646c506917f11a72060a283de8f2102611a5fa4519c716895272023-03-20 6:48:21347 days 4 mins ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x6b9adef8edca418221663ff9e8a219c672f684fe9e0ba5d2102d672634fec36c716462712023-03-20 3:44:54347 days 3 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x46d1bb898066e147e8894587ed146d793e40ffd67675e9c0c58d5a7958a62294716429652023-03-20 3:31:05347 days 3 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x94502c57fd4cfd3f1f1bfa75444651ea4c4f3e79343f4a09b653a2902af47352716404652023-03-20 3:20:43347 days 3 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xed373d2a61a874e77933748cdb0af3408be91016cdbc8728c3332749f12b58e3716391692023-03-20 3:15:15347 days 3 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x9a6f81ebbb4e6050a28699e499ba48ef1a229de128d7c66d43487b368bdd8f31716249102023-03-20 2:15:07347 days 4 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0x6dcdc2917b1fac7e8a4ceec23afe8df2209ee0512f5ed971e916bbb8b49fb383715970552023-03-20 0:15:30347 days 6 hrs ago 0x074e82153303ec002cbd996febd148321e1302ce 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
0xbd8f5e4d75f6ec85c3e15cbda781cc875706496563d36deb3ac85ce40a6ce1fa715954232023-03-20 0:08:39347 days 6 hrs ago 0x38b00d3ffb648f443c3daf16f215f9e99c74baa8 0x2217aec3440e8fd6d49a118b1502e539f88dba550 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Factory

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : Factory.sol
pragma solidity =0.5.16;

import "./interfaces/IFactory.sol";
import "./interfaces/IBDeployer.sol";
import "./interfaces/IBorrowable.sol";
import "./interfaces/ICDeployer.sol";
import "./interfaces/ICollateral.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/ITarotPriceOracle.sol";

contract Factory is IFactory {
    address public admin;
    address public pendingAdmin;
    address public reservesAdmin;
    address public reservesPendingAdmin;
    address public reservesManager;

    struct LendingPool {
        bool initialized;
        uint24 lendingPoolId;
        address collateral;
        address borrowable0;
        address borrowable1;
    }
    mapping(address => LendingPool) public getLendingPool; // get by UniswapV2Pair
    address[] public allLendingPools; // address of the UniswapV2Pair

    function allLendingPoolsLength() external view returns (uint256) {
        return allLendingPools.length;
    }

    IBDeployer public bDeployer;
    ICDeployer public cDeployer;
    ITarotPriceOracle public tarotPriceOracle;

    event LendingPoolInitialized(
        address indexed uniswapV2Pair,
        address indexed token0,
        address indexed token1,
        address collateral,
        address borrowable0,
        address borrowable1,
        uint256 lendingPoolId
    );
    event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);
    event NewAdmin(address oldAdmin, address newAdmin);
    event NewReservesPendingAdmin(
        address oldReservesPendingAdmin,
        address newReservesPendingAdmin
    );
    event NewReservesAdmin(address oldReservesAdmin, address newReservesAdmin);
    event NewReservesManager(
        address oldReservesManager,
        address newReservesManager
    );

    constructor(
        address _admin,
        address _reservesAdmin,
        IBDeployer _bDeployer,
        ICDeployer _cDeployer,
        ITarotPriceOracle _tarotPriceOracle
    ) public {
        admin = _admin;
        reservesAdmin = _reservesAdmin;
        bDeployer = _bDeployer;
        cDeployer = _cDeployer;
        tarotPriceOracle = _tarotPriceOracle;
        emit NewAdmin(address(0), _admin);
        emit NewReservesAdmin(address(0), _reservesAdmin);
    }

    function _getTokens(address uniswapV2Pair)
        private
        view
        returns (address token0, address token1)
    {
        token0 = IUniswapV2Pair(uniswapV2Pair).token0();
        token1 = IUniswapV2Pair(uniswapV2Pair).token1();
    }

    function _createLendingPool(address uniswapV2Pair) private {
        if (getLendingPool[uniswapV2Pair].lendingPoolId != 0) return;
        allLendingPools.push(uniswapV2Pair);
        getLendingPool[uniswapV2Pair] = LendingPool(
            false,
            uint24(allLendingPools.length),
            address(0),
            address(0),
            address(0)
        );
    }

    function createCollateral(address uniswapV2Pair)
        external
        returns (address collateral)
    {
        _getTokens(uniswapV2Pair);
        require(
            getLendingPool[uniswapV2Pair].collateral == address(0),
            "Tarot: ALREADY_EXISTS"
        );
        collateral = cDeployer.deployCollateral(uniswapV2Pair);
        ICollateral(collateral)._setFactory();
        _createLendingPool(uniswapV2Pair);
        getLendingPool[uniswapV2Pair].collateral = collateral;
    }

    function createBorrowable0(address uniswapV2Pair)
        external
        returns (address borrowable0)
    {
        _getTokens(uniswapV2Pair);
        require(
            getLendingPool[uniswapV2Pair].borrowable0 == address(0),
            "Tarot: ALREADY_EXISTS"
        );
        borrowable0 = bDeployer.deployBorrowable(uniswapV2Pair, 0);
        IBorrowable(borrowable0)._setFactory();
        _createLendingPool(uniswapV2Pair);
        getLendingPool[uniswapV2Pair].borrowable0 = borrowable0;
    }

    function createBorrowable1(address uniswapV2Pair)
        external
        returns (address borrowable1)
    {
        _getTokens(uniswapV2Pair);
        require(
            getLendingPool[uniswapV2Pair].borrowable1 == address(0),
            "Tarot: ALREADY_EXISTS"
        );
        borrowable1 = bDeployer.deployBorrowable(uniswapV2Pair, 1);
        IBorrowable(borrowable1)._setFactory();
        _createLendingPool(uniswapV2Pair);
        getLendingPool[uniswapV2Pair].borrowable1 = borrowable1;
    }

    function initializeLendingPool(address uniswapV2Pair) external {
        (address token0, address token1) = _getTokens(uniswapV2Pair);
        LendingPool memory lPool = getLendingPool[uniswapV2Pair];
        require(!lPool.initialized, "Tarot: ALREADY_INITIALIZED");

        require(
            lPool.collateral != address(0),
            "Tarot: COLLATERALIZABLE_NOT_CREATED"
        );
        require(
            lPool.borrowable0 != address(0),
            "Tarot: BORROWABLE0_NOT_CREATED"
        );
        require(
            lPool.borrowable1 != address(0),
            "Tarot: BORROWABLE1_NOT_CREATED"
        );

        (, , , , , bool oracleInitialized) =
            tarotPriceOracle.getPair(uniswapV2Pair);
        if (!oracleInitialized) tarotPriceOracle.initialize(uniswapV2Pair);

        ICollateral(lPool.collateral)._initialize(
            "Tarot Collateral",
            "cTAROT",
            uniswapV2Pair,
            lPool.borrowable0,
            lPool.borrowable1
        );
        IBorrowable(lPool.borrowable0)._initialize(
            "Tarot Borrowable",
            "bTAROT",
            token0,
            lPool.collateral
        );
        IBorrowable(lPool.borrowable1)._initialize(
            "Tarot Borrowable",
            "bTAROT",
            token1,
            lPool.collateral
        );

        getLendingPool[uniswapV2Pair].initialized = true;
        emit LendingPoolInitialized(
            uniswapV2Pair,
            token0,
            token1,
            lPool.collateral,
            lPool.borrowable0,
            lPool.borrowable1,
            lPool.lendingPoolId
        );
    }

    function _setPendingAdmin(address newPendingAdmin) external {
        require(msg.sender == admin, "Tarot: UNAUTHORIZED");
        address oldPendingAdmin = pendingAdmin;
        pendingAdmin = newPendingAdmin;
        emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);
    }

    function _acceptAdmin() external {
        require(msg.sender == pendingAdmin, "Tarot: UNAUTHORIZED");
        address oldAdmin = admin;
        address oldPendingAdmin = pendingAdmin;
        admin = pendingAdmin;
        pendingAdmin = address(0);
        emit NewAdmin(oldAdmin, admin);
        emit NewPendingAdmin(oldPendingAdmin, address(0));
    }

    function _setReservesPendingAdmin(address newReservesPendingAdmin)
        external
    {
        require(msg.sender == reservesAdmin, "Tarot: UNAUTHORIZED");
        address oldReservesPendingAdmin = reservesPendingAdmin;
        reservesPendingAdmin = newReservesPendingAdmin;
        emit NewReservesPendingAdmin(
            oldReservesPendingAdmin,
            newReservesPendingAdmin
        );
    }

    function _acceptReservesAdmin() external {
        require(msg.sender == reservesPendingAdmin, "Tarot: UNAUTHORIZED");
        address oldReservesAdmin = reservesAdmin;
        address oldReservesPendingAdmin = reservesPendingAdmin;
        reservesAdmin = reservesPendingAdmin;
        reservesPendingAdmin = address(0);
        emit NewReservesAdmin(oldReservesAdmin, reservesAdmin);
        emit NewReservesPendingAdmin(oldReservesPendingAdmin, address(0));
    }

    function _setReservesManager(address newReservesManager) external {
        require(msg.sender == reservesAdmin, "Tarot: UNAUTHORIZED");
        address oldReservesManager = reservesManager;
        reservesManager = newReservesManager;
        emit NewReservesManager(oldReservesManager, newReservesManager);
    }
}

File 2 of 9 : IFactory.sol
pragma solidity >=0.5.0;

interface IFactory {
	event LendingPoolInitialized(address indexed uniswapV2Pair, address indexed token0, address indexed token1,
		address collateral, address borrowable0, address borrowable1, uint lendingPoolId);
	event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);
	event NewAdmin(address oldAdmin, address newAdmin);
	event NewReservesPendingAdmin(address oldReservesPendingAdmin, address newReservesPendingAdmin);
	event NewReservesAdmin(address oldReservesAdmin, address newReservesAdmin);
	event NewReservesManager(address oldReservesManager, address newReservesManager);
	
	function admin() external view returns (address);
	function pendingAdmin() external view returns (address);
	function reservesAdmin() external view returns (address);
	function reservesPendingAdmin() external view returns (address);
	function reservesManager() external view returns (address);

	function getLendingPool(address uniswapV2Pair) external view returns (
		bool initialized, 
		uint24 lendingPoolId, 
		address collateral, 
		address borrowable0, 
		address borrowable1
	);
	function allLendingPools(uint) external view returns (address uniswapV2Pair);
	function allLendingPoolsLength() external view returns (uint);
	
	function bDeployer() external view returns (address);
	function cDeployer() external view returns (address);
	function tarotPriceOracle() external view returns (address);

	function createCollateral(address uniswapV2Pair) external returns (address collateral);
	function createBorrowable0(address uniswapV2Pair) external returns (address borrowable0);
	function createBorrowable1(address uniswapV2Pair) external returns (address borrowable1);
	function initializeLendingPool(address uniswapV2Pair) external;

	function _setPendingAdmin(address newPendingAdmin) external;
	function _acceptAdmin() external;
	function _setReservesPendingAdmin(address newPendingAdmin) external;
	function _acceptReservesAdmin() external;
	function _setReservesManager(address newReservesManager) external;
}

File 3 of 9 : IBDeployer.sol
pragma solidity >=0.5.0;

interface IBDeployer {
	function deployBorrowable(address uniswapV2Pair, uint8 index) external returns (address borrowable);
}

File 4 of 9 : IBorrowable.sol
pragma solidity >=0.5.0;

interface IBorrowable {
    /*** Tarot ERC20 ***/

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /*** Pool Token ***/

    event Mint(
        address indexed sender,
        address indexed minter,
        uint256 mintAmount,
        uint256 mintTokens
    );
    event Redeem(
        address indexed sender,
        address indexed redeemer,
        uint256 redeemAmount,
        uint256 redeemTokens
    );
    event Sync(uint256 totalBalance);

    function underlying() external view returns (address);

    function factory() external view returns (address);

    function totalBalance() external view returns (uint256);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function exchangeRate() external returns (uint256);

    function mint(address minter) external returns (uint256 mintTokens);

    function redeem(address redeemer) external returns (uint256 redeemAmount);

    function skim(address to) external;

    function sync() external;

    function _setFactory() external;

    /*** Borrowable ***/

    event BorrowApproval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Borrow(
        address indexed sender,
        address indexed borrower,
        address indexed receiver,
        uint256 borrowAmount,
        uint256 repayAmount,
        uint256 accountBorrowsPrior,
        uint256 accountBorrows,
        uint256 totalBorrows
    );
    event Liquidate(
        address indexed sender,
        address indexed borrower,
        address indexed liquidator,
        uint256 seizeTokens,
        uint256 repayAmount,
        uint256 accountBorrowsPrior,
        uint256 accountBorrows,
        uint256 totalBorrows
    );

    function BORROW_FEE() external pure returns (uint256);

    function collateral() external view returns (address);

    function reserveFactor() external view returns (uint256);

    function exchangeRateLast() external view returns (uint256);

    function borrowIndex() external view returns (uint256);

    function totalBorrows() external view returns (uint256);

    function borrowAllowance(address owner, address spender)
        external
        view
        returns (uint256);

    function borrowBalance(address borrower) external view returns (uint256);

    function borrowTracker() external view returns (address);

    function BORROW_PERMIT_TYPEHASH() external pure returns (bytes32);

    function borrowApprove(address spender, uint256 value)
        external
        returns (bool);

    function borrowPermit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function borrow(
        address borrower,
        address receiver,
        uint256 borrowAmount,
        bytes calldata data
    ) external;

    function liquidate(address borrower, address liquidator)
        external
        returns (uint256 seizeTokens);

    function trackBorrow(address borrower) external;

    /*** Borrowable Interest Rate Model ***/

    event AccrueInterest(
        uint256 interestAccumulated,
        uint256 borrowIndex,
        uint256 totalBorrows
    );
    event CalculateKink(uint256 kinkRate);
    event CalculateBorrowRate(uint256 borrowRate);

    function KINK_BORROW_RATE_MAX() external pure returns (uint256);

    function KINK_BORROW_RATE_MIN() external pure returns (uint256);

    function KINK_MULTIPLIER() external pure returns (uint256);

    function borrowRate() external view returns (uint256);

    function kinkBorrowRate() external view returns (uint256);

    function kinkUtilizationRate() external view returns (uint256);

    function adjustSpeed() external view returns (uint256);

    function rateUpdateTimestamp() external view returns (uint32);

    function accrualTimestamp() external view returns (uint32);

    function accrueInterest() external;

    /*** Borrowable Setter ***/

    event NewReserveFactor(uint256 newReserveFactor);
    event NewKinkUtilizationRate(uint256 newKinkUtilizationRate);
    event NewAdjustSpeed(uint256 newAdjustSpeed);
    event NewBorrowTracker(address newBorrowTracker);

    function RESERVE_FACTOR_MAX() external pure returns (uint256);

    function KINK_UR_MIN() external pure returns (uint256);

    function KINK_UR_MAX() external pure returns (uint256);

    function ADJUST_SPEED_MIN() external pure returns (uint256);

    function ADJUST_SPEED_MAX() external pure returns (uint256);

    function _initialize(
        string calldata _name,
        string calldata _symbol,
        address _underlying,
        address _collateral
    ) external;

    function _setReserveFactor(uint256 newReserveFactor) external;

    function _setKinkUtilizationRate(uint256 newKinkUtilizationRate) external;

    function _setAdjustSpeed(uint256 newAdjustSpeed) external;

    function _setBorrowTracker(address newBorrowTracker) external;
}

File 5 of 9 : ICDeployer.sol
pragma solidity >=0.5.0;

interface ICDeployer {
	function deployCollateral(address uniswapV2Pair) external returns (address collateral);
}

File 6 of 9 : ICollateral.sol
pragma solidity >=0.5.0;

interface ICollateral {
    /*** Tarot ERC20 ***/

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /*** Pool Token ***/

    event Mint(
        address indexed sender,
        address indexed minter,
        uint256 mintAmount,
        uint256 mintTokens
    );
    event Redeem(
        address indexed sender,
        address indexed redeemer,
        uint256 redeemAmount,
        uint256 redeemTokens
    );
    event Sync(uint256 totalBalance);

    function underlying() external view returns (address);

    function factory() external view returns (address);

    function totalBalance() external view returns (uint256);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function exchangeRate() external returns (uint256);

    function mint(address minter) external returns (uint256 mintTokens);

    function redeem(address redeemer) external returns (uint256 redeemAmount);

    function skim(address to) external;

    function sync() external;

    function _setFactory() external;

    /*** Collateral ***/

    function borrowable0() external view returns (address);

    function borrowable1() external view returns (address);

    function tarotPriceOracle() external view returns (address);

    function safetyMarginSqrt() external view returns (uint256);

    function liquidationIncentive() external view returns (uint256);
 
    function liquidationFee() external view returns (uint256);

    function liquidationPenalty() external view returns (uint256);

    function getPrices() external returns (uint256 price0, uint256 price1);

    function tokensUnlocked(address from, uint256 value)
        external
        returns (bool);

    function accountLiquidityAmounts(
        address account,
        uint256 amount0,
        uint256 amount1
    ) external returns (uint256 liquidity, uint256 shortfall);

    function accountLiquidity(address account)
        external
        returns (uint256 liquidity, uint256 shortfall);

    function canBorrow(
        address account,
        address borrowable,
        uint256 accountBorrows
    ) external returns (bool);

    function seize(
        address liquidator,
        address borrower,
        uint256 repayAmount
    ) external returns (uint256 seizeTokens);

    function flashRedeem(
        address redeemer,
        uint256 redeemAmount,
        bytes calldata data
    ) external;

    /*** Collateral Setter ***/

    event NewSafetyMargin(uint256 newSafetyMarginSqrt);
    event NewLiquidationIncentive(uint256 newLiquidationIncentive);
    event NewLiquidationFee(uint256 newLiquidationFee);

    function SAFETY_MARGIN_SQRT_MIN() external pure returns (uint256);

    function SAFETY_MARGIN_SQRT_MAX() external pure returns (uint256);

    function LIQUIDATION_INCENTIVE_MIN() external pure returns (uint256);

    function LIQUIDATION_INCENTIVE_MAX() external pure returns (uint256);

    function LIQUIDATION_FEE_MAX() external pure returns (uint256);

    function _initialize(
        string calldata _name,
        string calldata _symbol,
        address _underlying,
        address _borrowable0,
        address _borrowable1
    ) external;

    function _setSafetyMarginSqrt(uint256 newSafetyMarginSqrt) external;

    function _setLiquidationIncentive(uint256 newLiquidationIncentive) external;

    function _setLiquidationFee(uint256 newLiquidationFee) external;
}

File 7 of 9 : IERC20.sol
pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

File 8 of 9 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
	
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);

    function price0CumulativeLast() external view returns (uint);
}

File 9 of 9 : ITarotPriceOracle.sol
pragma solidity >=0.5.0;

interface ITarotPriceOracle {
    event PriceUpdate(
        address indexed pair,
        uint256 priceCumulative,
        uint32 blockTimestamp,
        bool latestIsSlotA
    );

    function MIN_T() external pure returns (uint32);

    function getPair(address uniswapV2Pair)
        external
        view
        returns (
            uint256 priceCumulativeSlotA,
            uint256 priceCumulativeSlotB,
            uint32 lastUpdateSlotA,
            uint32 lastUpdateSlotB,
            bool latestIsSlotA,
            bool initialized
        );

    function initialize(address uniswapV2Pair) external;

    function getResult(address uniswapV2Pair)
        external
        returns (uint224 price, uint32 T);
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_reservesAdmin","type":"address"},{"internalType":"contract IBDeployer","name":"_bDeployer","type":"address"},{"internalType":"contract ICDeployer","name":"_cDeployer","type":"address"},{"internalType":"contract ITarotPriceOracle","name":"_tarotPriceOracle","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"uniswapV2Pair","type":"address"},{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"collateral","type":"address"},{"indexed":false,"internalType":"address","name":"borrowable0","type":"address"},{"indexed":false,"internalType":"address","name":"borrowable1","type":"address"},{"indexed":false,"internalType":"uint256","name":"lendingPoolId","type":"uint256"}],"name":"LendingPoolInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPendingAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"NewPendingAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldReservesAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newReservesAdmin","type":"address"}],"name":"NewReservesAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldReservesManager","type":"address"},{"indexed":false,"internalType":"address","name":"newReservesManager","type":"address"}],"name":"NewReservesManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldReservesPendingAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newReservesPendingAdmin","type":"address"}],"name":"NewReservesPendingAdmin","type":"event"},{"constant":false,"inputs":[],"name":"_acceptAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"_acceptReservesAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"_setPendingAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newReservesManager","type":"address"}],"name":"_setReservesManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newReservesPendingAdmin","type":"address"}],"name":"_setReservesPendingAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allLendingPools","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allLendingPoolsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bDeployer","outputs":[{"internalType":"contract IBDeployer","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cDeployer","outputs":[{"internalType":"contract ICDeployer","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"}],"name":"createBorrowable0","outputs":[{"internalType":"address","name":"borrowable0","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"}],"name":"createBorrowable1","outputs":[{"internalType":"address","name":"borrowable1","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"}],"name":"createCollateral","outputs":[{"internalType":"address","name":"collateral","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getLendingPool","outputs":[{"internalType":"bool","name":"initialized","type":"bool"},{"internalType":"uint24","name":"lendingPoolId","type":"uint24"},{"internalType":"address","name":"collateral","type":"address"},{"internalType":"address","name":"borrowable0","type":"address"},{"internalType":"address","name":"borrowable1","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"}],"name":"initializeLendingPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"reservesAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"reservesManager","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"reservesPendingAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tarotPriceOracle","outputs":[{"internalType":"contract ITarotPriceOracle","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051611686380380611686833981810160405260a081101561003357600080fd5b5080516020808301516040808501516060860151608090960151600080546001600160a01b03199081166001600160a01b03808a169182178455600280548416828a16179055600780548416828816179055600880548416828d161790556009805490931690851617909155845191825295810195909552825195969395919490927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92918290030190a160408051600081526001600160a01b038616602082015281517fa328ba21363a99cbf330243928bb26a15acf20bf43166ef838e67ff5d84d4ae7929181900390910190a15050505050611550806101366000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80639e1348e3116100ad578063d407112711610071578063d4071127146102e8578063db5a269014610305578063e9c714f21461030d578063eb5ab75f14610315578063f851a4401461033b5761012c565b80639e1348e314610248578063b1ccc03e14610250578063b658ca7514610276578063b71d1a0c1461029c578063cbed6d71146102c25761012c565b806349a78838116100f457806349a78838146101ee578063714c0206146102145780637a4660d51461022e578063822d73b214610236578063998c077d1461023e5761012c565b80630572bf5f1461013157806323c6145d1461019457806326782247146101d6578063345ef941146101de57806334fb08a8146101e6575b600080fd5b6101576004803603602081101561014757600080fd5b50356001600160a01b0316610343565b60408051951515865262ffffff90941660208601526001600160a01b03928316858501529082166060850152166080830152519081900360a00190f35b6101ba600480360360208110156101aa57600080fd5b50356001600160a01b031661038a565b604080516001600160a01b039092168252519081900360200190f35b6101ba610524565b6101ba610533565b6101ba610542565b6101ba6004803603602081101561020457600080fd5b50356001600160a01b0316610551565b61021c6106e5565b60408051918252519081900360200190f35b6101ba6106eb565b6101ba6106fa565b610246610709565b005b6101ba610811565b6102466004803603602081101561026657600080fd5b50356001600160a01b0316610820565b6102466004803603602081101561028c57600080fd5b50356001600160a01b03166108d8565b610246600480360360208110156102b257600080fd5b50356001600160a01b0316610e6f565b6101ba600480360360208110156102d857600080fd5b50356001600160a01b0316610f27565b6101ba600480360360208110156102fe57600080fd5b50356110b9565b6101ba6110e0565b6102466110ef565b6102466004803603602081101561032b57600080fd5b50356001600160a01b03166111f7565b6101ba6112af565b60056020526000908152604090208054600182015460029092015460ff82169262ffffff610100840416926001600160a01b03640100000000909104811692918116911685565b6000610395826112be565b50506001600160a01b0382811660009081526005602052604090205464010000000090041615610404576040805162461bcd60e51b81526020600482015260156024820152745461726f743a20414c52454144595f45584953545360581b604482015290519081900360640190fd5b60085460408051637924fedd60e01b81526001600160a01b03858116600483015291519190921691637924fedd9160248083019260209291908290030181600087803b15801561045357600080fd5b505af1158015610467573d6000803e3d6000fd5b505050506040513d602081101561047d57600080fd5b5051604080516312974c5b60e21b815290519192506001600160a01b03831691634a5d316c9160048082019260009290919082900301818387803b1580156104c457600080fd5b505af11580156104d8573d6000803e3d6000fd5b505050506104e58261139e565b6001600160a01b039182166000908152600560205260409020805492821664010000000002640100000000600160c01b03199093169290921790915590565b6001546001600160a01b031681565b6004546001600160a01b031681565b6009546001600160a01b031681565b600061055c826112be565b50506001600160a01b0382811660009081526005602052604090206001015416156105c6576040805162461bcd60e51b81526020600482015260156024820152745461726f743a20414c52454144595f45584953545360581b604482015290519081900360640190fd5b600754604080516354bcd7ad60e01b81526001600160a01b03858116600483015260006024830181905292519316926354bcd7ad92604480840193602093929083900390910190829087803b15801561061e57600080fd5b505af1158015610632573d6000803e3d6000fd5b505050506040513d602081101561064857600080fd5b5051604080516312974c5b60e21b815290519192506001600160a01b03831691634a5d316c9160048082019260009290919082900301818387803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506106b08261139e565b6001600160a01b03918216600090815260056020526040902060010180546001600160a01b0319169282169290921790915590565b60065490565b6008546001600160a01b031681565b6002546001600160a01b031681565b6003546001600160a01b0316331461075e576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b60028054600380546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fa328ba21363a99cbf330243928bb26a15acf20bf43166ef838e67ff5d84d4ae792908290030190a1604080516001600160a01b03831681526000602082015281517f01d5e27ed5584d16c62ba1a14cfde0783f979d4797a3fc41342aff17d8ef5b41929181900390910190a15050565b6003546001600160a01b031681565b6002546001600160a01b03163314610875576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b600380546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f01d5e27ed5584d16c62ba1a14cfde0783f979d4797a3fc41342aff17d8ef5b41929181900390910190a15050565b6000806108e4836112be565b915091506108f06114ca565b506001600160a01b03808416600090815260056020908152604091829020825160a081018452815460ff8116158015835262ffffff610100830416948301949094526401000000009004851693810193909352600181015484166060840152600201549092166080820152906109ad576040805162461bcd60e51b815260206004820152601a60248201527f5461726f743a20414c52454144595f494e495449414c495a4544000000000000604482015290519081900360640190fd5b60408101516001600160a01b03166109f65760405162461bcd60e51b81526004018080602001828103825260238152602001806114f96023913960400191505060405180910390fd5b60608101516001600160a01b0316610a55576040805162461bcd60e51b815260206004820152601e60248201527f5461726f743a20424f52524f5741424c45305f4e4f545f435245415445440000604482015290519081900360640190fd5b60808101516001600160a01b0316610ab4576040805162461bcd60e51b815260206004820152601e60248201527f5461726f743a20424f52524f5741424c45315f4e4f545f435245415445440000604482015290519081900360640190fd5b60095460408051630d3c450160e11b81526001600160a01b03878116600483015291516000939290921691631a788a029160248082019260c092909190829003018186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d60c0811015610b2f57600080fd5b5060a00151905080610ba2576009546040805163189acdbd60e31b81526001600160a01b0388811660048301529151919092169163c4d66de891602480830192600092919082900301818387803b158015610b8957600080fd5b505af1158015610b9d573d6000803e3d6000fd5b505050505b60408083015160608401516080850151835163c548e3c560e01b81526001600160a01b038a811660448301529283166064820152908216608482015260a06004820152601060a48201526f15185c9bdd0810dbdb1b185d195c985b60821b60c482015260e06024820152600660e48201526518d5105493d560d21b610104820152925191169163c548e3c59161012480830192600092919082900301818387803b158015610c4f57600080fd5b505af1158015610c63573d6000803e3d6000fd5b50505060608301516040808501518151636a030c1160e01b81526001600160a01b038981166044830152918216606482015260806004820152601060848201526f5461726f7420426f72726f7761626c6560801b60a482015260c06024820152600660c4820152651895105493d560d21b60e4820152915192169250636a030c119161010480830192600092919082900301818387803b158015610d0657600080fd5b505af1158015610d1a573d6000803e3d6000fd5b505050506080828101516040808501518151636a030c1160e01b81526001600160a01b03888116604483015291821660648201526004810194909452601060848501526f5461726f7420426f72726f7761626c6560801b60a485015260c06024850152600660c4850152651895105493d560d21b60e48501529051911691636a030c119161010480830192600092919082900301818387803b158015610dbf57600080fd5b505af1158015610dd3573d6000803e3d6000fd5b5050506001600160a01b03808716600081815260056020908152604091829020805460ff19166001179055868201516060808901516080808b01518b8601518751958a168652928916958501959095529387168386015262ffffff169082015291518885169550938916937f4c3ab495dc8ebd1b2f3232d7632e54411bc7e4d111475e7fbbd5547d9a28c4959281900390910190a45050505050565b6000546001600160a01b03163314610ec4576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a15050565b6000610f32826112be565b50506001600160a01b038281166000908152600560205260409020600201541615610f9c576040805162461bcd60e51b81526020600482015260156024820152745461726f743a20414c52454144595f45584953545360581b604482015290519081900360640190fd5b600754604080516354bcd7ad60e01b81526001600160a01b03858116600483015260016024830152915191909216916354bcd7ad9160448083019260209291908290030181600087803b158015610ff257600080fd5b505af1158015611006573d6000803e3d6000fd5b505050506040513d602081101561101c57600080fd5b5051604080516312974c5b60e21b815290519192506001600160a01b03831691634a5d316c9160048082019260009290919082900301818387803b15801561106357600080fd5b505af1158015611077573d6000803e3d6000fd5b505050506110848261139e565b6001600160a01b03918216600090815260056020526040902060020180546001600160a01b0319169282169290921790915590565b600681815481106110c657fe5b6000918252602090912001546001600160a01b0316905081565b6007546001600160a01b031681565b6001546001600160a01b03163314611144576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1604080516001600160a01b03831681526000602082015281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a15050565b6002546001600160a01b0316331461124c576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b600480546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f324bacfad26225895fcf55780481bec4ce49013c92500fa1c25626ff43fbf661929181900390910190a15050565b6000546001600160a01b031681565b600080826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fa57600080fd5b505afa15801561130e573d6000803e3d6000fd5b505050506040513d602081101561132457600080fd5b50516040805163d21220a760e01b815290519193506001600160a01b0385169163d21220a791600480820192602092909190829003018186803b15801561136a57600080fd5b505afa15801561137e573d6000803e3d6000fd5b505050506040513d602081101561139457600080fd5b5051919391925050565b6001600160a01b038116600090815260056020526040902054610100900462ffffff16156113cb576114c7565b60068054600181810183557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b038086166001600160a01b031992831681179093556040805160a0810182526000808252965462ffffff90811660208381019182528385018a8152606085018b8152608086018c8152998c526005909252949099209251835491519451861664010000000002640100000000600160c01b0319959093166101000263ffffff001991151560ff199093169290921716179290921691909117815594519385018054948216948316949094179093559051600290930180549390921692169190911790555b50565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe5461726f743a20434f4c4c41544552414c495a41424c455f4e4f545f43524541544544a265627a7a723158207cd1d0e402d081fc6d31d5382a6ed34b915b7d6627cda7a2bda724aa6d21b33c64736f6c634300051000320000000000000000000000001bb4e4fc22b4e2470a05b60c2943f88b832cea100000000000000000000000001e6bf02f5bad0a8aa93df20955feff295d97f9690000000000000000000000006108feaa628155b073150f408d0b390ec3121834000000000000000000000000b6193df61351736e5190bf1deb2e4f0769bd1bf2000000000000000000000000d4a6a05081fd270dc111332845a778a49fe01741

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80639e1348e3116100ad578063d407112711610071578063d4071127146102e8578063db5a269014610305578063e9c714f21461030d578063eb5ab75f14610315578063f851a4401461033b5761012c565b80639e1348e314610248578063b1ccc03e14610250578063b658ca7514610276578063b71d1a0c1461029c578063cbed6d71146102c25761012c565b806349a78838116100f457806349a78838146101ee578063714c0206146102145780637a4660d51461022e578063822d73b214610236578063998c077d1461023e5761012c565b80630572bf5f1461013157806323c6145d1461019457806326782247146101d6578063345ef941146101de57806334fb08a8146101e6575b600080fd5b6101576004803603602081101561014757600080fd5b50356001600160a01b0316610343565b60408051951515865262ffffff90941660208601526001600160a01b03928316858501529082166060850152166080830152519081900360a00190f35b6101ba600480360360208110156101aa57600080fd5b50356001600160a01b031661038a565b604080516001600160a01b039092168252519081900360200190f35b6101ba610524565b6101ba610533565b6101ba610542565b6101ba6004803603602081101561020457600080fd5b50356001600160a01b0316610551565b61021c6106e5565b60408051918252519081900360200190f35b6101ba6106eb565b6101ba6106fa565b610246610709565b005b6101ba610811565b6102466004803603602081101561026657600080fd5b50356001600160a01b0316610820565b6102466004803603602081101561028c57600080fd5b50356001600160a01b03166108d8565b610246600480360360208110156102b257600080fd5b50356001600160a01b0316610e6f565b6101ba600480360360208110156102d857600080fd5b50356001600160a01b0316610f27565b6101ba600480360360208110156102fe57600080fd5b50356110b9565b6101ba6110e0565b6102466110ef565b6102466004803603602081101561032b57600080fd5b50356001600160a01b03166111f7565b6101ba6112af565b60056020526000908152604090208054600182015460029092015460ff82169262ffffff610100840416926001600160a01b03640100000000909104811692918116911685565b6000610395826112be565b50506001600160a01b0382811660009081526005602052604090205464010000000090041615610404576040805162461bcd60e51b81526020600482015260156024820152745461726f743a20414c52454144595f45584953545360581b604482015290519081900360640190fd5b60085460408051637924fedd60e01b81526001600160a01b03858116600483015291519190921691637924fedd9160248083019260209291908290030181600087803b15801561045357600080fd5b505af1158015610467573d6000803e3d6000fd5b505050506040513d602081101561047d57600080fd5b5051604080516312974c5b60e21b815290519192506001600160a01b03831691634a5d316c9160048082019260009290919082900301818387803b1580156104c457600080fd5b505af11580156104d8573d6000803e3d6000fd5b505050506104e58261139e565b6001600160a01b039182166000908152600560205260409020805492821664010000000002640100000000600160c01b03199093169290921790915590565b6001546001600160a01b031681565b6004546001600160a01b031681565b6009546001600160a01b031681565b600061055c826112be565b50506001600160a01b0382811660009081526005602052604090206001015416156105c6576040805162461bcd60e51b81526020600482015260156024820152745461726f743a20414c52454144595f45584953545360581b604482015290519081900360640190fd5b600754604080516354bcd7ad60e01b81526001600160a01b03858116600483015260006024830181905292519316926354bcd7ad92604480840193602093929083900390910190829087803b15801561061e57600080fd5b505af1158015610632573d6000803e3d6000fd5b505050506040513d602081101561064857600080fd5b5051604080516312974c5b60e21b815290519192506001600160a01b03831691634a5d316c9160048082019260009290919082900301818387803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506106b08261139e565b6001600160a01b03918216600090815260056020526040902060010180546001600160a01b0319169282169290921790915590565b60065490565b6008546001600160a01b031681565b6002546001600160a01b031681565b6003546001600160a01b0316331461075e576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b60028054600380546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fa328ba21363a99cbf330243928bb26a15acf20bf43166ef838e67ff5d84d4ae792908290030190a1604080516001600160a01b03831681526000602082015281517f01d5e27ed5584d16c62ba1a14cfde0783f979d4797a3fc41342aff17d8ef5b41929181900390910190a15050565b6003546001600160a01b031681565b6002546001600160a01b03163314610875576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b600380546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f01d5e27ed5584d16c62ba1a14cfde0783f979d4797a3fc41342aff17d8ef5b41929181900390910190a15050565b6000806108e4836112be565b915091506108f06114ca565b506001600160a01b03808416600090815260056020908152604091829020825160a081018452815460ff8116158015835262ffffff610100830416948301949094526401000000009004851693810193909352600181015484166060840152600201549092166080820152906109ad576040805162461bcd60e51b815260206004820152601a60248201527f5461726f743a20414c52454144595f494e495449414c495a4544000000000000604482015290519081900360640190fd5b60408101516001600160a01b03166109f65760405162461bcd60e51b81526004018080602001828103825260238152602001806114f96023913960400191505060405180910390fd5b60608101516001600160a01b0316610a55576040805162461bcd60e51b815260206004820152601e60248201527f5461726f743a20424f52524f5741424c45305f4e4f545f435245415445440000604482015290519081900360640190fd5b60808101516001600160a01b0316610ab4576040805162461bcd60e51b815260206004820152601e60248201527f5461726f743a20424f52524f5741424c45315f4e4f545f435245415445440000604482015290519081900360640190fd5b60095460408051630d3c450160e11b81526001600160a01b03878116600483015291516000939290921691631a788a029160248082019260c092909190829003018186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d60c0811015610b2f57600080fd5b5060a00151905080610ba2576009546040805163189acdbd60e31b81526001600160a01b0388811660048301529151919092169163c4d66de891602480830192600092919082900301818387803b158015610b8957600080fd5b505af1158015610b9d573d6000803e3d6000fd5b505050505b60408083015160608401516080850151835163c548e3c560e01b81526001600160a01b038a811660448301529283166064820152908216608482015260a06004820152601060a48201526f15185c9bdd0810dbdb1b185d195c985b60821b60c482015260e06024820152600660e48201526518d5105493d560d21b610104820152925191169163c548e3c59161012480830192600092919082900301818387803b158015610c4f57600080fd5b505af1158015610c63573d6000803e3d6000fd5b50505060608301516040808501518151636a030c1160e01b81526001600160a01b038981166044830152918216606482015260806004820152601060848201526f5461726f7420426f72726f7761626c6560801b60a482015260c06024820152600660c4820152651895105493d560d21b60e4820152915192169250636a030c119161010480830192600092919082900301818387803b158015610d0657600080fd5b505af1158015610d1a573d6000803e3d6000fd5b505050506080828101516040808501518151636a030c1160e01b81526001600160a01b03888116604483015291821660648201526004810194909452601060848501526f5461726f7420426f72726f7761626c6560801b60a485015260c06024850152600660c4850152651895105493d560d21b60e48501529051911691636a030c119161010480830192600092919082900301818387803b158015610dbf57600080fd5b505af1158015610dd3573d6000803e3d6000fd5b5050506001600160a01b03808716600081815260056020908152604091829020805460ff19166001179055868201516060808901516080808b01518b8601518751958a168652928916958501959095529387168386015262ffffff169082015291518885169550938916937f4c3ab495dc8ebd1b2f3232d7632e54411bc7e4d111475e7fbbd5547d9a28c4959281900390910190a45050505050565b6000546001600160a01b03163314610ec4576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a15050565b6000610f32826112be565b50506001600160a01b038281166000908152600560205260409020600201541615610f9c576040805162461bcd60e51b81526020600482015260156024820152745461726f743a20414c52454144595f45584953545360581b604482015290519081900360640190fd5b600754604080516354bcd7ad60e01b81526001600160a01b03858116600483015260016024830152915191909216916354bcd7ad9160448083019260209291908290030181600087803b158015610ff257600080fd5b505af1158015611006573d6000803e3d6000fd5b505050506040513d602081101561101c57600080fd5b5051604080516312974c5b60e21b815290519192506001600160a01b03831691634a5d316c9160048082019260009290919082900301818387803b15801561106357600080fd5b505af1158015611077573d6000803e3d6000fd5b505050506110848261139e565b6001600160a01b03918216600090815260056020526040902060020180546001600160a01b0319169282169290921790915590565b600681815481106110c657fe5b6000918252602090912001546001600160a01b0316905081565b6007546001600160a01b031681565b6001546001600160a01b03163314611144576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1604080516001600160a01b03831681526000602082015281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a15050565b6002546001600160a01b0316331461124c576040805162461bcd60e51b815260206004820152601360248201527215185c9bdd0e8815539055551213d492569151606a1b604482015290519081900360640190fd5b600480546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f324bacfad26225895fcf55780481bec4ce49013c92500fa1c25626ff43fbf661929181900390910190a15050565b6000546001600160a01b031681565b600080826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156112fa57600080fd5b505afa15801561130e573d6000803e3d6000fd5b505050506040513d602081101561132457600080fd5b50516040805163d21220a760e01b815290519193506001600160a01b0385169163d21220a791600480820192602092909190829003018186803b15801561136a57600080fd5b505afa15801561137e573d6000803e3d6000fd5b505050506040513d602081101561139457600080fd5b5051919391925050565b6001600160a01b038116600090815260056020526040902054610100900462ffffff16156113cb576114c7565b60068054600181810183557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90910180546001600160a01b038086166001600160a01b031992831681179093556040805160a0810182526000808252965462ffffff90811660208381019182528385018a8152606085018b8152608086018c8152998c526005909252949099209251835491519451861664010000000002640100000000600160c01b0319959093166101000263ffffff001991151560ff199093169290921716179290921691909117815594519385018054948216948316949094179093559051600290930180549390921692169190911790555b50565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe5461726f743a20434f4c4c41544552414c495a41424c455f4e4f545f43524541544544a265627a7a723158207cd1d0e402d081fc6d31d5382a6ed34b915b7d6627cda7a2bda724aa6d21b33c64736f6c63430005100032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001bb4e4fc22b4e2470a05b60c2943f88b832cea100000000000000000000000001e6bf02f5bad0a8aa93df20955feff295d97f9690000000000000000000000006108feaa628155b073150f408d0b390ec3121834000000000000000000000000b6193df61351736e5190bf1deb2e4f0769bd1bf2000000000000000000000000d4a6a05081fd270dc111332845a778a49fe01741

-----Decoded View---------------
Arg [0] : _admin (address): 0x1bb4e4Fc22B4E2470A05b60c2943f88B832cea10
Arg [1] : _reservesAdmin (address): 0x1E6bF02f5BAD0a8Aa93df20955FEfF295D97F969
Arg [2] : _bDeployer (address): 0x6108FeAA628155b073150F408D0b390eC3121834
Arg [3] : _cDeployer (address): 0xb6193DF61351736e5190bF1DEB2E4f0769bd1BF2
Arg [4] : _tarotPriceOracle (address): 0xD4a6a05081fD270dC111332845A778a49FE01741

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000001bb4e4fc22b4e2470a05b60c2943f88b832cea10
Arg [1] : 0000000000000000000000001e6bf02f5bad0a8aa93df20955feff295d97f969
Arg [2] : 0000000000000000000000006108feaa628155b073150f408d0b390ec3121834
Arg [3] : 000000000000000000000000b6193df61351736e5190bf1deb2e4f0769bd1bf2
Arg [4] : 000000000000000000000000d4a6a05081fd270dc111332845a778a49fe01741


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.