More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
1639251 | 3 days ago | Contract Creation | 0 S |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x14BBEC7a...FC71d55A5 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
GaugeV2
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import './interfaces/IPair.sol'; import './interfaces/IBribe.sol'; import "./libraries/Math.sol"; import {Constants} from "./libraries/Constants.sol"; interface IRewarder { function onReward( address user, address recipient, uint256 userBalance ) external; } contract GaugeV2 is ReentrancyGuard, Ownable { using SafeERC20 for IERC20; address public constant TOKEN_WITHDRAWER = 0x4D5bCfc14282d930eE09bee96D3a7D5F338251C6; bool public immutable isForPair; bool public emergency; IERC20 public immutable rewardToken; IERC20 public immutable TOKEN; address public VE; address public DISTRIBUTION; address public gaugeRewarder; address public internal_bribe; address public external_bribe; uint256 public immutable DURATION; uint256 internal _periodFinish; uint256 public rewardRate; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; uint256 internal _totalSupply; mapping(address => uint256) internal _balances; event RewardAdded(uint256 reward); event Deposit(address indexed user, uint256 amount); event Withdraw(address indexed user, uint256 amount); event Harvest(address indexed user, uint256 reward); event ClaimFees(address indexed from, uint256 claimed0, uint256 claimed1); event EmergencyActivated(address indexed gauge, uint256 timestamp); event EmergencyDeactivated(address indexed gauge, uint256 timestamp); modifier updateReward(address account) { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { rewards[account] = earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } modifier onlyDistribution() { require(msg.sender == DISTRIBUTION, "Caller is not RewardsDistribution contract"); _; } modifier isNotEmergency() { require(emergency == false, "emergency"); _; } constructor(address _rewardToken,address _ve,address _token,address _distribution, address _internal_bribe, address _external_bribe, bool _isForPair) { rewardToken = IERC20(_rewardToken); // main reward VE = _ve; // vested TOKEN = IERC20(_token); // underlying (LP) DISTRIBUTION = _distribution; // distro address (voter) DURATION = Constants.EPOCH_LENGTH; // distro time internal_bribe = _internal_bribe; // lp fees goes here external_bribe = _external_bribe; // bribe fees goes here isForPair = _isForPair; // pair boolean, if false no claim_fees emergency = false; // emergency flag } /* ----------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ONLY OWNER -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ ///@notice set distribution address (should be voter) function setDistribution(address _distribution) external onlyOwner { require(_distribution != address(0), "zero addr"); require(_distribution != DISTRIBUTION, "same addr"); DISTRIBUTION = _distribution; } ///@notice set gauge rewarder address function setGaugeRewarder(address _gaugeRewarder) external onlyOwner { require(_gaugeRewarder != gaugeRewarder, "same addr"); gaugeRewarder = _gaugeRewarder; } ///@notice set new internal bribe contract (where to send fees) function setInternalBribe(address _int) external onlyOwner { require(_int >= address(0), "zero"); internal_bribe = _int; } function activateEmergencyMode() external onlyOwner { require(emergency == false, "emergency"); emergency = true; emit EmergencyActivated(address(this), block.timestamp); } function stopEmergencyMode() external onlyOwner { require(emergency == true,"emergency"); emergency = false; emit EmergencyDeactivated(address(this), block.timestamp); } function withdrawExcess(address token, uint256 amount) external { require(msg.sender == TOKEN_WITHDRAWER); require(address(TOKEN) != token && token != address(0) && amount > 0); IERC20(token).safeTransfer(msg.sender, amount); } /* ----------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- VIEW FUNCTIONS -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ ///@notice total supply held function totalSupply() public view returns (uint256) { return _totalSupply; } ///@notice balance of a user function balanceOf(address account) external view returns (uint256) { return _balances[account]; } ///@notice last time reward function lastTimeRewardApplicable() public view returns (uint256) { return Math.min(block.timestamp, _periodFinish); } ///@notice reward for a sinle token function rewardPerToken() public view returns (uint256) { if (_totalSupply == 0) { return rewardPerTokenStored; } else { return rewardPerTokenStored + (lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * 1e18 / _totalSupply; } } ///@notice see earned rewards for user function earned(address account) public view returns (uint256) { return rewards[account] + _balances[account] * (rewardPerToken() - userRewardPerTokenPaid[account]) / 1e18; } ///@notice get total reward for the duration function rewardForDuration() external view returns (uint256) { return rewardRate * DURATION; } function periodFinish() external view returns (uint256) { return _periodFinish; } /* ----------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- USER INTERACTION -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ ///@notice deposit all TOKEN of msg.sender function depositAll() external { _deposit(TOKEN.balanceOf(msg.sender), msg.sender); } ///@notice deposit amount TOKEN function deposit(uint256 amount) external { _deposit(amount, msg.sender); } ///@notice deposit internal function _deposit(uint256 amount, address account) internal nonReentrant isNotEmergency updateReward(account) { require(amount > 0, "deposit(Gauge): cannot stake 0"); _balances[account] = _balances[account] + amount; _totalSupply = _totalSupply + amount; if (address(gaugeRewarder) != address(0)) { IRewarder(gaugeRewarder).onReward(account, account, _balances[account]); } TOKEN.safeTransferFrom(account, address(this), amount); emit Deposit(account, amount); } ///@notice withdraw all token function withdrawAll() external { _withdraw(_balances[msg.sender]); } ///@notice withdraw a certain amount of TOKEN function withdraw(uint256 amount) external { _withdraw(amount); } ///@notice withdraw internal function _withdraw(uint256 amount) internal nonReentrant isNotEmergency updateReward(msg.sender) { require(amount > 0, "Cannot withdraw 0"); require(_balances[msg.sender] > 0, "no balances"); _totalSupply = _totalSupply - amount; _balances[msg.sender] = _balances[msg.sender] - amount; if (address(gaugeRewarder) != address(0)) { IRewarder(gaugeRewarder).onReward(msg.sender, msg.sender,_balances[msg.sender]); } TOKEN.safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, amount); } function emergencyWithdraw() external nonReentrant { require(emergency, "emergency"); require(_balances[msg.sender] > 0, "no balances"); uint256 _amount = _balances[msg.sender]; _totalSupply = _totalSupply - _amount; _balances[msg.sender] = 0; if(address(gaugeRewarder) != address(0)) { try IRewarder(gaugeRewarder).onReward(msg.sender, msg.sender,_balances[msg.sender]) { // } catch { // } } TOKEN.safeTransfer(msg.sender, _amount); emit Withdraw(msg.sender, _amount); } function emergencyWithdrawAmount(uint256 _amount) external nonReentrant { require(emergency, "emergency"); _totalSupply = _totalSupply - _amount; _balances[msg.sender] = _balances[msg.sender] - _amount; if(address(gaugeRewarder) != address(0)) { try IRewarder(gaugeRewarder).onReward(msg.sender, msg.sender,_balances[msg.sender]) { // } catch { // } } TOKEN.safeTransfer(msg.sender, _amount); emit Withdraw(msg.sender, _amount); } ///@notice withdraw all TOKEN and harvest rewardToken function withdrawAllAndHarvest() external { _withdraw(_balances[msg.sender]); getReward(); } ///@notice User harvest function called from distribution (voter allows harvest on multiple gauges) function getReward(address _user) public nonReentrant onlyDistribution updateReward(_user) { uint256 reward = rewards[_user]; if (reward > 0) { rewards[_user] = 0; rewardToken.safeTransfer(_user, reward); emit Harvest(_user, reward); } if (gaugeRewarder != address(0)) { IRewarder(gaugeRewarder).onReward(_user, _user, _balances[_user]); } } ///@notice User harvest function function getReward() public nonReentrant updateReward(msg.sender) { uint256 reward = rewards[msg.sender]; if (reward > 0) { rewards[msg.sender] = 0; rewardToken.safeTransfer(msg.sender, reward); emit Harvest(msg.sender, reward); } if (gaugeRewarder != address(0)) { IRewarder(gaugeRewarder).onReward(msg.sender, msg.sender, _balances[msg.sender]); } } /* ----------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- DISTRIBUTION -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ /// @dev Receive rewards from distribution function notifyRewardAmount(address token, uint256 reward) external nonReentrant isNotEmergency onlyDistribution updateReward(address(0)) { require(token == address(rewardToken), "not rew token"); rewardToken.safeTransferFrom(DISTRIBUTION, address(this), reward); if (block.timestamp >= _periodFinish) { rewardRate = reward / DURATION; } else { uint256 remaining = _periodFinish - block.timestamp; uint256 leftover = remaining * rewardRate; rewardRate = (reward + leftover) / DURATION; } // Ensure the provided reward amount is not more than the balance in the contract. // This keeps the reward rate in the right range, preventing overflows due to // very high values of rewardRate in the earned and rewardsPerToken functions; // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow. uint256 balance = rewardToken.balanceOf(address(this)); require(rewardRate <= balance / DURATION, "Provided reward too high"); lastUpdateTime = block.timestamp; _periodFinish = block.timestamp + DURATION; emit RewardAdded(reward); } function claimFees() external nonReentrant returns (uint256 claimed0, uint256 claimed1) { return _claimFees(); } function _claimFees() internal returns (uint256 claimed0, uint256 claimed1) { if (!isForPair) { return (0, 0); } address _token = address(TOKEN); (claimed0, claimed1) = IPair(_token).claimFees(); if (claimed0 > 0 || claimed1 > 0) { uint256 _fees0 = claimed0; uint256 _fees1 = claimed1; (address _token0, address _token1) = IPair(_token).tokens(); if (_fees0 > 0) { IERC20(_token0).approve(internal_bribe, 0); IERC20(_token0).approve(internal_bribe, _fees0); IBribe(internal_bribe).notifyRewardAmount(_token0, _fees0); } if (_fees1 > 0) { IERC20(_token1).approve(internal_bribe, 0); IERC20(_token1).approve(internal_bribe, _fees1); IBribe(internal_bribe).notifyRewardAmount(_token1, _fees1); } emit ClaimFees(msg.sender, claimed0, claimed1); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @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 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; 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 require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IBribe { function _deposit(uint amount, uint tokenId) external; function _withdraw(uint amount, uint tokenId) external; function getRewardForOwner(uint tokenId, address[] memory tokens) external; function getRewardForAddress(address _owner, address[] memory tokens) external; function notifyRewardAmount(address token, uint amount) external; function left(address token) external view returns (uint); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; 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.13; library Constants { uint256 internal constant EPOCH_LENGTH = 3600;//7 days; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; library Math { function max(uint a, uint b) internal pure returns (uint) { return a >= b ? a : b; } function min(uint a, uint b) internal pure returns (uint) { return a < b ? a : b; } function sqrt(uint y) internal pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } function cbrt(uint256 n) internal pure returns (uint256) { unchecked { uint256 x = 0; for (uint256 y = 1 << 255; y > 0; y >>= 3) { x <<= 1; uint256 z = 3 * x * (x + 1) + 1; if (n / y >= z) { n -= y * z; x += 1; } } return x; }} }
{ "optimizer": { "enabled": true, "runs": 200 }, "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":"_rewardToken","type":"address"},{"internalType":"address","name":"_ve","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_distribution","type":"address"},{"internalType":"address","name":"_internal_bribe","type":"address"},{"internalType":"address","name":"_external_bribe","type":"address"},{"internalType":"bool","name":"_isForPair","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"claimed0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimed1","type":"uint256"}],"name":"ClaimFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"EmergencyActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"EmergencyDeactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"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":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DISTRIBUTION","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_WITHDRAWER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activateEmergencyMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimFees","outputs":[{"internalType":"uint256","name":"claimed0","type":"uint256"},{"internalType":"uint256","name":"claimed1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyWithdrawAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"external_bribe","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gaugeRewarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"internal_bribe","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isForPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_distribution","type":"address"}],"name":"setDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gaugeRewarder","type":"address"}],"name":"setGaugeRewarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_int","type":"address"}],"name":"setInternalBribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopEmergencyMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllAndHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawExcess","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102685760003560e01c80638b87634711610151578063cd3daf9d116100c3578063df136d6511610087578063df136d651461053a578063e574821314610543578063ebe2b12b1461056a578063f2fde38b14610572578063f7c618c114610585578063f97d2114146105ac57600080fd5b8063cd3daf9d146104fd578063d009601014610505578063d294f0931461050d578063db2e21bc1461052a578063de5f62681461053257600080fd5b8063b6b55f2511610115578063b6b55f2514610484578063c00007b014610497578063c6c8f6b6146104aa578063c863657d146104bd578063c8f33c91146104d0578063caa6fea4146104d957600080fd5b80638b876347146104255780638da5cb5b1461044557806391f25a9414610456578063b1534ecd14610469578063b66503cf1461047157600080fd5b806370a08231116101ea5780637f699015116101ae5780637f699015146103ad57806380faa57d146103c057806382bfefc8146103c857806382fe1891146103ef578063853828b61461040a578063863e24421461041257600080fd5b806370a082311461034d578063715018a614610376578063770f85711461037e5780637b0a47ee146103915780637c91e4eb1461039a57600080fd5b80632e1a7d4d116102315780632e1a7d4d1461030d5780633d18b912146103225780636946a2351461032a5780636e90013d146103325780636e9852f21461034557600080fd5b80628cc2621461026d57806303fbf83a146102935780630700037d146102be57806318160ddd146102de5780631be05289146102e6575b600080fd5b61028061027b366004612221565b6105bf565b6040519081526020015b60405180910390f35b6006546102a6906001600160a01b031681565b6040516001600160a01b03909116815260200161028a565b6102806102cc366004612221565b600c6020526000908152604090205481565b600d54610280565b6102807f0000000000000000000000000000000000000000000000000000000000000e1081565b61032061031b36600461223e565b61064a565b005b610320610656565b6102806107df565b610320610340366004612257565b610814565b6103206108ab565b61028061035b366004612221565b6001600160a01b03166000908152600e602052604090205490565b6103206108cc565b6005546102a6906001600160a01b031681565b61028060085481565b6003546102a6906001600160a01b031681565b6103206103bb366004612221565b6108de565b610280610999565b6102a67f000000000000000000000000171449c7902cbe5b98e1b7b29a155e0deb867cc781565b6102a6734d5bcfc14282d930ee09bee96d3a7d5f338251c681565b6103206109a7565b6004546102a6906001600160a01b031681565b610280610433366004612221565b600b6020526000908152604090205481565b6001546001600160a01b03166102a6565b610320610464366004612221565b6109c0565b6103206109ea565b61032061047f366004612257565b610a64565b61032061049236600461223e565b610ddd565b6103206104a5366004612221565b610de7565b6103206104b836600461223e565b610fb4565b6002546102a6906001600160a01b031681565b61028060095481565b6001546104ed90600160a01b900460ff1681565b604051901515815260200161028a565b610280611115565b610320611176565b6105156111ef565b6040805192835260208301919091520161028a565b610320611214565b6103206113b5565b610280600a5481565b6104ed7f000000000000000000000000000000000000000000000000000000000000000181565b600754610280565b610320610580366004612221565b611447565b6102a67f00000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf81565b6103206105ba366004612221565b6114bd565b6001600160a01b0381166000908152600b6020526040812054670de0b6b3a7640000906105ea611115565b6105f49190612299565b6001600160a01b0384166000908152600e602052604090205461061791906122b0565b61062191906122cf565b6001600160a01b0383166000908152600c602052604090205461064491906122f1565b92915050565b61065381611531565b50565b61065e611783565b33610667611115565b600a55610672610999565b6009556001600160a01b038116156106b95761068d816105bf565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b336000908152600c6020526040902054801561074a57336000818152600c6020526040812055610714907f00000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf6001600160a01b031690836117dc565b60405181815233907fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba9060200160405180910390a25b6004546001600160a01b0316156107d15760048054336000818152600e60205260409081902054905163711f31c160e11b81526001600160a01b039093169363e23e63829361079e93928392909101612309565b600060405180830381600087803b1580156107b857600080fd5b505af11580156107cc573d6000803e3d6000fd5b505050505b50506107dd6001600055565b565b60007f0000000000000000000000000000000000000000000000000000000000000e1060085461080f91906122b0565b905090565b33734d5bcfc14282d930ee09bee96d3a7d5f338251c61461083457600080fd5b816001600160a01b03167f000000000000000000000000171449c7902cbe5b98e1b7b29a155e0deb867cc76001600160a01b03161415801561087e57506001600160a01b03821615155b801561088a5750600081115b61089357600080fd5b6108a76001600160a01b03831633836117dc565b5050565b336000908152600e60205260409020546108c490611531565b6107dd610656565b6108d4611844565b6107dd600061189e565b6108e6611844565b6001600160a01b03811661092d5760405162461bcd60e51b81526020600482015260096024820152683d32b9379030b2323960b91b60448201526064015b60405180910390fd5b6003546001600160a01b03908116908216036109775760405162461bcd60e51b815260206004820152600960248201526839b0b6b29030b2323960b91b6044820152606401610924565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600061080f426007546118f0565b336000908152600e60205260409020546107dd90611531565b6109c8611844565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6109f2611844565b60018054600160a01b900460ff16151514610a1f5760405162461bcd60e51b81526004016109249061232d565b6001805460ff60a01b1916905560405142815230907fa30763a9bc0d8e121a6e721624965cae68010ece74128b4ae5b01b8dc22c00f8906020015b60405180910390a2565b610a6c611783565b600154600160a01b900460ff1615610a965760405162461bcd60e51b81526004016109249061232d565b6003546001600160a01b03163314610ac05760405162461bcd60e51b815260040161092490612350565b6000610aca611115565b600a55610ad5610999565b6009556001600160a01b03811615610b1c57610af0816105bf565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b7f00000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf6001600160a01b0316836001600160a01b031614610b8d5760405162461bcd60e51b815260206004820152600d60248201526c3737ba103932bb903a37b5b2b760991b6044820152606401610924565b600354610bc8906001600160a01b037f00000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf811691163085611908565b6007544210610c0357610bfb7f0000000000000000000000000000000000000000000000000000000000000e10836122cf565b600855610c62565b600042600754610c139190612299565b9050600060085482610c2591906122b0565b90507f0000000000000000000000000000000000000000000000000000000000000e10610c5282866122f1565b610c5c91906122cf565b60085550505b6040516370a0823160e01b81523060048201526000907f00000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf6001600160a01b0316906370a0823190602401602060405180830381865afa158015610cc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ced919061239a565b9050610d197f0000000000000000000000000000000000000000000000000000000000000e10826122cf565b6008541115610d6a5760405162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f206869676800000000000000006044820152606401610924565b426009819055610d9b907f0000000000000000000000000000000000000000000000000000000000000e10906122f1565b6007556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a150506108a76001600055565b610653813361192f565b610def611783565b6003546001600160a01b03163314610e195760405162461bcd60e51b815260040161092490612350565b80610e22611115565b600a55610e2d610999565b6009556001600160a01b03811615610e7457610e48816105bf565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b6001600160a01b0382166000908152600c60205260409020548015610f1e576001600160a01b038084166000908152600c6020526040812055610eda907f00000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf1684836117dc565b826001600160a01b03167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba82604051610f1591815260200190565b60405180910390a25b6004546001600160a01b031615610fa857600480546001600160a01b038581166000908152600e60205260409081902054905163711f31c160e11b8152919092169263e23e638292610f7592889283929101612309565b600060405180830381600087803b158015610f8f57600080fd5b505af1158015610fa3573d6000803e3d6000fd5b505050505b50506106536001600055565b610fbc611783565b600154600160a01b900460ff16610fe55760405162461bcd60e51b81526004016109249061232d565b80600d54610ff39190612299565b600d55336000908152600e6020526040902054611011908290612299565b336000908152600e60205260409020556004546001600160a01b0316156110a25760048054336000818152600e60205260409081902054905163711f31c160e11b81526001600160a01b039093169363e23e63829361107593928392909101612309565b600060405180830381600087803b15801561108f57600080fd5b505af19250505080156110a0575060015b505b6110d66001600160a01b037f000000000000000000000000171449c7902cbe5b98e1b7b29a155e0deb867cc71633836117dc565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a26106536001600055565b6000600d546000036111285750600a5490565b600d54600854600954611139610999565b6111439190612299565b61114d91906122b0565b61115f90670de0b6b3a76400006122b0565b61116991906122cf565b600a5461080f91906122f1565b61117e611844565b600154600160a01b900460ff16156111a85760405162461bcd60e51b81526004016109249061232d565b6001805460ff60a01b1916600160a01b17905560405130907f774b57c3410c76d04ea4d51b0c15a9bac99b0e70f28fd88b53d702b5427fd31890610a5a9042815260200190565b6000806111fa611783565b611202611b67565b915091506112106001600055565b9091565b61121c611783565b600154600160a01b900460ff166112455760405162461bcd60e51b81526004016109249061232d565b336000908152600e602052604090205461128f5760405162461bcd60e51b815260206004820152600b60248201526a6e6f2062616c616e63657360a81b6044820152606401610924565b336000908152600e6020526040902054600d546112ad908290612299565b600d55336000908152600e60205260408120556004546001600160a01b0316156113415760048054336000818152600e60205260409081902054905163711f31c160e11b81526001600160a01b039093169363e23e63829361131493928392909101612309565b600060405180830381600087803b15801561132e57600080fd5b505af192505050801561133f575060015b505b6113756001600160a01b037f000000000000000000000000171449c7902cbe5b98e1b7b29a155e0deb867cc71633836117dc565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2506107dd6001600055565b6040516370a0823160e01b81523360048201526107dd907f000000000000000000000000171449c7902cbe5b98e1b7b29a155e0deb867cc76001600160a01b0316906370a0823190602401602060405180830381865afa15801561141d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611441919061239a565b3361192f565b61144f611844565b6001600160a01b0381166114b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610924565b6106538161189e565b6114c5611844565b6004546001600160a01b039081169082160361150f5760405162461bcd60e51b815260206004820152600960248201526839b0b6b29030b2323960b91b6044820152606401610924565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b611539611783565b600154600160a01b900460ff16156115635760405162461bcd60e51b81526004016109249061232d565b3361156c611115565b600a55611577610999565b6009556001600160a01b038116156115be57611592816105bf565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b600082116116025760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606401610924565b336000908152600e602052604090205461164c5760405162461bcd60e51b815260206004820152600b60248201526a6e6f2062616c616e63657360a81b6044820152606401610924565b81600d5461165a9190612299565b600d55336000908152600e6020526040902054611678908390612299565b336000908152600e60205260409020556004546001600160a01b03161561170f5760048054336000818152600e60205260409081902054905163711f31c160e11b81526001600160a01b039093169363e23e6382936116dc93928392909101612309565b600060405180830381600087803b1580156116f657600080fd5b505af115801561170a573d6000803e3d6000fd5b505050505b6117436001600160a01b037f000000000000000000000000171449c7902cbe5b98e1b7b29a155e0deb867cc71633846117dc565b60405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2506106536001600055565b6002600054036117d55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610924565b6002600055565b6040516001600160a01b03831660248201526044810182905261183f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611faa565b505050565b6001546001600160a01b031633146107dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610924565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008183106118ff5781611901565b825b9392505050565b611929846323b872dd60e01b85858560405160240161180893929190612309565b50505050565b611937611783565b600154600160a01b900460ff16156119615760405162461bcd60e51b81526004016109249061232d565b8061196a611115565b600a55611975610999565b6009556001600160a01b038116156119bc57611990816105bf565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008311611a0c5760405162461bcd60e51b815260206004820152601e60248201527f6465706f736974284761756765293a2063616e6e6f74207374616b65203000006044820152606401610924565b6001600160a01b0382166000908152600e6020526040902054611a309084906122f1565b6001600160a01b0383166000908152600e6020526040902055600d54611a579084906122f1565b600d556004546001600160a01b031615611ae457600480546001600160a01b038481166000908152600e60205260409081902054905163711f31c160e11b8152919092169263e23e638292611ab192879283929101612309565b600060405180830381600087803b158015611acb57600080fd5b505af1158015611adf573d6000803e3d6000fd5b505050505b611b196001600160a01b037f000000000000000000000000171449c7902cbe5b98e1b7b29a155e0deb867cc716833086611908565b816001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c84604051611b5491815260200190565b60405180910390a2506108a76001600055565b6000807f0000000000000000000000000000000000000000000000000000000000000001611b985750600091829150565b60007f000000000000000000000000171449c7902cbe5b98e1b7b29a155e0deb867cc79050806001600160a01b031663d294f0936040518163ffffffff1660e01b815260040160408051808303816000875af1158015611bfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2091906123b3565b909350915082151580611c335750600082115b15611fa55760008390506000839050600080846001600160a01b0316639d63848a6040518163ffffffff1660e01b81526004016040805180830381865afa158015611c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca691906123d7565b90925090508315611e085760055460405163095ea7b360e01b81526001600160a01b039182166004820152600060248201529083169063095ea7b3906044016020604051808303816000875af1158015611d04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d289190612411565b5060055460405163095ea7b360e01b81526001600160a01b039182166004820152602481018690529083169063095ea7b3906044016020604051808303816000875af1158015611d7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da09190612411565b5060055460405163b66503cf60e01b81526001600160a01b038481166004830152602482018790529091169063b66503cf90604401600060405180830381600087803b158015611def57600080fd5b505af1158015611e03573d6000803e3d6000fd5b505050505b8215611f655760055460405163095ea7b360e01b81526001600160a01b039182166004820152600060248201529082169063095ea7b3906044016020604051808303816000875af1158015611e61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e859190612411565b5060055460405163095ea7b360e01b81526001600160a01b039182166004820152602481018590529082169063095ea7b3906044016020604051808303816000875af1158015611ed9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611efd9190612411565b5060055460405163b66503cf60e01b81526001600160a01b038381166004830152602482018690529091169063b66503cf90604401600060405180830381600087803b158015611f4c57600080fd5b505af1158015611f60573d6000803e3d6000fd5b505050505b604080518881526020810188905233917fbc567d6cbad26368064baa0ab5a757be46aae4d70f707f9203d9d9b6c8ccbfa3910160405180910390a2505050505b509091565b6000611fff826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661207c9092919063ffffffff16565b80519091501561183f578080602001905181019061201d9190612411565b61183f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610924565b606061208b8484600085612093565b949350505050565b6060824710156120f45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610924565b600080866001600160a01b03168587604051612110919061245f565b60006040518083038185875af1925050503d806000811461214d576040519150601f19603f3d011682016040523d82523d6000602084013e612152565b606091505b50915091506121638783838761216e565b979650505050505050565b606083156121dd5782516000036121d6576001600160a01b0385163b6121d65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610924565b508161208b565b61208b83838151156121f25781518083602001fd5b8060405162461bcd60e51b8152600401610924919061247b565b6001600160a01b038116811461065357600080fd5b60006020828403121561223357600080fd5b81356119018161220c565b60006020828403121561225057600080fd5b5035919050565b6000806040838503121561226a57600080fd5b82356122758161220c565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156122ab576122ab612283565b500390565b60008160001904831182151516156122ca576122ca612283565b500290565b6000826122ec57634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561230457612304612283565b500190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825260099082015268656d657267656e637960b81b604082015260600190565b6020808252602a908201527f43616c6c6572206973206e6f742052657761726473446973747269627574696f6040820152691b8818dbdb9d1c9858dd60b21b606082015260800190565b6000602082840312156123ac57600080fd5b5051919050565b600080604083850312156123c657600080fd5b505080516020909101519092909150565b600080604083850312156123ea57600080fd5b82516123f58161220c565b60208401519092506124068161220c565b809150509250929050565b60006020828403121561242357600080fd5b8151801515811461190157600080fd5b60005b8381101561244e578181015183820152602001612436565b838111156119295750506000910152565b60008251612471818460208701612433565b9190910192915050565b602081526000825180602084015261249a816040850160208701612433565b601f01601f1916919091016040019291505056fea26469706673582212203cfd1579ddbed6d7d9c58bd753881e00406904f0ffc580255c410562da9d184564736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.