More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
Blacksail_Strategy_SwapX
Compiler Version
v0.8.20+commit.a1b79de6
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 "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "../interfacing/swapX/IPair.sol"; import "../interfacing/ISwapX.sol"; import "../interfacing/ISwapXGauge.sol"; import "../interfacing/swapX/IRouterV2.sol"; import "../interfacing/swapX/IV2SwapRouter.sol"; contract Blacksail_Strategy_SwapX is Ownable, Pausable, ReentrancyGuard { using SafeERC20 for IERC20; // Tokens address public constant native_token = address(0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38); address public lp0; address public lp1; address public reward_token; address public staking_token; // Fee structure uint256 public WITHDRAWAL_MAX = 100000; uint256 public WITHDRAW_FEE = 100; uint256 public DIVISOR = 1000; uint256 public CALL_FEE = 100; uint256 public FEE_BATCH = 900; uint256 public PLATFORM_FEE = 45; // Third Party Addresses address public rewardPool; address public unirouter; address public lpRouter; // Information uint256 public lastHarvest; bool public harvestOnDeposit; // Platform Addresses address public vault; address public treasury; // Routes address[] public rewards; uint256 public slippageTolerance; event Deposit(uint256 amount); event Withdraw(uint256 amount); event Harvest(address indexed harvester); event ChargeFees(uint256 callFee, uint256 protocolFee); event SetVault(address indexed newVault); event SetWithdrawalFee(uint256 newFee); event SetSlippageTolerance(uint256 newTolerance); /** * * This constructor: * - Sets up the core token and contract addresses for staking, rewards, and routing. * - Enables or disables harvest-on-deposit, with a default withdrawal fee of 0 if enabled. * - Defines the reward-to-native token conversion path for liquidity and fee operations. * - Grants initial token allowances to external contracts. */ constructor( address _staking_token, address _rewardPool, address _reward_token, address _unirouter, address _lpRouter, bool _harvestOnDeposit, address _treasury ) Ownable(msg.sender) { staking_token = _staking_token; rewardPool = _rewardPool; unirouter = _unirouter; lpRouter = _lpRouter; treasury = _treasury; lp0 = IPair(staking_token).token0(); lp1 = IPair(staking_token).token1(); harvestOnDeposit = _harvestOnDeposit; if (harvestOnDeposit) { setWithdrawalFee(0); } reward_token = _reward_token; rewards.push(reward_token); _giveAllowances(); } /** @dev Sets the vault connected to this strategy */ function setVault(address _vault) external onlyOwner { require(isContract(_vault), "Vault must be a contract"); vault = _vault; emit SetVault(_vault); } /** @dev Function to synchronize balances before new user deposit. Can be overridden in the strategy. */ function beforeDeposit() external virtual { if (harvestOnDeposit) { require(msg.sender == vault, "Vault deposit only"); _harvest(address(this)); } } /** @dev Deposits funds into third party farm */ function deposit() public onlyAuthorized whenNotPaused { _deposit(); } function _deposit() internal { uint256 staking_balance = IERC20(staking_token).balanceOf( address(this) ); if (staking_balance > 0) { ISwapXGauge(rewardPool).deposit(staking_balance); } } /** * @dev Withdraws a specified amount of staking tokens to the vault. * Handles balance retrieval from the reward pool if needed and deducts withdrawal fees if applicable. * * @param _amount The amount of staking tokens to withdraw. * * Requirements: * - Can only be called by the vault. * - If not the owner and contract is not paused, a withdrawal fee is deducted unless `harvestOnDeposit` is enabled. * * Emits a {Withdraw} event with the updated strategy balance. */ function withdraw(uint256 _amount) external nonReentrant { require(msg.sender == vault, "!vault"); uint256 stakingBal = IERC20(staking_token).balanceOf(address(this)); if (stakingBal < _amount) { ISwapXGauge(rewardPool).withdraw(_amount - stakingBal); stakingBal = IERC20(staking_token).balanceOf(address(this)); } if (stakingBal > _amount) { stakingBal = _amount; } uint256 wFee = (stakingBal * WITHDRAW_FEE) / WITHDRAWAL_MAX; if (!paused() && !harvestOnDeposit) { stakingBal = stakingBal - wFee; } IERC20(staking_token).safeTransfer(vault, stakingBal); emit Withdraw(balanceOf()); } /** * @dev Triggers the harvest process to compound earnings. * Internally calls `_harvest` to collect rewards, charge fees, add liquidity, and reinvest. */ function harvest() external { require( !isContract(msg.sender) || msg.sender == vault, "!auth Contract Harvest" ); _harvest(msg.sender); } /** @dev Compounds the strategy's earnings and charges fees */ function _harvest(address caller) internal whenNotPaused { ISwapXGauge(rewardPool).getReward(); uint256 rewardAmt = IERC20(reward_token).balanceOf(address(this)); if (rewardAmt > 0) { chargeFees(caller); addLiquidity(); _deposit(); } lastHarvest = block.timestamp; emit Harvest(msg.sender); } /** @dev This function converts all funds to WFTM, charges fees, and sends fees to respective accounts */ function chargeFees(address caller) internal { uint256 toNative = IERC20(reward_token).balanceOf(address(this)); ISwapX.ExactInputSingleParams memory eisp; eisp.tokenIn = reward_token; eisp.tokenOut = native_token; eisp.recipient = address(this); eisp.amountIn = toNative; eisp.limitSqrtPrice = 0; ISwapX(unirouter).exactInputSingleSupportingFeeOnTransferTokens(eisp); uint256 nativeBal = IERC20(native_token).balanceOf(address(this)); uint256 platformFee = (nativeBal * PLATFORM_FEE) / DIVISOR; uint256 callFeeAmount = (platformFee * CALL_FEE) / DIVISOR; uint256 treasuryFee = platformFee - callFeeAmount; if (caller != address(this)) { IERC20(native_token).safeTransfer(caller, callFeeAmount); } IERC20(native_token).safeTransfer(treasury, treasuryFee); emit ChargeFees(callFeeAmount, platformFee); } /** * @dev Adds liquidity by converting native tokens to the deposit token and forwarding them to the ICHI Vault. * * - Checks for sufficient native token balance. * - Converts native tokens to the deposit token using the Uniswap V3 router if required. * - Approves the necessary allowances for the Uniswap V3 router. * - Forwards the converted deposit tokens to the ICHI Vault for staking. * * Requirements: * - The contract must have a positive balance of the native token. */ function addLiquidity() internal { uint256 halfNativeBal = IERC20(native_token).balanceOf(address(this)) / 2; IV2SwapRouter.Route[] memory route = new IV2SwapRouter.Route[](1); if (native_token != lp0) { route[0].from = native_token; route[0].to = lp0; route[0].stable = false; IV2SwapRouter(unirouter).swapExactTokensForTokens(halfNativeBal, 1, route, address(this)); } if (native_token != lp1) { route[0].from = native_token; route[0].to = lp1; route[0].stable = false; IV2SwapRouter(unirouter).swapExactTokensForTokens(halfNativeBal, 1, route, address(this)); } uint256 lp0b = IERC20(lp0).balanceOf(address(this)); uint256 lp1b = IERC20(lp1).balanceOf(address(this)); IRouterV2(lpRouter).addLiquidity(lp0, lp1, false, lp0b, lp1b, 0, 0, address(this), block.timestamp); } /** @dev Determines the amount of reward in WFTM upon calling the harvest function */ function harvestCallReward() public view returns (uint256) { return uint256(0); } /** @dev Sets harvest on deposit to @param _harvestOnDeposit */ function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyOwner { harvestOnDeposit = _harvestOnDeposit; if (harvestOnDeposit) { setWithdrawalFee(0); } else { setWithdrawalFee(10); } } /** @dev Returns the amount of rewards that are pending */ function rewardsAvailable() public view returns (uint256) { return ISwapXGauge(rewardPool).earned(address(this)); } /** @dev calculate the total underlaying staking tokens held by the strat */ function balanceOf() public view returns (uint256) { return balanceOfStakingToken() + balanceOfPool(); } /** @dev it calculates how many staking tokens this contract holds */ function balanceOfStakingToken() public view returns (uint256) { return IERC20(staking_token).balanceOf(address(this)); } /** @dev it calculates how many staking tokens the strategy has working in the farm */ function balanceOfPool() public view returns (uint256) { return ISwapXGauge(rewardPool).balanceOf(address(this)); // return _amount; } /** @dev called as part of strat migration. Sends all the available funds back to the vault */ function retireStrat() external { require(msg.sender == vault, "!vault"); ISwapXGauge(rewardPool).withdraw(balanceOfPool()); uint256 stakingBal = IERC20(staking_token).balanceOf(address(this)); IERC20(staking_token).transfer(vault, stakingBal); } /** @dev Pauses the strategy contract */ function pause() public onlyOwner { _pause(); _removeAllowances(); } /** @dev Unpauses the strategy contract */ function unpause() external onlyOwner { _unpause(); _giveAllowances(); deposit(); } /** @dev Gives allowances to spenders */ function _giveAllowances() internal { IERC20(staking_token).approve(rewardPool, type(uint256).max); IERC20(native_token).approve(lpRouter, type(uint256).max); IERC20(reward_token).approve(unirouter, type(uint256).max); IERC20(lp0).approve(lpRouter, type(uint256).max); IERC20(lp1).approve(lpRouter, type(uint256).max); } /** @dev Removes allowances to spenders */ function _removeAllowances() internal { IERC20(staking_token).approve(rewardPool, 0); IERC20(native_token).approve(lpRouter, 0); IERC20(reward_token).approve(unirouter, 0); IERC20(lp0).approve(lpRouter, 0); IERC20(lp1).approve(lpRouter, 0); } /** * @dev Sets the withdrawal fee for the strategy. * * - Ensures that the fee does not exceed 100 (representing 1%). * - Updates the `WITHDRAW_FEE` variable with the new fee value. * * Requirements: * - `fee` must be less than or equal to 100. * * @param fee The new withdrawal fee (scaled by 100,000 for precision). */ function setWithdrawalFee(uint256 fee) internal { require(fee <= 100, "Fee too high"); WITHDRAW_FEE = fee; emit SetWithdrawalFee(fee); } /** * @dev Allows the contract owner to set the slippage tolerance for token swaps. * This value is used to calculate the minimum acceptable output amount in swaps, * helping to mitigate the risks of slippage and unfavorable price changes. * * Requirements: * - The caller must be the contract owner. * - The provided tolerance must be less than or equal to 1500 (representing a maximum of 15% slippage). * * Emits: * - A {SetSlippageTolerance} event indicating the updated slippage tolerance. * * @param _tolerance The new slippage tolerance value, scaled by 10,000 (e.g., 1500 = 15%). */ function setSlippageTolerance(uint256 _tolerance) external onlyOwner { require(_tolerance <= 1500, "Invalid tolerance"); // Max 15% slippageTolerance = _tolerance; emit SetSlippageTolerance(slippageTolerance); } function isContract(address account) internal view returns (bool) { return account.code.length > 0; } modifier onlyAuthorized() { require( msg.sender == vault || msg.sender == address(this), "Not authorized, only Vault or Strategy" ); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ 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.1.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC-20 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 { /** * @dev An operation with an ERC-20 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. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ 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. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ 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. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ 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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { 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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { 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 silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @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 Errors.InsufficientBalance(address(this).balance, amount); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert Errors.FailedCall(); } } /** * @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 * {Errors.FailedCall} 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 Errors.InsufficientBalance(address(this).balance, value); } (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 {Errors.FailedCall}) 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 {Errors.FailedCall} 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 {Errors.FailedCall}. */ 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 assembly ("memory-safe") { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert Errors.FailedCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to avoid relying on the error API for critical functionality. * * _Available since v5.1._ */ library Errors { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error InsufficientBalance(uint256 balance, uint256 needed); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedCall(); /** * @dev The deployment failed. */ error FailedDeployment(); /** * @dev A necessary precompile is missing. */ error MissingPrecompile(address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.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 Pausable is Context { bool private _paused; /** * @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); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ constructor() { _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 { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @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()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Algebra /// @dev Credit to Uniswap Labs under GPL-2.0-or-later license: /// https://github.com/Uniswap/v3-periphery interface ISwapX { struct ExactInputSingleParams { address tokenIn; address tokenOut; address recipient; uint256 amountIn; uint256 amountOutMinimum; uint160 limitSqrtPrice; } /// @notice Swaps `amountIn` of one token for as much as possible of another token /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance, /// and swap the entire amount, enabling contracts to send tokens before calling this function. /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata /// @return amountOut The amount of the received token function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); struct ExactInputParams { bytes path; address recipient; uint256 amountIn; uint256 amountOutMinimum; } /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance, /// and swap the entire amount, enabling contracts to send tokens before calling this function. /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); struct ExactOutputSingleParams { address tokenIn; address tokenOut; address recipient; uint256 amountOut; uint256 amountInMaximum; uint160 limitSqrtPrice; } /// @notice Swaps as little as possible of one token for `amountOut` of another token /// that may remain in the router after the swap. /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata /// @return amountIn The amount of the input token function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); struct ExactOutputParams { bytes path; address recipient; uint256 amountOut; uint256 amountInMaximum; } /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) /// that may remain in the router after the swap. /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata /// @return amountIn The amount of the input token function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @dev Unlike standard swaps, handles transferring from user before the actual swap. /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInputSingleSupportingFeeOnTransferTokens( ExactInputSingleParams calldata params ) external payable returns (uint256 amountOut); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; interface ISwapXGauge { /* ----------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- VIEW -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ ///@notice total supply held function totalSupply() external view returns (uint256); ///@notice balance of a user function balanceOf(address account) external view returns (uint256); ///@notice last time reward function lastTimeRewardApplicable() external view returns (uint256); ///@notice reward for a sinle token function rewardPerToken() external view returns (uint256); ///@notice see earned rewards for user function earned(address account) external view returns (uint256); ///@notice get total reward for the duration function rewardForDuration() external view returns (uint256); function _periodFinish() external view returns (uint256); /* ----------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- USER INTERACTION -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ ///@notice deposit all TOKEN of msg.sender function depositAll() external; ///@notice deposit amount TOKEN function deposit(uint256 amount) external; ///@notice withdraw all token function withdrawAll() external; ///@notice withdraw a certain amount of TOKEN function withdraw(uint256 amount) external; function emergencyWithdraw() external; function emergencyWithdrawAmount(uint256 _amount) external; ///@notice withdraw all TOKEN and harvest rewardToken function withdrawAllAndHarvest() external; ///@notice User harvest function called from distribution (voter allows harvest on multiple gauges) function getReward(address _user) external; ///@notice User harvest function function getReward() external; /* ----------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- DISTRIBUTION -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ /// @dev Receive rewards from distribution function notifyRewardAmount( address token, uint reward ) external; function claimFees() external returns (uint claimed0, uint claimed1); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; interface IPair { function metadata() external view returns (uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1); function claimFees() external returns (uint, uint); function tokens() external view returns (address, address); function token0() external view returns (address); function token1() external view returns (address); function transferFrom(address src, address dst, uint amount) external returns (bool); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function burn(address to) external returns (uint amount0, uint amount1); function mint(address to) external returns (uint liquidity); function getReserves() external view returns (uint _reserve0, uint _reserve1, uint _blockTimestampLast); function getAmountOut(uint, address) external view returns (uint); function name() external view returns(string memory); function symbol() external view returns(string memory); function totalSupply() external view returns (uint); function decimals() external view returns (uint8); function claimable0(address _user) external view returns (uint); function claimable1(address _user) external view returns (uint); function isStable() external view returns(bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; interface IRouterV2 { struct route { address from; address to; bool stable; } // performs chained getAmountOut calculations on any number of pairs function getAmountOut( uint amountIn, address tokenIn, address tokenOut ) external view returns (uint amount, bool stable); // performs chained getAmountOut calculations on any number of pairs function getAmountsOut( uint amountIn, route[] memory routes ) external view returns (uint[] memory amounts); function isPair(address pair) external view returns (bool); function quoteAddLiquidity( address tokenA, address tokenB, bool stable, uint amountADesired, uint amountBDesired ) external view returns (uint amountA, uint amountB, uint liquidity); function quoteRemoveLiquidity( address tokenA, address tokenB, bool stable, uint liquidity ) external view returns (uint amountA, uint amountB); function addLiquidity( address tokenA, address tokenB, bool stable, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, bool stable, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH, uint liquidity); // **** REMOVE LIQUIDITY **** function removeLiquidity( address tokenA, address tokenB, bool stable, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, bool stable, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, bool stable, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, bool stable, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokensSimple( uint amountIn, uint amountOutMin, address tokenFrom, address tokenTo, bool stable, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, route[] calldata routes, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens( uint amountOutMin, route[] calldata routes, address to, uint deadline ) external payable returns (uint[] memory amounts); function swapExactTokensForETH( uint amountIn, uint amountOutMin, route[] calldata routes, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, route[] calldata routes, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, route[] calldata routes, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, route[] calldata routes, address to, uint deadline ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V2 interface IV2SwapRouter { struct Route { address from; address to; bool stable; } /// @notice Swaps `amountIn` of one token for as much as possible of another token /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance, /// and swap the entire amount, enabling contracts to send tokens before calling this function. /// @param amountIn The amount of token to swap /// @param amountOutMin The minimum amount of output that must be received /// @param path The ordered list of tokens to swap through /// @param to The recipient address /// @return amountOut The amount of the received token function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, Route[] calldata path, address to ) external payable returns (uint256 amountOut); }
{ "viaIR": true, "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
[{"inputs":[{"internalType":"address","name":"_staking_token","type":"address"},{"internalType":"address","name":"_rewardPool","type":"address"},{"internalType":"address","name":"_reward_token","type":"address"},{"internalType":"address","name":"_unirouter","type":"address"},{"internalType":"address","name":"_lpRouter","type":"address"},{"internalType":"bool","name":"_harvestOnDeposit","type":"bool"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"callFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"protocolFee","type":"uint256"}],"name":"ChargeFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"harvester","type":"address"}],"name":"Harvest","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":"uint256","name":"newTolerance","type":"uint256"}],"name":"SetSlippageTolerance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newVault","type":"address"}],"name":"SetVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"SetWithdrawalFee","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":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CALL_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_BATCH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PLATFORM_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWAL_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfStakingToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beforeDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestCallReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvestOnDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lp0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lp1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"native_token","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":[],"name":"reward_token","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":[{"internalType":"bool","name":"_harvestOnDeposit","type":"bool"}],"name":"setHarvestOnDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tolerance","type":"uint256"}],"name":"setSlippageTolerance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slippageTolerance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"staking_token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unirouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060409080825234620005a45760e08162002a6d8038038091620000258285620005a9565b833981010312620005a4576200003b81620005e3565b9060206200004b818301620005e3565b9162000059858201620005e3565b926200006860608301620005e3565b936200007760808401620005e3565b926200009460c06200008c60a08401620005f8565b9201620005e3565b9533156200058c576000809781548b519760018060a01b0380809d81968295338482167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08480a360ff60a01b1933169060018060a81b03191617905560018055620186a060065560646007556103e86008556064600955610384600a55602d600b5516958160018060a01b03199a888c6005541617600555168a600c541617600c551688600d541617600d551686600e541617600e5516846011541617601155630dfe168160e01b855260049486818781855afa90811562000582579189889288948b916200053a575b50168660025416176002558a519283809263d21220a760e01b82525afa908115620005305790889392918891620004e7575b50831684600354161760035560ff80196010541691151516809117601055620004b5575b16808284541617835560125468010000000000000000811015620004a25760018101806012558110156200048f5760128652848620019182541617905583600554169380600c541690865163095ea7b360e01b92838252848201528481604481896000199b8c60248401525af18015620003d15762000453575b5080600e54168751908382528482015286602482015284816044818973039e2fb66102314ce7b64ce5ce3e5183bc94ad385af18015620003d15762000417575b50848482855416604484600d54168b5194859384928984528a8401528c60248401525af18015620003d157620003db575b5084848260025416604484600e54168b5194859384928984528a8401528c60248401525af18015620003d1579186918695949362000383575b509081604493926003541690600e5416988a51998a968795865285015260248401525af18015620003795762000338575b83516124669081620006078239f35b82813d831162000371575b6200034f8183620005a9565b810103126200036e57506200036490620005f8565b5038808062000329565b80fd5b503d62000343565b84513d84823e3d90fd5b80925085919394953d8311620003c9575b620003a08183620005a9565b81010312620003c5579185604492620003bb879695620005f8565b50909192620002f8565b8580fd5b503d62000394565b88513d88823e3d90fd5b8481813d83116200040f575b620003f38183620005a9565b81010312620003c5576200040790620005f8565b5038620002bf565b503d620003e7565b8481813d83116200044b575b6200042f8183620005a9565b81010312620003c5576200044390620005f8565b50386200028e565b503d62000423565b8481813d831162000487575b6200046b8183620005a9565b81010312620003c5576200047f90620005f8565b50386200024e565b503d6200045f565b634e487b7160e01b865260328452602486fd5b634e487b7160e01b865260418452602486fd5b856007557f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af858951888152a1620001d4565b8092939450878092503d831162000528575b620005058183620005a9565b81010312620005245790876200051d819493620005e3565b90620001b0565b8680fd5b503d620004f9565b89513d89823e3d90fd5b93929450505081813d83116200057a575b620005578183620005a9565b8101031262000576578591896200056f8993620005e3565b386200017e565b8780fd5b503d6200054b565b8a513d8a823e3d90fd5b8851631e4fbdf760e01b815260006004820152602490fd5b600080fd5b601f909101601f19168101906001600160401b03821190821017620005cd57604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620005a457565b51908115158203620005a45756fe608060408181526004918236101561001657600080fd5b600092833560e01c918263025e30b014611fbe575081630974632414611f955781630c8106dc14611f6c5781630e8fbb5a14611ef05781631158808614611ed3578163117da1ee14611e43578163171d218914611e28578163257ae0de14611dff5781632638c09e14611dd757816327ced53714611da85781632dc7d74c14611d7f5781632e1a7d4d14611abb5781633410fe6e14611a9c57816334fbc9a114611a7d5781633f4ba83a146117df5781634641257d1461118457816354518b1a14611165578163573fef0a14610a875781635c975abb14610a6257816361d027b314610a3957816366666aa914610a105781636817031b14610946578163715018a6146108e9578163722713f7146108cc5781637b83fc1d146108a35781637ff8f1e91461087f5781638456cb59146106855781638912cb8b146106615781638da5cb5b14610639578163951d6d201461061a5781639bff5ddb146105fb578163d03153aa146105dc578163d0e30db01461053a578163e7a7250a146104a7578163f1a392da14610488578163f2fde38b146103ef578163f301af4214610398578163fb61778714610201575063fbfa77cf146101d257600080fd5b346101fd57816003193601126101fd57601054905160089190911c6001600160a01b03168152602090f35b5080fd5b9190503461039457826003193601126103945760018060a01b039061022e8260105460081c163314612191565b8382600c541661023c6123da565b813b156103945782916024839286519485938492632e1a7d4d60e01b84528b8401525af1801561038a57610372575b505081600554168151906370a0823160e01b82523085830152602094868684602481865afa938415610366579087949392918194610328575b50601054865163a9059cbb60e01b81526001600160a01b0360089290921c9098161691870191825260208201939093528592839182906040015b03925af190811561031f57506102f2578280f35b8161031192903d10610318575b61030981836120a5565b810190612418565b5038808280f35b503d6102ff565b513d85823e3d90fd5b9480929794508591503d831161035f575b61034381836120a5565b8101031261035a576102de948787945193966102a4565b600080fd5b503d610339565b508451903d90823e3d90fd5b61037b90612027565b61038657833861026b565b8380fd5b83513d84823e3d90fd5b8280fd5b90503461039457602036600319011261039457356012548110156103945760126020935260018060a01b03907fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440154169051908152f35b91905034610394576020366003190112610394576001600160a01b0382358181169391929084900361048457610423611fda565b831561046e575050600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8480fd5b5050346101fd57816003193601126101fd57602090600f549051908152f35b8383346101fd57816003193601126101fd57600c5481516246613160e11b81523094810194909452602090849060249082906001600160a01b03165afa91821561052f57916104fb575b6020925051908152f35b90506020823d8211610527575b81610515602093836120a5565b8101031261035a5760209151906104f1565b3d9150610508565b9051903d90823e3d90fd5b919050346103945782600319360112610394576010543360089190911c6001600160a01b03161480156105d3575b156105815782610576612006565b61057e6120c7565b80f35b906020608492519162461bcd60e51b8352820152602660248201527f4e6f7420617574686f72697a65642c206f6e6c79205661756c74206f7220537460448201526572617465677960d01b6064820152fd5b50303314610568565b5050346101fd57816003193601126101fd576020906013549051908152f35b5050346101fd57816003193601126101fd576020906007549051908152f35b5050346101fd57816003193601126101fd576020906009549051908152f35b5050346101fd57816003193601126101fd57905490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760209060ff6010541690519015158152f35b90503461039457826003193601126103945761069f611fda565b6106a7612006565b825460ff60a01b1916600160a01b1783558151338152602092907f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258908490a1600554600c54825163095ea7b360e01b8082526001600160a01b0392831682870152602482018890529194928690829060449082908b908a165af1801561081e57610862575b5083600e54168351908282528382015286602482015285816044818a73039e2fb66102314ce7b64ce5ce3e5183bc94ad385af1801561081e57610845575b50858585845416604487600d541687519485938492888452898401528160248401525af1801561081e57610828575b5085858560025416604487600e541687519485938492888452898401528160248401525af1801561081e5791604491879493610801575b5087866003541696600e5416968651978895869485528401528160248401525af190811561031f57506102f2578280f35b61081790853d87116103185761030981836120a5565b50386107d0565b84513d89823e3d90fd5b61083e90863d88116103185761030981836120a5565b5038610799565b61085b90863d88116103185761030981836120a5565b503861076a565b61087890863d88116103185761030981836120a5565b503861072c565b5050346101fd57816003193601126101fd5760209061089c61236e565b9051908152f35b5050346101fd57816003193601126101fd5760025490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760209061089c612352565b8334610943578060031936011261094357610902611fda565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b9050346103945760203660031901126103945780356001600160a01b0381169290919083830361048457610978611fda565b823b156109cd57505060108054610100600160a81b03191660089290921b610100600160a81b03169190911790557fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f308280a280f35b906020606492519162461bcd60e51b8352820152601860248201527f5661756c74206d757374206265206120636f6e747261637400000000000000006044820152fd5b5050346101fd57816003193601126101fd57600c5490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760115490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760ff6020925460a01c1690519015158152f35b9190503461039457826003193601126103945760105460ff8116610aa9578380f35b6001600160a01b039060081c8116330361112d57610ac5612006565b8381600c5416803b156101fd5781809186865180948193631e8c5c8960e11b83525af180156111235761110f575b5050808354168251936370a0823160e01b808652308287015260209260249684818981855afa9081156110385789916110e2575b50610b64575b5050505050505042600f55337f188a622567eeca997c3d494fd65f76ca910b90a50a0c44d5e37b2ea5539e027b8280a23880808380f35b87865191838352308584015285838a81845afa9283156110d85792888388938c968b969461109d575b50908591835194610b9d86612051565b60808601918383528652838b8888019a8273039e2fb66102314ce7b64ce5ce3e5183bc94ad389c8d8152898b019330855260608c0196875260a08c0198895282600d54169a519d8e9c8d63076c8e2d60e11b90525116908c015251169089015251166044870152516064860152516084850152511660a4830152818c5a9260c493f1801561103857908591611074575b50508551828152308482015284818981855afa9081156110385787908a92611042575b50610c7f7f5c48b059bc2759d631bf4951f184f5641ca6db26a8ad956276910a01562d59b392600b54906121e9565b610ca1610c8f60085480936121fc565b91610c9c600954846121e9565b6121fc565b90610cb9610caf83836121c6565b8a6011541661221c565b825191825287820152a18551828152308482015284818981855afa90811561103857899161100b575b50908489939260011c8851610cf681612089565b60018152855b838110610fd957508860025416808503610f39575b508860035416808503610e98575b50505050508460025416938651828152308582015281818a81895afa908115610e8e578491610e5d575b508660035416928851908152308682015282818b81875afa928315610e53578593610e19575b50509061012494939291606097600e54169289519a8b988997635a47ddc360e01b8952880152860152836044860152606485015260848401528160a48401528160c48401523060e4840152426101048401525af1908115610e105750610de5575b50610dd96120c7565b38808080808080610b2d565b606090813d8111610e09575b610dfb81836120a5565b810103126109435738610dd0565b503d610df1565b513d84823e3d90fd5b8092969550819493503d8311610e4c575b610e3481836120a5565b8101031261035a579051919288929080610124610d6f565b503d610e2a565b89513d87823e3d90fd5b809450828092503d8311610e87575b610e7681836120a5565b8101031261035a5788925138610d49565b503d610e6c565b88513d86823e3d90fd5b610ee594610ea5836122ac565b515283610eb1836122ac565b510152858a610ebf836122ac565b51015288600d541690868b51809681958294632fdb223960e01b845230918d85016122cf565b03925af18015610f2f57908591610f00575b80808392610d1f565b90809293503d8311610f28575b610f1781836120a5565b8101031261035a5786908338610ef7565b503d610f0d565b87513d85823e3d90fd5b9091925083610f47836122ac565b515287610f53836122ac565b5101528489610f61836122ac565b51015287600d5416878a518092632fdb223960e01b8252818981610f8a8d898b309285016122cf565b03925af18015610fcf57908893929115610d11579092809296503d8311610fc8575b610fb681836120a5565b8101031261035a578993869138610d11565b503d610fac565b8a513d88823e3d90fd5b909291939495508951610feb8161206d565b8c81528c838201528c8b820152828285010152019186918b959493610cfc565b90508481813d8311611031575b61102281836120a5565b8101031261035a575138610ce2565b503d611018565b87513d8b823e3d90fd5b809250868092503d831161106d575b61105b81836120a5565b8101031261035a575186610c7f610c50565b503d611051565b813d8311611096575b61108781836120a5565b8101031261035a578338610c2d565b503d61107d565b9650945050505082813d83116110d1575b6110b881836120a5565b8101031261035a5784869188838c8c9651939091610b8d565b503d6110ae565b88513d84823e3d90fd5b90508481813d8311611108575b6110f981836120a5565b8101031261035a575138610b27565b503d6110ef565b61111890612027565b610386578338610af3565b84513d84823e3d90fd5b815162461bcd60e51b815260208185015260126024820152715661756c74206465706f736974206f6e6c7960701b6044820152606490fd5b5050346101fd57816003193601126101fd576020906006549051908152f35b91905034610394578260031936011261039457333b1580156117c5575b15611789576111ae612006565b600c546001600160a01b039084908216803b156101fd5781809186865180948193631e8c5c8960e11b83525af1801561112357611775575b5050808354168251936370a0823160e01b808652308287015260209260249684818981855afa908115611038578991611748575b5061124d575b8742600f55337f188a622567eeca997c3d494fd65f76ca910b90a50a0c44d5e37b2ea5539e027b8280a280f35b87865191838352308584015285838a81845afa9283156110d857888388938c938b969761170e575b50908591898385519661128788612051565b8888019082888a019260608b019560808c01978989528c5273039e2fb66102314ce7b64ce5ce3e5183bc94ad389e8f8352308652875260a08c0198895282600d54169a519d8e9c8d63076c8e2d60e11b90525116908c015251169089015251166044870152516064860152516084850152511660a4830152818c5a9260c493f18015611038579085916116e5575b50508551828152308482015284818981855afa9081156110385787908a926116b3575b506113677f5c48b059bc2759d631bf4951f184f5641ca6db26a8ad956276910a01562d59b392600b54906121e9565b611377610c8f60085480936121fc565b9061139661138583836121c6565b3033036116a4578a6011541661221c565b825191825287820152a18551828152308482015284818981855afa908115611038578991611677575b50908489939260011c88516113d381612089565b60018152855b838110611645575088600254168085036115af575b508860035416808503611558575b50505050508460025416938651828152308582015281818a81895afa908115610e8e578491611527575b508660035416928851908152308682015282818b81875afa928315610e535785936114ed575b50509061012494939291606097600e54169289519a8b988997635a47ddc360e01b8952880152860152836044860152606485015260848401528160a48401528160c48401523060e4840152426101048401525af1908115610e1057506114c2575b506114b66120c7565b38808080808080611220565b606090813d81116114e6575b6114d881836120a5565b8101031261094357386114ad565b503d6114ce565b8092969550819493503d8311611520575b61150881836120a5565b8101031261035a57905191928892908061012461144c565b503d6114fe565b809450828092503d8311611551575b61154081836120a5565b8101031261035a5788925138611426565b503d611536565b61156594610ea5836122ac565b03925af18015610f2f57908591611580575b808083926113fc565b90809293503d83116115a8575b61159781836120a5565b8101031261035a5786908338611577565b503d61158d565b90919250836115bd836122ac565b5152876115c9836122ac565b51015284896115d7836122ac565b51015287600d5416878a518092632fdb223960e01b82528189816116008d898b309285016122cf565b03925af18015610fcf579088939291156113ee579092809296503d831161163e575b61162c81836120a5565b8101031261035a5789938691386113ee565b503d611622565b9092919394955089516116578161206d565b8c81528c838201528c8b820152828285010152019186918b9594936113d9565b90508481813d831161169d575b61168e81836120a5565b8101031261035a5751386113bf565b503d611684565b6116ae843361221c565b610caf565b809250868092503d83116116de575b6116cc81836120a5565b8101031261035a575186611367611338565b503d6116c2565b813d8311611707575b6116f881836120a5565b8101031261035a578338611315565b503d6116ee565b9550955050505081813d8311611741575b61172981836120a5565b8101031261035a57848888888c819551969091611275565b503d61171f565b90508481813d831161176e575b61175f81836120a5565b8101031261035a57513861121a565b503d611755565b61177e90612027565b6103865783386111e6565b906020606492519162461bcd60e51b8352820152601660248201527508585d5d1a0810dbdb9d1c9858dd0812185c9d995cdd60521b6044820152fd5b506010543360089190911c6001600160a01b0316146111a1565b919050346103945782600319360112610394576117fa611fda565b825460ff8160a01c1615611a6f5760ff60a01b1916835580513381528391906020907f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa908290a1600554600c54835163095ea7b360e01b8082526001600160a01b03928316888301526000196024808401829052604498909795919391879183918b91839189165af18015611a0e57611a52575b5082600e5416845190828252898201528287820152858189818d73039e2fb66102314ce7b64ce5ce3e5183bc94ad385af18015611a0e57611a35575b50828854168584600d5416898b8d89519586948593898552840152888d8401525af18015611a0e57611a18575b5082600254168584600e5416898b8d89519586948593898552840152888d8401525af18015611a0e5786928a928a926119f1575b508b866003541687600e5416968951978896879586528501528b8401525af180156119e7576119ca575b5060105460081c16331480156119c1575b156119745785610576612006565b5162461bcd60e51b8152938401526026908301527f4e6f7420617574686f72697a65642c206f6e6c79205661756c74206f72205374908201526572617465677960d01b6064820152608490fd5b50303314611966565b6119e090843d86116103185761030981836120a5565b5038611955565b83513d8a823e3d90fd5b611a0790853d87116103185761030981836120a5565b503861192b565b85513d8c823e3d90fd5b611a2e90863d88116103185761030981836120a5565b50386118f7565b611a4b90863d88116103185761030981836120a5565b50386118ca565b611a6890863d88116103185761030981836120a5565b503861188e565b5051638dfc202b60e01b8152fd5b5050346101fd57816003193601126101fd57602090600b549051908152f35b5050346101fd57816003193601126101fd576020906008549051908152f35b839150346101fd5760209081600319360112610394578035600260015414611d7057600260015560018060a01b0390611afc8260105460081c163314612191565b816005541686519085826024816370a0823160e01b94858252308a8301525afa918215611d2e57908692918892611d3c575b5081848110611c66575b505082600092938211611c5e575b50611b5f611b56600754836121e9565b600654906121fc565b60ff885460a01c161580611c51575b611c42575b50600554601054895163a9059cbb60e01b86820190815260089290921c87166001600160a01b03166024820152604481019390935294169390611bc381606481015b03601f1981018352826120a5565b519082855af115611c37576000513d611c2e5750803b155b611c1857837f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d8487611c0b612352565b9051908152a16001805580f35b8451635274afe760e01b81529182015260249150fd5b60011415611bdb565b84513d6000823e3d90fd5b611c4b916121c6565b88611b73565b5060ff6010541615611b6e565b905088611b46565b91509150611c7984600c541691846121c6565b813b15611d38578791602483928b519485938492632e1a7d4d60e01b84528b8401525af18015611d2e57611d1b575b50848360055416916024895180948193825230898301525afa908115611d1157908592918791611cdf575b50909190600089611b38565b8381939492503d8311611d0a575b611cf781836120a5565b8101031261035a57518491906000611cd3565b503d611ced565b87513d88823e3d90fd5b611d2790969196612027565b9487611ca8565b88513d89823e3d90fd5b8780fd5b8092508391933d8311611d69575b611d5481836120a5565b81010312611d655751859189611b2e565b8680fd5b503d611d4a565b508351633ee5aeb560e01b8152fd5b5050346101fd57816003193601126101fd5760055490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd576020905173039e2fb66102314ce7b64ce5ce3e5183bc94ad388152f35b9050346103945782600319360112610394575490516001600160a01b03909116815260209150f35b5050346101fd57816003193601126101fd57600d5490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5751908152602090f35b9190503461039457602036600319011261039457813591611e62611fda565b6105dc8311611e9d5750816020917fe4a7fd2711237e77309a9a16ff636a748dbf956fd91f6e6da800d9302f441a799360135551908152a180f35b6020606492519162461bcd60e51b83528201526011602482015270496e76616c696420746f6c6572616e636560781b6044820152fd5b5050346101fd57816003193601126101fd5760209061089c6123da565b9050346103945760203660031901126103945735801515809103610394577f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af91602091611f3b611fda565b60ff8019601054169116809117601055600014611f5e578360075551838152a180f35b600a60075551600a8152a180f35b5050346101fd57816003193601126101fd57600e5490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760035490516001600160a01b039091168152602090f35b8490346101fd57816003193601126101fd57602090600a548152f35b6000546001600160a01b03163303611fee57565b60405163118cdaa760e01b8152336004820152602490fd5b60ff60005460a01c1661201557565b60405163d93c066560e01b8152600490fd5b67ffffffffffffffff811161203b57604052565b634e487b7160e01b600052604160045260246000fd5b60c0810190811067ffffffffffffffff82111761203b57604052565b6060810190811067ffffffffffffffff82111761203b57604052565b6040810190811067ffffffffffffffff82111761203b57604052565b90601f8019910116810190811067ffffffffffffffff82111761203b57604052565b6005546040516370a0823160e01b8152306004820152906001600160a01b03906020908390602490829085165afa9182156121525760009261215e575b508161210e575050565b600c541690813b1561035a5760009160248392604051948593849263b6b55f2560e01b845260048401525af18015612152576121475750565b61215090612027565b565b6040513d6000823e3d90fd5b90916020823d8211612189575b81612178602093836120a5565b810103126109435750519038612104565b3d915061216b565b1561219857565b60405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b6044820152606490fd5b919082039182116121d357565b634e487b7160e01b600052601160045260246000fd5b818102929181159184041417156121d357565b8115612206570490565b634e487b7160e01b600052601260045260246000fd5b60405163a9059cbb60e01b60208281019182526001600160a01b03909316602483015260448201939093526000906122578160648101611bb5565b5173039e2fb66102314ce7b64ce5ce3e5183bc94ad389382855af115612152576000513d6122a35750803b155b61228b5750565b60249060405190635274afe760e01b82526004820152fd5b60011415612284565b8051156122b95760200190565b634e487b7160e01b600052603260045260246000fd5b91939293608083019183526001602092818486015260409360808587015283518092528060a087019401946000905b83821061231c575050505050606091509360018060a01b0316910152565b865180516001600160a01b03908116885284820151168488015281015115158187015295820195606090950194908401906122fe565b61235a61236e565b6123626123da565b81018091116121d35790565b6005546040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa908115612152576000916123ac575090565b906020823d82116123d2575b816123c5602093836120a5565b8101031261094357505190565b3d91506123b8565b600c546040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa908115612152576000916123ac575090565b9081602091031261035a5751801515810361035a579056fea2646970667358221220d1b2736338b95395454c7afb6ed7b05872e80b61f0f0ed1017fff880e509da9a64736f6c6343000814003300000000000000000000000024f5cd888057a721f1acd7cba1afa7a8384c3e12000000000000000000000000b7b6fc72cbc8e8fa67737f83e945db2795a66ef7000000000000000000000000a04bc7140c26fc9bb1f36b1a604c7a5a88fb0e70000000000000000000000000a047e2abf8263fca7c368f43e2f960a06fd9949f000000000000000000000000f5f7231073b3b41c04ba655e1a7438b1a7b29c2700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000c16da76872131bc6095f73b894b4757873dace1
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c918263025e30b014611fbe575081630974632414611f955781630c8106dc14611f6c5781630e8fbb5a14611ef05781631158808614611ed3578163117da1ee14611e43578163171d218914611e28578163257ae0de14611dff5781632638c09e14611dd757816327ced53714611da85781632dc7d74c14611d7f5781632e1a7d4d14611abb5781633410fe6e14611a9c57816334fbc9a114611a7d5781633f4ba83a146117df5781634641257d1461118457816354518b1a14611165578163573fef0a14610a875781635c975abb14610a6257816361d027b314610a3957816366666aa914610a105781636817031b14610946578163715018a6146108e9578163722713f7146108cc5781637b83fc1d146108a35781637ff8f1e91461087f5781638456cb59146106855781638912cb8b146106615781638da5cb5b14610639578163951d6d201461061a5781639bff5ddb146105fb578163d03153aa146105dc578163d0e30db01461053a578163e7a7250a146104a7578163f1a392da14610488578163f2fde38b146103ef578163f301af4214610398578163fb61778714610201575063fbfa77cf146101d257600080fd5b346101fd57816003193601126101fd57601054905160089190911c6001600160a01b03168152602090f35b5080fd5b9190503461039457826003193601126103945760018060a01b039061022e8260105460081c163314612191565b8382600c541661023c6123da565b813b156103945782916024839286519485938492632e1a7d4d60e01b84528b8401525af1801561038a57610372575b505081600554168151906370a0823160e01b82523085830152602094868684602481865afa938415610366579087949392918194610328575b50601054865163a9059cbb60e01b81526001600160a01b0360089290921c9098161691870191825260208201939093528592839182906040015b03925af190811561031f57506102f2578280f35b8161031192903d10610318575b61030981836120a5565b810190612418565b5038808280f35b503d6102ff565b513d85823e3d90fd5b9480929794508591503d831161035f575b61034381836120a5565b8101031261035a576102de948787945193966102a4565b600080fd5b503d610339565b508451903d90823e3d90fd5b61037b90612027565b61038657833861026b565b8380fd5b83513d84823e3d90fd5b8280fd5b90503461039457602036600319011261039457356012548110156103945760126020935260018060a01b03907fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440154169051908152f35b91905034610394576020366003190112610394576001600160a01b0382358181169391929084900361048457610423611fda565b831561046e575050600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8480fd5b5050346101fd57816003193601126101fd57602090600f549051908152f35b8383346101fd57816003193601126101fd57600c5481516246613160e11b81523094810194909452602090849060249082906001600160a01b03165afa91821561052f57916104fb575b6020925051908152f35b90506020823d8211610527575b81610515602093836120a5565b8101031261035a5760209151906104f1565b3d9150610508565b9051903d90823e3d90fd5b919050346103945782600319360112610394576010543360089190911c6001600160a01b03161480156105d3575b156105815782610576612006565b61057e6120c7565b80f35b906020608492519162461bcd60e51b8352820152602660248201527f4e6f7420617574686f72697a65642c206f6e6c79205661756c74206f7220537460448201526572617465677960d01b6064820152fd5b50303314610568565b5050346101fd57816003193601126101fd576020906013549051908152f35b5050346101fd57816003193601126101fd576020906007549051908152f35b5050346101fd57816003193601126101fd576020906009549051908152f35b5050346101fd57816003193601126101fd57905490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760209060ff6010541690519015158152f35b90503461039457826003193601126103945761069f611fda565b6106a7612006565b825460ff60a01b1916600160a01b1783558151338152602092907f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258908490a1600554600c54825163095ea7b360e01b8082526001600160a01b0392831682870152602482018890529194928690829060449082908b908a165af1801561081e57610862575b5083600e54168351908282528382015286602482015285816044818a73039e2fb66102314ce7b64ce5ce3e5183bc94ad385af1801561081e57610845575b50858585845416604487600d541687519485938492888452898401528160248401525af1801561081e57610828575b5085858560025416604487600e541687519485938492888452898401528160248401525af1801561081e5791604491879493610801575b5087866003541696600e5416968651978895869485528401528160248401525af190811561031f57506102f2578280f35b61081790853d87116103185761030981836120a5565b50386107d0565b84513d89823e3d90fd5b61083e90863d88116103185761030981836120a5565b5038610799565b61085b90863d88116103185761030981836120a5565b503861076a565b61087890863d88116103185761030981836120a5565b503861072c565b5050346101fd57816003193601126101fd5760209061089c61236e565b9051908152f35b5050346101fd57816003193601126101fd5760025490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760209061089c612352565b8334610943578060031936011261094357610902611fda565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b9050346103945760203660031901126103945780356001600160a01b0381169290919083830361048457610978611fda565b823b156109cd57505060108054610100600160a81b03191660089290921b610100600160a81b03169190911790557fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f308280a280f35b906020606492519162461bcd60e51b8352820152601860248201527f5661756c74206d757374206265206120636f6e747261637400000000000000006044820152fd5b5050346101fd57816003193601126101fd57600c5490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760115490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760ff6020925460a01c1690519015158152f35b9190503461039457826003193601126103945760105460ff8116610aa9578380f35b6001600160a01b039060081c8116330361112d57610ac5612006565b8381600c5416803b156101fd5781809186865180948193631e8c5c8960e11b83525af180156111235761110f575b5050808354168251936370a0823160e01b808652308287015260209260249684818981855afa9081156110385789916110e2575b50610b64575b5050505050505042600f55337f188a622567eeca997c3d494fd65f76ca910b90a50a0c44d5e37b2ea5539e027b8280a23880808380f35b87865191838352308584015285838a81845afa9283156110d85792888388938c968b969461109d575b50908591835194610b9d86612051565b60808601918383528652838b8888019a8273039e2fb66102314ce7b64ce5ce3e5183bc94ad389c8d8152898b019330855260608c0196875260a08c0198895282600d54169a519d8e9c8d63076c8e2d60e11b90525116908c015251169089015251166044870152516064860152516084850152511660a4830152818c5a9260c493f1801561103857908591611074575b50508551828152308482015284818981855afa9081156110385787908a92611042575b50610c7f7f5c48b059bc2759d631bf4951f184f5641ca6db26a8ad956276910a01562d59b392600b54906121e9565b610ca1610c8f60085480936121fc565b91610c9c600954846121e9565b6121fc565b90610cb9610caf83836121c6565b8a6011541661221c565b825191825287820152a18551828152308482015284818981855afa90811561103857899161100b575b50908489939260011c8851610cf681612089565b60018152855b838110610fd957508860025416808503610f39575b508860035416808503610e98575b50505050508460025416938651828152308582015281818a81895afa908115610e8e578491610e5d575b508660035416928851908152308682015282818b81875afa928315610e53578593610e19575b50509061012494939291606097600e54169289519a8b988997635a47ddc360e01b8952880152860152836044860152606485015260848401528160a48401528160c48401523060e4840152426101048401525af1908115610e105750610de5575b50610dd96120c7565b38808080808080610b2d565b606090813d8111610e09575b610dfb81836120a5565b810103126109435738610dd0565b503d610df1565b513d84823e3d90fd5b8092969550819493503d8311610e4c575b610e3481836120a5565b8101031261035a579051919288929080610124610d6f565b503d610e2a565b89513d87823e3d90fd5b809450828092503d8311610e87575b610e7681836120a5565b8101031261035a5788925138610d49565b503d610e6c565b88513d86823e3d90fd5b610ee594610ea5836122ac565b515283610eb1836122ac565b510152858a610ebf836122ac565b51015288600d541690868b51809681958294632fdb223960e01b845230918d85016122cf565b03925af18015610f2f57908591610f00575b80808392610d1f565b90809293503d8311610f28575b610f1781836120a5565b8101031261035a5786908338610ef7565b503d610f0d565b87513d85823e3d90fd5b9091925083610f47836122ac565b515287610f53836122ac565b5101528489610f61836122ac565b51015287600d5416878a518092632fdb223960e01b8252818981610f8a8d898b309285016122cf565b03925af18015610fcf57908893929115610d11579092809296503d8311610fc8575b610fb681836120a5565b8101031261035a578993869138610d11565b503d610fac565b8a513d88823e3d90fd5b909291939495508951610feb8161206d565b8c81528c838201528c8b820152828285010152019186918b959493610cfc565b90508481813d8311611031575b61102281836120a5565b8101031261035a575138610ce2565b503d611018565b87513d8b823e3d90fd5b809250868092503d831161106d575b61105b81836120a5565b8101031261035a575186610c7f610c50565b503d611051565b813d8311611096575b61108781836120a5565b8101031261035a578338610c2d565b503d61107d565b9650945050505082813d83116110d1575b6110b881836120a5565b8101031261035a5784869188838c8c9651939091610b8d565b503d6110ae565b88513d84823e3d90fd5b90508481813d8311611108575b6110f981836120a5565b8101031261035a575138610b27565b503d6110ef565b61111890612027565b610386578338610af3565b84513d84823e3d90fd5b815162461bcd60e51b815260208185015260126024820152715661756c74206465706f736974206f6e6c7960701b6044820152606490fd5b5050346101fd57816003193601126101fd576020906006549051908152f35b91905034610394578260031936011261039457333b1580156117c5575b15611789576111ae612006565b600c546001600160a01b039084908216803b156101fd5781809186865180948193631e8c5c8960e11b83525af1801561112357611775575b5050808354168251936370a0823160e01b808652308287015260209260249684818981855afa908115611038578991611748575b5061124d575b8742600f55337f188a622567eeca997c3d494fd65f76ca910b90a50a0c44d5e37b2ea5539e027b8280a280f35b87865191838352308584015285838a81845afa9283156110d857888388938c938b969761170e575b50908591898385519661128788612051565b8888019082888a019260608b019560808c01978989528c5273039e2fb66102314ce7b64ce5ce3e5183bc94ad389e8f8352308652875260a08c0198895282600d54169a519d8e9c8d63076c8e2d60e11b90525116908c015251169089015251166044870152516064860152516084850152511660a4830152818c5a9260c493f18015611038579085916116e5575b50508551828152308482015284818981855afa9081156110385787908a926116b3575b506113677f5c48b059bc2759d631bf4951f184f5641ca6db26a8ad956276910a01562d59b392600b54906121e9565b611377610c8f60085480936121fc565b9061139661138583836121c6565b3033036116a4578a6011541661221c565b825191825287820152a18551828152308482015284818981855afa908115611038578991611677575b50908489939260011c88516113d381612089565b60018152855b838110611645575088600254168085036115af575b508860035416808503611558575b50505050508460025416938651828152308582015281818a81895afa908115610e8e578491611527575b508660035416928851908152308682015282818b81875afa928315610e535785936114ed575b50509061012494939291606097600e54169289519a8b988997635a47ddc360e01b8952880152860152836044860152606485015260848401528160a48401528160c48401523060e4840152426101048401525af1908115610e1057506114c2575b506114b66120c7565b38808080808080611220565b606090813d81116114e6575b6114d881836120a5565b8101031261094357386114ad565b503d6114ce565b8092969550819493503d8311611520575b61150881836120a5565b8101031261035a57905191928892908061012461144c565b503d6114fe565b809450828092503d8311611551575b61154081836120a5565b8101031261035a5788925138611426565b503d611536565b61156594610ea5836122ac565b03925af18015610f2f57908591611580575b808083926113fc565b90809293503d83116115a8575b61159781836120a5565b8101031261035a5786908338611577565b503d61158d565b90919250836115bd836122ac565b5152876115c9836122ac565b51015284896115d7836122ac565b51015287600d5416878a518092632fdb223960e01b82528189816116008d898b309285016122cf565b03925af18015610fcf579088939291156113ee579092809296503d831161163e575b61162c81836120a5565b8101031261035a5789938691386113ee565b503d611622565b9092919394955089516116578161206d565b8c81528c838201528c8b820152828285010152019186918b9594936113d9565b90508481813d831161169d575b61168e81836120a5565b8101031261035a5751386113bf565b503d611684565b6116ae843361221c565b610caf565b809250868092503d83116116de575b6116cc81836120a5565b8101031261035a575186611367611338565b503d6116c2565b813d8311611707575b6116f881836120a5565b8101031261035a578338611315565b503d6116ee565b9550955050505081813d8311611741575b61172981836120a5565b8101031261035a57848888888c819551969091611275565b503d61171f565b90508481813d831161176e575b61175f81836120a5565b8101031261035a57513861121a565b503d611755565b61177e90612027565b6103865783386111e6565b906020606492519162461bcd60e51b8352820152601660248201527508585d5d1a0810dbdb9d1c9858dd0812185c9d995cdd60521b6044820152fd5b506010543360089190911c6001600160a01b0316146111a1565b919050346103945782600319360112610394576117fa611fda565b825460ff8160a01c1615611a6f5760ff60a01b1916835580513381528391906020907f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa908290a1600554600c54835163095ea7b360e01b8082526001600160a01b03928316888301526000196024808401829052604498909795919391879183918b91839189165af18015611a0e57611a52575b5082600e5416845190828252898201528287820152858189818d73039e2fb66102314ce7b64ce5ce3e5183bc94ad385af18015611a0e57611a35575b50828854168584600d5416898b8d89519586948593898552840152888d8401525af18015611a0e57611a18575b5082600254168584600e5416898b8d89519586948593898552840152888d8401525af18015611a0e5786928a928a926119f1575b508b866003541687600e5416968951978896879586528501528b8401525af180156119e7576119ca575b5060105460081c16331480156119c1575b156119745785610576612006565b5162461bcd60e51b8152938401526026908301527f4e6f7420617574686f72697a65642c206f6e6c79205661756c74206f72205374908201526572617465677960d01b6064820152608490fd5b50303314611966565b6119e090843d86116103185761030981836120a5565b5038611955565b83513d8a823e3d90fd5b611a0790853d87116103185761030981836120a5565b503861192b565b85513d8c823e3d90fd5b611a2e90863d88116103185761030981836120a5565b50386118f7565b611a4b90863d88116103185761030981836120a5565b50386118ca565b611a6890863d88116103185761030981836120a5565b503861188e565b5051638dfc202b60e01b8152fd5b5050346101fd57816003193601126101fd57602090600b549051908152f35b5050346101fd57816003193601126101fd576020906008549051908152f35b839150346101fd5760209081600319360112610394578035600260015414611d7057600260015560018060a01b0390611afc8260105460081c163314612191565b816005541686519085826024816370a0823160e01b94858252308a8301525afa918215611d2e57908692918892611d3c575b5081848110611c66575b505082600092938211611c5e575b50611b5f611b56600754836121e9565b600654906121fc565b60ff885460a01c161580611c51575b611c42575b50600554601054895163a9059cbb60e01b86820190815260089290921c87166001600160a01b03166024820152604481019390935294169390611bc381606481015b03601f1981018352826120a5565b519082855af115611c37576000513d611c2e5750803b155b611c1857837f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d8487611c0b612352565b9051908152a16001805580f35b8451635274afe760e01b81529182015260249150fd5b60011415611bdb565b84513d6000823e3d90fd5b611c4b916121c6565b88611b73565b5060ff6010541615611b6e565b905088611b46565b91509150611c7984600c541691846121c6565b813b15611d38578791602483928b519485938492632e1a7d4d60e01b84528b8401525af18015611d2e57611d1b575b50848360055416916024895180948193825230898301525afa908115611d1157908592918791611cdf575b50909190600089611b38565b8381939492503d8311611d0a575b611cf781836120a5565b8101031261035a57518491906000611cd3565b503d611ced565b87513d88823e3d90fd5b611d2790969196612027565b9487611ca8565b88513d89823e3d90fd5b8780fd5b8092508391933d8311611d69575b611d5481836120a5565b81010312611d655751859189611b2e565b8680fd5b503d611d4a565b508351633ee5aeb560e01b8152fd5b5050346101fd57816003193601126101fd5760055490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd576020905173039e2fb66102314ce7b64ce5ce3e5183bc94ad388152f35b9050346103945782600319360112610394575490516001600160a01b03909116815260209150f35b5050346101fd57816003193601126101fd57600d5490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5751908152602090f35b9190503461039457602036600319011261039457813591611e62611fda565b6105dc8311611e9d5750816020917fe4a7fd2711237e77309a9a16ff636a748dbf956fd91f6e6da800d9302f441a799360135551908152a180f35b6020606492519162461bcd60e51b83528201526011602482015270496e76616c696420746f6c6572616e636560781b6044820152fd5b5050346101fd57816003193601126101fd5760209061089c6123da565b9050346103945760203660031901126103945735801515809103610394577f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af91602091611f3b611fda565b60ff8019601054169116809117601055600014611f5e578360075551838152a180f35b600a60075551600a8152a180f35b5050346101fd57816003193601126101fd57600e5490516001600160a01b039091168152602090f35b5050346101fd57816003193601126101fd5760035490516001600160a01b039091168152602090f35b8490346101fd57816003193601126101fd57602090600a548152f35b6000546001600160a01b03163303611fee57565b60405163118cdaa760e01b8152336004820152602490fd5b60ff60005460a01c1661201557565b60405163d93c066560e01b8152600490fd5b67ffffffffffffffff811161203b57604052565b634e487b7160e01b600052604160045260246000fd5b60c0810190811067ffffffffffffffff82111761203b57604052565b6060810190811067ffffffffffffffff82111761203b57604052565b6040810190811067ffffffffffffffff82111761203b57604052565b90601f8019910116810190811067ffffffffffffffff82111761203b57604052565b6005546040516370a0823160e01b8152306004820152906001600160a01b03906020908390602490829085165afa9182156121525760009261215e575b508161210e575050565b600c541690813b1561035a5760009160248392604051948593849263b6b55f2560e01b845260048401525af18015612152576121475750565b61215090612027565b565b6040513d6000823e3d90fd5b90916020823d8211612189575b81612178602093836120a5565b810103126109435750519038612104565b3d915061216b565b1561219857565b60405162461bcd60e51b8152602060048201526006602482015265085d985d5b1d60d21b6044820152606490fd5b919082039182116121d357565b634e487b7160e01b600052601160045260246000fd5b818102929181159184041417156121d357565b8115612206570490565b634e487b7160e01b600052601260045260246000fd5b60405163a9059cbb60e01b60208281019182526001600160a01b03909316602483015260448201939093526000906122578160648101611bb5565b5173039e2fb66102314ce7b64ce5ce3e5183bc94ad389382855af115612152576000513d6122a35750803b155b61228b5750565b60249060405190635274afe760e01b82526004820152fd5b60011415612284565b8051156122b95760200190565b634e487b7160e01b600052603260045260246000fd5b91939293608083019183526001602092818486015260409360808587015283518092528060a087019401946000905b83821061231c575050505050606091509360018060a01b0316910152565b865180516001600160a01b03908116885284820151168488015281015115158187015295820195606090950194908401906122fe565b61235a61236e565b6123626123da565b81018091116121d35790565b6005546040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa908115612152576000916123ac575090565b906020823d82116123d2575b816123c5602093836120a5565b8101031261094357505190565b3d91506123b8565b600c546040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa908115612152576000916123ac575090565b9081602091031261035a5751801515810361035a579056fea2646970667358221220d1b2736338b95395454c7afb6ed7b05872e80b61f0f0ed1017fff880e509da9a64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000024f5cd888057a721f1acd7cba1afa7a8384c3e12000000000000000000000000b7b6fc72cbc8e8fa67737f83e945db2795a66ef7000000000000000000000000a04bc7140c26fc9bb1f36b1a604c7a5a88fb0e70000000000000000000000000a047e2abf8263fca7c368f43e2f960a06fd9949f000000000000000000000000f5f7231073b3b41c04ba655e1a7438b1a7b29c2700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000c16da76872131bc6095f73b894b4757873dace1
-----Decoded View---------------
Arg [0] : _staking_token (address): 0x24f5cd888057A721F1ACD7CBA1Afa7A8384c3e12
Arg [1] : _rewardPool (address): 0xB7B6fC72CbC8E8FA67737f83e945Db2795a66Ef7
Arg [2] : _reward_token (address): 0xA04BC7140c26fc9BB1F36B1A604C7A5a88fb0E70
Arg [3] : _unirouter (address): 0xA047e2AbF8263FcA7c368F43e2f960A06FD9949f
Arg [4] : _lpRouter (address): 0xF5F7231073b3B41c04BA655e1a7438b1a7b29c27
Arg [5] : _harvestOnDeposit (bool): True
Arg [6] : _treasury (address): 0x0c16Da76872131bC6095f73b894B4757873dAce1
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000024f5cd888057a721f1acd7cba1afa7a8384c3e12
Arg [1] : 000000000000000000000000b7b6fc72cbc8e8fa67737f83e945db2795a66ef7
Arg [2] : 000000000000000000000000a04bc7140c26fc9bb1f36b1a604c7a5a88fb0e70
Arg [3] : 000000000000000000000000a047e2abf8263fca7c368f43e2f960a06fd9949f
Arg [4] : 000000000000000000000000f5f7231073b3b41c04ba655e1a7438b1a7b29c27
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 0000000000000000000000000c16da76872131bc6095f73b894b4757873dace1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.