Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0.000000000006956053 ETH
Eth Value
Less Than $0.01 (@ $3,175.75/ETH)Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 21 from a total of 21 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Recover ERC20 | 12379080 | 1176 days ago | IN | 0 ETH | 0.00708948 | ||||
Mint With ETH | 12322085 | 1185 days ago | IN | 1.11568625 ETH | 0.27027717 | ||||
Mint With ETH | 12253304 | 1195 days ago | IN | 102 ETH | 1.1006012 | ||||
Recover ERC20 | 12247924 | 1196 days ago | IN | 0 ETH | 0.0053139 | ||||
Recover ERC20 | 12247921 | 1196 days ago | IN | 0 ETH | 0.00605255 | ||||
Recover ERC20 | 12247919 | 1196 days ago | IN | 0 ETH | 0.00532142 | ||||
Recover ERC20 | 12247915 | 1196 days ago | IN | 0 ETH | 0.00536247 | ||||
Recover ERC20 | 12247912 | 1196 days ago | IN | 0 ETH | 0.02378199 | ||||
Recover ERC20 | 12247908 | 1196 days ago | IN | 0 ETH | 0.01488174 | ||||
Recover ERC20 | 12247906 | 1196 days ago | IN | 0 ETH | 0.00626632 | ||||
Recover ERC20 | 12247904 | 1196 days ago | IN | 0 ETH | 0.00535745 | ||||
Recover ERC20 | 12247903 | 1196 days ago | IN | 0 ETH | 0.07407872 | ||||
Recover ERC20 | 12247900 | 1196 days ago | IN | 0 ETH | 0.08025685 | ||||
Recover ERC20 | 12247895 | 1196 days ago | IN | 0 ETH | 0.08635931 | ||||
Recover ERC20 | 12247894 | 1196 days ago | IN | 0 ETH | 0.09246177 | ||||
Recover ERC20 | 12247892 | 1196 days ago | IN | 0 ETH | 0.02096685 | ||||
Recover ERC20 | 12247890 | 1196 days ago | IN | 0 ETH | 0.100583 | ||||
Mint With ETH | 12246723 | 1196 days ago | IN | 150 ETH | 0.4587608 | ||||
Mint With ETH | 12245142 | 1196 days ago | IN | 210 ETH | 0.42428763 | ||||
Mint With ETH | 12244682 | 1196 days ago | IN | 200 ETH | 0.44823675 | ||||
0x60806040 | 12201997 | 1203 days ago | IN | 0 ETH | 0.20215085 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
12322085 | 1185 days ago | 0.003354 ETH | ||||
12322085 | 1185 days ago | 0.00262411 ETH | ||||
12322085 | 1185 days ago | 0.06887031 ETH | ||||
12322085 | 1185 days ago | 0.00196297 ETH | ||||
12322085 | 1185 days ago | 0.19775995 ETH | ||||
12322085 | 1185 days ago | 0.31885474 ETH | ||||
12322085 | 1185 days ago | 0.02259377 ETH | ||||
12322085 | 1185 days ago | 0.0237618 ETH | ||||
12322085 | 1185 days ago | 0.02220012 ETH | ||||
12322085 | 1185 days ago | 0.02960772 ETH | ||||
12322085 | 1185 days ago | 0.15371342 ETH | ||||
12322085 | 1185 days ago | 0.09371976 ETH | ||||
12322085 | 1185 days ago | 0.11381336 ETH | ||||
12322085 | 1185 days ago | 0.06285016 ETH | ||||
12253304 | 1195 days ago | 0.45835406 ETH | ||||
12253304 | 1195 days ago | 0.30777607 ETH | ||||
12253304 | 1195 days ago | 7.92665323 ETH | ||||
12253304 | 1195 days ago | 0.25644848 ETH | ||||
12253304 | 1195 days ago | 19.26566147 ETH | ||||
12253304 | 1195 days ago | 26.26957852 ETH | ||||
12253304 | 1195 days ago | 2.36284562 ETH | ||||
12253304 | 1195 days ago | 2.69234619 ETH | ||||
12253304 | 1195 days ago | 2.41705779 ETH | ||||
12253304 | 1195 days ago | 3.62808999 ETH | ||||
12253304 | 1195 days ago | 10.70072964 ETH |
Loading...
Loading
Contract Name:
StandaloneWeaverV1
Compiler Version
v0.7.3+commit.9bfce1f6
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: MIT pragma solidity ^0.7.3; import "./Helpers.sol"; 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 "./SafeMath.sol"; import "./ERC20.sol"; import "./IERC20.sol"; import "./SafeERC20.sol"; // Basket Weaver is a way to socialize gas costs related to minting baskets tokens contract StandaloneWeaverV1 is Helpers { using SafeMath for uint256; using SafeERC20 for IERC20; IBDPI public constant BDPI = IBDPI(0x0309c98B1bffA350bcb3F9fB9780970CA32a5060); address public governance; // **** Constructor and modifiers **** constructor(address _governance) { governance = _governance; // Enter compound markets address[] memory markets = new address[](2); markets[0] = CUNI; markets[0] = CCOMP; enterMarkets(markets); } receive() external payable {} modifier onlyGov() { require(msg.sender == governance, "!governance"); _; } // **** Restricted functions **** function setGov(address _governance) public onlyGov { governance = _governance; } function recoverERC20(address _token) public onlyGov { IERC20(_token).safeTransfer(governance, IERC20(_token).balanceOf(address(this))); } // **** Public Functions **** /// @notice Converts ETH into a Basket, socializing gas cost /// @param derivatives Address of the derivatives (e.g. cUNI, aYFI) /// @param underlyings Address of the underlyings (e.g. UNI, YFI) /// @param underlyingsInEthPerBasket Off-chain calculation - how much each underlying is /// worth in ETH per 1 unit of basket token /// @param ethPerBasket How much 1 basket token is worth in ETH /// @param minMintAmount Minimum amount of basket token to mint /// @param deadline Deadline to mint by function mintWithETH( address[] memory derivatives, address[] memory underlyings, uint256[] memory underlyingsInEthPerBasket, uint256 ethPerBasket, uint256 minMintAmount, uint256 deadline ) public payable returns (uint256) { require(block.timestamp <= deadline, "expired"); // BDPI to mint uint256 bdpiToMint = _convertETHToDerivativeAndGetMintAmount(derivatives, underlyings, underlyingsInEthPerBasket, ethPerBasket); require(bdpiToMint >= minMintAmount, "!mint-min-amount"); // Mint tokens and transfer to user BDPI.mint(bdpiToMint); IERC20(address(BDPI)).safeTransfer(msg.sender, bdpiToMint); return bdpiToMint; } // **** Internals **** /// @notice Chooses which router address to use function _getRouterAddressForToken(address _token) internal pure returns (address) { // Chooses which router (uniswap or sushiswap) to use to swap tokens // By default: SUSHI // But some tokens don't have liquidity on SUSHI, so we use UNI // Don't want to use 1inch as its too costly gas-wise if (_token == KNC || _token == LRC || _token == BAL || _token == MTA) { return UNIV2_ROUTER; } return SUSHISWAP_ROUTER; } /// @notice Converts ETH into the specific derivative and get mint amount for basket /// @param derivatives Address of the derivatives (e.g. cUNI, aYFI) /// @param underlyings Address of the underlyings (e.g. UNI, YFI) /// @param underlyingsInEthPerBasketToken Off-chain calculation - how much each underlying is /// worth in ETH per 1 unit of basket token /// @param ethPerBasketToken How much 1 basket token is worth in ETH function _convertETHToDerivativeAndGetMintAmount( address[] memory derivatives, address[] memory underlyings, uint256[] memory underlyingsInEthPerBasketToken, uint256 ethPerBasketToken ) internal returns (uint256) { // Path address[] memory path = new address[](2); path[0] = WETH; // Convert them all to the underlyings uint256 bdpiToMint; // Get total amount in bdpi (, uint256[] memory tokenAmountsInBasket) = BDPI.getAssetsAndBalances(); // BDPI total supply uint256 basketTotalSupply = BDPI.totalSupply(); // ETH received uint256 totalETHReceived = address(this).balance; { uint256 ratio; uint256 ethToSend; for (uint256 i = 0; i < derivatives.length; i++) { ratio = underlyingsInEthPerBasketToken[i].mul(1e18).div(ethPerBasketToken); // Convert them from ETH to their respective tokens (truncate 1e6 for rounding errors) ethToSend = totalETHReceived.mul(ratio).div(1e24).mul(1e6); path[1] = underlyings[i]; IUniswapV2Router02(_getRouterAddressForToken(underlyings[i])).swapExactETHForTokens{ value: ethToSend }( 0, path, address(this), block.timestamp + 60 ); // Convert to from respective token to derivative _toDerivative(underlyings[i], derivatives[i]); // Approve derivative and calculate mint amount bdpiToMint = _approveDerivativeAndGetMintAmount( derivatives[i], basketTotalSupply, tokenAmountsInBasket[i], bdpiToMint ); } } return bdpiToMint; } /// @notice Approves derivative to the basket address and gets the mint amount. /// Mainly here to avoid stack too deep errors /// @param derivative Address of the derivative (e.g. cUNI, aYFI) /// @param basketTotalSupply Total supply of the basket token /// @param tokenAmountInBasket Amount of derivative currently in the basket /// @param curMintAmount Accumulator - whats the minimum mint amount right now function _approveDerivativeAndGetMintAmount( address derivative, uint256 basketTotalSupply, uint256 tokenAmountInBasket, uint256 curMintAmount ) internal returns (uint256) { uint256 derivativeBal = IERC20(derivative).balanceOf(address(this)); IERC20(derivative).safeApprove(address(BDPI), 0); IERC20(derivative).safeApprove(address(BDPI), derivativeBal); // Calculate how much BDPI we can mint at max // Formula: min(e for e in bdpiSupply * tokenWeHave[e] / tokenInBDPI[e]) if (curMintAmount == 0) { return basketTotalSupply.mul(derivativeBal).div(tokenAmountInBasket); } uint256 temp = basketTotalSupply.mul(derivativeBal).div(tokenAmountInBasket); if (temp < curMintAmount) { return temp; } return curMintAmount; } }
// 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.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; import "./IATokenV1.sol"; import "./ICToken.sol"; import "./IComptroller.sol"; import "./ILendingPoolV1.sol"; import "./ISushiBar.sol"; import "./SafeMath.sol"; import "./IERC20.sol"; import "./SafeERC20.sol"; interface IBDPI { 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); } contract Helpers { using SafeMath for uint256; using SafeERC20 for IERC20; // Aave address constant LENDING_POOL_V1 = 0x398eC7346DcD622eDc5ae82352F02bE94C62d119; address constant LENDING_POOL_CORE_V1 = 0x3dfd23A6c5E8BbcFc9581d2E864a68feb6a076d3; // Compound address constant COMPTROLLER = 0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B; // Router address address constant SUSHISWAP_ROUTER = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F; address constant UNIV2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // CTokens address constant CUNI = 0x35A18000230DA775CAc24873d00Ff85BccdeD550; address constant CCOMP = 0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4; // SUSHI address constant XSUSHI = 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272; // WETH address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // DPI address constant DPI = 0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b; // Defi tokens address constant UNI = 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984; address constant COMP = 0xc00e94Cb662C3520282E6f5717214004A7f26888; address constant YFI = 0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e; address constant SNX = 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F; address constant MKR = 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2; address constant REN = 0x408e41876cCCDC0F92210600ef50372656052a38; address constant KNC = 0xdd974D5C2e2928deA5F71b9825b8b646686BD200; address constant LRC = 0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD; address constant BAL = 0xba100000625a3754423978a60c9317c58a424e3D; address constant AAVE = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9; address constant MTA = 0xa3BeD4E1c75D00fa6f4E5E6922DB7261B5E9AcD2; address constant SUSHI = 0x6B3595068778DD592e39A122f4f5a5cF09C90fE2; // **** Public **** /// @notice Enters Compound market. *Must be called before toCToken* /// @param _markets Compound markets to enter (underlying, not cTokens) function enterMarkets(address[] memory _markets) public { IComptroller(COMPTROLLER).enterMarkets(_markets); } // **** Internal **** /// @notice Converts underlying to derivative /// @param _derivative Address of the derivative token function _toDerivative(address _underlying, address _derivative) internal { if (_underlying == _derivative) { return; } if (_derivative == CUNI || _derivative == CCOMP) { _toCToken(_underlying); } else if (_derivative == XSUSHI) { _toXSushi(); } else { _toATokenV1(_underlying); } } /// @notice Supplies assets to the Compound market /// @param _token Underlying token to supply to Compound function _toCToken(address _token) internal { // Only doing UNI or COMP for CTokens require(_token == UNI || _token == COMP, "!valid-to-ctoken"); address _ctoken = _getTokenToCToken(_token); uint256 balance = IERC20(_token).balanceOf(address(this)); require(balance > 0, "!token-bal"); IERC20(_token).safeApprove(_ctoken, 0); IERC20(_token).safeApprove(_ctoken, balance); require(ICToken(_ctoken).mint(balance) == 0, "!ctoken-mint"); } /// @notice Supplies assets to the Aave market /// @param _token Underlying to supply to Aave function _toATokenV1(address _token) internal { require(_token != UNI && _token != COMP, "no-uni-or-comp"); uint256 balance = IERC20(_token).balanceOf(address(this)); require(balance > 0, "!token-bal"); IERC20(_token).safeApprove(LENDING_POOL_CORE_V1, 0); IERC20(_token).safeApprove(LENDING_POOL_CORE_V1, balance); ILendingPoolV1(LENDING_POOL_V1).deposit(_token, balance, 0); } /// @dev Token to CToken mapping /// @param _token Token address function _getTokenToCToken(address _token) internal pure returns (address) { if (_token == UNI) { return CUNI; } if (_token == COMP) { return CCOMP; } revert("!supported-token-to-ctoken"); } /// @notice Converts sushi to xsushi function _toXSushi() internal { uint256 balance = IERC20(SUSHI).balanceOf(address(this)); require(balance > 0, "!sushi-bal"); IERC20(SUSHI).safeApprove(XSUSHI, 0); IERC20(SUSHI).safeApprove(XSUSHI, balance); ISushiBar(XSUSHI).enter(balance); } }
// 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 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 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.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 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.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"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BDPI","outputs":[{"internalType":"contract IBDPI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_markets","type":"address[]"}],"name":"enterMarkets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"derivatives","type":"address[]"},{"internalType":"address[]","name":"underlyings","type":"address[]"},{"internalType":"uint256[]","name":"underlyingsInEthPerBasket","type":"uint256[]"},{"internalType":"uint256","name":"ethPerBasket","type":"uint256"},{"internalType":"uint256","name":"minMintAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"mintWithETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001e6f38038062001e6f833981810160405260208110156200003757600080fd5b5051600080546001600160a01b0319166001600160a01b03831617905560408051600280825260608083018452926020830190803683370190505090507335a18000230da775cac24873d00ff85bccded550816000815181106200009757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507370e36f6bf80a52b3b46b3af8e106cc0ed743e8e481600081518110620000da57fe5b6001600160a01b0390921660209283029190910190910152620000fd8162000105565b505062000268565b604051631853304760e31b8152602060048201818152835160248401528351733d9819210a31b4961b30ef54be2aed79b9c9cd3b9363c299823893869392839260440191808601910280838360005b838110156200016e57818101518382015260200162000154565b5050505090500192505050600060405180830381600087803b1580156200019457600080fd5b505af1158015620001a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620001d357600080fd5b8101908080516040519392919084640100000000821115620001f457600080fd5b9083019060208201858111156200020a57600080fd5b82518660208202830111640100000000821117156200022857600080fd5b82525081516020918201928201910280838360005b83811015620002575781810151838201526020016200023d565b505050509050016040525050505050565b611bf780620002786000396000f3fe6080604052600436106100595760003560e01c80632272c18f146100655780635aa6e675146100965780639e8c708e146100ab578063c2998238146100e0578063cc6918881461018e578063cfad57a21461035057610060565b3661006057005b600080fd5b34801561007157600080fd5b5061007a610383565b604080516001600160a01b039092168252519081900360200190f35b3480156100a257600080fd5b5061007a61039b565b3480156100b757600080fd5b506100de600480360360208110156100ce57600080fd5b50356001600160a01b03166103aa565b005b3480156100ec57600080fd5b506100de6004803603602081101561010357600080fd5b810190602081018135600160201b81111561011d57600080fd5b82018360208201111561012f57600080fd5b803590602001918460208302840111600160201b8311171561015057600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061048a945050505050565b61033e600480360360c08110156101a457600080fd5b810190602081018135600160201b8111156101be57600080fd5b8201836020820111156101d057600080fd5b803590602001918460208302840111600160201b831117156101f157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561024057600080fd5b82018360208201111561025257600080fd5b803590602001918460208302840111600160201b8311171561027357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156102c257600080fd5b8201836020820111156102d457600080fd5b803590602001918460208302840111600160201b831117156102f557600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602081013590604001356105e1565b60408051918252519081900360200190f35b34801561035c57600080fd5b506100de6004803603602081101561037357600080fd5b50356001600160a01b0316610719565b730309c98b1bffa350bcb3f9fb9780970ca32a506081565b6000546001600160a01b031681565b6000546001600160a01b031633146103f7576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600054604080516370a0823160e01b81523060048201529051610487926001600160a01b0390811692908516916370a0823191602480820192602092909190829003018186803b15801561044a57600080fd5b505afa15801561045e573d6000803e3d6000fd5b505050506040513d602081101561047457600080fd5b50516001600160a01b0384169190610788565b50565b604051631853304760e31b8152602060048201818152835160248401528351733d9819210a31b4961b30ef54be2aed79b9c9cd3b9363c299823893869392839260440191808601910280838360005b838110156104f15781810151838201526020016104d9565b5050505090500192505050600060405180830381600087803b15801561051657600080fd5b505af115801561052a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561055357600080fd5b8101908080516040519392919084600160201b82111561057257600080fd5b90830190602082018581111561058757600080fd5b82518660208202830111600160201b821117156105a357600080fd5b82525081516020918201928201910280838360005b838110156105d05781810151838201526020016105b8565b505050509050016040525050505050565b600081421115610622576040805162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b604482015290519081900360640190fd5b6000610630888888886107df565b90508381101561067a576040805162461bcd60e51b815260206004820152601060248201526f085b5a5b9d0b5b5a5b8b585b5bdd5b9d60821b604482015290519081900360640190fd5b730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b031663a0712d68826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156106d457600080fd5b505af11580156106e8573d6000803e3d6000fd5b5061070e9250730309c98b1bffa350bcb3f9fb9780970ca32a5060915033905083610788565b979650505050505050565b6000546001600160a01b03163314610766576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107da908490610d22565b505050565b604080516002808252606080830184526000939092919060208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28160008151811061082757fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006060730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b031663db5792576040518163ffffffff1660e01b815260040160006040518083038186803b15801561089857600080fd5b505afa1580156108ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160409081528110156108d557600080fd5b8101908080516040519392919084600160201b8211156108f457600080fd5b90830190602082018581111561090957600080fd5b82518660208202830111600160201b8211171561092557600080fd5b82525081516020918201928201910280838360005b8381101561095257818101518382015260200161093a565b5050505090500160405260200180516040519392919084600160201b82111561097a57600080fd5b90830190602082018581111561098f57600080fd5b82518660208202830111600160201b821117156109ab57600080fd5b82525081516020918201928201910280838360005b838110156109d85781810151838201526020016109c0565b505050509050016040525050509150506000730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a3757600080fd5b505afa158015610a4b573d6000803e3d6000fd5b505050506040513d6020811015610a6157600080fd5b5051905047600080805b8c51811015610d0f57610aac8a610aa6670de0b6b3a76400008e8581518110610a9057fe5b6020026020010151610dd390919063ffffffff16565b90610e35565b9250610ad3620f4240610acd69d3c21bcecceda1000000610aa68888610dd3565b90610dd3565b91508b8181518110610ae157fe5b602002602001015188600181518110610af657fe5b60200260200101906001600160a01b031690816001600160a01b031681525050610b328c8281518110610b2557fe5b6020026020010151610e9c565b6001600160a01b0316637ff36ab58360008b3042603c016040518663ffffffff1660e01b81526004018085815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015610bb3578181015183820152602001610b9b565b50505050905001955050505050506000604051808303818588803b158015610bda57600080fd5b505af1158015610bee573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526020811015610c1857600080fd5b8101908080516040519392919084600160201b821115610c3757600080fd5b908301906020820185811115610c4c57600080fd5b82518660208202830111600160201b82111715610c6857600080fd5b82525081516020918201928201910280838360005b83811015610c95578181015183820152602001610c7d565b5050505090500160405250505050610cd38c8281518110610cb257fe5b60200260200101518e8381518110610cc657fe5b6020026020010151610f6f565b610d058d8281518110610ce257fe5b602002602001015186888481518110610cf757fe5b60200260200101518a611022565b9650600101610a6b565b509496505050505050505b949350505050565b6060610d77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661113a9092919063ffffffff16565b8051909150156107da57808060200190516020811015610d9657600080fd5b50516107da5760405162461bcd60e51b815260040180806020018281038252602a815260200180611b62602a913960400191505060405180910390fd5b600082610de257506000610e2f565b82820282848281610def57fe5b0414610e2c5760405162461bcd60e51b8152600401808060200182810382526021815260200180611b416021913960400191505060405180910390fd5b90505b92915050565b6000808211610e8b576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610e9457fe5b049392505050565b60006001600160a01b03821673dd974d5c2e2928dea5f71b9825b8b646686bd2001480610ee557506001600160a01b03821673bbbbca6a901c926f240b89eacb641d8aec7aeafd145b80610f0c57506001600160a01b03821673ba100000625a3754423978a60c9317c58a424e3d145b80610f3357506001600160a01b03821673a3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2145b15610f535750737a250d5630b4cf539739df2c5dacb4c659f2488d610f6a565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b919050565b806001600160a01b0316826001600160a01b03161415610f8e5761101e565b6001600160a01b0381167335a18000230da775cac24873d00ff85bccded5501480610fd557506001600160a01b0381167370e36f6bf80a52b3b46b3af8e106cc0ed743e8e4145b15610fe857610fe382611153565b61101e565b6001600160a01b038116738798249c2e607446efb7ad49ec89dd1865ff4272141561101557610fe3611383565b61101e82611521565b5050565b600080856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561107257600080fd5b505afa158015611086573d6000803e3d6000fd5b505050506040513d602081101561109c57600080fd5b505190506110c96001600160a01b038716730309c98b1bffa350bcb3f9fb9780970ca32a5060600061173d565b6110f16001600160a01b038716730309c98b1bffa350bcb3f9fb9780970ca32a50608361173d565b8261110c5761110484610aa68784610dd3565b915050610d1a565b600061111c85610aa68885610dd3565b90508381101561112f579150610d1a9050565b509195945050505050565b60606111498484600085611850565b90505b9392505050565b6001600160a01b038116731f9840a85d5af5bf1d1762f925bdaddc4201f984148061119a57506001600160a01b03811673c00e94cb662c3520282e6f5717214004a7f26888145b6111de576040805162461bcd60e51b815260206004820152601060248201526f10bb30b634b216ba3796b1ba37b5b2b760811b604482015290519081900360640190fd5b60006111e9826119a1565b90506000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561123a57600080fd5b505afa15801561124e573d6000803e3d6000fd5b505050506040513d602081101561126457600080fd5b50519050806112a7576040805162461bcd60e51b815260206004820152600a602482015269085d1bdad95b8b58985b60b21b604482015290519081900360640190fd5b6112bc6001600160a01b03841683600061173d565b6112d06001600160a01b038416838361173d565b816001600160a01b031663a0712d68826040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561131657600080fd5b505af115801561132a573d6000803e3d6000fd5b505050506040513d602081101561134057600080fd5b5051156107da576040805162461bcd60e51b815260206004820152600c60248201526b0858dd1bdad95b8b5b5a5b9d60a21b604482015290519081900360640190fd5b604080516370a0823160e01b81523060048201529051600091736b3595068778dd592e39a122f4f5a5cf09c90fe2916370a0823191602480820192602092909190829003018186803b1580156113d857600080fd5b505afa1580156113ec573d6000803e3d6000fd5b505050506040513d602081101561140257600080fd5b5051905080611445576040805162461bcd60e51b815260206004820152600a602482015269085cdd5cda1a4b58985b60b21b604482015290519081900360640190fd5b611479736b3595068778dd592e39a122f4f5a5cf09c90fe2738798249c2e607446efb7ad49ec89dd1865ff4272600061173d565b6114ac736b3595068778dd592e39a122f4f5a5cf09c90fe2738798249c2e607446efb7ad49ec89dd1865ff42728361173d565b738798249c2e607446efb7ad49ec89dd1865ff42726001600160a01b031663a59f3e0c826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561150657600080fd5b505af115801561151a573d6000803e3d6000fd5b5050505050565b6001600160a01b038116731f9840a85d5af5bf1d1762f925bdaddc4201f9841480159061156b57506001600160a01b03811673c00e94cb662c3520282e6f5717214004a7f2688814155b6115ad576040805162461bcd60e51b815260206004820152600e60248201526d06e6f2d756e692d6f722d636f6d760941b604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156115fc57600080fd5b505afa158015611610573d6000803e3d6000fd5b505050506040513d602081101561162657600080fd5b5051905080611669576040805162461bcd60e51b815260206004820152600a602482015269085d1bdad95b8b58985b60b21b604482015290519081900360640190fd5b6116926001600160a01b038316733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3600061173d565b6116ba6001600160a01b038316733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d38361173d565b60408051636968703360e11b81526001600160a01b038416600482015260248101839052600060448201819052915173398ec7346dcd622edc5ae82352f02be94c62d1199263d2d0e066926064808201939182900301818387803b15801561172157600080fd5b505af1158015611735573d6000803e3d6000fd5b505050505050565b8015806117c3575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561179557600080fd5b505afa1580156117a9573d6000803e3d6000fd5b505050506040513d60208110156117bf57600080fd5b5051155b6117fe5760405162461bcd60e51b8152600401808060200182810382526036815260200180611b8c6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526107da908490610d22565b6060824710156118915760405162461bcd60e51b8152600401808060200182810382526026815260200180611b1b6026913960400191505060405180910390fd5b61189a85611a70565b6118eb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061192a5780518252601f19909201916020918201910161190b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461198c576040519150601f19603f3d011682016040523d82523d6000602084013e611991565b606091505b509150915061070e828286611a76565b60006001600160a01b038216731f9840a85d5af5bf1d1762f925bdaddc4201f98414156119e357507335a18000230da775cac24873d00ff85bccded550610f6a565b6001600160a01b03821673c00e94cb662c3520282e6f5717214004a7f268881415611a2357507370e36f6bf80a52b3b46b3af8e106cc0ed743e8e4610f6a565b6040805162461bcd60e51b815260206004820152601a60248201527f21737570706f727465642d746f6b656e2d746f2d63746f6b656e000000000000604482015290519081900360640190fd5b3b151590565b60608315611a8557508161114c565b825115611a955782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611adf578181015183820152602001611ac7565b50505050905090810190601f168015611b0c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220759a3a099a09b23eb65428b6a86c80440adc72aeebf15e9d2d38097b6454794d64736f6c634300070300330000000000000000000000002bf3cc8fa6f067cc1741c7467c8ee9f00e837757
Deployed Bytecode
0x6080604052600436106100595760003560e01c80632272c18f146100655780635aa6e675146100965780639e8c708e146100ab578063c2998238146100e0578063cc6918881461018e578063cfad57a21461035057610060565b3661006057005b600080fd5b34801561007157600080fd5b5061007a610383565b604080516001600160a01b039092168252519081900360200190f35b3480156100a257600080fd5b5061007a61039b565b3480156100b757600080fd5b506100de600480360360208110156100ce57600080fd5b50356001600160a01b03166103aa565b005b3480156100ec57600080fd5b506100de6004803603602081101561010357600080fd5b810190602081018135600160201b81111561011d57600080fd5b82018360208201111561012f57600080fd5b803590602001918460208302840111600160201b8311171561015057600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061048a945050505050565b61033e600480360360c08110156101a457600080fd5b810190602081018135600160201b8111156101be57600080fd5b8201836020820111156101d057600080fd5b803590602001918460208302840111600160201b831117156101f157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561024057600080fd5b82018360208201111561025257600080fd5b803590602001918460208302840111600160201b8311171561027357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156102c257600080fd5b8201836020820111156102d457600080fd5b803590602001918460208302840111600160201b831117156102f557600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602081013590604001356105e1565b60408051918252519081900360200190f35b34801561035c57600080fd5b506100de6004803603602081101561037357600080fd5b50356001600160a01b0316610719565b730309c98b1bffa350bcb3f9fb9780970ca32a506081565b6000546001600160a01b031681565b6000546001600160a01b031633146103f7576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600054604080516370a0823160e01b81523060048201529051610487926001600160a01b0390811692908516916370a0823191602480820192602092909190829003018186803b15801561044a57600080fd5b505afa15801561045e573d6000803e3d6000fd5b505050506040513d602081101561047457600080fd5b50516001600160a01b0384169190610788565b50565b604051631853304760e31b8152602060048201818152835160248401528351733d9819210a31b4961b30ef54be2aed79b9c9cd3b9363c299823893869392839260440191808601910280838360005b838110156104f15781810151838201526020016104d9565b5050505090500192505050600060405180830381600087803b15801561051657600080fd5b505af115801561052a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561055357600080fd5b8101908080516040519392919084600160201b82111561057257600080fd5b90830190602082018581111561058757600080fd5b82518660208202830111600160201b821117156105a357600080fd5b82525081516020918201928201910280838360005b838110156105d05781810151838201526020016105b8565b505050509050016040525050505050565b600081421115610622576040805162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b604482015290519081900360640190fd5b6000610630888888886107df565b90508381101561067a576040805162461bcd60e51b815260206004820152601060248201526f085b5a5b9d0b5b5a5b8b585b5bdd5b9d60821b604482015290519081900360640190fd5b730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b031663a0712d68826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156106d457600080fd5b505af11580156106e8573d6000803e3d6000fd5b5061070e9250730309c98b1bffa350bcb3f9fb9780970ca32a5060915033905083610788565b979650505050505050565b6000546001600160a01b03163314610766576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107da908490610d22565b505050565b604080516002808252606080830184526000939092919060208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28160008151811061082757fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006060730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b031663db5792576040518163ffffffff1660e01b815260040160006040518083038186803b15801561089857600080fd5b505afa1580156108ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160409081528110156108d557600080fd5b8101908080516040519392919084600160201b8211156108f457600080fd5b90830190602082018581111561090957600080fd5b82518660208202830111600160201b8211171561092557600080fd5b82525081516020918201928201910280838360005b8381101561095257818101518382015260200161093a565b5050505090500160405260200180516040519392919084600160201b82111561097a57600080fd5b90830190602082018581111561098f57600080fd5b82518660208202830111600160201b821117156109ab57600080fd5b82525081516020918201928201910280838360005b838110156109d85781810151838201526020016109c0565b505050509050016040525050509150506000730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a3757600080fd5b505afa158015610a4b573d6000803e3d6000fd5b505050506040513d6020811015610a6157600080fd5b5051905047600080805b8c51811015610d0f57610aac8a610aa6670de0b6b3a76400008e8581518110610a9057fe5b6020026020010151610dd390919063ffffffff16565b90610e35565b9250610ad3620f4240610acd69d3c21bcecceda1000000610aa68888610dd3565b90610dd3565b91508b8181518110610ae157fe5b602002602001015188600181518110610af657fe5b60200260200101906001600160a01b031690816001600160a01b031681525050610b328c8281518110610b2557fe5b6020026020010151610e9c565b6001600160a01b0316637ff36ab58360008b3042603c016040518663ffffffff1660e01b81526004018085815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015610bb3578181015183820152602001610b9b565b50505050905001955050505050506000604051808303818588803b158015610bda57600080fd5b505af1158015610bee573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526020811015610c1857600080fd5b8101908080516040519392919084600160201b821115610c3757600080fd5b908301906020820185811115610c4c57600080fd5b82518660208202830111600160201b82111715610c6857600080fd5b82525081516020918201928201910280838360005b83811015610c95578181015183820152602001610c7d565b5050505090500160405250505050610cd38c8281518110610cb257fe5b60200260200101518e8381518110610cc657fe5b6020026020010151610f6f565b610d058d8281518110610ce257fe5b602002602001015186888481518110610cf757fe5b60200260200101518a611022565b9650600101610a6b565b509496505050505050505b949350505050565b6060610d77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661113a9092919063ffffffff16565b8051909150156107da57808060200190516020811015610d9657600080fd5b50516107da5760405162461bcd60e51b815260040180806020018281038252602a815260200180611b62602a913960400191505060405180910390fd5b600082610de257506000610e2f565b82820282848281610def57fe5b0414610e2c5760405162461bcd60e51b8152600401808060200182810382526021815260200180611b416021913960400191505060405180910390fd5b90505b92915050565b6000808211610e8b576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610e9457fe5b049392505050565b60006001600160a01b03821673dd974d5c2e2928dea5f71b9825b8b646686bd2001480610ee557506001600160a01b03821673bbbbca6a901c926f240b89eacb641d8aec7aeafd145b80610f0c57506001600160a01b03821673ba100000625a3754423978a60c9317c58a424e3d145b80610f3357506001600160a01b03821673a3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2145b15610f535750737a250d5630b4cf539739df2c5dacb4c659f2488d610f6a565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b919050565b806001600160a01b0316826001600160a01b03161415610f8e5761101e565b6001600160a01b0381167335a18000230da775cac24873d00ff85bccded5501480610fd557506001600160a01b0381167370e36f6bf80a52b3b46b3af8e106cc0ed743e8e4145b15610fe857610fe382611153565b61101e565b6001600160a01b038116738798249c2e607446efb7ad49ec89dd1865ff4272141561101557610fe3611383565b61101e82611521565b5050565b600080856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561107257600080fd5b505afa158015611086573d6000803e3d6000fd5b505050506040513d602081101561109c57600080fd5b505190506110c96001600160a01b038716730309c98b1bffa350bcb3f9fb9780970ca32a5060600061173d565b6110f16001600160a01b038716730309c98b1bffa350bcb3f9fb9780970ca32a50608361173d565b8261110c5761110484610aa68784610dd3565b915050610d1a565b600061111c85610aa68885610dd3565b90508381101561112f579150610d1a9050565b509195945050505050565b60606111498484600085611850565b90505b9392505050565b6001600160a01b038116731f9840a85d5af5bf1d1762f925bdaddc4201f984148061119a57506001600160a01b03811673c00e94cb662c3520282e6f5717214004a7f26888145b6111de576040805162461bcd60e51b815260206004820152601060248201526f10bb30b634b216ba3796b1ba37b5b2b760811b604482015290519081900360640190fd5b60006111e9826119a1565b90506000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561123a57600080fd5b505afa15801561124e573d6000803e3d6000fd5b505050506040513d602081101561126457600080fd5b50519050806112a7576040805162461bcd60e51b815260206004820152600a602482015269085d1bdad95b8b58985b60b21b604482015290519081900360640190fd5b6112bc6001600160a01b03841683600061173d565b6112d06001600160a01b038416838361173d565b816001600160a01b031663a0712d68826040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561131657600080fd5b505af115801561132a573d6000803e3d6000fd5b505050506040513d602081101561134057600080fd5b5051156107da576040805162461bcd60e51b815260206004820152600c60248201526b0858dd1bdad95b8b5b5a5b9d60a21b604482015290519081900360640190fd5b604080516370a0823160e01b81523060048201529051600091736b3595068778dd592e39a122f4f5a5cf09c90fe2916370a0823191602480820192602092909190829003018186803b1580156113d857600080fd5b505afa1580156113ec573d6000803e3d6000fd5b505050506040513d602081101561140257600080fd5b5051905080611445576040805162461bcd60e51b815260206004820152600a602482015269085cdd5cda1a4b58985b60b21b604482015290519081900360640190fd5b611479736b3595068778dd592e39a122f4f5a5cf09c90fe2738798249c2e607446efb7ad49ec89dd1865ff4272600061173d565b6114ac736b3595068778dd592e39a122f4f5a5cf09c90fe2738798249c2e607446efb7ad49ec89dd1865ff42728361173d565b738798249c2e607446efb7ad49ec89dd1865ff42726001600160a01b031663a59f3e0c826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561150657600080fd5b505af115801561151a573d6000803e3d6000fd5b5050505050565b6001600160a01b038116731f9840a85d5af5bf1d1762f925bdaddc4201f9841480159061156b57506001600160a01b03811673c00e94cb662c3520282e6f5717214004a7f2688814155b6115ad576040805162461bcd60e51b815260206004820152600e60248201526d06e6f2d756e692d6f722d636f6d760941b604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156115fc57600080fd5b505afa158015611610573d6000803e3d6000fd5b505050506040513d602081101561162657600080fd5b5051905080611669576040805162461bcd60e51b815260206004820152600a602482015269085d1bdad95b8b58985b60b21b604482015290519081900360640190fd5b6116926001600160a01b038316733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3600061173d565b6116ba6001600160a01b038316733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d38361173d565b60408051636968703360e11b81526001600160a01b038416600482015260248101839052600060448201819052915173398ec7346dcd622edc5ae82352f02be94c62d1199263d2d0e066926064808201939182900301818387803b15801561172157600080fd5b505af1158015611735573d6000803e3d6000fd5b505050505050565b8015806117c3575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561179557600080fd5b505afa1580156117a9573d6000803e3d6000fd5b505050506040513d60208110156117bf57600080fd5b5051155b6117fe5760405162461bcd60e51b8152600401808060200182810382526036815260200180611b8c6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526107da908490610d22565b6060824710156118915760405162461bcd60e51b8152600401808060200182810382526026815260200180611b1b6026913960400191505060405180910390fd5b61189a85611a70565b6118eb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061192a5780518252601f19909201916020918201910161190b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461198c576040519150601f19603f3d011682016040523d82523d6000602084013e611991565b606091505b509150915061070e828286611a76565b60006001600160a01b038216731f9840a85d5af5bf1d1762f925bdaddc4201f98414156119e357507335a18000230da775cac24873d00ff85bccded550610f6a565b6001600160a01b03821673c00e94cb662c3520282e6f5717214004a7f268881415611a2357507370e36f6bf80a52b3b46b3af8e106cc0ed743e8e4610f6a565b6040805162461bcd60e51b815260206004820152601a60248201527f21737570706f727465642d746f6b656e2d746f2d63746f6b656e000000000000604482015290519081900360640190fd5b3b151590565b60608315611a8557508161114c565b825115611a955782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611adf578181015183820152602001611ac7565b50505050905090810190601f168015611b0c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220759a3a099a09b23eb65428b6a86c80440adc72aeebf15e9d2d38097b6454794d64736f6c63430007030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002bf3cc8fa6f067cc1741c7467c8ee9f00e837757
-----Decoded View---------------
Arg [0] : _governance (address): 0x2bF3cC8Fa6F067cc1741c7467C8Ee9F00e837757
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002bf3cc8fa6f067cc1741c7467c8ee9f00e837757
Deployed Bytecode Sourcemap
494:6639:15:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;604:78;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;604:78:15;;;;;;;;;;;;;;689:25;;;;;;;;;;;;;:::i;1293:150::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1293:150:15;-1:-1:-1;;;;;1293:150:15;;:::i;:::-;;2674:121:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2674:121:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2674:121:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2674:121:3;;-1:-1:-1;2674:121:3;;-1:-1:-1;;;;;2674:121:3:i;2064:760:15:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2064:760:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2064:760:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2064:760:15;;;;;;;;-1:-1:-1;2064:760:15;;-1:-1:-1;;;;;2064:760:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2064:760:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2064:760:15;;;;;;;;-1:-1:-1;2064:760:15;;-1:-1:-1;;;;;2064:760:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2064:760:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2064:760:15;;-1:-1:-1;;2064:760:15;;;-1:-1:-1;;;2064:760:15;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1194:93;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1194:93:15;-1:-1:-1;;;;;1194:93:15;;:::i;604:78::-;639:42;604:78;:::o;689:25::-;;;-1:-1:-1;;;;;689:25:15;;:::o;1293:150::-;1105:10;;-1:-1:-1;;;;;1105:10:15;1091;:24;1083:48;;;;;-1:-1:-1;;;1083:48:15;;;;;;;;;;;;-1:-1:-1;;;1083:48:15;;;;;;;;;;;;;;;1384:10:::1;::::0;1396:39:::1;::::0;;-1:-1:-1;;;1396:39:15;;1429:4:::1;1396:39;::::0;::::1;::::0;;;1356:80:::1;::::0;-1:-1:-1;;;;;1384:10:15;;::::1;::::0;1396:24;;::::1;::::0;::::1;::::0;:39;;;;;::::1;::::0;;;;;;;;;:24;:39;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;1396:39:15;-1:-1:-1;;;;;1356:27:15;::::1;::::0;:80;:27:::1;:80::i;:::-;1293:150:::0;:::o;2674:121:3:-;2740:48;;-1:-1:-1;;;2740:48:3;;;;;;;;;;;;;;;;;969:42;;2740:38;;2779:8;;2740:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2740:48:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2740:48:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2740:48:3;;;;;;;;;;;;-1:-1:-1;2740:48:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2674:121;:::o;2064:760:15:-;2330:7;2376:8;2357:15;:27;;2349:47;;;;;-1:-1:-1;;;2349:47:15;;;;;;;;;;;;-1:-1:-1;;;2349:47:15;;;;;;;;;;;;;;;2439:18;2472:106;2512:11;2525;2538:25;2565:12;2472:39;:106::i;:::-;2439:139;;2611:13;2597:10;:27;;2589:56;;;;;-1:-1:-1;;;2589:56:15;;;;;;;;;;;;-1:-1:-1;;;2589:56:15;;;;;;;;;;;;;;;639:42;-1:-1:-1;;;;;2700:9:15;;2710:10;2700:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2731:58:15;;-1:-1:-1;639:42:15;;-1:-1:-1;2766:10:15;;-1:-1:-1;2778:10:15;2731:34;:58::i;:::-;2807:10;2064:760;-1:-1:-1;;;;;;;2064:760:15:o;1194:93::-;1105:10;;-1:-1:-1;;;;;1105:10:15;1091;:24;1083:48;;;;;-1:-1:-1;;;1083:48:15;;;;;;;;;;;;-1:-1:-1;;;1083:48:15;;;;;;;;;;;;;;;1256:10:::1;:24:::0;;-1:-1:-1;;;;;;1256:24:15::1;-1:-1:-1::0;;;;;1256:24:15;;;::::1;::::0;;;::::1;::::0;;1194:93::o;685:175:13:-;794:58;;;-1:-1:-1;;;;;794:58:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;794:58:13;-1:-1:-1;;;794:58:13;;;767:86;;787:5;;767:19;:86::i;:::-;685:175;;;:::o;3899:1904:15:-;4199:16;;;4213:1;4199:16;;;4175:21;4199:16;;;;;4140:7;;4175:21;;4199:16;4213:1;4199:16;;;;;;;;;;-1:-1:-1;4199:16:15;4175:40;;1490:42:3;4225:4:15;4230:1;4225:7;;;;;;;;;;;;;:14;-1:-1:-1;;;;;4225:14:15;;;-1:-1:-1;;;;;4225:14:15;;;;;4297:18;4365:37;639:42;-1:-1:-1;;;;;4406:25:15;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4406:27:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4406:27:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4406:27:15;;;;;;;;;;;;-1:-1:-1;4406:27:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4406:27:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4406:27:15;;;;;;;;;;;;-1:-1:-1;4406:27:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4362:71;;;4473:25;639:42;-1:-1:-1;;;;;4501:16:15;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4501:18:15;;-1:-1:-1;4581:21:15;4554:24;;;4685:1074;4709:11;:18;4705:1;:22;4685:1074;;;4760:66;4808:17;4760:43;4798:4;4760:30;4791:1;4760:33;;;;;;;;;;;;;;:37;;:43;;;;:::i;:::-;:47;;:66::i;:::-;4752:74;-1:-1:-1;4960:46:15;5002:3;4960:37;4992:4;4960:27;:16;4752:74;4960:20;:27::i;:37::-;:41;;:46::i;:::-;4948:58;;5035:11;5047:1;5035:14;;;;;;;;;;;;;;5025:4;5030:1;5025:7;;;;;;;;;;;;;:24;-1:-1:-1;;;;;5025:24:15;;;-1:-1:-1;;;;;5025:24:15;;;;;5086:41;5112:11;5124:1;5112:14;;;;;;;;;;;;;;5086:25;:41::i;:::-;-1:-1:-1;;;;;5067:83:15;;5159:9;5192:1;5215:4;5249;5276:15;5294:2;5276:20;5067:247;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5067:247:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5067:247:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5067:247:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5067:247:15;;;;;;;;;;;;-1:-1:-1;5067:247:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5399:45;5413:11;5425:1;5413:14;;;;;;;;;;;;;;5429:11;5441:1;5429:14;;;;;;;;;;;;;;5399:13;:45::i;:::-;5540:204;5596:11;5608:1;5596:14;;;;;;;;;;;;;;5632:17;5671:20;5692:1;5671:23;;;;;;;;;;;;;;5716:10;5540:34;:204::i;:::-;5527:217;-1:-1:-1;4729:3:15;;4685:1074;;;-1:-1:-1;5786:10:15;;-1:-1:-1;;;;;;;3899:1904:15;;;;;;;:::o;2948:751:13:-;3367:23;3393:69;3421:4;3393:69;;;;;;;;;;;;;;;;;3401:5;-1:-1:-1;;;;;3393:27:13;;;:69;;;;;:::i;:::-;3476:17;;3367:95;;-1:-1:-1;3476:21:13;3472:221;;3616:10;3605:30;;;;;;;;;;;;;;;-1:-1:-1;3605:30:13;3597:85;;;;-1:-1:-1;;;3597:85:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3538:215:14;3596:7;3619:6;3615:20;;-1:-1:-1;3634:1:14;3627:8;;3615:20;3657:5;;;3661:1;3657;:5;:1;3680:5;;;;;:10;3672:56;;;;-1:-1:-1;;;3672:56:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3745:1;-1:-1:-1;3538:215:14;;;;;:::o;4217:150::-;4275:7;4306:1;4302;:5;4294:44;;;;;-1:-1:-1;;;4294:44:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;4359:1;4355;:5;;;;;;;4217:150;-1:-1:-1;;;4217:150:14:o;2910:488:15:-;2984:7;-1:-1:-1;;;;;3248:13:15;;2091:42:3;3248:13:15;;:30;;-1:-1:-1;;;;;;3265:13:15;;2162:42:3;3265:13:15;3248:30;:47;;;-1:-1:-1;;;;;;3282:13:15;;2233:42:3;3282:13:15;3248:47;:64;;;-1:-1:-1;;;;;;3299:13:15;;2376:42:3;3299:13:15;3248:64;3244:114;;;-1:-1:-1;1156:42:3;3328:19:15;;3244:114;-1:-1:-1;1076:42:3;2910:488:15;;;;:::o;2939:383:3:-;3042:11;-1:-1:-1;;;;;3027:26:3;:11;-1:-1:-1;;;;;3027:26:3;;3023:63;;;3069:7;;3023:63;-1:-1:-1;;;;;3100:19:3;;1244:42;3100:19;;:43;;-1:-1:-1;;;;;;3123:20:3;;1317:42;3123:20;3100:43;3096:220;;;3159:22;3169:11;3159:9;:22::i;:::-;3096:220;;;-1:-1:-1;;;;;3202:21:3;;1405:42;3202:21;3198:118;;;3239:11;:9;:11::i;3198:118::-;3281:24;3293:11;3281;:24::i;:::-;2939:383;;:::o;6259:872:15:-;6458:7;6477:21;6508:10;-1:-1:-1;;;;;6501:28:15;;6538:4;6501:43;;;;;;;;;;;;;-1:-1:-1;;;;;6501:43:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6501:43:15;;-1:-1:-1;6555:48:15;-1:-1:-1;;;;;6555:30:15;;639:42;6601:1;6555:30;:48::i;:::-;6613:60;-1:-1:-1;;;;;6613:30:15;;639:42;6659:13;6613:30;:60::i;:::-;6823:18;6819:117;;6864:61;6905:19;6864:36;:17;6886:13;6864:21;:36::i;:61::-;6857:68;;;;;6819:117;6946:12;6961:61;7002:19;6961:36;:17;6983:13;6961:21;:36::i;:61::-;6946:76;;7043:13;7036:4;:20;7032:62;;;7079:4;-1:-1:-1;7072:11:15;;-1:-1:-1;7072:11:15;7032:62;-1:-1:-1;7111:13:15;;6259:872;-1:-1:-1;;;;;6259:872:15:o;3581:193:0:-;3684:12;3715:52;3737:6;3745:4;3751:1;3754:12;3715:21;:52::i;:::-;3708:59;;3581:193;;;;;;:::o;3446:506:3:-;-1:-1:-1;;;;;3554:13:3;;1664:42;3554:13;;:31;;-1:-1:-1;;;;;;3571:14:3;;1736:42;3571:14;3554:31;3546:60;;;;;-1:-1:-1;;;3546:60:3;;;;;;;;;;;;-1:-1:-1;;;3546:60:3;;;;;;;;;;;;;;;3617:15;3635:25;3653:6;3635:17;:25::i;:::-;3617:43;;3670:15;3695:6;-1:-1:-1;;;;;3688:24:3;;3721:4;3688:39;;;;;;;;;;;;;-1:-1:-1;;;;;3688:39:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3688:39:3;;-1:-1:-1;3746:11:3;3738:34;;;;;-1:-1:-1;;;3738:34:3;;;;;;;;;;;;-1:-1:-1;;;3738:34:3;;;;;;;;;;;;;;;3783:38;-1:-1:-1;;;;;3783:26:3;;3810:7;3819:1;3783:26;:38::i;:::-;3831:44;-1:-1:-1;;;;;3831:26:3;;3858:7;3867;3831:26;:44::i;:::-;3901:7;-1:-1:-1;;;;;3893:21:3;;3915:7;3893:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3893:30:3;:35;3885:60;;;;;-1:-1:-1;;;3885:60:3;;;;;;;;;;;;-1:-1:-1;;;3885:60:3;;;;;;;;;;;;;;4879:288;4937:38;;;-1:-1:-1;;;4937:38:3;;4969:4;4937:38;;;;;;4919:15;;2449:42;;4937:23;;:38;;;;;;;;;;;;;;;2449:42;4937:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4937:38:3;;-1:-1:-1;4993:11:3;4985:34;;;;;-1:-1:-1;;;4985:34:3;;;;;;;;;;;;-1:-1:-1;;;4985:34:3;;;;;;;;;;;;;;;5030:36;2449:42;1405;5064:1;5030:25;:36::i;:::-;5076:42;2449;1405;5110:7;5076:25;:42::i;:::-;1405;-1:-1:-1;;;;;5128:23:3;;5152:7;5128:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4879:288;:::o;4062:432::-;-1:-1:-1;;;;;4126:13:3;;1664:42;4126:13;;;;:31;;-1:-1:-1;;;;;;4143:14:3;;1736:42;4143:14;;4126:31;4118:58;;;;;-1:-1:-1;;;4118:58:3;;;;;;;;;;;;-1:-1:-1;;;4118:58:3;;;;;;;;;;;;;;;4187:15;4212:6;-1:-1:-1;;;;;4205:24:3;;4238:4;4205:39;;;;;;;;;;;;;-1:-1:-1;;;;;4205:39:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4205:39:3;;-1:-1:-1;4263:11:3;4255:34;;;;;-1:-1:-1;;;4255:34:3;;;;;;;;;;;;-1:-1:-1;;;4255:34:3;;;;;;;;;;;;;;;4300:51;-1:-1:-1;;;;;4300:26:3;;873:42;4349:1;4300:26;:51::i;:::-;4361:57;-1:-1:-1;;;;;4361:26:3;;873:42;4410:7;4361:26;:57::i;:::-;4428:59;;;-1:-1:-1;;;4428:59:3;;-1:-1:-1;;;;;4428:59:3;;;;;;;;;;;;4485:1;4428:59;;;;;;;;785:42;;4428:39;;:59;;;;;;;;;;;4485:1;785:42;4428:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4062:432;;:::o;1329:613:13:-;1694:10;;;1693:62;;-1:-1:-1;1710:39:13;;;-1:-1:-1;;;1710:39:13;;1734:4;1710:39;;;;-1:-1:-1;;;;;1710:39:13;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1710:39:13;:44;1693:62;1685:150;;;;-1:-1:-1;;;1685:150:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1872:62;;;-1:-1:-1;;;;;1872:62:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1872:62:13;-1:-1:-1;;;1872:62:13;;;1845:90;;1865:5;;1845:19;:90::i;4608:523:0:-;4735:12;4792:5;4767:21;:30;;4759:81;;;;-1:-1:-1;;;4759:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:18;4869:6;4858:10;:18::i;:::-;4850:60;;;;;-1:-1:-1;;;4850:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:12;4995:23;5022:6;-1:-1:-1;;;;;5022:11:0;5042:5;5050:4;5022:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5022:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4980:75;;;;5072:52;5090:7;5099:10;5111:12;5072:17;:52::i;4574:258:3:-;4640:7;-1:-1:-1;;;;;4663:13:3;;1664:42;4663:13;4659:55;;;-1:-1:-1;1244:42:3;4692:11;;4659:55;-1:-1:-1;;;;;4727:14:3;;1736:42;4727:14;4723:57;;;-1:-1:-1;1317:42:3;4757:12;;4723:57;4789:36;;;-1:-1:-1;;;4789:36:3;;;;;;;;;;;;;;;;;;;;;;;;;;;726:413:0;1086:20;1124:8;;;726:413::o;7091:725::-;7206:12;7234:7;7230:580;;;-1:-1:-1;7264:10:0;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:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
ipfs://759a3a099a09b23eb65428b6a86c80440adc72aeebf15e9d2d38097b6454794d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 63.09% | $2,621.89 | 0.0336 | $88.21 | |
ETH | 17.47% | $0.146396 | 166.8774 | $24.43 | |
ETH | 10.26% | $2.21 | 6.4904 | $14.34 | |
ETH | 5.56% | $1.65 | 4.7094 | $7.77 | |
ETH | 1.39% | $0.961679 | 2.0243 | $1.95 | |
ETH | 1.14% | $0.508265 | 3.1236 | $1.59 | |
ETH | 0.86% | $0.14788 | 8.1026 | $1.2 | |
ETH | 0.24% | $2.48 | 0.1359 | $0.3369 | |
ETH | <0.01% | $3,176.95 | 0.0000000000069561 | <$0.000001 |
Loading...
Loading
[ Download: CSV Export ]
[ 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.