More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 725 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw BMI Man... | 13481472 | 1109 days ago | IN | 0 ETH | 0.0124158 | ||||
Withdraw | 13384999 | 1124 days ago | IN | 0 ETH | 0.0048088 | ||||
Withdraw BMI Man... | 13383572 | 1124 days ago | IN | 0 ETH | 0.00507188 | ||||
Deposit | 13310611 | 1136 days ago | IN | 0 ETH | 0.01635068 | ||||
Withdraw | 13277640 | 1141 days ago | IN | 0 ETH | 0.00413919 | ||||
Withdraw | 13269305 | 1142 days ago | IN | 0 ETH | 0.00407603 | ||||
Deposit | 13243220 | 1146 days ago | IN | 0 ETH | 0.00595873 | ||||
Deposit | 13213523 | 1151 days ago | IN | 0 ETH | 0.0087382 | ||||
Withdraw | 13176079 | 1156 days ago | IN | 0 ETH | 0.0062204 | ||||
Deposit | 13170463 | 1157 days ago | IN | 0 ETH | 0.01098577 | ||||
Withdraw | 13098572 | 1168 days ago | IN | 0 ETH | 0.00591979 | ||||
Deposit | 13085342 | 1170 days ago | IN | 0 ETH | 0.00844168 | ||||
Withdraw BMI Man... | 13080792 | 1171 days ago | IN | 0 ETH | 0.00374526 | ||||
Withdraw BMI Man... | 13076830 | 1172 days ago | IN | 0 ETH | 0.00446674 | ||||
Withdraw BMI Man... | 13075358 | 1172 days ago | IN | 0 ETH | 0.00311375 | ||||
Recover ERC20 | 13073497 | 1172 days ago | IN | 0 ETH | 0.00103658 | ||||
Social Zap | 13073497 | 1172 days ago | IN | 0 ETH | 0.1172214 | ||||
Deposit | 13069011 | 1173 days ago | IN | 0 ETH | 0.00374366 | ||||
Withdraw | 13067870 | 1173 days ago | IN | 0 ETH | 0.00185706 | ||||
Deposit | 13066820 | 1173 days ago | IN | 0 ETH | 0.00215058 | ||||
Deposit | 13062150 | 1174 days ago | IN | 0 ETH | 0.0023277 | ||||
Deposit | 13059970 | 1174 days ago | IN | 0 ETH | 0.00159273 | ||||
Deposit | 13059970 | 1174 days ago | IN | 0 ETH | 0.00277727 | ||||
Withdraw | 13058370 | 1175 days ago | IN | 0 ETH | 0.00294775 | ||||
Deposit | 13048271 | 1176 days ago | IN | 0 ETH | 0.00325611 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SocialBMIZapper
Compiler Version
v0.7.3+commit.9bfce1f6
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; import "./IATokenV1.sol"; import "./ICToken.sol"; import "./IComptroller.sol"; import "./ISushiBar.sol"; import "./ILendingPoolV1.sol"; import "./ICompoundLens.sol"; import "./IUniswapV2.sol"; import "./IBasicIssuanceModule.sol"; import "./IOneInch.sol"; import "./SafeMath.sol"; import "./ERC20.sol"; import "./IERC20.sol"; import "./SafeERC20.sol"; import "./ReentrancyGuard.sol"; import "./BMIZapper.sol"; // Basket Weaver is a way to socialize gas costs related to minting baskets tokens contract SocialBMIZapper is ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; address public governance; address public bmi; address public bmiZapper; // **** ERC20 **** // // Token => Id mapping(address => uint256) public curId; // Token => User Address => Id => Amount deposited mapping(address => mapping(address => mapping(uint256 => uint256))) public deposits; // Token => User Address => Id => Claimed mapping(address => mapping(address => mapping(uint256 => bool))) public claimed; // Token => Id => Amount deposited mapping(address => mapping(uint256 => uint256)) public totalDeposited; // Token => Basket minted per weaveId mapping(address => mapping(uint256 => uint256)) public minted; // Approved users to call weave // This is v important as invalid inputs will // be basically a "fat finger" mapping(address => bool) public approvedWeavers; // **** Constructor and modifiers **** constructor( address _governance, address _bmi, address _bmiZapper ) { governance = _governance; bmi = _bmi; bmiZapper = _bmiZapper; } modifier onlyGov() { require(msg.sender == governance, "!governance"); _; } modifier onlyWeavers { require(msg.sender == governance || approvedWeavers[msg.sender], "!weaver"); _; } receive() external payable {} // **** Protected functions **** function approveWeaver(address _weaver) public onlyGov { approvedWeavers[_weaver] = true; } function revokeWeaver(address _weaver) public onlyGov { approvedWeavers[_weaver] = false; } function setGov(address _governance) public onlyGov { governance = _governance; } // Emergency function recoverERC20(address _token) public onlyGov { IERC20(_token).safeTransfer(governance, IERC20(_token).balanceOf(address(this))); } function socialZap( address _from, address _fromUnderlying, uint256 _fromUnderlyingAmount, uint256 _minBMIRecv, address[] memory _bmiConstituents, uint256[] memory _bmiConstituentsWeightings, address _aggregator, bytes memory _aggregatorData, uint256 deadline ) public onlyWeavers { require(block.timestamp <= deadline, "expired"); uint256 _fromAmount = IERC20(_from).balanceOf(address(this)); IERC20(_from).safeApprove(bmiZapper, 0); IERC20(_from).safeApprove(bmiZapper, _fromAmount); uint256 bmiMinted = BMIZapper(bmiZapper).zapToBMI( _from, _fromAmount, _fromUnderlying, _fromUnderlyingAmount, _minBMIRecv, _bmiConstituents, _bmiConstituentsWeightings, _aggregator, _aggregatorData, true ); minted[_from][curId[_from]] = bmiMinted; curId[_from]++; } // **** Public functions **** /// @notice Deposits ERC20 to be later converted into the Basket by some kind soul function deposit(address _token, uint256 _amount) public nonReentrant { IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount); deposits[_token][msg.sender][curId[_token]] = deposits[_token][msg.sender][curId[_token]].add(_amount); totalDeposited[_token][curId[_token]] = totalDeposited[_token][curId[_token]].add(_amount); } /// @notice User doesn't want to wait anymore and just wants their ERC20 back function withdraw(address _token, uint256 _amount) public nonReentrant { // Reverts if withdrawing too many deposits[_token][msg.sender][curId[_token]] = deposits[_token][msg.sender][curId[_token]].sub(_amount); totalDeposited[_token][curId[_token]] = totalDeposited[_token][curId[_token]].sub(_amount); IERC20(_token).safeTransfer(msg.sender, _amount); } /// @notice User withdraws converted Basket token function withdrawBMI(address _token, uint256 _id) public nonReentrant { require(_id < curId[_token], "!weaved"); require(!claimed[_token][msg.sender][_id], "already-claimed"); uint256 userDeposited = deposits[_token][msg.sender][_id]; require(userDeposited > 0, "!deposit"); uint256 ratio = userDeposited.mul(1e18).div(totalDeposited[_token][_id]); uint256 userBasketAmount = minted[_token][_id].mul(ratio).div(1e18); claimed[_token][msg.sender][_id] = true; IERC20(address(bmi)).safeTransfer(msg.sender, userBasketAmount); } /// @notice User withdraws converted Basket token function withdrawBMIMany(address[] memory _tokens, uint256[] memory _ids) public { assert(_tokens.length == _ids.length); for (uint256 i = 0; i < _tokens.length; i++) { withdrawBMI(_tokens[i], _ids[i]); } } }
// SPDX-License-Identifier: BSD-4-Clause /* * ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting. * Author: Mikhail Vladimirov <[email protected]> */ pragma solidity ^0.7.0; /** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * need to store it, thus in Solidity signed 64.64-bit fixed point numbers are * represented by int128 type holding only the numerator. */ library ABDKMath64x64 { /* * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /* * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; /** * Convert signed 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x signed 256-bit integer number * @return signed 64.64-bit fixed point number */ function fromInt (int256 x) internal pure returns (int128) { require (x >= -0x8000000000000000 && x <= 0x7FFFFFFFFFFFFFFF); return int128 (x << 64); } /** * Convert signed 64.64 fixed point number into signed 64-bit integer number * rounding down. * * @param x signed 64.64-bit fixed point number * @return signed 64-bit integer number */ function toInt (int128 x) internal pure returns (int64) { return int64 (x >> 64); } /** * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */ function fromUInt (uint256 x) internal pure returns (int128) { require (x <= 0x7FFFFFFFFFFFFFFF); return int128 (x << 64); } /** * Convert signed 64.64 fixed point number into unsigned 64-bit integer * number rounding down. Revert on underflow. * * @param x signed 64.64-bit fixed point number * @return unsigned 64-bit integer number */ function toUInt (int128 x) internal pure returns (uint64) { require (x >= 0); return uint64 (x >> 64); } /** * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point * number rounding down. Revert on overflow. * * @param x signed 128.128-bin fixed point number * @return signed 64.64-bit fixed point number */ function from128x128 (int256 x) internal pure returns (int128) { int256 result = x >> 64; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); } /** * Convert signed 64.64 fixed point number into signed 128.128 fixed point * number. * * @param x signed 64.64-bit fixed point number * @return signed 128.128 fixed point number */ function to128x128 (int128 x) internal pure returns (int256) { return int256 (x) << 64; } /** * Calculate x + y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function add (int128 x, int128 y) internal pure returns (int128) { int256 result = int256(x) + y; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); } /** * Calculate x - y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function sub (int128 x, int128 y) internal pure returns (int128) { int256 result = int256(x) - y; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); } /** * Calculate x * y rounding down. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function mul (int128 x, int128 y) internal pure returns (int128) { int256 result = int256(x) * y >> 64; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); } /** * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point * number and y is signed 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y signed 256-bit integer number * @return signed 256-bit integer number */ function muli (int128 x, int256 y) internal pure returns (int256) { if (x == MIN_64x64) { require (y >= -0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF && y <= 0x1000000000000000000000000000000000000000000000000); return -y << 63; } else { bool negativeResult = false; if (x < 0) { x = -x; negativeResult = true; } if (y < 0) { y = -y; // We rely on overflow behavior here negativeResult = !negativeResult; } uint256 absoluteResult = mulu (x, uint256 (y)); if (negativeResult) { require (absoluteResult <= 0x8000000000000000000000000000000000000000000000000000000000000000); return -int256 (absoluteResult); // We rely on overflow behavior here } else { require (absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); return int256 (absoluteResult); } } } /** * Calculate x * y rounding down, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y unsigned 256-bit integer number * @return unsigned 256-bit integer number */ function mulu (int128 x, uint256 y) internal pure returns (uint256) { if (y == 0) return 0; require (x >= 0); uint256 lo = (uint256 (x) * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 64; uint256 hi = uint256 (x) * (y >> 128); require (hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); hi <<= 64; require (hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - lo); return hi + lo; } /** * Calculate x / y rounding towards zero. Revert on overflow or when y is * zero. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function div (int128 x, int128 y) internal pure returns (int128) { require (y != 0); int256 result = (int256 (x) << 64) / y; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); } /** * Calculate x / y rounding towards zero, where x and y are signed 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x signed 256-bit integer number * @param y signed 256-bit integer number * @return signed 64.64-bit fixed point number */ function divi (int256 x, int256 y) internal pure returns (int128) { require (y != 0); bool negativeResult = false; if (x < 0) { x = -x; // We rely on overflow behavior here negativeResult = true; } if (y < 0) { y = -y; // We rely on overflow behavior here negativeResult = !negativeResult; } uint128 absoluteResult = divuu (uint256 (x), uint256 (y)); if (negativeResult) { require (absoluteResult <= 0x80000000000000000000000000000000); return -int128 (absoluteResult); // We rely on overflow behavior here } else { require (absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); return int128 (absoluteResult); // We rely on overflow behavior here } } /** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */ function divu (uint256 x, uint256 y) internal pure returns (int128) { require (y != 0); uint128 result = divuu (x, y); require (result <= uint128 (MAX_64x64)); return int128 (result); } /** * Calculate -x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function neg (int128 x) internal pure returns (int128) { require (x != MIN_64x64); return -x; } /** * Calculate |x|. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function abs (int128 x) internal pure returns (int128) { require (x != MIN_64x64); return x < 0 ? -x : x; } /** * Calculate 1 / x rounding towards zero. Revert on overflow or when x is * zero. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function inv (int128 x) internal pure returns (int128) { require (x != 0); int256 result = int256 (0x100000000000000000000000000000000) / x; require (result >= MIN_64x64 && result <= MAX_64x64); return int128 (result); } /** * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function avg (int128 x, int128 y) internal pure returns (int128) { return int128 ((int256 (x) + int256 (y)) >> 1); } /** * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down. * Revert on overflow or in case x * y is negative. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function gavg (int128 x, int128 y) internal pure returns (int128) { int256 m = int256 (x) * int256 (y); require (m >= 0); require (m < 0x4000000000000000000000000000000000000000000000000000000000000000); return int128 (sqrtu (uint256 (m))); } /** * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y uint256 value * @return signed 64.64-bit fixed point number */ function pow (int128 x, uint256 y) internal pure returns (int128) { uint256 absoluteResult; bool negativeResult = false; if (x >= 0) { absoluteResult = powu (uint256 (x) << 63, y); } else { // We rely on overflow behavior here absoluteResult = powu (uint256 (uint128 (-x)) << 63, y); negativeResult = y & 1 > 0; } absoluteResult >>= 63; if (negativeResult) { require (absoluteResult <= 0x80000000000000000000000000000000); return -int128 (absoluteResult); // We rely on overflow behavior here } else { require (absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); return int128 (absoluteResult); // We rely on overflow behavior here } } /** * Calculate sqrt (x) rounding down. Revert if x < 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function sqrt (int128 x) internal pure returns (int128) { require (x >= 0); return int128 (sqrtu (uint256 (x) << 64)); } /** * Calculate binary logarithm of x. Revert if x <= 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function log_2 (int128 x) internal pure returns (int128) { require (x > 0); int256 msb = 0; int256 xc = x; if (xc >= 0x10000000000000000) { xc >>= 64; msb += 64; } if (xc >= 0x100000000) { xc >>= 32; msb += 32; } if (xc >= 0x10000) { xc >>= 16; msb += 16; } if (xc >= 0x100) { xc >>= 8; msb += 8; } if (xc >= 0x10) { xc >>= 4; msb += 4; } if (xc >= 0x4) { xc >>= 2; msb += 2; } if (xc >= 0x2) msb += 1; // No need to shift xc anymore int256 result = msb - 64 << 64; uint256 ux = uint256 (x) << uint256 (127 - msb); for (int256 bit = 0x8000000000000000; bit > 0; bit >>= 1) { ux *= ux; uint256 b = ux >> 255; ux >>= 127 + b; result += bit * int256 (b); } return int128 (result); } /** * Calculate natural logarithm of x. Revert if x <= 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function ln (int128 x) internal pure returns (int128) { require (x > 0); return int128 ( uint256 (log_2 (x)) * 0xB17217F7D1CF79ABC9E3B39803F2F6AF >> 128); } /** * Calculate binary exponent of x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function exp_2 (int128 x) internal pure returns (int128) { require (x < 0x400000000000000000); // Overflow if (x < -0x400000000000000000) return 0; // Underflow uint256 result = 0x80000000000000000000000000000000; if (x & 0x8000000000000000 > 0) result = result * 0x16A09E667F3BCC908B2FB1366EA957D3E >> 128; if (x & 0x4000000000000000 > 0) result = result * 0x1306FE0A31B7152DE8D5A46305C85EDEC >> 128; if (x & 0x2000000000000000 > 0) result = result * 0x1172B83C7D517ADCDF7C8C50EB14A791F >> 128; if (x & 0x1000000000000000 > 0) result = result * 0x10B5586CF9890F6298B92B71842A98363 >> 128; if (x & 0x800000000000000 > 0) result = result * 0x1059B0D31585743AE7C548EB68CA417FD >> 128; if (x & 0x400000000000000 > 0) result = result * 0x102C9A3E778060EE6F7CACA4F7A29BDE8 >> 128; if (x & 0x200000000000000 > 0) result = result * 0x10163DA9FB33356D84A66AE336DCDFA3F >> 128; if (x & 0x100000000000000 > 0) result = result * 0x100B1AFA5ABCBED6129AB13EC11DC9543 >> 128; if (x & 0x80000000000000 > 0) result = result * 0x10058C86DA1C09EA1FF19D294CF2F679B >> 128; if (x & 0x40000000000000 > 0) result = result * 0x1002C605E2E8CEC506D21BFC89A23A00F >> 128; if (x & 0x20000000000000 > 0) result = result * 0x100162F3904051FA128BCA9C55C31E5DF >> 128; if (x & 0x10000000000000 > 0) result = result * 0x1000B175EFFDC76BA38E31671CA939725 >> 128; if (x & 0x8000000000000 > 0) result = result * 0x100058BA01FB9F96D6CACD4B180917C3D >> 128; if (x & 0x4000000000000 > 0) result = result * 0x10002C5CC37DA9491D0985C348C68E7B3 >> 128; if (x & 0x2000000000000 > 0) result = result * 0x1000162E525EE054754457D5995292026 >> 128; if (x & 0x1000000000000 > 0) result = result * 0x10000B17255775C040618BF4A4ADE83FC >> 128; if (x & 0x800000000000 > 0) result = result * 0x1000058B91B5BC9AE2EED81E9B7D4CFAB >> 128; if (x & 0x400000000000 > 0) result = result * 0x100002C5C89D5EC6CA4D7C8ACC017B7C9 >> 128; if (x & 0x200000000000 > 0) result = result * 0x10000162E43F4F831060E02D839A9D16D >> 128; if (x & 0x100000000000 > 0) result = result * 0x100000B1721BCFC99D9F890EA06911763 >> 128; if (x & 0x80000000000 > 0) result = result * 0x10000058B90CF1E6D97F9CA14DBCC1628 >> 128; if (x & 0x40000000000 > 0) result = result * 0x1000002C5C863B73F016468F6BAC5CA2B >> 128; if (x & 0x20000000000 > 0) result = result * 0x100000162E430E5A18F6119E3C02282A5 >> 128; if (x & 0x10000000000 > 0) result = result * 0x1000000B1721835514B86E6D96EFD1BFE >> 128; if (x & 0x8000000000 > 0) result = result * 0x100000058B90C0B48C6BE5DF846C5B2EF >> 128; if (x & 0x4000000000 > 0) result = result * 0x10000002C5C8601CC6B9E94213C72737A >> 128; if (x & 0x2000000000 > 0) result = result * 0x1000000162E42FFF037DF38AA2B219F06 >> 128; if (x & 0x1000000000 > 0) result = result * 0x10000000B17217FBA9C739AA5819F44F9 >> 128; if (x & 0x800000000 > 0) result = result * 0x1000000058B90BFCDEE5ACD3C1CEDC823 >> 128; if (x & 0x400000000 > 0) result = result * 0x100000002C5C85FE31F35A6A30DA1BE50 >> 128; if (x & 0x200000000 > 0) result = result * 0x10000000162E42FF0999CE3541B9FFFCF >> 128; if (x & 0x100000000 > 0) result = result * 0x100000000B17217F80F4EF5AADDA45554 >> 128; if (x & 0x80000000 > 0) result = result * 0x10000000058B90BFBF8479BD5A81B51AD >> 128; if (x & 0x40000000 > 0) result = result * 0x1000000002C5C85FDF84BD62AE30A74CC >> 128; if (x & 0x20000000 > 0) result = result * 0x100000000162E42FEFB2FED257559BDAA >> 128; if (x & 0x10000000 > 0) result = result * 0x1000000000B17217F7D5A7716BBA4A9AE >> 128; if (x & 0x8000000 > 0) result = result * 0x100000000058B90BFBE9DDBAC5E109CCE >> 128; if (x & 0x4000000 > 0) result = result * 0x10000000002C5C85FDF4B15DE6F17EB0D >> 128; if (x & 0x2000000 > 0) result = result * 0x1000000000162E42FEFA494F1478FDE05 >> 128; if (x & 0x1000000 > 0) result = result * 0x10000000000B17217F7D20CF927C8E94C >> 128; if (x & 0x800000 > 0) result = result * 0x1000000000058B90BFBE8F71CB4E4B33D >> 128; if (x & 0x400000 > 0) result = result * 0x100000000002C5C85FDF477B662B26945 >> 128; if (x & 0x200000 > 0) result = result * 0x10000000000162E42FEFA3AE53369388C >> 128; if (x & 0x100000 > 0) result = result * 0x100000000000B17217F7D1D351A389D40 >> 128; if (x & 0x80000 > 0) result = result * 0x10000000000058B90BFBE8E8B2D3D4EDE >> 128; if (x & 0x40000 > 0) result = result * 0x1000000000002C5C85FDF4741BEA6E77E >> 128; if (x & 0x20000 > 0) result = result * 0x100000000000162E42FEFA39FE95583C2 >> 128; if (x & 0x10000 > 0) result = result * 0x1000000000000B17217F7D1CFB72B45E1 >> 128; if (x & 0x8000 > 0) result = result * 0x100000000000058B90BFBE8E7CC35C3F0 >> 128; if (x & 0x4000 > 0) result = result * 0x10000000000002C5C85FDF473E242EA38 >> 128; if (x & 0x2000 > 0) result = result * 0x1000000000000162E42FEFA39F02B772C >> 128; if (x & 0x1000 > 0) result = result * 0x10000000000000B17217F7D1CF7D83C1A >> 128; if (x & 0x800 > 0) result = result * 0x1000000000000058B90BFBE8E7BDCBE2E >> 128; if (x & 0x400 > 0) result = result * 0x100000000000002C5C85FDF473DEA871F >> 128; if (x & 0x200 > 0) result = result * 0x10000000000000162E42FEFA39EF44D91 >> 128; if (x & 0x100 > 0) result = result * 0x100000000000000B17217F7D1CF79E949 >> 128; if (x & 0x80 > 0) result = result * 0x10000000000000058B90BFBE8E7BCE544 >> 128; if (x & 0x40 > 0) result = result * 0x1000000000000002C5C85FDF473DE6ECA >> 128; if (x & 0x20 > 0) result = result * 0x100000000000000162E42FEFA39EF366F >> 128; if (x & 0x10 > 0) result = result * 0x1000000000000000B17217F7D1CF79AFA >> 128; if (x & 0x8 > 0) result = result * 0x100000000000000058B90BFBE8E7BCD6D >> 128; if (x & 0x4 > 0) result = result * 0x10000000000000002C5C85FDF473DE6B2 >> 128; if (x & 0x2 > 0) result = result * 0x1000000000000000162E42FEFA39EF358 >> 128; if (x & 0x1 > 0) result = result * 0x10000000000000000B17217F7D1CF79AB >> 128; result >>= uint256 (63 - (x >> 64)); require (result <= uint256 (MAX_64x64)); return int128 (result); } /** * Calculate natural exponent of x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function exp (int128 x) internal pure returns (int128) { require (x < 0x400000000000000000); // Overflow if (x < -0x400000000000000000) return 0; // Underflow return exp_2 ( int128 (int256 (x) * 0x171547652B82FE1777D0FFDA0D23A7D12 >> 128)); } /** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return unsigned 64.64-bit fixed point number */ function divuu (uint256 x, uint256 y) private pure returns (uint128) { require (y != 0); uint256 result; if (x <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) result = (x << 64) / y; else { uint256 msb = 192; uint256 xc = x >> 192; if (xc >= 0x100000000) { xc >>= 32; msb += 32; } if (xc >= 0x10000) { xc >>= 16; msb += 16; } if (xc >= 0x100) { xc >>= 8; msb += 8; } if (xc >= 0x10) { xc >>= 4; msb += 4; } if (xc >= 0x4) { xc >>= 2; msb += 2; } if (xc >= 0x2) msb += 1; // No need to shift xc anymore result = (x << 255 - msb) / ((y - 1 >> msb - 191) + 1); require (result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); uint256 hi = result * (y >> 128); uint256 lo = result * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); uint256 xh = x >> 192; uint256 xl = x << 64; if (xl < lo) xh -= 1; xl -= lo; // We rely on overflow behavior here lo = hi << 128; if (xl < lo) xh -= 1; xl -= lo; // We rely on overflow behavior here assert (xh == hi >> 128); result += xl / y; } require (result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); return uint128 (result); } /** * Calculate x^y assuming 0^0 is 1, where x is unsigned 129.127 fixed point * number and y is unsigned 256-bit integer number. Revert on overflow. * * @param x unsigned 129.127-bit fixed point number * @param y uint256 value * @return unsigned 129.127-bit fixed point number */ function powu (uint256 x, uint256 y) private pure returns (uint256) { if (y == 0) return 0x80000000000000000000000000000000; else if (x == 0) return 0; else { int256 msb = 0; uint256 xc = x; if (xc >= 0x100000000000000000000000000000000) { xc >>= 128; msb += 128; } if (xc >= 0x10000000000000000) { xc >>= 64; msb += 64; } if (xc >= 0x100000000) { xc >>= 32; msb += 32; } if (xc >= 0x10000) { xc >>= 16; msb += 16; } if (xc >= 0x100) { xc >>= 8; msb += 8; } if (xc >= 0x10) { xc >>= 4; msb += 4; } if (xc >= 0x4) { xc >>= 2; msb += 2; } if (xc >= 0x2) msb += 1; // No need to shift xc anymore int256 xe = msb - 127; if (xe > 0) x >>= uint256 (xe); else x <<= uint256 (-xe); uint256 result = 0x80000000000000000000000000000000; int256 re = 0; while (y > 0) { if (y & 1 > 0) { result = result * x; y -= 1; re += xe; if (result >= 0x8000000000000000000000000000000000000000000000000000000000000000) { result >>= 128; re += 1; } else result >>= 127; if (re < -127) return 0; // Underflow require (re < 128); // Overflow } else { x = x * x; y >>= 1; xe <<= 1; if (x >= 0x8000000000000000000000000000000000000000000000000000000000000000) { x >>= 128; xe += 1; } else x >>= 127; if (xe < -127) return 0; // Underflow require (xe < 128); // Overflow } } if (re > 0) result <<= uint256 (re); else if (re < 0) result >>= uint256 (-re); return result; } } /** * Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer * number. * * @param x unsigned 256-bit integer number * @return unsigned 128-bit integer number */ function sqrtu (uint256 x) private pure returns (uint128) { if (x == 0) return 0; else { uint256 xx = x; uint256 r = 1; if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; } if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; } if (xx >= 0x100000000) { xx >>= 32; r <<= 16; } if (xx >= 0x10000) { xx >>= 16; r <<= 8; } if (xx >= 0x100) { xx >>= 8; r <<= 4; } if (xx >= 0x10) { xx >>= 4; r <<= 2; } if (xx >= 0x8) { r <<= 1; } r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; // Seven iterations should be enough uint256 r1 = x / r; return uint128 (r < r1 ? r : r1); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; import "./ICToken.sol"; import "./IYearn.sol"; import "./ILendingPoolV2.sol"; import "./IBasket.sol"; import "./IATokenV2.sol"; import "./ICurveZap.sol"; import "./ICurve.sol"; import "./ABDKMath64x64.sol"; import "./ERC20.sol"; import "./IERC20.sol"; import "./SafeERC20.sol"; import "./SafeMath.sol"; import "./Ownable.sol"; import "./console.sol"; contract BMIZapper is Ownable { using SafeERC20 for IERC20; using SafeMath for uint256; using ABDKMath64x64 for int128; using ABDKMath64x64 for uint256; // Auxillery address constant AAVE_LENDING_POOL_V2 = 0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9; // Tokens // BMI address public BMI; // Bare address constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F; address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address constant TUSD = 0x0000000000085d4780B73119b644AE5ecd22b376; address constant SUSD = 0x57Ab1ec28D129707052df4dF418D58a2D46d5f51; address constant BUSD = 0x4Fabb145d64652a948d72533023f6E7A623C7C53; address constant USDP = 0x1456688345527bE1f37E9e627DA0837D6f08C925; address constant FRAX = 0x853d955aCEf822Db058eb8505911ED77F175b99e; address constant ALUSD = 0xBC6DA0FE9aD5f3b0d58160288917AA56653660E9; address constant LUSD = 0x5f98805A4E8be255a32880FDeC7F6728C6568bA0; address constant USDN = 0x674C6Ad92Fd080e4004b2312b45f796a192D27a0; // Yearn address constant yDAI = 0x19D3364A399d251E894aC732651be8B0E4e85001; address constant yUSDC = 0x5f18C75AbDAe578b483E5F43f12a39cF75b973a9; address constant yUSDT = 0x7Da96a3891Add058AdA2E826306D812C638D87a7; address constant yTUSD = 0x37d19d1c4E1fa9DC47bD1eA12f742a0887eDa74a; address constant ySUSD = 0xa5cA62D95D24A4a350983D5B8ac4EB8638887396; // Yearn CRV address constant yCRV = 0x4B5BfD52124784745c1071dcB244C6688d2533d3; // Y Pool address constant ycrvSUSD = 0x5a770DbD3Ee6bAF2802D29a901Ef11501C44797A; address constant ycrvYBUSD = 0x8ee57c05741aA9DB947A744E713C15d4d19D8822; address constant ycrvBUSD = 0x6Ede7F19df5df6EF23bD5B9CeDb651580Bdf56Ca; address constant ycrvUSDP = 0xC4dAf3b5e2A9e93861c3FBDd25f1e943B8D87417; address constant ycrvFRAX = 0xB4AdA607B9d6b2c9Ee07A275e9616B84AC560139; address constant ycrvALUSD = 0xA74d4B67b3368E83797a35382AFB776bAAE4F5C8; address constant ycrvLUSD = 0x5fA5B62c8AF877CB37031e0a3B2f34A78e3C56A6; address constant ycrvUSDN = 0x3B96d491f067912D18563d56858Ba7d6EC67a6fa; address constant ycrvIB = 0x27b7b1ad7288079A66d12350c828D3C00A6F07d7; address constant ycrvThree = 0x84E13785B5a27879921D6F685f041421C7F482dA; address constant ycrvDUSD = 0x30FCf7c6cDfC46eC237783D94Fc78553E79d4E9C; address constant ycrvMUSD = 0x8cc94ccd0f3841a468184aCA3Cc478D2148E1757; address constant ycrvUST = 0x1C6a9783F812b3Af3aBbf7de64c3cD7CC7D1af44; // Aave address constant aDAI = 0x028171bCA77440897B824Ca71D1c56caC55b68A3; address constant aUSDC = 0xBcca60bB61934080951369a648Fb03DF4F96263C; address constant aUSDT = 0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811; address constant aTUSD = 0x101cc05f4A51C0319f570d5E146a8C625198e636; address constant aSUSD = 0x6C5024Cd4F8A59110119C56f8933403A539555EB; // Compound address constant cDAI = 0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643; address constant cUSDC = 0x39AA39c021dfbaE8faC545936693aC917d5E7563; address constant cUSDT = 0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9; address constant cTUSD = 0x12392F67bdf24faE0AF363c24aC620a2f67DAd86; // Curve address constant crvY = 0xdF5e0e81Dff6FAF3A7e52BA697820c5e32D806A8; address constant crvYPool = 0x45F783CCE6B7FF23B2ab2D70e416cdb7D6055f51; address constant crvYZap = 0xbBC81d23Ea2c3ec7e56D39296F0cbB648873a5d3; address constant crvSUSD = 0xC25a3A3b969415c80451098fa907EC722572917F; address constant crvSUSDPool = 0xA5407eAE9Ba41422680e2e00537571bcC53efBfD; address constant crvSUSDZap = 0xFCBa3E75865d2d561BE8D220616520c171F12851; address constant crvYBUSD = 0x3B3Ac5386837Dc563660FB6a0937DFAa5924333B; address constant crvYBUSDPool = 0x79a8C46DeA5aDa233ABaFFD40F3A0A2B1e5A4F27; address constant crvYBUSDZap = 0xb6c057591E073249F2D9D88Ba59a46CFC9B59EdB; address constant crvThree = 0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490; address constant crvThreePool = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7; address constant crvUSDP = 0x7Eb40E450b9655f4B3cC4259BCC731c63ff55ae6; address constant crvUSDPPool = 0x42d7025938bEc20B69cBae5A77421082407f053A; address constant crvUSDPZap = 0x3c8cAee4E09296800f8D29A68Fa3837e2dae4940; address constant crvDUSD = 0x3a664Ab939FD8482048609f652f9a0B0677337B9; address constant crvDUSDPool = 0x8038C01A0390a8c547446a0b2c18fc9aEFEcc10c; address constant crvDUSDZap = 0x61E10659fe3aa93d036d099405224E4Ac24996d0; address constant crvMUSD = 0x1AEf73d49Dedc4b1778d0706583995958Dc862e6; address constant crvMUSDPool = 0x8474DdbE98F5aA3179B3B3F5942D724aFcdec9f6; address constant crvMUSDZap = 0x803A2B40c5a9BB2B86DD630B274Fa2A9202874C2; address constant crvUST = 0x94e131324b6054c0D789b190b2dAC504e4361b53; address constant crvUSTPool = 0x890f4e345B1dAED0367A877a1612f86A1f86985f; address constant crvUSTZap = 0xB0a0716841F2Fc03fbA72A891B8Bb13584F52F2d; address constant crvUSDN = 0x4f3E8F405CF5aFC05D68142F3783bDfE13811522; address constant crvUSDNPool = 0x0f9cb53Ebe405d49A0bbdBD291A65Ff571bC83e1; address constant crvUSDNZap = 0x094d12e5b541784701FD8d65F11fc0598FBC6332; address constant crvIB = 0x5282a4eF67D9C33135340fB3289cc1711c13638C; address constant crvIBPool = 0x2dded6Da1BF5DBdF597C45fcFaa3194e53EcfeAF; address constant crvBUSD = 0x4807862AA8b2bF68830e4C8dc86D0e9A998e085a; address constant crvFRAX = 0xd632f22692FaC7611d2AA1C0D552930D43CAEd3B; address constant crvALUSD = 0x43b4FdFD4Ff969587185cDB6f0BD875c5Fc83f8c; address constant crvLUSD = 0xEd279fDD11cA84bEef15AF5D39BB4d4bEE23F0cA; address constant crvMetaZapper = 0xA79828DF1850E8a3A3064576f380D90aECDD3359; // **** Constructor **** constructor(address _bmi) { BMI = _bmi; } function recoverERC20(address _token) public onlyOwner { IERC20(_token).safeTransfer(msg.sender, IERC20(_token).balanceOf(address(this))); } function recoverERC20s(address[] memory _tokens) public onlyOwner { for (uint256 i = 0; i < _tokens.length; i++) { IERC20(_tokens[i]).safeTransfer(msg.sender, IERC20(_tokens[i]).balanceOf(address(this))); } } // **** View only functions **** // // Estimates USDC equilavent for yearn crv and crv pools function calcUSDCEquilavent(address _from, uint256 _amount) public view returns (uint256) { if (_isYearnCRV(_from)) { _amount = _amount.mul(IYearn(_from).pricePerShare()).div(1e18); _from = IYearn(_from).token(); } if (_from == crvY || _from == crvSUSD || _from == crvThree || _from == crvYBUSD) { address zap = crvYZap; if (_from == crvSUSD) { zap = crvSUSDZap; } else if (_from == crvThree) { zap = crvThreePool; } else if (_from == crvYBUSD) { zap = crvYBUSDZap; } return ICurveZapSimple(zap).calc_withdraw_one_coin(_amount, 1); } else if (_from == crvUSDN || _from == crvUSDP || _from == crvDUSD || _from == crvMUSD || _from == crvUST) { address zap = crvUSDNZap; if (_from == crvUSDP) { zap = crvUSDPZap; } else if (_from == crvDUSD) { zap = crvDUSDZap; } else if (_from == crvMUSD) { zap = crvMUSDZap; } else if (_from == crvUST) { zap = crvUSTZap; } return ICurveZapSimple(zap).calc_withdraw_one_coin(_amount, 2); } else if (_from == crvIB) { return ICurveZapSimple(crvIBPool).calc_withdraw_one_coin(_amount, 1, true); } else { // Meta pools, USDC is 2nd index return ICurveZapSimple(crvMetaZapper).calc_withdraw_one_coin(_from, _amount, 2); } } function getUnderlyingAmount(address _derivative, uint256 _amount) public view returns (address, uint256) { if (_isAave(_derivative)) { return (IATokenV2(_derivative).UNDERLYING_ASSET_ADDRESS(), _amount); } if (_isCompound(_derivative)) { uint256 rate = ICToken(_derivative).exchangeRateStored(); address underlying = ICToken(_derivative).underlying(); uint256 underlyingDecimals = ERC20(underlying).decimals(); uint256 mantissa = 18 + underlyingDecimals - 8; uint256 oneCTokenInUnderlying = rate.mul(1e18).div(10**mantissa); return (underlying, _amount.mul(oneCTokenInUnderlying).div(1e8)); } // YearnCRV just or CRV return USDC if (_isCRV(_derivative) || _isYearnCRV(_derivative)) { return (USDC, calcUSDCEquilavent(_derivative, _amount)); } if (_isYearn(_derivative)) { _amount = _amount.mul(IYearn(_derivative).pricePerShare()).div(1e18); if (_derivative == yDAI) { return (DAI, _amount); } if (_derivative == yUSDC) { return (USDC, _amount); } if (_derivative == yUSDT) { return (USDT, _amount); } if (_derivative == yTUSD) { return (TUSD, _amount); } if (_derivative == ySUSD) { return (SUSD, _amount); } } return (_derivative, _amount); } // **** Stateful functions **** function zapToBMI( address _from, uint256 _amount, address _fromUnderlying, uint256 _fromUnderlyingAmount, uint256 _minBMIRecv, address[] memory _bmiConstituents, uint256[] memory _bmiConstituentsWeightings, address _aggregator, bytes memory _aggregatorData, bool refundDust ) public returns (uint256) { uint256 sum = 0; for (uint256 i = 0; i < _bmiConstituentsWeightings.length; i++) { sum = sum.add(_bmiConstituentsWeightings[i]); } // Sum should be between 0.999 and 1.000 assert(sum <= 1e18); assert(sum >= 999e15); // Transfer to contract IERC20(_from).safeTransferFrom(msg.sender, address(this), _amount); // Primitive if (_isBare(_from)) { _primitiveToBMI(_from, _amount, _bmiConstituents, _bmiConstituentsWeightings, _aggregator, _aggregatorData); } // Yearn (primitive) else if (_isYearn(_from)) { IYearn(_from).withdraw(); _primitiveToBMI( _fromUnderlying, _fromUnderlyingAmount, _bmiConstituents, _bmiConstituentsWeightings, _aggregator, _aggregatorData ); } // Yearn (primitive) else if (_isYearnCRV(_from)) { IYearn(_from).withdraw(); address crvToken = IYearn(_from).token(); _crvToPrimitive(crvToken, IERC20(crvToken).balanceOf(address(this))); _primitiveToBMI( USDC, IERC20(USDC).balanceOf(address(this)), _bmiConstituents, _bmiConstituentsWeightings, address(0), "" ); } // Compound else if (_isCompound(_from)) { require(ICToken(_from).redeem(_amount) == 0, "!ctoken-redeem"); _primitiveToBMI( _fromUnderlying, _fromUnderlyingAmount, _bmiConstituents, _bmiConstituentsWeightings, _aggregator, _aggregatorData ); } // Aave else if (_isAave(_from)) { IERC20(_from).safeApprove(AAVE_LENDING_POOL_V2, 0); IERC20(_from).safeApprove(AAVE_LENDING_POOL_V2, _amount); ILendingPoolV2(AAVE_LENDING_POOL_V2).withdraw(_fromUnderlying, type(uint256).max, address(this)); _primitiveToBMI( _fromUnderlying, _fromUnderlyingAmount, _bmiConstituents, _bmiConstituentsWeightings, _aggregator, _aggregatorData ); } // Curve else { _crvToPrimitive(_from, _amount); _primitiveToBMI( USDC, IERC20(USDC).balanceOf(address(this)), _bmiConstituents, _bmiConstituentsWeightings, address(0), "" ); } // Checks uint256 _bmiBal = IERC20(BMI).balanceOf(address(this)); require(_bmiBal >= _minBMIRecv, "!min-mint"); IERC20(BMI).safeTransfer(msg.sender, _bmiBal); // Convert back dust to USDC and refund remaining USDC to usd if (refundDust) { for (uint256 i = 0; i < _bmiConstituents.length; i++) { _fromBMIConstituentToUSDC(_bmiConstituents[i], IERC20(_bmiConstituents[i]).balanceOf(address(this))); } IERC20(USDC).safeTransfer(msg.sender, IERC20(USDC).balanceOf(address(this))); } return _bmiBal; } // **** Internal helpers **** function _crvToPrimitive(address _from, uint256 _amount) internal { // Remove via zap to USDC if (_from == crvY || _from == crvSUSD || _from == crvYBUSD) { address zap = crvYZap; if (_from == crvSUSD) { zap = crvSUSDZap; } else if (_from == crvYBUSD) { zap = crvYBUSDZap; } IERC20(_from).safeApprove(zap, 0); IERC20(_from).safeApprove(zap, _amount); ICurveZapSimple(zap).remove_liquidity_one_coin(_amount, 1, 0, false); } else if (_from == crvUSDP || _from == crvUSDN || _from == crvDUSD || _from == crvMUSD || _from == crvUST) { address zap = crvUSDNZap; if (_from == crvUSDP) { zap = crvUSDPZap; } else if (_from == crvDUSD) { zap = crvDUSDZap; } else if (_from == crvMUSD) { zap = crvMUSDZap; } else if (_from == crvUST) { zap = crvUSTZap; } IERC20(_from).safeApprove(zap, 0); IERC20(_from).safeApprove(zap, _amount); ICurveZapSimple(zap).remove_liquidity_one_coin(_amount, 2, 0); } else if (_from == crvIB) { IERC20(_from).safeApprove(crvIBPool, 0); IERC20(_from).safeApprove(crvIBPool, _amount); ICurveZapSimple(crvIBPool).remove_liquidity_one_coin(_amount, 1, 0, true); } else if (_from == crvThree) { address zap = crvThreePool; IERC20(_from).safeApprove(zap, 0); IERC20(_from).safeApprove(zap, _amount); ICurveZapSimple(zap).remove_liquidity_one_coin(_amount, 1, 0); } else { // Meta pools, USDC is 2nd index IERC20(_from).safeApprove(crvMetaZapper, 0); IERC20(_from).safeApprove(crvMetaZapper, _amount); ICurveZapSimple(crvMetaZapper).remove_liquidity_one_coin(_from, _amount, 2, 0, address(this)); } } function _primitiveToBMI( address _token, uint256 _amount, address[] memory _bmiConstituents, uint256[] memory _bmiConstituentsWeightings, address _aggregator, bytes memory _aggregatorData ) internal { // Offset, DAI = 0, USDC = 1, USDT = 2 uint256 offset = 0; // Primitive to USDC (if not already USDC) if (_token != DAI && _token != USDC && _token != USDT) { IERC20(_token).safeApprove(_aggregator, 0); IERC20(_token).safeApprove(_aggregator, _amount); (bool success, ) = _aggregator.call(_aggregatorData); require(success, "!swap"); // Always goes to USDC // If we swapping _token = USDC; } if (_token == USDC) { offset = 1; } else if (_token == USDT) { offset = 2; } // Amount to mint uint256 amountToMint; uint256 bmiSupply = IERC20(BMI).totalSupply(); uint256 tokenBal = IERC20(_token).balanceOf(address(this)); uint256 tokenAmount; for (uint256 i = 0; i < _bmiConstituents.length; i++) { // Weighting of the token for BMI constituient tokenAmount = tokenBal.mul(_bmiConstituentsWeightings[i]).div(1e18); _toBMIConstituent(_token, _bmiConstituents[i], tokenAmount, offset); // Get amount to Mint amountToMint = _approveBMIAndGetMintableAmount(bmiSupply, _bmiConstituents[i], amountToMint); } // Mint BASK IBasket(BMI).mint(amountToMint); } function _approveBMIAndGetMintableAmount( uint256 _bmiTotalSupply, address _bmiConstituient, uint256 _curMintAmount ) internal returns (uint256) { uint256 bal = IERC20(_bmiConstituient).balanceOf(address(this)); uint256 bmiBal = IERC20(_bmiConstituient).balanceOf(BMI); IERC20(_bmiConstituient).safeApprove(BMI, 0); IERC20(_bmiConstituient).safeApprove(BMI, bal); // Calculate how much BMI we can mint at max // Formula: min(e for e in bmiSupply * tokenWeHave[e] / tokenInBMI[e]) if (_curMintAmount == 0) { return _bmiTotalSupply.mul(bal).div(bmiBal); } uint256 temp = _bmiTotalSupply.mul(bal).div(bmiBal); if (temp < _curMintAmount) { return temp; } return _curMintAmount; } function _toBMIConstituent( address _fromToken, address _toToken, uint256 _amount, uint256 _curveOffset ) internal { uint256 bal; uint256[4] memory depositAmounts4 = [uint256(0), uint256(0), uint256(0), uint256(0)]; if (_toToken == ySUSD) { IERC20(_fromToken).safeApprove(crvSUSDPool, 0); IERC20(_fromToken).safeApprove(crvSUSDPool, _amount); ICurvePool(crvSUSDPool).exchange(int128(_curveOffset), 3, _amount, 0); bal = IERC20(SUSD).balanceOf(address(this)); IERC20(SUSD).safeApprove(ySUSD, 0); IERC20(SUSD).safeApprove(ySUSD, bal); } // Gen 1 pools else if ( _toToken == yCRV || _toToken == ycrvSUSD || _toToken == ycrvYBUSD || _toToken == ycrvUSDN || _toToken == ycrvUSDP || _toToken == ycrvDUSD || _toToken == ycrvMUSD || _toToken == ycrvUST ) { address crvToken = IYearn(_toToken).token(); address zap = crvYZap; if (_toToken == ycrvSUSD) { zap = crvSUSDZap; } else if (_toToken == ycrvYBUSD) { zap = crvYBUSDZap; } else if (_toToken == ycrvUSDN) { zap = crvUSDNZap; _curveOffset += 1; } else if (_toToken == ycrvUSDP) { zap = crvUSDPZap; _curveOffset += 1; } else if (_toToken == ycrvDUSD) { zap = crvDUSDZap; _curveOffset += 1; } else if (_toToken == ycrvMUSD) { zap = crvMUSDZap; _curveOffset += 1; } else if (_toToken == ycrvUST) { zap = crvUSTZap; _curveOffset += 1; } depositAmounts4[_curveOffset] = _amount; IERC20(_fromToken).safeApprove(zap, 0); IERC20(_fromToken).safeApprove(zap, _amount); ICurveZapSimple(zap).add_liquidity(depositAmounts4, 0); bal = IERC20(crvToken).balanceOf(address(this)); IERC20(crvToken).safeApprove(_toToken, 0); IERC20(crvToken).safeApprove(_toToken, bal); } else if (_toToken == ycrvThree || _toToken == ycrvIB) { address crvToken = IYearn(_toToken).token(); uint256[3] memory depositAmounts3 = [uint256(0), uint256(0), uint256(0)]; depositAmounts3[_curveOffset] = _amount; address zap = crvThreePool; if (_toToken == ycrvIB) { zap = crvIBPool; } IERC20(_fromToken).safeApprove(zap, 0); IERC20(_fromToken).safeApprove(zap, _amount); if (_toToken == ycrvThree) { ICurveZapSimple(zap).add_liquidity(depositAmounts3, 0); } else { ICurveZapSimple(zap).add_liquidity(depositAmounts3, 0, true); } bal = IERC20(crvToken).balanceOf(address(this)); IERC20(crvToken).safeApprove(_toToken, 0); IERC20(crvToken).safeApprove(_toToken, bal); } // Meta pools else if (_toToken == ycrvBUSD || _toToken == ycrvFRAX || _toToken == ycrvALUSD || _toToken == ycrvLUSD) { // CRV Token = CRV Pool address crvToken = IYearn(_toToken).token(); depositAmounts4[_curveOffset + 1] = _amount; IERC20(_fromToken).safeApprove(crvMetaZapper, 0); IERC20(_fromToken).safeApprove(crvMetaZapper, _amount); ICurveZapSimple(crvMetaZapper).add_liquidity(crvToken, depositAmounts4, 0); bal = IERC20(crvToken).balanceOf(address(this)); IERC20(crvToken).safeApprove(_toToken, 0); IERC20(crvToken).safeApprove(_toToken, bal); } IYearn(_toToken).deposit(); } function _fromBMIConstituentToUSDC(address _fromToken, uint256 _amount) internal { if (_isYearnCRV(_fromToken)) { _crvToPrimitive(IYearn(_fromToken).token(), IYearn(_fromToken).withdraw(_amount)); } } function _isBare(address _token) internal pure returns (bool) { return (_token == DAI || _token == USDC || _token == USDT || _token == TUSD || _token == SUSD || _token == BUSD || _token == USDP || _token == FRAX || _token == ALUSD || _token == LUSD || _token == USDN); } function _isYearn(address _token) internal pure returns (bool) { return (_token == yDAI || _token == yUSDC || _token == yUSDT || _token == yTUSD || _token == ySUSD); } function _isYearnCRV(address _token) internal pure returns (bool) { return (_token == yCRV || _token == ycrvSUSD || _token == ycrvYBUSD || _token == ycrvBUSD || _token == ycrvUSDP || _token == ycrvFRAX || _token == ycrvALUSD || _token == ycrvLUSD || _token == ycrvUSDN || _token == ycrvThree || _token == ycrvIB || _token == ycrvMUSD || _token == ycrvUST || _token == ycrvDUSD); } function _isCRV(address _token) internal pure returns (bool) { return (_token == crvY || _token == crvSUSD || _token == crvYBUSD || _token == crvBUSD || _token == crvUSDP || _token == crvFRAX || _token == crvALUSD || _token == crvLUSD || _token == crvThree || _token == crvUSDN || _token == crvDUSD || _token == crvMUSD || _token == crvUST || _token == crvIB); } function _isCompound(address _token) internal pure returns (bool) { return (_token == cDAI || _token == cUSDC || _token == cUSDT || _token == cTUSD); } function _isAave(address _token) internal pure returns (bool) { return (_token == aDAI || _token == aUSDC || _token == aUSDT || _token == aTUSD || _token == aSUSD); } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); function _sendLogPayload(bytes memory payload) private view { uint256 payloadLength = payload.length; address consoleAddress = CONSOLE_ADDRESS; assembly { let payloadStart := add(payload, 32) let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) } } function log() internal view { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); } function logUint(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function logString(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function log(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); } function log(uint p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); } function log(uint p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); } function log(uint p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); } function log(string memory p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); } function log(string memory p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); } function log(bool p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); } function log(address p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); } function log(uint p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); } function log(uint p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); } function log(uint p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); } function log(uint p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); } function log(uint p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); } function log(uint p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); } function log(uint p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); } function log(uint p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); } function log(uint p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); } function log(uint p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); } function log(uint p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); } function log(uint p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); } function log(uint p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); } function log(uint p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); } function log(uint p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); } function log(string memory p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); } function log(string memory p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); } function log(string memory p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); } function log(string memory p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); } function log(bool p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); } function log(bool p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); } function log(bool p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); } function log(address p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); } function log(address p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); } function log(address p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./Context.sol"; import "./IERC20.sol"; import "./SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface IATokenV1 { function UINT_MAX_VALUE() external view returns (uint256); function allowInterestRedirectionTo(address _to) external; function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function balanceOf(address _user) external view returns (uint256); function burnOnLiquidation(address _account, uint256 _value) external; function decimals() external view returns (uint8); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function getInterestRedirectionAddress(address _user) external view returns (address); function getRedirectedBalance(address _user) external view returns (uint256); function getUserIndex(address _user) external view returns (uint256); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function isTransferAllowed(address _user, uint256 _amount) external view returns (bool); function mintOnDeposit(address _account, uint256 _amount) external; function name() external view returns (string memory); function principalBalanceOf(address _user) external view returns (uint256); function redeem(uint256 _amount) external; function redirectInterestStream(address _to) external; function redirectInterestStreamOf(address _from, address _to) external; function symbol() external view returns (string memory); function totalSupply() external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function transferOnLiquidation( address _from, address _to, uint256 _value ) external; function underlyingAssetAddress() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface IATokenV2 { function ATOKEN_REVISION() external view returns (uint256); function DOMAIN_SEPARATOR() external view returns (bytes32); function EIP712_REVISION() external view returns (bytes memory); function PERMIT_TYPEHASH() external view returns (bytes32); function POOL() external view returns (address); function RESERVE_TREASURY_ADDRESS() external view returns (address); function UINT_MAX_VALUE() external view returns (uint256); function UNDERLYING_ASSET_ADDRESS() external view returns (address); function _nonces(address) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function balanceOf(address user) external view returns (uint256); function burn( address user, address receiverOfUnderlying, uint256 amount, uint256 index ) external; function decimals() external view returns (uint8); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function initialize( uint8 underlyingAssetDecimals, string memory tokenName, string memory tokenSymbol ) external; function mint( address user, uint256 amount, uint256 index ) external returns (bool); function mintToTreasury(uint256 amount, uint256 index) external; function name() external view returns (string memory); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; function scaledBalanceOf(address user) external view returns (uint256); function scaledTotalSupply() external view returns (uint256); function symbol() external view returns (string memory); function totalSupply() external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function transferOnLiquidation( address from, address to, uint256 value ) external; function transferUnderlyingTo(address target, uint256 amount) external returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface IBasicIssuanceModule { function controller() external view returns (address); function getRequiredComponentUnitsForIssue(address _setToken, uint256 _quantity) external view returns (address[] memory, uint256[] memory); function initialize(address _setToken, address _preIssueHook) external; function issue( address _setToken, uint256 _quantity, address _to ) external; function managerIssuanceHook(address) external view returns (address); function redeem( address _setToken, uint256 _quantity, address _to ) external; function removeModule() external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface IBasket { function transfer(address dst, uint256 amount) external returns (bool); function totalSupply() external view returns (uint256); function mint(uint256) external; function getOne() external view returns (address[] memory, uint256[] memory); function getAssetsAndBalances() external view returns (address[] memory, uint256[] memory); function burn(uint256) external; function viewMint(uint256 _amountOut) external view returns (uint256[] memory _amountsIn); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface ICompoundLens { function getCompBalanceMetadataExt( address comp, address comptroller, address account ) external returns ( uint256 balance, uint256 votes, address delegate, uint256 allocated ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface IComptroller { function _addCompMarkets(address[] memory cTokens) external; function _become(address unitroller) external; function _borrowGuardianPaused() external view returns (bool); function _dropCompMarket(address cToken) external; function _grantComp(address recipient, uint256 amount) external; function _mintGuardianPaused() external view returns (bool); function _setBorrowCapGuardian(address newBorrowCapGuardian) external; function _setBorrowPaused(address cToken, bool state) external returns (bool); function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256); function _setCollateralFactor(address cToken, uint256 newCollateralFactorMantissa) external returns (uint256); function _setCompRate(uint256 compRate_) external; function _setContributorCompSpeed(address contributor, uint256 compSpeed) external; function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256); function _setMarketBorrowCaps(address[] memory cTokens, uint256[] memory newBorrowCaps) external; function _setMintPaused(address cToken, bool state) external returns (bool); function _setPauseGuardian(address newPauseGuardian) external returns (uint256); function _setPriceOracle(address newOracle) external returns (uint256); function _setSeizePaused(bool state) external returns (bool); function _setTransferPaused(bool state) external returns (bool); function _supportMarket(address cToken) external returns (uint256); function accountAssets(address, uint256) external view returns (address); function admin() external view returns (address); function allMarkets(uint256) external view returns (address); function borrowAllowed( address cToken, address borrower, uint256 borrowAmount ) external returns (uint256); function borrowCapGuardian() external view returns (address); function borrowCaps(address) external view returns (uint256); function borrowGuardianPaused(address) external view returns (bool); function borrowVerify( address cToken, address borrower, uint256 borrowAmount ) external; function checkMembership(address account, address cToken) external view returns (bool); function claimComp(address holder, address[] memory cTokens) external; function claimComp( address[] memory holders, address[] memory cTokens, bool borrowers, bool suppliers ) external; function claimComp(address holder) external; function closeFactorMantissa() external view returns (uint256); function compAccrued(address) external view returns (uint256); function compBorrowState(address) external view returns (uint224 index, uint32); function compBorrowerIndex(address, address) external view returns (uint256); function compClaimThreshold() external view returns (uint256); function compContributorSpeeds(address) external view returns (uint256); function compInitialIndex() external view returns (uint224); function compRate() external view returns (uint256); function compSpeeds(address) external view returns (uint256); function compSupplierIndex(address, address) external view returns (uint256); function compSupplyState(address) external view returns (uint224 index, uint32); function comptrollerImplementation() external view returns (address); function enterMarkets(address[] memory cTokens) external returns (uint256[] memory); function exitMarket(address cTokenAddress) external returns (uint256); function getAccountLiquidity(address account) external view returns ( uint256, uint256, uint256 ); function getAllMarkets() external view returns (address[] memory); function getAssetsIn(address account) external view returns (address[] memory); function getBlockNumber() external view returns (uint256); function getCompAddress() external view returns (address); function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint256 redeemTokens, uint256 borrowAmount ) external view returns ( uint256, uint256, uint256 ); function isComptroller() external view returns (bool); function lastContributorBlock(address) external view returns (uint256); function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint256 repayAmount ) external returns (uint256); function liquidateBorrowVerify( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint256 actualRepayAmount, uint256 seizeTokens ) external; function liquidateCalculateSeizeTokens( address cTokenBorrowed, address cTokenCollateral, uint256 actualRepayAmount ) external view returns (uint256, uint256); function liquidationIncentiveMantissa() external view returns (uint256); function markets(address) external view returns ( bool isListed, uint256 collateralFactorMantissa, bool isComped ); function maxAssets() external view returns (uint256); function mintAllowed( address cToken, address minter, uint256 mintAmount ) external returns (uint256); function mintGuardianPaused(address) external view returns (bool); function mintVerify( address cToken, address minter, uint256 actualMintAmount, uint256 mintTokens ) external; function oracle() external view returns (address); function pauseGuardian() external view returns (address); function pendingAdmin() external view returns (address); function pendingComptrollerImplementation() external view returns (address); function redeemAllowed( address cToken, address redeemer, uint256 redeemTokens ) external returns (uint256); function redeemVerify( address cToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens ) external; function refreshCompSpeeds() external; function repayBorrowAllowed( address cToken, address payer, address borrower, uint256 repayAmount ) external returns (uint256); function repayBorrowVerify( address cToken, address payer, address borrower, uint256 actualRepayAmount, uint256 borrowerIndex ) external; function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint256 seizeTokens ) external returns (uint256); function seizeGuardianPaused() external view returns (bool); function seizeVerify( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint256 seizeTokens ) external; function transferAllowed( address cToken, address src, address dst, uint256 transferTokens ) external returns (uint256); function transferGuardianPaused() external view returns (bool); function transferVerify( address cToken, address src, address dst, uint256 transferTokens ) external; function updateContributorRewards(address contributor) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface ICToken { function _acceptAdmin() external returns (uint256); function _addReserves(uint256 addAmount) external returns (uint256); function _reduceReserves(uint256 reduceAmount) external returns (uint256); function _setComptroller(address newComptroller) external returns (uint256); function _setImplementation( address implementation_, bool allowResign, bytes memory becomeImplementationData ) external; function _setInterestRateModel(address newInterestRateModel) external returns (uint256); function _setPendingAdmin(address newPendingAdmin) external returns (uint256); function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256); function accrualBlockNumber() external view returns (uint256); function accrueInterest() external returns (uint256); function admin() external view returns (address); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function balanceOf(address owner) external view returns (uint256); function balanceOfUnderlying(address owner) external returns (uint256); function borrow(uint256 borrowAmount) external returns (uint256); function borrowBalanceCurrent(address account) external returns (uint256); function borrowBalanceStored(address account) external view returns (uint256); function borrowIndex() external view returns (uint256); function borrowRatePerBlock() external view returns (uint256); function comptroller() external view returns (address); function decimals() external view returns (uint8); function delegateToImplementation(bytes memory data) external returns (bytes memory); function delegateToViewImplementation(bytes memory data) external view returns (bytes memory); function exchangeRateCurrent() external returns (uint256); function exchangeRateStored() external view returns (uint256); function getAccountSnapshot(address account) external view returns ( uint256, uint256, uint256, uint256 ); function getCash() external view returns (uint256); function implementation() external view returns (address); function interestRateModel() external view returns (address); function isCToken() external view returns (bool); function liquidateBorrow( address borrower, uint256 repayAmount, address cTokenCollateral ) external returns (uint256); function mint(uint256 mintAmount) external returns (uint256); function name() external view returns (string memory); function pendingAdmin() external view returns (address); function redeem(uint256 redeemTokens) external returns (uint256); function redeemUnderlying(uint256 redeemAmount) external returns (uint256); function repayBorrow(uint256 repayAmount) external returns (uint256); function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256); function reserveFactorMantissa() external view returns (uint256); function seize( address liquidator, address borrower, uint256 seizeTokens ) external returns (uint256); function supplyRatePerBlock() external view returns (uint256); function symbol() external view returns (string memory); function totalBorrows() external view returns (uint256); function totalBorrowsCurrent() external returns (uint256); function totalReserves() external view returns (uint256); function totalSupply() external view returns (uint256); function transfer(address dst, uint256 amount) external returns (bool); function transferFrom( address src, address dst, uint256 amount ) external returns (bool); function underlying() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface ICurvePool { function exchange( int128 i, int128 j, uint256 _dx, uint256 _min_dy ) external; function get_dy( int128 i, int128 j, uint256 _dx ) external view returns (uint256); function get_virtual_price() external view returns (uint256); } interface ICurveLINK { function A() external view returns (uint256); function A_precise() external view returns (uint256); function get_virtual_price() external view returns (uint256); function calc_token_amount(uint256[2] memory _amounts, bool _is_deposit) external view returns (uint256); function add_liquidity(uint256[2] memory _amounts, uint256 _min_mint_amount) external returns (uint256); function get_dy( int128 i, int128 j, uint256 _dx ) external view returns (uint256); function exchange( int128 i, int128 j, uint256 _dx, uint256 _min_dy ) external returns (uint256); function remove_liquidity(uint256 _amount, uint256[2] memory _min_amounts) external returns (uint256[2] memory); function remove_liquidity_imbalance(uint256[2] memory _amounts, uint256 _max_burn_amount) external returns (uint256); function calc_withdraw_one_coin(uint256 _token_amount, int128 i) external view returns (uint256); function remove_liquidity_one_coin( uint256 _token_amount, int128 i, uint256 _min_amount ) external returns (uint256); function ramp_A(uint256 _future_A, uint256 _future_time) external; function stop_ramp_A() external; function commit_new_fee(uint256 _new_fee, uint256 _new_admin_fee) external; function apply_new_fee() external; function revert_new_parameters() external; function commit_transfer_ownership(address _owner) external; function apply_transfer_ownership() external; function revert_transfer_ownership() external; function admin_balances(uint256 i) external view returns (uint256); function withdraw_admin_fees() external; function donate_admin_fees() external; function kill_me() external; function unkill_me() external; function coins(uint256 arg0) external view returns (address); function balances(uint256 arg0) external view returns (uint256); function fee() external view returns (uint256); function admin_fee() external view returns (uint256); function previous_balances(uint256 arg0) external view returns (uint256); function block_timestamp_last() external view returns (uint256); function owner() external view returns (address); function lp_token() external view returns (address); function initial_A() external view returns (uint256); function future_A() external view returns (uint256); function initial_A_time() external view returns (uint256); function future_A_time() external view returns (uint256); function admin_actions_deadline() external view returns (uint256); function transfer_ownership_deadline() external view returns (uint256); function future_fee() external view returns (uint256); function future_admin_fee() external view returns (uint256); function future_owner() external view returns (address); } interface ILinkGauge { function decimals() external view returns (uint256); function integrate_checkpoint() external view returns (uint256); function user_checkpoint(address addr) external returns (bool); function claimable_tokens(address addr) external returns (uint256); function claimable_reward(address _addr, address _token) external returns (uint256); function claim_rewards() external; function claim_rewards(address _addr) external; function claim_historic_rewards(address[8] memory _reward_tokens) external; function claim_historic_rewards(address[8] memory _reward_tokens, address _addr) external; function kick(address addr) external; function set_approve_deposit(address addr, bool can_deposit) external; function deposit(uint256 _value) external; function deposit(uint256 _value, address _addr) external; function withdraw(uint256 _value) external; function allowance(address _owner, address _spender) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom( address _from, address _to, uint256 _value ) external returns (bool); function approve(address _spender, uint256 _value) external returns (bool); function increaseAllowance(address _spender, uint256 _added_value) external returns (bool); function decreaseAllowance(address _spender, uint256 _subtracted_value) external returns (bool); function set_rewards( address _reward_contract, bytes32 _sigs, address[8] memory _reward_tokens ) external; function set_killed(bool _is_killed) external; function commit_transfer_ownership(address addr) external; function accept_transfer_ownership() external; function minter() external view returns (address); function crv_token() external view returns (address); function lp_token() external view returns (address); function controller() external view returns (address); function voting_escrow() external view returns (address); function future_epoch_time() external view returns (uint256); function balanceOf(address arg0) external view returns (uint256); function totalSupply() external view returns (uint256); function name() external view returns (string memory); function symbol() external view returns (string memory); function approved_to_deposit(address arg0, address arg1) external view returns (bool); function working_balances(address arg0) external view returns (uint256); function working_supply() external view returns (uint256); function period() external view returns (int128); function period_timestamp(uint256 arg0) external view returns (uint256); function integrate_inv_supply(uint256 arg0) external view returns (uint256); function integrate_inv_supply_of(address arg0) external view returns (uint256); function integrate_checkpoint_of(address arg0) external view returns (uint256); function integrate_fraction(address arg0) external view returns (uint256); function inflation_rate() external view returns (uint256); function reward_contract() external view returns (address); function reward_tokens(uint256 arg0) external view returns (address); function reward_integral(address arg0) external view returns (uint256); function reward_integral_for(address arg0, address arg1) external view returns (uint256); function admin() external view returns (address); function future_admin() external view returns (address); function is_killed() external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface ICurveZapSimple { function add_liquidity(uint256[3] memory _deposit_amounts, uint256 _min_mint_amount) external; function add_liquidity( uint256[3] memory _deposit_amounts, uint256 _min_mint_amount, bool use_underlying ) external; function add_liquidity(uint256[4] memory _deposit_amounts, uint256 _min_mint_amount) external; function add_liquidity( address _pool, uint256[4] memory _deposit_amounts, uint256 _min_mint_amount ) external returns (uint256); function add_liquidity( address _pool, uint256[4] memory _deposit_amounts, uint256 _min_mint_amount, address _receiver ) external returns (uint256); function remove_liquidity_one_coin( uint256 _token_amount, int128 i, uint256 min_amount, bool _donate_dust ) external; function remove_liquidity_one_coin( uint256 _token_amount, int128 i, uint256 min_amount ) external; function remove_liquidity_one_coin( address pool, uint256 _token_amount, int128 i, uint256 min_amount, address _receiver ) external returns (uint256); function remove_liquidity_one_coin( uint256 _token_amount, int128 i, uint256 min_amount, address _receiver ) external returns (uint256); function calc_withdraw_one_coin(uint256 _token_amount, int128 i) external view returns (uint256); function calc_withdraw_one_coin( uint256 _token_amount, int128 i, bool use_underlying ) external view returns (uint256); function calc_withdraw_one_coin( address pool, uint256 _token_amount, int128 i ) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface ILendingPoolV1 { function LENDINGPOOL_REVISION() external view returns (uint256); function UINT_MAX_VALUE() external view returns (uint256); function addressesProvider() external view returns (address); function borrow( address _reserve, uint256 _amount, uint256 _interestRateMode, uint16 _referralCode ) external; function core() external view returns (address); function dataProvider() external view returns (address); function deposit( address _reserve, uint256 _amount, uint16 _referralCode ) external payable; function flashLoan( address _receiver, address _reserve, uint256 _amount, bytes memory _params ) external; function getReserveConfigurationData(address _reserve) external view returns ( uint256 ltv, uint256 liquidationThreshold, uint256 liquidationBonus, address interestRateStrategyAddress, bool usageAsCollateralEnabled, bool borrowingEnabled, bool stableBorrowRateEnabled, bool isActive ); function getReserveData(address _reserve) external view returns ( uint256 totalLiquidity, uint256 availableLiquidity, uint256 totalBorrowsStable, uint256 totalBorrowsVariable, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 utilizationRate, uint256 liquidityIndex, uint256 variableBorrowIndex, address aTokenAddress, uint40 lastUpdateTimestamp ); function getReserves() external view returns (address[] memory); function getUserAccountData(address _user) external view returns ( uint256 totalLiquidityETH, uint256 totalCollateralETH, uint256 totalBorrowsETH, uint256 totalFeesETH, uint256 availableBorrowsETH, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor ); function getUserReserveData(address _reserve, address _user) external view returns ( uint256 currentATokenBalance, uint256 currentBorrowBalance, uint256 principalBorrowBalance, uint256 borrowRateMode, uint256 borrowRate, uint256 liquidityRate, uint256 originationFee, uint256 variableBorrowIndex, uint256 lastUpdateTimestamp, bool usageAsCollateralEnabled ); function initialize(address _addressesProvider) external; function liquidationCall( address _collateral, address _reserve, address _user, uint256 _purchaseAmount, bool _receiveAToken ) external payable; function parametersProvider() external view returns (address); function rebalanceStableBorrowRate(address _reserve, address _user) external; function redeemUnderlying( address _reserve, address _user, uint256 _amount, uint256 _aTokenBalanceAfterRedeem ) external; function repay( address _reserve, uint256 _amount, address _onBehalfOf ) external payable; function setUserUseReserveAsCollateral(address _reserve, bool _useAsCollateral) external; function swapBorrowRateMode(address _reserve) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface ILendingPoolV2 { function FLASHLOAN_PREMIUM_TOTAL() external view returns (uint256); function LENDINGPOOL_REVISION() external view returns (uint256); function MAX_NUMBER_RESERVES() external view returns (uint256); function MAX_STABLE_RATE_BORROW_SIZE_PERCENT() external view returns (uint256); function borrow( address asset, uint256 amount, uint256 interestRateMode, uint16 referralCode, address onBehalfOf ) external; function deposit( address asset, uint256 amount, address onBehalfOf, uint16 referralCode ) external; function finalizeTransfer( address asset, address from, address to, uint256 amount, uint256 balanceFromBefore, uint256 balanceToBefore ) external; function flashLoan( address receiverAddress, address[] memory assets, uint256[] memory amounts, uint256[] memory modes, address onBehalfOf, bytes memory params, uint16 referralCode ) external; function getAddressesProvider() external view returns (address); function getConfiguration(address asset) external view returns (uint256); function getReserveData(address asset) external view returns ( uint256, uint128, uint128, uint128, uint128, uint128, uint40, address, address, address, address, uint8 ); function getReserveNormalizedIncome(address asset) external view returns (uint256); function getReserveNormalizedVariableDebt(address asset) external view returns (uint256); function getReservesList() external view returns (address[] memory); function getUserAccountData(address user) external view returns ( uint256 totalCollateralETH, uint256 totalDebtETH, uint256 availableBorrowsETH, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor ); function initReserve( address asset, address aTokenAddress, address stableDebtAddress, address variableDebtAddress, address interestRateStrategyAddress ) external; function initialize(address provider) external; function liquidationCall( address collateralAsset, address debtAsset, address user, uint256 debtToCover, bool receiveAToken ) external; function paused() external view returns (bool); function rebalanceStableBorrowRate(address asset, address user) external; function repay( address asset, uint256 amount, uint256 rateMode, address onBehalfOf ) external returns (uint256); function setConfiguration(address asset, uint256 configuration) external; function setPause(bool val) external; function setReserveInterestRateStrategyAddress(address asset, address rateStrategyAddress) external; function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external; function swapBorrowRateMode(address asset, uint256 rateMode) external; function withdraw( address asset, uint256 amount, address to ) external returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface IOneInch { function FLAG_DISABLE_AAVE() external view returns (uint256); function FLAG_DISABLE_BANCOR() external view returns (uint256); function FLAG_DISABLE_BDAI() external view returns (uint256); function FLAG_DISABLE_CHAI() external view returns (uint256); function FLAG_DISABLE_COMPOUND() external view returns (uint256); function FLAG_DISABLE_CURVE_BINANCE() external view returns (uint256); function FLAG_DISABLE_CURVE_COMPOUND() external view returns (uint256); function FLAG_DISABLE_CURVE_SYNTHETIX() external view returns (uint256); function FLAG_DISABLE_CURVE_USDT() external view returns (uint256); function FLAG_DISABLE_CURVE_Y() external view returns (uint256); function FLAG_DISABLE_FULCRUM() external view returns (uint256); function FLAG_DISABLE_IEARN() external view returns (uint256); function FLAG_DISABLE_KYBER() external view returns (uint256); function FLAG_DISABLE_OASIS() external view returns (uint256); function FLAG_DISABLE_SMART_TOKEN() external view returns (uint256); function FLAG_DISABLE_UNISWAP() external view returns (uint256); function FLAG_DISABLE_WETH() external view returns (uint256); function FLAG_ENABLE_KYBER_BANCOR_RESERVE() external view returns (uint256); function FLAG_ENABLE_KYBER_OASIS_RESERVE() external view returns (uint256); function FLAG_ENABLE_KYBER_UNISWAP_RESERVE() external view returns (uint256); function FLAG_ENABLE_MULTI_PATH_DAI() external view returns (uint256); function FLAG_ENABLE_MULTI_PATH_ETH() external view returns (uint256); function FLAG_ENABLE_MULTI_PATH_USDC() external view returns (uint256); function FLAG_ENABLE_UNISWAP_COMPOUND() external view returns (uint256); function claimAsset(address asset, uint256 amount) external; function getExpectedReturn( address fromToken, address toToken, uint256 amount, uint256 parts, uint256 featureFlags ) external view returns (uint256 returnAmount, uint256[] memory distribution); function isOwner() external view returns (bool); function oneSplitImpl() external view returns (address); function owner() external view returns (address); function renounceOwnership() external; function setNewImpl(address impl) external; function swap( address fromToken, address toToken, uint256 amount, uint256 minReturn, uint256[] memory distribution, uint256 featureFlags ) external payable; function transferOwnership(address newOwner) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface ISushiBar { function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); function decimals() external view returns (uint8); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function enter(uint256 _amount) external; function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function leave(uint256 _share) external; function name() external view returns (string memory); function sushi() external view returns (address); function symbol() external view returns (string memory); function totalSupply() external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint256); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function migrator() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; function setMigrator(address) external; } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, 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; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); 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 (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function burn(address to) external returns (uint256 amount0, uint256 amount1); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountOut); function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; interface IYearn { function initialize( address token, address governance, address rewards, string memory nameOverride, string memory symbolOverride ) external; function initialize( address token, address governance, address rewards, string memory nameOverride, string memory symbolOverride, address guardian ) external; function apiVersion() external pure returns (string memory); function setName(string memory name) external; function setSymbol(string memory symbol) external; function setGovernance(address governance) external; function acceptGovernance() external; function setManagement(address management) external; function setGuestList(address guestList) external; function setRewards(address rewards) external; function setLockedProfitDegration(uint256 degration) external; function setDepositLimit(uint256 limit) external; function setPerformanceFee(uint256 fee) external; function setManagementFee(uint256 fee) external; function setGuardian(address guardian) external; function setEmergencyShutdown(bool active) external; function setWithdrawalQueue(address[20] memory queue) external; function transfer(address receiver, uint256 amount) external returns (bool); function transferFrom( address sender, address receiver, uint256 amount ) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); function increaseAllowance(address spender, uint256 amount) external returns (bool); function decreaseAllowance(address spender, uint256 amount) external returns (bool); function permit( address owner, address spender, uint256 amount, uint256 expiry, bytes memory signature ) external returns (bool); function totalAssets() external view returns (uint256); function deposit() external returns (uint256); function deposit(uint256 _amount) external returns (uint256); function deposit(uint256 _amount, address recipient) external returns (uint256); function maxAvailableShares() external view returns (uint256); function withdraw() external returns (uint256); function withdraw(uint256 maxShares) external returns (uint256); function withdraw(uint256 maxShares, address recipient) external returns (uint256); function withdraw( uint256 maxShares, address recipient, uint256 maxLoss ) external returns (uint256); function pricePerShare() external view returns (uint256); function addStrategy( address strategy, uint256 debtRatio, uint256 minDebtPerHarvest, uint256 maxDebtPerHarvest, uint256 performanceFee ) external; function updateStrategyDebtRatio(address strategy, uint256 debtRatio) external; function updateStrategyMinDebtPerHarvest(address strategy, uint256 minDebtPerHarvest) external; function updateStrategyMaxDebtPerHarvest(address strategy, uint256 maxDebtPerHarvest) external; function updateStrategyPerformanceFee(address strategy, uint256 performanceFee) external; function migrateStrategy(address oldVersion, address newVersion) external; function revokeStrategy() external; function revokeStrategy(address strategy) external; function addStrategyToQueue(address strategy) external; function removeStrategyFromQueue(address strategy) external; function debtOutstanding() external view returns (uint256); function debtOutstanding(address strategy) external view returns (uint256); function creditAvailable() external view returns (uint256); function creditAvailable(address strategy) external view returns (uint256); function availableDepositLimit() external view returns (uint256); function expectedReturn() external view returns (uint256); function expectedReturn(address strategy) external view returns (uint256); function report( uint256 gain, uint256 loss, uint256 _debtPayment ) external returns (uint256); function sweep(address token) external; function sweep(address token, uint256 amount) external; function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint256); function precisionFactor() external view returns (uint256); function balanceOf(address arg0) external view returns (uint256); function allowance(address arg0, address arg1) external view returns (uint256); function totalSupply() external view returns (uint256); function token() external view returns (address); function governance() external view returns (address); function management() external view returns (address); function guardian() external view returns (address); function guestList() external view returns (address); function strategies(address arg0) external view returns ( uint256 performanceFee, uint256 activation, uint256 debtRatio, uint256 minDebtPerHarvest, uint256 maxDebtPerHarvest, uint256 lastReport, uint256 totalDebt, uint256 totalGain, uint256 totalLoss ); function withdrawalQueue(uint256 arg0) external view returns (address); function emergencyShutdown() external view returns (bool); function depositLimit() external view returns (uint256); function debtRatio() external view returns (uint256); function totalDebt() external view returns (uint256); function lastReport() external view returns (uint256); function activation() external view returns (uint256); function lockedProfit() external view returns (uint256); function lockedProfitDegration() external view returns (uint256); function rewards() external view returns (address); function managementFee() external view returns (uint256); function performanceFee() external view returns (uint256); function nonces(address arg0) external view returns (uint256); function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "./SafeMath.sol"; import "./Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_bmi","type":"address"},{"internalType":"address","name":"_bmiZapper","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_weaver","type":"address"}],"name":"approveWeaver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedWeavers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bmi","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bmiZapper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"curId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"deposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_weaver","type":"address"}],"name":"revokeWeaver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_fromUnderlying","type":"address"},{"internalType":"uint256","name":"_fromUnderlyingAmount","type":"uint256"},{"internalType":"uint256","name":"_minBMIRecv","type":"uint256"},{"internalType":"address[]","name":"_bmiConstituents","type":"address[]"},{"internalType":"uint256[]","name":"_bmiConstituentsWeightings","type":"uint256[]"},{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"bytes","name":"_aggregatorData","type":"bytes"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"socialZap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalDeposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"withdrawBMI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"withdrawBMIMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051611abd380380611abd8339818101604052606081101561003357600080fd5b50805160208201516040909201516001600081905580546001600160a01b039384166001600160a01b0319918216179091556002805494841694821694909417909355600380549290911691909216179055611a29806100946000396000f3fe60806040526004361061010d5760003560e01c80638cc5dd6211610095578063cc97edbf11610064578063cc97edbf14610698578063cfad57a2146106ad578063e176dd79146106e0578063f3fef3a314610713578063f40084b71461074c57610114565b80638cc5dd62146105c05780638d9ff54e146105f95780639e8c708e1461062c578063b76568081461065f57610114565b80634f48edae116100dc5780634f48edae146104bd5780635aa6e675146105045780635d93a3fc146105355780636290e26114610578578063882dcdf9146105ab57610114565b80630b0ddc1b1461011957806344f78cbf1461024b57806347e7ef24146102965780634b4ce498146102cf57610114565b3661011457005b600080fd5b34801561012557600080fd5b506102496004803603604081101561013c57600080fd5b810190602081018135600160201b81111561015657600080fd5b82018360208201111561016857600080fd5b803590602001918460208302840111600160201b8311171561018957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156101d857600080fd5b8201836020820111156101ea57600080fd5b803590602001918460208302840111600160201b8311171561020b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061078f945050505050565b005b34801561025757600080fd5b506102846004803603604081101561026e57600080fd5b506001600160a01b0381351690602001356107e3565b60408051918252519081900360200190f35b3480156102a257600080fd5b50610249600480360360408110156102b957600080fd5b506001600160a01b038135169060200135610800565b3480156102db57600080fd5b5061024960048036036101208110156102f357600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561033257600080fd5b82018360208201111561034457600080fd5b803590602001918460208302840111600160201b8311171561036557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103b457600080fd5b8201836020820111156103c657600080fd5b803590602001918460208302840111600160201b831117156103e757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092956001600160a01b03853516959094909350604081019250602001359050600160201b81111561044757600080fd5b82018360208201111561045957600080fd5b803590602001918460018302840111600160201b8311171561047a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610941915050565b3480156104c957600080fd5b506104f0600480360360208110156104e057600080fd5b50356001600160a01b0316610cae565b604080519115158252519081900360200190f35b34801561051057600080fd5b50610519610cc3565b604080516001600160a01b039092168252519081900360200190f35b34801561054157600080fd5b506102846004803603606081101561055857600080fd5b506001600160a01b03813581169160208101359091169060400135610cd2565b34801561058457600080fd5b506102496004803603602081101561059b57600080fd5b50356001600160a01b0316610cf5565b3480156105b757600080fd5b50610519610d63565b3480156105cc57600080fd5b50610249600480360360408110156105e357600080fd5b506001600160a01b038135169060200135610d72565b34801561060557600080fd5b506102496004803603602081101561061c57600080fd5b50356001600160a01b0316610fda565b34801561063857600080fd5b506102496004803603602081101561064f57600080fd5b50356001600160a01b031661104b565b34801561066b57600080fd5b506102846004803603604081101561068257600080fd5b506001600160a01b03813516906020013561112b565b3480156106a457600080fd5b50610519611148565b3480156106b957600080fd5b50610249600480360360208110156106d057600080fd5b50356001600160a01b0316611157565b3480156106ec57600080fd5b506102846004803603602081101561070357600080fd5b50356001600160a01b03166111c6565b34801561071f57600080fd5b506102496004803603604081101561073657600080fd5b506001600160a01b0381351690602001356111d8565b34801561075857600080fd5b506104f06004803603606081101561076f57600080fd5b506001600160a01b03813581169160208101359091169060400135611311565b805182511461079a57fe5b60005b82518110156107de576107d68382815181106107b557fe5b60200260200101518383815181106107c957fe5b6020026020010151610d72565b60010161079d565b505050565b600760209081526000928352604080842090915290825290205481565b60026000541415610858576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556108726001600160a01b038316333084611337565b6001600160a01b038216600081815260056020908152604080832033845282528083209383526004825280832054835292905220546108b19082611397565b6001600160a01b0383166000818152600560209081526040808320338452825280832084845260048352818420805485529083528184209590955592825260078152828220935482529290925290205461090b9082611397565b6001600160a01b039092166000908152600760209081526040808320600483528184205484529091528120929092555060019055565b6001546001600160a01b031633148061096957503360009081526009602052604090205460ff165b6109a4576040805162461bcd60e51b815260206004820152600760248201526610bbb2b0bb32b960c91b604482015290519081900360640190fd5b804211156109e3576040805162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b604482015290519081900360640190fd5b6000896001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610a3257600080fd5b505afa158015610a46573d6000803e3d6000fd5b505050506040513d6020811015610a5c57600080fd5b5051600354909150610a7c906001600160a01b038c8116911660006113fa565b600354610a96906001600160a01b038c81169116836113fa565b6000600360009054906101000a90046001600160a01b03166001600160a01b031663a063c0428c848d8d8d8d8d8d8d60016040518b63ffffffff1660e01b8152600401808b6001600160a01b031681526020018a8152602001896001600160a01b031681526020018881526020018781526020018060200180602001866001600160a01b03168152602001806020018515158152602001848103845289818151815260200191508051906020019060200280838360005b83811015610b65578181015183820152602001610b4d565b50505050905001848103835288818151815260200191508051906020019060200280838360005b83811015610ba4578181015183820152602001610b8c565b50505050905001848103825286818151815260200191508051906020019080838360005b83811015610be0578181015183820152602001610bc8565b50505050905090810190601f168015610c0d5780820380516001836020036101000a031916815260200191505b509d5050505050505050505050505050602060405180830381600087803b158015610c3757600080fd5b505af1158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b50516001600160a01b03909b1660008181526008602090815260408083206004808452828520805486529184529184209f909f559290915252505088546001019098555050505050505050565b60096020526000908152604090205460ff1681565b6001546001600160a01b031681565b600560209081526000938452604080852082529284528284209052825290205481565b6001546001600160a01b03163314610d42576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600960205260409020805460ff19169055565b6003546001600160a01b031681565b60026000541415610dca576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260009081556001600160a01b0383168152600460205260409020548110610e24576040805162461bcd60e51b8152602060048201526007602482015266085dd9585d995960ca1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600660209081526040808320338452825280832084845290915290205460ff1615610e97576040805162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4b58db185a5b5959608a1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600560209081526040808320338452825280832084845290915290205480610f00576040805162461bcd60e51b81526020600482015260086024820152670859195c1bdcda5d60c21b604482015290519081900360640190fd5b6001600160a01b0383166000908152600760209081526040808320858452909152812054610f4090610f3a84670de0b6b3a764000061150d565b90611566565b6001600160a01b038516600090815260086020908152604080832087845290915281205491925090610f8090670de0b6b3a764000090610f3a908561150d565b6001600160a01b038087166000908152600660209081526040808320338085529083528184208a8552909252909120805460ff19166001179055600254929350610fce9290911690836115cd565b50506001600055505050565b6001546001600160a01b03163314611027576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6001546001600160a01b03163314611098576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600154604080516370a0823160e01b81523060048201529051611128926001600160a01b0390811692908516916370a0823191602480820192602092909190829003018186803b1580156110eb57600080fd5b505afa1580156110ff573d6000803e3d6000fd5b505050506040513d602081101561111557600080fd5b50516001600160a01b03841691906115cd565b50565b600860209081526000928352604080842090915290825290205481565b6002546001600160a01b031681565b6001546001600160a01b031633146111a4576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60046020526000908152604090205481565b60026000541415611230576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260009081556001600160a01b038316808252600560209081526040808420338552825280842092845260048252808420548452919052902054611275908261161f565b6001600160a01b038316600081815260056020908152604080832033845282528083208484526004835281842080548552908352818420959095559282526007815282822093548252929092529020546112cf908261161f565b6001600160a01b0383166000818152600760209081526040808320600483528184205484529091529020919091556113089033836115cd565b50506001600055565b600660209081526000938452604080852082529284528284209052825290205460ff1681565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261139190859061167c565b50505050565b6000828201838110156113f1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b801580611480575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561145257600080fd5b505afa158015611466573d6000803e3d6000fd5b505050506040513d602081101561147c57600080fd5b5051155b6114bb5760405162461bcd60e51b81526004018080602001828103825260368152602001806119be6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526107de90849061167c565b60008261151c575060006113f4565b8282028284828161152957fe5b04146113f15760405162461bcd60e51b81526004018080602001828103825260218152602001806119736021913960400191505060405180910390fd5b60008082116115bc576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816115c557fe5b049392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107de90849061167c565b600082821115611676576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60606116d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661172d9092919063ffffffff16565b8051909150156107de578080602001905160208110156116f057600080fd5b50516107de5760405162461bcd60e51b815260040180806020018281038252602a815260200180611994602a913960400191505060405180910390fd5b606061173c8484600085611746565b90505b9392505050565b6060824710156117875760405162461bcd60e51b815260040180806020018281038252602681526020018061194d6026913960400191505060405180910390fd5b611790856118a2565b6117e1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106118205780518252601f199092019160209182019101611801565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611882576040519150601f19603f3d011682016040523d82523d6000602084013e611887565b606091505b50915091506118978282866118a8565b979650505050505050565b3b151590565b606083156118b757508161173f565b8251156118c75782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119115781810151838201526020016118f9565b50505050905090810190601f16801561193e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212209ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d864736f6c63430007030033000000000000000000000000f337a885a7543cab542b2d3f5a8c1945036e0c420000000000000000000000000ac00355f80e289f53bf368c9bdb70f5c114c44b0000000000000000000000004622aff8e521a444c9301da0efd05f6b482221b8
Deployed Bytecode
0x60806040526004361061010d5760003560e01c80638cc5dd6211610095578063cc97edbf11610064578063cc97edbf14610698578063cfad57a2146106ad578063e176dd79146106e0578063f3fef3a314610713578063f40084b71461074c57610114565b80638cc5dd62146105c05780638d9ff54e146105f95780639e8c708e1461062c578063b76568081461065f57610114565b80634f48edae116100dc5780634f48edae146104bd5780635aa6e675146105045780635d93a3fc146105355780636290e26114610578578063882dcdf9146105ab57610114565b80630b0ddc1b1461011957806344f78cbf1461024b57806347e7ef24146102965780634b4ce498146102cf57610114565b3661011457005b600080fd5b34801561012557600080fd5b506102496004803603604081101561013c57600080fd5b810190602081018135600160201b81111561015657600080fd5b82018360208201111561016857600080fd5b803590602001918460208302840111600160201b8311171561018957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156101d857600080fd5b8201836020820111156101ea57600080fd5b803590602001918460208302840111600160201b8311171561020b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061078f945050505050565b005b34801561025757600080fd5b506102846004803603604081101561026e57600080fd5b506001600160a01b0381351690602001356107e3565b60408051918252519081900360200190f35b3480156102a257600080fd5b50610249600480360360408110156102b957600080fd5b506001600160a01b038135169060200135610800565b3480156102db57600080fd5b5061024960048036036101208110156102f357600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561033257600080fd5b82018360208201111561034457600080fd5b803590602001918460208302840111600160201b8311171561036557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103b457600080fd5b8201836020820111156103c657600080fd5b803590602001918460208302840111600160201b831117156103e757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092956001600160a01b03853516959094909350604081019250602001359050600160201b81111561044757600080fd5b82018360208201111561045957600080fd5b803590602001918460018302840111600160201b8311171561047a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610941915050565b3480156104c957600080fd5b506104f0600480360360208110156104e057600080fd5b50356001600160a01b0316610cae565b604080519115158252519081900360200190f35b34801561051057600080fd5b50610519610cc3565b604080516001600160a01b039092168252519081900360200190f35b34801561054157600080fd5b506102846004803603606081101561055857600080fd5b506001600160a01b03813581169160208101359091169060400135610cd2565b34801561058457600080fd5b506102496004803603602081101561059b57600080fd5b50356001600160a01b0316610cf5565b3480156105b757600080fd5b50610519610d63565b3480156105cc57600080fd5b50610249600480360360408110156105e357600080fd5b506001600160a01b038135169060200135610d72565b34801561060557600080fd5b506102496004803603602081101561061c57600080fd5b50356001600160a01b0316610fda565b34801561063857600080fd5b506102496004803603602081101561064f57600080fd5b50356001600160a01b031661104b565b34801561066b57600080fd5b506102846004803603604081101561068257600080fd5b506001600160a01b03813516906020013561112b565b3480156106a457600080fd5b50610519611148565b3480156106b957600080fd5b50610249600480360360208110156106d057600080fd5b50356001600160a01b0316611157565b3480156106ec57600080fd5b506102846004803603602081101561070357600080fd5b50356001600160a01b03166111c6565b34801561071f57600080fd5b506102496004803603604081101561073657600080fd5b506001600160a01b0381351690602001356111d8565b34801561075857600080fd5b506104f06004803603606081101561076f57600080fd5b506001600160a01b03813581169160208101359091169060400135611311565b805182511461079a57fe5b60005b82518110156107de576107d68382815181106107b557fe5b60200260200101518383815181106107c957fe5b6020026020010151610d72565b60010161079d565b505050565b600760209081526000928352604080842090915290825290205481565b60026000541415610858576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556108726001600160a01b038316333084611337565b6001600160a01b038216600081815260056020908152604080832033845282528083209383526004825280832054835292905220546108b19082611397565b6001600160a01b0383166000818152600560209081526040808320338452825280832084845260048352818420805485529083528184209590955592825260078152828220935482529290925290205461090b9082611397565b6001600160a01b039092166000908152600760209081526040808320600483528184205484529091528120929092555060019055565b6001546001600160a01b031633148061096957503360009081526009602052604090205460ff165b6109a4576040805162461bcd60e51b815260206004820152600760248201526610bbb2b0bb32b960c91b604482015290519081900360640190fd5b804211156109e3576040805162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b604482015290519081900360640190fd5b6000896001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610a3257600080fd5b505afa158015610a46573d6000803e3d6000fd5b505050506040513d6020811015610a5c57600080fd5b5051600354909150610a7c906001600160a01b038c8116911660006113fa565b600354610a96906001600160a01b038c81169116836113fa565b6000600360009054906101000a90046001600160a01b03166001600160a01b031663a063c0428c848d8d8d8d8d8d8d60016040518b63ffffffff1660e01b8152600401808b6001600160a01b031681526020018a8152602001896001600160a01b031681526020018881526020018781526020018060200180602001866001600160a01b03168152602001806020018515158152602001848103845289818151815260200191508051906020019060200280838360005b83811015610b65578181015183820152602001610b4d565b50505050905001848103835288818151815260200191508051906020019060200280838360005b83811015610ba4578181015183820152602001610b8c565b50505050905001848103825286818151815260200191508051906020019080838360005b83811015610be0578181015183820152602001610bc8565b50505050905090810190601f168015610c0d5780820380516001836020036101000a031916815260200191505b509d5050505050505050505050505050602060405180830381600087803b158015610c3757600080fd5b505af1158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b50516001600160a01b03909b1660008181526008602090815260408083206004808452828520805486529184529184209f909f559290915252505088546001019098555050505050505050565b60096020526000908152604090205460ff1681565b6001546001600160a01b031681565b600560209081526000938452604080852082529284528284209052825290205481565b6001546001600160a01b03163314610d42576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600960205260409020805460ff19169055565b6003546001600160a01b031681565b60026000541415610dca576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260009081556001600160a01b0383168152600460205260409020548110610e24576040805162461bcd60e51b8152602060048201526007602482015266085dd9585d995960ca1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600660209081526040808320338452825280832084845290915290205460ff1615610e97576040805162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4b58db185a5b5959608a1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600560209081526040808320338452825280832084845290915290205480610f00576040805162461bcd60e51b81526020600482015260086024820152670859195c1bdcda5d60c21b604482015290519081900360640190fd5b6001600160a01b0383166000908152600760209081526040808320858452909152812054610f4090610f3a84670de0b6b3a764000061150d565b90611566565b6001600160a01b038516600090815260086020908152604080832087845290915281205491925090610f8090670de0b6b3a764000090610f3a908561150d565b6001600160a01b038087166000908152600660209081526040808320338085529083528184208a8552909252909120805460ff19166001179055600254929350610fce9290911690836115cd565b50506001600055505050565b6001546001600160a01b03163314611027576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6001546001600160a01b03163314611098576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600154604080516370a0823160e01b81523060048201529051611128926001600160a01b0390811692908516916370a0823191602480820192602092909190829003018186803b1580156110eb57600080fd5b505afa1580156110ff573d6000803e3d6000fd5b505050506040513d602081101561111557600080fd5b50516001600160a01b03841691906115cd565b50565b600860209081526000928352604080842090915290825290205481565b6002546001600160a01b031681565b6001546001600160a01b031633146111a4576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60046020526000908152604090205481565b60026000541415611230576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260009081556001600160a01b038316808252600560209081526040808420338552825280842092845260048252808420548452919052902054611275908261161f565b6001600160a01b038316600081815260056020908152604080832033845282528083208484526004835281842080548552908352818420959095559282526007815282822093548252929092529020546112cf908261161f565b6001600160a01b0383166000818152600760209081526040808320600483528184205484529091529020919091556113089033836115cd565b50506001600055565b600660209081526000938452604080852082529284528284209052825290205460ff1681565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261139190859061167c565b50505050565b6000828201838110156113f1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b801580611480575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561145257600080fd5b505afa158015611466573d6000803e3d6000fd5b505050506040513d602081101561147c57600080fd5b5051155b6114bb5760405162461bcd60e51b81526004018080602001828103825260368152602001806119be6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526107de90849061167c565b60008261151c575060006113f4565b8282028284828161152957fe5b04146113f15760405162461bcd60e51b81526004018080602001828103825260218152602001806119736021913960400191505060405180910390fd5b60008082116115bc576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816115c557fe5b049392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107de90849061167c565b600082821115611676576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60606116d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661172d9092919063ffffffff16565b8051909150156107de578080602001905160208110156116f057600080fd5b50516107de5760405162461bcd60e51b815260040180806020018281038252602a815260200180611994602a913960400191505060405180910390fd5b606061173c8484600085611746565b90505b9392505050565b6060824710156117875760405162461bcd60e51b815260040180806020018281038252602681526020018061194d6026913960400191505060405180910390fd5b611790856118a2565b6117e1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106118205780518252601f199092019160209182019101611801565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611882576040519150601f19603f3d011682016040523d82523d6000602084013e611887565b606091505b50915091506118978282866118a8565b979650505050505050565b3b151590565b606083156118b757508161173f565b8251156118c75782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119115781810151838201526020016118f9565b50505050905090810190601f16801561193e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212209ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d864736f6c63430007030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f337a885a7543cab542b2d3f5a8c1945036e0c420000000000000000000000000ac00355f80e289f53bf368c9bdb70f5c114c44b0000000000000000000000004622aff8e521a444c9301da0efd05f6b482221b8
-----Decoded View---------------
Arg [0] : _governance (address): 0xF337A885a7543CAb542B2D3f5A8c1945036E0C42
Arg [1] : _bmi (address): 0x0aC00355F80E289f53BF368C9Bdb70f5c114C44B
Arg [2] : _bmiZapper (address): 0x4622aFF8E521A444C9301dA0efD05f6b482221b8
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000f337a885a7543cab542b2d3f5a8c1945036e0c42
Arg [1] : 0000000000000000000000000ac00355f80e289f53bf368c9bdb70f5c114c44b
Arg [2] : 0000000000000000000000004622aff8e521a444c9301da0efd05f6b482221b8
Deployed Bytecode Sourcemap
553:5021:25:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5325:247;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5325:247:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5325:247:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5325:247:25;;;;;;;;-1:-1:-1;5325:247:25;;-1:-1:-1;;;;;5325:247:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5325:247:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5325:247:25;;-1:-1:-1;5325:247:25;;-1:-1:-1;;;;;5325:247:25:i;:::-;;1163:69;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1163:69:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;3763:367;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3763:367:25;;;;;;;;:::i;2558:1077::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2558:1077:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2558:1077:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2558:1077:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2558:1077:25;;;;;;;;-1:-1:-1;2558:1077:25;;-1:-1:-1;;;;;2558:1077:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2558:1077:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2558:1077:25;;-1:-1:-1;;;;;2558:1077:25;;;;;;;;-1:-1:-1;2558:1077:25;;;;-1:-1:-1;2558:1077:25;;;;-1:-1:-1;;;;2558:1077:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2558:1077:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2558:1077:25;;-1:-1:-1;;2558:1077:25;;;-1:-1:-1;2558:1077:25;;-1:-1:-1;;2558:1077:25:i;1470:47::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1470:47:25;-1:-1:-1;;;;;1470:47:25;;:::i;:::-;;;;;;;;;;;;;;;;;;668:25;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;668:25:25;;;;;;;;;;;;;;902:83;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;902:83:25;;;;;;;;;;;;;;;;;:::i;2177:103::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2177:103:25;-1:-1:-1;;;;;2177:103:25;;:::i;723:24::-;;;;;;;;;;;;;:::i;4670:595::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4670:595:25;;;;;;;;:::i;2068:103::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2068:103:25;-1:-1:-1;;;;;2068:103:25;;:::i;2402:150::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2402:150:25;-1:-1:-1;;;;;2402:150:25;;:::i;1281:61::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1281:61:25;;;;;;;;:::i;699:18::-;;;;;;;;;;;;;:::i;2286:93::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2286:93:25;-1:-1:-1;;;;;2286:93:25;;:::i;800:40::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;800:40:25;-1:-1:-1;;;;;800:40:25;;:::i;4218:392::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4218:392:25;;;;;;;;:::i;1038:79::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1038:79:25;;;;;;;;;;;;;;;;;:::i;5325:247::-;5441:4;:11;5423:7;:14;:29;5416:37;;;;5469:9;5464:102;5488:7;:14;5484:1;:18;5464:102;;;5523:32;5535:7;5543:1;5535:10;;;;;;;;;;;;;;5547:4;5552:1;5547:7;;;;;;;;;;;;;;5523:11;:32::i;:::-;5504:3;;5464:102;;;;5325:247;;:::o;1163:69::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;3763:367::-;1688:1:22;2277:7;;:19;;2269:63;;;;;-1:-1:-1;;;2269:63:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;1688:1;2407:7;:18;3843:67:25::1;-1:-1:-1::0;;;;;3843:31:25;::::1;3875:10;3895:4;3902:7:::0;3843:31:::1;:67::i;:::-;-1:-1:-1::0;;;;;3967:16:25;::::1;;::::0;;;:8:::1;:16;::::0;;;;;;;3984:10:::1;3967:28:::0;;;;;;;3996:13;;;:5:::1;:13:::0;;;;;;3967:43;;;;;;;:56:::1;::::0;4015:7;3967:47:::1;:56::i;:::-;-1:-1:-1::0;;;;;3921:16:25;::::1;;::::0;;;:8:::1;:16;::::0;;;;;;;3938:10:::1;3921:28:::0;;;;;;;3950:13;;;:5:::1;:13:::0;;;;;;;3921:43;;;;;;;;:102;;;;4073:22;;;:14:::1;:22:::0;;;;;4096:13;;4073:37;;;;;;;;;:50:::1;::::0;4115:7;4073:41:::1;:50::i;:::-;-1:-1:-1::0;;;;;4033:22:25;;::::1;;::::0;;;:14:::1;:22;::::0;;;;;;;4056:5:::1;:13:::0;;;;;;4033:37;;;;;;;:90;;;;-1:-1:-1;1645:1:22;2580:22;;3763:367:25:o;2558:1077::-;1918:10;;-1:-1:-1;;;;;1918:10:25;1904;:24;;:55;;-1:-1:-1;1948:10:25;1932:27;;;;:15;:27;;;;;;;;1904:55;1896:75;;;;;-1:-1:-1;;;1896:75:25;;;;;;;;;;;;-1:-1:-1;;;1896:75:25;;;;;;;;;;;;;;;2952:8:::1;2933:15;:27;;2925:47;;;::::0;;-1:-1:-1;;;2925:47:25;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;2925:47:25;;;;;;;;;;;;;::::1;;2983:19;3012:5;-1:-1:-1::0;;;;;3005:23:25::1;;3037:4;3005:38;;;;;;;;;;;;;-1:-1:-1::0;;;;;3005:38:25::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;3005:38:25;3080:9:::1;::::0;3005:38;;-1:-1:-1;3054:39:25::1;::::0;-1:-1:-1;;;;;3054:25:25;;::::1;::::0;3080:9:::1;;3054:25;:39::i;:::-;3129:9;::::0;3103:49:::1;::::0;-1:-1:-1;;;;;3103:25:25;;::::1;::::0;3129:9:::1;3140:11:::0;3103:25:::1;:49::i;:::-;3163:17;3205:9;;;;;;;;;-1:-1:-1::0;;;;;3205:9:25::1;-1:-1:-1::0;;;;;3195:29:25::1;;3242:5;3265:11;3294:15;3327:21;3366:11;3395:16;3429:26;3473:11;3502:15;3535:4;3195:358;;;;;;;;;;;;;-1:-1:-1::0;;;;;3195:358:25::1;;;;;;;;;;;-1:-1:-1::0;;;;;3195:358:25::1;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;3195:358:25::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;3195:358:25;-1:-1:-1;;;;;3564:13:25;;::::1;;::::0;;;:6:::1;3195:358;3564:13:::0;;;;;;;3578:5:::1;:12:::0;;;;;;;;3564:27;;;;;;;;:39;;;;3614:12;;;;;-1:-1:-1;;3614:14:25;;::::1;;::::0;;;-1:-1:-1;;;;;;;;2558:1077:25:o;1470:47::-;;;;;;;;;;;;;;;:::o;668:25::-;;;-1:-1:-1;;;;;668:25:25;;:::o;902:83::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2177:103::-;1815:10;;-1:-1:-1;;;;;1815:10:25;1801;:24;1793:48;;;;;-1:-1:-1;;;1793:48:25;;;;;;;;;;;;-1:-1:-1;;;1793:48:25;;;;;;;;;;;;;;;-1:-1:-1;;;;;2241:24:25::1;2268:5;2241:24:::0;;;:15:::1;:24;::::0;;;;:32;;-1:-1:-1;;2241:32:25::1;::::0;;2177:103::o;723:24::-;;;-1:-1:-1;;;;;723:24:25;;:::o;4670:595::-;1688:1:22;2277:7;;:19;;2269:63;;;;;-1:-1:-1;;;2269:63:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;1688:1;2407:7;:18;;;-1:-1:-1;;;;;4764:13:25;::::1;::::0;;:5:::1;:13;::::0;;;;;4758:19;::::1;4750:39;;;::::0;;-1:-1:-1;;;4750:39:25;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;4750:39:25;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;4808:15:25;::::1;;::::0;;;:7:::1;:15;::::0;;;;;;;4824:10:::1;4808:27:::0;;;;;;;:32;;;;;;;;;::::1;;4807:33;4799:61;;;::::0;;-1:-1:-1;;;4799:61:25;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;4799:61:25;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;4894:16:25;::::1;4870:21;4894:16:::0;;;:8:::1;:16;::::0;;;;;;;4911:10:::1;4894:28:::0;;;;;;;:33;;;;;;;;;4945:17;4937:38:::1;;;::::0;;-1:-1:-1;;;4937:38:25;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;4937:38:25;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;5030:22:25;::::1;4986:13;5030:22:::0;;;:14:::1;:22;::::0;;;;;;;:27;;;;;;;;;5002:56:::1;::::0;:23:::1;:13:::0;5020:4:::1;5002:17;:23::i;:::-;:27:::0;::::1;:56::i;:::-;-1:-1:-1::0;;;;;5095:14:25;::::1;5068:24;5095:14:::0;;;:6:::1;:14;::::0;;;;;;;:19;;;;;;;;;4986:72;;-1:-1:-1;5068:24:25;5095:40:::1;::::0;5130:4:::1;::::0;5095:30:::1;::::0;4986:72;5095:23:::1;:30::i;:40::-;-1:-1:-1::0;;;;;5145:15:25;;::::1;;::::0;;;:7:::1;:15;::::0;;;;;;;5161:10:::1;5145:27:::0;;;;;;;;;:32;;;;;;;;;:39;;-1:-1:-1;;5145:39:25::1;5180:4;5145:39;::::0;;5210:3:::1;::::0;5068:67;;-1:-1:-1;5195:63:25::1;::::0;5210:3;;::::1;::::0;5068:67;5195:33:::1;:63::i;:::-;-1:-1:-1::0;;1645:1:22;2580:7;:22;-1:-1:-1;;;4670:595:25:o;2068:103::-;1815:10;;-1:-1:-1;;;;;1815:10:25;1801;:24;1793:48;;;;;-1:-1:-1;;;1793:48:25;;;;;;;;;;;;-1:-1:-1;;;1793:48:25;;;;;;;;;;;;;;;-1:-1:-1;;;;;2133:24:25::1;;::::0;;;:15:::1;:24;::::0;;;;:31;;-1:-1:-1;;2133:31:25::1;2160:4;2133:31;::::0;;2068:103::o;2402:150::-;1815:10;;-1:-1:-1;;;;;1815:10:25;1801;:24;1793:48;;;;;-1:-1:-1;;;1793:48:25;;;;;;;;;;;;-1:-1:-1;;;1793:48:25;;;;;;;;;;;;;;;2493:10:::1;::::0;2505:39:::1;::::0;;-1:-1:-1;;;2505:39:25;;2538:4:::1;2505:39;::::0;::::1;::::0;;;2465:80:::1;::::0;-1:-1:-1;;;;;2493:10:25;;::::1;::::0;2505:24;;::::1;::::0;::::1;::::0;:39;;;;;::::1;::::0;;;;;;;;;:24;:39;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;2505:39:25;-1:-1:-1;;;;;2465:27:25;::::1;::::0;:80;:27:::1;:80::i;:::-;2402:150:::0;:::o;1281:61::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;699:18::-;;;-1:-1:-1;;;;;699:18:25;;:::o;2286:93::-;1815:10;;-1:-1:-1;;;;;1815:10:25;1801;:24;1793:48;;;;;-1:-1:-1;;;1793:48:25;;;;;;;;;;;;-1:-1:-1;;;1793:48:25;;;;;;;;;;;;;;;2348:10:::1;:24:::0;;-1:-1:-1;;;;;;2348:24:25::1;-1:-1:-1::0;;;;;2348:24:25;;;::::1;::::0;;;::::1;::::0;;2286:93::o;800:40::-;;;;;;;;;;;;;:::o;4218:392::-;1688:1:22;2277:7;;:19;;2269:63;;;;;-1:-1:-1;;;2269:63:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;1688:1;2407:7;:18;;;-1:-1:-1;;;;;4388:16:25;::::1;::::0;;;:8:::1;:16;::::0;;;;;;;4405:10:::1;4388:28:::0;;;;;;;4417:13;;;:5:::1;:13:::0;;;;;;4388:43;;;;;;;;:56:::1;::::0;4436:7;4388:47:::1;:56::i;:::-;-1:-1:-1::0;;;;;4342:16:25;::::1;;::::0;;;:8:::1;:16;::::0;;;;;;;4359:10:::1;4342:28:::0;;;;;;;4371:13;;;:5:::1;:13:::0;;;;;;;4342:43;;;;;;;;:102;;;;4494:22;;;:14:::1;:22:::0;;;;;4517:13;;4494:37;;;;;;;;;:50:::1;::::0;4536:7;4494:41:::1;:50::i;:::-;-1:-1:-1::0;;;;;4454:22:25;::::1;;::::0;;;:14:::1;:22;::::0;;;;;;;4477:5:::1;:13:::0;;;;;;4454:37;;;;;;;:90;;;;4555:48:::1;::::0;4583:10:::1;4595:7:::0;4555:27:::1;:48::i;:::-;-1:-1:-1::0;;1645:1:22;2580:7;:22;4218:392:25:o;1038:79::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;866:203:23:-;993:68;;;-1:-1:-1;;;;;993:68:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;993:68:23;-1:-1:-1;;;993:68:23;;;966:96;;986:5;;966:19;:96::i;:::-;866:203;;;;:::o;2690:175:24:-;2748:7;2779:5;;;2802:6;;;;2794:46;;;;;-1:-1:-1;;;2794:46:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;-1:-1:-1;2690:175:24;;;;;:::o;1329:613:23:-;1694:10;;;1693:62;;-1:-1:-1;1710:39:23;;;-1:-1:-1;;;1710:39:23;;1734:4;1710:39;;;;-1:-1:-1;;;;;1710:39:23;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1710:39:23;:44;1693:62;1685:150;;;;-1:-1:-1;;;1685:150:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1872:62;;;-1:-1:-1;;;;;1872:62:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1872:62:23;-1:-1:-1;;;1872:62:23;;;1845:90;;1865:5;;1845:19;:90::i;3538:215:24:-;3596:7;3619:6;3615:20;;-1:-1:-1;3634:1:24;3627:8;;3615:20;3657:5;;;3661:1;3657;:5;:1;3680:5;;;;;:10;3672:56;;;;-1:-1:-1;;;3672:56:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4217:150;4275:7;4306:1;4302;:5;4294:44;;;;;-1:-1:-1;;;4294:44:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;4359:1;4355;:5;;;;;;;4217:150;-1:-1:-1;;;4217:150:24:o;685:175:23:-;794:58;;;-1:-1:-1;;;;;794:58:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;794:58:23;-1:-1:-1;;;794:58:23;;;767:86;;787:5;;767:19;:86::i;3136:155:24:-;3194:7;3226:1;3221;:6;;3213:49;;;;;-1:-1:-1;;;3213:49:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3279:5:24;;;3136:155::o;2948:751:23:-;3367:23;3393:69;3421:4;3393:69;;;;;;;;;;;;;;;;;3401:5;-1:-1:-1;;;;;3393:27:23;;;:69;;;;;:::i;:::-;3476:17;;3367:95;;-1:-1:-1;3476:21:23;3472:221;;3616:10;3605:30;;;;;;;;;;;;;;;-1:-1:-1;3605:30:23;3597:85;;;;-1:-1:-1;;;3597:85:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3581:193:1;3684:12;3715:52;3737:6;3745:4;3751:1;3754:12;3715:21;:52::i;:::-;3708:59;;3581:193;;;;;;:::o;4608:523::-;4735:12;4792:5;4767:21;:30;;4759:81;;;;-1:-1:-1;;;4759:81:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:18;4869:6;4858:10;:18::i;:::-;4850:60;;;;;-1:-1:-1;;;4850:60:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:12;4995:23;5022:6;-1:-1:-1;;;;;5022:11:1;5042:5;5050:4;5022:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5022:33:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4980:75;;;;5072:52;5090:7;5099:10;5111:12;5072:17;:52::i;:::-;5065:59;4608:523;-1:-1:-1;;;;;;;4608:523:1:o;726:413::-;1086:20;1124:8;;;726:413::o;7091:725::-;7206:12;7234:7;7230:580;;;-1:-1:-1;7264:10:1;7257:17;;7230:580;7375:17;;:21;7371:429;;7633:10;7627:17;7693:15;7680:10;7676:2;7672:19;7665:44;7582:145;7772:12;7765:20;;-1:-1:-1;;;7765:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
ipfs://9ae22c2252c81517044b9f8249e2c888c45c2c3b61e6eddabf4f8d13dd7a54d8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
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.