Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Dcult
Compiler Version
v0.8.2+commit.661d1103
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; contract Dcult is Initializable, UUPSUpgradeable, ERC20Upgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, OwnableUpgradeable, PausableUpgradeable { using SafeMathUpgradeable for uint256; using SafeERC20Upgradeable for IERC20Upgradeable; IERC20Upgradeable public cult; //highest staked users struct HighestAstaStaker { uint256 deposited; address addr; } mapping(uint256 => HighestAstaStaker[]) public highestStakerInPool; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 rewardCULTDebt; // Reward debt in CULT. // // We do some fancy math here. Basically, any point in time, the amount of CULT // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accCULTPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accCULTPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives the pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { IERC20Upgradeable lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. CULTs to distribute per block. uint256 lastRewardBlock; // Last block number that CULTs distribution occurs. uint256 accCULTPerShare; // Accumulated CULTs per share, times 1e12. See below. uint256 lastTotalCULTReward; // last total rewards uint256 lastCULTRewardBalance; // last CULT rewards tokens uint256 totalCULTReward; // total CULT rewards tokens } // The CULT TOKEN! IERC20Upgradeable public CULT; // admin address. address public adminAddress; // Bonus muliplier for early CULT makers. uint256 public constant BONUS_MULTIPLIER = 1; // Number of top staker stored uint256 public topStakerNumber; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping (uint256 => mapping (address => UserInfo)) public userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint; // The block number when reward distribution start. uint256 public startBlock; // total CULT staked uint256 public totalCULTStaked; // total CULT used for purchase land uint256 public totalCultUsedForPurchase; event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); event AdminUpdated(address newAdmin); function initialize( IERC20Upgradeable _cult, address _adminAddress, uint256 _startBlock, uint256 _topStakerNumber ) public initializer { require(_adminAddress != address(0), "initialize: Zero address"); OwnableUpgradeable.__Ownable_init(); __ERC20_init_unchained("dCULT", "dCULT"); __Pausable_init_unchained(); ERC20PermitUpgradeable.__ERC20Permit_init("dCULT"); ERC20VotesUpgradeable.__ERC20Votes_init_unchained(); CULT = _cult; adminAddress = _adminAddress; startBlock = _startBlock; topStakerNumber = _topStakerNumber; } function poolLength() external view returns (uint256) { return poolInfo.length; } // Add a new lp to the pool. Can only be called by the owner. // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. function add(uint256 _allocPoint, IERC20Upgradeable _lpToken, bool _withUpdate) public onlyOwner { if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; totalAllocPoint = totalAllocPoint.add(_allocPoint); poolInfo.push(PoolInfo({ lpToken: _lpToken, allocPoint: _allocPoint, lastRewardBlock: lastRewardBlock, accCULTPerShare: 0, lastTotalCULTReward: 0, lastCULTRewardBalance: 0, totalCULTReward: 0 })); } // Update the given pool's CULT allocation point. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner { if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint); poolInfo[_pid].allocPoint = _allocPoint; } // Return reward multiplier over the given _from to _to block. function getMultiplier(uint256 _from, uint256 _to) public pure returns (uint256) { if (_to >= _from) { return _to.sub(_from).mul(BONUS_MULTIPLIER); } else { return _from.sub(_to); } } // View function to see pending CULTs on frontend. function pendingCULT(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accCULTPerShare = pool.accCULTPerShare; uint256 lpSupply = totalCULTStaked; if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint256 rewardBalance = pool.lpToken.balanceOf(address(this)).sub(totalCULTStaked.sub(totalCultUsedForPurchase)); uint256 _totalReward = rewardBalance.sub(pool.lastCULTRewardBalance); accCULTPerShare = accCULTPerShare.add(_totalReward.mul(1e12).div(lpSupply)); } return user.amount.mul(accCULTPerShare).div(1e12).sub(user.rewardCULTDebt); } // Update reward variables for all pools. Be careful of gas spending! function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; if (block.number <= pool.lastRewardBlock) { return; } uint256 rewardBalance = pool.lpToken.balanceOf(address(this)).sub(totalCULTStaked.sub(totalCultUsedForPurchase)); uint256 _totalReward = pool.totalCULTReward.add(rewardBalance.sub(pool.lastCULTRewardBalance)); pool.lastCULTRewardBalance = rewardBalance; pool.totalCULTReward = _totalReward; uint256 lpSupply = totalCULTStaked; if (lpSupply == 0) { pool.lastRewardBlock = block.number; pool.accCULTPerShare = 0; pool.lastTotalCULTReward = 0; user.rewardCULTDebt = 0; pool.lastCULTRewardBalance = 0; pool.totalCULTReward = 0; return; } uint256 reward = _totalReward.sub(pool.lastTotalCULTReward); pool.accCULTPerShare = pool.accCULTPerShare.add(reward.mul(1e12).div(lpSupply)); pool.lastTotalCULTReward = _totalReward; } /** @notice Sorting the highest CULT staker in pool @param _pid : pool id @param left : left @param right : right @dev Description : It is used for sorting the highest CULT staker in pool. This function definition is marked "internal" because this function is called only from inside the contract. */ function quickSort( uint256 _pid, uint256 left, uint256 right ) internal { HighestAstaStaker[] storage arr = highestStakerInPool[_pid]; if (left >= right) return; uint256 divtwo = 2; uint256 p = arr[(left + right) / divtwo].deposited; // p = the pivot element uint256 i = left; uint256 j = right; while (i < j) { // HighestAstaStaker memory a; // HighestAstaStaker memory b; while (arr[i].deposited < p) ++i; while (arr[j].deposited > p) --j; // arr[j] > p means p still to the left, so j > 0 if (arr[i].deposited > arr[j].deposited) { (arr[i].deposited, arr[j].deposited) = ( arr[j].deposited, arr[i].deposited ); (arr[i].addr, arr[j].addr) = (arr[j].addr, arr[i].addr); } else ++i; } // Note --j was only done when a[j] > p. So we know: a[j] == p, a[<j] <= p, a[>j] > p if (j > left) quickSort(_pid, left, j - 1); // j > left, so j > 0 quickSort(_pid, j + 1, right); } /** @notice store Highest 50 staked users @param _pid : pool id @param _amount : amount @dev Description : DAO governance will be performed by the top 50 wallets with the highest amount of staked CULT tokens. */ function addHighestStakedUser( uint256 _pid, uint256 _amount, address user ) private { uint256 i; // Getting the array of Highest staker as per pool id. HighestAstaStaker[] storage highestStaker = highestStakerInPool[_pid]; //for loop to check if the staking address exist in array for (i = 0; i < highestStaker.length; i++) { if (highestStaker[i].addr == user) { highestStaker[i].deposited = _amount; // Called the function for sorting the array in ascending order. quickSort(_pid, 0, highestStaker.length - 1); return; } } if (highestStaker.length < topStakerNumber) { // Here if length of highest staker is less than 100 than we just push the object into array. highestStaker.push(HighestAstaStaker(_amount, user)); } else { // Otherwise we check the last staker amount in the array with new one. if (highestStaker[0].deposited < _amount) { // If the last staker deposited amount is less than new then we put the greater one in the array. highestStaker[0].deposited = _amount; highestStaker[0].addr = user; } } // Called the function for sorting the array in ascending order. quickSort(_pid, 0, highestStaker.length - 1); } /** @notice CULT staking track the Highest 50 staked users @param _pid : pool id @param user : user address @dev Description : DAO governance will be performed by the top 50 wallets with the highest amount of staked CULT tokens. */ function checkHighestStaker(uint256 _pid, address user) public view returns (bool) { HighestAstaStaker[] storage highestStaker = highestStakerInPool[_pid]; uint256 i = 0; // Applied the loop to check the user in the highest staker list. for (i; i < highestStaker.length; i++) { if (highestStaker[i].addr == user) { // If user is exists in the list then we return true otherwise false. return true; } } } // Deposit CULT tokens to MasterChef. function deposit(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); if (user.amount > 0) { uint256 cultReward = user.amount.mul(pool.accCULTPerShare).div(1e12).sub(user.rewardCULTDebt); pool.lpToken.safeTransfer(msg.sender, cultReward); pool.lastCULTRewardBalance = pool.lpToken.balanceOf(address(this)).sub(totalCULTStaked.sub(totalCultUsedForPurchase)); } pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount); totalCULTStaked = totalCULTStaked.add(_amount); user.amount = user.amount.add(_amount); user.rewardCULTDebt = user.amount.mul(pool.accCULTPerShare).div(1e12); addHighestStakedUser(_pid, user.amount, msg.sender); _mint(msg.sender,_amount); emit Deposit(msg.sender, _pid, _amount); } function withdraw(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 cultReward = user.amount.mul(pool.accCULTPerShare).div(1e12).sub(user.rewardCULTDebt); pool.lpToken.safeTransfer(msg.sender, cultReward); pool.lastCULTRewardBalance = pool.lpToken.balanceOf(address(this)).sub(totalCULTStaked.sub(totalCultUsedForPurchase)); user.amount = user.amount.sub(_amount); totalCULTStaked = totalCULTStaked.sub(_amount); user.rewardCULTDebt = user.amount.mul(pool.accCULTPerShare).div(1e12); pool.lpToken.safeTransfer(address(msg.sender), _amount); removeHighestStakedUser(_pid, user.amount, msg.sender); _burn(msg.sender,_amount); emit Withdraw(msg.sender, _pid, _amount); } // Update the staker details in case of withdrawal function removeHighestStakedUser(uint256 _pid, uint256 _amount, address user) private { // Getting Highest staker list as per the pool id HighestAstaStaker[] storage highestStaker = highestStakerInPool[_pid]; // Applied this loop is just to find the staker for (uint256 i = 0; i < highestStaker.length; i++) { if (highestStaker[i].addr == user) { // Deleting the staker from the array. delete highestStaker[i]; if(_amount > 0) { // If amount is greater than 0 than we need to add this again in the highest staker list. addHighestStakedUser(_pid, _amount, user); } return; } } } // Earn CULT tokens to MasterChef. function claimCULT(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); uint256 cultReward = user.amount.mul(pool.accCULTPerShare).div(1e12).sub(user.rewardCULTDebt); pool.lpToken.safeTransfer(msg.sender, cultReward); pool.lastCULTRewardBalance = pool.lpToken.balanceOf(address(this)).sub(totalCULTStaked.sub(totalCultUsedForPurchase)); user.rewardCULTDebt = user.amount.mul(pool.accCULTPerShare).div(1e12); } // Safe CULT transfer function to admin. function accessCULTTokens(uint256 _pid, address _to, uint256 _amount) public { require(msg.sender == adminAddress, "sender must be admin address"); require(totalCULTStaked.sub(totalCultUsedForPurchase) >= _amount, "Amount must be less than staked CULT amount"); PoolInfo storage pool = poolInfo[_pid]; uint256 CultBal = pool.lpToken.balanceOf(address(this)); if (_amount > CultBal) { pool.lpToken.transfer(_to, CultBal); totalCultUsedForPurchase = totalCultUsedForPurchase.add(CultBal); emit EmergencyWithdraw(_to, _pid, CultBal); } else { pool.lpToken.transfer(_to, _amount); totalCultUsedForPurchase = totalCultUsedForPurchase.add(_amount); emit EmergencyWithdraw(_to, _pid, _amount); } } // Update admin address by the previous admin. function admin(address _adminAddress) public { require(_adminAddress != address(0), "admin: Zero address"); require(msg.sender == adminAddress, "admin: wut?"); adminAddress = _adminAddress; emit AdminUpdated(_adminAddress); } function _mint(address to, uint256 amount) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) { super._mint(to, amount); } function _burn(address account, uint256 amount) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) { super._burn(account, amount); } function _afterTokenTransfer(address from, address to, uint256 amount) internal override(ERC20Upgradeable, ERC20VotesUpgradeable) { ERC20VotesUpgradeable._afterTokenTransfer(from, to, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { if(from == address(0) || to == address(0)){ super._beforeTokenTransfer(from, to, amount); }else{ revert("Non transferable token"); } } function _delegate(address delegator, address delegatee) internal virtual override { require(!checkHighestStaker(0, delegator),"Top staker cannot delegate"); super._delegate(delegator,delegatee); } function _authorizeUpgrade(address) internal view override { require(owner() == msg.sender, "Only owner can upgrade implementation"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { __ERC1967Upgrade_init_unchained(); __UUPSUpgradeable_init_unchained(); } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../proxy/utils/Initializable.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}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * 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. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __Context_init_unchained(); __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override 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 value {ERC20} uses, unless this function is * 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 override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); 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}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * 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. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` 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. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} uint256[45] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-ERC20Permit.sol) pragma solidity ^0.8.0; import "./draft-IERC20PermitUpgradeable.sol"; import "../ERC20Upgradeable.sol"; import "../../../utils/cryptography/draft-EIP712Upgradeable.sol"; import "../../../utils/cryptography/ECDSAUpgradeable.sol"; import "../../../utils/CountersUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev Implementation 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. * * _Available since v3.4._ */ abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; mapping(address => CountersUpgradeable.Counter) private _nonces; // solhint-disable-next-line var-name-mixedcase bytes32 private _PERMIT_TYPEHASH; /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ function __ERC20Permit_init(string memory name) internal onlyInitializing { __Context_init_unchained(); __EIP712_init_unchained(name, "1"); __ERC20Permit_init_unchained(name); } function __ERC20Permit_init_unchained(string memory name) internal onlyInitializing { _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");} /** * @dev See {IERC20Permit-permit}. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSAUpgradeable.recover(hash, v, r, s); require(signer == owner, "ERC20Permit: invalid signature"); _approve(owner, spender, value); } /** * @dev See {IERC20Permit-nonces}. */ function nonces(address owner) public view virtual override returns (uint256) { return _nonces[owner].current(); } /** * @dev See {IERC20Permit-DOMAIN_SEPARATOR}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view override returns (bytes32) { return _domainSeparatorV4(); } /** * @dev "Consume a nonce": return the current value and increment. * * _Available since v4.1._ */ function _useNonce(address owner) internal virtual returns (uint256 current) { CountersUpgradeable.Counter storage nonce = _nonces[owner]; current = nonce.current(); nonce.increment(); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.0; import "./draft-ERC20PermitUpgradeable.sol"; import "../../../utils/math/MathUpgradeable.sol"; import "../../../utils/math/SafeCastUpgradeable.sol"; import "../../../utils/cryptography/ECDSAUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1. * * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module. * * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting * power can be queried through the public accessors {getVotes} and {getPastVotes}. * * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this * will significantly increase the base gas cost of transfers. * * _Available since v4.2._ */ abstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable { function __ERC20Votes_init_unchained() internal onlyInitializing { } struct Checkpoint { uint32 fromBlock; uint224 votes; } bytes32 private constant _DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); mapping(address => address) private _delegates; mapping(address => Checkpoint[]) private _checkpoints; Checkpoint[] private _totalSupplyCheckpoints; /** * @dev Emitted when an account changes their delegate. */ event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /** * @dev Emitted when a token transfer or delegate change results in changes to an account's voting power. */ event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); /** * @dev Get the `pos`-th checkpoint for `account`. */ function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) { return _checkpoints[account][pos]; } /** * @dev Get number of checkpoints for `account`. */ function numCheckpoints(address account) public view virtual returns (uint32) { return SafeCastUpgradeable.toUint32(_checkpoints[account].length); } /** * @dev Get the address `account` is currently delegating to. */ function delegates(address account) public view virtual returns (address) { return _delegates[account]; } /** * @dev Gets the current votes balance for `account` */ function getVotes(address account) public view returns (uint256) { uint256 pos = _checkpoints[account].length; return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes; } /** * @dev Retrieve the number of votes for `account` at the end of `blockNumber`. * * Requirements: * * - `blockNumber` must have been already mined */ function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) { require(blockNumber < block.number, "ERC20Votes: block not yet mined"); return _checkpointsLookup(_checkpoints[account], blockNumber); } /** * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. * It is but NOT the sum of all the delegated votes! * * Requirements: * * - `blockNumber` must have been already mined */ function getPastTotalSupply(uint256 blockNumber) public view returns (uint256) { require(blockNumber < block.number, "ERC20Votes: block not yet mined"); return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber); } /** * @dev Lookup a value in a list of (sorted) checkpoints. */ function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) { // We run a binary search to look for the earliest checkpoint taken after `blockNumber`. // // During the loop, the index of the wanted checkpoint remains in the range [low-1, high). // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. // - If the middle checkpoint is after `blockNumber`, we look in [low, mid) // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high) // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not // out of bounds (in which case we're looking too far in the past and the result is 0). // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out // the same. uint256 high = ckpts.length; uint256 low = 0; while (low < high) { uint256 mid = MathUpgradeable.average(low, high); if (ckpts[mid].fromBlock > blockNumber) { high = mid; } else { low = mid + 1; } } return high == 0 ? 0 : ckpts[high - 1].votes; } /** * @dev Delegate votes from the sender to `delegatee`. */ function delegate(address delegatee) public virtual { _delegate(_msgSender(), delegatee); } /** * @dev Delegates votes from signer to `delegatee` */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) public virtual { require(block.timestamp <= expiry, "ERC20Votes: signature expired"); address signer = ECDSAUpgradeable.recover( _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), v, r, s ); require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce"); _delegate(signer, delegatee); } /** * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1). */ function _maxSupply() internal view virtual returns (uint224) { return type(uint224).max; } /** * @dev Snapshots the totalSupply after it has been increased. */ function _mint(address account, uint256 amount) internal virtual override { super._mint(account, amount); require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes"); _writeCheckpoint(_totalSupplyCheckpoints, _add, amount); } /** * @dev Snapshots the totalSupply after it has been decreased. */ function _burn(address account, uint256 amount) internal virtual override { super._burn(account, amount); _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount); } /** * @dev Move voting power when tokens are transferred. * * Emits a {DelegateVotesChanged} event. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._afterTokenTransfer(from, to, amount); _moveVotingPower(delegates(from), delegates(to), amount); } /** * @dev Change delegation for `delegator` to `delegatee`. * * Emits events {DelegateChanged} and {DelegateVotesChanged}. */ function _delegate(address delegator, address delegatee) internal virtual { address currentDelegate = delegates(delegator); uint256 delegatorBalance = balanceOf(delegator); _delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveVotingPower(currentDelegate, delegatee, delegatorBalance); } function _moveVotingPower( address src, address dst, uint256 amount ) private { if (src != dst && amount > 0) { if (src != address(0)) { (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount); emit DelegateVotesChanged(src, oldWeight, newWeight); } if (dst != address(0)) { (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount); emit DelegateVotesChanged(dst, oldWeight, newWeight); } } } function _writeCheckpoint( Checkpoint[] storage ckpts, function(uint256, uint256) view returns (uint256) op, uint256 delta ) private returns (uint256 oldWeight, uint256 newWeight) { uint256 pos = ckpts.length; oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes; newWeight = op(oldWeight, delta); if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) { ckpts[pos - 1].votes = SafeCastUpgradeable.toUint224(newWeight); } else { ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(block.number), votes: SafeCastUpgradeable.toUint224(newWeight)})); } } function _add(uint256 a, uint256 b) private pure returns (uint256) { return a + b; } function _subtract(uint256 a, uint256 b) private pure returns (uint256) { return a - b; } uint256[47] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @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(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 SafeMathUpgradeable { /** * @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 substraction 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 v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { __ERC1967Upgrade_init_unchained(); } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure( address newImplementation, bytes memory data, bool forceCall ) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; _functionDelegateCall( newImplementation, abi.encodeWithSignature("upgradeTo(address)", oldImplementation) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _upgradeTo(newImplementation); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { __Context_init_unchained(); } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20PermitUpgradeable { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSAUpgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712Upgradeable is Initializable { /* solhint-disable var-name-mixedcase */ bytes32 private _HASHED_NAME; bytes32 private _HASHED_VERSION; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ function __EIP712_init(string memory name, string memory version) internal onlyInitializing { __EIP712_init_unchained(name, version); } function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash()); } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev The hash of the name parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712NameHash() internal virtual view returns (bytes32) { return _HASHED_NAME; } /** * @dev The hash of the version parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712VersionHash() internal virtual view returns (bytes32) { return _HASHED_VERSION; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../StringsUpgradeable.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSAUpgradeable { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { /** * @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 up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) pragma solidity ^0.8.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCastUpgradeable { /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); return uint224(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); return uint128(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); return uint96(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); return uint64(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); return uint32(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { require(value >= 0, "SafeCast: value must be positive"); return uint256(value); } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits"); return int128(value); } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits"); return int64(value); } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits"); return int32(value); } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits"); return int16(value); } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits"); return int8(value); } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); return int256(value); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminUpdated","type":"event"},{"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":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CULT","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"accessCULTTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20Upgradeable","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"}],"name":"admin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"amount","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":"_pid","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"checkHighestStaker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint32","name":"pos","type":"uint32"}],"name":"checkpoints","outputs":[{"components":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint224","name":"votes","type":"uint224"}],"internalType":"struct ERC20VotesUpgradeable.Checkpoint","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"claimCULT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cult","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"highestStakerInPool","outputs":[{"internalType":"uint256","name":"deposited","type":"uint256"},{"internalType":"address","name":"addr","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"_cult","type":"address"},{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_topStakerNumber","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingCULT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20Upgradeable","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accCULTPerShare","type":"uint256"},{"internalType":"uint256","name":"lastTotalCULTReward","type":"uint256"},{"internalType":"uint256","name":"lastCULTRewardBalance","type":"uint256"},{"internalType":"uint256","name":"totalCULTReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"topStakerNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalCULTStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalCultUsedForPurchase","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":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","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":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"rewardCULTDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523060601b60805234801561001757600080fd5b5060805160601c614d4761004b60003960008181610fdf0152818161101f0152818161130a015261134a0152614d476000f3fe6080604052600436106103355760003560e01c80636f10947c116101ab578063a1bd8105116100f7578063e2bbb15811610095578063f2fde38b1161006f578063f2fde38b14610a26578063f9dea75b14610a46578063fc6f946814610a66578063ff793c2514610a8757610335565b8063e2bbb1581461099c578063eb990c59146109bc578063f1127ed8146109dc57610335565b8063c3cda520116100d1578063c3cda520146108f6578063d505accf14610916578063dc3cc64514610936578063dd62ed3e1461095657610335565b8063a1bd810514610895578063a457c2d7146108b6578063a9059cbb146108d657610335565b80638aa28550116101645780638e539e8c1161013e5780638e539e8c146107dd57806393f1a40b146107fd57806395d89b41146108605780639ab24eb01461087557610335565b80638aa28550146107895780638da5cb5b1461079e5780638dbb1e3a146107bd57610335565b80636f10947c146106b15780636fcfff45146106c857806370a08231146106fd57806370ab41ad14610733578063715018a6146107545780637ecebe001461076957610335565b80633950935111610285578063587cde1e11610223578063630b5ba1116101fd578063630b5ba11461063c57806363a846f81461065157806364482f79146106715780636e2e2d731461069157610335565b8063587cde1e146105cb5780635c19a95c146106035780635c975abb1461062357610335565b806348cd4cb11161025f57806348cd4cb11461056a5780634f0ba4e6146105815780634f1ef2861461059857806351eb05a6146105ab57610335565b8063395093511461050a5780633a46b1a81461052a578063441a3e701461054a57610335565b80631a504af3116102f25780632a36a42f116102cc5780632a36a42f146104a2578063313ce567146104b95780633644e515146104d55780633659cfe6146104ea57610335565b80631a504af3146104405780631eaaa0451461046257806323b872dd1461048257610335565b806306fdde031461033a578063081e3eda14610365578063095ea7b3146103855780631526fe27146103b557806317caf6f11461041457806318160ddd1461042b575b600080fd5b34801561034657600080fd5b5061034f610ac4565b60405161035c9190614a4f565b60405180910390f35b34801561037157600080fd5b506101cb545b60405190815260200161035c565b34801561039157600080fd5b506103a56103a0366004614810565b610b56565b604051901515815260200161035c565b3480156103c157600080fd5b506103d56103d036600461492a565b610b6d565b604080516001600160a01b0390981688526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161035c565b34801561042057600080fd5b506103776101cd5481565b34801561043757600080fd5b50609954610377565b34801561044c57600080fd5b5061046061045b36600461492a565b610bc7565b005b34801561046e57600080fd5b5061046061047d3660046149a4565b610d35565b34801561048e57600080fd5b506103a561049d3660046146a4565b610f19565b3480156104ae57600080fd5b506103776101d05481565b3480156104c557600080fd5b506040516012815260200161035c565b3480156104e157600080fd5b50610377610fc5565b3480156104f657600080fd5b50610460610505366004614650565b610fd4565b34801561051657600080fd5b506103a5610525366004614810565b61109d565b34801561053657600080fd5b50610377610545366004614810565b6110d9565b34801561055657600080fd5b506104606105653660046149e5565b61114d565b34801561057657600080fd5b506103776101ce5481565b34801561058d57600080fd5b506103776101cf5481565b6104606105a6366004614751565b6112ff565b3480156105b757600080fd5b506104606105c636600461492a565b6113b9565b3480156105d757600080fd5b506105eb6105e6366004614650565b611500565b6040516001600160a01b03909116815260200161035c565b34801561060f57600080fd5b5061046061061e366004614650565b611522565b34801561062f57600080fd5b506101945460ff166103a5565b34801561064857600080fd5b5061046061152c565b34801561065d57600080fd5b5061046061066c366004614650565b611554565b34801561067d57600080fd5b5061046061068c366004614a06565b61163e565b34801561069d57600080fd5b506103a56106ac36600461495a565b61170e565b3480156106bd57600080fd5b506103776101ca5481565b3480156106d457600080fd5b506106e86106e3366004614650565b61179a565b60405163ffffffff909116815260200161035c565b34801561070957600080fd5b50610377610718366004614650565b6001600160a01b031660009081526097602052604090205490565b34801561073f57600080fd5b506101c8546105eb906001600160a01b031681565b34801561076057600080fd5b506104606117bd565b34801561077557600080fd5b50610377610784366004614650565b6117f4565b34801561079557600080fd5b50610377600181565b3480156107aa57600080fd5b50610162546001600160a01b03166105eb565b3480156107c957600080fd5b506103776107d83660046149e5565b611812565b3480156107e957600080fd5b506103776107f836600461492a565b611841565b34801561080957600080fd5b5061084561081836600461495a565b6101cc60209081526000928352604080842090915290825290208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161035c565b34801561086c57600080fd5b5061034f61189e565b34801561088157600080fd5b50610377610890366004614650565b6118ad565b3480156108a157600080fd5b506101c6546105eb906001600160a01b031681565b3480156108c257600080fd5b506103a56108d1366004614810565b611944565b3480156108e257600080fd5b506103a56108f1366004614810565b6119dd565b34801561090257600080fd5b5061046061091136600461483b565b6119ea565b34801561092257600080fd5b506104606109313660046146e4565b611b20565b34801561094257600080fd5b5061046061095136600461497e565b611c66565b34801561096257600080fd5b5061037761097136600461466c565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b3480156109a857600080fd5b506104606109b73660046149e5565b611faf565b3480156109c857600080fd5b506104606109d73660046148e5565b612122565b3480156109e857600080fd5b506109fc6109f7366004614894565b6122fd565b60408051825163ffffffff1681526020928301516001600160e01b0316928101929092520161035c565b348015610a3257600080fd5b50610460610a41366004614650565b612390565b348015610a5257600080fd5b50610377610a6136600461495a565b612429565b348015610a7257600080fd5b506101c9546105eb906001600160a01b031681565b348015610a9357600080fd5b50610aa7610aa23660046149e5565b612563565b604080519283526001600160a01b0390911660208301520161035c565b6060609a8054610ad390614c4b565b80601f0160208091040260200160405190810160405280929190818152602001828054610aff90614c4b565b8015610b4c5780601f10610b2157610100808354040283529160200191610b4c565b820191906000526020600020905b815481529060010190602001808311610b2f57829003601f168201915b5050505050905090565b6000610b633384846125a9565b5060015b92915050565b6101cb8181548110610b7e57600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039095169650929491939092919087565b60006101cb8281548110610beb57634e487b7160e01b600052603260045260246000fd5b600091825260208083208584526101cc82526040808520338652909252922060079091029091019150610c1d836113b9565b6000610c578260020154610c5164e8d4a51000610c4b876003015487600001546126cd90919063ffffffff16565b906126d9565b906126e5565b8354909150610c70906001600160a01b031633836126f1565b610d07610c8c6101d0546101cf546126e590919063ffffffff16565b84546040516370a0823160e01b81523060048201526001600160a01b03909116906370a08231906024015b60206040518083038186803b158015610ccf57600080fd5b505afa158015610ce3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c519190614942565b600584015560038301548254610d279164e8d4a5100091610c4b916126cd565b826002018190555050505050565b610162546001600160a01b03163314610d695760405162461bcd60e51b8152600401610d6090614b1a565b60405180910390fd5b8015610d7757610d7761152c565b60006101ce544311610d8c576101ce54610d8e565b435b6101cd54909150610d9f9085612759565b6101cd556040805160e0810182526001600160a01b039485168152602081019586529081019182526000606082018181526080830182815260a0840183815260c085018481526101cb8054600181018255955294517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f44600790950294850180546001600160a01b031916919099161790975596517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4583015592517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4682015591517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4783015593517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4882015591517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f498301555090517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4a90910155565b6000610f26848484612765565b6001600160a01b038416600090815260986020908152604080832033845290915290205482811015610fab5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610d60565b610fb885338584036125a9565b60019150505b9392505050565b6000610fcf61294a565b905090565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561101d5760405162461bcd60e51b8152600401610d6090614a82565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661104f6129c5565b6001600160a01b0316146110755760405162461bcd60e51b8152600401610d6090614ace565b61107e816129f3565b6040805160008082526020820190925261109a91839190612a6b565b50565b3360008181526098602090815260408083206001600160a01b03871684529091528120549091610b639185906110d4908690614b9a565b6125a9565b600043821061112a5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610d60565b6001600160a01b038316600090815261013160205260409020610fbe9083612baf565b60006101cb838154811061117157634e487b7160e01b600052603260045260246000fd5b600091825260208083208684526101cc8252604080852033865290925292208054600790920290920192508311156111e05760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610d60565b6111e9846113b9565b60006112178260020154610c5164e8d4a51000610c4b876003015487600001546126cd90919063ffffffff16565b8354909150611230906001600160a01b031633836126f1565b61124c610c8c6101d0546101cf546126e590919063ffffffff16565b6005840155815461125d90856126e5565b82556101cf5461126d90856126e5565b6101cf556003830154825461128c9164e8d4a5100091610c4b916126cd565b600283015582546112a7906001600160a01b031633866126f1565b6112b685836000015433612c88565b6112c03385612d5c565b604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156113485760405162461bcd60e51b8152600401610d6090614a82565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661137a6129c5565b6001600160a01b0316146113a05760405162461bcd60e51b8152600401610d6090614ace565b6113a9826129f3565b6113b582826001612a6b565b5050565b60006101cb82815481106113dd57634e487b7160e01b600052603260045260246000fd5b600091825260208083208584526101cc8252604080852033865290925292206002600790920290920190810154909250431161141a57505061109a565b6000611438610c8c6101d0546101cf546126e590919063ffffffff16565b905060006114616114568560050154846126e590919063ffffffff16565b600686015490612759565b60058501839055600685018190556101cf54909150806114af57505043600280850191909155600060038501819055600485018190559201829055506005820181905560069091015561109a565b60006114c88660040154846126e590919063ffffffff16565b90506114eb6114e083610c4b8464e8d4a510006126cd565b600388015490612759565b60038701555050600490930192909255505050565b6001600160a01b0380821660009081526101306020526040902054165b919050565b61109a3382612d66565b6101cb5460005b818110156113b557611544816113b9565b61154d81614c80565b9050611533565b6001600160a01b0381166115a05760405162461bcd60e51b815260206004820152601360248201527261646d696e3a205a65726f206164647265737360681b6044820152606401610d60565b6101c9546001600160a01b031633146115e95760405162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b6044820152606401610d60565b6101c980546001600160a01b0319166001600160a01b0383169081179091556040519081527f54e4612788f90384e6843298d7854436f3a585b2c3831ab66abf1de63bfa6c2d9060200160405180910390a150565b610162546001600160a01b031633146116695760405162461bcd60e51b8152600401610d6090614b1a565b80156116775761167761152c565b6116ca826116c46101cb86815481106116a057634e487b7160e01b600052603260045260246000fd5b9060005260206000209060070201600101546101cd546126e590919063ffffffff16565b90612759565b6101cd81905550816101cb84815481106116f457634e487b7160e01b600052603260045260246000fd5b906000526020600020906007020160010181905550505050565b60008281526101c760205260408120815b815481101561179257836001600160a01b031682828154811061175257634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160029092020101546001600160a01b0316141561178057600192505050610b67565b8061178a81614c80565b91505061171f565b505092915050565b6001600160a01b03811660009081526101316020526040812054610b6790612dc8565b610162546001600160a01b031633146117e85760405162461bcd60e51b8152600401610d6090614b1a565b6117f26000612e31565b565b6001600160a01b038116600090815260fd6020526040812054610b67565b600082821061183757611830600161182a84866126e5565b906126cd565b9050610b67565b61183083836126e5565b60004382106118925760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610d60565b610b6761013283612baf565b6060609b8054610ad390614c4b565b6001600160a01b038116600090815261013160205260408120548015611931576001600160a01b0383166000908152610131602052604090206118f1600183614bf1565b8154811061190f57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316611934565b60005b6001600160e01b03169392505050565b3360009081526098602090815260408083206001600160a01b0386168452909152812054828110156119c65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610d60565b6119d333858584036125a9565b5060019392505050565b6000610b63338484612765565b83421115611a3a5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610d60565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090611ab490611aac9060a00160405160208183030381529060405280519060200120612e84565b858585612ed2565b9050611abf81612efa565b8614611b0d5760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610d60565b611b178188612d66565b50505050505050565b83421115611b705760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610d60565b600060fe54888888611b818c612efa565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000611bdc82612e84565b90506000611bec82878787612ed2565b9050896001600160a01b0316816001600160a01b031614611c4f5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610d60565b611c5a8a8a8a6125a9565b50505050505050505050565b6101c9546001600160a01b03163314611cc15760405162461bcd60e51b815260206004820152601c60248201527f73656e646572206d7573742062652061646d696e2061646472657373000000006044820152606401610d60565b80611cdb6101d0546101cf546126e590919063ffffffff16565b1015611d3d5760405162461bcd60e51b815260206004820152602b60248201527f416d6f756e74206d757374206265206c657373207468616e207374616b65642060448201526a10d5531508185b5bdd5b9d60aa1b6064820152608401610d60565b60006101cb8481548110611d6157634e487b7160e01b600052603260045260246000fd5b6000918252602082206007919091020180546040516370a0823160e01b81523060048201529193506001600160a01b0316906370a082319060240160206040518083038186803b158015611db457600080fd5b505afa158015611dc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dec9190614942565b905080831115611ed357815460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b158015611e4357600080fd5b505af1158015611e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7b91906148c9565b506101d054611e8a9082612759565b6101d05560405181815285906001600160a01b038616907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a3611fa8565b815460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529091169063a9059cbb90604401602060405180830381600087803b158015611f2057600080fd5b505af1158015611f34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5891906148c9565b506101d054611f679084612759565b6101d05560405183815285906001600160a01b038616907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020016112f0565b5050505050565b60006101cb8381548110611fd357634e487b7160e01b600052603260045260246000fd5b600091825260208083208684526101cc82526040808520338652909252922060079091029091019150612005846113b9565b80541561207657600061203a8260020154610c5164e8d4a51000610c4b876003015487600001546126cd90919063ffffffff16565b8354909150612053906001600160a01b031633836126f1565b61206f610c8c6101d0546101cf546126e590919063ffffffff16565b6005840155505b815461208d906001600160a01b0316333086612f22565b6101cf5461209b9084612759565b6101cf5580546120ab9084612759565b80825560038301546120c89164e8d4a5100091610c4b91906126cd565b600282015580546120db90859033612f5a565b6120e53384613169565b604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a350505050565b600054610100900460ff1661213d5760005460ff1615612141565b303b155b6121a45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d60565b600054610100900460ff161580156121cf576000805460ff1961ff0019909116610100171660011790555b6001600160a01b0384166122255760405162461bcd60e51b815260206004820152601860248201527f696e697469616c697a653a205a65726f206164647265737300000000000000006044820152606401610d60565b61222d613173565b612271604051806040016040528060058152602001641910d5531560da1b815250604051806040016040528060058152602001641910d5531560da1b8152506131aa565b6122796131f8565b61229f604051806040016040528060058152602001641910d5531560da1b81525061322c565b6122a7613287565b6101c880546001600160a01b038088166001600160a01b0319928316179092556101c98054928716929091169190911790556101ce8390556101ca8290558015611fa8576000805461ff00191690555050505050565b60408051808201909152600080825260208201526001600160a01b038316600090815261013160205260409020805463ffffffff841690811061235057634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610162546001600160a01b031633146123bb5760405162461bcd60e51b8152600401610d6090614b1a565b6001600160a01b0381166124205760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d60565b61109a81612e31565b6000806101cb848154811061244e57634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526101cc825260408085206001600160a01b0389168652909252922060036007909202909201908101546101cf54600283015492945090914311801561249f57508015155b156125305760006124f16124c26101d0546101cf546126e590919063ffffffff16565b86546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401610cb7565b9050600061250c8660050154836126e590919063ffffffff16565b905061252b61252484610c4b8464e8d4a510006126cd565b8590612759565b935050505b6125588360020154610c5164e8d4a51000610c4b8688600001546126cd90919063ffffffff16565b979650505050505050565b6101c7602052816000526040600020818154811061258057600080fd5b6000918252602090912060029091020180546001909101549092506001600160a01b0316905082565b6001600160a01b03831661260b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610d60565b6001600160a01b03821661266c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610d60565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610fbe8284614bd2565b6000610fbe8284614bb2565b6000610fbe8284614bf1565b6040516001600160a01b03831660248201526044810182905261275490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526132ae565b505050565b6000610fbe8284614b9a565b6001600160a01b0383166127c95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610d60565b6001600160a01b03821661282b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610d60565b612836838383613380565b6001600160a01b038316600090815260976020526040902054818110156128ae5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610d60565b6001600160a01b038085166000908152609760205260408082208585039055918516815290812080548492906128e5908490614b9a565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161293191815260200190565b60405180910390a36129448484846133e8565b50505050565b6000610fcf7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61297960c95490565b60ca546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b33612a07610162546001600160a01b031690565b6001600160a01b03161461109a5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79206f776e65722063616e207570677261646520696d706c656d656e7460448201526430ba34b7b760d91b6064820152608401610d60565b6000612a756129c5565b9050612a80846133f3565b600083511180612a8d5750815b15612a9e57612a9c8484613498565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16611fa857805460ff191660011781556040516001600160a01b0383166024820152612b1d90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052613498565b50805460ff19168155612b2e6129c5565b6001600160a01b0316826001600160a01b031614612ba65760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610d60565b611fa885613583565b8154600090815b81811015612c21576000612bca82846135c3565b905084868281548110612bed57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff161115612c0d57809250612c1b565b612c18816001614b9a565b91505b50612bb6565b8115612c735784612c33600184614bf1565b81548110612c5157634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316612c76565b60005b6001600160e01b031695945050505050565b60008381526101c760205260408120905b8154811015611fa857826001600160a01b0316828281548110612ccc57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160029092020101546001600160a01b03161415612d4a57818181548110612d0f57634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020190815560010180546001600160a01b03191690558315612d4357612d43858585612f5a565b5050612754565b80612d5481614c80565b915050612c99565b6113b582826135de565b612d7160008361170e565b15612dbe5760405162461bcd60e51b815260206004820152601a60248201527f546f70207374616b65722063616e6e6f742064656c65676174650000000000006044820152606401610d60565b6113b582826135f7565b600063ffffffff821115612e2d5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610d60565b5090565b61016280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610b67612e9161294a565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612ee38787878761368e565b91509150612ef08161377b565b5095945050505050565b6001600160a01b038116600090815260fd602052604090208054600181018255905b50919050565b6040516001600160a01b03808516602483015283166044820152606481018290526129449085906323b872dd60e01b9060840161271d565b60008381526101c7602052604081205b805482101561301f57826001600160a01b0316818381548110612f9d57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160029092020101546001600160a01b0316141561300d5783818381548110612fe157634e487b7160e01b600052603260045260246000fd5b600091825260208220600290910201919091558154612d4391879161300890600190614bf1565b61397e565b8161301781614c80565b925050612f6a565b6101ca548154101561308957604080518082019091528481526001600160a01b038481166020808401918252845460018082018755600087815292909220945160029091029094019384559051920180546001600160a01b03191692909116919091179055613152565b83816000815481106130ab57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000015410156131525783816000815481106130e557634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000181905550828160008154811061311c57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b611fa8856000600184805490506130089190614bf1565b6113b58282613d30565b600054610100900460ff1661319a5760405162461bcd60e51b8152600401610d6090614b4f565b6131a2613287565b6117f2613dbb565b600054610100900460ff166131d15760405162461bcd60e51b8152600401610d6090614b4f565b81516131e490609a9060208501906145af565b50805161275490609b9060208401906145af565b600054610100900460ff1661321f5760405162461bcd60e51b8152600401610d6090614b4f565b610194805460ff19169055565b600054610100900460ff166132535760405162461bcd60e51b8152600401610d6090614b4f565b61325b613287565b61327e81604051806040016040528060018152602001603160f81b815250613deb565b61109a81613e2c565b600054610100900460ff166117f25760405162461bcd60e51b8152600401610d6090614b4f565b6000613303826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613e7a9092919063ffffffff16565b805190915015612754578080602001905181019061332191906148c9565b6127545760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d60565b6001600160a01b038316158061339d57506001600160a01b038216155b156133a757612754565b60405162461bcd60e51b81526020600482015260166024820152752737b7103a3930b739b332b930b13632903a37b5b2b760511b6044820152606401610d60565b612754838383613e91565b803b6134575760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610d60565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6134f75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610d60565b600080846001600160a01b0316846040516135129190614a33565b600060405180830381855af49150503d806000811461354d576040519150601f19603f3d011682016040523d82523d6000602084013e613552565b606091505b509150915061357a8282604051806060016040528060278152602001614ceb60279139613eac565b95945050505050565b61358c816133f3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006135d26002848418614bb2565b610fbe90848416614b9a565b6135e88282613ee5565b6129446101326126e583614046565b600061360283611500565b90506000613625846001600160a01b031660009081526097602052604090205490565b6001600160a01b038581166000818152610130602052604080822080546001600160a01b031916898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46129448284836141f7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156136c55750600090506003613772565b8460ff16601b141580156136dd57508460ff16601c14155b156136ee5750600090506004613772565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613742573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661376b57600060019250925050613772565b9150600090505b94509492505050565b600081600481111561379d57634e487b7160e01b600052602160045260246000fd5b14156137a85761109a565b60018160048111156137ca57634e487b7160e01b600052602160045260246000fd5b14156138185760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d60565b600281600481111561383a57634e487b7160e01b600052602160045260246000fd5b14156138885760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d60565b60038160048111156138aa57634e487b7160e01b600052602160045260246000fd5b14156139035760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d60565b600481600481111561392557634e487b7160e01b600052602160045260246000fd5b141561109a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d60565b60008381526101c76020526040902081831061399a5750612754565b6002600082826139aa8688614b9a565b6139b49190614bb2565b815481106139d257634e487b7160e01b600052603260045260246000fd5b6000918252602090912060029091020154905084845b80821015613cf9575b82858381548110613a1257634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600001541015613a3a57613a3382614c80565b91506139f1565b82858281548110613a5b57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600001541115613a8357613a7c81614c34565b9050613a3a565b848181548110613aa357634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154858381548110613ad557634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600001541115613ce857848181548110613b0d57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154858381548110613b3f57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154868481548110613b7157634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000016000888581548110613ba457634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102019290925591909155508454859082908110613bdf57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160009054906101000a90046001600160a01b0316858381548110613c2457634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160009054906101000a90046001600160a01b0316868481548110613c6957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001016000888581548110613c9c57634e487b7160e01b600052603260045260246000fd5b6000918252602090912060016002909202010180546001600160a01b039485166001600160a01b031990911617905581549383166101009190910a908102920219909216179055613cf4565b613cf182614c80565b91505b6139e8565b86811115613d1157613d118888613008600185614bf1565b613d2688613d20836001614b9a565b8861397e565b5050505050505050565b613d3a8282614336565b6099546001600160e01b031015613dac5760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610d60565b61294461013261275983614046565b600054610100900460ff16613de25760405162461bcd60e51b8152600401610d6090614b4f565b6117f233612e31565b600054610100900460ff16613e125760405162461bcd60e51b8152600401610d6090614b4f565b81516020928301208151919092012060c99190915560ca55565b600054610100900460ff16613e535760405162461bcd60e51b8152600401610d6090614b4f565b507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c960fe55565b6060613e898484600085614429565b949350505050565b612754613e9d84611500565b613ea684611500565b836141f7565b60608315613ebb575081610fbe565b825115613ecb5782518084602001fd5b8160405162461bcd60e51b8152600401610d609190614a4f565b6001600160a01b038216613f455760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610d60565b613f5182600083613380565b6001600160a01b03821660009081526097602052604090205481811015613fc55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610d60565b6001600160a01b0383166000908152609760205260408120838303905560998054849290613ff4908490614bf1565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3612754836000846133e8565b82546000908190801561409f578561405f600183614bf1565b8154811061407d57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b03166140a2565b60005b6001600160e01b031692506140bb83858763ffffffff16565b9150600081118015614107575043866140d5600184614bf1565b815481106140f357634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff16145b156141755761411582614546565b86614121600184614bf1565b8154811061413f57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b031602179055506141ee565b85604051806040016040528061418a43612dc8565b63ffffffff16815260200161419e85614546565b6001600160e01b039081169091528254600181018455600093845260209384902083519101805493909401519091166401000000000263ffffffff91821663ffffffff1990931692909217161790555b50935093915050565b816001600160a01b0316836001600160a01b0316141580156142195750600081115b15612754576001600160a01b038316156142a8576001600160a01b0383166000908152610131602052604081208190614255906126e585614046565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161429d929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615612754576001600160a01b03821660009081526101316020526040812081906142df9061275985614046565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051614327929190918252602082015260400190565b60405180910390a25050505050565b6001600160a01b03821661438c5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610d60565b61439860008383613380565b80609960008282546143aa9190614b9a565b90915550506001600160a01b038216600090815260976020526040812080548392906143d7908490614b9a565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36113b5600083836133e8565b60608247101561448a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d60565b843b6144d85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d60565b600080866001600160a01b031685876040516144f49190614a33565b60006040518083038185875af1925050503d8060008114614531576040519150601f19603f3d011682016040523d82523d6000602084013e614536565b606091505b5091509150612558828286613eac565b60006001600160e01b03821115612e2d5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610d60565b8280546145bb90614c4b565b90600052602060002090601f0160209004810192826145dd5760008555614623565b82601f106145f657805160ff1916838001178555614623565b82800160010185558215614623579182015b82811115614623578251825591602001919060010190614608565b50612e2d9291505b80821115612e2d576000815560010161462b565b803560ff8116811461151d57600080fd5b600060208284031215614661578081fd5b8135610fbe81614cc7565b6000806040838503121561467e578081fd5b823561468981614cc7565b9150602083013561469981614cc7565b809150509250929050565b6000806000606084860312156146b8578081fd5b83356146c381614cc7565b925060208401356146d381614cc7565b929592945050506040919091013590565b600080600080600080600060e0888a0312156146fe578283fd5b873561470981614cc7565b9650602088013561471981614cc7565b955060408801359450606088013593506147356080890161463f565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215614763578182fd5b823561476e81614cc7565b9150602083013567ffffffffffffffff8082111561478a578283fd5b818501915085601f83011261479d578283fd5b8135818111156147af576147af614cb1565b604051601f8201601f19908116603f011681019083821181831017156147d7576147d7614cb1565b816040528281528860208487010111156147ef578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215614822578182fd5b823561482d81614cc7565b946020939093013593505050565b60008060008060008060c08789031215614853578182fd5b863561485e81614cc7565b9550602087013594506040870135935061487a6060880161463f565b92506080870135915060a087013590509295509295509295565b600080604083850312156148a6578182fd5b82356148b181614cc7565b9150602083013563ffffffff81168114614699578182fd5b6000602082840312156148da578081fd5b8151610fbe81614cdc565b600080600080608085870312156148fa578384fd5b843561490581614cc7565b9350602085013561491581614cc7565b93969395505050506040820135916060013590565b60006020828403121561493b578081fd5b5035919050565b600060208284031215614953578081fd5b5051919050565b6000806040838503121561496c578182fd5b82359150602083013561469981614cc7565b600080600060608486031215614992578081fd5b8335925060208401356146d381614cc7565b6000806000606084860312156149b8578081fd5b8335925060208401356149ca81614cc7565b915060408401356149da81614cdc565b809150509250925092565b600080604083850312156149f7578182fd5b50508035926020909101359150565b600080600060608486031215614a1a578081fd5b833592506020840135915060408401356149da81614cdc565b60008251614a45818460208701614c08565b9190910192915050565b6000602082528251806020840152614a6e816040850160208701614c08565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115614bad57614bad614c9b565b500190565b600082614bcd57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615614bec57614bec614c9b565b500290565b600082821015614c0357614c03614c9b565b500390565b60005b83811015614c23578181015183820152602001614c0b565b838111156129445750506000910152565b600081614c4357614c43614c9b565b506000190190565b600281046001821680614c5f57607f821691505b60208210811415612f1c57634e487b7160e01b600052602260045260246000fd5b6000600019821415614c9457614c94614c9b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461109a57600080fd5b801515811461109a57600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b3f516e770d1e45412a8258f846a4ffb248da8c5f5cb62548f37eb99d67c033764736f6c63430008020033
Deployed Bytecode
0x6080604052600436106103355760003560e01c80636f10947c116101ab578063a1bd8105116100f7578063e2bbb15811610095578063f2fde38b1161006f578063f2fde38b14610a26578063f9dea75b14610a46578063fc6f946814610a66578063ff793c2514610a8757610335565b8063e2bbb1581461099c578063eb990c59146109bc578063f1127ed8146109dc57610335565b8063c3cda520116100d1578063c3cda520146108f6578063d505accf14610916578063dc3cc64514610936578063dd62ed3e1461095657610335565b8063a1bd810514610895578063a457c2d7146108b6578063a9059cbb146108d657610335565b80638aa28550116101645780638e539e8c1161013e5780638e539e8c146107dd57806393f1a40b146107fd57806395d89b41146108605780639ab24eb01461087557610335565b80638aa28550146107895780638da5cb5b1461079e5780638dbb1e3a146107bd57610335565b80636f10947c146106b15780636fcfff45146106c857806370a08231146106fd57806370ab41ad14610733578063715018a6146107545780637ecebe001461076957610335565b80633950935111610285578063587cde1e11610223578063630b5ba1116101fd578063630b5ba11461063c57806363a846f81461065157806364482f79146106715780636e2e2d731461069157610335565b8063587cde1e146105cb5780635c19a95c146106035780635c975abb1461062357610335565b806348cd4cb11161025f57806348cd4cb11461056a5780634f0ba4e6146105815780634f1ef2861461059857806351eb05a6146105ab57610335565b8063395093511461050a5780633a46b1a81461052a578063441a3e701461054a57610335565b80631a504af3116102f25780632a36a42f116102cc5780632a36a42f146104a2578063313ce567146104b95780633644e515146104d55780633659cfe6146104ea57610335565b80631a504af3146104405780631eaaa0451461046257806323b872dd1461048257610335565b806306fdde031461033a578063081e3eda14610365578063095ea7b3146103855780631526fe27146103b557806317caf6f11461041457806318160ddd1461042b575b600080fd5b34801561034657600080fd5b5061034f610ac4565b60405161035c9190614a4f565b60405180910390f35b34801561037157600080fd5b506101cb545b60405190815260200161035c565b34801561039157600080fd5b506103a56103a0366004614810565b610b56565b604051901515815260200161035c565b3480156103c157600080fd5b506103d56103d036600461492a565b610b6d565b604080516001600160a01b0390981688526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161035c565b34801561042057600080fd5b506103776101cd5481565b34801561043757600080fd5b50609954610377565b34801561044c57600080fd5b5061046061045b36600461492a565b610bc7565b005b34801561046e57600080fd5b5061046061047d3660046149a4565b610d35565b34801561048e57600080fd5b506103a561049d3660046146a4565b610f19565b3480156104ae57600080fd5b506103776101d05481565b3480156104c557600080fd5b506040516012815260200161035c565b3480156104e157600080fd5b50610377610fc5565b3480156104f657600080fd5b50610460610505366004614650565b610fd4565b34801561051657600080fd5b506103a5610525366004614810565b61109d565b34801561053657600080fd5b50610377610545366004614810565b6110d9565b34801561055657600080fd5b506104606105653660046149e5565b61114d565b34801561057657600080fd5b506103776101ce5481565b34801561058d57600080fd5b506103776101cf5481565b6104606105a6366004614751565b6112ff565b3480156105b757600080fd5b506104606105c636600461492a565b6113b9565b3480156105d757600080fd5b506105eb6105e6366004614650565b611500565b6040516001600160a01b03909116815260200161035c565b34801561060f57600080fd5b5061046061061e366004614650565b611522565b34801561062f57600080fd5b506101945460ff166103a5565b34801561064857600080fd5b5061046061152c565b34801561065d57600080fd5b5061046061066c366004614650565b611554565b34801561067d57600080fd5b5061046061068c366004614a06565b61163e565b34801561069d57600080fd5b506103a56106ac36600461495a565b61170e565b3480156106bd57600080fd5b506103776101ca5481565b3480156106d457600080fd5b506106e86106e3366004614650565b61179a565b60405163ffffffff909116815260200161035c565b34801561070957600080fd5b50610377610718366004614650565b6001600160a01b031660009081526097602052604090205490565b34801561073f57600080fd5b506101c8546105eb906001600160a01b031681565b34801561076057600080fd5b506104606117bd565b34801561077557600080fd5b50610377610784366004614650565b6117f4565b34801561079557600080fd5b50610377600181565b3480156107aa57600080fd5b50610162546001600160a01b03166105eb565b3480156107c957600080fd5b506103776107d83660046149e5565b611812565b3480156107e957600080fd5b506103776107f836600461492a565b611841565b34801561080957600080fd5b5061084561081836600461495a565b6101cc60209081526000928352604080842090915290825290208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161035c565b34801561086c57600080fd5b5061034f61189e565b34801561088157600080fd5b50610377610890366004614650565b6118ad565b3480156108a157600080fd5b506101c6546105eb906001600160a01b031681565b3480156108c257600080fd5b506103a56108d1366004614810565b611944565b3480156108e257600080fd5b506103a56108f1366004614810565b6119dd565b34801561090257600080fd5b5061046061091136600461483b565b6119ea565b34801561092257600080fd5b506104606109313660046146e4565b611b20565b34801561094257600080fd5b5061046061095136600461497e565b611c66565b34801561096257600080fd5b5061037761097136600461466c565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b3480156109a857600080fd5b506104606109b73660046149e5565b611faf565b3480156109c857600080fd5b506104606109d73660046148e5565b612122565b3480156109e857600080fd5b506109fc6109f7366004614894565b6122fd565b60408051825163ffffffff1681526020928301516001600160e01b0316928101929092520161035c565b348015610a3257600080fd5b50610460610a41366004614650565b612390565b348015610a5257600080fd5b50610377610a6136600461495a565b612429565b348015610a7257600080fd5b506101c9546105eb906001600160a01b031681565b348015610a9357600080fd5b50610aa7610aa23660046149e5565b612563565b604080519283526001600160a01b0390911660208301520161035c565b6060609a8054610ad390614c4b565b80601f0160208091040260200160405190810160405280929190818152602001828054610aff90614c4b565b8015610b4c5780601f10610b2157610100808354040283529160200191610b4c565b820191906000526020600020905b815481529060010190602001808311610b2f57829003601f168201915b5050505050905090565b6000610b633384846125a9565b5060015b92915050565b6101cb8181548110610b7e57600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b039095169650929491939092919087565b60006101cb8281548110610beb57634e487b7160e01b600052603260045260246000fd5b600091825260208083208584526101cc82526040808520338652909252922060079091029091019150610c1d836113b9565b6000610c578260020154610c5164e8d4a51000610c4b876003015487600001546126cd90919063ffffffff16565b906126d9565b906126e5565b8354909150610c70906001600160a01b031633836126f1565b610d07610c8c6101d0546101cf546126e590919063ffffffff16565b84546040516370a0823160e01b81523060048201526001600160a01b03909116906370a08231906024015b60206040518083038186803b158015610ccf57600080fd5b505afa158015610ce3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c519190614942565b600584015560038301548254610d279164e8d4a5100091610c4b916126cd565b826002018190555050505050565b610162546001600160a01b03163314610d695760405162461bcd60e51b8152600401610d6090614b1a565b60405180910390fd5b8015610d7757610d7761152c565b60006101ce544311610d8c576101ce54610d8e565b435b6101cd54909150610d9f9085612759565b6101cd556040805160e0810182526001600160a01b039485168152602081019586529081019182526000606082018181526080830182815260a0840183815260c085018481526101cb8054600181018255955294517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f44600790950294850180546001600160a01b031916919099161790975596517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4583015592517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4682015591517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4783015593517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4882015591517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f498301555090517fe8bbfecd380c4167d6a1f763a233ec73e73f534b1970c4e1683f437ec23c1f4a90910155565b6000610f26848484612765565b6001600160a01b038416600090815260986020908152604080832033845290915290205482811015610fab5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610d60565b610fb885338584036125a9565b60019150505b9392505050565b6000610fcf61294a565b905090565b306001600160a01b037f000000000000000000000000c4d6a78a265e656af202ef265863828b8053f01616141561101d5760405162461bcd60e51b8152600401610d6090614a82565b7f000000000000000000000000c4d6a78a265e656af202ef265863828b8053f0166001600160a01b031661104f6129c5565b6001600160a01b0316146110755760405162461bcd60e51b8152600401610d6090614ace565b61107e816129f3565b6040805160008082526020820190925261109a91839190612a6b565b50565b3360008181526098602090815260408083206001600160a01b03871684529091528120549091610b639185906110d4908690614b9a565b6125a9565b600043821061112a5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610d60565b6001600160a01b038316600090815261013160205260409020610fbe9083612baf565b60006101cb838154811061117157634e487b7160e01b600052603260045260246000fd5b600091825260208083208684526101cc8252604080852033865290925292208054600790920290920192508311156111e05760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610d60565b6111e9846113b9565b60006112178260020154610c5164e8d4a51000610c4b876003015487600001546126cd90919063ffffffff16565b8354909150611230906001600160a01b031633836126f1565b61124c610c8c6101d0546101cf546126e590919063ffffffff16565b6005840155815461125d90856126e5565b82556101cf5461126d90856126e5565b6101cf556003830154825461128c9164e8d4a5100091610c4b916126cd565b600283015582546112a7906001600160a01b031633866126f1565b6112b685836000015433612c88565b6112c03385612d5c565b604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050505050565b306001600160a01b037f000000000000000000000000c4d6a78a265e656af202ef265863828b8053f0161614156113485760405162461bcd60e51b8152600401610d6090614a82565b7f000000000000000000000000c4d6a78a265e656af202ef265863828b8053f0166001600160a01b031661137a6129c5565b6001600160a01b0316146113a05760405162461bcd60e51b8152600401610d6090614ace565b6113a9826129f3565b6113b582826001612a6b565b5050565b60006101cb82815481106113dd57634e487b7160e01b600052603260045260246000fd5b600091825260208083208584526101cc8252604080852033865290925292206002600790920290920190810154909250431161141a57505061109a565b6000611438610c8c6101d0546101cf546126e590919063ffffffff16565b905060006114616114568560050154846126e590919063ffffffff16565b600686015490612759565b60058501839055600685018190556101cf54909150806114af57505043600280850191909155600060038501819055600485018190559201829055506005820181905560069091015561109a565b60006114c88660040154846126e590919063ffffffff16565b90506114eb6114e083610c4b8464e8d4a510006126cd565b600388015490612759565b60038701555050600490930192909255505050565b6001600160a01b0380821660009081526101306020526040902054165b919050565b61109a3382612d66565b6101cb5460005b818110156113b557611544816113b9565b61154d81614c80565b9050611533565b6001600160a01b0381166115a05760405162461bcd60e51b815260206004820152601360248201527261646d696e3a205a65726f206164647265737360681b6044820152606401610d60565b6101c9546001600160a01b031633146115e95760405162461bcd60e51b815260206004820152600b60248201526a61646d696e3a207775743f60a81b6044820152606401610d60565b6101c980546001600160a01b0319166001600160a01b0383169081179091556040519081527f54e4612788f90384e6843298d7854436f3a585b2c3831ab66abf1de63bfa6c2d9060200160405180910390a150565b610162546001600160a01b031633146116695760405162461bcd60e51b8152600401610d6090614b1a565b80156116775761167761152c565b6116ca826116c46101cb86815481106116a057634e487b7160e01b600052603260045260246000fd5b9060005260206000209060070201600101546101cd546126e590919063ffffffff16565b90612759565b6101cd81905550816101cb84815481106116f457634e487b7160e01b600052603260045260246000fd5b906000526020600020906007020160010181905550505050565b60008281526101c760205260408120815b815481101561179257836001600160a01b031682828154811061175257634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160029092020101546001600160a01b0316141561178057600192505050610b67565b8061178a81614c80565b91505061171f565b505092915050565b6001600160a01b03811660009081526101316020526040812054610b6790612dc8565b610162546001600160a01b031633146117e85760405162461bcd60e51b8152600401610d6090614b1a565b6117f26000612e31565b565b6001600160a01b038116600090815260fd6020526040812054610b67565b600082821061183757611830600161182a84866126e5565b906126cd565b9050610b67565b61183083836126e5565b60004382106118925760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e6564006044820152606401610d60565b610b6761013283612baf565b6060609b8054610ad390614c4b565b6001600160a01b038116600090815261013160205260408120548015611931576001600160a01b0383166000908152610131602052604090206118f1600183614bf1565b8154811061190f57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316611934565b60005b6001600160e01b03169392505050565b3360009081526098602090815260408083206001600160a01b0386168452909152812054828110156119c65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610d60565b6119d333858584036125a9565b5060019392505050565b6000610b63338484612765565b83421115611a3a5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610d60565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090611ab490611aac9060a00160405160208183030381529060405280519060200120612e84565b858585612ed2565b9050611abf81612efa565b8614611b0d5760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e6365000000000000006044820152606401610d60565b611b178188612d66565b50505050505050565b83421115611b705760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610d60565b600060fe54888888611b818c612efa565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000611bdc82612e84565b90506000611bec82878787612ed2565b9050896001600160a01b0316816001600160a01b031614611c4f5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610d60565b611c5a8a8a8a6125a9565b50505050505050505050565b6101c9546001600160a01b03163314611cc15760405162461bcd60e51b815260206004820152601c60248201527f73656e646572206d7573742062652061646d696e2061646472657373000000006044820152606401610d60565b80611cdb6101d0546101cf546126e590919063ffffffff16565b1015611d3d5760405162461bcd60e51b815260206004820152602b60248201527f416d6f756e74206d757374206265206c657373207468616e207374616b65642060448201526a10d5531508185b5bdd5b9d60aa1b6064820152608401610d60565b60006101cb8481548110611d6157634e487b7160e01b600052603260045260246000fd5b6000918252602082206007919091020180546040516370a0823160e01b81523060048201529193506001600160a01b0316906370a082319060240160206040518083038186803b158015611db457600080fd5b505afa158015611dc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dec9190614942565b905080831115611ed357815460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b158015611e4357600080fd5b505af1158015611e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7b91906148c9565b506101d054611e8a9082612759565b6101d05560405181815285906001600160a01b038616907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a3611fa8565b815460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529091169063a9059cbb90604401602060405180830381600087803b158015611f2057600080fd5b505af1158015611f34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5891906148c9565b506101d054611f679084612759565b6101d05560405183815285906001600160a01b038616907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020016112f0565b5050505050565b60006101cb8381548110611fd357634e487b7160e01b600052603260045260246000fd5b600091825260208083208684526101cc82526040808520338652909252922060079091029091019150612005846113b9565b80541561207657600061203a8260020154610c5164e8d4a51000610c4b876003015487600001546126cd90919063ffffffff16565b8354909150612053906001600160a01b031633836126f1565b61206f610c8c6101d0546101cf546126e590919063ffffffff16565b6005840155505b815461208d906001600160a01b0316333086612f22565b6101cf5461209b9084612759565b6101cf5580546120ab9084612759565b80825560038301546120c89164e8d4a5100091610c4b91906126cd565b600282015580546120db90859033612f5a565b6120e53384613169565b604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a350505050565b600054610100900460ff1661213d5760005460ff1615612141565b303b155b6121a45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d60565b600054610100900460ff161580156121cf576000805460ff1961ff0019909116610100171660011790555b6001600160a01b0384166122255760405162461bcd60e51b815260206004820152601860248201527f696e697469616c697a653a205a65726f206164647265737300000000000000006044820152606401610d60565b61222d613173565b612271604051806040016040528060058152602001641910d5531560da1b815250604051806040016040528060058152602001641910d5531560da1b8152506131aa565b6122796131f8565b61229f604051806040016040528060058152602001641910d5531560da1b81525061322c565b6122a7613287565b6101c880546001600160a01b038088166001600160a01b0319928316179092556101c98054928716929091169190911790556101ce8390556101ca8290558015611fa8576000805461ff00191690555050505050565b60408051808201909152600080825260208201526001600160a01b038316600090815261013160205260409020805463ffffffff841690811061235057634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610162546001600160a01b031633146123bb5760405162461bcd60e51b8152600401610d6090614b1a565b6001600160a01b0381166124205760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d60565b61109a81612e31565b6000806101cb848154811061244e57634e487b7160e01b600052603260045260246000fd5b600091825260208083208784526101cc825260408085206001600160a01b0389168652909252922060036007909202909201908101546101cf54600283015492945090914311801561249f57508015155b156125305760006124f16124c26101d0546101cf546126e590919063ffffffff16565b86546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401610cb7565b9050600061250c8660050154836126e590919063ffffffff16565b905061252b61252484610c4b8464e8d4a510006126cd565b8590612759565b935050505b6125588360020154610c5164e8d4a51000610c4b8688600001546126cd90919063ffffffff16565b979650505050505050565b6101c7602052816000526040600020818154811061258057600080fd5b6000918252602090912060029091020180546001909101549092506001600160a01b0316905082565b6001600160a01b03831661260b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610d60565b6001600160a01b03821661266c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610d60565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610fbe8284614bd2565b6000610fbe8284614bb2565b6000610fbe8284614bf1565b6040516001600160a01b03831660248201526044810182905261275490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526132ae565b505050565b6000610fbe8284614b9a565b6001600160a01b0383166127c95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610d60565b6001600160a01b03821661282b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610d60565b612836838383613380565b6001600160a01b038316600090815260976020526040902054818110156128ae5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610d60565b6001600160a01b038085166000908152609760205260408082208585039055918516815290812080548492906128e5908490614b9a565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161293191815260200190565b60405180910390a36129448484846133e8565b50505050565b6000610fcf7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61297960c95490565b60ca546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b33612a07610162546001600160a01b031690565b6001600160a01b03161461109a5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c79206f776e65722063616e207570677261646520696d706c656d656e7460448201526430ba34b7b760d91b6064820152608401610d60565b6000612a756129c5565b9050612a80846133f3565b600083511180612a8d5750815b15612a9e57612a9c8484613498565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16611fa857805460ff191660011781556040516001600160a01b0383166024820152612b1d90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b179052613498565b50805460ff19168155612b2e6129c5565b6001600160a01b0316826001600160a01b031614612ba65760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b6064820152608401610d60565b611fa885613583565b8154600090815b81811015612c21576000612bca82846135c3565b905084868281548110612bed57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff161115612c0d57809250612c1b565b612c18816001614b9a565b91505b50612bb6565b8115612c735784612c33600184614bf1565b81548110612c5157634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316612c76565b60005b6001600160e01b031695945050505050565b60008381526101c760205260408120905b8154811015611fa857826001600160a01b0316828281548110612ccc57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160029092020101546001600160a01b03161415612d4a57818181548110612d0f57634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020190815560010180546001600160a01b03191690558315612d4357612d43858585612f5a565b5050612754565b80612d5481614c80565b915050612c99565b6113b582826135de565b612d7160008361170e565b15612dbe5760405162461bcd60e51b815260206004820152601a60248201527f546f70207374616b65722063616e6e6f742064656c65676174650000000000006044820152606401610d60565b6113b582826135f7565b600063ffffffff821115612e2d5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610d60565b5090565b61016280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610b67612e9161294a565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612ee38787878761368e565b91509150612ef08161377b565b5095945050505050565b6001600160a01b038116600090815260fd602052604090208054600181018255905b50919050565b6040516001600160a01b03808516602483015283166044820152606481018290526129449085906323b872dd60e01b9060840161271d565b60008381526101c7602052604081205b805482101561301f57826001600160a01b0316818381548110612f9d57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160029092020101546001600160a01b0316141561300d5783818381548110612fe157634e487b7160e01b600052603260045260246000fd5b600091825260208220600290910201919091558154612d4391879161300890600190614bf1565b61397e565b8161301781614c80565b925050612f6a565b6101ca548154101561308957604080518082019091528481526001600160a01b038481166020808401918252845460018082018755600087815292909220945160029091029094019384559051920180546001600160a01b03191692909116919091179055613152565b83816000815481106130ab57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000015410156131525783816000815481106130e557634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000181905550828160008154811061311c57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b611fa8856000600184805490506130089190614bf1565b6113b58282613d30565b600054610100900460ff1661319a5760405162461bcd60e51b8152600401610d6090614b4f565b6131a2613287565b6117f2613dbb565b600054610100900460ff166131d15760405162461bcd60e51b8152600401610d6090614b4f565b81516131e490609a9060208501906145af565b50805161275490609b9060208401906145af565b600054610100900460ff1661321f5760405162461bcd60e51b8152600401610d6090614b4f565b610194805460ff19169055565b600054610100900460ff166132535760405162461bcd60e51b8152600401610d6090614b4f565b61325b613287565b61327e81604051806040016040528060018152602001603160f81b815250613deb565b61109a81613e2c565b600054610100900460ff166117f25760405162461bcd60e51b8152600401610d6090614b4f565b6000613303826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613e7a9092919063ffffffff16565b805190915015612754578080602001905181019061332191906148c9565b6127545760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d60565b6001600160a01b038316158061339d57506001600160a01b038216155b156133a757612754565b60405162461bcd60e51b81526020600482015260166024820152752737b7103a3930b739b332b930b13632903a37b5b2b760511b6044820152606401610d60565b612754838383613e91565b803b6134575760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610d60565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b6134f75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610d60565b600080846001600160a01b0316846040516135129190614a33565b600060405180830381855af49150503d806000811461354d576040519150601f19603f3d011682016040523d82523d6000602084013e613552565b606091505b509150915061357a8282604051806060016040528060278152602001614ceb60279139613eac565b95945050505050565b61358c816133f3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006135d26002848418614bb2565b610fbe90848416614b9a565b6135e88282613ee5565b6129446101326126e583614046565b600061360283611500565b90506000613625846001600160a01b031660009081526097602052604090205490565b6001600160a01b038581166000818152610130602052604080822080546001600160a01b031916898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46129448284836141f7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156136c55750600090506003613772565b8460ff16601b141580156136dd57508460ff16601c14155b156136ee5750600090506004613772565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613742573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661376b57600060019250925050613772565b9150600090505b94509492505050565b600081600481111561379d57634e487b7160e01b600052602160045260246000fd5b14156137a85761109a565b60018160048111156137ca57634e487b7160e01b600052602160045260246000fd5b14156138185760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d60565b600281600481111561383a57634e487b7160e01b600052602160045260246000fd5b14156138885760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d60565b60038160048111156138aa57634e487b7160e01b600052602160045260246000fd5b14156139035760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d60565b600481600481111561392557634e487b7160e01b600052602160045260246000fd5b141561109a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d60565b60008381526101c76020526040902081831061399a5750612754565b6002600082826139aa8688614b9a565b6139b49190614bb2565b815481106139d257634e487b7160e01b600052603260045260246000fd5b6000918252602090912060029091020154905084845b80821015613cf9575b82858381548110613a1257634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600001541015613a3a57613a3382614c80565b91506139f1565b82858281548110613a5b57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600001541115613a8357613a7c81614c34565b9050613a3a565b848181548110613aa357634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154858381548110613ad557634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600001541115613ce857848181548110613b0d57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154858381548110613b3f57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154868481548110613b7157634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000016000888581548110613ba457634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102019290925591909155508454859082908110613bdf57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160009054906101000a90046001600160a01b0316858381548110613c2457634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160009054906101000a90046001600160a01b0316868481548110613c6957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001016000888581548110613c9c57634e487b7160e01b600052603260045260246000fd5b6000918252602090912060016002909202010180546001600160a01b039485166001600160a01b031990911617905581549383166101009190910a908102920219909216179055613cf4565b613cf182614c80565b91505b6139e8565b86811115613d1157613d118888613008600185614bf1565b613d2688613d20836001614b9a565b8861397e565b5050505050505050565b613d3a8282614336565b6099546001600160e01b031015613dac5760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b6064820152608401610d60565b61294461013261275983614046565b600054610100900460ff16613de25760405162461bcd60e51b8152600401610d6090614b4f565b6117f233612e31565b600054610100900460ff16613e125760405162461bcd60e51b8152600401610d6090614b4f565b81516020928301208151919092012060c99190915560ca55565b600054610100900460ff16613e535760405162461bcd60e51b8152600401610d6090614b4f565b507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c960fe55565b6060613e898484600085614429565b949350505050565b612754613e9d84611500565b613ea684611500565b836141f7565b60608315613ebb575081610fbe565b825115613ecb5782518084602001fd5b8160405162461bcd60e51b8152600401610d609190614a4f565b6001600160a01b038216613f455760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610d60565b613f5182600083613380565b6001600160a01b03821660009081526097602052604090205481811015613fc55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610d60565b6001600160a01b0383166000908152609760205260408120838303905560998054849290613ff4908490614bf1565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3612754836000846133e8565b82546000908190801561409f578561405f600183614bf1565b8154811061407d57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b03166140a2565b60005b6001600160e01b031692506140bb83858763ffffffff16565b9150600081118015614107575043866140d5600184614bf1565b815481106140f357634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff16145b156141755761411582614546565b86614121600184614bf1565b8154811061413f57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b031602179055506141ee565b85604051806040016040528061418a43612dc8565b63ffffffff16815260200161419e85614546565b6001600160e01b039081169091528254600181018455600093845260209384902083519101805493909401519091166401000000000263ffffffff91821663ffffffff1990931692909217161790555b50935093915050565b816001600160a01b0316836001600160a01b0316141580156142195750600081115b15612754576001600160a01b038316156142a8576001600160a01b0383166000908152610131602052604081208190614255906126e585614046565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161429d929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615612754576001600160a01b03821660009081526101316020526040812081906142df9061275985614046565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051614327929190918252602082015260400190565b60405180910390a25050505050565b6001600160a01b03821661438c5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610d60565b61439860008383613380565b80609960008282546143aa9190614b9a565b90915550506001600160a01b038216600090815260976020526040812080548392906143d7908490614b9a565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36113b5600083836133e8565b60608247101561448a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d60565b843b6144d85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d60565b600080866001600160a01b031685876040516144f49190614a33565b60006040518083038185875af1925050503d8060008114614531576040519150601f19603f3d011682016040523d82523d6000602084013e614536565b606091505b5091509150612558828286613eac565b60006001600160e01b03821115612e2d5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610d60565b8280546145bb90614c4b565b90600052602060002090601f0160209004810192826145dd5760008555614623565b82601f106145f657805160ff1916838001178555614623565b82800160010185558215614623579182015b82811115614623578251825591602001919060010190614608565b50612e2d9291505b80821115612e2d576000815560010161462b565b803560ff8116811461151d57600080fd5b600060208284031215614661578081fd5b8135610fbe81614cc7565b6000806040838503121561467e578081fd5b823561468981614cc7565b9150602083013561469981614cc7565b809150509250929050565b6000806000606084860312156146b8578081fd5b83356146c381614cc7565b925060208401356146d381614cc7565b929592945050506040919091013590565b600080600080600080600060e0888a0312156146fe578283fd5b873561470981614cc7565b9650602088013561471981614cc7565b955060408801359450606088013593506147356080890161463f565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215614763578182fd5b823561476e81614cc7565b9150602083013567ffffffffffffffff8082111561478a578283fd5b818501915085601f83011261479d578283fd5b8135818111156147af576147af614cb1565b604051601f8201601f19908116603f011681019083821181831017156147d7576147d7614cb1565b816040528281528860208487010111156147ef578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008060408385031215614822578182fd5b823561482d81614cc7565b946020939093013593505050565b60008060008060008060c08789031215614853578182fd5b863561485e81614cc7565b9550602087013594506040870135935061487a6060880161463f565b92506080870135915060a087013590509295509295509295565b600080604083850312156148a6578182fd5b82356148b181614cc7565b9150602083013563ffffffff81168114614699578182fd5b6000602082840312156148da578081fd5b8151610fbe81614cdc565b600080600080608085870312156148fa578384fd5b843561490581614cc7565b9350602085013561491581614cc7565b93969395505050506040820135916060013590565b60006020828403121561493b578081fd5b5035919050565b600060208284031215614953578081fd5b5051919050565b6000806040838503121561496c578182fd5b82359150602083013561469981614cc7565b600080600060608486031215614992578081fd5b8335925060208401356146d381614cc7565b6000806000606084860312156149b8578081fd5b8335925060208401356149ca81614cc7565b915060408401356149da81614cdc565b809150509250925092565b600080604083850312156149f7578182fd5b50508035926020909101359150565b600080600060608486031215614a1a578081fd5b833592506020840135915060408401356149da81614cdc565b60008251614a45818460208701614c08565b9190910192915050565b6000602082528251806020840152614a6e816040850160208701614c08565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115614bad57614bad614c9b565b500190565b600082614bcd57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615614bec57614bec614c9b565b500290565b600082821015614c0357614c03614c9b565b500390565b60005b83811015614c23578181015183820152602001614c0b565b838111156129445750506000910152565b600081614c4357614c43614c9b565b506000190190565b600281046001821680614c5f57607f821691505b60208210811415612f1c57634e487b7160e01b600052602260045260246000fd5b6000600019821415614c9457614c94614c9b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461109a57600080fd5b801515811461109a57600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b3f516e770d1e45412a8258f846a4ffb248da8c5f5cb62548f37eb99d67c033764736f6c63430008020033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.