More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
NotifyHelper
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: ISC /** * By using this software, you understand, acknowledge and accept that Tetu * and/or the underlying software are provided “as is” and “as available” * basis and without warranties or representations of any kind either expressed * or implied. Any use of this open source software released under the ISC * Internet Systems Consortium license is done at your own risk to the fullest * extent permissible pursuant to applicable law any and all liability as well * as all warranties, including any fitness for a particular purpose with respect * to Tetu and/or the underlying software and the use thereof are disclaimed. */ pragma solidity 0.8.4; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "../base/governance/Controllable.sol"; import "../base/interface/ISmartVault.sol"; import "../base/interface/IController.sol"; /// @title Disperse weekly rewards to vaults /// @author belbix contract NotifyHelper is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; string public constant VERSION = "1.1.0"; mapping(address => bool) public alreadyNotified; address[] public alreadyNotifiedList; event TokenMoved(address token, uint256 amount); constructor(address _controller) { Controllable.initializeControllable(_controller); } function psVault() public view returns (address) { return IController(controller()).psVault(); } function alreadyNotifiedListLength() external view returns (uint256) { return alreadyNotifiedList.length; } // move tokens to controller where money will be protected with time lock function moveTokensToController(address _token, uint256 amount) external onlyControllerOrGovernance { uint256 tokenBalance = IERC20(_token).balanceOf(address(this)); require(tokenBalance >= amount, "not enough balance"); IERC20(_token).safeTransfer(controller(), amount); emit TokenMoved(_token, amount); } function notifyVaults(uint256[] memory amounts, address[] memory vaults, uint256 sum, address token) external onlyControllerOrGovernance { uint256 tokenBal = IERC20(token).balanceOf(address(this)); require(sum <= tokenBal, "not enough balance"); require(amounts.length == vaults.length, "wrong data"); uint256 check = 0; for (uint i = 0; i < vaults.length; i++) { require(amounts[i] > 0, "Notify zero"); require(!alreadyNotified[vaults[i]], "Duplicate pool"); require(IController(controller()).isValidVault(vaults[i]), "Vault not registered"); if (token == ISmartVault(psVault()).underlying()) { notifyVaultWithPsToken(amounts[i], vaults[i]); } else { notifyVault(amounts[i], vaults[i], token); } alreadyNotified[vaults[i]] = true; alreadyNotifiedList.push(vaults[i]); check = check.add(amounts[i]); } require(sum == check, "Wrong check sum"); } function notifyVault(uint256 amount, address vault, address token) internal { IERC20(token).safeApprove(vault, amount); ISmartVault(vault).notifyTargetRewardAmount(token, amount); } function notifyVaultWithPsToken(uint256 amount, address vault) internal { require(vault != psVault(), "ps forbidden"); address token = ISmartVault(psVault()).underlying(); // deposit token to PS require(token == ISmartVault(psVault()).underlying(), "invalid token"); IERC20(token).safeApprove(psVault(), amount); ISmartVault(psVault()).deposit(amount); uint256 amountToSend = IERC20(psVault()).balanceOf(address(this)); IERC20(psVault()).safeApprove(vault, amountToSend); ISmartVault(vault).notifyTargetRewardAmount(psVault(), amountToSend); } /// @notice Clear statuses. Need to use after full cycle of reward distribution function clearNotifiedStatuses() external onlyControllerOrGovernance { for (uint256 i = alreadyNotifiedList.length; i > 0; i--) { delete alreadyNotified[alreadyNotifiedList[i - 1]]; delete alreadyNotifiedList[i - 1]; alreadyNotifiedList.pop(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^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.8.0; import "../IERC20.sol"; import "../../../utils/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 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' 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ 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) { unchecked { 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) { unchecked { 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) { unchecked { // 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) { unchecked { 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) { unchecked { 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) { return a + b; } /** * @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) { 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) { return a * b; } /** * @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. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { 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) { 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) { unchecked { 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. * * 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) { unchecked { 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) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: ISC /** * By using this software, you understand, acknowledge and accept that Tetu * and/or the underlying software are provided “as is” and “as available” * basis and without warranties or representations of any kind either expressed * or implied. Any use of this open source software released under the ISC * Internet Systems Consortium license is done at your own risk to the fullest * extent permissible pursuant to applicable law any and all liability as well * as all warranties, including any fitness for a particular purpose with respect * to Tetu and/or the underlying software and the use thereof are disclaimed. */ pragma solidity 0.8.4; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "../interface/IController.sol"; import "../interface/IControllable.sol"; /// @title Implement basic functionality for any contract that require strict control /// @dev Can be used with upgradeable pattern. /// Require call initializeControllable() in any case. /// @author belbix abstract contract Controllable is Initializable, IControllable { bytes32 internal constant _CONTROLLER_SLOT = 0x5165972ef41194f06c5007493031d0b927c20741adcb74403b954009fd2c3617; bytes32 internal constant _CREATED_SLOT = 0x6f55f470bdc9cb5f04223fd822021061668e4dccb43e8727b295106dc9769c8a; /// @notice Controller address changed event UpdateController(address oldValue, address newValue); constructor() { assert(_CONTROLLER_SLOT == bytes32(uint256(keccak256("eip1967.controllable.controller")) - 1)); assert(_CREATED_SLOT == bytes32(uint256(keccak256("eip1967.controllable.created")) - 1)); } /// @notice Initialize contract after setup it as proxy implementation /// Save block.timestamp in the "created" variable /// @dev Use it only once after first logic setup /// @param _controller Controller address function initializeControllable(address _controller) public initializer { setController(_controller); setCreated(block.timestamp); } function isController(address _adr) public override view returns (bool) { return _adr == controller(); } /// @notice Return true is given address is setup as governance in Controller /// @param _adr Address for check /// @return true if given address is governance function isGovernance(address _adr) public override view returns (bool) { return IController(controller()).governance() == _adr; } // ************ MODIFIERS ********************** /// @dev Allow operation only for Controller modifier onlyController() { require(controller() == msg.sender, "not controller"); _; } /// @dev Allow operation only for Controller or Governance modifier onlyControllerOrGovernance() { require(isController(msg.sender) || isGovernance(msg.sender), "not controller or gov"); _; } /// @dev Only smart contracts will be affected by this modifier /// If it is a contract it should be whitelisted modifier onlyAllowedUsers() { require(IController(controller()).isAllowedUser(msg.sender), "not allowed"); _; } /// @dev Only Reward Distributor allowed. Governance is Reward Distributor by default. modifier onlyRewardDistribution() { require(IController(controller()).isRewardDistributor(msg.sender), "only distr"); _; } // ************* SETTERS/GETTERS ******************* /// @notice Return controller address saved in the contract slot /// @return adr Controller address function controller() public view returns (address adr) { bytes32 slot = _CONTROLLER_SLOT; assembly { adr := sload(slot) } } /// @dev Set a controller address to contract slot /// @param _newController Controller address function setController(address _newController) internal { require(_newController != address(0), "zero address"); emit UpdateController(controller(), _newController); bytes32 slot = _CONTROLLER_SLOT; assembly { sstore(slot, _newController) } } /// @notice Return creation timestamp /// @return ts Creation timestamp function created() external view returns (uint256 ts) { bytes32 slot = _CREATED_SLOT; assembly { ts := sload(slot) } } /// @dev Filled only once when contract initialized /// @param _created block.timestamp function setCreated(uint256 _created) private { bytes32 slot = _CREATED_SLOT; assembly { sstore(slot, _created) } } }
// SPDX-License-Identifier: ISC /** * By using this software, you understand, acknowledge and accept that Tetu * and/or the underlying software are provided “as is” and “as available” * basis and without warranties or representations of any kind either expressed * or implied. Any use of this open source software released under the ISC * Internet Systems Consortium license is done at your own risk to the fullest * extent permissible pursuant to applicable law any and all liability as well * as all warranties, including any fitness for a particular purpose with respect * to Tetu and/or the underlying software and the use thereof are disclaimed. */ pragma solidity 0.8.4; interface ISmartVault { function setStrategy(address _strategy) external; function changeActivityStatus(bool _active) external; function doHardWork() external; function notifyTargetRewardAmount(address _rewardToken, uint256 reward) external; function deposit(uint256 amount) external; function depositAndInvest(uint256 amount) external; function depositFor(uint256 amount, address holder) external; function withdraw(uint256 numberOfShares) external; function exit() external; function getAllRewards() external; function getReward(address rt) external; function underlying() external view returns (address); function strategy() external view returns (address); function getRewardTokenIndex(address rt) external view returns (uint256); function getPricePerFullShare() external view returns (uint256); function underlyingUnit() external view returns (uint256); function duration() external view returns (uint256); function underlyingBalanceInVault() external view returns (uint256); function underlyingBalanceWithInvestment() external view returns (uint256); function underlyingBalanceWithInvestmentForHolder(address holder) external view returns (uint256); function availableToInvestOut() external view returns (uint256); function earned(address rt, address account) external view returns (uint256); function earnedWithBoost(address rt, address account) external view returns (uint256); function rewardPerToken(address rt) external view returns (uint256); function lastTimeRewardApplicable(address rt) external view returns (uint256); function rewardTokensLength() external view returns (uint256); function active() external view returns (bool); function rewardTokens() external view returns (address[] memory); function periodFinishForToken(address _rt) external view returns (uint256); function rewardRateForToken(address _rt) external view returns (uint256); function lastUpdateTimeForToken(address _rt) external view returns (uint256); function rewardPerTokenStoredForToken(address _rt) external view returns (uint256); function userRewardPerTokenPaidForToken(address _rt, address account) external view returns (uint256); function rewardsForToken(address _rt, address account) external view returns (uint256); function userLastWithdrawTs(address _user) external returns (uint256); function userBoostTs(address _user) external returns (uint256); function addRewardToken(address rt) external; function removeRewardToken(address rt) external; function stop() external; }
// SPDX-License-Identifier: ISC /** * By using this software, you understand, acknowledge and accept that Tetu * and/or the underlying software are provided “as is” and “as available” * basis and without warranties or representations of any kind either expressed * or implied. Any use of this open source software released under the ISC * Internet Systems Consortium license is done at your own risk to the fullest * extent permissible pursuant to applicable law any and all liability as well * as all warranties, including any fitness for a particular purpose with respect * to Tetu and/or the underlying software and the use thereof are disclaimed. */ pragma solidity 0.8.4; interface IController { function addVaultAndStrategy(address _vault, address _strategy) external; function addStrategy(address _strategy) external; function governance() external view returns (address); function dao() external view returns (address); function bookkeeper() external view returns (address); function feeRewardForwarder() external view returns (address); function mintHelper() external view returns (address); function rewardToken() external view returns (address); function fundToken() external view returns (address); function psVault() external view returns (address); function fund() external view returns (address); function announcer() external view returns (address); function vaultController() external view returns (address); function whiteList(address _target) external view returns (bool); function vaults(address _target) external view returns (bool); function strategies(address _target) external view returns (bool); function psNumerator() external view returns (uint256); function psDenominator() external view returns (uint256); function fundNumerator() external view returns (uint256); function fundDenominator() external view returns (uint256); function isAllowedUser(address _adr) external view returns (bool); function isDao(address _adr) external view returns (bool); function isHardWorker(address _adr) external view returns (bool); function isRewardDistributor(address _adr) external view returns (bool); function isValidVault(address _vault) external view returns (bool); function isValidStrategy(address _strategy) external view returns (bool); // ************ DAO ACTIONS ************* function setPSNumeratorDenominator(uint256 numerator, uint256 denominator) external; function setFundNumeratorDenominator(uint256 numerator, uint256 denominator) external; function addToWhiteListMulti(address[] calldata _targets) external; function addToWhiteList(address _target) external; function removeFromWhiteListMulti(address[] calldata _targets) external; function removeFromWhiteList(address _target) external; }
// SPDX-License-Identifier: MIT pragma solidity ^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; 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"); (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"); (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"); (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"); (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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: ISC /** * By using this software, you understand, acknowledge and accept that Tetu * and/or the underlying software are provided “as is” and “as available” * basis and without warranties or representations of any kind either expressed * or implied. Any use of this open source software released under the ISC * Internet Systems Consortium license is done at your own risk to the fullest * extent permissible pursuant to applicable law any and all liability as well * as all warranties, including any fitness for a particular purpose with respect * to Tetu and/or the underlying software and the use thereof are disclaimed. */ pragma solidity 0.8.4; interface IControllable { function isController(address _contract) external view returns (bool); function isGovernance(address _contract) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenMoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldValue","type":"address"},{"indexed":false,"internalType":"address","name":"newValue","type":"address"}],"name":"UpdateController","type":"event"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"alreadyNotified","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"alreadyNotifiedList","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"alreadyNotifiedListLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clearNotifiedStatuses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"adr","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"created","outputs":[{"internalType":"uint256","name":"ts","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"initializeControllable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adr","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adr","type":"address"}],"name":"isGovernance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"moveTokensToController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address[]","name":"vaults","type":"address[]"},{"internalType":"uint256","name":"sum","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"name":"notifyVaults","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"psVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001ca638038062001ca6833981016040819052620000349162000298565b6200006160017f5165972ef41194f06c5007493031d0b927c20741adcb74403b954009fd2c3618620002c8565b60008051602062001c66833981519152146200008d57634e487b7160e01b600052600160045260246000fd5b620000ba60017f6f55f470bdc9cb5f04223fd822021061668e4dccb43e8727b295106dc9769c8b620002c8565b60008051602062001c8683398151915214620000e657634e487b7160e01b600052600160045260246000fd5b620000fc816200010360201b62000c291760201c565b50620002ec565b600054610100900460ff16806200011d575060005460ff16155b620001865760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b600054610100900460ff16158015620001a9576000805461ffff19166101011790555b620001b482620001e3565b620001cc4260008051602062001c8683398151915255565b8015620001df576000805461ff00191690555b5050565b6001600160a01b0381166200022a5760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016200017d565b7f19b7d592cea0dfda222f6a4ea5c5a8d018ee9c6b1d0a917483a405de94eb26cd6200026360008051602062001c668339815191525490565b604080516001600160a01b03928316815291841660208301520160405180910390a160008051602062001c6683398151915255565b600060208284031215620002aa578081fd5b81516001600160a01b0381168114620002c1578182fd5b9392505050565b600082821015620002e757634e487b7160e01b81526011600452602481fd5b500390565b61196a80620002fc6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b429afeb1161008c578063e13ab69b11610066578063e13ab69b146101c6578063e945cdcd146101ce578063f77c4791146101e1578063ffa1ad74146101f657600080fd5b8063b429afeb14610198578063b58920fa146101ab578063dee1f0e4146101b357600080fd5b806302afd479146100d4578063087198161461010c5780630a7ea13114610137578063325a19f11461014c578063955614081461017d57806395f9b3f514610190575b600080fd5b6100f76100e23660046115e8565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61011f61011a36600461173f565b610227565b6040516001600160a01b039091168152602001610103565b61014a61014536600461164b565b610251565b005b7f6f55f470bdc9cb5f04223fd822021061668e4dccb43e8727b295106dc9769c8a545b604051908152602001610103565b61014a61018b366004611620565b61082f565b61011f610995565b6100f76101a63660046115e8565b610a22565b60025461016f565b6100f76101c13660046115e8565b610a55565b61014a610af7565b61014a6101dc3660046115e8565b610c29565b6000805160206119158339815191525461011f565b61021a604051806040016040528060058152602001640312e312e360dc1b81525081565b604051610103919061178b565b6002818154811061023757600080fd5b6000918252602090912001546001600160a01b0316905081565b61025a33610a22565b80610269575061026933610a55565b61028e5760405162461bcd60e51b8152600401610285906117be565b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156102d057600080fd5b505afa1580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103089190611757565b90508083111561034f5760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b6044820152606401610285565b835185511461038d5760405162461bcd60e51b815260206004820152600a60248201526977726f6e67206461746160b01b6044820152606401610285565b6000805b85518110156107e55760008782815181106103bc57634e487b7160e01b600052603260045260246000fd5b6020026020010151116103ff5760405162461bcd60e51b815260206004820152600b60248201526a4e6f74696679207a65726f60a81b6044820152606401610285565b6001600087838151811061042357634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16156104885760405162461bcd60e51b815260206004820152600e60248201526d111d5c1b1a58d85d19481c1bdbdb60921b6044820152606401610285565b600080516020611915833981519152546001600160a01b031663642194508783815181106104c657634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b81526004016104f991906001600160a01b0391909116815260200190565b60206040518083038186803b15801561051157600080fd5b505afa158015610525573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610549919061171f565b61058c5760405162461bcd60e51b815260206004820152601460248201527315985d5b1d081b9bdd081c9959da5cdd195c995960621b6044820152606401610285565b610594610995565b6001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156105cc57600080fd5b505afa1580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106049190611604565b6001600160a01b0316846001600160a01b0316141561067a5761067587828151811061064057634e487b7160e01b600052603260045260246000fd5b602002602001015187838151811061066857634e487b7160e01b600052603260045260246000fd5b6020026020010151610d0e565b6106d3565b6106d387828151811061069d57634e487b7160e01b600052603260045260246000fd5b60200260200101518783815181106106c557634e487b7160e01b600052603260045260246000fd5b60200260200101518661104c565b60018060008884815181106106f857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600286828151811061075957634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b0390921691909117905586516107d1908890839081106107ba57634e487b7160e01b600052603260045260246000fd5b6020026020010151836110c790919063ffffffff16565b9150806107dd816118b8565b915050610391565b508084146108275760405162461bcd60e51b815260206004820152600f60248201526e57726f6e6720636865636b2073756d60881b6044820152606401610285565b505050505050565b61083833610a22565b80610847575061084733610a55565b6108635760405162461bcd60e51b8152600401610285906117be565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b1580156108a557600080fd5b505afa1580156108b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190611757565b9050818110156109245760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b6044820152606401610285565b61094e61093d6000805160206119158339815191525490565b6001600160a01b03851690846110da565b604080516001600160a01b0385168152602081018490527fc163505caf05ab04e4eb812d39f551812b2b4ab3c932588109227a663ec6d697910160405180910390a1505050565b60006109ad6000805160206119158339815191525490565b6001600160a01b03166395f9b3f56040518163ffffffff1660e01b815260040160206040518083038186803b1580156109e557600080fd5b505afa1580156109f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1d9190611604565b905090565b6000610a3a6000805160206119158339815191525490565b6001600160a01b0316826001600160a01b0316149050919050565b6000816001600160a01b0316610a776000805160206119158339815191525490565b6001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b158015610aaf57600080fd5b505afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae79190611604565b6001600160a01b03161492915050565b610b0033610a22565b80610b0f5750610b0f33610a55565b610b2b5760405162461bcd60e51b8152600401610285906117be565b6002545b8015610c2657600160006002610b45838561185a565b81548110610b6357634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020805460ff191690556002610b9c60018361185a565b81548110610bba57634e487b7160e01b600052603260045260246000fd5b600091825260209091200180546001600160a01b03191690556002805480610bf257634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b031916905501905580610c1e816118a1565b915050610b2f565b50565b600054610100900460ff1680610c42575060005460ff16155b610ca55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610285565b600054610100900460ff16158015610cc7576000805461ffff19166101011790555b610cd082611142565b610cf8427f6f55f470bdc9cb5f04223fd822021061668e4dccb43e8727b295106dc9769c8a55565b8015610d0a576000805461ff00191690555b5050565b610d16610995565b6001600160a01b0316816001600160a01b03161415610d665760405162461bcd60e51b815260206004820152600c60248201526b3839903337b93134b23232b760a11b6044820152606401610285565b6000610d70610995565b6001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610da857600080fd5b505afa158015610dbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de09190611604565b9050610dea610995565b6001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2257600080fd5b505afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190611604565b6001600160a01b0316816001600160a01b031614610eaa5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b2103a37b5b2b760991b6044820152606401610285565b610ec6610eb5610995565b6001600160a01b03831690856111f2565b610ece610995565b6001600160a01b031663b6b55f25846040518263ffffffff1660e01b8152600401610efb91815260200190565b600060405180830381600087803b158015610f1557600080fd5b505af1158015610f29573d6000803e3d6000fd5b505050506000610f37610995565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610f7857600080fd5b505afa158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb09190611757565b9050610fcf8382610fbf610995565b6001600160a01b031691906111f2565b826001600160a01b0316637092a063610fe6610995565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561102e57600080fd5b505af1158015611042573d6000803e3d6000fd5b5050505050505050565b6110606001600160a01b03821683856111f2565b604051637092a06360e01b81526001600160a01b03828116600483015260248201859052831690637092a06390604401600060405180830381600087803b1580156110aa57600080fd5b505af11580156110be573d6000803e3d6000fd5b50505050505050565b60006110d38284611842565b9392505050565b6040516001600160a01b03831660248201526044810182905261113d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611316565b505050565b6001600160a01b0381166111875760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610285565b7f19b7d592cea0dfda222f6a4ea5c5a8d018ee9c6b1d0a917483a405de94eb26cd6111be6000805160206119158339815191525490565b604080516001600160a01b03928316815291841660208301520160405180910390a160008051602061191583398151915255565b80158061127b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561124157600080fd5b505afa158015611255573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112799190611757565b155b6112e65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610285565b6040516001600160a01b03831660248201526044810182905261113d90849063095ea7b360e01b90606401611106565b600061136b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113e89092919063ffffffff16565b80519091501561113d5780806020019051810190611389919061171f565b61113d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610285565b60606113f784846000856113ff565b949350505050565b6060824710156114605760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610285565b843b6114ae5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610285565b600080866001600160a01b031685876040516114ca919061176f565b60006040518083038185875af1925050503d8060008114611507576040519150601f19603f3d011682016040523d82523d6000602084013e61150c565b606091505b509150915061151c828286611527565b979650505050505050565b606083156115365750816110d3565b8251156115465782518084602001fd5b8160405162461bcd60e51b8152600401610285919061178b565b803561156b816118ff565b919050565b600082601f830112611580578081fd5b813560206115956115908361181e565b6117ed565b80838252828201915082860187848660051b89010111156115b4578586fd5b855b858110156115db5781356115c9816118ff565b845292840192908401906001016115b6565b5090979650505050505050565b6000602082840312156115f9578081fd5b81356110d3816118ff565b600060208284031215611615578081fd5b81516110d3816118ff565b60008060408385031215611632578081fd5b823561163d816118ff565b946020939093013593505050565b60008060008060808587031215611660578182fd5b843567ffffffffffffffff80821115611677578384fd5b818701915087601f83011261168a578384fd5b8135602061169a6115908361181e565b8083825282820191508286018c848660051b89010111156116b9578889fd5b8896505b848710156116db5780358352600196909601959183019183016116bd565b50985050880135925050808211156116f1578384fd5b506116fe87828801611570565b9350506040850135915061171460608601611560565b905092959194509250565b600060208284031215611730578081fd5b815180151581146110d3578182fd5b600060208284031215611750578081fd5b5035919050565b600060208284031215611768578081fd5b5051919050565b60008251611781818460208701611871565b9190910192915050565b60208152600082518060208401526117aa816040850160208701611871565b601f01601f19169190910160400192915050565b6020808252601590820152743737ba1031b7b73a3937b63632b91037b91033b7bb60591b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715611816576118166118e9565b604052919050565b600067ffffffffffffffff821115611838576118386118e9565b5060051b60200190565b60008219821115611855576118556118d3565b500190565b60008282101561186c5761186c6118d3565b500390565b60005b8381101561188c578181015183820152602001611874565b8381111561189b576000848401525b50505050565b6000816118b0576118b06118d3565b506000190190565b60006000198214156118cc576118cc6118d3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c2657600080fdfe5165972ef41194f06c5007493031d0b927c20741adcb74403b954009fd2c3617a2646970667358221220ed1d4da4a38a9629657979c482a62d939453cdb3d1f79db44bef3acf67e00dbd64736f6c634300080400335165972ef41194f06c5007493031d0b927c20741adcb74403b954009fd2c36176f55f470bdc9cb5f04223fd822021061668e4dccb43e8727b295106dc9769c8a0000000000000000000000006678814c273d5088114b6e40cc49c8db04f9bc29
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b429afeb1161008c578063e13ab69b11610066578063e13ab69b146101c6578063e945cdcd146101ce578063f77c4791146101e1578063ffa1ad74146101f657600080fd5b8063b429afeb14610198578063b58920fa146101ab578063dee1f0e4146101b357600080fd5b806302afd479146100d4578063087198161461010c5780630a7ea13114610137578063325a19f11461014c578063955614081461017d57806395f9b3f514610190575b600080fd5b6100f76100e23660046115e8565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61011f61011a36600461173f565b610227565b6040516001600160a01b039091168152602001610103565b61014a61014536600461164b565b610251565b005b7f6f55f470bdc9cb5f04223fd822021061668e4dccb43e8727b295106dc9769c8a545b604051908152602001610103565b61014a61018b366004611620565b61082f565b61011f610995565b6100f76101a63660046115e8565b610a22565b60025461016f565b6100f76101c13660046115e8565b610a55565b61014a610af7565b61014a6101dc3660046115e8565b610c29565b6000805160206119158339815191525461011f565b61021a604051806040016040528060058152602001640312e312e360dc1b81525081565b604051610103919061178b565b6002818154811061023757600080fd5b6000918252602090912001546001600160a01b0316905081565b61025a33610a22565b80610269575061026933610a55565b61028e5760405162461bcd60e51b8152600401610285906117be565b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156102d057600080fd5b505afa1580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103089190611757565b90508083111561034f5760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b6044820152606401610285565b835185511461038d5760405162461bcd60e51b815260206004820152600a60248201526977726f6e67206461746160b01b6044820152606401610285565b6000805b85518110156107e55760008782815181106103bc57634e487b7160e01b600052603260045260246000fd5b6020026020010151116103ff5760405162461bcd60e51b815260206004820152600b60248201526a4e6f74696679207a65726f60a81b6044820152606401610285565b6001600087838151811061042357634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16156104885760405162461bcd60e51b815260206004820152600e60248201526d111d5c1b1a58d85d19481c1bdbdb60921b6044820152606401610285565b600080516020611915833981519152546001600160a01b031663642194508783815181106104c657634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b81526004016104f991906001600160a01b0391909116815260200190565b60206040518083038186803b15801561051157600080fd5b505afa158015610525573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610549919061171f565b61058c5760405162461bcd60e51b815260206004820152601460248201527315985d5b1d081b9bdd081c9959da5cdd195c995960621b6044820152606401610285565b610594610995565b6001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156105cc57600080fd5b505afa1580156105e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106049190611604565b6001600160a01b0316846001600160a01b0316141561067a5761067587828151811061064057634e487b7160e01b600052603260045260246000fd5b602002602001015187838151811061066857634e487b7160e01b600052603260045260246000fd5b6020026020010151610d0e565b6106d3565b6106d387828151811061069d57634e487b7160e01b600052603260045260246000fd5b60200260200101518783815181106106c557634e487b7160e01b600052603260045260246000fd5b60200260200101518661104c565b60018060008884815181106106f857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600286828151811061075957634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b0390921691909117905586516107d1908890839081106107ba57634e487b7160e01b600052603260045260246000fd5b6020026020010151836110c790919063ffffffff16565b9150806107dd816118b8565b915050610391565b508084146108275760405162461bcd60e51b815260206004820152600f60248201526e57726f6e6720636865636b2073756d60881b6044820152606401610285565b505050505050565b61083833610a22565b80610847575061084733610a55565b6108635760405162461bcd60e51b8152600401610285906117be565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b1580156108a557600080fd5b505afa1580156108b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190611757565b9050818110156109245760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b6044820152606401610285565b61094e61093d6000805160206119158339815191525490565b6001600160a01b03851690846110da565b604080516001600160a01b0385168152602081018490527fc163505caf05ab04e4eb812d39f551812b2b4ab3c932588109227a663ec6d697910160405180910390a1505050565b60006109ad6000805160206119158339815191525490565b6001600160a01b03166395f9b3f56040518163ffffffff1660e01b815260040160206040518083038186803b1580156109e557600080fd5b505afa1580156109f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1d9190611604565b905090565b6000610a3a6000805160206119158339815191525490565b6001600160a01b0316826001600160a01b0316149050919050565b6000816001600160a01b0316610a776000805160206119158339815191525490565b6001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b158015610aaf57600080fd5b505afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae79190611604565b6001600160a01b03161492915050565b610b0033610a22565b80610b0f5750610b0f33610a55565b610b2b5760405162461bcd60e51b8152600401610285906117be565b6002545b8015610c2657600160006002610b45838561185a565b81548110610b6357634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020805460ff191690556002610b9c60018361185a565b81548110610bba57634e487b7160e01b600052603260045260246000fd5b600091825260209091200180546001600160a01b03191690556002805480610bf257634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b031916905501905580610c1e816118a1565b915050610b2f565b50565b600054610100900460ff1680610c42575060005460ff16155b610ca55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610285565b600054610100900460ff16158015610cc7576000805461ffff19166101011790555b610cd082611142565b610cf8427f6f55f470bdc9cb5f04223fd822021061668e4dccb43e8727b295106dc9769c8a55565b8015610d0a576000805461ff00191690555b5050565b610d16610995565b6001600160a01b0316816001600160a01b03161415610d665760405162461bcd60e51b815260206004820152600c60248201526b3839903337b93134b23232b760a11b6044820152606401610285565b6000610d70610995565b6001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610da857600080fd5b505afa158015610dbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de09190611604565b9050610dea610995565b6001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2257600080fd5b505afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190611604565b6001600160a01b0316816001600160a01b031614610eaa5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b2103a37b5b2b760991b6044820152606401610285565b610ec6610eb5610995565b6001600160a01b03831690856111f2565b610ece610995565b6001600160a01b031663b6b55f25846040518263ffffffff1660e01b8152600401610efb91815260200190565b600060405180830381600087803b158015610f1557600080fd5b505af1158015610f29573d6000803e3d6000fd5b505050506000610f37610995565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610f7857600080fd5b505afa158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb09190611757565b9050610fcf8382610fbf610995565b6001600160a01b031691906111f2565b826001600160a01b0316637092a063610fe6610995565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561102e57600080fd5b505af1158015611042573d6000803e3d6000fd5b5050505050505050565b6110606001600160a01b03821683856111f2565b604051637092a06360e01b81526001600160a01b03828116600483015260248201859052831690637092a06390604401600060405180830381600087803b1580156110aa57600080fd5b505af11580156110be573d6000803e3d6000fd5b50505050505050565b60006110d38284611842565b9392505050565b6040516001600160a01b03831660248201526044810182905261113d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611316565b505050565b6001600160a01b0381166111875760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610285565b7f19b7d592cea0dfda222f6a4ea5c5a8d018ee9c6b1d0a917483a405de94eb26cd6111be6000805160206119158339815191525490565b604080516001600160a01b03928316815291841660208301520160405180910390a160008051602061191583398151915255565b80158061127b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561124157600080fd5b505afa158015611255573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112799190611757565b155b6112e65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610285565b6040516001600160a01b03831660248201526044810182905261113d90849063095ea7b360e01b90606401611106565b600061136b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113e89092919063ffffffff16565b80519091501561113d5780806020019051810190611389919061171f565b61113d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610285565b60606113f784846000856113ff565b949350505050565b6060824710156114605760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610285565b843b6114ae5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610285565b600080866001600160a01b031685876040516114ca919061176f565b60006040518083038185875af1925050503d8060008114611507576040519150601f19603f3d011682016040523d82523d6000602084013e61150c565b606091505b509150915061151c828286611527565b979650505050505050565b606083156115365750816110d3565b8251156115465782518084602001fd5b8160405162461bcd60e51b8152600401610285919061178b565b803561156b816118ff565b919050565b600082601f830112611580578081fd5b813560206115956115908361181e565b6117ed565b80838252828201915082860187848660051b89010111156115b4578586fd5b855b858110156115db5781356115c9816118ff565b845292840192908401906001016115b6565b5090979650505050505050565b6000602082840312156115f9578081fd5b81356110d3816118ff565b600060208284031215611615578081fd5b81516110d3816118ff565b60008060408385031215611632578081fd5b823561163d816118ff565b946020939093013593505050565b60008060008060808587031215611660578182fd5b843567ffffffffffffffff80821115611677578384fd5b818701915087601f83011261168a578384fd5b8135602061169a6115908361181e565b8083825282820191508286018c848660051b89010111156116b9578889fd5b8896505b848710156116db5780358352600196909601959183019183016116bd565b50985050880135925050808211156116f1578384fd5b506116fe87828801611570565b9350506040850135915061171460608601611560565b905092959194509250565b600060208284031215611730578081fd5b815180151581146110d3578182fd5b600060208284031215611750578081fd5b5035919050565b600060208284031215611768578081fd5b5051919050565b60008251611781818460208701611871565b9190910192915050565b60208152600082518060208401526117aa816040850160208701611871565b601f01601f19169190910160400192915050565b6020808252601590820152743737ba1031b7b73a3937b63632b91037b91033b7bb60591b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715611816576118166118e9565b604052919050565b600067ffffffffffffffff821115611838576118386118e9565b5060051b60200190565b60008219821115611855576118556118d3565b500190565b60008282101561186c5761186c6118d3565b500390565b60005b8381101561188c578181015183820152602001611874565b8381111561189b576000848401525b50505050565b6000816118b0576118b06118d3565b506000190190565b60006000198214156118cc576118cc6118d3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610c2657600080fdfe5165972ef41194f06c5007493031d0b927c20741adcb74403b954009fd2c3617a2646970667358221220ed1d4da4a38a9629657979c482a62d939453cdb3d1f79db44bef3acf67e00dbd64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006678814c273d5088114b6e40cc49c8db04f9bc29
-----Decoded View---------------
Arg [0] : _controller (address): 0x6678814c273d5088114B6E40cC49C8DB04F9bC29
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006678814c273d5088114b6e40cc49c8db04f9bc29
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.