More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,792 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add_reward_amoun... | 20319283 | 194 days ago | IN | 0 ETH | 0.00349121 | ||||
Add_reward_amoun... | 19862981 | 258 days ago | IN | 0 ETH | 0.00535942 | ||||
Claim_reward_for | 19475119 | 312 days ago | IN | 0 ETH | 0.0112569 | ||||
Claim_reward_for... | 18834401 | 402 days ago | IN | 0 ETH | 0.00645247 | ||||
Add_reward_amoun... | 18834400 | 402 days ago | IN | 0 ETH | 0.01288163 | ||||
Add_reward_amoun... | 18834399 | 402 days ago | IN | 0 ETH | 0.01433971 | ||||
Add_reward_amoun... | 18834398 | 402 days ago | IN | 0 ETH | 0.01167957 | ||||
Claim_reward_for... | 18783936 | 409 days ago | IN | 0 ETH | 0.00536155 | ||||
Add_reward_amoun... | 18783935 | 409 days ago | IN | 0 ETH | 0.01118928 | ||||
Add_reward_amoun... | 18783934 | 409 days ago | IN | 0 ETH | 0.01246115 | ||||
Add_reward_amoun... | 18783933 | 409 days ago | IN | 0 ETH | 0.01064693 | ||||
Claim_reward_for | 18741481 | 415 days ago | IN | 0 ETH | 0.00279904 | ||||
Claim_reward_for... | 18734569 | 416 days ago | IN | 0 ETH | 0.00527234 | ||||
Add_reward_amoun... | 18734568 | 416 days ago | IN | 0 ETH | 0.01062207 | ||||
Add_reward_amoun... | 18734567 | 416 days ago | IN | 0 ETH | 0.01252695 | ||||
Add_reward_amoun... | 18734566 | 416 days ago | IN | 0 ETH | 0.01008762 | ||||
Claim_reward_for... | 18702218 | 420 days ago | IN | 0 ETH | 0.00415419 | ||||
Add_reward_amoun... | 18702217 | 420 days ago | IN | 0 ETH | 0.00864986 | ||||
Add_reward_amoun... | 18702216 | 420 days ago | IN | 0 ETH | 0.0100292 | ||||
Add_reward_amoun... | 18702215 | 420 days ago | IN | 0 ETH | 0.00833764 | ||||
Claim_reward_for... | 18664072 | 426 days ago | IN | 0 ETH | 0.0042613 | ||||
Add_reward_amoun... | 18664071 | 426 days ago | IN | 0 ETH | 0.01358675 | ||||
Add_reward_amoun... | 18664070 | 426 days ago | IN | 0 ETH | 0.0138142 | ||||
Add_reward_amoun... | 18664069 | 426 days ago | IN | 0 ETH | 0.01401191 | ||||
Claim_reward_for | 18626341 | 431 days ago | IN | 0 ETH | 0.00249992 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
yBribe
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.8.6; import "EnumerableSet.sol"; interface GaugeController { struct VotedSlope { uint slope; uint power; uint end; } struct Point { uint bias; uint slope; } function vote_user_slopes(address, address) external view returns (VotedSlope memory); function last_user_vote(address, address) external view returns (uint); function points_weight(address, uint) external view returns (Point memory); function checkpoint_gauge(address) external; function time_total() external view returns (uint); function gauge_types(address) external view returns (int128); } interface erc20 { function transfer(address recipient, uint amount) external returns (bool); function decimals() external view returns (uint8); function balanceOf(address) external view returns (uint); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function approve(address spender, uint amount) external returns (bool); } contract yBribe { using EnumerableSet for EnumerableSet.AddressSet; event RewardAdded(address indexed briber, address indexed gauge, address indexed reward_token, uint amount, uint fee); event NewTokenReward(address indexed gauge, address indexed reward_token); // Specifies unique token added for first time to gauge event RewardClaimed(address indexed user, address indexed gauge, address indexed reward_token, uint amount); event Blacklisted(address indexed user); event RemovedFromBlacklist(address indexed user); event SetRewardRecipient(address indexed user, address recipient); event ClearRewardRecipient(address indexed user, address recipient); event ChangeOwner(address owner); event PeriodUpdated(address indexed gauge, uint indexed period, uint bias, uint blacklisted_bias); event FeeUpdated(uint fee); uint constant WEEK = 86400 * 7; uint constant PRECISION = 10**18; uint constant BPS = 10_000; GaugeController constant GAUGE = GaugeController(0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB); mapping(address => mapping(address => uint)) public claims_per_gauge; mapping(address => mapping(address => uint)) public reward_per_gauge; mapping(address => mapping(address => uint)) public reward_per_token; mapping(address => mapping(address => uint)) public active_period; mapping(address => mapping(address => mapping(address => uint))) public last_user_claim; mapping(address => uint) public next_claim_time; mapping(address => address[]) public _rewards_per_gauge; mapping(address => address[]) public _gauges_per_reward; mapping(address => mapping(address => bool)) public _rewards_in_gauge; address public owner = 0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52; address public fee_recipient = 0x93A62dA5a14C80f265DAbC077fCEE437B1a0Efde; address public pending_owner; uint public fee_percent = 100; // Expressed in BPS mapping(address => address) public reward_recipient; EnumerableSet.AddressSet private blacklist; function _add(address gauge, address reward) internal { if (!_rewards_in_gauge[gauge][reward]) { _rewards_per_gauge[gauge].push(reward); _gauges_per_reward[reward].push(gauge); _rewards_in_gauge[gauge][reward] = true; emit NewTokenReward(gauge, reward); } } function rewards_per_gauge(address gauge) external view returns (address[] memory) { return _rewards_per_gauge[gauge]; } function gauges_per_reward(address reward) external view returns (address[] memory) { return _gauges_per_reward[reward]; } /// @dev Required to sync each gauge/token pair to new week. /// @dev Can be triggered either by claiming or adding bribes to gauge/token pair. function _update_period(address gauge, address reward_token) internal returns (uint) { uint _period = active_period[gauge][reward_token]; if (block.timestamp >= _period + WEEK) { _period = current_period(); GAUGE.checkpoint_gauge(gauge); uint _bias = GAUGE.points_weight(gauge, _period).bias; uint blacklisted_bias = get_blacklisted_bias(gauge); _bias -= blacklisted_bias; emit PeriodUpdated(gauge, _period, _bias, blacklisted_bias); uint _amount = reward_per_gauge[gauge][reward_token] - claims_per_gauge[gauge][reward_token]; if (_bias > 0){ reward_per_token[gauge][reward_token] = _amount * PRECISION / _bias; } active_period[gauge][reward_token] = _period; } return _period; } function add_reward_amount(address gauge, address reward_token, uint amount) external returns (bool) { require(GAUGE.gauge_types(gauge) >= 0); // @dev: reverts on invalid gauge _safeTransferFrom(reward_token, msg.sender, address(this), amount); uint fee_take = fee_percent * amount / BPS; uint reward_amount = amount - fee_take; if (fee_take > 0){ _safeTransfer(reward_token, fee_recipient, fee_take); } _update_period(gauge, reward_token); reward_per_gauge[gauge][reward_token] += reward_amount; _add(gauge, reward_token); emit RewardAdded(msg.sender, gauge, reward_token, reward_amount, fee_take); return true; } /// @notice Estimate pending bribe amount for any user /// @dev This function returns zero if active_period has not yet been updated. /// @dev Should not rely on this function for any user case where precision is required. function claimable(address user, address gauge, address reward_token) external view returns (uint) { uint _period = current_period(); if(blacklist.contains(user) || next_claim_time[user] > _period) { return 0; } if (last_user_claim[user][gauge][reward_token] >= _period) { return 0; } uint last_user_vote = GAUGE.last_user_vote(user, gauge); if (last_user_vote >= _period) { return 0; } if (_period != active_period[gauge][reward_token]) { return 0; } GaugeController.VotedSlope memory vs = GAUGE.vote_user_slopes(user, gauge); uint _user_bias = _calc_bias(vs.slope, vs.end); return _user_bias * reward_per_token[gauge][reward_token] / PRECISION; } function claim_reward(address gauge, address reward_token) external returns (uint) { return _claim_reward(msg.sender, gauge, reward_token); } function claim_reward_for_many(address[] calldata _users, address[] calldata _gauges, address[] calldata _reward_tokens) external returns (uint[] memory amounts) { require(_users.length == _gauges.length && _users.length == _reward_tokens.length, "!lengths"); uint length = _users.length; amounts = new uint[](length); for (uint i = 0; i < length; i++) { amounts[i] = _claim_reward(_users[i], _gauges[i], _reward_tokens[i]); } return amounts; } function claim_reward_for(address user, address gauge, address reward_token) external returns (uint) { return _claim_reward(user, gauge, reward_token); } function _claim_reward(address user, address gauge, address reward_token) internal returns (uint) { if(blacklist.contains(user) || next_claim_time[user] > current_period()){ return 0; } uint _period = _update_period(gauge, reward_token); uint _amount = 0; if (last_user_claim[user][gauge][reward_token] < _period) { last_user_claim[user][gauge][reward_token] = _period; if (GAUGE.last_user_vote(user, gauge) < _period) { GaugeController.VotedSlope memory vs = GAUGE.vote_user_slopes(user, gauge); uint _user_bias = _calc_bias(vs.slope, vs.end); _amount = _user_bias * reward_per_token[gauge][reward_token] / PRECISION; if (_amount > 0) { claims_per_gauge[gauge][reward_token] += _amount; address recipient = reward_recipient[user]; recipient = recipient == address(0) ? user : recipient; _safeTransfer(reward_token, recipient, _amount); emit RewardClaimed(user, gauge, user, _amount); } } } return _amount; } /// @dev Compute bias from slope and lock end /// @param _slope User's slope /// @param _end Timestamp of user's lock end function _calc_bias(uint _slope, uint _end) internal view returns (uint) { uint current = current_period(); if (current + WEEK >= _end) return 0; return _slope * (_end - current); } /// @dev Sum all blacklisted bias for any gauge in current period. function get_blacklisted_bias(address gauge) public view returns (uint) { uint bias; uint length = blacklist.length(); for (uint i = 0; i < length; i++) { address user = blacklist.at(i); GaugeController.VotedSlope memory vs = GAUGE.vote_user_slopes(user, gauge); bias += _calc_bias(vs.slope, vs.end); } return bias; } /// @notice Allow owner to add address to blacklist, preventing them from claiming /// @dev Any vote weight address added function add_to_blacklist(address _user) external { require(msg.sender == owner, "!owner"); if(blacklist.add(_user)) emit Blacklisted(_user); } /// @notice Allow owner to remove address from blacklist /// @dev We set a next_claim_time to prevent access to current period's bribes function remove_from_blacklist(address _user) external { require(msg.sender == owner, "!owner"); if(blacklist.remove(_user)){ next_claim_time[_user] = current_period() + WEEK; emit RemovedFromBlacklist(_user); } } /// @notice Check if address is blacklisted function is_blacklisted(address address_to_check) public view returns (bool) { return blacklist.contains(address_to_check); } /// @dev Helper function, if possible, avoid using on-chain as list can grow unbounded function get_blacklist() public view returns (address[] memory _blacklist) { _blacklist = new address[](blacklist.length()); for (uint i; i < blacklist.length(); i++) { _blacklist[i] = blacklist.at(i); } } /// @dev Helper function to determine current period globally. Not specific to any gauges or internal state. function current_period() public view returns (uint) { return block.timestamp / WEEK * WEEK; } /// @notice Allow any user to route claimed rewards to a specified recipient address function set_recipient(address _recipient) external { require (_recipient != msg.sender, "self"); require (_recipient != address(0), "0x0"); address current_recipient = reward_recipient[msg.sender]; require (_recipient != current_recipient, "Already set"); // Update delegation mapping reward_recipient[msg.sender] = _recipient; if (current_recipient != address(0)) { emit ClearRewardRecipient(msg.sender, current_recipient); } emit SetRewardRecipient(msg.sender, _recipient); } /// @notice Allow any user to clear any previously specified reward recipient function clear_recipient() external { address current_recipient = reward_recipient[msg.sender]; require (current_recipient != address(0), "No recipient set"); // update delegation mapping reward_recipient[msg.sender]= address(0); emit ClearRewardRecipient(msg.sender, current_recipient); } /// @notice Allow owner to set fees of up to 4% of bribes upon deposit function set_fee_percent(uint _percent) external { require(msg.sender == owner, "!owner"); require(_percent <= 400); fee_percent = _percent; } function set_fee_recipient(address _recipient) external { require(msg.sender == owner, "!owner"); fee_recipient = _recipient; } function set_owner(address _new_owner) external { require(msg.sender == owner, "!owner"); pending_owner = _new_owner; } function accept_owner() external { address _pending_owner = pending_owner; require(msg.sender == _pending_owner, "!pending_owner"); owner = _pending_owner; emit ChangeOwner(_pending_owner); pending_owner = address(0); } function _safeTransfer( address token, address to, uint value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(erc20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool)))); } function _safeTransferFrom( address token, address from, address to, uint value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(erc20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool)))); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "yBribe.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"ChangeOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"ClearRewardRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"FeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":true,"internalType":"address","name":"reward_token","type":"address"}],"name":"NewTokenReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":true,"internalType":"uint256","name":"period","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bias","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"blacklisted_bias","type":"uint256"}],"name":"PeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"RemovedFromBlacklist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"briber","type":"address"},{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":true,"internalType":"address","name":"reward_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":true,"internalType":"address","name":"reward_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"SetRewardRecipient","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_gauges_per_reward","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"_rewards_in_gauge","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_rewards_per_gauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accept_owner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"active_period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gauge","type":"address"},{"internalType":"address","name":"reward_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"add_reward_amount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"add_to_blacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"gauge","type":"address"},{"internalType":"address","name":"reward_token","type":"address"}],"name":"claim_reward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"gauge","type":"address"},{"internalType":"address","name":"reward_token","type":"address"}],"name":"claim_reward_for","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"address[]","name":"_gauges","type":"address[]"},{"internalType":"address[]","name":"_reward_tokens","type":"address[]"}],"name":"claim_reward_for_many","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"gauge","type":"address"},{"internalType":"address","name":"reward_token","type":"address"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"claims_per_gauge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clear_recipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"current_period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee_percent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee_recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"reward","type":"address"}],"name":"gauges_per_reward","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get_blacklist","outputs":[{"internalType":"address[]","name":"_blacklist","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gauge","type":"address"}],"name":"get_blacklisted_bias","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_to_check","type":"address"}],"name":"is_blacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"last_user_claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"next_claim_time","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pending_owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"remove_from_blacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"reward_per_gauge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"reward_per_token","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reward_recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gauge","type":"address"}],"name":"rewards_per_gauge","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"set_fee_percent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"set_fee_recipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_new_owner","type":"address"}],"name":"set_owner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"set_recipient","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600980546001600160a01b031990811673feb4acf3df3cdea7399794d0869ef76a6efaff5217909155600a80549091167393a62da5a14c80f265dabc077fcee437b1a0efde1790556064600c5534801561005d57600080fd5b5061222b8061006d6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c8063a70a61c21161011a578063c0ca1fca116100ad578063ed2b5dc81161007c578063ed2b5dc8146104bc578063ee2f892e146104ea578063f21a1d11146104f2578063f703789c14610505578063ff40e7731461052d57600080fd5b8063c0ca1fca14610452578063ca3f7e1e14610465578063df40696714610478578063e9773ad01461048b57600080fd5b8063b2c1e1de116100e9578063b2c1e1de14610404578063b46d4f2e1461040c578063bdd481471461042c578063bfcc3d1c1461043f57600080fd5b8063a70a61c2146103ab578063a770a359146103d6578063a7a914b5146103de578063b0b34c23146103f157600080fd5b80636885f4ee11610192578063758f969a11610161578063758f969a1461035f5780637cb97b2b146103725780637f4ec4c3146103855780638da5cb5b1461039857600080fd5b80636885f4ee146102cd5780636938ae40146102e057806372b1f4e31461030b578063750d49261461034c57600080fd5b8063431dc4b6116101ce578063431dc4b6146102965780634ff2cc441461029e5780635dff2e13146102a75780635fa135d9146102ba57600080fd5b80631794e95a146102005780632de24ac71461022857806330cc317b1461026157806332be679114610276575b600080fd5b61021361020e366004611d63565b61054d565b60405190151581526020015b60405180910390f35b610253610236366004611d7e565b600360209081526000928352604080842090915290825290205481565b60405190815260200161021f565b61027461026f366004611d63565b610560565b005b610289610284366004611d63565b6105b5565b60405161021f919061206d565b61025361062b565b610253600c5481565b6102896102b5366004611d63565b61064a565b6102536102c8366004611db1565b6106be565b6102536102db366004611d63565b610929565b6102536102ee366004611d7e565b600160209081526000928352604080842090915290825290205481565b610334610319366004611d63565b600d602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161021f565b61025361035a366004611d7e565b610a29565b600a54610334906001600160a01b031681565b610274610380366004611d63565b610a36565b600b54610334906001600160a01b031681565b600954610334906001600160a01b031681565b6102536103b9366004611d7e565b600260209081526000928352604080842090915290825290205481565b610274610a82565b6102536103ec366004611db1565b610b38565b6102746103ff366004611d63565b610b4d565b610274610bbf565b61041f61041a366004611e5a565b610c6f565b60405161021f91906120ba565b61033461043a366004611e30565b610dbf565b61027461044d366004611d63565b610df7565b610334610460366004611e30565b610e8e565b610274610473366004612000565b610eaa565b610213610486366004611df4565b610ee8565b610253610499366004611db1565b600460209081526000938452604080852082529284528284209052825290205481565b6102136104ca366004611d7e565b600860209081526000928352604080842090915290825290205460ff1681565b610289611086565b610274610500366004611d63565b611135565b610253610513366004611d7e565b600060208181529281526040808220909352908152205481565b61025361053b366004611d63565b60056020526000908152604090205481565b600061055a600e836112c3565b92915050565b6009546001600160a01b031633146105935760405162461bcd60e51b815260040161058a906120f2565b60405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526007602090815260409182902080548351818402810184019094528084526060939283018282801561061f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610601575b50505050509050919050565b600062093a8061063b814261212a565b610645919061214c565b905090565b6001600160a01b03811660009081526006602090815260409182902080548351818402810184019094528084526060939283018282801561061f576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116106015750505050509050919050565b6000806106c961062b565b90506106d6600e866112c3565b806106f857506001600160a01b03851660009081526005602052604090205481105b15610707576000915050610922565b6001600160a01b03808616600090815260046020908152604080832088851684528252808320938716835292905220548111610747576000915050610922565b6040516303f20c7d60e51b81526001600160a01b03808716600483015285166024820152600090732f50d538606fa9edd2b11e2446beb18c9d5846bb90637e418fa09060440160206040518083038186803b1580156107a557600080fd5b505afa1580156107b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107dd9190612019565b90508181106107f157600092505050610922565b6001600160a01b03808616600090815260036020908152604080832093881683529290522054821461082857600092505050610922565b6040516301e8cff360e31b81526001600160a01b03808816600483015286166024820152600090732f50d538606fa9edd2b11e2446beb18c9d5846bb90630f467f989060440160606040518083038186803b15801561088657600080fd5b505afa15801561089a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108be9190611f96565b905060006108d4826000015183604001516112e5565b6001600160a01b038089166000908152600260209081526040808320938b1683529290522054909150670de0b6b3a764000090610911908361214c565b61091b919061212a565b9450505050505b9392505050565b6000806000610938600e611323565b905060005b81811015610a20576000610952600e8361132d565b6040516301e8cff360e31b81526001600160a01b03808316600483015288166024820152909150600090732f50d538606fa9edd2b11e2446beb18c9d5846bb90630f467f989060440160606040518083038186803b1580156109b357600080fd5b505afa1580156109c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb9190611f96565b90506109ff816000015182604001516112e5565b610a099086612112565b945050508080610a1890612182565b91505061093d565b50909392505050565b6000610922338484611339565b6009546001600160a01b03163314610a605760405162461bcd60e51b815260040161058a906120f2565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600d60205260409020546001600160a01b031680610adb5760405162461bcd60e51b815260206004820152601060248201526f139bc81c9958da5c1a595b9d081cd95d60821b604482015260640161058a565b336000818152600d602090815260409182902080546001600160a01b031916905590516001600160a01b03841681527f058f076b8b7f4d71ee98cf4a857fed97696b4cdf8f46838077710800628321e5910160405180910390a250565b6000610b45848484611339565b949350505050565b6009546001600160a01b03163314610b775760405162461bcd60e51b815260040161058a906120f2565b610b82600e8261165f565b15610bbc576040516001600160a01b038216907fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b85590600090a25b50565b600b546001600160a01b0316338114610c0b5760405162461bcd60e51b815260206004820152600e60248201526d10b832b73234b733afb7bbb732b960911b604482015260640161058a565b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff285329298fd841af46eb83bbe90d1ebe2951c975a65b19a02f965f842ee69c59060200160405180910390a150600b80546001600160a01b0319169055565b60608584148015610c7f57508582145b610cb65760405162461bcd60e51b8152602060048201526008602482015267216c656e6774687360c01b604482015260640161058a565b858067ffffffffffffffff811115610cd057610cd06121df565b604051908082528060200260200182016040528015610cf9578160200160208202803683370190505b50915060005b81811015610db357610d84898983818110610d1c57610d1c6121c9565b9050602002016020810190610d319190611d63565b888884818110610d4357610d436121c9565b9050602002016020810190610d589190611d63565b878785818110610d6a57610d6a6121c9565b9050602002016020810190610d7f9190611d63565b611339565b838281518110610d9657610d966121c9565b602090810291909101015280610dab81612182565b915050610cff565b50509695505050505050565b60076020528160005260406000208181548110610ddb57600080fd5b6000918252602090912001546001600160a01b03169150829050565b6009546001600160a01b03163314610e215760405162461bcd60e51b815260040161058a906120f2565b610e2c600e82611674565b15610bbc5762093a80610e3d61062b565b610e479190612112565b6001600160a01b03821660008181526005602052604080822093909355915190917f2b6bf71b58b3583add364b3d9060ebf8019650f65f5be35f5464b9cb3e4ba2d491a250565b60066020528160005260406000208181548110610ddb57600080fd5b6009546001600160a01b03163314610ed45760405162461bcd60e51b815260040161058a906120f2565b610190811115610ee357600080fd5b600c55565b604051633f9095b760e01b81526001600160a01b03841660048201526000908190732f50d538606fa9edd2b11e2446beb18c9d5846bb90633f9095b79060240160206040518083038186803b158015610f4057600080fd5b505afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190611f16565b600f0b1215610f8657600080fd5b610f9283333085611689565b600061271083600c54610fa5919061214c565b610faf919061212a565b90506000610fbd828561216b565b90508115610fdd57600a54610fdd9086906001600160a01b03168461176a565b610fe78686611842565b506001600160a01b0380871660009081526001602090815260408083209389168352929052908120805483929061101f908490612112565b9091555061102f90508686611ab5565b60408051828152602081018490526001600160a01b03808816929089169133917fbfdc09d345164585641da75a2ba1b1adc60bf86cdf108cc974ec9f4776d7f787910160405180910390a450600195945050505050565b6060611092600e611323565b67ffffffffffffffff8111156110aa576110aa6121df565b6040519080825280602002602001820160405280156110d3578160200160208202803683370190505b50905060005b6110e3600e611323565b811015611131576110f5600e8261132d565b828281518110611107576111076121c9565b6001600160a01b03909216602092830291909101909101528061112981612182565b9150506110d9565b5090565b6001600160a01b0381163314156111775760405162461bcd60e51b815260040161058a9060208082526004908201526339b2b63360e11b604082015260600190565b6001600160a01b0381166111b35760405162461bcd60e51b815260206004820152600360248201526203078360ec1b604482015260640161058a565b336000908152600d60205260409020546001600160a01b0390811690821681141561120e5760405162461bcd60e51b815260206004820152600b60248201526a105b1c9958591e481cd95d60aa1b604482015260640161058a565b336000908152600d6020526040902080546001600160a01b0319166001600160a01b0384811691909117909155811615611281576040516001600160a01b038216815233907f058f076b8b7f4d71ee98cf4a857fed97696b4cdf8f46838077710800628321e59060200160405180910390a25b6040516001600160a01b038316815233907fc6b66e0e282673c442421e1c6b89458b7631f26f5dcd0b2b216c45831ca1d7d59060200160405180910390a25050565b6001600160a01b03811660009081526001830160205260408120541515610922565b6000806112f061062b565b90508261130062093a8083612112565b1061130f57600091505061055a565b611319818461216b565b610b45908561214c565b600061055a825490565b60006109228383611b8f565b6000611346600e856112c3565b8061136f575061135461062b565b6001600160a01b038516600090815260056020526040902054115b1561137c57506000610922565b60006113888484611842565b6001600160a01b0380871660009081526004602090815260408083208985168452825280832093881683529290529081205491925090821115611656576001600160a01b0386811660008181526004602081815260408084208b8716808652908352818520968b168552959091529182902086905590516303f20c7d60e51b81529081019190915260248101919091528290732f50d538606fa9edd2b11e2446beb18c9d5846bb90637e418fa09060440160206040518083038186803b15801561145157600080fd5b505afa158015611465573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114899190612019565b1015611656576040516301e8cff360e31b81526001600160a01b03808816600483015286166024820152600090732f50d538606fa9edd2b11e2446beb18c9d5846bb90630f467f989060440160606040518083038186803b1580156114ed57600080fd5b505afa158015611501573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115259190611f96565b9050600061153b826000015183604001516112e5565b6001600160a01b038089166000908152600260209081526040808320938b1683529290522054909150670de0b6b3a764000090611578908361214c565b611582919061212a565b92508215611653576001600160a01b03808816600090815260208181526040808320938a16835292905290812080548592906115bf908490612112565b90915550506001600160a01b038089166000908152600d60205260409020541680156115eb57806115ed565b885b90506115fa87828661176a565b886001600160a01b0316886001600160a01b03168a6001600160a01b03167f2422cac5e23c46c890fdcf42d0c64757409df6832174df639337558f09d99c688760405161164991815260200190565b60405180910390a4505b50505b95945050505050565b6000610922836001600160a01b038416611bb9565b6000610922836001600160a01b038416611c08565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916116ed9190612032565b6000604051808303816000865af19150503d806000811461172a576040519150601f19603f3d011682016040523d82523d6000602084013e61172f565b606091505b50915091508180156117595750805115806117595750808060200190518101906117599190611ef4565b61176257600080fd5b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916117c69190612032565b6000604051808303816000865af19150503d8060008114611803576040519150601f19603f3d011682016040523d82523d6000602084013e611808565b606091505b50915091508180156118325750805115806118325750808060200190518101906118329190611ef4565b61183b57600080fd5b5050505050565b6001600160a01b03808316600090815260036020908152604080832093851683529290529081205461187762093a8082612112565b42106109225761188561062b565b60405163615e523760e01b81526001600160a01b0386166004820152909150732f50d538606fa9edd2b11e2446beb18c9d5846bb9063615e523790602401600060405180830381600087803b1580156118dd57600080fd5b505af11580156118f1573d6000803e3d6000fd5b505060405163edba527360e01b81526001600160a01b03871660048201526024810184905260009250732f50d538606fa9edd2b11e2446beb18c9d5846bb915063edba527390604401604080518083038186803b15801561195157600080fd5b505afa158015611965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119899190611f39565b519050600061199786610929565b90506119a3818361216b565b915082866001600160a01b03167fbd8342205f3471f235c1fc5537dec6e898313fe7c31c1ab75ecaa09feb7580b384846040516119ea929190918252602082015260400190565b60405180910390a36001600160a01b03808716600081815260208181526040808320948a16808452948252808320549383526001825280832094835293905291822054611a37919061216b565b90508215611a835782611a52670de0b6b3a76400008361214c565b611a5c919061212a565b6001600160a01b038089166000908152600260209081526040808320938b16835292905220555b5050506001600160a01b0380851660009081526003602090815260408083209387168352929052208190559392505050565b6001600160a01b0380831660009081526008602090815260408083209385168352929052205460ff16611b8b576001600160a01b0380831660008181526006602090815260408083208054600181810183559185528385200180549688166001600160a01b031997881681179091558085526007845282852080548084018255908652848620018054909716861790965584845260088352818420868552909252808320805460ff1916909217909155517fc3da16a0185e98874c12feef929e38c56e0abe7e4d6b62fca1c9b9ad2edd9f699190a35b5050565b6000826000018281548110611ba657611ba66121c9565b9060005260206000200154905092915050565b6000818152600183016020526040812054611c005750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561055a565b50600061055a565b60008181526001830160205260408120548015611cf1576000611c2c60018361216b565b8554909150600090611c409060019061216b565b9050818114611ca5576000866000018281548110611c6057611c606121c9565b9060005260206000200154905080876000018481548110611c8357611c836121c9565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611cb657611cb66121b3565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061055a565b600091505061055a565b80356001600160a01b0381168114611d1257600080fd5b919050565b60008083601f840112611d2957600080fd5b50813567ffffffffffffffff811115611d4157600080fd5b6020830191508360208260051b8501011115611d5c57600080fd5b9250929050565b600060208284031215611d7557600080fd5b61092282611cfb565b60008060408385031215611d9157600080fd5b611d9a83611cfb565b9150611da860208401611cfb565b90509250929050565b600080600060608486031215611dc657600080fd5b611dcf84611cfb565b9250611ddd60208501611cfb565b9150611deb60408501611cfb565b90509250925092565b600080600060608486031215611e0957600080fd5b611e1284611cfb565b9250611e2060208501611cfb565b9150604084013590509250925092565b60008060408385031215611e4357600080fd5b611e4c83611cfb565b946020939093013593505050565b60008060008060008060608789031215611e7357600080fd5b863567ffffffffffffffff80821115611e8b57600080fd5b611e978a838b01611d17565b90985096506020890135915080821115611eb057600080fd5b611ebc8a838b01611d17565b90965094506040890135915080821115611ed557600080fd5b50611ee289828a01611d17565b979a9699509497509295939492505050565b600060208284031215611f0657600080fd5b8151801515811461092257600080fd5b600060208284031215611f2857600080fd5b815180600f0b811461092257600080fd5b600060408284031215611f4b57600080fd5b6040516040810181811067ffffffffffffffff82111715611f7c57634e487b7160e01b600052604160045260246000fd5b604052825181526020928301519281019290925250919050565b600060608284031215611fa857600080fd5b6040516060810181811067ffffffffffffffff82111715611fd957634e487b7160e01b600052604160045260246000fd5b80604052508251815260208301516020820152604083015160408201528091505092915050565b60006020828403121561201257600080fd5b5035919050565b60006020828403121561202b57600080fd5b5051919050565b6000825160005b818110156120535760208186018101518583015201612039565b81811115612062576000828501525b509190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156120ae5783516001600160a01b031683529284019291840191600101612089565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156120ae578351835292840192918401916001016120d6565b60208082526006908201526510b7bbb732b960d11b604082015260600190565b600082198211156121255761212561219d565b500190565b60008261214757634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156121665761216661219d565b500290565b60008282101561217d5761217d61219d565b500390565b60006000198214156121965761219661219d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220e3028176a5da906dae88277e63afce14ca3f186099f5b06d99745b17e4505c8964736f6c63430008060033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c8063a70a61c21161011a578063c0ca1fca116100ad578063ed2b5dc81161007c578063ed2b5dc8146104bc578063ee2f892e146104ea578063f21a1d11146104f2578063f703789c14610505578063ff40e7731461052d57600080fd5b8063c0ca1fca14610452578063ca3f7e1e14610465578063df40696714610478578063e9773ad01461048b57600080fd5b8063b2c1e1de116100e9578063b2c1e1de14610404578063b46d4f2e1461040c578063bdd481471461042c578063bfcc3d1c1461043f57600080fd5b8063a70a61c2146103ab578063a770a359146103d6578063a7a914b5146103de578063b0b34c23146103f157600080fd5b80636885f4ee11610192578063758f969a11610161578063758f969a1461035f5780637cb97b2b146103725780637f4ec4c3146103855780638da5cb5b1461039857600080fd5b80636885f4ee146102cd5780636938ae40146102e057806372b1f4e31461030b578063750d49261461034c57600080fd5b8063431dc4b6116101ce578063431dc4b6146102965780634ff2cc441461029e5780635dff2e13146102a75780635fa135d9146102ba57600080fd5b80631794e95a146102005780632de24ac71461022857806330cc317b1461026157806332be679114610276575b600080fd5b61021361020e366004611d63565b61054d565b60405190151581526020015b60405180910390f35b610253610236366004611d7e565b600360209081526000928352604080842090915290825290205481565b60405190815260200161021f565b61027461026f366004611d63565b610560565b005b610289610284366004611d63565b6105b5565b60405161021f919061206d565b61025361062b565b610253600c5481565b6102896102b5366004611d63565b61064a565b6102536102c8366004611db1565b6106be565b6102536102db366004611d63565b610929565b6102536102ee366004611d7e565b600160209081526000928352604080842090915290825290205481565b610334610319366004611d63565b600d602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161021f565b61025361035a366004611d7e565b610a29565b600a54610334906001600160a01b031681565b610274610380366004611d63565b610a36565b600b54610334906001600160a01b031681565b600954610334906001600160a01b031681565b6102536103b9366004611d7e565b600260209081526000928352604080842090915290825290205481565b610274610a82565b6102536103ec366004611db1565b610b38565b6102746103ff366004611d63565b610b4d565b610274610bbf565b61041f61041a366004611e5a565b610c6f565b60405161021f91906120ba565b61033461043a366004611e30565b610dbf565b61027461044d366004611d63565b610df7565b610334610460366004611e30565b610e8e565b610274610473366004612000565b610eaa565b610213610486366004611df4565b610ee8565b610253610499366004611db1565b600460209081526000938452604080852082529284528284209052825290205481565b6102136104ca366004611d7e565b600860209081526000928352604080842090915290825290205460ff1681565b610289611086565b610274610500366004611d63565b611135565b610253610513366004611d7e565b600060208181529281526040808220909352908152205481565b61025361053b366004611d63565b60056020526000908152604090205481565b600061055a600e836112c3565b92915050565b6009546001600160a01b031633146105935760405162461bcd60e51b815260040161058a906120f2565b60405180910390fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526007602090815260409182902080548351818402810184019094528084526060939283018282801561061f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610601575b50505050509050919050565b600062093a8061063b814261212a565b610645919061214c565b905090565b6001600160a01b03811660009081526006602090815260409182902080548351818402810184019094528084526060939283018282801561061f576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116106015750505050509050919050565b6000806106c961062b565b90506106d6600e866112c3565b806106f857506001600160a01b03851660009081526005602052604090205481105b15610707576000915050610922565b6001600160a01b03808616600090815260046020908152604080832088851684528252808320938716835292905220548111610747576000915050610922565b6040516303f20c7d60e51b81526001600160a01b03808716600483015285166024820152600090732f50d538606fa9edd2b11e2446beb18c9d5846bb90637e418fa09060440160206040518083038186803b1580156107a557600080fd5b505afa1580156107b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107dd9190612019565b90508181106107f157600092505050610922565b6001600160a01b03808616600090815260036020908152604080832093881683529290522054821461082857600092505050610922565b6040516301e8cff360e31b81526001600160a01b03808816600483015286166024820152600090732f50d538606fa9edd2b11e2446beb18c9d5846bb90630f467f989060440160606040518083038186803b15801561088657600080fd5b505afa15801561089a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108be9190611f96565b905060006108d4826000015183604001516112e5565b6001600160a01b038089166000908152600260209081526040808320938b1683529290522054909150670de0b6b3a764000090610911908361214c565b61091b919061212a565b9450505050505b9392505050565b6000806000610938600e611323565b905060005b81811015610a20576000610952600e8361132d565b6040516301e8cff360e31b81526001600160a01b03808316600483015288166024820152909150600090732f50d538606fa9edd2b11e2446beb18c9d5846bb90630f467f989060440160606040518083038186803b1580156109b357600080fd5b505afa1580156109c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb9190611f96565b90506109ff816000015182604001516112e5565b610a099086612112565b945050508080610a1890612182565b91505061093d565b50909392505050565b6000610922338484611339565b6009546001600160a01b03163314610a605760405162461bcd60e51b815260040161058a906120f2565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600d60205260409020546001600160a01b031680610adb5760405162461bcd60e51b815260206004820152601060248201526f139bc81c9958da5c1a595b9d081cd95d60821b604482015260640161058a565b336000818152600d602090815260409182902080546001600160a01b031916905590516001600160a01b03841681527f058f076b8b7f4d71ee98cf4a857fed97696b4cdf8f46838077710800628321e5910160405180910390a250565b6000610b45848484611339565b949350505050565b6009546001600160a01b03163314610b775760405162461bcd60e51b815260040161058a906120f2565b610b82600e8261165f565b15610bbc576040516001600160a01b038216907fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b85590600090a25b50565b600b546001600160a01b0316338114610c0b5760405162461bcd60e51b815260206004820152600e60248201526d10b832b73234b733afb7bbb732b960911b604482015260640161058a565b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff285329298fd841af46eb83bbe90d1ebe2951c975a65b19a02f965f842ee69c59060200160405180910390a150600b80546001600160a01b0319169055565b60608584148015610c7f57508582145b610cb65760405162461bcd60e51b8152602060048201526008602482015267216c656e6774687360c01b604482015260640161058a565b858067ffffffffffffffff811115610cd057610cd06121df565b604051908082528060200260200182016040528015610cf9578160200160208202803683370190505b50915060005b81811015610db357610d84898983818110610d1c57610d1c6121c9565b9050602002016020810190610d319190611d63565b888884818110610d4357610d436121c9565b9050602002016020810190610d589190611d63565b878785818110610d6a57610d6a6121c9565b9050602002016020810190610d7f9190611d63565b611339565b838281518110610d9657610d966121c9565b602090810291909101015280610dab81612182565b915050610cff565b50509695505050505050565b60076020528160005260406000208181548110610ddb57600080fd5b6000918252602090912001546001600160a01b03169150829050565b6009546001600160a01b03163314610e215760405162461bcd60e51b815260040161058a906120f2565b610e2c600e82611674565b15610bbc5762093a80610e3d61062b565b610e479190612112565b6001600160a01b03821660008181526005602052604080822093909355915190917f2b6bf71b58b3583add364b3d9060ebf8019650f65f5be35f5464b9cb3e4ba2d491a250565b60066020528160005260406000208181548110610ddb57600080fd5b6009546001600160a01b03163314610ed45760405162461bcd60e51b815260040161058a906120f2565b610190811115610ee357600080fd5b600c55565b604051633f9095b760e01b81526001600160a01b03841660048201526000908190732f50d538606fa9edd2b11e2446beb18c9d5846bb90633f9095b79060240160206040518083038186803b158015610f4057600080fd5b505afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190611f16565b600f0b1215610f8657600080fd5b610f9283333085611689565b600061271083600c54610fa5919061214c565b610faf919061212a565b90506000610fbd828561216b565b90508115610fdd57600a54610fdd9086906001600160a01b03168461176a565b610fe78686611842565b506001600160a01b0380871660009081526001602090815260408083209389168352929052908120805483929061101f908490612112565b9091555061102f90508686611ab5565b60408051828152602081018490526001600160a01b03808816929089169133917fbfdc09d345164585641da75a2ba1b1adc60bf86cdf108cc974ec9f4776d7f787910160405180910390a450600195945050505050565b6060611092600e611323565b67ffffffffffffffff8111156110aa576110aa6121df565b6040519080825280602002602001820160405280156110d3578160200160208202803683370190505b50905060005b6110e3600e611323565b811015611131576110f5600e8261132d565b828281518110611107576111076121c9565b6001600160a01b03909216602092830291909101909101528061112981612182565b9150506110d9565b5090565b6001600160a01b0381163314156111775760405162461bcd60e51b815260040161058a9060208082526004908201526339b2b63360e11b604082015260600190565b6001600160a01b0381166111b35760405162461bcd60e51b815260206004820152600360248201526203078360ec1b604482015260640161058a565b336000908152600d60205260409020546001600160a01b0390811690821681141561120e5760405162461bcd60e51b815260206004820152600b60248201526a105b1c9958591e481cd95d60aa1b604482015260640161058a565b336000908152600d6020526040902080546001600160a01b0319166001600160a01b0384811691909117909155811615611281576040516001600160a01b038216815233907f058f076b8b7f4d71ee98cf4a857fed97696b4cdf8f46838077710800628321e59060200160405180910390a25b6040516001600160a01b038316815233907fc6b66e0e282673c442421e1c6b89458b7631f26f5dcd0b2b216c45831ca1d7d59060200160405180910390a25050565b6001600160a01b03811660009081526001830160205260408120541515610922565b6000806112f061062b565b90508261130062093a8083612112565b1061130f57600091505061055a565b611319818461216b565b610b45908561214c565b600061055a825490565b60006109228383611b8f565b6000611346600e856112c3565b8061136f575061135461062b565b6001600160a01b038516600090815260056020526040902054115b1561137c57506000610922565b60006113888484611842565b6001600160a01b0380871660009081526004602090815260408083208985168452825280832093881683529290529081205491925090821115611656576001600160a01b0386811660008181526004602081815260408084208b8716808652908352818520968b168552959091529182902086905590516303f20c7d60e51b81529081019190915260248101919091528290732f50d538606fa9edd2b11e2446beb18c9d5846bb90637e418fa09060440160206040518083038186803b15801561145157600080fd5b505afa158015611465573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114899190612019565b1015611656576040516301e8cff360e31b81526001600160a01b03808816600483015286166024820152600090732f50d538606fa9edd2b11e2446beb18c9d5846bb90630f467f989060440160606040518083038186803b1580156114ed57600080fd5b505afa158015611501573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115259190611f96565b9050600061153b826000015183604001516112e5565b6001600160a01b038089166000908152600260209081526040808320938b1683529290522054909150670de0b6b3a764000090611578908361214c565b611582919061212a565b92508215611653576001600160a01b03808816600090815260208181526040808320938a16835292905290812080548592906115bf908490612112565b90915550506001600160a01b038089166000908152600d60205260409020541680156115eb57806115ed565b885b90506115fa87828661176a565b886001600160a01b0316886001600160a01b03168a6001600160a01b03167f2422cac5e23c46c890fdcf42d0c64757409df6832174df639337558f09d99c688760405161164991815260200190565b60405180910390a4505b50505b95945050505050565b6000610922836001600160a01b038416611bb9565b6000610922836001600160a01b038416611c08565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916116ed9190612032565b6000604051808303816000865af19150503d806000811461172a576040519150601f19603f3d011682016040523d82523d6000602084013e61172f565b606091505b50915091508180156117595750805115806117595750808060200190518101906117599190611ef4565b61176257600080fd5b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916117c69190612032565b6000604051808303816000865af19150503d8060008114611803576040519150601f19603f3d011682016040523d82523d6000602084013e611808565b606091505b50915091508180156118325750805115806118325750808060200190518101906118329190611ef4565b61183b57600080fd5b5050505050565b6001600160a01b03808316600090815260036020908152604080832093851683529290529081205461187762093a8082612112565b42106109225761188561062b565b60405163615e523760e01b81526001600160a01b0386166004820152909150732f50d538606fa9edd2b11e2446beb18c9d5846bb9063615e523790602401600060405180830381600087803b1580156118dd57600080fd5b505af11580156118f1573d6000803e3d6000fd5b505060405163edba527360e01b81526001600160a01b03871660048201526024810184905260009250732f50d538606fa9edd2b11e2446beb18c9d5846bb915063edba527390604401604080518083038186803b15801561195157600080fd5b505afa158015611965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119899190611f39565b519050600061199786610929565b90506119a3818361216b565b915082866001600160a01b03167fbd8342205f3471f235c1fc5537dec6e898313fe7c31c1ab75ecaa09feb7580b384846040516119ea929190918252602082015260400190565b60405180910390a36001600160a01b03808716600081815260208181526040808320948a16808452948252808320549383526001825280832094835293905291822054611a37919061216b565b90508215611a835782611a52670de0b6b3a76400008361214c565b611a5c919061212a565b6001600160a01b038089166000908152600260209081526040808320938b16835292905220555b5050506001600160a01b0380851660009081526003602090815260408083209387168352929052208190559392505050565b6001600160a01b0380831660009081526008602090815260408083209385168352929052205460ff16611b8b576001600160a01b0380831660008181526006602090815260408083208054600181810183559185528385200180549688166001600160a01b031997881681179091558085526007845282852080548084018255908652848620018054909716861790965584845260088352818420868552909252808320805460ff1916909217909155517fc3da16a0185e98874c12feef929e38c56e0abe7e4d6b62fca1c9b9ad2edd9f699190a35b5050565b6000826000018281548110611ba657611ba66121c9565b9060005260206000200154905092915050565b6000818152600183016020526040812054611c005750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561055a565b50600061055a565b60008181526001830160205260408120548015611cf1576000611c2c60018361216b565b8554909150600090611c409060019061216b565b9050818114611ca5576000866000018281548110611c6057611c606121c9565b9060005260206000200154905080876000018481548110611c8357611c836121c9565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611cb657611cb66121b3565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061055a565b600091505061055a565b80356001600160a01b0381168114611d1257600080fd5b919050565b60008083601f840112611d2957600080fd5b50813567ffffffffffffffff811115611d4157600080fd5b6020830191508360208260051b8501011115611d5c57600080fd5b9250929050565b600060208284031215611d7557600080fd5b61092282611cfb565b60008060408385031215611d9157600080fd5b611d9a83611cfb565b9150611da860208401611cfb565b90509250929050565b600080600060608486031215611dc657600080fd5b611dcf84611cfb565b9250611ddd60208501611cfb565b9150611deb60408501611cfb565b90509250925092565b600080600060608486031215611e0957600080fd5b611e1284611cfb565b9250611e2060208501611cfb565b9150604084013590509250925092565b60008060408385031215611e4357600080fd5b611e4c83611cfb565b946020939093013593505050565b60008060008060008060608789031215611e7357600080fd5b863567ffffffffffffffff80821115611e8b57600080fd5b611e978a838b01611d17565b90985096506020890135915080821115611eb057600080fd5b611ebc8a838b01611d17565b90965094506040890135915080821115611ed557600080fd5b50611ee289828a01611d17565b979a9699509497509295939492505050565b600060208284031215611f0657600080fd5b8151801515811461092257600080fd5b600060208284031215611f2857600080fd5b815180600f0b811461092257600080fd5b600060408284031215611f4b57600080fd5b6040516040810181811067ffffffffffffffff82111715611f7c57634e487b7160e01b600052604160045260246000fd5b604052825181526020928301519281019290925250919050565b600060608284031215611fa857600080fd5b6040516060810181811067ffffffffffffffff82111715611fd957634e487b7160e01b600052604160045260246000fd5b80604052508251815260208301516020820152604083015160408201528091505092915050565b60006020828403121561201257600080fd5b5035919050565b60006020828403121561202b57600080fd5b5051919050565b6000825160005b818110156120535760208186018101518583015201612039565b81811115612062576000828501525b509190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156120ae5783516001600160a01b031683529284019291840191600101612089565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156120ae578351835292840192918401916001016120d6565b60208082526006908201526510b7bbb732b960d11b604082015260600190565b600082198211156121255761212561219d565b500190565b60008261214757634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156121665761216661219d565b500290565b60008282101561217d5761217d61219d565b500390565b60006000198214156121965761219661219d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220e3028176a5da906dae88277e63afce14ca3f186099f5b06d99745b17e4505c8964736f6c63430008060033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.