More Info
Private Name Tags
ContractCreator
Latest 8 from a total of 8 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 11928073 | 25 hrs ago | IN | 0 S | 0.00157454 | ||||
Set Vault | 11927857 | 25 hrs ago | IN | 0 S | 0.00165451 | ||||
Unpause | 11927687 | 25 hrs ago | IN | 0 S | 0.01752619 | ||||
Panic | 11927670 | 25 hrs ago | IN | 0 S | 0.01498398 | ||||
Harvest | 11927620 | 25 hrs ago | IN | 0 S | 0.12172061 | ||||
Harvest | 11927544 | 25 hrs ago | IN | 0 S | 0.1362295 | ||||
Transfer | 11927486 | 25 hrs ago | IN | 0.01 S | 0.00121588 | ||||
Initialize | 11927029 | 25 hrs ago | IN | 0 S | 0.02926429 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
StrategyBalancerV3
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { BaseAllToNativeFactoryStrat } from "../Common/BaseAllToNativeFactoryStrat.sol"; import { IBeefySwapper } from "../../interfaces/beefy/IBeefySwapper.sol"; import { IRewardsGauge } from "../../interfaces/curve/IRewardsGauge.sol"; import { IAuraRewardPool } from "../../interfaces/aura/IAuraRewardPool.sol"; import { IAuraBooster } from "../../interfaces/aura/IAuraBooster.sol"; import { IBalancerVaultV3 } from "../../interfaces/beethovenx/IBalancerVaultV3.sol"; import { IMerklClaimer } from "../../interfaces/merkl/IMerklClaimer.sol"; import { SafeERC20, IERC20 } from "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol"; interface IBalancerPool { function getTokens() external view returns (address[] memory tokens); } interface IPermit2 { function approve(address token, address spender, uint160 amount, uint48 deadline) external; } interface IMinter { function mint(address gauge) external; } // Strategy for Balancer/Aura for Balancer V3 contract StrategyBalancerV3 is BaseAllToNativeFactoryStrat { using SafeERC20 for IERC20; uint256 private constant NOT_AURA = 1234567; bool private useAura; IRewardsGauge public gauge; IAuraBooster public booster; address public rewardPool; IMinter public minter; IBalancerVaultV3 public balancerVault; uint256 public pid; uint256 private depositTokenIndex; uint256 private tokensLength; bool private addingLiquidity; error OnlyBalancerVault(); error AddingLiquidityNotAllowed(); function initialize( address _gauge, address _booster, address _balancerVault, uint256 _pid, address[] calldata _rewards, Addresses calldata _commonAddresses ) public initializer { gauge = IRewardsGauge(_gauge); balancerVault = IBalancerVaultV3(_balancerVault); booster = IAuraBooster(_booster); pid = _pid; if (pid != NOT_AURA) useAura = true; if (useAura) (,,,rewardPool,,) = booster.poolInfo(pid); if (!useAura) minter = IMinter(gauge.bal_pseudo_minter()); __BaseStrategy_init(_commonAddresses, _rewards); address[] memory tokens = IBalancerPool(want).getTokens(); tokensLength = tokens.length; for (uint256 i = 0; i < tokens.length; i++) { if (tokens[i] == depositToken) { depositTokenIndex = i; break; } } _giveAllowances(); } function balanceOfPool() public view override returns (uint bal) { if (useAura) return IAuraRewardPool(rewardPool).balanceOf(address(this)); else return gauge.balanceOf(address(this)); } function stratName() public pure override returns (string memory) { return "BalancerV3"; } function _deposit(uint _amount) internal override { if (_amount > 0) { if (useAura) booster.deposit(pid, _amount, true); else gauge.deposit(_amount); } } function _withdraw(uint _amount) internal override { if (_amount > 0) { if (useAura) IAuraRewardPool(rewardPool).withdrawAndUnwrap(_amount, false); else gauge.withdraw(_amount); } } function _emergencyWithdraw() internal override { _withdraw(balanceOfPool()); } function _claim() internal override { if (useAura) IAuraRewardPool(rewardPool).getReward(); else { if (address(minter) != address(0)) minter.mint(address(this)); gauge.claim_rewards(address(this)); } } /// @notice Claim rewards from the underlying platform function claim( address[] calldata _tokens, uint256[] calldata _amounts, bytes32[][] calldata _proofs ) external { address claimer = address(0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae); address[] memory users = new address[](1); users[0] = address(this); IMerklClaimer(claimer).claim(users, _tokens, _amounts, _proofs); } function _swapNativeToWant() internal override { uint256 nativeBal = IERC20(native).balanceOf(address(this)); if (depositToken != native) IBeefySwapper(swapper).swap(native, depositToken, nativeBal); if (depositToken != want) { uint256 depositBal = IERC20(depositToken).balanceOf(address(this)); addingLiquidity = true; balancerVault.unlock(abi.encodeCall(this.balancerJoin, (depositBal))); } } function _giveAllowances() internal { uint max = type(uint).max; if (useAura) _approve(want, address(booster), max); else _approve(want, address(gauge), max); _approve(native, address(swapper), max); } function _removeAllowances() internal { if (useAura) _approve(want, address(booster), 0); else _approve(want, address(gauge), 0); _approve(native, address(swapper), 0); } function panic() public override onlyManager { pause(); _emergencyWithdraw(); _removeAllowances(); } function pause() public override onlyManager { _pause(); _removeAllowances(); } function unpause() external override onlyManager { _unpause(); _giveAllowances(); deposit(); } function setPid(uint256 _pid, address _gauge, address _booster) external onlyOwner { _emergencyWithdraw(); _removeAllowances(); pid = _pid; if (pid == NOT_AURA) gauge = IRewardsGauge(_gauge); else (,,,rewardPool,,) = booster.poolInfo(pid); if (_booster != address(0)) booster = IAuraBooster(_booster); _giveAllowances(); deposit(); } function _approve(address _token, address _spender, uint amount) internal { IERC20(_token).approve(_spender, amount); } function balancerJoin(uint256 _amountIn) external returns (uint256 bptAmountOut) { if (msg.sender != address(balancerVault)) revert OnlyBalancerVault(); if (!addingLiquidity) revert AddingLiquidityNotAllowed(); uint256[] memory amounts = new uint256[](tokensLength); amounts[depositTokenIndex] = _amountIn; IERC20(depositToken).safeTransfer(address(balancerVault), _amountIn); balancerVault.settle(depositToken, _amountIn); (, bptAmountOut,) = balancerVault.addLiquidity(IBalancerVaultV3.AddLiquidityParams({ pool: want, to: address(this), maxAmountsIn: amounts, minBptAmountOut: 0, kind: IBalancerVaultV3.AddLiquidityKind.UNBALANCED, userData: "" })); addingLiquidity = false; } function _verifyRewardToken(address token) internal view override {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.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)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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 // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../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; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @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); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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 proxied contracts do not make use of 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. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * 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. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IAuraBooster { function deposit(uint256 pid, uint256 amount, bool stake) external returns (bool); function withdraw(uint256 _pid, uint256 _amount) external returns(bool); function earmarkRewards(uint256 _pid) external; function poolInfo(uint256 pid) external view returns ( address lptoken, address token, address gauge, address crvRewards, address stash, bool shutdown ); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.9.0; interface IAuraRewardPool { function deposit(uint256 amount) external; function stake(uint256 amount) external; function withdraw(uint256 amount) external; function earned(address account) external view returns (uint256); function getReward() external; function balanceOf(address account) external view returns (uint256); function stakingToken() external view returns (address); function rewardsToken() external view returns (address); function withdrawAndUnwrap(uint256 _amount, bool claim) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IBeefySwapper { function swap( address fromToken, address toToken, uint256 amountIn ) external returns (uint256 amountOut); function swap( address fromToken, address toToken, uint256 amountIn, uint256 minAmountOut ) external returns (uint256 amountOut); function getAmountOut( address _fromToken, address _toToken, uint256 _amountIn ) external view returns (uint256 amountOut); function swapInfo( address _fromToken, address _toToken ) external view returns ( address router, bytes calldata data, uint256 amountIndex, uint256 minIndex, int8 minAmountSign ); struct SwapInfo { address router; bytes data; uint256 amountIndex; uint256 minIndex; int8 minAmountSign; } } interface ISimplifiedSwapInfo { function swapInfo(address _fromToken, address _toToken) external view returns (address router, bytes calldata data); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IStrategyFactory { function createStrategy(string calldata _strategyName) external returns (address); function native() external view returns (address); function keeper() external view returns (address); function beefyFeeRecipient() external view returns (address); function beefyFeeConfig() external view returns (address); function globalPause() external view returns (bool); function strategyPause(string calldata stratName) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IBalancerVaultV3 { enum AddLiquidityKind { PROPORTIONAL, UNBALANCED, SINGLE_TOKEN_EXACT_OUT, DONATION, CUSTOM } struct AddLiquidityParams { address pool; address to; uint256[] maxAmountsIn; uint256 minBptAmountOut; AddLiquidityKind kind; bytes userData; } function addLiquidity( AddLiquidityParams memory params ) external returns (uint256[] memory amountsIn, uint256 bptAmountOut, bytes memory returnData); function unlock(bytes calldata data) external returns (bytes memory result); function settle(address token, uint256 amountHint) external returns (uint256 credit); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IFeeConfig { struct FeeCategory { uint256 total; uint256 beefy; uint256 call; uint256 strategist; string label; bool active; } struct AllFees { FeeCategory performance; uint256 deposit; uint256 withdraw; } function getFees(address strategy) external view returns (FeeCategory memory); function stratFeeId(address strategy) external view returns (uint256); function setStratFeeId(uint256 feeId) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.9.0; interface IWrappedNative { function deposit() external payable; function withdraw(uint256 wad) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.9.0; interface IRewardsGauge { function balanceOf(address account) external view returns (uint256); function claimable_reward(address _addr, address _token) external view returns (uint256); function claim_rewards(address _addr) external; function deposit(uint256 _value) external; function withdraw(uint256 _value) external; function reward_contract() external view returns (address); function bal_pseudo_minter() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IMerklClaimer { function claim( address[] calldata users, address[] calldata tokens, uint256[] calldata amounts, bytes32[][] calldata proofs ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin-5/contracts/token/ERC20/utils/SafeERC20.sol"; import "../../interfaces/beefy/IBeefySwapper.sol"; import "../../interfaces/beefy/IStrategyFactory.sol"; import "../../interfaces/common/IFeeConfig.sol"; import "../../interfaces/common/IWrappedNative.sol"; abstract contract BaseAllToNativeFactoryStrat is OwnableUpgradeable, PausableUpgradeable { using SafeERC20 for IERC20; struct Addresses { address want; address depositToken; address factory; address vault; address swapper; address strategist; } address[] public rewards; mapping(address => uint) public minAmounts; // tokens minimum amount to be swapped IStrategyFactory public factory; address public vault; address public swapper; address public strategist; address public want; address public native; address public depositToken; uint256 public lastHarvest; uint256 public totalLocked; uint256 public lockDuration; bool public harvestOnDeposit; uint256 constant DIVISOR = 1 ether; event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl); event Deposit(uint256 tvl); event Withdraw(uint256 tvl); event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees); event SetVault(address vault); event SetSwapper(address swapper); event SetStrategist(address strategist); error StrategyPaused(); error NotManager(); modifier ifNotPaused() { if (paused() || factory.globalPause() || factory.strategyPause(stratName())) revert StrategyPaused(); _; } modifier onlyManager() { _checkManager(); _; } function _checkManager() internal view { if (msg.sender != owner() && msg.sender != keeper()) revert NotManager(); } function __BaseStrategy_init(Addresses memory _addresses, address[] memory _rewards) internal onlyInitializing { __Ownable_init(); __Pausable_init(); want = _addresses.want; factory = IStrategyFactory(_addresses.factory); vault = _addresses.vault; swapper = _addresses.swapper; strategist = _addresses.strategist; native = factory.native(); for (uint i; i < _rewards.length; i++) { addReward(_rewards[i]); } setDepositToken(_addresses.depositToken); lockDuration = 1 days; } function stratName() public view virtual returns (string memory); function balanceOfPool() public view virtual returns (uint); function _deposit(uint amount) internal virtual; function _withdraw(uint amount) internal virtual; function _emergencyWithdraw() internal virtual; function _claim() internal virtual; function _verifyRewardToken(address token) internal view virtual; // puts the funds to work function deposit() public ifNotPaused { uint256 wantBal = balanceOfWant(); if (wantBal > 0) { _deposit(wantBal); emit Deposit(balanceOf()); } } function withdraw(uint256 _amount) external { require(msg.sender == vault, "!vault"); uint256 wantBal = balanceOfWant(); if (wantBal < _amount) { _withdraw(_amount - wantBal); wantBal = balanceOfWant(); } if (wantBal > _amount) { wantBal = _amount; } IERC20(want).safeTransfer(vault, wantBal); emit Withdraw(balanceOf()); } function beforeDeposit() external virtual { if (harvestOnDeposit) { require(msg.sender == vault, "!vault"); _harvest(tx.origin, true); } } function claim() external virtual { _claim(); } function harvest() external virtual { _harvest(tx.origin, false); } function harvest(address callFeeRecipient) external virtual { _harvest(callFeeRecipient, false); } // compounds earnings and charges performance fee function _harvest(address callFeeRecipient, bool onDeposit) internal ifNotPaused { _claim(); _swapRewardsToNative(); uint256 nativeBal = IERC20(native).balanceOf(address(this)); if (nativeBal > minAmounts[native]) { _chargeFees(callFeeRecipient); _swapNativeToWant(); uint256 wantHarvested = balanceOfWant(); totalLocked = wantHarvested + lockedProfit(); lastHarvest = block.timestamp; if (!onDeposit) { deposit(); } emit StratHarvest(msg.sender, wantHarvested, balanceOf()); } } function _swapRewardsToNative() internal virtual { for (uint i; i < rewards.length; ++i) { address token = rewards[i]; if (token == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)) { IWrappedNative(native).deposit{value: address(this).balance}(); } else { uint amount = IERC20(token).balanceOf(address(this)); if (amount > minAmounts[token]) { _swap(token, native, amount); } } } } // performance fees function _chargeFees(address callFeeRecipient) internal { IFeeConfig.FeeCategory memory fees = beefyFeeConfig().getFees(address(this)); uint256 nativeBal = IERC20(native).balanceOf(address(this)) * fees.total / DIVISOR; uint256 callFeeAmount = nativeBal * fees.call / DIVISOR; IERC20(native).safeTransfer(callFeeRecipient, callFeeAmount); uint256 beefyFeeAmount = nativeBal * fees.beefy / DIVISOR; IERC20(native).safeTransfer(beefyFeeRecipient(), beefyFeeAmount); uint256 strategistFeeAmount = nativeBal * fees.strategist / DIVISOR; IERC20(native).safeTransfer(strategist, strategistFeeAmount); emit ChargedFees(callFeeAmount, beefyFeeAmount, strategistFeeAmount); } function _swapNativeToWant() internal virtual { if (depositToken == address(0)) { _swap(native, want); } else { if (depositToken != native) { _swap(native, depositToken); } _swap(depositToken, want); } } function _swap(address tokenFrom, address tokenTo) internal { uint bal = IERC20(tokenFrom).balanceOf(address(this)); _swap(tokenFrom, tokenTo, bal); } function _swap(address tokenFrom, address tokenTo, uint amount) internal { if (tokenFrom != tokenTo) { IERC20(tokenFrom).forceApprove(swapper, amount); IBeefySwapper(swapper).swap(tokenFrom, tokenTo, amount); } } function rewardsLength() external view returns (uint) { return rewards.length; } function addReward(address _token) public onlyManager { require(_token != want, "!want"); require(_token != native, "!native"); _verifyRewardToken(_token); rewards.push(_token); } function removeReward(uint i) external onlyManager { rewards[i] = rewards[rewards.length - 1]; rewards.pop(); } function resetRewards() external onlyManager { delete rewards; } function setRewardMinAmount(address token, uint minAmount) external onlyManager { minAmounts[token] = minAmount; } function setDepositToken(address token) public onlyManager { if (token == address(0)) { depositToken = address(0); return; } // require(token != want, "!want"); _verifyRewardToken(token); depositToken = token; } function lockedProfit() public view returns (uint256) { if (lockDuration == 0) return 0; uint256 elapsed = block.timestamp - lastHarvest; uint256 remaining = elapsed < lockDuration ? lockDuration - elapsed : 0; return totalLocked * remaining / lockDuration; } // calculate the total underlaying 'want' held by the strat. function balanceOf() public view returns (uint256) { return balanceOfWant() + balanceOfPool() - lockedProfit(); } // it calculates how much 'want' this contract holds. function balanceOfWant() public view returns (uint256) { return IERC20(want).balanceOf(address(this)); } function setHarvestOnDeposit(bool _harvestOnDeposit) public onlyManager { harvestOnDeposit = _harvestOnDeposit; if (harvestOnDeposit) { lockDuration = 0; } else { lockDuration = 1 days; } } function setLockDuration(uint _duration) external onlyManager { lockDuration = _duration; } function rewardsAvailable() external view virtual returns (uint) { return 0; } function callReward() external view virtual returns (uint) { return 0; } function depositFee() public view virtual returns (uint) { return 0; } function withdrawFee() public view virtual returns (uint) { return 0; } // called as part of strat migration. Sends all the available funds back to the vault. function retireStrat() external { require(msg.sender == vault, "!vault"); _emergencyWithdraw(); IERC20(want).transfer(vault, balanceOfWant()); } // pauses deposits and withdraws all funds from third party systems. function panic() public virtual onlyManager { pause(); _emergencyWithdraw(); } function pause() public virtual onlyManager { _pause(); } function unpause() external virtual onlyManager { _unpause(); deposit(); } function keeper() public view returns (address) { return factory.keeper(); } function beefyFeeConfig() public view returns (IFeeConfig) { return IFeeConfig(factory.beefyFeeConfig()); } function beefyFeeRecipient() public view returns (address) { return factory.beefyFeeRecipient(); } function getAllFees() external view returns (IFeeConfig.AllFees memory) { return IFeeConfig.AllFees(beefyFeeConfig().getFees(address(this)), depositFee(), withdrawFee()); } function setVault(address _vault) external onlyOwner { vault = _vault; emit SetVault(_vault); } function setSwapper(address _swapper) external onlyOwner { swapper = _swapper; emit SetSwapper(_swapper); } function setStrategist(address _strategist) external { require(msg.sender == strategist, "!strategist"); strategist = _strategist; emit SetStrategist(_strategist); } receive () payable external {} uint256[49] private __gap; }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"AddingLiquidityNotAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"NotManager","type":"error"},{"inputs":[],"name":"OnlyBalancerVault","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"StrategyPaused","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"callFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beefyFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"strategistFees","type":"uint256"}],"name":"ChargedFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"strategist","type":"address"}],"name":"SetStrategist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"swapper","type":"address"}],"name":"SetSwapper","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"}],"name":"SetVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"harvester","type":"address"},{"indexed":false,"internalType":"uint256","name":"wantHarvested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"StratHarvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"bal","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfWant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"balancerJoin","outputs":[{"internalType":"uint256","name":"bptAmountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"balancerVault","outputs":[{"internalType":"contract IBalancerVaultV3","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beefyFeeConfig","outputs":[{"internalType":"contract IFeeConfig","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beefyFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beforeDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"booster","outputs":[{"internalType":"contract IAuraBooster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes32[][]","name":"_proofs","type":"bytes32[][]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IStrategyFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gauge","outputs":[{"internalType":"contract IRewardsGauge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllFees","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"beefy","type":"uint256"},{"internalType":"uint256","name":"call","type":"uint256"},{"internalType":"uint256","name":"strategist","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct IFeeConfig.FeeCategory","name":"performance","type":"tuple"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"uint256","name":"withdraw","type":"uint256"}],"internalType":"struct IFeeConfig.AllFees","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"callFeeRecipient","type":"address"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestOnDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"},{"internalType":"address","name":"_booster","type":"address"},{"internalType":"address","name":"_balancerVault","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address[]","name":"_rewards","type":"address[]"},{"components":[{"internalType":"address","name":"want","type":"address"},{"internalType":"address","name":"depositToken","type":"address"},{"internalType":"address","name":"factory","type":"address"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"swapper","type":"address"},{"internalType":"address","name":"strategist","type":"address"}],"internalType":"struct BaseAllToNativeFactoryStrat.Addresses","name":"_commonAddresses","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedProfit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"contract IMinter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"native","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"removeReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retireStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"setDepositToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_harvestOnDeposit","type":"bool"}],"name":"setHarvestOnDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setLockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_gauge","type":"address"},{"internalType":"address","name":"_booster","type":"address"}],"name":"setPid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"name":"setRewardMinAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapper","type":"address"}],"name":"setSwapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stratName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b506140cb806100206000396000f3fe6080604052600436106103a65760003560e01c80638456cb59116101e7578063bbb356d51161010d578063e7a7250a116100a0578063f2fde38b1161006f578063f2fde38b146109c2578063f301af42146109e2578063fb61778714610a02578063fbfa77cf14610a1757600080fd5b8063e7a7250a14610699578063e941fa7814610699578063f106845414610996578063f1a392da146109ac57600080fd5b8063c6def076116100dc578063c6def07614610921578063c7b9d53014610941578063c89039c514610961578063d0e30db01461098157600080fd5b8063bbb356d5146108b7578063c1a3d44c146108cc578063c45a0155146108e1578063c553173f1461090157600080fd5b80639c82f2a411610185578063aced166111610154578063aced16611461084b578063ad29f5da14610860578063b20feaaf14610875578063b73be3a51461089757600080fd5b80639c82f2a4146107c65780639c9b2e21146107e6578063a6f19c8414610806578063a7e9ca821461082b57600080fd5b80638e145459116101c15780638e1454591461076457806397fd323d146106995780639b9363a5146107795780639c5e52d51461079957600080fd5b80638456cb59146107175780638912cb8b1461072c5780638da5cb5b1461074657600080fd5b80634641257d116102cc578063573fef0a1161026a5780636817031b116102395780636817031b146106ad5780636b740cc8146106cd578063715018a6146106ed578063722713f71461070257600080fd5b8063573fef0a146106405780635c975abb1461065557806366666aa91461067957806367a527931461069957600080fd5b80634e71d92d116102a65780634e71d92d146105d35780634eb665af146105e85780635064010a14610608578063568914121461062a57600080fd5b80634641257d146105945780634700d305146105a95780634746fb55146105be57600080fd5b8063158274a5116103445780632e1a7d4d116103135780632e1a7d4d1461052a5780633f4ba83a1461054a5780634440cecd1461055f57806344b813961461057f57600080fd5b8063158274a5146104aa5780631f1fcd51146104ca5780631fe4a686146104ea5780632b3297f91461050a57600080fd5b80630e5c011e116103805780630e5c011e146104355780630e8fbb5a14610455578063115880861461047557806311b0b42d1461048a57600080fd5b806304554443146103b257806307546172146103db5780630c4ed7991461041357600080fd5b366103ad57005b600080fd5b3480156103be57600080fd5b506103c860a25481565b6040519081526020015b60405180910390f35b3480156103e757600080fd5b5060d8546103fb906001600160a01b031681565b6040516001600160a01b0390911681526020016103d2565b34801561041f57600080fd5b5061043361042e36600461352b565b610a37565b005b34801561044157600080fd5b5061043361045036600461352b565b610a7f565b34801561046157600080fd5b50610433610470366004613556565b610a8a565b34801561048157600080fd5b506103c8610abd565b34801561049657600080fd5b50609e546103fb906001600160a01b031681565b3480156104b657600080fd5b5060d9546103fb906001600160a01b031681565b3480156104d657600080fd5b50609d546103fb906001600160a01b031681565b3480156104f657600080fd5b50609c546103fb906001600160a01b031681565b34801561051657600080fd5b50609b546103fb906001600160a01b031681565b34801561053657600080fd5b50610433610545366004613573565b610b71565b34801561055657600080fd5b50610433610c3b565b34801561056b57600080fd5b5061043361057a36600461358c565b610c5d565b34801561058b57600080fd5b506103c8610d86565b3480156105a057600080fd5b50610433610dee565b3480156105b557600080fd5b50610433610df9565b3480156105ca57600080fd5b506103fb610e19565b3480156105df57600080fd5b50610433610e87565b3480156105f457600080fd5b50610433610603366004613573565b610e8f565b34801561061457600080fd5b5061061d610e9c565b6040516103d2919061361e565b34801561063657600080fd5b506103c860a15481565b34801561064c57600080fd5b50610433610ec0565b34801561066157600080fd5b5060655460ff165b60405190151581526020016103d2565b34801561068557600080fd5b5060d7546103fb906001600160a01b031681565b3480156106a557600080fd5b5060006103c8565b3480156106b957600080fd5b506104336106c836600461352b565b610f00565b3480156106d957600080fd5b506103c86106e8366004613573565b610f5d565b3480156106f957600080fd5b50610433611176565b34801561070e57600080fd5b506103c8611188565b34801561072357600080fd5b506104336111b6565b34801561073857600080fd5b5060a3546106699060ff1681565b34801561075257600080fd5b506033546001600160a01b03166103fb565b34801561077057600080fd5b506103fb6111c6565b34801561078557600080fd5b5061043361079436600461367c565b611210565b3480156107a557600080fd5b506103c86107b436600461352b565b60986020526000908152604090205481565b3480156107d257600080fd5b506104336107e136600461352b565b6115f9565b3480156107f257600080fd5b5061043361080136600461352b565b61164f565b34801561081257600080fd5b5060d5546103fb9061010090046001600160a01b031681565b34801561083757600080fd5b5061043361084636600461371d565b611737565b34801561085757600080fd5b506103fb61175b565b34801561086c57600080fd5b506104336117a5565b34801561088157600080fd5b5061088a6117b9565b6040516103d29190613749565b3480156108a357600080fd5b506104336108b23660046137c6565b611857565b3480156108c357600080fd5b506097546103c8565b3480156108d857600080fd5b506103c8611927565b3480156108ed57600080fd5b506099546103fb906001600160a01b031681565b34801561090d57600080fd5b5061043361091c366004613573565b611958565b34801561092d57600080fd5b5060d6546103fb906001600160a01b031681565b34801561094d57600080fd5b5061043361095c36600461352b565b611a10565b34801561096d57600080fd5b50609f546103fb906001600160a01b031681565b34801561098d57600080fd5b50610433611aa6565b3480156109a257600080fd5b506103c860da5481565b3480156109b857600080fd5b506103c860a05481565b3480156109ce57600080fd5b506104336109dd36600461352b565b611c15565b3480156109ee57600080fd5b506103fb6109fd366004613573565b611c8b565b348015610a0e57600080fd5b50610433611cb5565b348015610a2357600080fd5b50609a546103fb906001600160a01b031681565b610a3f611d77565b6001600160a01b038116610a6057609f80546001600160a01b031916905550565b609f80546001600160a01b0319166001600160a01b0383161790555b50565b610a7c816000611dc9565b610a92611d77565b60a3805460ff191682151590811790915560ff1615610ab357600060a25550565b6201518060a25550565b60d55460009060ff1615610b3d5760d7546040516370a0823160e01b81523060048201526001600160a01b03909116906370a08231906024015b602060405180830381865afa158015610b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b38919061385f565b905090565b60d5546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401610af7565b609a546001600160a01b03163314610ba45760405162461bcd60e51b8152600401610b9b90613878565b60405180910390fd5b6000610bae611927565b905081811015610bd557610bca610bc582846138ae565b612014565b610bd2611927565b90505b81811115610be05750805b609a54609d54610bfd916001600160a01b039182169116836120c3565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d610c26611188565b60405190815260200160405180910390a15050565b610c43611d77565b610c4b612122565b610c53612174565b610c5b611aa6565b565b610c656121e4565b610c6d61223e565b610c75612249565b60da8390556212d686198301610caa5760d58054610100600160a81b0319166101006001600160a01b03851602179055610d46565b60d65460da54604051631526fe2760e01b81526001600160a01b0390921691631526fe2791610cdf9160040190815260200190565b60c060405180830381865afa158015610cfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2091906138d1565b505060d780546001600160a01b0319166001600160a01b03929092169190911790555050505b6001600160a01b03811615610d715760d680546001600160a01b0319166001600160a01b0383161790555b610d79612174565b610d81611aa6565b505050565b600060a254600003610d985750600090565b600060a05442610da891906138ae565b9050600060a2548210610dbc576000610dca565b8160a254610dca91906138ae565b905060a2548160a154610ddd9190613958565b610de7919061396f565b9250505090565b610c5b326000611dc9565b610e01611d77565b610e096111b6565b610e1161223e565b610c5b612249565b60995460408051634746fb5560e01b815290516000926001600160a01b031691634746fb559160048083019260209291908290030181865afa158015610e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b389190613991565b610c5b6122b8565b610e97611d77565b60a255565b60408051808201909152600a81526942616c616e636572563360b01b602082015290565b60a35460ff1615610c5b57609a546001600160a01b03163314610ef55760405162461bcd60e51b8152600401610b9b90613878565b610c5b326001611dc9565b610f086121e4565b609a80546001600160a01b0319166001600160a01b0383169081179091556040519081527fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f30906020015b60405180910390a150565b60d9546000906001600160a01b03163314610f8b5760405163249a7c6360e21b815260040160405180910390fd5b60dd5460ff16610fae57604051633eee08c760e01b815260040160405180910390fd5b600060dc546001600160401b03811115610fca57610fca6139ae565b604051908082528060200260200182016040528015610ff3578160200160208202803683370190505b509050828160db548151811061100b5761100b6139c4565b602090810291909101015260d954609f54611033916001600160a01b039182169116856123e5565b60d954609f546040516315afd40960e01b81526001600160a01b039182166004820152602481018690529116906315afd409906044016020604051808303816000875af1158015611088573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ac919061385f565b5060d9546040805160c081018252609d546001600160a01b039081168252306020808401919091528284018690526000606084018190526001608085015284519182018552815260a083015291516312bca7b160e21b81529190921691634af29ec49161111c91906004016139fc565b6000604051808303816000875af115801561113b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111639190810190613b88565b5060dd805460ff19169055949350505050565b61117e6121e4565b610c5b6000612437565b6000611192610d86565b61119a610abd565b6111a2611927565b6111ac9190613c51565b610b3891906138ae565b6111be611d77565b610e11612489565b60995460408051638e14545960e01b815290516000926001600160a01b031691638e1454599160048083019260209291908290030181865afa158015610e63573d6000803e3d6000fd5b600054610100900460ff16158080156112305750600054600160ff909116105b8061124a5750303b15801561124a575060005460ff166001145b6112ad5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b9b565b6000805460ff1916600117905580156112d0576000805461ff0019166101001790555b60d580546001600160a01b03808b1661010002610100600160a81b03199092169190911790915560d980548883166001600160a01b03199182161790915560d68054928a169290911691909117905560da8590556212d687851461133c5760d5805460ff191660011790555b60d55460ff16156113e35760d65460da54604051631526fe2760e01b81526001600160a01b0390921691631526fe279161137c9160040190815260200190565b60c060405180830381865afa158015611399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bd91906138d1565b505060d780546001600160a01b0319166001600160a01b03929092169190911790555050505b60d55460ff166114855760d560019054906101000a90046001600160a01b03166001600160a01b03166339f4caba6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611440573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114649190613991565b60d880546001600160a01b0319166001600160a01b03929092169190911790555b6114d061149736849003840184613c64565b8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506124c692505050565b609d546040805163154d950160e31b815290516000926001600160a01b03169163aa6ca80891600480830192869291908290030181865afa158015611519573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115419190810190613cf1565b805160dc55905060005b815181101561159f57609f5482516001600160a01b0390911690839083908110611577576115776139c4565b60200260200101516001600160a01b0316036115975760db81905561159f565b60010161154b565b506115a8612174565b5080156115ef576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6116016121e4565b609b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f211f06c051495b535b79192c1a4531d819d569657ff4bd16daa8e9e5e6ed2bfd90602001610f52565b611657611d77565b609d546001600160a01b039081169082160361169d5760405162461bcd60e51b8152602060048201526005602482015264085dd85b9d60da1b6044820152606401610b9b565b609e546001600160a01b03908116908216036116e55760405162461bcd60e51b8152602060048201526007602482015266216e617469766560c81b6044820152606401610b9b565b609780546001810182556000919091527f354a83ed9988f79f6038d4c7a7dadbad8af32f4ad6df893e0e5807a1b1944ff90180546001600160a01b0319166001600160a01b0392909216919091179055565b61173f611d77565b6001600160a01b03909116600090815260986020526040902055565b6099546040805163aced166160e01b815290516000926001600160a01b03169163aced16619160048083019260209291908290030181865afa158015610e63573d6000803e3d6000fd5b6117ad611d77565b610c5b60976000613485565b6117c16134a3565b60405180606001604052806117d4610e19565b604051639af608c960e01b81523060048201526001600160a01b039190911690639af608c990602401600060405180830381865afa15801561181a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118429190810190613d7f565b81526020016000815260200160009052919050565b604080516001808252818301909252733ef3d8ba38ebe18db133cec108f4d14ce00dd9ae91600091906020808301908036833701905050905030816000815181106118a4576118a46139c4565b6001600160a01b0392831660209182029290920101526040516301c7ba5760e61b8152908316906371ee95c0906118eb9084908c908c908c908c908c908c90600401613f02565b600060405180830381600087803b15801561190557600080fd5b505af1158015611919573d6000803e3d6000fd5b505050505050505050505050565b609d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401610af7565b611960611d77565b60978054611970906001906138ae565b81548110611980576119806139c4565b600091825260209091200154609780546001600160a01b0390921691839081106119ac576119ac6139c4565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060978054806119eb576119eb613fbf565b600082815260209020810160001990810180546001600160a01b031916905501905550565b609c546001600160a01b03163314611a585760405162461bcd60e51b815260206004820152600b60248201526a085cdd1c985d1959da5cdd60aa1b6044820152606401610b9b565b609c80546001600160a01b0319166001600160a01b0383169081179091556040519081527f46d58e3fa07bf19b1d27240f0e286b27e9f7c1b0d88933333fe833b60eec541290602001610f52565b60655460ff1680611b295750609960009054906101000a90046001600160a01b03166001600160a01b031663f12d54d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b299190613fd5565b80611ba557506099546001600160a01b031663de73a594611b48610e9c565b6040518263ffffffff1660e01b8152600401611b64919061361e565b602060405180830381865afa158015611b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba59190613fd5565b15611bc35760405163e628b94960e01b815260040160405180910390fd5b6000611bcd611927565b90508015610a7c57611bde8161263b565b7f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e38426611c07611188565b604051908152602001610f52565b611c1d6121e4565b6001600160a01b038116611c825760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b9b565b610a7c81612437565b60978181548110611c9b57600080fd5b6000918252602090912001546001600160a01b0316905081565b609a546001600160a01b03163314611cdf5760405162461bcd60e51b8152600401610b9b90613878565b611ce761223e565b609d54609a546001600160a01b039182169163a9059cbb9116611d08611927565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611d53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7c9190613fd5565b6033546001600160a01b03163314801590611dab5750611d9561175b565b6001600160a01b0316336001600160a01b031614155b15610c5b5760405163607e454560e11b815260040160405180910390fd5b60655460ff1680611e4c5750609960009054906101000a90046001600160a01b03166001600160a01b031663f12d54d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4c9190613fd5565b80611ec857506099546001600160a01b031663de73a594611e6b610e9c565b6040518263ffffffff1660e01b8152600401611e87919061361e565b602060405180830381865afa158015611ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec89190613fd5565b15611ee65760405163e628b94960e01b815260040160405180910390fd5b611eee6122b8565b611ef6612706565b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f63919061385f565b609e546001600160a01b0316600090815260986020526040902054909150811115610d8157611f918361287a565b611f99612a97565b6000611fa3611927565b9050611fad610d86565b611fb79082613c51565b60a1554260a05582611fcb57611fcb611aa6565b337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f9241082611ff6611188565b6040805192835260208301919091520160405180910390a250505050565b8015610a7c5760d55460ff161561208e5760d754604051636197390160e11b815260048101839052600060248201526001600160a01b039091169063c32e7202906044015b600060405180830381600087803b15801561207357600080fd5b505af1158015612087573d6000803e3d6000fd5b5050505050565b60d554604051632e1a7d4d60e01b8152600481018390526101009091046001600160a01b031690632e1a7d4d90602401612059565b6040516001600160a01b03838116602483015260448201839052610d8191859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612ce7565b61212a612d4a565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60d5546000199060ff16156121a557609d5460d6546121a0916001600160a01b03908116911683612d93565b6121c7565b609d5460d5546121c7916001600160a01b039081169161010090041683612d93565b609e54609b54610a7c916001600160a01b03908116911683612d93565b6033546001600160a01b03163314610c5b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b9b565b610c5b610bc5610abd565b60d55460ff161561227757609d5460d654612272916001600160a01b0390811691166000612d93565b61229a565b609d5460d55461229a916001600160a01b03908116916101009004166000612d93565b609e54609b54610c5b916001600160a01b0390811691166000612d93565b60d55460ff161561232d5760d760009054906101000a90046001600160a01b03166001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561231357600080fd5b505af1158015612327573d6000803e3d6000fd5b50505050565b60d8546001600160a01b03161561239c5760d8546040516335313c2160e11b81523060048201526001600160a01b0390911690636a62784290602401600060405180830381600087803b15801561238357600080fd5b505af1158015612397573d6000803e3d6000fd5b505050505b60d554604051634274debf60e11b81523060048201526101009091046001600160a01b0316906384e9bd7e90602401600060405180830381600087803b15801561231357600080fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d81908490612e06565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612491612ed8565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121573390565b600054610100900460ff166124ed5760405162461bcd60e51b8152600401610b9b90613ff2565b6124f5612f1e565b6124fd612f4d565b8151609d80546001600160a01b03199081166001600160a01b039384161790915560408085015160998054841691851691821790556060860151609a805485169186169190911790556080860151609b8054851691861691909117905560a0860151609c805490941694169390931790915580516311b0b42d60e01b815290516311b0b42d916004818101926020929091908290030181865afa1580156125a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125cc9190613991565b609e80546001600160a01b0319166001600160a01b039290921691909117905560005b81518110156126225761261a82828151811061260d5761260d6139c4565b602002602001015161164f565b6001016125ef565b506126308260200151610a37565b50506201518060a255565b8015610a7c5760d55460ff16156126d15760d65460da546040516321d0683360e11b8152600481019190915260248101839052600160448201526001600160a01b03909116906343a0d066906064016020604051808303816000875af11580156126a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126cd9190613fd5565b5050565b60d55460405163b6b55f2560e01b8152600481018390526101009091046001600160a01b03169063b6b55f2590602401612059565b60005b609754811015610a7c57600060978281548110612728576127286139c4565b6000918252602090912001546001600160a01b0316905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed1981016127c957609e60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b1580156127ab57600080fd5b505af11580156127bf573d6000803e3d6000fd5b5050505050612871565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015612810573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612834919061385f565b6001600160a01b03831660009081526098602052604090205490915081111561286f57609e5461286f9083906001600160a01b031683612f7c565b505b50600101612709565b6000612884610e19565b604051639af608c960e01b81523060048201526001600160a01b039190911690639af608c990602401600060405180830381865afa1580156128ca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526128f29190810190613d7f565b8051609e546040516370a0823160e01b8152306004820152929350600092670de0b6b3a764000092916001600160a01b0316906370a0823190602401602060405180830381865afa15801561294b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061296f919061385f565b6129799190613958565b612983919061396f565b90506000670de0b6b3a76400008360400151836129a09190613958565b6129aa919061396f565b609e549091506129c4906001600160a01b031685836120c3565b6000670de0b6b3a76400008460200151846129df9190613958565b6129e9919061396f565b9050612a096129f66111c6565b609e546001600160a01b031690836120c3565b6000670de0b6b3a7640000856060015185612a249190613958565b612a2e919061396f565b609c54609e54919250612a4e916001600160a01b039081169116836120c3565b60408051848152602081018490529081018290527fd255b592c7f268a73e534da5219a60ff911b4cf6daae21c7d20527dd657bd99a9060600160405180910390a1505050505050565b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b04919061385f565b609e54609f549192506001600160a01b03918216911614612ba557609b54609e54609f54604051630df791e560e41b81526001600160a01b03928316600482015290821660248201526044810184905291169063df791e50906064016020604051808303816000875af1158015612b7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ba3919061385f565b505b609d54609f546001600160a01b03908116911614610a7c57609f546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612c06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c2a919061385f565b60dd8054600160ff1990911617905560d95460408051602480820185905282518083039091018152604490910182526020810180516001600160e01b0316630d6e819960e31b17905290516348c8949160e01b81529293506001600160a01b03909116916348c8949191612ca09160040161361e565b6000604051808303816000875af1158015612cbf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d81919081019061403d565b6000612cfc6001600160a01b0384168361302e565b90508051600014158015612d21575080806020019051810190612d1f9190613fd5565b155b15610d8157604051635274afe760e01b81526001600160a01b0384166004820152602401610b9b565b60655460ff16610c5b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b9b565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b3906044016020604051808303816000875af1158015612de2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123279190613fd5565b6000612e5b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130459092919063ffffffff16565b805190915015610d815780806020019051810190612e799190613fd5565b610d815760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b9b565b60655460ff1615610c5b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b9b565b600054610100900460ff16612f455760405162461bcd60e51b8152600401610b9b90613ff2565b610c5b61305e565b600054610100900460ff16612f745760405162461bcd60e51b8152600401610b9b90613ff2565b610c5b61308e565b816001600160a01b0316836001600160a01b031614610d8157609b54612faf906001600160a01b038581169116836130c1565b609b54604051630df791e560e41b81526001600160a01b0385811660048301528481166024830152604482018490529091169063df791e50906064016020604051808303816000875af115801561300a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612327919061385f565b606061303c83836000613151565b90505b92915050565b606061305484846000856131ee565b90505b9392505050565b600054610100900460ff166130855760405162461bcd60e51b8152600401610b9b90613ff2565b610c5b33612437565b600054610100900460ff166130b55760405162461bcd60e51b8152600401610b9b90613ff2565b6065805460ff19169055565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052613112848261331f565b612327576040516001600160a01b0384811660248301526000604483015261314791869182169063095ea7b3906064016120f0565b6123278482612ce7565b6060814710156131765760405163cd78605960e01b8152306004820152602401610b9b565b600080856001600160a01b031684866040516131929190614079565b60006040518083038185875af1925050503d80600081146131cf576040519150601f19603f3d011682016040523d82523d6000602084013e6131d4565b606091505b50915091506131e48683836133c7565b9695505050505050565b60608247101561324f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610b9b565b6001600160a01b0385163b6132a65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b9b565b600080866001600160a01b031685876040516132c29190614079565b60006040518083038185875af1925050503d80600081146132ff576040519150601f19603f3d011682016040523d82523d6000602084013e613304565b606091505b5091509150613314828286613423565b979650505050505050565b6000806000846001600160a01b03168460405161333c9190614079565b6000604051808303816000865af19150503d8060008114613379576040519150601f19603f3d011682016040523d82523d6000602084013e61337e565b606091505b50915091508180156133a85750805115806133a85750808060200190518101906133a89190613fd5565b80156133be57506000856001600160a01b03163b115b95945050505050565b6060826133dc576133d78261345c565b613057565b81511580156133f357506001600160a01b0384163b155b1561341c57604051639996b31560e01b81526001600160a01b0385166004820152602401610b9b565b5080613057565b60608315613432575081613057565b8251156134425782518084602001fd5b8160405162461bcd60e51b8152600401610b9b919061361e565b80511561346c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5080546000825590600052602060002090810190610a7c91906134fd565b60405180606001604052806134e96040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b815260200160008152602001600081525090565b5b8082111561351257600081556001016134fe565b5090565b6001600160a01b0381168114610a7c57600080fd5b60006020828403121561353d57600080fd5b813561305781613516565b8015158114610a7c57600080fd5b60006020828403121561356857600080fd5b813561305781613548565b60006020828403121561358557600080fd5b5035919050565b6000806000606084860312156135a157600080fd5b8335925060208401356135b381613516565b915060408401356135c381613516565b809150509250925092565b60005b838110156135e95781810151838201526020016135d1565b50506000910152565b6000815180845261360a8160208601602086016135ce565b601f01601f19169290920160200192915050565b60208152600061303c60208301846135f2565b60008083601f84011261364357600080fd5b5081356001600160401b0381111561365a57600080fd5b6020830191508360208260051b850101111561367557600080fd5b9250929050565b600080600080600080600087890361016081121561369957600080fd5b88356136a481613516565b975060208901356136b481613516565b965060408901356136c481613516565b95506060890135945060808901356001600160401b038111156136e657600080fd5b6136f28b828c01613631565b90955093505060c0609f198201121561370a57600080fd5b5060a08801905092959891949750929550565b6000806040838503121561373057600080fd5b823561373b81613516565b946020939093013593505050565b60208152600082516060602084015280516080840152602081015160a0840152604081015160c0840152606081015160e0840152608081015160c06101008501526137986101408501826135f2565b905060a082015115156101208501526020850151604085015260408501516060850152809250505092915050565b600080600080600080606087890312156137df57600080fd5b86356001600160401b03808211156137f657600080fd5b6138028a838b01613631565b9098509650602089013591508082111561381b57600080fd5b6138278a838b01613631565b9096509450604089013591508082111561384057600080fd5b5061384d89828a01613631565b979a9699509497509295939492505050565b60006020828403121561387157600080fd5b5051919050565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561303f5761303f613898565b80516138cc81613548565b919050565b60008060008060008060c087890312156138ea57600080fd5b86516138f581613516565b602088015190965061390681613516565b604088015190955061391781613516565b606088015190945061392881613516565b608088015190935061393981613516565b60a088015190925061394a81613548565b809150509295509295509295565b808202811582820484141761303f5761303f613898565b60008261398c57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156139a357600080fd5b815161305781613516565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600581106139f857634e487b7160e01b600052602160045260246000fd5b9052565b602080825282516001600160a01b0390811683830152838201511660408084019190915283015160c06060840152805160e084018190526000929182019083906101008601905b80831015613a635783518252928401926001929092019190840190613a43565b506060870151608087015260808701519350613a8260a08701856139da565b60a0870151868203601f190160c0880152935061331481856135f2565b60405160c081016001600160401b0381118282101715613ac157613ac16139ae565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613aef57613aef6139ae565b604052919050565b60006001600160401b03821115613b1057613b106139ae565b5060051b60200190565b60006001600160401b03831115613b3357613b336139ae565b613b46601f8401601f1916602001613ac7565b9050828152838383011115613b5a57600080fd5b6130578360208301846135ce565b600082601f830112613b7957600080fd5b61303c83835160208501613b1a565b600080600060608486031215613b9d57600080fd5b83516001600160401b0380821115613bb457600080fd5b818601915086601f830112613bc857600080fd5b81516020613bdd613bd883613af7565b613ac7565b82815260059290921b8401810191818101908a841115613bfc57600080fd5b948201945b83861015613c1a57855182529482019490820190613c01565b9189015160408a01519298509650909350505080821115613c3a57600080fd5b50613c4786828701613b68565b9150509250925092565b8082018082111561303f5761303f613898565b600060c08284031215613c7657600080fd5b613c7e613a9f565b8235613c8981613516565b81526020830135613c9981613516565b60208201526040830135613cac81613516565b60408201526060830135613cbf81613516565b60608201526080830135613cd281613516565b608082015260a0830135613ce581613516565b60a08201529392505050565b60006020808385031215613d0457600080fd5b82516001600160401b03811115613d1a57600080fd5b8301601f81018513613d2b57600080fd5b8051613d39613bd882613af7565b81815260059190911b82018301908381019087831115613d5857600080fd5b928401925b82841015613314578351613d7081613516565b82529284019290840190613d5d565b600060208284031215613d9157600080fd5b81516001600160401b0380821115613da857600080fd5b9083019060c08286031215613dbc57600080fd5b613dc4613a9f565b82518152602083015160208201526040830151604082015260608301516060820152608083015182811115613df857600080fd5b83019150601f82018613613e0b57600080fd5b613e1a86835160208501613b1a565b6080820152613e2b60a084016138c1565b60a082015295945050505050565b81835260006001600160fb1b03831115613e5257600080fd5b8260051b80836020870137939093016020019392505050565b818352602080840193600091600585811b8301820185855b88811015613ef457858303601f19018a52813536899003601e19018112613ea957600080fd5b880185810190356001600160401b03811115613ec457600080fd5b80861b3603821315613ed557600080fd5b613ee0858284613e39565b9b87019b9450505090840190600101613e83565b509098975050505050505050565b6080808252885190820181905260009060209060a0840190828c01845b82811015613f445781516001600160a01b031684529284019290840190600101613f1f565b505050838103828501528881528990820160005b8a811015613f86578235613f6b81613516565b6001600160a01b031682529183019190830190600101613f58565b508481036040860152613f9a81898b613e39565b925050508281036060840152613fb1818587613e6b565b9a9950505050505050505050565b634e487b7160e01b600052603160045260246000fd5b600060208284031215613fe757600080fd5b815161305781613548565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561404f57600080fd5b81516001600160401b0381111561406557600080fd5b61407184828501613b68565b949350505050565b6000825161408b8184602087016135ce565b919091019291505056fea26469706673582212209ecb3b51322e966073a71dfe61468aa77d93b42854c07a16335d84c409bee75664736f6c63430008170033
Deployed Bytecode
0x6080604052600436106103a65760003560e01c80638456cb59116101e7578063bbb356d51161010d578063e7a7250a116100a0578063f2fde38b1161006f578063f2fde38b146109c2578063f301af42146109e2578063fb61778714610a02578063fbfa77cf14610a1757600080fd5b8063e7a7250a14610699578063e941fa7814610699578063f106845414610996578063f1a392da146109ac57600080fd5b8063c6def076116100dc578063c6def07614610921578063c7b9d53014610941578063c89039c514610961578063d0e30db01461098157600080fd5b8063bbb356d5146108b7578063c1a3d44c146108cc578063c45a0155146108e1578063c553173f1461090157600080fd5b80639c82f2a411610185578063aced166111610154578063aced16611461084b578063ad29f5da14610860578063b20feaaf14610875578063b73be3a51461089757600080fd5b80639c82f2a4146107c65780639c9b2e21146107e6578063a6f19c8414610806578063a7e9ca821461082b57600080fd5b80638e145459116101c15780638e1454591461076457806397fd323d146106995780639b9363a5146107795780639c5e52d51461079957600080fd5b80638456cb59146107175780638912cb8b1461072c5780638da5cb5b1461074657600080fd5b80634641257d116102cc578063573fef0a1161026a5780636817031b116102395780636817031b146106ad5780636b740cc8146106cd578063715018a6146106ed578063722713f71461070257600080fd5b8063573fef0a146106405780635c975abb1461065557806366666aa91461067957806367a527931461069957600080fd5b80634e71d92d116102a65780634e71d92d146105d35780634eb665af146105e85780635064010a14610608578063568914121461062a57600080fd5b80634641257d146105945780634700d305146105a95780634746fb55146105be57600080fd5b8063158274a5116103445780632e1a7d4d116103135780632e1a7d4d1461052a5780633f4ba83a1461054a5780634440cecd1461055f57806344b813961461057f57600080fd5b8063158274a5146104aa5780631f1fcd51146104ca5780631fe4a686146104ea5780632b3297f91461050a57600080fd5b80630e5c011e116103805780630e5c011e146104355780630e8fbb5a14610455578063115880861461047557806311b0b42d1461048a57600080fd5b806304554443146103b257806307546172146103db5780630c4ed7991461041357600080fd5b366103ad57005b600080fd5b3480156103be57600080fd5b506103c860a25481565b6040519081526020015b60405180910390f35b3480156103e757600080fd5b5060d8546103fb906001600160a01b031681565b6040516001600160a01b0390911681526020016103d2565b34801561041f57600080fd5b5061043361042e36600461352b565b610a37565b005b34801561044157600080fd5b5061043361045036600461352b565b610a7f565b34801561046157600080fd5b50610433610470366004613556565b610a8a565b34801561048157600080fd5b506103c8610abd565b34801561049657600080fd5b50609e546103fb906001600160a01b031681565b3480156104b657600080fd5b5060d9546103fb906001600160a01b031681565b3480156104d657600080fd5b50609d546103fb906001600160a01b031681565b3480156104f657600080fd5b50609c546103fb906001600160a01b031681565b34801561051657600080fd5b50609b546103fb906001600160a01b031681565b34801561053657600080fd5b50610433610545366004613573565b610b71565b34801561055657600080fd5b50610433610c3b565b34801561056b57600080fd5b5061043361057a36600461358c565b610c5d565b34801561058b57600080fd5b506103c8610d86565b3480156105a057600080fd5b50610433610dee565b3480156105b557600080fd5b50610433610df9565b3480156105ca57600080fd5b506103fb610e19565b3480156105df57600080fd5b50610433610e87565b3480156105f457600080fd5b50610433610603366004613573565b610e8f565b34801561061457600080fd5b5061061d610e9c565b6040516103d2919061361e565b34801561063657600080fd5b506103c860a15481565b34801561064c57600080fd5b50610433610ec0565b34801561066157600080fd5b5060655460ff165b60405190151581526020016103d2565b34801561068557600080fd5b5060d7546103fb906001600160a01b031681565b3480156106a557600080fd5b5060006103c8565b3480156106b957600080fd5b506104336106c836600461352b565b610f00565b3480156106d957600080fd5b506103c86106e8366004613573565b610f5d565b3480156106f957600080fd5b50610433611176565b34801561070e57600080fd5b506103c8611188565b34801561072357600080fd5b506104336111b6565b34801561073857600080fd5b5060a3546106699060ff1681565b34801561075257600080fd5b506033546001600160a01b03166103fb565b34801561077057600080fd5b506103fb6111c6565b34801561078557600080fd5b5061043361079436600461367c565b611210565b3480156107a557600080fd5b506103c86107b436600461352b565b60986020526000908152604090205481565b3480156107d257600080fd5b506104336107e136600461352b565b6115f9565b3480156107f257600080fd5b5061043361080136600461352b565b61164f565b34801561081257600080fd5b5060d5546103fb9061010090046001600160a01b031681565b34801561083757600080fd5b5061043361084636600461371d565b611737565b34801561085757600080fd5b506103fb61175b565b34801561086c57600080fd5b506104336117a5565b34801561088157600080fd5b5061088a6117b9565b6040516103d29190613749565b3480156108a357600080fd5b506104336108b23660046137c6565b611857565b3480156108c357600080fd5b506097546103c8565b3480156108d857600080fd5b506103c8611927565b3480156108ed57600080fd5b506099546103fb906001600160a01b031681565b34801561090d57600080fd5b5061043361091c366004613573565b611958565b34801561092d57600080fd5b5060d6546103fb906001600160a01b031681565b34801561094d57600080fd5b5061043361095c36600461352b565b611a10565b34801561096d57600080fd5b50609f546103fb906001600160a01b031681565b34801561098d57600080fd5b50610433611aa6565b3480156109a257600080fd5b506103c860da5481565b3480156109b857600080fd5b506103c860a05481565b3480156109ce57600080fd5b506104336109dd36600461352b565b611c15565b3480156109ee57600080fd5b506103fb6109fd366004613573565b611c8b565b348015610a0e57600080fd5b50610433611cb5565b348015610a2357600080fd5b50609a546103fb906001600160a01b031681565b610a3f611d77565b6001600160a01b038116610a6057609f80546001600160a01b031916905550565b609f80546001600160a01b0319166001600160a01b0383161790555b50565b610a7c816000611dc9565b610a92611d77565b60a3805460ff191682151590811790915560ff1615610ab357600060a25550565b6201518060a25550565b60d55460009060ff1615610b3d5760d7546040516370a0823160e01b81523060048201526001600160a01b03909116906370a08231906024015b602060405180830381865afa158015610b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b38919061385f565b905090565b60d5546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401610af7565b609a546001600160a01b03163314610ba45760405162461bcd60e51b8152600401610b9b90613878565b60405180910390fd5b6000610bae611927565b905081811015610bd557610bca610bc582846138ae565b612014565b610bd2611927565b90505b81811115610be05750805b609a54609d54610bfd916001600160a01b039182169116836120c3565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d610c26611188565b60405190815260200160405180910390a15050565b610c43611d77565b610c4b612122565b610c53612174565b610c5b611aa6565b565b610c656121e4565b610c6d61223e565b610c75612249565b60da8390556212d686198301610caa5760d58054610100600160a81b0319166101006001600160a01b03851602179055610d46565b60d65460da54604051631526fe2760e01b81526001600160a01b0390921691631526fe2791610cdf9160040190815260200190565b60c060405180830381865afa158015610cfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2091906138d1565b505060d780546001600160a01b0319166001600160a01b03929092169190911790555050505b6001600160a01b03811615610d715760d680546001600160a01b0319166001600160a01b0383161790555b610d79612174565b610d81611aa6565b505050565b600060a254600003610d985750600090565b600060a05442610da891906138ae565b9050600060a2548210610dbc576000610dca565b8160a254610dca91906138ae565b905060a2548160a154610ddd9190613958565b610de7919061396f565b9250505090565b610c5b326000611dc9565b610e01611d77565b610e096111b6565b610e1161223e565b610c5b612249565b60995460408051634746fb5560e01b815290516000926001600160a01b031691634746fb559160048083019260209291908290030181865afa158015610e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b389190613991565b610c5b6122b8565b610e97611d77565b60a255565b60408051808201909152600a81526942616c616e636572563360b01b602082015290565b60a35460ff1615610c5b57609a546001600160a01b03163314610ef55760405162461bcd60e51b8152600401610b9b90613878565b610c5b326001611dc9565b610f086121e4565b609a80546001600160a01b0319166001600160a01b0383169081179091556040519081527fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f30906020015b60405180910390a150565b60d9546000906001600160a01b03163314610f8b5760405163249a7c6360e21b815260040160405180910390fd5b60dd5460ff16610fae57604051633eee08c760e01b815260040160405180910390fd5b600060dc546001600160401b03811115610fca57610fca6139ae565b604051908082528060200260200182016040528015610ff3578160200160208202803683370190505b509050828160db548151811061100b5761100b6139c4565b602090810291909101015260d954609f54611033916001600160a01b039182169116856123e5565b60d954609f546040516315afd40960e01b81526001600160a01b039182166004820152602481018690529116906315afd409906044016020604051808303816000875af1158015611088573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ac919061385f565b5060d9546040805160c081018252609d546001600160a01b039081168252306020808401919091528284018690526000606084018190526001608085015284519182018552815260a083015291516312bca7b160e21b81529190921691634af29ec49161111c91906004016139fc565b6000604051808303816000875af115801561113b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111639190810190613b88565b5060dd805460ff19169055949350505050565b61117e6121e4565b610c5b6000612437565b6000611192610d86565b61119a610abd565b6111a2611927565b6111ac9190613c51565b610b3891906138ae565b6111be611d77565b610e11612489565b60995460408051638e14545960e01b815290516000926001600160a01b031691638e1454599160048083019260209291908290030181865afa158015610e63573d6000803e3d6000fd5b600054610100900460ff16158080156112305750600054600160ff909116105b8061124a5750303b15801561124a575060005460ff166001145b6112ad5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b9b565b6000805460ff1916600117905580156112d0576000805461ff0019166101001790555b60d580546001600160a01b03808b1661010002610100600160a81b03199092169190911790915560d980548883166001600160a01b03199182161790915560d68054928a169290911691909117905560da8590556212d687851461133c5760d5805460ff191660011790555b60d55460ff16156113e35760d65460da54604051631526fe2760e01b81526001600160a01b0390921691631526fe279161137c9160040190815260200190565b60c060405180830381865afa158015611399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bd91906138d1565b505060d780546001600160a01b0319166001600160a01b03929092169190911790555050505b60d55460ff166114855760d560019054906101000a90046001600160a01b03166001600160a01b03166339f4caba6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611440573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114649190613991565b60d880546001600160a01b0319166001600160a01b03929092169190911790555b6114d061149736849003840184613c64565b8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506124c692505050565b609d546040805163154d950160e31b815290516000926001600160a01b03169163aa6ca80891600480830192869291908290030181865afa158015611519573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115419190810190613cf1565b805160dc55905060005b815181101561159f57609f5482516001600160a01b0390911690839083908110611577576115776139c4565b60200260200101516001600160a01b0316036115975760db81905561159f565b60010161154b565b506115a8612174565b5080156115ef576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6116016121e4565b609b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f211f06c051495b535b79192c1a4531d819d569657ff4bd16daa8e9e5e6ed2bfd90602001610f52565b611657611d77565b609d546001600160a01b039081169082160361169d5760405162461bcd60e51b8152602060048201526005602482015264085dd85b9d60da1b6044820152606401610b9b565b609e546001600160a01b03908116908216036116e55760405162461bcd60e51b8152602060048201526007602482015266216e617469766560c81b6044820152606401610b9b565b609780546001810182556000919091527f354a83ed9988f79f6038d4c7a7dadbad8af32f4ad6df893e0e5807a1b1944ff90180546001600160a01b0319166001600160a01b0392909216919091179055565b61173f611d77565b6001600160a01b03909116600090815260986020526040902055565b6099546040805163aced166160e01b815290516000926001600160a01b03169163aced16619160048083019260209291908290030181865afa158015610e63573d6000803e3d6000fd5b6117ad611d77565b610c5b60976000613485565b6117c16134a3565b60405180606001604052806117d4610e19565b604051639af608c960e01b81523060048201526001600160a01b039190911690639af608c990602401600060405180830381865afa15801561181a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118429190810190613d7f565b81526020016000815260200160009052919050565b604080516001808252818301909252733ef3d8ba38ebe18db133cec108f4d14ce00dd9ae91600091906020808301908036833701905050905030816000815181106118a4576118a46139c4565b6001600160a01b0392831660209182029290920101526040516301c7ba5760e61b8152908316906371ee95c0906118eb9084908c908c908c908c908c908c90600401613f02565b600060405180830381600087803b15801561190557600080fd5b505af1158015611919573d6000803e3d6000fd5b505050505050505050505050565b609d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401610af7565b611960611d77565b60978054611970906001906138ae565b81548110611980576119806139c4565b600091825260209091200154609780546001600160a01b0390921691839081106119ac576119ac6139c4565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060978054806119eb576119eb613fbf565b600082815260209020810160001990810180546001600160a01b031916905501905550565b609c546001600160a01b03163314611a585760405162461bcd60e51b815260206004820152600b60248201526a085cdd1c985d1959da5cdd60aa1b6044820152606401610b9b565b609c80546001600160a01b0319166001600160a01b0383169081179091556040519081527f46d58e3fa07bf19b1d27240f0e286b27e9f7c1b0d88933333fe833b60eec541290602001610f52565b60655460ff1680611b295750609960009054906101000a90046001600160a01b03166001600160a01b031663f12d54d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b299190613fd5565b80611ba557506099546001600160a01b031663de73a594611b48610e9c565b6040518263ffffffff1660e01b8152600401611b64919061361e565b602060405180830381865afa158015611b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba59190613fd5565b15611bc35760405163e628b94960e01b815260040160405180910390fd5b6000611bcd611927565b90508015610a7c57611bde8161263b565b7f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e38426611c07611188565b604051908152602001610f52565b611c1d6121e4565b6001600160a01b038116611c825760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b9b565b610a7c81612437565b60978181548110611c9b57600080fd5b6000918252602090912001546001600160a01b0316905081565b609a546001600160a01b03163314611cdf5760405162461bcd60e51b8152600401610b9b90613878565b611ce761223e565b609d54609a546001600160a01b039182169163a9059cbb9116611d08611927565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611d53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7c9190613fd5565b6033546001600160a01b03163314801590611dab5750611d9561175b565b6001600160a01b0316336001600160a01b031614155b15610c5b5760405163607e454560e11b815260040160405180910390fd5b60655460ff1680611e4c5750609960009054906101000a90046001600160a01b03166001600160a01b031663f12d54d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4c9190613fd5565b80611ec857506099546001600160a01b031663de73a594611e6b610e9c565b6040518263ffffffff1660e01b8152600401611e87919061361e565b602060405180830381865afa158015611ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec89190613fd5565b15611ee65760405163e628b94960e01b815260040160405180910390fd5b611eee6122b8565b611ef6612706565b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f63919061385f565b609e546001600160a01b0316600090815260986020526040902054909150811115610d8157611f918361287a565b611f99612a97565b6000611fa3611927565b9050611fad610d86565b611fb79082613c51565b60a1554260a05582611fcb57611fcb611aa6565b337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f9241082611ff6611188565b6040805192835260208301919091520160405180910390a250505050565b8015610a7c5760d55460ff161561208e5760d754604051636197390160e11b815260048101839052600060248201526001600160a01b039091169063c32e7202906044015b600060405180830381600087803b15801561207357600080fd5b505af1158015612087573d6000803e3d6000fd5b5050505050565b60d554604051632e1a7d4d60e01b8152600481018390526101009091046001600160a01b031690632e1a7d4d90602401612059565b6040516001600160a01b03838116602483015260448201839052610d8191859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050612ce7565b61212a612d4a565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60d5546000199060ff16156121a557609d5460d6546121a0916001600160a01b03908116911683612d93565b6121c7565b609d5460d5546121c7916001600160a01b039081169161010090041683612d93565b609e54609b54610a7c916001600160a01b03908116911683612d93565b6033546001600160a01b03163314610c5b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b9b565b610c5b610bc5610abd565b60d55460ff161561227757609d5460d654612272916001600160a01b0390811691166000612d93565b61229a565b609d5460d55461229a916001600160a01b03908116916101009004166000612d93565b609e54609b54610c5b916001600160a01b0390811691166000612d93565b60d55460ff161561232d5760d760009054906101000a90046001600160a01b03166001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561231357600080fd5b505af1158015612327573d6000803e3d6000fd5b50505050565b60d8546001600160a01b03161561239c5760d8546040516335313c2160e11b81523060048201526001600160a01b0390911690636a62784290602401600060405180830381600087803b15801561238357600080fd5b505af1158015612397573d6000803e3d6000fd5b505050505b60d554604051634274debf60e11b81523060048201526101009091046001600160a01b0316906384e9bd7e90602401600060405180830381600087803b15801561231357600080fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d81908490612e06565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612491612ed8565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121573390565b600054610100900460ff166124ed5760405162461bcd60e51b8152600401610b9b90613ff2565b6124f5612f1e565b6124fd612f4d565b8151609d80546001600160a01b03199081166001600160a01b039384161790915560408085015160998054841691851691821790556060860151609a805485169186169190911790556080860151609b8054851691861691909117905560a0860151609c805490941694169390931790915580516311b0b42d60e01b815290516311b0b42d916004818101926020929091908290030181865afa1580156125a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125cc9190613991565b609e80546001600160a01b0319166001600160a01b039290921691909117905560005b81518110156126225761261a82828151811061260d5761260d6139c4565b602002602001015161164f565b6001016125ef565b506126308260200151610a37565b50506201518060a255565b8015610a7c5760d55460ff16156126d15760d65460da546040516321d0683360e11b8152600481019190915260248101839052600160448201526001600160a01b03909116906343a0d066906064016020604051808303816000875af11580156126a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126cd9190613fd5565b5050565b60d55460405163b6b55f2560e01b8152600481018390526101009091046001600160a01b03169063b6b55f2590602401612059565b60005b609754811015610a7c57600060978281548110612728576127286139c4565b6000918252602090912001546001600160a01b0316905073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed1981016127c957609e60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b1580156127ab57600080fd5b505af11580156127bf573d6000803e3d6000fd5b5050505050612871565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015612810573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612834919061385f565b6001600160a01b03831660009081526098602052604090205490915081111561286f57609e5461286f9083906001600160a01b031683612f7c565b505b50600101612709565b6000612884610e19565b604051639af608c960e01b81523060048201526001600160a01b039190911690639af608c990602401600060405180830381865afa1580156128ca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526128f29190810190613d7f565b8051609e546040516370a0823160e01b8152306004820152929350600092670de0b6b3a764000092916001600160a01b0316906370a0823190602401602060405180830381865afa15801561294b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061296f919061385f565b6129799190613958565b612983919061396f565b90506000670de0b6b3a76400008360400151836129a09190613958565b6129aa919061396f565b609e549091506129c4906001600160a01b031685836120c3565b6000670de0b6b3a76400008460200151846129df9190613958565b6129e9919061396f565b9050612a096129f66111c6565b609e546001600160a01b031690836120c3565b6000670de0b6b3a7640000856060015185612a249190613958565b612a2e919061396f565b609c54609e54919250612a4e916001600160a01b039081169116836120c3565b60408051848152602081018490529081018290527fd255b592c7f268a73e534da5219a60ff911b4cf6daae21c7d20527dd657bd99a9060600160405180910390a1505050505050565b609e546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b04919061385f565b609e54609f549192506001600160a01b03918216911614612ba557609b54609e54609f54604051630df791e560e41b81526001600160a01b03928316600482015290821660248201526044810184905291169063df791e50906064016020604051808303816000875af1158015612b7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ba3919061385f565b505b609d54609f546001600160a01b03908116911614610a7c57609f546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612c06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c2a919061385f565b60dd8054600160ff1990911617905560d95460408051602480820185905282518083039091018152604490910182526020810180516001600160e01b0316630d6e819960e31b17905290516348c8949160e01b81529293506001600160a01b03909116916348c8949191612ca09160040161361e565b6000604051808303816000875af1158015612cbf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d81919081019061403d565b6000612cfc6001600160a01b0384168361302e565b90508051600014158015612d21575080806020019051810190612d1f9190613fd5565b155b15610d8157604051635274afe760e01b81526001600160a01b0384166004820152602401610b9b565b60655460ff16610c5b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b9b565b60405163095ea7b360e01b81526001600160a01b0383811660048301526024820183905284169063095ea7b3906044016020604051808303816000875af1158015612de2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123279190613fd5565b6000612e5b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130459092919063ffffffff16565b805190915015610d815780806020019051810190612e799190613fd5565b610d815760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b9b565b60655460ff1615610c5b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b9b565b600054610100900460ff16612f455760405162461bcd60e51b8152600401610b9b90613ff2565b610c5b61305e565b600054610100900460ff16612f745760405162461bcd60e51b8152600401610b9b90613ff2565b610c5b61308e565b816001600160a01b0316836001600160a01b031614610d8157609b54612faf906001600160a01b038581169116836130c1565b609b54604051630df791e560e41b81526001600160a01b0385811660048301528481166024830152604482018490529091169063df791e50906064016020604051808303816000875af115801561300a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612327919061385f565b606061303c83836000613151565b90505b92915050565b606061305484846000856131ee565b90505b9392505050565b600054610100900460ff166130855760405162461bcd60e51b8152600401610b9b90613ff2565b610c5b33612437565b600054610100900460ff166130b55760405162461bcd60e51b8152600401610b9b90613ff2565b6065805460ff19169055565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052613112848261331f565b612327576040516001600160a01b0384811660248301526000604483015261314791869182169063095ea7b3906064016120f0565b6123278482612ce7565b6060814710156131765760405163cd78605960e01b8152306004820152602401610b9b565b600080856001600160a01b031684866040516131929190614079565b60006040518083038185875af1925050503d80600081146131cf576040519150601f19603f3d011682016040523d82523d6000602084013e6131d4565b606091505b50915091506131e48683836133c7565b9695505050505050565b60608247101561324f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610b9b565b6001600160a01b0385163b6132a65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b9b565b600080866001600160a01b031685876040516132c29190614079565b60006040518083038185875af1925050503d80600081146132ff576040519150601f19603f3d011682016040523d82523d6000602084013e613304565b606091505b5091509150613314828286613423565b979650505050505050565b6000806000846001600160a01b03168460405161333c9190614079565b6000604051808303816000865af19150503d8060008114613379576040519150601f19603f3d011682016040523d82523d6000602084013e61337e565b606091505b50915091508180156133a85750805115806133a85750808060200190518101906133a89190613fd5565b80156133be57506000856001600160a01b03163b115b95945050505050565b6060826133dc576133d78261345c565b613057565b81511580156133f357506001600160a01b0384163b155b1561341c57604051639996b31560e01b81526001600160a01b0385166004820152602401610b9b565b5080613057565b60608315613432575081613057565b8251156134425782518084602001fd5b8160405162461bcd60e51b8152600401610b9b919061361e565b80511561346c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5080546000825590600052602060002090810190610a7c91906134fd565b60405180606001604052806134e96040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b815260200160008152602001600081525090565b5b8082111561351257600081556001016134fe565b5090565b6001600160a01b0381168114610a7c57600080fd5b60006020828403121561353d57600080fd5b813561305781613516565b8015158114610a7c57600080fd5b60006020828403121561356857600080fd5b813561305781613548565b60006020828403121561358557600080fd5b5035919050565b6000806000606084860312156135a157600080fd5b8335925060208401356135b381613516565b915060408401356135c381613516565b809150509250925092565b60005b838110156135e95781810151838201526020016135d1565b50506000910152565b6000815180845261360a8160208601602086016135ce565b601f01601f19169290920160200192915050565b60208152600061303c60208301846135f2565b60008083601f84011261364357600080fd5b5081356001600160401b0381111561365a57600080fd5b6020830191508360208260051b850101111561367557600080fd5b9250929050565b600080600080600080600087890361016081121561369957600080fd5b88356136a481613516565b975060208901356136b481613516565b965060408901356136c481613516565b95506060890135945060808901356001600160401b038111156136e657600080fd5b6136f28b828c01613631565b90955093505060c0609f198201121561370a57600080fd5b5060a08801905092959891949750929550565b6000806040838503121561373057600080fd5b823561373b81613516565b946020939093013593505050565b60208152600082516060602084015280516080840152602081015160a0840152604081015160c0840152606081015160e0840152608081015160c06101008501526137986101408501826135f2565b905060a082015115156101208501526020850151604085015260408501516060850152809250505092915050565b600080600080600080606087890312156137df57600080fd5b86356001600160401b03808211156137f657600080fd5b6138028a838b01613631565b9098509650602089013591508082111561381b57600080fd5b6138278a838b01613631565b9096509450604089013591508082111561384057600080fd5b5061384d89828a01613631565b979a9699509497509295939492505050565b60006020828403121561387157600080fd5b5051919050565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561303f5761303f613898565b80516138cc81613548565b919050565b60008060008060008060c087890312156138ea57600080fd5b86516138f581613516565b602088015190965061390681613516565b604088015190955061391781613516565b606088015190945061392881613516565b608088015190935061393981613516565b60a088015190925061394a81613548565b809150509295509295509295565b808202811582820484141761303f5761303f613898565b60008261398c57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156139a357600080fd5b815161305781613516565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600581106139f857634e487b7160e01b600052602160045260246000fd5b9052565b602080825282516001600160a01b0390811683830152838201511660408084019190915283015160c06060840152805160e084018190526000929182019083906101008601905b80831015613a635783518252928401926001929092019190840190613a43565b506060870151608087015260808701519350613a8260a08701856139da565b60a0870151868203601f190160c0880152935061331481856135f2565b60405160c081016001600160401b0381118282101715613ac157613ac16139ae565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613aef57613aef6139ae565b604052919050565b60006001600160401b03821115613b1057613b106139ae565b5060051b60200190565b60006001600160401b03831115613b3357613b336139ae565b613b46601f8401601f1916602001613ac7565b9050828152838383011115613b5a57600080fd5b6130578360208301846135ce565b600082601f830112613b7957600080fd5b61303c83835160208501613b1a565b600080600060608486031215613b9d57600080fd5b83516001600160401b0380821115613bb457600080fd5b818601915086601f830112613bc857600080fd5b81516020613bdd613bd883613af7565b613ac7565b82815260059290921b8401810191818101908a841115613bfc57600080fd5b948201945b83861015613c1a57855182529482019490820190613c01565b9189015160408a01519298509650909350505080821115613c3a57600080fd5b50613c4786828701613b68565b9150509250925092565b8082018082111561303f5761303f613898565b600060c08284031215613c7657600080fd5b613c7e613a9f565b8235613c8981613516565b81526020830135613c9981613516565b60208201526040830135613cac81613516565b60408201526060830135613cbf81613516565b60608201526080830135613cd281613516565b608082015260a0830135613ce581613516565b60a08201529392505050565b60006020808385031215613d0457600080fd5b82516001600160401b03811115613d1a57600080fd5b8301601f81018513613d2b57600080fd5b8051613d39613bd882613af7565b81815260059190911b82018301908381019087831115613d5857600080fd5b928401925b82841015613314578351613d7081613516565b82529284019290840190613d5d565b600060208284031215613d9157600080fd5b81516001600160401b0380821115613da857600080fd5b9083019060c08286031215613dbc57600080fd5b613dc4613a9f565b82518152602083015160208201526040830151604082015260608301516060820152608083015182811115613df857600080fd5b83019150601f82018613613e0b57600080fd5b613e1a86835160208501613b1a565b6080820152613e2b60a084016138c1565b60a082015295945050505050565b81835260006001600160fb1b03831115613e5257600080fd5b8260051b80836020870137939093016020019392505050565b818352602080840193600091600585811b8301820185855b88811015613ef457858303601f19018a52813536899003601e19018112613ea957600080fd5b880185810190356001600160401b03811115613ec457600080fd5b80861b3603821315613ed557600080fd5b613ee0858284613e39565b9b87019b9450505090840190600101613e83565b509098975050505050505050565b6080808252885190820181905260009060209060a0840190828c01845b82811015613f445781516001600160a01b031684529284019290840190600101613f1f565b505050838103828501528881528990820160005b8a811015613f86578235613f6b81613516565b6001600160a01b031682529183019190830190600101613f58565b508481036040860152613f9a81898b613e39565b925050508281036060840152613fb1818587613e6b565b9a9950505050505050505050565b634e487b7160e01b600052603160045260246000fd5b600060208284031215613fe757600080fd5b815161305781613548565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006020828403121561404f57600080fd5b81516001600160401b0381111561406557600080fd5b61407184828501613b68565b949350505050565b6000825161408b8184602087016135ce565b919091019291505056fea26469706673582212209ecb3b51322e966073a71dfe61468aa77d93b42854c07a16335d84c409bee75664736f6c63430008170033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.