Contract 0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3 4

 
Txn Hash Method
Block
From
To
Value
0xf42b205c820d77c464b79217c6342fcf719d5cc0b2c7419f8e227326decd2a7fApprove(pending)2022-01-29 15:22:052 hrs 24 mins ago0x6a8bdcaa40ab6b8bc8c425f7861309a8abe87e7b IN Abracadabra.money: MIM Token0 Ether(Pending)(Pending)
0xa27af8106834f33a8d5769ebba927425283f0c2422cf4344da76fa8b0dac9ba4Approve(pending)2022-01-23 3:18:316 days 14 hrs ago0x382bd426db66730203d8eb9cf57b1208f644a275 IN Abracadabra.money: MIM Token0 Ether(Pending)(Pending)
0xb790fa7a90ee04a74197569057ac8bf88ea46987f469a3ca689b3ae14539f0f9Approve141019982022-01-29 17:28:2517 mins ago0x61362ce1cdf4e8c131022b689a4c31d9435437da IN  Abracadabra.money: MIM Token0 Ether0.003191564339 119.988132624
0xa9940c13396bf62c64d97f7c037a0a3459deb740ceb224b82881cbfb57466e81Approve141019972022-01-29 17:28:1117 mins ago0x61362ce1cdf4e8c131022b689a4c31d9435437da IN  Abracadabra.money: MIM Token0 Ether0.005865714272 126.147105791
0xcf8520ae75f62b84b1dc8dc3d398b12fbdead13c1a47d1f4453f891616b85e1bApprove141019912022-01-29 17:27:0619 mins ago0x82a6f1ebad545284c45c4b0d081cdec25b6471c7 IN  Abracadabra.money: MIM Token0 Ether0.007221109757 155.296022667
0x8e297c6d7040b87d60be4c895c4367f27694a239c0fb6c4c30b326066d963acaApprove141019902022-01-29 17:26:3319 mins ago0x62f44141f448b1e6e6df5c317543f2ff70b6d800 IN  Abracadabra.money: MIM Token0 Ether0.006430500231 138.293301613
0x623aff21df71f9d286ef8d4e5017193fe204cf8beb350ae355f273186c580952Approve141019832022-01-29 17:24:3921 mins ago0x61362ce1cdf4e8c131022b689a4c31d9435437da IN  Abracadabra.money: MIM Token0 Ether0.003191209095 119.974777089
0xed0036d7db59ec1e5b01ce597192d625341a794196cb2a9f6e8ca313689632cfApprove141019832022-01-29 17:24:3921 mins ago0x61362ce1cdf4e8c131022b689a4c31d9435437da IN  Abracadabra.money: MIM Token0 Ether0.005578707159 119.974777089
0x88215e2459d02622b8e7fc670f2f34755de1118d0ca410e1bd421a60dc68a5cdApprove141018222022-01-29 16:48:3157 mins agoENS Name lazerblazer.eth IN  Abracadabra.money: MIM Token0 Ether0.004551329785 98.515764102
0x7279fd15234b550e18abf46dde63db4e9c8ed88961e1abd4c71c790bedd3ee0cApprove141017722022-01-29 16:38:041 hr 8 mins ago0x0bc8fd5e089f4a42b59d77445231e8e59d8f9a81 IN  Abracadabra.money: MIM Token0 Ether0.002692421851 101.22267196
0xbf39b848b0d9eae32b85bf096c373d45e657f0f70b398f1cadb7682c684fb167Approve141017702022-01-29 16:37:401 hr 8 mins ago0x0bc8fd5e089f4a42b59d77445231e8e59d8f9a81 IN  Abracadabra.money: MIM Token0 Ether0.004526325112 97.342418376
0xbfa945b5312809056d89c2aa19d40198b17915e67ec4ab4dd4daa963c1342ba8Approve141017552022-01-29 16:34:161 hr 11 mins ago0xa6b304da0938e8d1521e5db18b77b7f584a21bf5 IN  Abracadabra.money: MIM Token0 Ether0.003946806502 84.879384558
0xbb0b44d5d312df75e32a250d563016e11437cee41aa61e1817c328215037f126Approve141017412022-01-29 16:31:451 hr 14 mins ago0x62f44141f448b1e6e6df5c317543f2ff70b6d800 IN  Abracadabra.money: MIM Token0 Ether0.004806485773 103.367508414
0x9cbf66ab5f6585c771f0775e28a95d9c941301e12fcb79600b4415f3672450dbApprove141017352022-01-29 16:30:231 hr 15 mins ago0x5452419f0b44434ce94f6a92b2a84c27ee8d8dbe IN  Abracadabra.money: MIM Token0 Ether0.006277365 135
0xb33b8b44dde817d392868c4cbbc8f50203172b9143595a407ce1e78c9ba4f930Approve141017262022-01-29 16:28:381 hr 17 mins ago0x62f44141f448b1e6e6df5c317543f2ff70b6d800 IN  Abracadabra.money: MIM Token0 Ether0.004861560062 104.551927201
0x4a382cced47fcdcb2f6964e8dc91f5843a12fc7d4ee7bd0424f3e03eea35a5e2Approve141016722022-01-29 16:16:361 hr 29 mins ago0x3cd10a2bb32e6c136633033bf03c7d5bfa7f59e8 IN  Abracadabra.money: MIM Token0 Ether0.003999226019 86.006710233
0xb2289ce48ce004573410591eb3a7bfc51dc0d50e15fedaefcad8580b2cf7b8eeApprove141016682022-01-29 16:16:021 hr 30 mins agoENS Name sw4g.eth IN  Abracadabra.money: MIM Token0 Ether0.004687587138 100.810493528
0x3392d94eb7f81cce5dbae97b4e4bc56688cfbf5020a2ac24a601a9b2db55b1a2Approve141016012022-01-29 16:02:491 hr 43 mins ago0x059c522cdfcb128c50397cea35959632ec33be16 IN  Abracadabra.money: MIM Token0 Ether0.006088295268 130.933896832
0x3e4910c81d2a1d2221fdafc1e4def9e21dc03c19b8523fb076ade18f5278aac4Approve141015992022-01-29 16:02:111 hr 43 mins ago0x995c06b04fc53211110d02bdba73301c4990ebf0 IN  Abracadabra.money: MIM Token0 Ether0.00491673661 105.738545141
0x20d26185dc06443b949fb4d423165c8e0d20474e225dfa5d8e232027de0a2242Approve141015352022-01-29 15:50:231 hr 55 mins ago0xbd148bca3f895f995d08075d1721c9ad7f0bdc23 IN  Abracadabra.money: MIM Token0 Ether0.006743833094 145.031787667
0xc59bb053ad3326b984e6e58eda132257ef1c0367adc18cf1af77de0c40d6c112Approve141014832022-01-29 15:37:062 hrs 9 mins ago0x5e8d405cbc564473d85a9a31fbfca76167d69978 IN  Abracadabra.money: MIM Token0 Ether0.005947943332 127.915510707
0x1c9588208794950d1df5be1fcdc218b468614bc7fc2ceacb922a53316000ee3dApprove141014632022-01-29 15:32:442 hrs 13 mins ago0x2542d46915f8e7b47113f2a2410a7fb27b7e4ef4 IN  Abracadabra.money: MIM Token0 Ether0.005055355429 108.719659124
0x952965daeb8e68cab68a005c99e95c0d4c7dd3264e36650ccb3f18e1e0dcda65Approve141014302022-01-29 15:26:202 hrs 19 mins ago0xbd148bca3f895f995d08075d1721c9ad7f0bdc23 IN  Abracadabra.money: MIM Token0 Ether0.004551074286 97.874670138
0xe25f92141e3c2ce2ab69dd79f0062b17ac87d80f0e662ac18bbd3d2cfb5da9c3Approve141014112022-01-29 15:23:292 hrs 22 mins ago0x8b4a28423dcc8f08e83ec9b6eb2fb5be9aefb29b IN  Abracadabra.money: MIM Token0 Ether0.005902618554 126.940763339
0x117c63fe37bcf68ff6cd467640247c524d5a057647b92da8ffbd204c3231895fApprove141014022022-01-29 15:21:142 hrs 24 mins ago0x059c522cdfcb128c50397cea35959632ec33be16 IN  Abracadabra.money: MIM Token0 Ether0.005169661353 111.177903907
[ Download CSV Export 

OVERVIEW

abracadabra.money is a lending protocol that allows users to borrow a USD-pegged Stablecoin (MIM) using interest-bearing tokens as collateral.

View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MagicInternetMoneyV1

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-05-25
*/

// SPDX-License-Identifier: MIXED

// File @boringcrypto/boring-solidity/contracts/libraries/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;

/// @notice A library for performing overflow-/underflow-safe math,
/// updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math).
library BoringMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require((c = a + b) >= b, "BoringMath: Add Overflow");
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require((c = a - b) <= a, "BoringMath: Underflow");
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require(b == 0 || (c = a * b) / b == a, "BoringMath: Mul Overflow");
    }

    function to128(uint256 a) internal pure returns (uint128 c) {
        require(a <= uint128(-1), "BoringMath: uint128 Overflow");
        c = uint128(a);
    }

    function to64(uint256 a) internal pure returns (uint64 c) {
        require(a <= uint64(-1), "BoringMath: uint64 Overflow");
        c = uint64(a);
    }

    function to32(uint256 a) internal pure returns (uint32 c) {
        require(a <= uint32(-1), "BoringMath: uint32 Overflow");
        c = uint32(a);
    }
}

/// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint128.
library BoringMath128 {
    function add(uint128 a, uint128 b) internal pure returns (uint128 c) {
        require((c = a + b) >= b, "BoringMath: Add Overflow");
    }

    function sub(uint128 a, uint128 b) internal pure returns (uint128 c) {
        require((c = a - b) <= a, "BoringMath: Underflow");
    }
}

/// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint64.
library BoringMath64 {
    function add(uint64 a, uint64 b) internal pure returns (uint64 c) {
        require((c = a + b) >= b, "BoringMath: Add Overflow");
    }

    function sub(uint64 a, uint64 b) internal pure returns (uint64 c) {
        require((c = a - b) <= a, "BoringMath: Underflow");
    }
}

/// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint32.
library BoringMath32 {
    function add(uint32 a, uint32 b) internal pure returns (uint32 c) {
        require((c = a + b) >= b, "BoringMath: Add Overflow");
    }

    function sub(uint32 a, uint32 b) internal pure returns (uint32 c) {
        require((c = a - b) <= a, "BoringMath: Underflow");
    }
}

// File @boringcrypto/boring-solidity/contracts/interfaces/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;

interface IERC20 {
    function totalSupply() external view returns (uint256);

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

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

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

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

    /// @notice EIP 2612
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

// File @boringcrypto/boring-solidity/contracts/[email protected]
// License-Identifier: MIT
// Based on code and smartness by Ross Campbell and Keno
// Uses immutable to store the domain separator to reduce gas usage
// If the chain id changes due to a fork, the forked chain will calculate on the fly.
pragma solidity 0.6.12;

// solhint-disable no-inline-assembly

contract Domain {
    bytes32 private constant DOMAIN_SEPARATOR_SIGNATURE_HASH = keccak256("EIP712Domain(uint256 chainId,address verifyingContract)");
    // See https://eips.ethereum.org/EIPS/eip-191
    string private constant EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA = "\x19\x01";

    // solhint-disable var-name-mixedcase
    bytes32 private immutable _DOMAIN_SEPARATOR;
    uint256 private immutable DOMAIN_SEPARATOR_CHAIN_ID;

    /// @dev Calculate the DOMAIN_SEPARATOR
    function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) {
        return keccak256(abi.encode(DOMAIN_SEPARATOR_SIGNATURE_HASH, chainId, address(this)));
    }

    constructor() public {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        _DOMAIN_SEPARATOR = _calculateDomainSeparator(DOMAIN_SEPARATOR_CHAIN_ID = chainId);
    }

    /// @dev Return the DOMAIN_SEPARATOR
    // It's named internal to allow making it public from the contract that uses it by creating a simple view function
    // with the desired public name, such as DOMAIN_SEPARATOR or domainSeparator.
    // solhint-disable-next-line func-name-mixedcase
    function _domainSeparator() internal view returns (bytes32) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId == DOMAIN_SEPARATOR_CHAIN_ID ? _DOMAIN_SEPARATOR : _calculateDomainSeparator(chainId);
    }

    function _getDigest(bytes32 dataHash) internal view returns (bytes32 digest) {
        digest = keccak256(abi.encodePacked(EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA, _domainSeparator(), dataHash));
    }
}

// File @boringcrypto/boring-solidity/contracts/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;

// solhint-disable no-inline-assembly
// solhint-disable not-rely-on-time

// Data part taken out for building of contracts that receive delegate calls
contract ERC20Data {
    /// @notice owner > balance mapping.
    mapping(address => uint256) public balanceOf;
    /// @notice owner > spender > allowance mapping.
    mapping(address => mapping(address => uint256)) public allowance;
    /// @notice owner > nonce mapping. Used in `permit`.
    mapping(address => uint256) public nonces;
}

abstract contract ERC20 is IERC20, Domain {
    /// @notice owner > balance mapping.
    mapping(address => uint256) public override balanceOf;
    /// @notice owner > spender > allowance mapping.
    mapping(address => mapping(address => uint256)) public override allowance;
    /// @notice owner > nonce mapping. Used in `permit`.
    mapping(address => uint256) public nonces;

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);

    /// @notice Transfers `amount` tokens from `msg.sender` to `to`.
    /// @param to The address to move the tokens.
    /// @param amount of the tokens to move.
    /// @return (bool) Returns True if succeeded.
    function transfer(address to, uint256 amount) public returns (bool) {
        // If `amount` is 0, or `msg.sender` is `to` nothing happens
        if (amount != 0 || msg.sender == to) {
            uint256 srcBalance = balanceOf[msg.sender];
            require(srcBalance >= amount, "ERC20: balance too low");
            if (msg.sender != to) {
                require(to != address(0), "ERC20: no zero address"); // Moved down so low balance calls safe some gas

                balanceOf[msg.sender] = srcBalance - amount; // Underflow is checked
                balanceOf[to] += amount;
            }
        }
        emit Transfer(msg.sender, to, amount);
        return true;
    }

    /// @notice Transfers `amount` tokens from `from` to `to`. Caller needs approval for `from`.
    /// @param from Address to draw tokens from.
    /// @param to The address to move the tokens.
    /// @param amount The token amount to move.
    /// @return (bool) Returns True if succeeded.
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public returns (bool) {
        // If `amount` is 0, or `from` is `to` nothing happens
        if (amount != 0) {
            uint256 srcBalance = balanceOf[from];
            require(srcBalance >= amount, "ERC20: balance too low");

            if (from != to) {
                uint256 spenderAllowance = allowance[from][msg.sender];
                // If allowance is infinite, don't decrease it to save on gas (breaks with EIP-20).
                if (spenderAllowance != type(uint256).max) {
                    require(spenderAllowance >= amount, "ERC20: allowance too low");
                    allowance[from][msg.sender] = spenderAllowance - amount; // Underflow is checked
                }
                require(to != address(0), "ERC20: no zero address"); // Moved down so other failed calls safe some gas

                balanceOf[from] = srcBalance - amount; // Underflow is checked
                balanceOf[to] += amount;
            }
        }
        emit Transfer(from, to, amount);
        return true;
    }

    /// @notice Approves `amount` from sender to be spend by `spender`.
    /// @param spender Address of the party that can draw from msg.sender's account.
    /// @param amount The maximum collective amount that `spender` can draw.
    /// @return (bool) Returns True if approved.
    function approve(address spender, uint256 amount) public override returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32) {
        return _domainSeparator();
    }

    // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 private constant PERMIT_SIGNATURE_HASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;

    /// @notice Approves `value` from `owner_` to be spend by `spender`.
    /// @param owner_ Address of the owner.
    /// @param spender The address of the spender that gets approved to draw from `owner_`.
    /// @param value The maximum collective amount that `spender` can draw.
    /// @param deadline This permit must be redeemed before this deadline (UTC timestamp in seconds).
    function permit(
        address owner_,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external override {
        require(owner_ != address(0), "ERC20: Owner cannot be 0");
        require(block.timestamp < deadline, "ERC20: Expired");
        require(
            ecrecover(_getDigest(keccak256(abi.encode(PERMIT_SIGNATURE_HASH, owner_, spender, value, nonces[owner_]++, deadline))), v, r, s) ==
                owner_,
            "ERC20: Invalid Signature"
        );
        allowance[owner_][spender] = value;
        emit Approval(owner_, spender, value);
    }
}

contract ERC20WithSupply is IERC20, ERC20 {
    uint256 public override totalSupply;

    function _mint(address user, uint256 amount) private {
        uint256 newTotalSupply = totalSupply + amount;
        require(newTotalSupply >= totalSupply, "Mint overflow");
        totalSupply = newTotalSupply;
        balanceOf[user] += amount;
    }

    function _burn(address user, uint256 amount) private {
        require(balanceOf[user] >= amount, "Burn too much");
        totalSupply -= amount;
        balanceOf[user] -= amount;
    }
}

// File @boringcrypto/boring-solidity/contracts/libraries/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;

struct Rebase {
    uint128 elastic;
    uint128 base;
}

/// @notice A rebasing library using overflow-/underflow-safe math.
library RebaseLibrary {
    using BoringMath for uint256;
    using BoringMath128 for uint128;

    /// @notice Calculates the base value in relationship to `elastic` and `total`.
    function toBase(
        Rebase memory total,
        uint256 elastic,
        bool roundUp
    ) internal pure returns (uint256 base) {
        if (total.elastic == 0) {
            base = elastic;
        } else {
            base = elastic.mul(total.base) / total.elastic;
            if (roundUp && base.mul(total.elastic) / total.base < elastic) {
                base = base.add(1);
            }
        }
    }

    /// @notice Calculates the elastic value in relationship to `base` and `total`.
    function toElastic(
        Rebase memory total,
        uint256 base,
        bool roundUp
    ) internal pure returns (uint256 elastic) {
        if (total.base == 0) {
            elastic = base;
        } else {
            elastic = base.mul(total.elastic) / total.base;
            if (roundUp && elastic.mul(total.base) / total.elastic < base) {
                elastic = elastic.add(1);
            }
        }
    }

    /// @notice Add `elastic` to `total` and doubles `total.base`.
    /// @return (Rebase) The new total.
    /// @return base in relationship to `elastic`.
    function add(
        Rebase memory total,
        uint256 elastic,
        bool roundUp
    ) internal pure returns (Rebase memory, uint256 base) {
        base = toBase(total, elastic, roundUp);
        total.elastic = total.elastic.add(elastic.to128());
        total.base = total.base.add(base.to128());
        return (total, base);
    }

    /// @notice Sub `base` from `total` and update `total.elastic`.
    /// @return (Rebase) The new total.
    /// @return elastic in relationship to `base`.
    function sub(
        Rebase memory total,
        uint256 base,
        bool roundUp
    ) internal pure returns (Rebase memory, uint256 elastic) {
        elastic = toElastic(total, base, roundUp);
        total.elastic = total.elastic.sub(elastic.to128());
        total.base = total.base.sub(base.to128());
        return (total, elastic);
    }

    /// @notice Add `elastic` and `base` to `total`.
    function add(
        Rebase memory total,
        uint256 elastic,
        uint256 base
    ) internal pure returns (Rebase memory) {
        total.elastic = total.elastic.add(elastic.to128());
        total.base = total.base.add(base.to128());
        return total;
    }

    /// @notice Subtract `elastic` and `base` to `total`.
    function sub(
        Rebase memory total,
        uint256 elastic,
        uint256 base
    ) internal pure returns (Rebase memory) {
        total.elastic = total.elastic.sub(elastic.to128());
        total.base = total.base.sub(base.to128());
        return total;
    }

    /// @notice Add `elastic` to `total` and update storage.
    /// @return newElastic Returns updated `elastic`.
    function addElastic(Rebase storage total, uint256 elastic) internal returns (uint256 newElastic) {
        newElastic = total.elastic = total.elastic.add(elastic.to128());
    }

    /// @notice Subtract `elastic` from `total` and update storage.
    /// @return newElastic Returns updated `elastic`.
    function subElastic(Rebase storage total, uint256 elastic) internal returns (uint256 newElastic) {
        newElastic = total.elastic = total.elastic.sub(elastic.to128());
    }
}

// File @sushiswap/bentobox-sdk/contracts/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;

interface IBatchFlashBorrower {
    function onBatchFlashLoan(
        address sender,
        IERC20[] calldata tokens,
        uint256[] calldata amounts,
        uint256[] calldata fees,
        bytes calldata data
    ) external;
}

// File @sushiswap/bentobox-sdk/contracts/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;

interface IFlashBorrower {
    function onFlashLoan(
        address sender,
        IERC20 token,
        uint256 amount,
        uint256 fee,
        bytes calldata data
    ) external;
}

// File @sushiswap/bentobox-sdk/contracts/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;

interface IStrategy {
    // Send the assets to the Strategy and call skim to invest them
    function skim(uint256 amount) external;

    // Harvest any profits made converted to the asset and pass them to the caller
    function harvest(uint256 balance, address sender) external returns (int256 amountAdded);

    // Withdraw assets. The returned amount can differ from the requested amount due to rounding.
    // The actualAmount should be very close to the amount. The difference should NOT be used to report a loss. That's what harvest is for.
    function withdraw(uint256 amount) external returns (uint256 actualAmount);

    // Withdraw all assets in the safest way possible. This shouldn't fail.
    function exit(uint256 balance) external returns (int256 amountAdded);
}

// File @sushiswap/bentobox-sdk/contracts/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

interface IBentoBoxV1 {
    event LogDeploy(address indexed masterContract, bytes data, address indexed cloneAddress);
    event LogDeposit(address indexed token, address indexed from, address indexed to, uint256 amount, uint256 share);
    event LogFlashLoan(address indexed borrower, address indexed token, uint256 amount, uint256 feeAmount, address indexed receiver);
    event LogRegisterProtocol(address indexed protocol);
    event LogSetMasterContractApproval(address indexed masterContract, address indexed user, bool approved);
    event LogStrategyDivest(address indexed token, uint256 amount);
    event LogStrategyInvest(address indexed token, uint256 amount);
    event LogStrategyLoss(address indexed token, uint256 amount);
    event LogStrategyProfit(address indexed token, uint256 amount);
    event LogStrategyQueued(address indexed token, address indexed strategy);
    event LogStrategySet(address indexed token, address indexed strategy);
    event LogStrategyTargetPercentage(address indexed token, uint256 targetPercentage);
    event LogTransfer(address indexed token, address indexed from, address indexed to, uint256 share);
    event LogWhiteListMasterContract(address indexed masterContract, bool approved);
    event LogWithdraw(address indexed token, address indexed from, address indexed to, uint256 amount, uint256 share);
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    function balanceOf(IERC20, address) external view returns (uint256);

    function batch(bytes[] calldata calls, bool revertOnFail) external payable returns (bool[] memory successes, bytes[] memory results);

    function batchFlashLoan(
        IBatchFlashBorrower borrower,
        address[] calldata receivers,
        IERC20[] calldata tokens,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;

    function claimOwnership() external;

    function deploy(
        address masterContract,
        bytes calldata data,
        bool useCreate2
    ) external payable;

    function deposit(
        IERC20 token_,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external payable returns (uint256 amountOut, uint256 shareOut);

    function flashLoan(
        IFlashBorrower borrower,
        address receiver,
        IERC20 token,
        uint256 amount,
        bytes calldata data
    ) external;

    function harvest(
        IERC20 token,
        bool balance,
        uint256 maxChangeAmount
    ) external;

    function masterContractApproved(address, address) external view returns (bool);

    function masterContractOf(address) external view returns (address);

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

    function owner() external view returns (address);

    function pendingOwner() external view returns (address);

    function pendingStrategy(IERC20) external view returns (IStrategy);

    function permitToken(
        IERC20 token,
        address from,
        address to,
        uint256 amount,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function registerProtocol() external;

    function setMasterContractApproval(
        address user,
        address masterContract,
        bool approved,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function setStrategy(IERC20 token, IStrategy newStrategy) external;

    function setStrategyTargetPercentage(IERC20 token, uint64 targetPercentage_) external;

    function strategy(IERC20) external view returns (IStrategy);

    function strategyData(IERC20)
        external
        view
        returns (
            uint64 strategyStartDate,
            uint64 targetPercentage,
            uint128 balance
        );

    function toAmount(
        IERC20 token,
        uint256 share,
        bool roundUp
    ) external view returns (uint256 amount);

    function toShare(
        IERC20 token,
        uint256 amount,
        bool roundUp
    ) external view returns (uint256 share);

    function totals(IERC20) external view returns (Rebase memory totals_);

    function transfer(
        IERC20 token,
        address from,
        address to,
        uint256 share
    ) external;

    function transferMultiple(
        IERC20 token,
        address from,
        address[] calldata tos,
        uint256[] calldata shares
    ) external;

    function transferOwnership(
        address newOwner,
        bool direct,
        bool renounce
    ) external;

    function whitelistMasterContract(address masterContract, bool approved) external;

    function whitelistedMasterContracts(address) external view returns (bool);

    function withdraw(
        IERC20 token_,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external returns (uint256 amountOut, uint256 shareOut);
}

// File @boringcrypto/boring-solidity/contracts/[email protected]
// License-Identifier: MIT
pragma solidity 0.6.12;

// Audit on 5-Jan-2021 by Keno and BoringCrypto
// Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol + Claimable.sol
// Edited by BoringCrypto

contract BoringOwnableData {
    address public owner;
    address public pendingOwner;
}

contract BoringOwnable is BoringOwnableData {
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /// @notice `owner` defaults to msg.sender on construction.
    constructor() public {
        owner = msg.sender;
        emit OwnershipTransferred(address(0), msg.sender);
    }

    /// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner.
    /// Can only be invoked by the current `owner`.
    /// @param newOwner Address of the new owner.
    /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`.
    /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise.
    function transferOwnership(
        address newOwner,
        bool direct,
        bool renounce
    ) public onlyOwner {
        if (direct) {
            // Checks
            require(newOwner != address(0) || renounce, "Ownable: zero address");

            // Effects
            emit OwnershipTransferred(owner, newOwner);
            owner = newOwner;
            pendingOwner = address(0);
        } else {
            // Effects
            pendingOwner = newOwner;
        }
    }

    /// @notice Needs to be called by `pendingOwner` to claim ownership.
    function claimOwnership() public {
        address _pendingOwner = pendingOwner;

        // Checks
        require(msg.sender == _pendingOwner, "Ownable: caller != pending owner");

        // Effects
        emit OwnershipTransferred(owner, _pendingOwner);
        owner = _pendingOwner;
        pendingOwner = address(0);
    }

    /// @notice Only allows the `owner` to execute the function.
    modifier onlyOwner() {
        require(msg.sender == owner, "Ownable: caller is not the owner");
        _;
    }
}

// File contracts/MagicInternetMoney.sol
// License-Identifier: MIT

// Magic Internet Money

// ███╗   ███╗██╗███╗   ███╗
// ████╗ ████║██║████╗ ████║
// ██╔████╔██║██║██╔████╔██║
// ██║╚██╔╝██║██║██║╚██╔╝██║
// ██║ ╚═╝ ██║██║██║ ╚═╝ ██║
// ╚═╝     ╚═╝╚═╝╚═╝     ╚═╝

// BoringCrypto, 0xMerlin

pragma solidity 0.6.12;

/// @title Cauldron
/// @dev This contract allows contract calls to any contract (except BentoBox)
/// from arbitrary callers thus, don't trust calls from this contract in any circumstances.
contract MagicInternetMoneyV1 is ERC20, BoringOwnable {
    using BoringMath for uint256;
    // ERC20 'variables'
    string public constant symbol = "MIM";
    string public constant name = "Magic Internet Money";
    uint8 public constant decimals = 18;
    uint256 public override totalSupply;

    struct Minting {
        uint128 time;
        uint128 amount;
    }

    Minting public lastMint;
    uint256 private constant MINTING_PERIOD = 24 hours;
    uint256 private constant MINTING_INCREASE = 15000;
    uint256 private constant MINTING_PRECISION = 1e5;

    function mint(address to, uint256 amount) public onlyOwner {
        require(to != address(0), "MIM: no mint to zero address");

        // Limits the amount minted per period to a convergence function, with the period duration restarting on every mint
        uint256 totalMintedAmount = uint256(lastMint.time < block.timestamp - MINTING_PERIOD ? 0 : lastMint.amount).add(amount);
        require(totalSupply == 0 || totalSupply.mul(MINTING_INCREASE) / MINTING_PRECISION >= totalMintedAmount);

        lastMint.time = block.timestamp.to128();
        lastMint.amount = totalMintedAmount.to128();

        totalSupply = totalSupply + amount;
        balanceOf[to] += amount;
        emit Transfer(address(0), to, amount);
    }

    function mintToBentoBox(
        address clone,
        uint256 amount,
        IBentoBoxV1 bentoBox
    ) public onlyOwner {
        mint(address(bentoBox), amount);
        bentoBox.deposit(IERC20(address(this)), address(bentoBox), clone, amount, 0);
    }

    function burn(uint256 amount) public {
        require(amount <= balanceOf[msg.sender], "MIM: not enough");

        balanceOf[msg.sender] -= amount;
        totalSupply -= amount;
        emit Transfer(msg.sender, address(0), amount);
    }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastMint","outputs":[{"internalType":"uint128","name":"time","type":"uint128"},{"internalType":"uint128","name":"amount","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"clone","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"contract IBentoBoxV1","name":"bentoBox","type":"address"}],"name":"mintToBentoBox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"direct","type":"bool"},{"internalType":"bool","name":"renounce","type":"bool"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b504660a081905261002081610069565b60805250600380546001600160a01b031916339081179091556040516000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100dc565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921882306040516020016100a0939291906100bd565b604051602081830303815290604052805190602001209050919050565b92835260208301919091526001600160a01b0316604082015260600190565b60805160a051611a306100ff6000398061111952508061114e5250611a306000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c8063586fc5b5116100cd57806395d89b4111610081578063d505accf11610066578063d505accf146102b6578063dd62ed3e146102c9578063e30c3978146102dc5761016c565b806395d89b411461029b578063a9059cbb146102a35761016c565b806370a08231116100b257806370a08231146102605780637ecebe00146102735780638da5cb5b146102865761016c565b8063586fc5b51461023757806369e402651461024d5761016c565b8063313ce5671161012457806340c10f191161010957806340c10f191461020957806342966c681461021c5780634e71e0c81461022f5761016c565b8063313ce567146101ec5780633644e515146102015761016c565b8063095ea7b311610155578063095ea7b3146101a457806318160ddd146101c457806323b872dd146101d95761016c565b806306fdde0314610171578063078dfbe71461018f575b600080fd5b6101796102e4565b6040516101869190611617565b60405180910390f35b6101a261019d366004611409565b61031d565b005b6101b76101b2366004611453565b6104b2565b6040516101869190611537565b6101cc61052a565b6040516101869190611542565b6101b76101e7366004611354565b610530565b6101f461078b565b6040516101869190611989565b6101cc610790565b6101a2610217366004611453565b61079f565b6101a261022a3660046114b4565b610a01565b6101a2610aa6565b61023f610b8d565b604051610186929190611966565b6101a261025b36600461147e565b610bbd565b6101cc61026e3660046112f9565b610ccb565b6101cc6102813660046112f9565b610cdd565b61028e610cef565b6040516101869190611516565b610179610d0b565b6101b76102b1366004611453565b610d44565b6101a26102c4366004611394565b610eb8565b6101cc6102d736600461131c565b6110db565b61028e6110f8565b6040518060400160405280601481526020017f4d6167696320496e7465726e6574204d6f6e657900000000000000000000000081525081565b60035473ffffffffffffffffffffffffffffffffffffffff163314610377576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e906117e9565b60405180910390fd5b811561046c5773ffffffffffffffffffffffffffffffffffffffff831615158061039e5750805b6103d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e9061169f565b60035460405173ffffffffffffffffffffffffffffffffffffffff8086169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091556004805490911690556104ad565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555b505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610518908690611542565b60405180910390a35060015b92915050565b60055481565b6000811561071c5773ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205482811015610598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e906118c1565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461071a5773ffffffffffffffffffffffffffffffffffffffff851660009081526001602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610693578381101561065d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e90611744565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600160209081526040808320338452909152902084820390555b73ffffffffffffffffffffffffffffffffffffffff85166106e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e90611668565b5073ffffffffffffffffffffffffffffffffffffffff80861660009081526020819052604080822086850390559186168152208054840190555b505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516107799190611542565b60405180910390a35060019392505050565b601281565b600061079a611114565b905090565b60035473ffffffffffffffffffffffffffffffffffffffff1633146107f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e906117e9565b73ffffffffffffffffffffffffffffffffffffffff821661083d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e90611853565b6006546000906108ce9083907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeae8042016fffffffffffffffffffffffffffffffff909116106108b35760065470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166108b6565b60005b6fffffffffffffffffffffffffffffffff1690611174565b905060055460001480610903575080620186a06108f8613a986005546111b190919063ffffffff16565b816108ff57fe5b0410155b61090c57600080fd5b61091542611202565b600680547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691909117905561095f81611202565b600680546fffffffffffffffffffffffffffffffff928316700100000000000000000000000000000000029216919091179055600580548301905573ffffffffffffffffffffffffffffffffffffffff8316600081815260208190526040808220805486019055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109f4908690611542565b60405180910390a3505050565b33600090815260208190526040902054811115610a4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e9061177b565b3360008181526020819052604080822080548590039055600580548590039055519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a9b908590611542565b60405180910390a350565b60045473ffffffffffffffffffffffffffffffffffffffff16338114610af8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e9061181e565b60035460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316179055600480549091169055565b6006546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b60035473ffffffffffffffffffffffffffffffffffffffff163314610c0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e906117e9565b610c18818361079f565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906302b9446c90610c739030908590889088906000906004016115d6565b6040805180830381600087803b158015610c8c57600080fd5b505af1158015610ca0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc491906114cc565b5050505050565b60006020819052908152604090205481565b60026020526000908152604090205481565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600381526020017f4d494d000000000000000000000000000000000000000000000000000000000081525081565b600081151580610d6957503373ffffffffffffffffffffffffffffffffffffffff8416145b15610e5b573360009081526020819052604090205482811015610db8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e906118c1565b3373ffffffffffffffffffffffffffffffffffffffff851614610e595773ffffffffffffffffffffffffffffffffffffffff8416610e22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e90611668565b33600090815260208190526040808220858403905573ffffffffffffffffffffffffffffffffffffffff8616825290208054840190555b505b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516105189190611542565b73ffffffffffffffffffffffffffffffffffffffff8716610f05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e9061188a565b834210610f3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e906117b2565b73ffffffffffffffffffffffffffffffffffffffff87166000818152600260209081526040918290208054600181810190925592519092610fc992610fae927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928e928e928e92918e910161154b565b60405160208183030381529060405280519060200120611252565b85858560405160008152602001604052604051610fe994939291906115b8565b6020604051602081039080840390855afa15801561100b573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614611062576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e9061192f565b73ffffffffffffffffffffffffffffffffffffffff8088166000818152600160209081526040808320948b168084529490915290819020889055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906110ca908990611542565b60405180910390a350505050505050565b600160209081526000928352604080842090915290825290205481565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b6000467f0000000000000000000000000000000000000000000000000000000000000000811461114c57611147816112c2565b61116e565b7f00000000000000000000000000000000000000000000000000000000000000005b91505090565b81810181811015610524576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e9061170d565b60008115806111cc575050808202828282816111c957fe5b04145b610524576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e906118f8565b60006fffffffffffffffffffffffffffffffff82111561124e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036e906116d6565b5090565b60006040518060400160405280600281526020017f1901000000000000000000000000000000000000000000000000000000000000815250611292611114565b836040516020016112a5939291906114ef565b604051602081830303815290604052805190602001209050919050565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921882306040516020016112a59392919061158c565b60006020828403121561130a578081fd5b8135611315816119c7565b9392505050565b6000806040838503121561132e578081fd5b8235611339816119c7565b91506020830135611349816119c7565b809150509250929050565b600080600060608486031215611368578081fd5b8335611373816119c7565b92506020840135611383816119c7565b929592945050506040919091013590565b600080600080600080600060e0888a0312156113ae578283fd5b87356113b9816119c7565b965060208801356113c9816119c7565b95506040880135945060608801359350608088013560ff811681146113ec578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060006060848603121561141d578283fd5b8335611428816119c7565b92506020840135611438816119ec565b91506040840135611448816119ec565b809150509250925092565b60008060408385031215611465578182fd5b8235611470816119c7565b946020939093013593505050565b600080600060608486031215611492578283fd5b833561149d816119c7565b9250602084013591506040840135611448816119c7565b6000602082840312156114c5578081fd5b5035919050565b600080604083850312156114de578182fd5b505080516020909101519092909150565b60008451611501818460208901611997565b91909101928352506020820152604001919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b90815260200190565b95865273ffffffffffffffffffffffffffffffffffffffff94851660208701529290931660408501526060840152608083019190915260a082015260c00190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b73ffffffffffffffffffffffffffffffffffffffff958616815293851660208501529190931660408301526060820192909252608081019190915260a00190565b6000602082528251806020840152611636816040850160208701611997565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526016908201527f45524332303a206e6f207a65726f206164647265737300000000000000000000604082015260600190565b60208082526015908201527f4f776e61626c653a207a65726f20616464726573730000000000000000000000604082015260600190565b6020808252601c908201527f426f72696e674d6174683a2075696e74313238204f766572666c6f7700000000604082015260600190565b60208082526018908201527f426f72696e674d6174683a20416464204f766572666c6f770000000000000000604082015260600190565b60208082526018908201527f45524332303a20616c6c6f77616e636520746f6f206c6f770000000000000000604082015260600190565b6020808252600f908201527f4d494d3a206e6f7420656e6f7567680000000000000000000000000000000000604082015260600190565b6020808252600e908201527f45524332303a2045787069726564000000000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e6572604082015260600190565b6020808252601c908201527f4d494d3a206e6f206d696e7420746f207a65726f206164647265737300000000604082015260600190565b60208082526018908201527f45524332303a204f776e65722063616e6e6f7420626520300000000000000000604082015260600190565b60208082526016908201527f45524332303a2062616c616e636520746f6f206c6f7700000000000000000000604082015260600190565b60208082526018908201527f426f72696e674d6174683a204d756c204f766572666c6f770000000000000000604082015260600190565b60208082526018908201527f45524332303a20496e76616c6964205369676e61747572650000000000000000604082015260600190565b6fffffffffffffffffffffffffffffffff92831681529116602082015260400190565b60ff91909116815260200190565b60005b838110156119b257818101518382015260200161199a565b838111156119c1576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff811681146119e957600080fd5b50565b80151581146119e957600080fdfea2646970667358221220e98cc5840c217883fec6085f37f8bf1aec9c9edfdb3868aed3e7e8a4bfb059fb64736f6c634300060c0033

Deployed ByteCode Sourcemap

25383:1862:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25549:52;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;23471:506;;;;;;:::i;:::-;;:::i;:::-;;9354:214;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;25650:35::-;;;:::i;:::-;;;;;;;:::i;7908:1151::-;;;;;;:::i;:::-;;:::i;25608:35::-;;;:::i;:::-;;;;;;;:::i;9630:104::-;;;:::i;25973:741::-;;;;;;:::i;:::-;;:::i;26995:247::-;;;;;;:::i;:::-;;:::i;24059:340::-;;;:::i;25773:23::-;;;:::i;:::-;;;;;;;;:::i;26722:265::-;;;;;;:::i;:::-;;:::i;6208:53::-;;;;;;:::i;:::-;;:::i;6460:41::-;;;;;;:::i;:::-;;:::i;22617:20::-;;;:::i;:::-;;;;;;;:::i;25505:37::-;;;:::i;6898:703::-;;;;;;:::i;:::-;;:::i;10363:674::-;;;;;;:::i;:::-;;:::i;6322:73::-;;;;;;:::i;:::-;;:::i;22644:27::-;;;:::i;25549:52::-;;;;;;;;;;;;;;;;;;;:::o;23471:506::-;24527:5;;;;24513:10;:19;24505:64;;;;;;;;;;;;:::i;:::-;;;;;;;;;23610:6:::1;23606:364;;;23664:22;::::0;::::1;::::0;::::1;::::0;:34:::1;;;23690:8;23664:34;23656:68;;;;;;;;;;;;:::i;:::-;23791:5;::::0;23770:37:::1;::::0;::::1;::::0;;::::1;::::0;23791:5:::1;::::0;23770:37:::1;::::0;23791:5:::1;::::0;23770:37:::1;23822:5;:16:::0;;::::1;::::0;::::1;::::0;;;::::1;;::::0;;;23853:12:::1;:25:::0;;;;::::1;::::0;;23606:364:::1;;;23935:12;:23:::0;;;::::1;;::::0;::::1;;::::0;;23606:364:::1;23471:506:::0;;;:::o;9354:214::-;9456:10;9429:4;9446:21;;;:9;:21;;;;;;;;;:30;;;;;;;;;;:39;;;9501:37;9429:4;;9446:30;;9501:37;;;;9479:6;;9501:37;:::i;:::-;;;;;;;;-1:-1:-1;9556:4:0;9354:214;;;;;:::o;25650:35::-;;;;:::o;7908:1151::-;8022:4;8107:11;;8103:885;;8156:15;;;8135:18;8156:15;;;;;;;;;;;8194:20;;;;8186:55;;;;;;;;;;;;:::i;:::-;8270:2;8262:10;;:4;:10;;;8258:719;;8320:15;;;8293:24;8320:15;;;:9;:15;;;;;;;;8336:10;8320:27;;;;;;;;8491:17;8471:37;;8467:251;;8561:6;8541:16;:26;;8533:63;;;;;;;;;;;;:::i;:::-;8619:15;;;;;;;:9;:15;;;;;;;;8635:10;8619:27;;;;;;;8649:25;;;8619:55;;8467:251;8744:16;;;8736:51;;;;;;;;;;;;:::i;:::-;-1:-1:-1;8858:15:0;;;;:9;:15;;;;;;;;;;;8876:19;;;8858:37;;8938:13;;;;;;:23;;;;;;8258:719;8103:885;;9018:2;9003:26;;9012:4;9003:26;;;9022:6;9003:26;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;9047:4:0;7908:1151;;;;;:::o;25608:35::-;25641:2;25608:35;:::o;9630:104::-;9681:7;9708:18;:16;:18::i;:::-;9701:25;;9630:104;:::o;25973:741::-;24527:5;;;;24513:10;:19;24505:64;;;;;;;;;;;;:::i;:::-;26051:16:::1;::::0;::::1;26043:57;;;;;;;;;;;;:::i;:::-;26274:8;:13:::0;26238:25:::1;::::0;26266:91:::1;::::0;26350:6;;26290:32;:15:::1;:32:::0;26274:13:::1;::::0;;::::1;:48;:70;;26329:8;:15:::0;;;::::1;;;26274:70;;;26325:1;26274:70;26266:79;;::::0;:83:::1;:91::i;:::-;26238:119;;26376:11;;26391:1;26376:16;:94;;;;26453:17;25961:3;26396:33;25904:5;26396:11;;:15;;:33;;;;:::i;:::-;:53;;;;;;:74;;26376:94;26368:103;;;::::0;::::1;;26500:23;:15;:21;:23::i;:::-;26484:8;:39:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;26552:25:::1;:17:::0;:23:::1;:25::i;:::-;26534:8;:43:::0;;::::1;::::0;;::::1;::::0;::::1;::::0;::::1;::::0;;;::::1;::::0;;26604:11:::1;::::0;;:20;::::1;26590:34:::0;;26635:13:::1;::::0;::::1;26534:15;26635:13:::0;;;::::1;::::0;;;;;;;:23;;;::::1;::::0;;26674:32;::::1;::::0;::::1;::::0;26618:6;;26674:32:::1;:::i;:::-;;;;;;;;24580:1;25973:741:::0;;:::o;26995:247::-;27071:10;27061:9;:21;;;;;;;;;;;27051:31;;;27043:59;;;;;;;;;;;;:::i;:::-;27125:10;27115:9;:21;;;;;;;;;;;:31;;;;;;;27157:11;:21;;;;;;;27194:40;27115:9;;27125:10;27194:40;;;;27140:6;;27194:40;:::i;:::-;;;;;;;;26995:247;:::o;24059:340::-;24127:12;;;;24179:10;:27;;24171:72;;;;;;;;;;;;:::i;:::-;24302:5;;24281:42;;;;;;;24302:5;;24281:42;;24302:5;;24281:42;24334:5;:21;;;;;;;;;;;;;24366:12;:25;;;;;;;24059:340::o;25773:23::-;;;;;;;;;;;;;:::o;26722:265::-;24527:5;;;;24513:10;:19;24505:64;;;;;;;;;;;;:::i;:::-;26861:31:::1;26874:8;26885:6;26861:4;:31::i;:::-;26903:76;::::0;;;;:16:::1;::::0;::::1;::::0;::::1;::::0;:76:::1;::::0;26935:4:::1;::::0;26903:8;;26962:5;;26969:6;;26977:1:::1;::::0;26903:76:::1;;;:::i;:::-;;::::0;::::1;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;26722:265:::0;;;:::o;6208:53::-;;;;;;;;;;;;;;:::o;6460:41::-;;;;;;;;;;;;;:::o;22617:20::-;;;;;;:::o;25505:37::-;;;;;;;;;;;;;;;;;;;:::o;6898:703::-;6960:4;7051:11;;;;:31;;-1:-1:-1;7066:10:0;:16;;;;7051:31;7047:477;;;7130:10;7099:18;7120:21;;;;;;;;;;;7164:20;;;;7156:55;;;;;;;;;;;;:::i;:::-;7230:10;:16;;;;7226:287;;7275:16;;;7267:51;;;;;;;;;;;;:::i;:::-;7398:10;7388:9;:21;;;;;;;;;;;7412:19;;;7388:43;;:21;7474:13;;;;;;:23;;;;;;7226:287;7047:477;;7560:2;7539:32;;7548:10;7539:32;;;7564:6;7539:32;;;;;;:::i;10363:674::-;10583:20;;;10575:57;;;;;;;;;;;;:::i;:::-;10669:8;10651:15;:26;10643:53;;;;;;;;;;;;:::i;:::-;10729:155;;;10771:21;10818:14;;;:6;:14;;;;;;;;;:16;;10729:128;10818:16;;;;;;10760:85;;10729:128;;10739:108;;10760:85;;9896:66;;10878:6;;10802:7;;10811:5;;10818:16;10836:8;;10760:85;;:::i;:::-;;;;;;;;;;;;;10750:96;;;;;;10739:10;:108::i;:::-;10849:1;10852;10855;10729:128;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:155;;;10707:229;;;;;;;;;;;;:::i;:::-;10947:17;;;;;;;;:9;:17;;;;;;;;:26;;;;;;;;;;;;;;:34;;;10997:32;;;;;10976:5;;10997:32;:::i;:::-;;;;;;;;10363:674;;;;;;;:::o;6322:73::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;22644:27::-;;;;;;:::o;5000:270::-;5051:7;5132:9;5180:25;5169:36;;:93;;5228:34;5254:7;5228:25;:34::i;:::-;5169:93;;;5208:17;5169:93;5162:100;;;5000:270;:::o;352:141::-;445:5;;;440:16;;;;432:53;;;;;;;;;;;;:::i;647:155::-;705:9;735:6;;;:30;;-1:-1:-1;;750:5:0;;;764:1;759;750:5;759:1;745:15;;;;;:20;735:30;727:67;;;;;;;;;;;;:::i;810:161::-;859:9;889:16;;;;881:57;;;;;;;;;;;;:::i;:::-;-1:-1:-1;961:1:0;810:161::o;5278:204::-;5339:14;5402:40;;;;;;;;;;;;;;;;;5444:18;:16;:18::i;:::-;5464:8;5385:88;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;5375:99;;;;;;5366:108;;5278:204;;;:::o;4285:187::-;4359:7;3875:68;4440:7;4457:4;4396:67;;;;;;;;;;:::i;998:241:-1:-;;1102:2;1090:9;1081:7;1077:23;1073:32;1070:2;;;-1:-1;;1108:12;1070:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;1160:63;1064:175;-1:-1;;;1064:175::o;1246:366::-;;;1367:2;1355:9;1346:7;1342:23;1338:32;1335:2;;;-1:-1;;1373:12;1335:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;1425:63;-1:-1;1525:2;1564:22;;72:20;97:33;72:20;97:33;:::i;:::-;1533:63;;;;1329:283;;;;;:::o;1619:491::-;;;;1757:2;1745:9;1736:7;1732:23;1728:32;1725:2;;;-1:-1;;1763:12;1725:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;1815:63;-1:-1;1915:2;1954:22;;72:20;97:33;72:20;97:33;:::i;:::-;1719:391;;1923:63;;-1:-1;;;2023:2;2062:22;;;;654:20;;1719:391::o;2117:991::-;;;;;;;;2321:3;2309:9;2300:7;2296:23;2292:33;2289:2;;;-1:-1;;2328:12;2289:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;2380:63;-1:-1;2480:2;2519:22;;72:20;97:33;72:20;97:33;:::i;:::-;2488:63;-1:-1;2588:2;2627:22;;654:20;;-1:-1;2696:2;2735:22;;654:20;;-1:-1;2804:3;2842:22;;930:20;23737:4;23726:16;;25336:33;;25326:2;;-1:-1;;25373:12;25326:2;2283:825;;;;-1:-1;2283:825;;;;2813:61;2911:3;2951:22;;340:20;;-1:-1;3020:3;3060:22;;;340:20;;2283:825;-1:-1;;2283:825::o;3115:479::-;;;;3247:2;3235:9;3226:7;3222:23;3218:32;3215:2;;;-1:-1;;3253:12;3215:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;3305:63;-1:-1;3405:2;3441:22;;206:20;231:30;206:20;231:30;:::i;:::-;3413:60;-1:-1;3510:2;3546:22;;206:20;231:30;206:20;231:30;:::i;:::-;3518:60;;;;3209:385;;;;;:::o;3601:366::-;;;3722:2;3710:9;3701:7;3697:23;3693:32;3690:2;;;-1:-1;;3728:12;3690:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;3780:63;3880:2;3919:22;;;;654:20;;-1:-1;;;3684:283::o;3974:531::-;;;;4132:2;4120:9;4111:7;4107:23;4103:32;4100:2;;;-1:-1;;4138:12;4100:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;4190:63;-1:-1;4290:2;4329:22;;654:20;;-1:-1;4398:2;4457:22;;497:20;522:53;497:20;522:53;:::i;4512:241::-;;4616:2;4604:9;4595:7;4591:23;4587:32;4584:2;;;-1:-1;;4622:12;4584:2;-1:-1;654:20;;4578:175;-1:-1;4578:175::o;4760:399::-;;;4892:2;4880:9;4871:7;4867:23;4863:32;4860:2;;;-1:-1;;4898:12;4860:2;-1:-1;;802:13;;5061:2;5111:22;;;802:13;;;;;-1:-1;4854:305::o;11721:553::-;;6503:5;22585:12;6615:52;6660:6;6655:3;6648:4;6641:5;6637:16;6615:52;:::i;:::-;6679:16;;;;5468:37;;;-1:-1;6648:4;12126:12;;5468:37;12237:12;;;11913:361;-1:-1;11913:361::o;12281:222::-;23532:42;23521:54;;;;5237:37;;12408:2;12393:18;;12379:124::o;12510:210::-;23116:13;;23109:21;5351:34;;12631:2;12616:18;;12602:118::o;12727:222::-;5468:37;;;12854:2;12839:18;;12825:124::o;12956:780::-;5468:37;;;23532:42;23521:54;;;13388:2;13373:18;;5237:37;23521:54;;;;13471:2;13456:18;;5237:37;13554:2;13539:18;;5468:37;13637:3;13622:19;;5468:37;;;;13721:3;13706:19;;5468:37;13223:3;13208:19;;13194:542::o;13743:444::-;5468:37;;;14090:2;14075:18;;5468:37;;;;23532:42;23521:54;14173:2;14158:18;;5237:37;13926:2;13911:18;;13897:290::o;14194:548::-;5468:37;;;23737:4;23726:16;;;;14562:2;14547:18;;11674:35;14645:2;14630:18;;5468:37;14728:2;14713:18;;5468:37;14401:3;14386:19;;14372:370::o;14749:712::-;23532:42;23521:54;;;5761:64;;23521:54;;;15189:2;15174:18;;5237:37;23521:54;;;;15272:2;15257:18;;5237:37;15355:2;15340:18;;5468:37;;;;15446:3;15431:19;;5916:58;;;;15010:3;14995:19;;14981:480::o;15468:310::-;;15615:2;15636:17;15629:47;6131:5;22585:12;22742:6;15615:2;15604:9;15600:18;22730:19;6225:52;6270:6;22770:14;15604:9;22770:14;15615:2;6251:5;6247:16;6225:52;:::i;:::-;24608:2;24588:14;24604:7;24584:28;6289:39;;;;22770:14;6289:39;;15586:192;-1:-1;;15586:192::o;15785:416::-;15985:2;15999:47;;;6932:2;15970:18;;;22730:19;6968:24;22770:14;;;6948:45;7012:12;;;15956:245::o;16208:416::-;16408:2;16422:47;;;7263:2;16393:18;;;22730:19;7299:23;22770:14;;;7279:44;7342:12;;;16379:245::o;16631:416::-;16831:2;16845:47;;;7593:2;16816:18;;;22730:19;7629:30;22770:14;;;7609:51;7679:12;;;16802:245::o;17054:416::-;17254:2;17268:47;;;7930:2;17239:18;;;22730:19;7966:26;22770:14;;;7946:47;8012:12;;;17225:245::o;17477:416::-;17677:2;17691:47;;;8263:2;17662:18;;;22730:19;8299:26;22770:14;;;8279:47;8345:12;;;17648:245::o;17900:416::-;18100:2;18114:47;;;8596:2;18085:18;;;22730:19;8632:17;22770:14;;;8612:38;8669:12;;;18071:245::o;18323:416::-;18523:2;18537:47;;;8920:2;18508:18;;;22730:19;8956:16;22770:14;;;8936:37;8992:12;;;18494:245::o;18746:416::-;18946:2;18960:47;;;18931:18;;;22730:19;9279:34;22770:14;;;9259:55;9333:12;;;18917:245::o;19169:416::-;19369:2;19383:47;;;19354:18;;;22730:19;9620:34;22770:14;;;9600:55;9674:12;;;19340:245::o;19592:416::-;19792:2;19806:47;;;9925:2;19777:18;;;22730:19;9961:30;22770:14;;;9941:51;10011:12;;;19763:245::o;20015:416::-;20215:2;20229:47;;;10262:2;20200:18;;;22730:19;10298:26;22770:14;;;10278:47;10344:12;;;20186:245::o;20438:416::-;20638:2;20652:47;;;10595:2;20623:18;;;22730:19;10631:24;22770:14;;;10611:45;10675:12;;;20609:245::o;20861:416::-;21061:2;21075:47;;;10926:2;21046:18;;;22730:19;10962:26;22770:14;;;10942:47;11008:12;;;21032:245::o;21284:416::-;21484:2;21498:47;;;11259:2;21469:18;;;22730:19;11295:26;22770:14;;;11275:47;11341:12;;;21455:245::o;21707:333::-;23412:34;23401:46;;;11438:37;;23401:46;;22026:2;22011:18;;11438:37;21862:2;21847:18;;21833:207::o;22276:214::-;23737:4;23726:16;;;;11674:35;;22399:2;22384:18;;22370:120::o;24163:268::-;24228:1;24235:101;24249:6;24246:1;24243:13;24235:101;;;24316:11;;;24310:18;24297:11;;;24290:39;24271:2;24264:10;24235:101;;;24351:6;24348:1;24345:13;24342:2;;;24228:1;24407:6;24402:3;24398:16;24391:27;24342:2;;24212:219;;;:::o;24625:117::-;23532:42;24712:5;23521:54;24687:5;24684:35;24674:2;;24733:1;;24723:12;24674:2;24668:74;:::o;24749:111::-;24830:5;23116:13;23109:21;24808:5;24805:32;24795:2;;24851:1;;24841:12

Swarm Source

ipfs://e98cc5840c217883fec6085f37f8bf1aec9c9edfdb3868aed3e7e8a4bfb059fb
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.