Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 12 from a total of 12 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw From Na... | 21258479 | 2 days ago | IN | 0 ETH | 0.00148443 | ||||
Withdraw From Na... | 21230718 | 6 days ago | IN | 0 ETH | 0.00323147 | ||||
Withdraw From Na... | 21191819 | 11 days ago | IN | 0 ETH | 0.00275573 | ||||
Withdraw From Na... | 21191788 | 11 days ago | IN | 0 ETH | 0.00260615 | ||||
Withdraw From Na... | 21079947 | 27 days ago | IN | 0 ETH | 0.00226268 | ||||
Withdraw From Na... | 20960705 | 44 days ago | IN | 0 ETH | 0.0016319 | ||||
Withdraw From Na... | 20842744 | 60 days ago | IN | 0 ETH | 0.00640603 | ||||
Withdraw From Na... | 20770968 | 70 days ago | IN | 0 ETH | 0.00217975 | ||||
Withdraw From Na... | 20670971 | 84 days ago | IN | 0 ETH | 0.00092458 | ||||
Deposit Into Nat... | 20432151 | 117 days ago | IN | 0 ETH | 0.00115293 | ||||
Deposit Into Nat... | 20241782 | 144 days ago | IN | 0 ETH | 0.00117131 | ||||
0x60e06040 | 20182874 | 152 days ago | IN | 0 ETH | 0.00744017 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
21276858 | 14 mins ago | 3.07929908 ETH | ||||
21276536 | 1 hr ago | 1.39547516 ETH | ||||
21276364 | 1 hr ago | 0.41112275 ETH | ||||
21275189 | 5 hrs ago | 0.00100143 ETH | ||||
21274870 | 6 hrs ago | 1.12884327 ETH | ||||
21273889 | 10 hrs ago | 1.30240585 ETH | ||||
21273853 | 10 hrs ago | 0.06730471 ETH | ||||
21273816 | 10 hrs ago | 1.20980059 ETH | ||||
21273805 | 10 hrs ago | 67.01192303 ETH | ||||
21269158 | 26 hrs ago | 0.00000304 ETH | ||||
21263251 | 45 hrs ago | 0.00010862 ETH | ||||
21262023 | 2 days ago | 0.00051968 ETH | ||||
21258617 | 2 days ago | 0.75846678 ETH | ||||
21258609 | 2 days ago | 0.40067926 ETH | ||||
21258604 | 2 days ago | 1.5066143 ETH | ||||
21258601 | 2 days ago | 0.02610524 ETH | ||||
21258594 | 2 days ago | 1.41374081 ETH | ||||
21258589 | 2 days ago | 0.04313457 ETH | ||||
21258586 | 2 days ago | 1.34217281 ETH | ||||
21258479 | 2 days ago | 100 ETH | ||||
21258443 | 2 days ago | 0.08341449 ETH | ||||
21242851 | 4 days ago | 0.00000141 ETH | ||||
21236876 | 5 days ago | 0.00033828 ETH | ||||
21230837 | 6 days ago | 0.57787945 ETH | ||||
21230825 | 6 days ago | 3.19897557 ETH |
Loading...
Loading
Contract Name:
NativeLendingETHStrategy
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 10 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {StrategyV2} from "../strategies/StrategyV2.sol"; import {StrategyController} from "../strategies/StrategyController.sol"; import {IWETH9} from "../interfaces/IWETH9.sol"; import {IAquaLpToken} from "../interfaces/IAquaLpToken.sol"; contract NativeLendingETHStrategy is StrategyV2 { address public immutable LPTOKEN; IWETH9 public immutable WETH; event DepositIntoNative(uint256 amount); event WithdrawFromNativeByAmount(uint256 amount); event WithdrawFromNativeByShare(uint256 amount); constructor( address payable _controller, string memory _name, address _lptoken, address _weth ) StrategyV2(_controller, _name) { require(_lptoken != address(0) && _weth != address(0), "ZERO ADDRESS"); WETH = IWETH9(_weth); LPTOKEN = _lptoken; } // owner functions function depositIntoNative( uint256 _amount ) external onlyOwner returns (uint256 mintAmount) { require(_amount != 0, "Invalid 0 input"); uint256 beforeLPBalance = IAquaLpToken(LPTOKEN).balanceOf( address(this) ); WETH.deposit{value: _amount}(); WETH.approve(LPTOKEN, _amount); IAquaLpToken(LPTOKEN).mint(_amount); mintAmount = IAquaLpToken(LPTOKEN).balanceOf(address(this)) - beforeLPBalance; require(mintAmount != 0, "Invalid 0 output"); emit DepositIntoNative(mintAmount); } function withdrawFromNativeByAmount( uint256 _amount ) external onlyOwner returns (uint256 withdrawAmount) { require(_amount != 0, "Invalid 0 input"); uint256 beforeBalance = address(this).balance; IAquaLpToken(LPTOKEN).redeemUnderlying(_amount); WETH.withdraw(WETH.balanceOf(address(this))); withdrawAmount = address(this).balance - beforeBalance; emit WithdrawFromNativeByAmount(withdrawAmount); } function withdrawFromNativeByShare( uint256 _share ) external onlyOwner returns (uint256 withdrawAmount) { require(_share != 0, "Invalid 0 input"); uint256 beforeBalance = address(this).balance; IAquaLpToken(LPTOKEN).redeem(_share); WETH.withdraw(WETH.balanceOf(address(this))); withdrawAmount = address(this).balance - beforeBalance; emit WithdrawFromNativeByShare(withdrawAmount); } // public functions function getAllValue() public override returns (uint256 value) { value = getInvestedValue(); } function getInvestedValue() public override returns (uint256 value) { value = (IERC20(LPTOKEN).balanceOf(address(this)) * IAquaLpToken(LPTOKEN).exchangeRateCurrent()) / 1e18 + address(this).balance; } receive() external payable {} // controller functions function deposit() public payable override onlyController notAtSameBlock { require(msg.value != 0, "zero value"); latestUpdateTime = block.timestamp; } function withdraw( uint256 _amount ) public override onlyController notAtSameBlock returns (uint256 actualAmount) { actualAmount = _withdraw(_amount); } function instantWithdraw( uint256 _amount ) public override onlyController notAtSameBlock returns (uint256 actualAmount) { actualAmount = _withdraw(_amount); } function clear() public override onlyController returns (uint256 amount) { uint256 balance = address(this).balance; if (balance != 0) { TransferHelper.safeTransferETH(controller, balance); amount = balance; } } // internal function function _withdraw( uint256 _amount ) internal returns (uint256 actualAmount) { require(_amount != 0, "zero value"); actualAmount = _amount; TransferHelper.safeTransferETH(controller, actualAmount); latestUpdateTime = block.timestamp; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {StrategyController} from "../strategies/StrategyController.sol"; import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; abstract contract StrategyV2 is Ownable2Step { address payable public immutable controller; uint256 public latestUpdateTime; uint256 public bufferTime; string public name; modifier notAtSameBlock() { require( latestUpdateTime + bufferTime <= block.timestamp, "at the same block" ); _; } constructor(address payable _controller, string memory _name) { require(_controller != address(0), "ZERO ADDRESS"); controller = _controller; name = _name; } modifier onlyController() { require(controller == msg.sender, "not controller"); _; } function deposit() public payable virtual onlyController notAtSameBlock {} function withdraw( uint256 _amount ) public virtual onlyController notAtSameBlock returns (uint256 actualAmount) {} function instantWithdraw( uint256 _amount ) public virtual onlyController notAtSameBlock returns (uint256 actualAmount) {} function clear() public virtual onlyController returns (uint256 amount) {} function getAllValue() public virtual returns (uint256 value) {} function getPendingValue() public virtual returns (uint256 value) {} function getInvestedValue() public virtual returns (uint256 value) {} function setBufferTime(uint256 _time) external onlyOwner { bufferTime = _time; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import {Strategy} from "./Strategy.sol"; import {AssetsVault} from "../AssetsVault.sol"; contract StrategyController { using EnumerableSet for EnumerableSet.AddressSet; uint256 internal constant ONE_HUNDRED_PERCENT = 1e6; address public stoneVault; address payable public immutable assetsVault; EnumerableSet.AddressSet private strategies; mapping(address => uint256) public ratios; struct StrategyDiff { address strategy; bool isDeposit; uint256 amount; } modifier onlyVault() { require(stoneVault == msg.sender, "not vault"); _; } constructor( address payable _assetsVault, address[] memory _strategies, uint256[] memory _ratios ) { require(_assetsVault != address(0), "ZERO ADDRESS"); uint256 length = _strategies.length; for (uint256 i; i < length; i++) { require(_strategies[i] != address(0), "ZERO ADDRESS"); } stoneVault = msg.sender; assetsVault = _assetsVault; _initStrategies(_strategies, _ratios); } function forceWithdraw( uint256 _amount ) external onlyVault returns (uint256 actualAmount) { uint256 balanceBeforeRepay = address(this).balance; if (balanceBeforeRepay >= _amount) { _repayToVault(); actualAmount = _amount; } else { actualAmount = _forceWithdraw(_amount - balanceBeforeRepay) + balanceBeforeRepay; } } function setStrategies( address[] memory _strategies, uint256[] memory _ratios ) external onlyVault { _setStrategies(_strategies, _ratios); } function addStrategy(address _strategy) external onlyVault { require(!strategies.contains(_strategy), "already exist"); strategies.add(_strategy); } function rebaseStrategies( uint256 _in, uint256 _out ) external payable onlyVault { _rebase(_in, _out); } function destroyStrategy(address _strategy) external onlyVault { _destoryStrategy(_strategy); } function _rebase(uint256 _in, uint256 _out) internal { require(_in == 0 || _out == 0, "only deposit or withdraw"); if (_in != 0) { AssetsVault(assetsVault).withdraw(address(this), _in); } uint256 total = getAllStrategyValidValue(); if (total < _out) { total = 0; } else { total = total + _in - _out; } uint256 length = strategies.length(); StrategyDiff[] memory diffs = new StrategyDiff[](length); uint256 head; uint256 tail = length - 1; for (uint i; i < length; i++) { address strategy = strategies.at(i); if (ratios[strategy] == 0) { _clearStrategy(strategy, true); continue; } uint256 newPosition = (total * ratios[strategy]) / ONE_HUNDRED_PERCENT; uint256 position = getStrategyValidValue(strategy); if (newPosition < position) { diffs[head] = StrategyDiff( strategy, false, position - newPosition ); head++; } else if (newPosition > position) { diffs[tail] = StrategyDiff( strategy, true, newPosition - position ); if (tail != 0) { tail--; } } } length = diffs.length; for (uint256 i; i < length; i++) { StrategyDiff memory diff = diffs[i]; if (diff.amount == 0) { continue; } if (diff.isDeposit) { if (address(this).balance < diff.amount) { diff.amount = address(this).balance; } _depositToStrategy(diff.strategy, diff.amount); } else { _withdrawFromStrategy(diff.strategy, diff.amount); } } _repayToVault(); } function _repayToVault() internal { if (address(this).balance != 0) { TransferHelper.safeTransferETH(assetsVault, address(this).balance); } } function _depositToStrategy(address _strategy, uint256 _amount) internal { Strategy(_strategy).deposit{value: _amount}(); } function _withdrawFromStrategy( address _strategy, uint256 _amount ) internal { Strategy(_strategy).withdraw(_amount); } function _forceWithdraw( uint256 _amount ) internal returns (uint256 actualAmount) { uint256 length = strategies.length(); uint256 allRatios; for (uint i; i < length; i++) { address strategy = strategies.at(i); allRatios += ratios[strategy]; } for (uint i; i < length; i++) { address strategy = strategies.at(i); uint256 withAmount = (_amount * ratios[strategy]) / allRatios; if (withAmount != 0) { actualAmount = Strategy(strategy).instantWithdraw(withAmount) + actualAmount; } } _repayToVault(); } function getStrategyValue( address _strategy ) public returns (uint256 _value) { return Strategy(_strategy).getAllValue(); } function getStrategyValidValue( address _strategy ) public returns (uint256 _value) { return Strategy(_strategy).getInvestedValue(); } function getStrategyPendingValue( address _strategy ) public returns (uint256 _value) { return Strategy(_strategy).getPendingValue(); } function getAllStrategiesValue() public returns (uint256 _value) { uint256 length = strategies.length(); for (uint i; i < length; i++) { _value = _value + getStrategyValue(strategies.at(i)); } } function getAllStrategyValidValue() public returns (uint256 _value) { uint256 length = strategies.length(); for (uint i; i < length; i++) { _value = _value + getStrategyValidValue(strategies.at(i)); } } function getAllStrategyPendingValue() public returns (uint256 _value) { uint256 length = strategies.length(); for (uint i; i < length; i++) { _value = _value + getStrategyPendingValue(strategies.at(i)); } } function getStrategies() public view returns (address[] memory addrs, uint256[] memory portions) { uint256 length = strategies.length(); addrs = new address[](length); portions = new uint256[](length); for (uint256 i; i < length; i++) { address addr = strategies.at(i); addrs[i] = addr; portions[i] = ratios[addr]; } } function _initStrategies( address[] memory _strategies, uint256[] memory _ratios ) internal { require(_strategies.length == _ratios.length, "invalid length"); uint256 totalRatio; uint256 length = _strategies.length; for (uint i; i < length; i++) { strategies.add(_strategies[i]); ratios[_strategies[i]] = _ratios[i]; totalRatio = totalRatio + _ratios[i]; } require(totalRatio <= ONE_HUNDRED_PERCENT, "exceed 100%"); } function _setStrategies( address[] memory _strategies, uint256[] memory _ratios ) internal { uint256 length = _strategies.length; require(length == _ratios.length, "invalid length"); uint256 oldLength = strategies.length(); for (uint i; i < oldLength; i++) { ratios[strategies.at(i)] = 0; } uint256 totalRatio; for (uint i; i < length; i++) { require( Strategy(_strategies[i]).controller() == address(this), "controller mismatch" ); strategies.add(_strategies[i]); ratios[_strategies[i]] = _ratios[i]; totalRatio = totalRatio + _ratios[i]; } require(totalRatio <= ONE_HUNDRED_PERCENT, "exceed 100%"); } function clearStrategy(address _strategy) public onlyVault { _clearStrategy(_strategy, false); } function _clearStrategy(address _strategy, bool _isRebase) internal { Strategy(_strategy).clear(); if (!_isRebase) { _repayToVault(); } } function _destoryStrategy(address _strategy) internal { require(_couldDestroyStrategy(_strategy), "still active"); strategies.remove(_strategy); _repayToVault(); } function _couldDestroyStrategy( address _strategy ) internal returns (bool status) { return ratios[_strategy] == 0 && Strategy(_strategy).getAllValue() < 1e4; } function setNewVault(address _vault) external onlyVault { stoneVault = _vault; } receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {StrategyController} from "../strategies/StrategyController.sol"; abstract contract Strategy { address payable public immutable controller; address public governance; uint256 public latestUpdateTime; uint256 public bufferTime = 12; string public name; modifier onlyGovernance() { require(governance == msg.sender, "not governace"); _; } modifier notAtSameBlock() { require( latestUpdateTime + bufferTime <= block.timestamp, "at the same block" ); _; } event TransferGovernance(address oldOwner, address newOwner); constructor(address payable _controller, string memory _name) { require(_controller != address(0), "ZERO ADDRESS"); governance = msg.sender; controller = _controller; name = _name; } modifier onlyController() { require(controller == msg.sender, "not controller"); _; } function deposit() public payable virtual onlyController notAtSameBlock {} function withdraw( uint256 _amount ) public virtual onlyController notAtSameBlock returns (uint256 actualAmount) {} function instantWithdraw( uint256 _amount ) public virtual onlyController notAtSameBlock returns (uint256 actualAmount) {} function clear() public virtual onlyController returns (uint256 amount) {} function execPendingRequest( uint256 _amount ) public virtual returns (uint256 amount) {} function getAllValue() public virtual returns (uint256 value) {} function getPendingValue() public virtual returns (uint256 value) {} function getInvestedValue() public virtual returns (uint256 value) {} function checkPendingStatus() public virtual returns (uint256 pending, uint256 executable) {} function setGovernance(address governance_) external onlyGovernance { emit TransferGovernance(governance, governance_); governance = governance_; } function setBufferTime(uint256 _time) external onlyGovernance { bufferTime = _time; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Interface for WETH9 interface IWETH9 is IERC20 { /// @notice Deposit ether to get wrapped ether function deposit() external payable; /// @notice Withdraw wrapped ether to get ether function withdraw(uint256) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; interface IAquaLpToken { function mint(uint mintAmount) external returns (uint); function redeem(uint redeemTokens) external returns (uint); function redeemUnderlying(uint redeemAmount) external returns (uint); function exchangeRateCurrent() external returns (uint); function balanceOf(address owner) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; contract AssetsVault { address public stoneVault; address public strategyController; modifier onlyPermit() { require( stoneVault == msg.sender || strategyController == msg.sender, "not permit" ); _; } constructor(address _stoneVault, address _strategyController) { require( _stoneVault != address(0) && _strategyController != address(0), "ZERO ADDRESS" ); stoneVault = _stoneVault; strategyController = _strategyController; } function deposit() external payable { require(msg.value != 0, "too small"); } function withdraw(address _to, uint256 _amount) external onlyPermit { TransferHelper.safeTransferETH(_to, _amount); } function setNewVault(address _vault) external onlyPermit { stoneVault = _vault; } function getBalance() external view returns (uint256 amount) { amount = address(this).balance; } receive() external payable {} }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; library TransferHelper { /// @notice Transfers tokens from the targeted address to the given destination /// @notice Errors with 'STF' if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( address token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF'); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with ST if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST'); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev Errors with 'SA' if transfer fails /// @param token The contract address of the token to be approved /// @param to The target of the approval /// @param value The amount of the given token the target will be allowed to spend function safeApprove( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA'); } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'STE'); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^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 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) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 10 }, "evmVersion": "shanghai", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"_controller","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_lptoken","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DepositIntoNative","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFromNativeByAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFromNativeByShare","type":"event"},{"inputs":[],"name":"LPTOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IWETH9","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bufferTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clear","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositIntoNative","outputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllValue","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getInvestedValue","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getPendingValue","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"instantWithdraw","outputs":[{"internalType":"uint256","name":"actualAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"latestUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"setBufferTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"actualAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFromNativeByAmount","outputs":[{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"withdrawFromNativeByShare","outputs":[{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e060405234801562000010575f80fd5b506040516200181938038062001819833981016040819052620000339162000193565b83836200004033620000eb565b6001600160a01b038216620000725760405162461bcd60e51b815260040162000069906200029b565b60405180910390fd5b6001600160a01b03821660805260046200008d82826200034d565b5050506001600160a01b03821615801590620000b157506001600160a01b03811615155b620000d05760405162461bcd60e51b815260040162000069906200029b565b6001600160a01b0390811660c0521660a05250620004159050565b600180546001600160a01b0319169055620001068162000109565b50565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811462000106575f80fd5b634e487b7160e01b5f52604160045260245ffd5b80516200018e8162000158565b919050565b5f805f8060808587031215620001a7575f80fd5b8451620001b48162000158565b602086810151919550906001600160401b0380821115620001d3575f80fd5b818801915088601f830112620001e7575f80fd5b815181811115620001fc57620001fc6200016d565b604051601f8201601f19908116603f011681019083821181831017156200022757620002276200016d565b816040528281528b868487010111156200023f575f80fd5b5f93505b8284101562000262578484018601518185018701529285019262000243565b5f868483010152809850505050505050620002806040860162000181565b9150620002906060860162000181565b905092959194509250565b6020808252600c908201526b5a45524f204144445245535360a01b604082015260600190565b600181811c90821680620002d657607f821691505b602082108103620002f557634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000348575f81815260208120601f850160051c81016020861015620003235750805b601f850160051c820191505b8181101562000344578281556001016200032f565b5050505b505050565b81516001600160401b038111156200036957620003696200016d565b62000381816200037a8454620002c1565b84620002fb565b602080601f831160018114620003b7575f84156200039f5750858301515b5f19600386901b1c1916600185901b17855562000344565b5f85815260208120601f198616915b82811015620003e757888601518255948401946001909101908401620003c6565b50858210156200040557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c051611362620004b75f395f81816102b9015281816105660152818161098901528181610a3a0152610d1501525f81816101a4015281816104dc015281816107090152818161079f0152818161091101528181610a0b01528181610abf01528181610b4b0152610c8b01525f81816103510152818161040f0152818161067d015281816106cf01528181610e1d0152610fb201526113625ff3fe608060405260043610610106575f3560e01c80621a55971461011157806306fdde03146101325780631aac030c146101535780632e1a7d4d146101745780633544b747146101935780633b97ad8a146101d357806352efea6e146101f25780636c23ab4c14610206578063715018a61461021a5780637654f7ab1461022e57806379ba509714610242578063866e0e62146102565780638da5cb5b14610275578063958ee52114610289578063ad5c4648146102a8578063ba7b6703146102db578063d0e30db0146102f0578063dd07d288146102f8578063e30c39781461030d578063f2fde38b14610321578063f77c479114610340578063fd92bff214610174575f80fd5b3661010d57005b5f80fd5b34801561011c575f80fd5b505f5b6040519081526020015b60405180910390f35b34801561013d575f80fd5b50610146610373565b6040516101299190611109565b34801561015e575f80fd5b5061017261016d36600461113b565b6103ff565b005b34801561017f575f80fd5b5061011f61018e36600461113b565b61040c565b34801561019e575f80fd5b506101c67f000000000000000000000000000000000000000000000000000000000000000081565b6040516101299190611152565b3480156101de575f80fd5b5061011f6101ed36600461113b565b61049c565b3480156101fd575f80fd5b5061011f61067a565b348015610211575f80fd5b5061011f6106fc565b348015610225575f80fd5b50610172610836565b348015610239575f80fd5b5061011f610849565b34801561024d575f80fd5b50610172610852565b348015610261575f80fd5b5061011f61027036600461113b565b6108d0565b348015610280575f80fd5b506101c6610c3d565b348015610294575f80fd5b5061011f6102a336600461113b565b610c4b565b3480156102b3575f80fd5b506101c67f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e6575f80fd5b5061011f60035481565b610172610e1b565b348015610303575f80fd5b5061011f60025481565b348015610318575f80fd5b506101c6610eb7565b34801561032c575f80fd5b5061017261033b366004611166565b610ec6565b34801561034b575f80fd5b506101c67f000000000000000000000000000000000000000000000000000000000000000081565b6004805461038090611193565b80601f01602080910402602001604051908101604052809291908181526020018280546103ac90611193565b80156103f75780601f106103ce576101008083540402835291602001916103f7565b820191905f5260205f20905b8154815290600101906020018083116103da57829003601f168201915b505050505081565b610407610f2c565b600355565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316331461045e5760405162461bcd60e51b8152600401610455906111cb565b60405180910390fd5b4260035460025461046f9190611207565b111561048d5760405162461bcd60e51b81526004016104559061121a565b61049682610f8b565b92915050565b5f6104a5610f2c565b815f036104c45760405162461bcd60e51b815260040161045590611245565b60405163852a12e360e01b81526004810183905247907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063852a12e3906024016020604051808303815f875af115801561052a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054e919061126e565b506040516370a0823160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d9082906370a08231906105a3903090600401611152565b602060405180830381865afa1580156105be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105e2919061126e565b6040518263ffffffff1660e01b815260040161060091815260200190565b5f604051808303815f87803b158015610617575f80fd5b505af1158015610629573d5f803e3d5ffd5b5050505080476106399190611285565b91507fc46b1645d9ae8a5409867332971257b1c868b4ad802331ebbda33bc9c4d1c6328260405161066c91815260200190565b60405180910390a150919050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633146106c35760405162461bcd60e51b8152600401610455906111cb565b4780156106f8576106f47f000000000000000000000000000000000000000000000000000000000000000082610fe0565b8091505b5090565b5f47670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bd6d894d6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610764573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610788919061126e565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906107d4903090600401611152565b602060405180830381865afa1580156107ef573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610813919061126e565b61081d9190611298565b61082791906112af565b6108319190611207565b905090565b61083e610f2c565b6108475f611084565b565b5f6108316106fc565b338061085c610eb7565b6001600160a01b0316146108c45760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610455565b6108cd81611084565b50565b5f6108d9610f2c565b815f036108f85760405162461bcd60e51b815260040161045590611245565b6040516370a0823160e01b81525f906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610946903090600401611152565b602060405180830381865afa158015610961573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610985919061126e565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004015f604051808303818588803b1580156109e0575f80fd5b505af11580156109f2573d5f803e3d5ffd5b505060405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018890527f000000000000000000000000000000000000000000000000000000000000000016935063095ea7b3925060440190506020604051808303815f875af1158015610a84573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610aa891906112ce565b5060405163140e25ad60e31b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a0712d68906024016020604051808303815f875af1158015610b0d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b31919061126e565b506040516370a0823160e01b815281906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610b80903090600401611152565b602060405180830381865afa158015610b9b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bbf919061126e565b610bc99190611285565b9150815f03610c0d5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59080c081bdd5d1c1d5d60821b6044820152606401610455565b6040518281527f0ef3c17ac50c63b8c0c457ae2f1a830c824fba97acbfff79660255172c67a1c39060200161066c565b5f546001600160a01b031690565b5f610c54610f2c565b815f03610c735760405162461bcd60e51b815260040161045590611245565b60405163db006a7560e01b81526004810183905247907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063db006a75906024016020604051808303815f875af1158015610cd9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cfd919061126e565b506040516370a0823160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d9082906370a0823190610d52903090600401611152565b602060405180830381865afa158015610d6d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d91919061126e565b6040518263ffffffff1660e01b8152600401610daf91815260200190565b5f604051808303815f87803b158015610dc6575f80fd5b505af1158015610dd8573d5f803e3d5ffd5b505050508047610de89190611285565b91507f8ccc1715e9162234348408344662ede6740a1bd63f98b1f467c9e5ba97d1107b8260405161066c91815260200190565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163314610e635760405162461bcd60e51b8152600401610455906111cb565b42600354600254610e749190611207565b1115610e925760405162461bcd60e51b81526004016104559061121a565b345f03610eb15760405162461bcd60e51b8152600401610455906112ed565b42600255565b6001546001600160a01b031690565b610ece610f2c565b600180546001600160a01b0319166001600160a01b038316908117909155610ef4610c3d565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b33610f35610c3d565b6001600160a01b0316146108475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610455565b5f815f03610fab5760405162461bcd60e51b8152600401610455906112ed565b5080610fd77f000000000000000000000000000000000000000000000000000000000000000082610fe0565b42600255919050565b604080515f808252602082019092526001600160a01b0384169083906040516110099190611311565b5f6040518083038185875af1925050503d805f8114611043576040519150601f19603f3d011682016040523d82523d5f602084013e611048565b606091505b505090508061107f5760405162461bcd60e51b815260206004820152600360248201526253544560e81b6044820152606401610455565b505050565b600180546001600160a01b03191690556108cd815f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f5b838110156111015781810151838201526020016110e9565b50505f910152565b602081525f82518060208401526111278160408501602087016110e7565b601f01601f19169190910160400192915050565b5f6020828403121561114b575f80fd5b5035919050565b6001600160a01b0391909116815260200190565b5f60208284031215611176575f80fd5b81356001600160a01b038116811461118c575f80fd5b9392505050565b600181811c908216806111a757607f821691505b6020821081036111c557634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252600e908201526d3737ba1031b7b73a3937b63632b960911b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610496576104966111f3565b6020808252601190820152706174207468652073616d6520626c6f636b60781b604082015260600190565b6020808252600f908201526e125b9d985b1a59080c081a5b9c1d5d608a1b604082015260600190565b5f6020828403121561127e575f80fd5b5051919050565b81810381811115610496576104966111f3565b8082028115828204841417610496576104966111f3565b5f826112c957634e487b7160e01b5f52601260045260245ffd5b500490565b5f602082840312156112de575f80fd5b8151801515811461118c575f80fd5b6020808252600a90820152697a65726f2076616c756560b01b604082015260600190565b5f82516113228184602087016110e7565b919091019291505056fea2646970667358221220cad9c4f0ad7e10cff620233e9497d8e76df2665aab9957c2596d7c265185e84b64736f6c63430008150033000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b20000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000174e6174697665204c656e64696e6720506f6f6c5f504d4d000000000000000000
Deployed Bytecode
0x608060405260043610610106575f3560e01c80621a55971461011157806306fdde03146101325780631aac030c146101535780632e1a7d4d146101745780633544b747146101935780633b97ad8a146101d357806352efea6e146101f25780636c23ab4c14610206578063715018a61461021a5780637654f7ab1461022e57806379ba509714610242578063866e0e62146102565780638da5cb5b14610275578063958ee52114610289578063ad5c4648146102a8578063ba7b6703146102db578063d0e30db0146102f0578063dd07d288146102f8578063e30c39781461030d578063f2fde38b14610321578063f77c479114610340578063fd92bff214610174575f80fd5b3661010d57005b5f80fd5b34801561011c575f80fd5b505f5b6040519081526020015b60405180910390f35b34801561013d575f80fd5b50610146610373565b6040516101299190611109565b34801561015e575f80fd5b5061017261016d36600461113b565b6103ff565b005b34801561017f575f80fd5b5061011f61018e36600461113b565b61040c565b34801561019e575f80fd5b506101c67f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b281565b6040516101299190611152565b3480156101de575f80fd5b5061011f6101ed36600461113b565b61049c565b3480156101fd575f80fd5b5061011f61067a565b348015610211575f80fd5b5061011f6106fc565b348015610225575f80fd5b50610172610836565b348015610239575f80fd5b5061011f610849565b34801561024d575f80fd5b50610172610852565b348015610261575f80fd5b5061011f61027036600461113b565b6108d0565b348015610280575f80fd5b506101c6610c3d565b348015610294575f80fd5b5061011f6102a336600461113b565b610c4b565b3480156102b3575f80fd5b506101c67f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156102e6575f80fd5b5061011f60035481565b610172610e1b565b348015610303575f80fd5b5061011f60025481565b348015610318575f80fd5b506101c6610eb7565b34801561032c575f80fd5b5061017261033b366004611166565b610ec6565b34801561034b575f80fd5b506101c67f000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b281565b6004805461038090611193565b80601f01602080910402602001604051908101604052809291908181526020018280546103ac90611193565b80156103f75780601f106103ce576101008083540402835291602001916103f7565b820191905f5260205f20905b8154815290600101906020018083116103da57829003601f168201915b505050505081565b610407610f2c565b600355565b5f7f000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b26001600160a01b0316331461045e5760405162461bcd60e51b8152600401610455906111cb565b60405180910390fd5b4260035460025461046f9190611207565b111561048d5760405162461bcd60e51b81526004016104559061121a565b61049682610f8b565b92915050565b5f6104a5610f2c565b815f036104c45760405162461bcd60e51b815260040161045590611245565b60405163852a12e360e01b81526004810183905247907f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b26001600160a01b03169063852a12e3906024016020604051808303815f875af115801561052a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061054e919061126e565b506040516370a0823160e01b81526001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21690632e1a7d4d9082906370a08231906105a3903090600401611152565b602060405180830381865afa1580156105be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105e2919061126e565b6040518263ffffffff1660e01b815260040161060091815260200190565b5f604051808303815f87803b158015610617575f80fd5b505af1158015610629573d5f803e3d5ffd5b5050505080476106399190611285565b91507fc46b1645d9ae8a5409867332971257b1c868b4ad802331ebbda33bc9c4d1c6328260405161066c91815260200190565b60405180910390a150919050565b5f7f000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b26001600160a01b031633146106c35760405162461bcd60e51b8152600401610455906111cb565b4780156106f8576106f47f000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b282610fe0565b8091505b5090565b5f47670de0b6b3a76400007f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b26001600160a01b031663bd6d894d6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610764573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610788919061126e565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b216906370a08231906107d4903090600401611152565b602060405180830381865afa1580156107ef573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610813919061126e565b61081d9190611298565b61082791906112af565b6108319190611207565b905090565b61083e610f2c565b6108475f611084565b565b5f6108316106fc565b338061085c610eb7565b6001600160a01b0316146108c45760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610455565b6108cd81611084565b50565b5f6108d9610f2c565b815f036108f85760405162461bcd60e51b815260040161045590611245565b6040516370a0823160e01b81525f906001600160a01b037f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b216906370a0823190610946903090600401611152565b602060405180830381865afa158015610961573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610985919061126e565b90507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004015f604051808303818588803b1580156109e0575f80fd5b505af11580156109f2573d5f803e3d5ffd5b505060405163095ea7b360e01b81526001600160a01b037f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b281166004830152602482018890527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216935063095ea7b3925060440190506020604051808303815f875af1158015610a84573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610aa891906112ce565b5060405163140e25ad60e31b8152600481018490527f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b26001600160a01b03169063a0712d68906024016020604051808303815f875af1158015610b0d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b31919061126e565b506040516370a0823160e01b815281906001600160a01b037f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b216906370a0823190610b80903090600401611152565b602060405180830381865afa158015610b9b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bbf919061126e565b610bc99190611285565b9150815f03610c0d5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59080c081bdd5d1c1d5d60821b6044820152606401610455565b6040518281527f0ef3c17ac50c63b8c0c457ae2f1a830c824fba97acbfff79660255172c67a1c39060200161066c565b5f546001600160a01b031690565b5f610c54610f2c565b815f03610c735760405162461bcd60e51b815260040161045590611245565b60405163db006a7560e01b81526004810183905247907f000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b26001600160a01b03169063db006a75906024016020604051808303815f875af1158015610cd9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cfd919061126e565b506040516370a0823160e01b81526001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21690632e1a7d4d9082906370a0823190610d52903090600401611152565b602060405180830381865afa158015610d6d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d91919061126e565b6040518263ffffffff1660e01b8152600401610daf91815260200190565b5f604051808303815f87803b158015610dc6575f80fd5b505af1158015610dd8573d5f803e3d5ffd5b505050508047610de89190611285565b91507f8ccc1715e9162234348408344662ede6740a1bd63f98b1f467c9e5ba97d1107b8260405161066c91815260200190565b7f000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b26001600160a01b03163314610e635760405162461bcd60e51b8152600401610455906111cb565b42600354600254610e749190611207565b1115610e925760405162461bcd60e51b81526004016104559061121a565b345f03610eb15760405162461bcd60e51b8152600401610455906112ed565b42600255565b6001546001600160a01b031690565b610ece610f2c565b600180546001600160a01b0319166001600160a01b038316908117909155610ef4610c3d565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b33610f35610c3d565b6001600160a01b0316146108475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610455565b5f815f03610fab5760405162461bcd60e51b8152600401610455906112ed565b5080610fd77f000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b282610fe0565b42600255919050565b604080515f808252602082019092526001600160a01b0384169083906040516110099190611311565b5f6040518083038185875af1925050503d805f8114611043576040519150601f19603f3d011682016040523d82523d5f602084013e611048565b606091505b505090508061107f5760405162461bcd60e51b815260206004820152600360248201526253544560e81b6044820152606401610455565b505050565b600180546001600160a01b03191690556108cd815f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f5b838110156111015781810151838201526020016110e9565b50505f910152565b602081525f82518060208401526111278160408501602087016110e7565b601f01601f19169190910160400192915050565b5f6020828403121561114b575f80fd5b5035919050565b6001600160a01b0391909116815260200190565b5f60208284031215611176575f80fd5b81356001600160a01b038116811461118c575f80fd5b9392505050565b600181811c908216806111a757607f821691505b6020821081036111c557634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252600e908201526d3737ba1031b7b73a3937b63632b960911b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610496576104966111f3565b6020808252601190820152706174207468652073616d6520626c6f636b60781b604082015260600190565b6020808252600f908201526e125b9d985b1a59080c081a5b9c1d5d608a1b604082015260600190565b5f6020828403121561127e575f80fd5b5051919050565b81810381811115610496576104966111f3565b8082028115828204841417610496576104966111f3565b5f826112c957634e487b7160e01b5f52601260045260245ffd5b500490565b5f602082840312156112de575f80fd5b8151801515811461118c575f80fd5b6020808252600a90820152697a65726f2076616c756560b01b604082015260600190565b5f82516113228184602087016110e7565b919091019291505056fea2646970667358221220cad9c4f0ad7e10cff620233e9497d8e76df2665aab9957c2596d7c265185e84b64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b20000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000174e6174697665204c656e64696e6720506f6f6c5f504d4d000000000000000000
-----Decoded View---------------
Arg [0] : _controller (address): 0x396aBF9fF46E21694F4eF01ca77C6d7893A017B2
Arg [1] : _name (string): Native Lending Pool_PMM
Arg [2] : _lptoken (address): 0xc41D25382889B1E484E28c4f9bbDBD6B6117e6b2
Arg [3] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000396abf9ff46e21694f4ef01ca77c6d7893a017b2
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000c41d25382889b1e484e28c4f9bbdbd6b6117e6b2
Arg [3] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [5] : 4e6174697665204c656e64696e6720506f6f6c5f504d4d000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,388.3 | 23.0379 | $78,059.48 |
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.