ERC-20
Overview
Max Total Supply
45,421,009.5354517800467344 veORDS
Holders
545
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
VeOrdsToken
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "./IOrdsToken.sol"; import "./IRewardsBank.sol"; contract VeOrdsToken is Ownable(msg.sender), ReentrancyGuard, ERC20("Ordiswap Staking token", "veORDS") { using Address for address; using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; using SafeERC20 for IOrdsToken; IOrdsToken public immutable ordsToken; // ORDS token to convert to/from EnumerableSet.AddressSet private _transferWhitelist; // addresses allowed to send/receive veORDS event StakeSucceeded(address sender, uint256 amount, uint256 period); event RedeemSuceeded( address sender, uint256 amount, uint256 reward, uint256 period ); event RedeemBurned( address sender, uint256 amount, uint256 burnedAmount, uint256 period ); struct Stake { uint256 amount; uint256 startTime; uint256 lockPeriod; uint256 reward; } // Constants for lock periods, rewards, APRs, max staking amounts uint256[3] public lockPeriods = [3, 6, 12]; uint256[3] public totalRewards = [0, 0, 0]; uint256 public totalRewardsAvailable = 25e6 * 1e18; // 25 million tokens uint256[3] public rewardPercentages = [15, 35, 50]; uint256[3] public totalRedeemRewards = [0, 0, 0]; uint256[3] public APRs = [20, 35, 65]; uint256[3] public burnPercentages = [20, 30, 40]; uint256 public tvl; uint256 public totalBurned; IRewardsBank public rewardBank; mapping(uint256 => uint256) public maxStakingAmount; mapping(uint256 => uint256) public totalStakingAmount; // Mapping of user to their stakes mapping(address => Stake[]) public stakes; constructor(address _ordsToken, address _rewardBankAddress) { require( _rewardBankAddress != address(0), "Membership NFT address cannot be the zero address" ); ordsToken = IOrdsToken(_ordsToken); rewardBank = IRewardsBank(_rewardBankAddress); updateTotalRewards(); _transferWhitelist.add(address(this)); } /* * @dev Check if a stake entry exists */ modifier validateStake(address userAddress, uint256 stakeIndex) { require( stakeIndex < stakes[userAddress].length, "validateStake: stake entry does not exist" ); _; } function updateBankAddress(address _newBankAddress) public onlyOwner { rewardBank = IRewardsBank(_newBankAddress); } function updateMaxStakingAmount() internal { maxStakingAmount[lockPeriods[0]] = (totalRewards[0] / APRs[0]) * 100 * 4; maxStakingAmount[lockPeriods[1]] = (totalRewards[1] / APRs[1]) * 100 * 2; maxStakingAmount[lockPeriods[2]] = (totalRewards[2] / APRs[2]) * 100; } function updateTotalRewards() private { totalRewards[0] = (totalRewardsAvailable * rewardPercentages[0]) / 100; totalRewards[1] = (totalRewardsAvailable * rewardPercentages[1]) / 100; totalRewards[2] = (totalRewardsAvailable * rewardPercentages[2]) / 100; // Update the max staking amounts based on the new total rewards updateMaxStakingAmount(); } // Function to update totalRewardsAvailable function updateTotalRewardsAvailable( uint256 amountInMillions ) public onlyOwner { totalRewardsAvailable = amountInMillions * (1e6 * 1e18); // Convert amount from millions of ethers to wei updateTotalRewards(); } function stake(uint256 amount, uint256 period) public nonReentrant { /// Require that the period is in our lockPeriods array require( period == lockPeriods[0] || period == lockPeriods[1] || period == lockPeriods[2], "Invalid lock period" ); require( totalStakingAmount[period] + amount <= maxStakingAmount[period], "Staking amount exceeds limit" ); ordsToken.transferFrom(msg.sender, address(this), amount); _mint(msg.sender, amount); totalStakingAmount[period] += amount; tvl += amount; uint256 reward = calculateReward(amount, period); stakes[msg.sender].push(Stake(amount, block.timestamp, period, reward)); emit StakeSucceeded(msg.sender, amount, period); } function calculateReward( uint256 amount, uint256 period ) private view returns (uint256) { uint256 periodIndex = (period == lockPeriods[0]) ? 0 : (period == lockPeriods[1]) ? 1 : 2; uint256 rewardRate = (APRs[periodIndex] * 100) / (12 / period); return (amount * rewardRate) / 10000; } function redeem( uint256 index ) public validateStake(msg.sender, index) nonReentrant { Stake memory userStake = stakes[msg.sender][index]; // Get back the veOrds and burn them _transfer(msg.sender, address(this), userStake.amount); if ( block.timestamp >= userStake.startTime + userStake.lockPeriod * 30 days ) { uint256 reward = userStake.reward; ordsToken.transfer(msg.sender, userStake.amount); uint256 periodIndex = (userStake.lockPeriod == 3) ? 0 : (userStake.lockPeriod == 6) ? 1 : 2; // Deduct the reward from the total reward pool totalRedeemRewards[periodIndex] += reward; // Send the user the rewards rewardBank.withdrawORDSTokens(msg.sender, reward); emit RedeemSuceeded( msg.sender, userStake.amount, reward, userStake.lockPeriod ); } else { uint256 burnPercentageIndex = (userStake.lockPeriod == 3) ? 0 : (userStake.lockPeriod == 6) ? 1 : 2; uint256 penalty = (userStake.amount * burnPercentages[burnPercentageIndex]) / 100; totalBurned += penalty; ordsToken.safeTransfer(msg.sender, userStake.amount - penalty); ordsToken.burn(penalty); emit RedeemBurned( msg.sender, userStake.amount, penalty, userStake.lockPeriod ); } _burn(address(this), userStake.amount); _deleteStakeEntry(index); tvl -= userStake.amount; } function updateAPRs(uint256[] memory newAPRs) public onlyOwner { require(newAPRs.length == 3, "Invalid array length"); uint256[3] memory tempAPRs; for (uint256 i = 0; i < 3; i++) { tempAPRs[i] = newAPRs[i]; } APRs = tempAPRs; updateMaxStakingAmount(); } function updateRewardPercentages( uint256[] memory newRewardPercentages ) public onlyOwner { require(newRewardPercentages.length == 3, "Invalid array length"); uint256[3] memory tempRewardPercentages; for (uint256 i = 0; i < 3; i++) { tempRewardPercentages[i] = newRewardPercentages[i]; } rewardPercentages = tempRewardPercentages; updateTotalRewards(); } function updateBurnPercentages( uint256[] memory newPercentages ) public onlyOwner { require(newPercentages.length == 3, "Invalid array length"); uint256[3] memory tempRatio; for (uint256 i = 0; i < 3; i++) { tempRatio[i] = newPercentages[i]; } burnPercentages = tempRatio; } function getUserAverageAPR( address userAddress ) external view returns (uint256) { uint256 weightedAPRSum = 0; uint256 totalStaked = 0; for (uint256 i = 0; i < stakes[userAddress].length; i++) { Stake memory stakeInfo = stakes[userAddress][i]; uint256 periodAPR = 0; // Determine the APR based on the lockPeriod of the stake if (stakeInfo.lockPeriod == lockPeriods[0]) { periodAPR = APRs[0]; } else if (stakeInfo.lockPeriod == lockPeriods[1]) { periodAPR = APRs[1]; } else if (stakeInfo.lockPeriod == lockPeriods[2]) { periodAPR = APRs[2]; } // Weighted APR calculation by the amount weightedAPRSum += stakeInfo.amount * periodAPR; totalStaked += stakeInfo.amount; } // Calculate the average APR if (totalStaked == 0) return 0; // Handle division by zero if no stakes return ((weightedAPRSum * 1e18) / totalStaked); } function getUserStake( address userAddress, uint256 stakeIndex ) external view validateStake(userAddress, stakeIndex) returns ( uint256 amount, uint256 startTime, uint256 lockPeriod, uint256 reward ) { Stake storage stakeInfo = stakes[userAddress][stakeIndex]; return ( stakeInfo.amount, stakeInfo.startTime, stakeInfo.lockPeriod, stakeInfo.reward ); } /** * @dev returns quantity of "userAddress" stakes */ function getUserStakesLength( address userAddress ) external view returns (uint256) { return stakes[userAddress].length; } function _deleteStakeEntry(uint256 index) internal { require( index < stakes[msg.sender].length, "deleteStakeEntry: Index out of bounds" ); for (uint256 i = index; i < stakes[msg.sender].length - 1; i++) { stakes[msg.sender][i] = stakes[msg.sender][i + 1]; } stakes[msg.sender].pop(); } /** * @dev Hook override to forbid transfers except from whitelisted addresses and minting */ function _beforeTokenTransfer( address from, address to, uint256 /*amount*/ ) internal view { require( from == address(0) || _transferWhitelist.contains(from) || _transferWhitelist.contains(to), "transfer: not allowed" ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IRewardsBank { /** * @dev Sets the address allowed to withdraw ORDS tokens. * @param _withdrawer The address to be allowed withdrawal. */ function setAllowedWithdrawer(address _withdrawer) external; /** * @dev Allows the designated withdrawer to withdraw a specified amount of ORDS tokens and send them to a specific destination. * @param destination The address where the ORDS tokens will be sent. * @param amount The amount of ORDS tokens to withdraw. */ function withdrawORDSTokens(address destination, uint256 amount) external; /** * @dev Emergency function to withdraw all ORDS tokens from the contract by the owner. */ function emergencyWithdrawAll() external; /** * @dev Returns the address currently allowed to withdraw tokens. * @return The address allowed to withdraw. */ function getAllowedWithdrawer() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IOrdsToken is IERC20{ function burn(uint256 amount) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @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. * * ```solidity * 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 is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 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 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[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._positions[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) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // 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 in 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_ordsToken","type":"address"},{"internalType":"address","name":"_rewardBankAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"period","type":"uint256"}],"name":"RedeemBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"period","type":"uint256"}],"name":"RedeemSuceeded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"period","type":"uint256"}],"name":"StakeSucceeded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"APRs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnPercentages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getUserAverageAPR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"stakeIndex","type":"uint256"}],"name":"getUserStake","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"lockPeriod","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getUserStakesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockPeriods","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxStakingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ordsToken","outputs":[{"internalType":"contract IOrdsToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardBank","outputs":[{"internalType":"contract IRewardsBank","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardPercentages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"period","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"lockPeriod","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalRedeemRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalStakingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tvl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"newAPRs","type":"uint256[]"}],"name":"updateAPRs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newBankAddress","type":"address"}],"name":"updateBankAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"newPercentages","type":"uint256[]"}],"name":"updateBurnPercentages","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"newRewardPercentages","type":"uint256[]"}],"name":"updateRewardPercentages","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountInMillions","type":"uint256"}],"name":"updateTotalRewardsAvailable","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040526040518060600160405280600360ff168152602001600660ff168152602001600c60ff1681525060099060036200003d929190620007f0565b5060405180606001604052805f60ff1681526020015f60ff1681526020015f60ff16815250600c90600362000074929190620007f0565b506a14adf4b7320334b9000000600f556040518060600160405280600f60ff168152602001602360ff168152602001603260ff168152506010906003620000bd929190620007f0565b5060405180606001604052805f60ff1681526020015f60ff1681526020015f60ff168152506013906003620000f4929190620007f0565b506040518060600160405280601460ff168152602001602360ff168152602001604160ff1681525060169060036200012e929190620007f0565b506040518060600160405280601460ff168152602001601e60ff168152602001602860ff16815250601990600362000168929190620007f0565b5034801562000175575f80fd5b506040516200454c3803806200454c83398181016040528101906200019b9190620008bc565b6040518060400160405280601681526020017f4f72646973776170205374616b696e6720746f6b656e000000000000000000008152506040518060400160405280600681526020017f76654f5244530000000000000000000000000000000000000000000000000000815250335f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036200027b575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040162000272919062000912565b60405180910390fd5b6200028c81620003ce60201b60201c565b50600180819055508160059081620002a5919062000b91565b508060069081620002b7919062000b91565b5050505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036200032b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003229062000cf9565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505080601e5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620003af6200048f60201b60201c565b620003c53060076200059b60201b90919060201c565b50505062000e21565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b606460105f60038110620004a857620004a762000d19565b5b0154600f54620004b9919062000d73565b620004c5919062000dea565b600c5f60038110620004dc57620004db62000d19565b5b018190555060646010600160038110620004fb57620004fa62000d19565b5b0154600f546200050c919062000d73565b62000518919062000dea565b600c60016003811062000530576200052f62000d19565b5b0181905550606460106002600381106200054f576200054e62000d19565b5b0154600f5462000560919062000d73565b6200056c919062000dea565b600c60026003811062000584576200058362000d19565b5b018190555062000599620005d060201b60201c565b565b5f620005c8835f018373ffffffffffffffffffffffffffffffffffffffff165f1b6200075f60201b60201c565b905092915050565b6004606460165f60038110620005eb57620005ea62000d19565b5b0154600c5f6003811062000604576200060362000d19565b5b015462000612919062000dea565b6200061e919062000d73565b6200062a919062000d73565b601f5f60095f6003811062000644576200064362000d19565b5b015481526020019081526020015f208190555060026064601660016003811062000673576200067262000d19565b5b0154600c6001600381106200068d576200068c62000d19565b5b01546200069b919062000dea565b620006a7919062000d73565b620006b3919062000d73565b601f5f6009600160038110620006ce57620006cd62000d19565b5b015481526020019081526020015f208190555060646016600260038110620006fb57620006fa62000d19565b5b0154600c60026003811062000715576200071462000d19565b5b015462000723919062000dea565b6200072f919062000d73565b601f5f60096002600381106200074a576200074962000d19565b5b015481526020019081526020015f2081905550565b5f620007728383620007d060201b60201c565b620007c657825f0182908060018154018082558091505060019003905f5260205f20015f9091909190915055825f0180549050836001015f8481526020019081526020015f208190555060019050620007ca565b5f90505b92915050565b5f80836001015f8481526020019081526020015f20541415905092915050565b826003810192821562000827579160200282015b8281111562000826578251829060ff1690559160200191906001019062000804565b5b5090506200083691906200083a565b5090565b5b8082111562000853575f815f9055506001016200083b565b5090565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000886826200085b565b9050919050565b62000898816200087a565b8114620008a3575f80fd5b50565b5f81519050620008b6816200088d565b92915050565b5f8060408385031215620008d557620008d462000857565b5b5f620008e485828601620008a6565b9250506020620008f785828601620008a6565b9150509250929050565b6200090c816200087a565b82525050565b5f602082019050620009275f83018462000901565b92915050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620009a957607f821691505b602082108103620009bf57620009be62000964565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830262000a237fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620009e6565b62000a2f8683620009e6565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000a7962000a7362000a6d8462000a47565b62000a50565b62000a47565b9050919050565b5f819050919050565b62000a948362000a59565b62000aac62000aa38262000a80565b848454620009f2565b825550505050565b5f90565b62000ac262000ab4565b62000acf81848462000a89565b505050565b5b8181101562000af65762000aea5f8262000ab8565b60018101905062000ad5565b5050565b601f82111562000b455762000b0f81620009c5565b62000b1a84620009d7565b8101602085101562000b2a578190505b62000b4262000b3985620009d7565b83018262000ad4565b50505b505050565b5f82821c905092915050565b5f62000b675f198460080262000b4a565b1980831691505092915050565b5f62000b81838362000b56565b9150826002028217905092915050565b62000b9c826200092d565b67ffffffffffffffff81111562000bb85762000bb762000937565b5b62000bc4825462000991565b62000bd182828562000afa565b5f60209050601f83116001811462000c07575f841562000bf2578287015190505b62000bfe858262000b74565b86555062000c6d565b601f19841662000c1786620009c5565b5f5b8281101562000c405784890151825560018201915060208501945060208101905062000c19565b8683101562000c60578489015162000c5c601f89168262000b56565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f4d656d62657273686970204e465420616464726573732063616e6e6f742062655f8201527f20746865207a65726f2061646472657373000000000000000000000000000000602082015250565b5f62000ce160318362000c75565b915062000cee8262000c85565b604082019050919050565b5f6020820190508181035f83015262000d128162000cd3565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f62000d7f8262000a47565b915062000d8c8362000a47565b925082820262000d9c8162000a47565b9150828204841483151762000db65762000db562000d46565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f62000df68262000a47565b915062000e038362000a47565b92508262000e165762000e1562000dbd565b5b828204905092915050565b6080516136f662000e565f395f8181610e8f015281816115350152818161178f015281816117d501526118e101526136f65ff3fe608060405234801561000f575f80fd5b506004361061021a575f3560e01c806378b73e0811610123578063b1547bb9116100ab578063db006a751161007a578063db006a75146106c6578063db7fc9d1146106e2578063dd62ed3e14610700578063e5328e0614610730578063f2fde38b1461074e5761021a565b8063b1547bb914610615578063cec695fa14610645578063d168e12414610678578063d89135cd146106a85761021a565b80638da5cb5b116100f25780638da5cb5b1461057157806395d89b411461058f578063966d0d90146105ad5780639f19d0ee146105c9578063a9059cbb146105e55761021a565b806378b73e08146104d75780637b0472f014610507578063812a0dd4146105235780638da0fc82146105535761021a565b80634ff4fc36116101a657806368a477be1161017557806368a477be146104335780636de813f11461044f57806370a082311461046d578063715018a61461049d578063735441db146104a75761021a565b80634ff4fc361461037057806356f3d197146103a0578063584b62a1146103d05780635a5b21b3146104035761021a565b806323b872dd116101ed57806323b872dd146102a6578063313ce567146102d657806332f26694146102f4578063494f1458146103245780634c8f2a78146103405761021a565b806306fdde031461021e578063095ea7b31461023c578063126640c11461026c57806318160ddd14610288575b5f80fd5b61022661076a565b6040516102339190612b4d565b60405180910390f35b61025660048036038101906102519190612c0b565b6107fa565b6040516102639190612c63565b60405180910390f35b61028660048036038101906102819190612dbc565b61081c565b005b6102906108de565b60405161029d9190612e12565b60405180910390f35b6102c060048036038101906102bb9190612e2b565b6108e7565b6040516102cd9190612c63565b60405180910390f35b6102de610915565b6040516102eb9190612e96565b60405180910390f35b61030e60048036038101906103099190612eaf565b61091d565b60405161031b9190612e12565b60405180910390f35b61033e60048036038101906103399190612dbc565b610936565b005b61035a60048036038101906103559190612eaf565b6109f0565b6040516103679190612e12565b60405180910390f35b61038a60048036038101906103859190612eda565b610a09565b6040516103979190612e12565b60405180910390f35b6103ba60048036038101906103b59190612eda565b610c1a565b6040516103c79190612e12565b60405180910390f35b6103ea60048036038101906103e59190612c0b565b610c63565b6040516103fa9493929190612f05565b60405180910390f35b61041d60048036038101906104189190612eaf565b610ca9565b60405161042a9190612e12565b60405180910390f35b61044d60048036038101906104489190612eaf565b610cc2565b005b610457610cf1565b6040516104649190612e12565b60405180910390f35b61048760048036038101906104829190612eda565b610cf7565b6040516104949190612e12565b60405180910390f35b6104a5610d3d565b005b6104c160048036038101906104bc9190612eaf565b610d50565b6040516104ce9190612e12565b60405180910390f35b6104f160048036038101906104ec9190612eaf565b610d69565b6040516104fe9190612e12565b60405180910390f35b610521600480360381019061051c9190612f48565b610d7e565b005b61053d60048036038101906105389190612eaf565b611075565b60405161054a9190612e12565b60405180910390f35b61055b611089565b6040516105689190612fe1565b60405180910390f35b6105796110ae565b6040516105869190613009565b60405180910390f35b6105976110d5565b6040516105a49190612b4d565b60405180910390f35b6105c760048036038101906105c29190612eda565b611165565b005b6105e360048036038101906105de9190612dbc565b6111b0565b005b6105ff60048036038101906105fa9190612c0b565b611272565b60405161060c9190612c63565b60405180910390f35b61062f600480360381019061062a9190612eaf565b611294565b60405161063c9190612e12565b60405180910390f35b61065f600480360381019061065a9190612c0b565b6112ad565b60405161066f9493929190612f05565b60405180910390f35b610692600480360381019061068d9190612eaf565b6113ba565b60405161069f9190612e12565b60405180910390f35b6106b06113d3565b6040516106bd9190612e12565b60405180910390f35b6106e060048036038101906106db9190612eaf565b6113d9565b005b6106ea6118df565b6040516106f79190613042565b60405180910390f35b61071a6004803603810190610715919061305b565b611903565b6040516107279190612e12565b60405180910390f35b610738611985565b6040516107459190612e12565b60405180910390f35b61076860048036038101906107639190612eda565b61198b565b005b606060058054610779906130c6565b80601f01602080910402602001604051908101604052809291908181526020018280546107a5906130c6565b80156107f05780601f106107c7576101008083540402835291602001916107f0565b820191905f5260205f20905b8154815290600101906020018083116107d357829003601f168201915b5050505050905090565b5f80610804611a0f565b9050610811818585611a16565b600191505092915050565b610824611a28565b6003815114610868576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085f90613140565b60405180910390fd5b610870612a46565b5f5b60038110156108bf5782818151811061088e5761088d61315e565b5b60200260200101518282600381106108a9576108a861315e565b5b6020020181815250508080600101915050610872565b508060109060036108d1929190612a68565b506108da611aaf565b5050565b5f600454905090565b5f806108f1611a0f565b90506108fe858285611b95565b610909858585611c27565b60019150509392505050565b5f6012905090565b600c816003811061092c575f80fd5b015f915090505481565b61093e611a28565b6003815114610982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097990613140565b60405180910390fd5b61098a612a46565b5f5b60038110156109d9578281815181106109a8576109a761315e565b5b60200260200101518282600381106109c3576109c261315e565b5b602002018181525050808060010191505061098c565b508060199060036109eb929190612a68565b505050565b600981600381106109ff575f80fd5b015f915090505481565b5f805f90505f805b60215f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080549050811015610bdf575f60215f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208281548110610aa957610aa861315e565b5b905f5260205f2090600402016040518060800160405290815f8201548152602001600182015481526020016002820154815260200160038201548152505090505f60095f60038110610afe57610afd61315e565b5b0154826040015103610b275760165f60038110610b1e57610b1d61315e565b5b01549050610ba3565b6009600160038110610b3c57610b3b61315e565b5b0154826040015103610b66576016600160038110610b5d57610b5c61315e565b5b01549050610ba2565b6009600260038110610b7b57610b7a61315e565b5b0154826040015103610ba1576016600260038110610b9c57610b9b61315e565b5b015490505b5b5b80825f0151610bb291906131b8565b85610bbd91906131f9565b9450815f015184610bce91906131f9565b935050508080600101915050610a11565b505f8103610bf1575f92505050610c15565b80670de0b6b3a764000083610c0691906131b8565b610c109190613259565b925050505b919050565b5f60215f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490509050919050565b6021602052815f5260405f208181548110610c7c575f80fd5b905f5260205f2090600402015f9150915050805f0154908060010154908060020154908060030154905084565b60138160038110610cb8575f80fd5b015f915090505481565b610cca611a28565b69d3c21bcecceda100000081610ce091906131b8565b600f81905550610cee611aaf565b50565b600f5481565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610d45611a28565b610d4e5f611d17565b565b60198160038110610d5f575f80fd5b015f915090505481565b601f602052805f5260405f205f915090505481565b610d86611dd8565b60095f60038110610d9a57610d9961315e565b5b0154811480610dbe57506009600160038110610db957610db861315e565b5b015481145b80610dde57506009600260038110610dd957610dd861315e565b5b015481145b610e1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e14906132d3565b60405180910390fd5b601f5f8281526020019081526020015f20548260205f8481526020019081526020015f2054610e4c91906131f9565b1115610e8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e849061333b565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401610eea93929190613359565b6020604051808303815f875af1158015610f06573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f2a91906133b8565b50610f353383611e27565b8160205f8381526020019081526020015f205f828254610f5591906131f9565b9250508190555081601c5f828254610f6d91906131f9565b925050819055505f610f7f8383611ea6565b905060215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20604051806080016040528085815260200142815260200184815260200183815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015560208201518160010155604082015181600201556060820151816003015550507f114904dab50bbd215f2c536c89c273293da34bd9feda26f2d9eb1ecb053c26d1338484604051611060939291906133e3565b60405180910390a150611071611f56565b5050565b60208052805f5260405f205f915090505481565b601e5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600680546110e4906130c6565b80601f0160208091040260200160405190810160405280929190818152602001828054611110906130c6565b801561115b5780601f106111325761010080835404028352916020019161115b565b820191905f5260205f20905b81548152906001019060200180831161113e57829003601f168201915b5050505050905090565b61116d611a28565b80601e5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6111b8611a28565b60038151146111fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f390613140565b60405180910390fd5b611204612a46565b5f5b6003811015611253578281815181106112225761122161315e565b5b602002602001015182826003811061123d5761123c61315e565b5b6020020181815250508080600101915050611206565b50806016906003611265929190612a68565b5061126e611f5f565b5050565b5f8061127c611a0f565b9050611289818585611c27565b600191505092915050565b601081600381106112a3575f80fd5b015f915090505481565b5f805f80858560215f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490508110611335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132c90613488565b60405180910390fd5b5f60215f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2088815481106113855761138461315e565b5b905f5260205f2090600402019050805f0154816001015482600201548360030154965096509650965050505092959194509250565b601681600381106113c9575f80fd5b015f915090505481565b601d5481565b338160215f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080549050811061145d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145490613488565b60405180910390fd5b611465611dd8565b5f60215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2084815481106114b5576114b461315e565b5b905f5260205f2090600402016040518060800160405290815f8201548152602001600182015481526020016002820154815260200160038201548152505090506115033330835f0151611c27565b62278d00816040015161151691906131b8565b816020015161152591906131f9565b4210611700575f816060015190507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33845f01516040518363ffffffff1660e01b81526004016115919291906134a6565b6020604051808303815f875af11580156115ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115d191906133b8565b505f60038360400151146115fa5760068360400151146115f25760026115f5565b60015b6115fc565b5f5b60ff16905081601382600381106116165761161561315e565b5b015f82825461162591906131f9565b92505081905550601e5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b4d6834e33846040518363ffffffff1660e01b81526004016116889291906134a6565b5f604051808303815f87803b15801561169f575f80fd5b505af11580156116b1573d5f803e3d5ffd5b505050507f033ed6092457257c5293f48ad745da86d54ecf3c1647a9e8830bc954ee03c35433845f01518486604001516040516116f194939291906134cd565b60405180910390a150506118a0565b5f6003826040015114611728576006826040015114611720576002611723565b60015b61172a565b5f5b60ff1690505f6064601983600381106117465761174561315e565b5b0154845f015161175691906131b8565b6117609190613259565b905080601d5f82825461177391906131f9565b925050819055506117d33382855f015161178d9190613510565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166120c39092919063ffffffff16565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b815260040161182c9190612e12565b5f604051808303815f87803b158015611843575f80fd5b505af1158015611855573d5f803e3d5ffd5b505050507ffa257c2db5c9e9b6783c394ef6cb1cb158205bc91281442718371479cc78f1f633845f015183866040015160405161189594939291906134cd565b60405180910390a150505b6118ad30825f0151612142565b6118b6846121c1565b805f0151601c5f8282546118ca9190613510565b92505081905550506118da611f56565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b601c5481565b611993611a28565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a03575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016119fa9190613009565b60405180910390fd5b611a0c81611d17565b50565b5f33905090565b611a238383836001612417565b505050565b611a30611a0f565b73ffffffffffffffffffffffffffffffffffffffff16611a4e6110ae565b73ffffffffffffffffffffffffffffffffffffffff1614611aad57611a71611a0f565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611aa49190613009565b60405180910390fd5b565b606460105f60038110611ac557611ac461315e565b5b0154600f54611ad491906131b8565b611ade9190613259565b600c5f60038110611af257611af161315e565b5b018190555060646010600160038110611b0e57611b0d61315e565b5b0154600f54611b1d91906131b8565b611b279190613259565b600c600160038110611b3c57611b3b61315e565b5b018190555060646010600260038110611b5857611b5761315e565b5b0154600f54611b6791906131b8565b611b719190613259565b600c600260038110611b8657611b8561315e565b5b0181905550611b93611f5f565b565b5f611ba08484611903565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611c215781811015611c12578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401611c09939291906133e3565b60405180910390fd5b611c2084848484035f612417565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611c97575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401611c8e9190613009565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611d07575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401611cfe9190613009565b60405180910390fd5b611d128383836125e6565b505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600260015403611e1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e149061358d565b60405180910390fd5b6002600181905550565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611e97575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401611e8e9190613009565b60405180910390fd5b611ea25f83836125e6565b5050565b5f8060095f60038110611ebc57611ebb61315e565b5b01548314611ef0576009600160038110611ed957611ed861315e565b5b01548314611ee8576002611eeb565b60015b611ef2565b5f5b60ff1690505f83600c611f059190613259565b606460168460038110611f1b57611f1a61315e565b5b0154611f2791906131b8565b611f319190613259565b90506127108186611f4291906131b8565b611f4c9190613259565b9250505092915050565b60018081905550565b6004606460165f60038110611f7757611f7661315e565b5b0154600c5f60038110611f8d57611f8c61315e565b5b0154611f999190613259565b611fa391906131b8565b611fad91906131b8565b601f5f60095f60038110611fc457611fc361315e565b5b015481526020019081526020015f2081905550600260646016600160038110611ff057611fef61315e565b5b0154600c6001600381106120075761200661315e565b5b01546120139190613259565b61201d91906131b8565b61202791906131b8565b601f5f600960016003811061203f5761203e61315e565b5b015481526020019081526020015f2081905550606460166002600381106120695761206861315e565b5b0154600c6002600381106120805761207f61315e565b5b015461208c9190613259565b61209691906131b8565b601f5f60096002600381106120ae576120ad61315e565b5b015481526020019081526020015f2081905550565b61213d838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016120f69291906134a6565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612802565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036121b2575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016121a99190613009565b60405180910390fd5b6121bd825f836125e6565b5050565b60215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490508110612243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223a9061361b565b60405180910390fd5b5f8190505b600160215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490506122959190613510565b8110156123945760215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001826122e691906131f9565b815481106122f7576122f661315e565b5b905f5260205f20906004020160215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2082815481106123525761235161315e565b5b905f5260205f2090600402015f820154815f01556001820154816001015560028201548160020155600382015481600301559050508080600101915050612248565b5060215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806123e2576123e1613639565b5b600190038181905f5260205f2090600402015f8082015f9055600182015f9055600282015f9055600382015f90555050905550565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612487575f6040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161247e9190613009565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036124f7575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016124ee9190613009565b60405180910390fd5b8160035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555080156125e0578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516125d79190612e12565b60405180910390a35b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612636578060045f82825461262a91906131f9565b92505081905550612706565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156126c0578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016126b7939291906133e3565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361274d578060045f8282540392505081905550612798565b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516127f59190612e12565b60405180910390a3505050565b5f61282c828473ffffffffffffffffffffffffffffffffffffffff1661289790919063ffffffff16565b90505f81511415801561285057508080602001905181019061284e91906133b8565b155b1561289257826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016128899190613009565b60405180910390fd5b505050565b60606128a483835f6128ac565b905092915050565b6060814710156128f357306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016128ea9190613009565b60405180910390fd5b5f808573ffffffffffffffffffffffffffffffffffffffff16848660405161291b91906136aa565b5f6040518083038185875af1925050503d805f8114612955576040519150601f19603f3d011682016040523d82523d5f602084013e61295a565b606091505b509150915061296a868383612975565b925050509392505050565b60608261298a5761298582612a02565b6129fa565b5f82511480156129b057505f8473ffffffffffffffffffffffffffffffffffffffff163b145b156129f257836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016129e99190613009565b60405180910390fd5b8190506129fb565b5b9392505050565b5f81511115612a145780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060600160405280600390602082028036833780820191505090505090565b8260038101928215612a97579160200282015b82811115612a96578251825591602001919060010190612a7b565b5b509050612aa49190612aa8565b5090565b5b80821115612abf575f815f905550600101612aa9565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612afa578082015181840152602081019050612adf565b5f8484015250505050565b5f601f19601f8301169050919050565b5f612b1f82612ac3565b612b298185612acd565b9350612b39818560208601612add565b612b4281612b05565b840191505092915050565b5f6020820190508181035f830152612b658184612b15565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612ba782612b7e565b9050919050565b612bb781612b9d565b8114612bc1575f80fd5b50565b5f81359050612bd281612bae565b92915050565b5f819050919050565b612bea81612bd8565b8114612bf4575f80fd5b50565b5f81359050612c0581612be1565b92915050565b5f8060408385031215612c2157612c20612b76565b5b5f612c2e85828601612bc4565b9250506020612c3f85828601612bf7565b9150509250929050565b5f8115159050919050565b612c5d81612c49565b82525050565b5f602082019050612c765f830184612c54565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612cb682612b05565b810181811067ffffffffffffffff82111715612cd557612cd4612c80565b5b80604052505050565b5f612ce7612b6d565b9050612cf38282612cad565b919050565b5f67ffffffffffffffff821115612d1257612d11612c80565b5b602082029050602081019050919050565b5f80fd5b5f612d39612d3484612cf8565b612cde565b90508083825260208201905060208402830185811115612d5c57612d5b612d23565b5b835b81811015612d855780612d718882612bf7565b845260208401935050602081019050612d5e565b5050509392505050565b5f82601f830112612da357612da2612c7c565b5b8135612db3848260208601612d27565b91505092915050565b5f60208284031215612dd157612dd0612b76565b5b5f82013567ffffffffffffffff811115612dee57612ded612b7a565b5b612dfa84828501612d8f565b91505092915050565b612e0c81612bd8565b82525050565b5f602082019050612e255f830184612e03565b92915050565b5f805f60608486031215612e4257612e41612b76565b5b5f612e4f86828701612bc4565b9350506020612e6086828701612bc4565b9250506040612e7186828701612bf7565b9150509250925092565b5f60ff82169050919050565b612e9081612e7b565b82525050565b5f602082019050612ea95f830184612e87565b92915050565b5f60208284031215612ec457612ec3612b76565b5b5f612ed184828501612bf7565b91505092915050565b5f60208284031215612eef57612eee612b76565b5b5f612efc84828501612bc4565b91505092915050565b5f608082019050612f185f830187612e03565b612f256020830186612e03565b612f326040830185612e03565b612f3f6060830184612e03565b95945050505050565b5f8060408385031215612f5e57612f5d612b76565b5b5f612f6b85828601612bf7565b9250506020612f7c85828601612bf7565b9150509250929050565b5f819050919050565b5f612fa9612fa4612f9f84612b7e565b612f86565b612b7e565b9050919050565b5f612fba82612f8f565b9050919050565b5f612fcb82612fb0565b9050919050565b612fdb81612fc1565b82525050565b5f602082019050612ff45f830184612fd2565b92915050565b61300381612b9d565b82525050565b5f60208201905061301c5f830184612ffa565b92915050565b5f61302c82612fb0565b9050919050565b61303c81613022565b82525050565b5f6020820190506130555f830184613033565b92915050565b5f806040838503121561307157613070612b76565b5b5f61307e85828601612bc4565b925050602061308f85828601612bc4565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806130dd57607f821691505b6020821081036130f0576130ef613099565b5b50919050565b7f496e76616c6964206172726179206c656e6774680000000000000000000000005f82015250565b5f61312a601483612acd565b9150613135826130f6565b602082019050919050565b5f6020820190508181035f8301526131578161311e565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6131c282612bd8565b91506131cd83612bd8565b92508282026131db81612bd8565b915082820484148315176131f2576131f161318b565b5b5092915050565b5f61320382612bd8565b915061320e83612bd8565b92508282019050808211156132265761322561318b565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61326382612bd8565b915061326e83612bd8565b92508261327e5761327d61322c565b5b828204905092915050565b7f496e76616c6964206c6f636b20706572696f64000000000000000000000000005f82015250565b5f6132bd601383612acd565b91506132c882613289565b602082019050919050565b5f6020820190508181035f8301526132ea816132b1565b9050919050565b7f5374616b696e6720616d6f756e742065786365656473206c696d6974000000005f82015250565b5f613325601c83612acd565b9150613330826132f1565b602082019050919050565b5f6020820190508181035f83015261335281613319565b9050919050565b5f60608201905061336c5f830186612ffa565b6133796020830185612ffa565b6133866040830184612e03565b949350505050565b61339781612c49565b81146133a1575f80fd5b50565b5f815190506133b28161338e565b92915050565b5f602082840312156133cd576133cc612b76565b5b5f6133da848285016133a4565b91505092915050565b5f6060820190506133f65f830186612ffa565b6134036020830185612e03565b6134106040830184612e03565b949350505050565b7f76616c69646174655374616b653a207374616b6520656e74727920646f6573205f8201527f6e6f742065786973740000000000000000000000000000000000000000000000602082015250565b5f613472602983612acd565b915061347d82613418565b604082019050919050565b5f6020820190508181035f83015261349f81613466565b9050919050565b5f6040820190506134b95f830185612ffa565b6134c66020830184612e03565b9392505050565b5f6080820190506134e05f830187612ffa565b6134ed6020830186612e03565b6134fa6040830185612e03565b6135076060830184612e03565b95945050505050565b5f61351a82612bd8565b915061352583612bd8565b925082820390508181111561353d5761353c61318b565b5b92915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f613577601f83612acd565b915061358282613543565b602082019050919050565b5f6020820190508181035f8301526135a48161356b565b9050919050565b7f64656c6574655374616b65456e7472793a20496e646578206f7574206f6620625f8201527f6f756e6473000000000000000000000000000000000000000000000000000000602082015250565b5f613605602583612acd565b9150613610826135ab565b604082019050919050565b5f6020820190508181035f830152613632816135f9565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b5f81519050919050565b5f81905092915050565b5f61368482613666565b61368e8185613670565b935061369e818560208601612add565b80840191505092915050565b5f6136b5828461367a565b91508190509291505056fea26469706673582212203a11750c4be4ab4a54c8d94f3b77faedc5875e388a137556948ac9a47622f8a764736f6c634300081600330000000000000000000000008ab2ff0116a279a99950c66a12298962d152b83c000000000000000000000000c774c1e17734e03c667d2d57bef7e88767d617fc
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061021a575f3560e01c806378b73e0811610123578063b1547bb9116100ab578063db006a751161007a578063db006a75146106c6578063db7fc9d1146106e2578063dd62ed3e14610700578063e5328e0614610730578063f2fde38b1461074e5761021a565b8063b1547bb914610615578063cec695fa14610645578063d168e12414610678578063d89135cd146106a85761021a565b80638da5cb5b116100f25780638da5cb5b1461057157806395d89b411461058f578063966d0d90146105ad5780639f19d0ee146105c9578063a9059cbb146105e55761021a565b806378b73e08146104d75780637b0472f014610507578063812a0dd4146105235780638da0fc82146105535761021a565b80634ff4fc36116101a657806368a477be1161017557806368a477be146104335780636de813f11461044f57806370a082311461046d578063715018a61461049d578063735441db146104a75761021a565b80634ff4fc361461037057806356f3d197146103a0578063584b62a1146103d05780635a5b21b3146104035761021a565b806323b872dd116101ed57806323b872dd146102a6578063313ce567146102d657806332f26694146102f4578063494f1458146103245780634c8f2a78146103405761021a565b806306fdde031461021e578063095ea7b31461023c578063126640c11461026c57806318160ddd14610288575b5f80fd5b61022661076a565b6040516102339190612b4d565b60405180910390f35b61025660048036038101906102519190612c0b565b6107fa565b6040516102639190612c63565b60405180910390f35b61028660048036038101906102819190612dbc565b61081c565b005b6102906108de565b60405161029d9190612e12565b60405180910390f35b6102c060048036038101906102bb9190612e2b565b6108e7565b6040516102cd9190612c63565b60405180910390f35b6102de610915565b6040516102eb9190612e96565b60405180910390f35b61030e60048036038101906103099190612eaf565b61091d565b60405161031b9190612e12565b60405180910390f35b61033e60048036038101906103399190612dbc565b610936565b005b61035a60048036038101906103559190612eaf565b6109f0565b6040516103679190612e12565b60405180910390f35b61038a60048036038101906103859190612eda565b610a09565b6040516103979190612e12565b60405180910390f35b6103ba60048036038101906103b59190612eda565b610c1a565b6040516103c79190612e12565b60405180910390f35b6103ea60048036038101906103e59190612c0b565b610c63565b6040516103fa9493929190612f05565b60405180910390f35b61041d60048036038101906104189190612eaf565b610ca9565b60405161042a9190612e12565b60405180910390f35b61044d60048036038101906104489190612eaf565b610cc2565b005b610457610cf1565b6040516104649190612e12565b60405180910390f35b61048760048036038101906104829190612eda565b610cf7565b6040516104949190612e12565b60405180910390f35b6104a5610d3d565b005b6104c160048036038101906104bc9190612eaf565b610d50565b6040516104ce9190612e12565b60405180910390f35b6104f160048036038101906104ec9190612eaf565b610d69565b6040516104fe9190612e12565b60405180910390f35b610521600480360381019061051c9190612f48565b610d7e565b005b61053d60048036038101906105389190612eaf565b611075565b60405161054a9190612e12565b60405180910390f35b61055b611089565b6040516105689190612fe1565b60405180910390f35b6105796110ae565b6040516105869190613009565b60405180910390f35b6105976110d5565b6040516105a49190612b4d565b60405180910390f35b6105c760048036038101906105c29190612eda565b611165565b005b6105e360048036038101906105de9190612dbc565b6111b0565b005b6105ff60048036038101906105fa9190612c0b565b611272565b60405161060c9190612c63565b60405180910390f35b61062f600480360381019061062a9190612eaf565b611294565b60405161063c9190612e12565b60405180910390f35b61065f600480360381019061065a9190612c0b565b6112ad565b60405161066f9493929190612f05565b60405180910390f35b610692600480360381019061068d9190612eaf565b6113ba565b60405161069f9190612e12565b60405180910390f35b6106b06113d3565b6040516106bd9190612e12565b60405180910390f35b6106e060048036038101906106db9190612eaf565b6113d9565b005b6106ea6118df565b6040516106f79190613042565b60405180910390f35b61071a6004803603810190610715919061305b565b611903565b6040516107279190612e12565b60405180910390f35b610738611985565b6040516107459190612e12565b60405180910390f35b61076860048036038101906107639190612eda565b61198b565b005b606060058054610779906130c6565b80601f01602080910402602001604051908101604052809291908181526020018280546107a5906130c6565b80156107f05780601f106107c7576101008083540402835291602001916107f0565b820191905f5260205f20905b8154815290600101906020018083116107d357829003601f168201915b5050505050905090565b5f80610804611a0f565b9050610811818585611a16565b600191505092915050565b610824611a28565b6003815114610868576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085f90613140565b60405180910390fd5b610870612a46565b5f5b60038110156108bf5782818151811061088e5761088d61315e565b5b60200260200101518282600381106108a9576108a861315e565b5b6020020181815250508080600101915050610872565b508060109060036108d1929190612a68565b506108da611aaf565b5050565b5f600454905090565b5f806108f1611a0f565b90506108fe858285611b95565b610909858585611c27565b60019150509392505050565b5f6012905090565b600c816003811061092c575f80fd5b015f915090505481565b61093e611a28565b6003815114610982576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097990613140565b60405180910390fd5b61098a612a46565b5f5b60038110156109d9578281815181106109a8576109a761315e565b5b60200260200101518282600381106109c3576109c261315e565b5b602002018181525050808060010191505061098c565b508060199060036109eb929190612a68565b505050565b600981600381106109ff575f80fd5b015f915090505481565b5f805f90505f805b60215f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080549050811015610bdf575f60215f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208281548110610aa957610aa861315e565b5b905f5260205f2090600402016040518060800160405290815f8201548152602001600182015481526020016002820154815260200160038201548152505090505f60095f60038110610afe57610afd61315e565b5b0154826040015103610b275760165f60038110610b1e57610b1d61315e565b5b01549050610ba3565b6009600160038110610b3c57610b3b61315e565b5b0154826040015103610b66576016600160038110610b5d57610b5c61315e565b5b01549050610ba2565b6009600260038110610b7b57610b7a61315e565b5b0154826040015103610ba1576016600260038110610b9c57610b9b61315e565b5b015490505b5b5b80825f0151610bb291906131b8565b85610bbd91906131f9565b9450815f015184610bce91906131f9565b935050508080600101915050610a11565b505f8103610bf1575f92505050610c15565b80670de0b6b3a764000083610c0691906131b8565b610c109190613259565b925050505b919050565b5f60215f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490509050919050565b6021602052815f5260405f208181548110610c7c575f80fd5b905f5260205f2090600402015f9150915050805f0154908060010154908060020154908060030154905084565b60138160038110610cb8575f80fd5b015f915090505481565b610cca611a28565b69d3c21bcecceda100000081610ce091906131b8565b600f81905550610cee611aaf565b50565b600f5481565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610d45611a28565b610d4e5f611d17565b565b60198160038110610d5f575f80fd5b015f915090505481565b601f602052805f5260405f205f915090505481565b610d86611dd8565b60095f60038110610d9a57610d9961315e565b5b0154811480610dbe57506009600160038110610db957610db861315e565b5b015481145b80610dde57506009600260038110610dd957610dd861315e565b5b015481145b610e1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e14906132d3565b60405180910390fd5b601f5f8281526020019081526020015f20548260205f8481526020019081526020015f2054610e4c91906131f9565b1115610e8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e849061333b565b60405180910390fd5b7f0000000000000000000000008ab2ff0116a279a99950c66a12298962d152b83c73ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401610eea93929190613359565b6020604051808303815f875af1158015610f06573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f2a91906133b8565b50610f353383611e27565b8160205f8381526020019081526020015f205f828254610f5591906131f9565b9250508190555081601c5f828254610f6d91906131f9565b925050819055505f610f7f8383611ea6565b905060215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20604051806080016040528085815260200142815260200184815260200183815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015560208201518160010155604082015181600201556060820151816003015550507f114904dab50bbd215f2c536c89c273293da34bd9feda26f2d9eb1ecb053c26d1338484604051611060939291906133e3565b60405180910390a150611071611f56565b5050565b60208052805f5260405f205f915090505481565b601e5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600680546110e4906130c6565b80601f0160208091040260200160405190810160405280929190818152602001828054611110906130c6565b801561115b5780601f106111325761010080835404028352916020019161115b565b820191905f5260205f20905b81548152906001019060200180831161113e57829003601f168201915b5050505050905090565b61116d611a28565b80601e5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6111b8611a28565b60038151146111fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f390613140565b60405180910390fd5b611204612a46565b5f5b6003811015611253578281815181106112225761122161315e565b5b602002602001015182826003811061123d5761123c61315e565b5b6020020181815250508080600101915050611206565b50806016906003611265929190612a68565b5061126e611f5f565b5050565b5f8061127c611a0f565b9050611289818585611c27565b600191505092915050565b601081600381106112a3575f80fd5b015f915090505481565b5f805f80858560215f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490508110611335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132c90613488565b60405180910390fd5b5f60215f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2088815481106113855761138461315e565b5b905f5260205f2090600402019050805f0154816001015482600201548360030154965096509650965050505092959194509250565b601681600381106113c9575f80fd5b015f915090505481565b601d5481565b338160215f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080549050811061145d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145490613488565b60405180910390fd5b611465611dd8565b5f60215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2084815481106114b5576114b461315e565b5b905f5260205f2090600402016040518060800160405290815f8201548152602001600182015481526020016002820154815260200160038201548152505090506115033330835f0151611c27565b62278d00816040015161151691906131b8565b816020015161152591906131f9565b4210611700575f816060015190507f0000000000000000000000008ab2ff0116a279a99950c66a12298962d152b83c73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33845f01516040518363ffffffff1660e01b81526004016115919291906134a6565b6020604051808303815f875af11580156115ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115d191906133b8565b505f60038360400151146115fa5760068360400151146115f25760026115f5565b60015b6115fc565b5f5b60ff16905081601382600381106116165761161561315e565b5b015f82825461162591906131f9565b92505081905550601e5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b4d6834e33846040518363ffffffff1660e01b81526004016116889291906134a6565b5f604051808303815f87803b15801561169f575f80fd5b505af11580156116b1573d5f803e3d5ffd5b505050507f033ed6092457257c5293f48ad745da86d54ecf3c1647a9e8830bc954ee03c35433845f01518486604001516040516116f194939291906134cd565b60405180910390a150506118a0565b5f6003826040015114611728576006826040015114611720576002611723565b60015b61172a565b5f5b60ff1690505f6064601983600381106117465761174561315e565b5b0154845f015161175691906131b8565b6117609190613259565b905080601d5f82825461177391906131f9565b925050819055506117d33382855f015161178d9190613510565b7f0000000000000000000000008ab2ff0116a279a99950c66a12298962d152b83c73ffffffffffffffffffffffffffffffffffffffff166120c39092919063ffffffff16565b7f0000000000000000000000008ab2ff0116a279a99950c66a12298962d152b83c73ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b815260040161182c9190612e12565b5f604051808303815f87803b158015611843575f80fd5b505af1158015611855573d5f803e3d5ffd5b505050507ffa257c2db5c9e9b6783c394ef6cb1cb158205bc91281442718371479cc78f1f633845f015183866040015160405161189594939291906134cd565b60405180910390a150505b6118ad30825f0151612142565b6118b6846121c1565b805f0151601c5f8282546118ca9190613510565b92505081905550506118da611f56565b505050565b7f0000000000000000000000008ab2ff0116a279a99950c66a12298962d152b83c81565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b601c5481565b611993611a28565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a03575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016119fa9190613009565b60405180910390fd5b611a0c81611d17565b50565b5f33905090565b611a238383836001612417565b505050565b611a30611a0f565b73ffffffffffffffffffffffffffffffffffffffff16611a4e6110ae565b73ffffffffffffffffffffffffffffffffffffffff1614611aad57611a71611a0f565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611aa49190613009565b60405180910390fd5b565b606460105f60038110611ac557611ac461315e565b5b0154600f54611ad491906131b8565b611ade9190613259565b600c5f60038110611af257611af161315e565b5b018190555060646010600160038110611b0e57611b0d61315e565b5b0154600f54611b1d91906131b8565b611b279190613259565b600c600160038110611b3c57611b3b61315e565b5b018190555060646010600260038110611b5857611b5761315e565b5b0154600f54611b6791906131b8565b611b719190613259565b600c600260038110611b8657611b8561315e565b5b0181905550611b93611f5f565b565b5f611ba08484611903565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611c215781811015611c12578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401611c09939291906133e3565b60405180910390fd5b611c2084848484035f612417565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611c97575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401611c8e9190613009565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611d07575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401611cfe9190613009565b60405180910390fd5b611d128383836125e6565b505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600260015403611e1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e149061358d565b60405180910390fd5b6002600181905550565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611e97575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401611e8e9190613009565b60405180910390fd5b611ea25f83836125e6565b5050565b5f8060095f60038110611ebc57611ebb61315e565b5b01548314611ef0576009600160038110611ed957611ed861315e565b5b01548314611ee8576002611eeb565b60015b611ef2565b5f5b60ff1690505f83600c611f059190613259565b606460168460038110611f1b57611f1a61315e565b5b0154611f2791906131b8565b611f319190613259565b90506127108186611f4291906131b8565b611f4c9190613259565b9250505092915050565b60018081905550565b6004606460165f60038110611f7757611f7661315e565b5b0154600c5f60038110611f8d57611f8c61315e565b5b0154611f999190613259565b611fa391906131b8565b611fad91906131b8565b601f5f60095f60038110611fc457611fc361315e565b5b015481526020019081526020015f2081905550600260646016600160038110611ff057611fef61315e565b5b0154600c6001600381106120075761200661315e565b5b01546120139190613259565b61201d91906131b8565b61202791906131b8565b601f5f600960016003811061203f5761203e61315e565b5b015481526020019081526020015f2081905550606460166002600381106120695761206861315e565b5b0154600c6002600381106120805761207f61315e565b5b015461208c9190613259565b61209691906131b8565b601f5f60096002600381106120ae576120ad61315e565b5b015481526020019081526020015f2081905550565b61213d838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016120f69291906134a6565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612802565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036121b2575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016121a99190613009565b60405180910390fd5b6121bd825f836125e6565b5050565b60215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490508110612243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223a9061361b565b60405180910390fd5b5f8190505b600160215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805490506122959190613510565b8110156123945760215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001826122e691906131f9565b815481106122f7576122f661315e565b5b905f5260205f20906004020160215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2082815481106123525761235161315e565b5b905f5260205f2090600402015f820154815f01556001820154816001015560028201548160020155600382015481600301559050508080600101915050612248565b5060215f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806123e2576123e1613639565b5b600190038181905f5260205f2090600402015f8082015f9055600182015f9055600282015f9055600382015f90555050905550565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612487575f6040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161247e9190613009565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036124f7575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016124ee9190613009565b60405180910390fd5b8160035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555080156125e0578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516125d79190612e12565b60405180910390a35b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612636578060045f82825461262a91906131f9565b92505081905550612706565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156126c0578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016126b7939291906133e3565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361274d578060045f8282540392505081905550612798565b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516127f59190612e12565b60405180910390a3505050565b5f61282c828473ffffffffffffffffffffffffffffffffffffffff1661289790919063ffffffff16565b90505f81511415801561285057508080602001905181019061284e91906133b8565b155b1561289257826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016128899190613009565b60405180910390fd5b505050565b60606128a483835f6128ac565b905092915050565b6060814710156128f357306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016128ea9190613009565b60405180910390fd5b5f808573ffffffffffffffffffffffffffffffffffffffff16848660405161291b91906136aa565b5f6040518083038185875af1925050503d805f8114612955576040519150601f19603f3d011682016040523d82523d5f602084013e61295a565b606091505b509150915061296a868383612975565b925050509392505050565b60608261298a5761298582612a02565b6129fa565b5f82511480156129b057505f8473ffffffffffffffffffffffffffffffffffffffff163b145b156129f257836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016129e99190613009565b60405180910390fd5b8190506129fb565b5b9392505050565b5f81511115612a145780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060600160405280600390602082028036833780820191505090505090565b8260038101928215612a97579160200282015b82811115612a96578251825591602001919060010190612a7b565b5b509050612aa49190612aa8565b5090565b5b80821115612abf575f815f905550600101612aa9565b5090565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612afa578082015181840152602081019050612adf565b5f8484015250505050565b5f601f19601f8301169050919050565b5f612b1f82612ac3565b612b298185612acd565b9350612b39818560208601612add565b612b4281612b05565b840191505092915050565b5f6020820190508181035f830152612b658184612b15565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612ba782612b7e565b9050919050565b612bb781612b9d565b8114612bc1575f80fd5b50565b5f81359050612bd281612bae565b92915050565b5f819050919050565b612bea81612bd8565b8114612bf4575f80fd5b50565b5f81359050612c0581612be1565b92915050565b5f8060408385031215612c2157612c20612b76565b5b5f612c2e85828601612bc4565b9250506020612c3f85828601612bf7565b9150509250929050565b5f8115159050919050565b612c5d81612c49565b82525050565b5f602082019050612c765f830184612c54565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612cb682612b05565b810181811067ffffffffffffffff82111715612cd557612cd4612c80565b5b80604052505050565b5f612ce7612b6d565b9050612cf38282612cad565b919050565b5f67ffffffffffffffff821115612d1257612d11612c80565b5b602082029050602081019050919050565b5f80fd5b5f612d39612d3484612cf8565b612cde565b90508083825260208201905060208402830185811115612d5c57612d5b612d23565b5b835b81811015612d855780612d718882612bf7565b845260208401935050602081019050612d5e565b5050509392505050565b5f82601f830112612da357612da2612c7c565b5b8135612db3848260208601612d27565b91505092915050565b5f60208284031215612dd157612dd0612b76565b5b5f82013567ffffffffffffffff811115612dee57612ded612b7a565b5b612dfa84828501612d8f565b91505092915050565b612e0c81612bd8565b82525050565b5f602082019050612e255f830184612e03565b92915050565b5f805f60608486031215612e4257612e41612b76565b5b5f612e4f86828701612bc4565b9350506020612e6086828701612bc4565b9250506040612e7186828701612bf7565b9150509250925092565b5f60ff82169050919050565b612e9081612e7b565b82525050565b5f602082019050612ea95f830184612e87565b92915050565b5f60208284031215612ec457612ec3612b76565b5b5f612ed184828501612bf7565b91505092915050565b5f60208284031215612eef57612eee612b76565b5b5f612efc84828501612bc4565b91505092915050565b5f608082019050612f185f830187612e03565b612f256020830186612e03565b612f326040830185612e03565b612f3f6060830184612e03565b95945050505050565b5f8060408385031215612f5e57612f5d612b76565b5b5f612f6b85828601612bf7565b9250506020612f7c85828601612bf7565b9150509250929050565b5f819050919050565b5f612fa9612fa4612f9f84612b7e565b612f86565b612b7e565b9050919050565b5f612fba82612f8f565b9050919050565b5f612fcb82612fb0565b9050919050565b612fdb81612fc1565b82525050565b5f602082019050612ff45f830184612fd2565b92915050565b61300381612b9d565b82525050565b5f60208201905061301c5f830184612ffa565b92915050565b5f61302c82612fb0565b9050919050565b61303c81613022565b82525050565b5f6020820190506130555f830184613033565b92915050565b5f806040838503121561307157613070612b76565b5b5f61307e85828601612bc4565b925050602061308f85828601612bc4565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806130dd57607f821691505b6020821081036130f0576130ef613099565b5b50919050565b7f496e76616c6964206172726179206c656e6774680000000000000000000000005f82015250565b5f61312a601483612acd565b9150613135826130f6565b602082019050919050565b5f6020820190508181035f8301526131578161311e565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6131c282612bd8565b91506131cd83612bd8565b92508282026131db81612bd8565b915082820484148315176131f2576131f161318b565b5b5092915050565b5f61320382612bd8565b915061320e83612bd8565b92508282019050808211156132265761322561318b565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61326382612bd8565b915061326e83612bd8565b92508261327e5761327d61322c565b5b828204905092915050565b7f496e76616c6964206c6f636b20706572696f64000000000000000000000000005f82015250565b5f6132bd601383612acd565b91506132c882613289565b602082019050919050565b5f6020820190508181035f8301526132ea816132b1565b9050919050565b7f5374616b696e6720616d6f756e742065786365656473206c696d6974000000005f82015250565b5f613325601c83612acd565b9150613330826132f1565b602082019050919050565b5f6020820190508181035f83015261335281613319565b9050919050565b5f60608201905061336c5f830186612ffa565b6133796020830185612ffa565b6133866040830184612e03565b949350505050565b61339781612c49565b81146133a1575f80fd5b50565b5f815190506133b28161338e565b92915050565b5f602082840312156133cd576133cc612b76565b5b5f6133da848285016133a4565b91505092915050565b5f6060820190506133f65f830186612ffa565b6134036020830185612e03565b6134106040830184612e03565b949350505050565b7f76616c69646174655374616b653a207374616b6520656e74727920646f6573205f8201527f6e6f742065786973740000000000000000000000000000000000000000000000602082015250565b5f613472602983612acd565b915061347d82613418565b604082019050919050565b5f6020820190508181035f83015261349f81613466565b9050919050565b5f6040820190506134b95f830185612ffa565b6134c66020830184612e03565b9392505050565b5f6080820190506134e05f830187612ffa565b6134ed6020830186612e03565b6134fa6040830185612e03565b6135076060830184612e03565b95945050505050565b5f61351a82612bd8565b915061352583612bd8565b925082820390508181111561353d5761353c61318b565b5b92915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f613577601f83612acd565b915061358282613543565b602082019050919050565b5f6020820190508181035f8301526135a48161356b565b9050919050565b7f64656c6574655374616b65456e7472793a20496e646578206f7574206f6620625f8201527f6f756e6473000000000000000000000000000000000000000000000000000000602082015250565b5f613605602583612acd565b9150613610826135ab565b604082019050919050565b5f6020820190508181035f830152613632816135f9565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b5f81519050919050565b5f81905092915050565b5f61368482613666565b61368e8185613670565b935061369e818560208601612add565b80840191505092915050565b5f6136b5828461367a565b91508190509291505056fea26469706673582212203a11750c4be4ab4a54c8d94f3b77faedc5875e388a137556948ac9a47622f8a764736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008ab2ff0116a279a99950c66a12298962d152b83c000000000000000000000000c774c1e17734e03c667d2d57bef7e88767d617fc
-----Decoded View---------------
Arg [0] : _ordsToken (address): 0x8AB2ff0116A279a99950C66A12298962D152B83c
Arg [1] : _rewardBankAddress (address): 0xC774c1e17734e03C667D2d57BEF7e88767d617Fc
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000008ab2ff0116a279a99950c66a12298962d152b83c
Arg [1] : 000000000000000000000000c774c1e17734e03c667d2d57bef7e88767d617fc
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.