Contract Address Details
0x579BACCd9DdF3D9e652174c0714DBC0CD4700dF2
- Contract Name
- MasterChefV2
- Creator
- 0x178d10–20aa6f at 0x0d2ad5–c56cef
- Balance
- 0 Doge
- Tokens
-
Fetching tokens...
- Transactions
- 8,486 Transactions
- Transfers
- 17,821 Transfers
- Gas Used
- 966,445,217
- Last Balance Update
- 26892930
Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
- Contract name:
- MasterChefV2
- Optimization enabled
- true
- Compiler version
- v0.8.4+commit.c7e474f2
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2022-08-22T15:38:57.734906Z
Constructor Arguments
00000000000000000000000055bd2a3904c09547c3a5899704f1207ee61878be000000000000000000000000ea04706c93e4264eab0320f1ce7a43aa714a779900000000000000000000000000000000000000000000000000842b5e4d77261800000000000000000000000000000000000000000000000000000000630a77c0
Arg [0] (address) : 0x55bd2a3904c09547c3a5899704f1207ee61878be
Arg [1] (address) : 0xea04706c93e4264eab0320f1ce7a43aa714a7799
Arg [2] (uint256) : 37202380952380952
Arg [3] (uint256) : 1661630400
Contract source code
// Sources flattened with hardhat v2.9.3 https://hardhat.org // File contracts/contracts/libs/IERC20.sol pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); } // File @openzeppelin/contracts/utils/Address.sol@v4.5.0 // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return 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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(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); } } } } // File contracts/contracts/libs/SafeERC20.sol pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File @openzeppelin/contracts/utils/Context.sol@v4.5.0 // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File @openzeppelin/contracts/access/Ownable.sol@v4.5.0 // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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); } } // File @openzeppelin/contracts/security/ReentrancyGuard.sol@v4.5.0 // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File contracts/contracts/libs/IERC20Metadata.sol pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // File contracts/contracts/libs/ERC20.sol pragma solidity ^0.8.0; /** * @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 guidelines: functions revert instead * of 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 ERC20 is Context, IERC20, IERC20Metadata, Ownable { 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. */ constructor(string memory name_, string memory symbol_) { _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 {} } // File contracts/contracts/DogiumToken.sol pragma solidity ^0.8.0; // DogiumToken with Governance. contract DogiumToken is ERC20('DOGIUM', 'DOGIUM') { constructor() { _mint(address(0x178d10e5845f35967A9385819a6402006620AA6F), uint256(55e3 * 1e18)); } /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); } } // File contracts/contracts/MasterChefV2.sol pragma solidity ^0.8.0; // MasterChef is the master of Dogium. He can make Dogium and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once DOGIUM is sufficiently // distributed and the community can show to govern itself. // // Have fun reading it. Hopefully it's bug-free. God bless. contract MasterChefV2 is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount of DOGIUMs // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accDogiumPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accDogiumPerShare` (and `lastRewardTimestamp`) 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 { IERC20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. DOGIUMs to distribute per second. uint256 lastRewardTimestamp; // Last timestamp that DOGIUMs distribution occurs. uint256 accDogiumPerShare; // Accumulated DOGIUMs per share, times 1e12. See below. uint16 depositFeeBP; // Deposit fee in basis points uint256 lpSupply; } uint256 public constant dogiumMaximumSupply = 100 * (10 ** 3) * (10 ** 18); // The DOGIUM TOKEN! DogiumToken public dogium; // DOGIUM tokens created per second. uint256 public dogiumPerSecond; // Deposit Fee address address public feeAddress; // 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 = 0; // The timestamp when DOGIUM mining starts. uint256 public startTimestamp; // The timestamp when DOGIUM mining ends. uint256 public emmissionEndTimestamp = type(uint256).max; event addPool(uint256 indexed pid, address lpToken, uint256 allocPoint, uint256 depositFeeBP); event setPool(uint256 indexed pid, address lpToken, uint256 allocPoint, uint256 depositFeeBP); 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 SetFeeAddress(address indexed user, address indexed newAddress); event UpdateStartTimestamp(uint256 newStartTimestamp); constructor( DogiumToken _dogium, address _feeAddress, uint256 _dogiumPerSecond, uint256 _startTimestamp ) public { dogium = _dogium; feeAddress = _feeAddress; dogiumPerSecond = _dogiumPerSecond; startTimestamp = _startTimestamp; } function poolLength() external view returns (uint256) { return poolInfo.length; } mapping(IERC20 => bool) public poolExistence; modifier nonDuplicated(IERC20 _lpToken) { require(poolExistence[_lpToken] == false, "nonDuplicated: duplicated"); _; } // Add a new lp to the pool. Can only be called by the owner. function add(uint256 _allocPoint, IERC20 _lpToken, uint16 _depositFeeBP, bool _withUpdate) external onlyOwner nonDuplicated(_lpToken) { // Make sure the provided token is ERC20 //_lpToken.balanceOf(address(this)); require(_depositFeeBP <= 401, "add: invalid deposit fee basis points"); if (_withUpdate) { massUpdatePools(); } uint256 lastRewardTimestamp = block.timestamp > startTimestamp ? block.timestamp : startTimestamp; totalAllocPoint = totalAllocPoint + _allocPoint; poolExistence[_lpToken] = true; poolInfo.push(PoolInfo({ lpToken : _lpToken, allocPoint : _allocPoint, lastRewardTimestamp : lastRewardTimestamp, accDogiumPerShare : 0, depositFeeBP : _depositFeeBP, lpSupply: 0 })); emit addPool(poolInfo.length - 1, address(_lpToken), _allocPoint, _depositFeeBP); } // Update the given pool's DOGIUM allocation point and deposit fee. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP, bool _withUpdate) external onlyOwner { require(_depositFeeBP <= 401, "set: invalid deposit fee basis points"); if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint; poolInfo[_pid].allocPoint = _allocPoint; poolInfo[_pid].depositFeeBP = _depositFeeBP; emit setPool(_pid, address(poolInfo[_pid].lpToken), _allocPoint, _depositFeeBP); } // Return reward multiplier over the given _from to _to unix timestamp. function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { // As we set the multiplier to 0 here after emmissionEndTimestamp // deposits aren't blocked after farming ends. if (_from > emmissionEndTimestamp) return 0; if (_to > emmissionEndTimestamp) return emmissionEndTimestamp - _from; else return _to - _from; } // View function to see pending DOGIUMs on frontend. function pendingDogium(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accDogiumPerShare = pool.accDogiumPerShare; if (block.timestamp > pool.lastRewardTimestamp && pool.lpSupply != 0) { uint256 multiplier = getMultiplier(pool.lastRewardTimestamp, block.timestamp); uint256 dogiumReward = (multiplier * dogiumPerSecond * pool.allocPoint) / totalAllocPoint; accDogiumPerShare = accDogiumPerShare + ((dogiumReward * 1e12) / pool.lpSupply); } return ((user.amount * accDogiumPerShare) / 1e12) - user.rewardDebt; } // 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]; if (block.timestamp <= pool.lastRewardTimestamp) { return; } if (pool.lpSupply == 0 || pool.allocPoint == 0) { pool.lastRewardTimestamp = block.timestamp; return; } uint256 multiplier = getMultiplier(pool.lastRewardTimestamp, block.timestamp); uint256 dogiumReward = (multiplier * dogiumPerSecond * pool.allocPoint) / totalAllocPoint; // This shouldn't happen, but just in case we stop rewards. if (dogium.totalSupply() > dogiumMaximumSupply) dogiumReward = 0; else if ((dogium.totalSupply() + dogiumReward) > dogiumMaximumSupply) dogiumReward = dogiumMaximumSupply - dogium.totalSupply(); if (dogiumReward > 0) dogium.mint(address(this), dogiumReward); // The first time we reach DOGIUMs max supply we solidify the end of farming. if (dogium.totalSupply() >= dogiumMaximumSupply && emmissionEndTimestamp == type(uint256).max) emmissionEndTimestamp = block.timestamp; pool.accDogiumPerShare = pool.accDogiumPerShare + ((dogiumReward * 1e12) / pool.lpSupply); pool.lastRewardTimestamp = block.timestamp; } // Deposit LP tokens to MasterChef for DOGIUM allocation. function deposit(uint256 _pid, uint256 _amount) external nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); if (user.amount > 0) { uint256 pending = ((user.amount * pool.accDogiumPerShare) / 1e12) - user.rewardDebt; if (pending > 0) { safeDogiumTransfer(msg.sender, pending); } } if (_amount > 0) { uint256 balanceBefore = pool.lpToken.balanceOf(address(this)); pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount); _amount = pool.lpToken.balanceOf(address(this)) - balanceBefore; require(_amount > 0, "we dont accept deposits of 0 size"); if (pool.depositFeeBP > 0) { uint256 depositFee = (_amount * pool.depositFeeBP) / 10000; pool.lpToken.safeTransfer(feeAddress, depositFee); user.amount = user.amount + _amount - depositFee; pool.lpSupply = pool.lpSupply + _amount - depositFee; } else { user.amount = user.amount + _amount; pool.lpSupply = pool.lpSupply + _amount; } } user.rewardDebt = (user.amount * pool.accDogiumPerShare) / 1e12; emit Deposit(msg.sender, _pid, _amount); } // Withdraw LP tokens from MasterChef. function withdraw(uint256 _pid, uint256 _amount) external nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 pending = ((user.amount * pool.accDogiumPerShare) / 1e12) - user.rewardDebt; if (pending > 0) { safeDogiumTransfer(msg.sender, pending); } if (_amount > 0) { user.amount = user.amount - _amount; pool.lpToken.safeTransfer(address(msg.sender), _amount); pool.lpSupply = pool.lpSupply - _amount; } user.rewardDebt = (user.amount * pool.accDogiumPerShare) / 1e12; emit Withdraw(msg.sender, _pid, _amount); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) external nonReentrant { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 amount = user.amount; user.amount = 0; user.rewardDebt = 0; pool.lpToken.safeTransfer(address(msg.sender), amount); // In the case of an accounting error, we choose to let the user emergency withdraw anyway if (pool.lpSupply >= amount) pool.lpSupply = pool.lpSupply - amount; else pool.lpSupply = 0; emit EmergencyWithdraw(msg.sender, _pid, amount); } // Safe dogium transfer function, just in case if rounding error causes pool to not have enough DOGIUMs. function safeDogiumTransfer(address _to, uint256 _amount) internal { uint256 dogiumBal = dogium.balanceOf(address(this)); bool transferSuccess = false; if (_amount > dogiumBal) { transferSuccess = dogium.transfer(_to, dogiumBal); } else { transferSuccess = dogium.transfer(_to, _amount); } require(transferSuccess, "safeDogiumTransfer: transfer failed"); } function setFeeAddress(address _feeAddress) external { require(msg.sender == feeAddress, "setFeeAddress: FORBIDDEN"); require(_feeAddress != address(0), "!nonzero"); feeAddress = _feeAddress; emit SetFeeAddress(msg.sender, _feeAddress); } function setStartTimestamp(uint256 _newStartTimestamp) external onlyOwner { require(poolInfo.length == 0, "no changing start time after pools have been added"); require(block.timestamp < startTimestamp, "cannot change start time if sale has already commenced"); require(block.timestamp < _newStartTimestamp, "cannot set start bltimeock in the past"); startTimestamp = _newStartTimestamp; emit UpdateStartTimestamp(startTimestamp); } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_dogium","internalType":"contract DogiumToken"},{"type":"address","name":"_feeAddress","internalType":"address"},{"type":"uint256","name":"_dogiumPerSecond","internalType":"uint256"},{"type":"uint256","name":"_startTimestamp","internalType":"uint256"}]},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SetFeeAddress","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"newAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateStartTimestamp","inputs":[{"type":"uint256","name":"newStartTimestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"addPool","inputs":[{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"address","name":"lpToken","internalType":"address","indexed":false},{"type":"uint256","name":"allocPoint","internalType":"uint256","indexed":false},{"type":"uint256","name":"depositFeeBP","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"setPool","inputs":[{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"address","name":"lpToken","internalType":"address","indexed":false},{"type":"uint256","name":"allocPoint","internalType":"uint256","indexed":false},{"type":"uint256","name":"depositFeeBP","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"add","inputs":[{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"address","name":"_lpToken","internalType":"contract IERC20"},{"type":"uint16","name":"_depositFeeBP","internalType":"uint16"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract DogiumToken"}],"name":"dogium","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dogiumMaximumSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dogiumPerSecond","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"emmissionEndTimestamp","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMultiplier","inputs":[{"type":"uint256","name":"_from","internalType":"uint256"},{"type":"uint256","name":"_to","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"massUpdatePools","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingDogium","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"poolExistence","inputs":[{"type":"address","name":"","internalType":"contract IERC20"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"lpToken","internalType":"contract IERC20"},{"type":"uint256","name":"allocPoint","internalType":"uint256"},{"type":"uint256","name":"lastRewardTimestamp","internalType":"uint256"},{"type":"uint256","name":"accDogiumPerShare","internalType":"uint256"},{"type":"uint16","name":"depositFeeBP","internalType":"uint16"},{"type":"uint256","name":"lpSupply","internalType":"uint256"}],"name":"poolInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"uint16","name":"_depositFeeBP","internalType":"uint16"},{"type":"bool","name":"_withUpdate","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeAddress","inputs":[{"type":"address","name":"_feeAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStartTimestamp","inputs":[{"type":"uint256","name":"_newStartTimestamp","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startTimestamp","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalAllocPoint","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updatePool","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"rewardDebt","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
Contract Creation Code
0x608060405260006007556000196009553480156200001c57600080fd5b506040516200219d3803806200219d8339810160408190526200003f91620000dd565b6200004a336200008d565b60018055600280546001600160a01b039586166001600160a01b031991821617909155600480549490951693169290921790925560039190915560085562000142565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060008060808587031215620000f3578384fd5b8451620001008162000129565b6020860151909450620001138162000129565b6040860151606090960151949790965092505050565b6001600160a01b03811681146200013f57600080fd5b50565b61204b80620001526000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806384e82a33116100de578063c44bef7511610097578063e2bbb15811610071578063e2bbb1581461037e578063e6fd48bc14610391578063e84b7bae1461039a578063f2fde38b146103ab57600080fd5b8063c44bef7514610325578063cbd258b514610338578063d96384221461036b57600080fd5b806384e82a33146102815780638705fcd4146102945780638da5cb5b146102a75780638dbb1e3a146102b857806393f1a40b146102cb5780639fb0a15b1461031257600080fd5b806351eb05a61161013057806351eb05a61461022f5780635312ea8e1461024257806360cb841914610255578063630b5ba11461025e578063645df0e614610266578063715018a61461027957600080fd5b8063081e3eda146101785780631526fe271461018f57806317caf6f1146101dd57806341275358146101e6578063441a3e70146102115780634c13131814610226575b600080fd5b6005545b6040519081526020015b60405180910390f35b6101a261019d366004611d70565b6103be565b604080516001600160a01b039097168752602087019590955293850192909252606084015261ffff16608083015260a082015260c001610186565b61017c60075481565b6004546101f9906001600160a01b031681565b6040516001600160a01b039091168152602001610186565b61022461021f366004611e1f565b610415565b005b61017c60035481565b61022461023d366004611d70565b6105d5565b610224610250366004611d70565b6109a1565b61017c60095481565b610224610aab565b61017c610274366004611da0565b610ad6565b610224610bf4565b61022461028f366004611dcf565b610c2a565b6102246102a2366004611d38565b610f2c565b6000546001600160a01b03166101f9565b61017c6102c6366004611e1f565b611013565b6102fd6102d9366004611da0565b60066020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610186565b6002546101f9906001600160a01b031681565b610224610333366004611d70565b611050565b61035b610346366004611d38565b600a6020526000908152604090205460ff1681565b6040519015158152602001610186565b610224610379366004611e40565b6111ee565b61022461038c366004611e1f565b6113e6565b61017c60085481565b61017c69152d02c7e14af680000081565b6102246103b9366004611d38565b611744565b600581815481106103ce57600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909261ffff9091169086565b600260015414156104415760405162461bcd60e51b815260040161043890611ef0565b60405180910390fd5b600260018190555060006005838154811061046c57634e487b7160e01b600052603260045260246000fd5b60009182526020808320868452600680835260408086203387529093529190932080549290910290920192508311156104dc5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610438565b6104e5846105d5565b6000816001015464e8d4a51000846003015484600001546105069190611f5f565b6105109190611f3f565b61051a9190611f7e565b9050801561052c5761052c33826117df565b831561056d57815461053f908590611f7e565b82558254610557906001600160a01b031633866119dc565b8383600501546105679190611f7e565b60058401555b6003830154825464e8d4a510009161058491611f5f565b61058e9190611f3f565b6001830155604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b6000600582815481106105f857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201905080600201544211610617575050565b6005810154158061062a57506001810154155b15610639574260029091015550565b6000610649826002015442611013565b905060006007548360010154600354846106639190611f5f565b61066d9190611f5f565b6106779190611f3f565b905069152d02c7e14af6800000600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106d257600080fd5b505afa1580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a9190611d88565b111561071857506000610857565b69152d02c7e14af680000081600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561077257600080fd5b505afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d88565b6107b49190611f27565b111561085757600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561080857600080fd5b505afa15801561081c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108409190611d88565b6108549069152d02c7e14af6800000611f7e565b90505b80156108c2576002546040516340c10f1960e01b8152306004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b1580156108a957600080fd5b505af11580156108bd573d6000803e3d6000fd5b505050505b600254604080516318160ddd60e01b8152905169152d02c7e14af6800000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561091057600080fd5b505afa158015610924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109489190611d88565b101580156109595750600019600954145b1561096357426009555b60058301546109778264e8d4a51000611f5f565b6109819190611f3f565b83600301546109909190611f27565b600384015550504260029091015550565b600260015414156109c45760405162461bcd60e51b815260040161043890611ef0565b60026001819055506000600582815481106109ef57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600680835260408086203380885294528520805486825560018201969096559302018054909450919291610a3c916001600160a01b0390911690836119dc565b80836005015410610a6157808360050154610a579190611f7e565b6005840155610a69565b600060058401555b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a35050600180555050565b60055460005b81811015610ad257610ac2816105d5565b610acb81611fc1565b9050610ab1565b5050565b60008060058481548110610afa57634e487b7160e01b600052603260045260246000fd5b60009182526020808320878452600680835260408086206001600160a01b038a168752909352919093209102909101600381015460028201549193509042118015610b485750600583015415155b15610bbb576000610b5d846002015442611013565b90506000600754856001015460035484610b779190611f5f565b610b819190611f5f565b610b8b9190611f3f565b6005860154909150610ba28264e8d4a51000611f5f565b610bac9190611f3f565b610bb69084611f27565b925050505b6001820154825464e8d4a5100090610bd4908490611f5f565b610bde9190611f3f565b610be89190611f7e565b93505050505b92915050565b6000546001600160a01b03163314610c1e5760405162461bcd60e51b815260040161043890611ebb565b610c286000611a44565b565b6000546001600160a01b03163314610c545760405162461bcd60e51b815260040161043890611ebb565b6001600160a01b0383166000908152600a6020526040902054839060ff1615610cbf5760405162461bcd60e51b815260206004820152601960248201527f6e6f6e4475706c6963617465643a206475706c696361746564000000000000006044820152606401610438565b6101918361ffff161115610d235760405162461bcd60e51b815260206004820152602560248201527f6164643a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b6064820152608401610438565b8115610d3157610d31610aab565b60006008544211610d4457600854610d46565b425b905085600754610d569190611f27565b6007556001600160a01b038581166000818152600a602090815260408083208054600160ff199091168117909155815160c0810183529485529184018b81529084018681526060850184815261ffff8b81166080880190815260a088018781526005805480890182559881905298517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0600690990298890180546001600160a01b03191691909b161790995593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db187015591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2860155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db385015590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db48401805461ffff19169190921617905592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db59091015554610ed89190611f7e565b604080516001600160a01b03881681526020810189905261ffff87168183015290517faa6642278d4bbef86d8990c37355d5d4dfe365c194106bdf7a65162268606f079181900360600190a2505050505050565b6004546001600160a01b03163314610f865760405162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e00000000000000006044820152606401610438565b6001600160a01b038116610fc75760405162461bcd60e51b8152602060048201526008602482015267216e6f6e7a65726f60c01b6044820152606401610438565b600480546001600160a01b0319166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b600060095483111561102757506000610bee565b600954821115611046578260095461103f9190611f7e565b9050610bee565b61103f8383611f7e565b6000546001600160a01b0316331461107a5760405162461bcd60e51b815260040161043890611ebb565b600554156110e55760405162461bcd60e51b815260206004820152603260248201527f6e6f206368616e67696e672073746172742074696d6520616674657220706f6f6044820152711b1cc81a185d99481899595b88185919195960721b6064820152608401610438565b60085442106111555760405162461bcd60e51b815260206004820152603660248201527f63616e6e6f74206368616e67652073746172742074696d652069662073616c65604482015275081a185cc8185b1c9958591e4818dbdb5b595b98d95960521b6064820152608401610438565b8042106111b35760405162461bcd60e51b815260206004820152602660248201527f63616e6e6f742073657420737461727420626c74696d656f636b20696e20746860448201526519481c185cdd60d21b6064820152608401610438565b60088190556040518181527fa90edae3cef11606c5bb1d88f07e1a75420ce8660ece07077deb4a1e358e99b49060200160405180910390a150565b6000546001600160a01b031633146112185760405162461bcd60e51b815260040161043890611ebb565b6101918261ffff16111561127c5760405162461bcd60e51b815260206004820152602560248201527f7365743a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b6064820152608401610438565b801561128a5761128a610aab565b82600585815481106112ac57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201600101546007546112cb9190611f7e565b6112d59190611f27565b60078190555082600585815481106112fd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160010181905550816005858154811061133457634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160040160006101000a81548161ffff021916908361ffff160217905550837f39f0c3d078af018954b4fa56832a05a2b511afaa999b133ea3f1c487c21ed287600586815481106113a257634e487b7160e01b600052603260045260246000fd5b60009182526020918290206006919091020154604080516001600160a01b03909216825291810187905261ffff86168183015290519081900360600190a250505050565b600260015414156114095760405162461bcd60e51b815260040161043890611ef0565b600260018190555060006005838154811061143457634e487b7160e01b600052603260045260246000fd5b60009182526020808320868452600680835260408086203387529093529190932091029091019150611465846105d5565b8054156114b5576000816001015464e8d4a510008460030154846000015461148d9190611f5f565b6114979190611f3f565b6114a19190611f7e565b905080156114b3576114b333826117df565b505b82156116ea5781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156114fe57600080fd5b505afa158015611512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115369190611d88565b8354909150611550906001600160a01b0316333087611a94565b82546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b15801561159257600080fd5b505afa1580156115a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ca9190611d88565b6115d49190611f7e565b9350600084116116305760405162461bcd60e51b815260206004820152602160248201527f776520646f6e7420616363657074206465706f73697473206f6620302073697a6044820152606560f81b6064820152608401610438565b600483015461ffff16156116c3576004830154600090612710906116589061ffff1687611f5f565b6116629190611f3f565b6004548554919250611681916001600160a01b039081169116836119dc565b82548190611690908790611f27565b61169a9190611f7e565b8355600584015481906116ae908790611f27565b6116b89190611f7e565b6005850155506116e8565b81546116d0908590611f27565b825560058301546116e2908590611f27565b60058401555b505b6003820154815464e8d4a510009161170191611f5f565b61170b9190611f3f565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610a99565b6000546001600160a01b0316331461176e5760405162461bcd60e51b815260040161043890611ebb565b6001600160a01b0381166117d35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610438565b6117dc81611a44565b50565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561182357600080fd5b505afa158015611837573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185b9190611d88565b90506000818311156118f45760025460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b1580156118b557600080fd5b505af11580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed9190611d54565b905061197d565b60025460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529091169063a9059cbb90604401602060405180830381600087803b15801561194257600080fd5b505af1158015611956573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197a9190611d54565b90505b806119d65760405162461bcd60e51b815260206004820152602360248201527f73616665446f6769756d5472616e736665723a207472616e73666572206661696044820152621b195960ea1b6064820152608401610438565b50505050565b6040516001600160a01b038316602482015260448101829052611a3f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611acc565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526119d69085906323b872dd60e01b90608401611a08565b6000611b21826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b9e9092919063ffffffff16565b805190915015611a3f5780806020019051810190611b3f9190611d54565b611a3f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610438565b6060611bad8484600085611bb7565b90505b9392505050565b606082471015611c185760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610438565b6001600160a01b0385163b611c6f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610438565b600080866001600160a01b03168587604051611c8b9190611e6c565b60006040518083038185875af1925050503d8060008114611cc8576040519150601f19603f3d011682016040523d82523d6000602084013e611ccd565b606091505b5091509150611cdd828286611ce8565b979650505050505050565b60608315611cf7575081611bb0565b825115611d075782518084602001fd5b8160405162461bcd60e51b81526004016104389190611e88565b803561ffff81168114611d3357600080fd5b919050565b600060208284031215611d49578081fd5b8135611bb081611ff2565b600060208284031215611d65578081fd5b8151611bb081612007565b600060208284031215611d81578081fd5b5035919050565b600060208284031215611d99578081fd5b5051919050565b60008060408385031215611db2578081fd5b823591506020830135611dc481611ff2565b809150509250929050565b60008060008060808587031215611de4578182fd5b843593506020850135611df681611ff2565b9250611e0460408601611d21565b91506060850135611e1481612007565b939692955090935050565b60008060408385031215611e31578182fd5b50508035926020909101359150565b60008060008060808587031215611e55578384fd5b8435935060208501359250611e0460408601611d21565b60008251611e7e818460208701611f95565b9190910192915050565b6020815260008251806020840152611ea7816040850160208701611f95565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115611f3a57611f3a611fdc565b500190565b600082611f5a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611f7957611f79611fdc565b500290565b600082821015611f9057611f90611fdc565b500390565b60005b83811015611fb0578181015183820152602001611f98565b838111156119d65750506000910152565b6000600019821415611fd557611fd5611fdc565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146117dc57600080fd5b80151581146117dc57600080fdfea2646970667358221220c2706edb494a66569a952b652838f78459c67b66c00c0b4f99c5577583908bd364736f6c6343000804003300000000000000000000000055bd2a3904c09547c3a5899704f1207ee61878be000000000000000000000000ea04706c93e4264eab0320f1ce7a43aa714a779900000000000000000000000000000000000000000000000000842b5e4d77261800000000000000000000000000000000000000000000000000000000630a77c0
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806384e82a33116100de578063c44bef7511610097578063e2bbb15811610071578063e2bbb1581461037e578063e6fd48bc14610391578063e84b7bae1461039a578063f2fde38b146103ab57600080fd5b8063c44bef7514610325578063cbd258b514610338578063d96384221461036b57600080fd5b806384e82a33146102815780638705fcd4146102945780638da5cb5b146102a75780638dbb1e3a146102b857806393f1a40b146102cb5780639fb0a15b1461031257600080fd5b806351eb05a61161013057806351eb05a61461022f5780635312ea8e1461024257806360cb841914610255578063630b5ba11461025e578063645df0e614610266578063715018a61461027957600080fd5b8063081e3eda146101785780631526fe271461018f57806317caf6f1146101dd57806341275358146101e6578063441a3e70146102115780634c13131814610226575b600080fd5b6005545b6040519081526020015b60405180910390f35b6101a261019d366004611d70565b6103be565b604080516001600160a01b039097168752602087019590955293850192909252606084015261ffff16608083015260a082015260c001610186565b61017c60075481565b6004546101f9906001600160a01b031681565b6040516001600160a01b039091168152602001610186565b61022461021f366004611e1f565b610415565b005b61017c60035481565b61022461023d366004611d70565b6105d5565b610224610250366004611d70565b6109a1565b61017c60095481565b610224610aab565b61017c610274366004611da0565b610ad6565b610224610bf4565b61022461028f366004611dcf565b610c2a565b6102246102a2366004611d38565b610f2c565b6000546001600160a01b03166101f9565b61017c6102c6366004611e1f565b611013565b6102fd6102d9366004611da0565b60066020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610186565b6002546101f9906001600160a01b031681565b610224610333366004611d70565b611050565b61035b610346366004611d38565b600a6020526000908152604090205460ff1681565b6040519015158152602001610186565b610224610379366004611e40565b6111ee565b61022461038c366004611e1f565b6113e6565b61017c60085481565b61017c69152d02c7e14af680000081565b6102246103b9366004611d38565b611744565b600581815481106103ce57600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941695509193909261ffff9091169086565b600260015414156104415760405162461bcd60e51b815260040161043890611ef0565b60405180910390fd5b600260018190555060006005838154811061046c57634e487b7160e01b600052603260045260246000fd5b60009182526020808320868452600680835260408086203387529093529190932080549290910290920192508311156104dc5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610438565b6104e5846105d5565b6000816001015464e8d4a51000846003015484600001546105069190611f5f565b6105109190611f3f565b61051a9190611f7e565b9050801561052c5761052c33826117df565b831561056d57815461053f908590611f7e565b82558254610557906001600160a01b031633866119dc565b8383600501546105679190611f7e565b60058401555b6003830154825464e8d4a510009161058491611f5f565b61058e9190611f3f565b6001830155604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505060018055505050565b6000600582815481106105f857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201905080600201544211610617575050565b6005810154158061062a57506001810154155b15610639574260029091015550565b6000610649826002015442611013565b905060006007548360010154600354846106639190611f5f565b61066d9190611f5f565b6106779190611f3f565b905069152d02c7e14af6800000600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106d257600080fd5b505afa1580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a9190611d88565b111561071857506000610857565b69152d02c7e14af680000081600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561077257600080fd5b505afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d88565b6107b49190611f27565b111561085757600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561080857600080fd5b505afa15801561081c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108409190611d88565b6108549069152d02c7e14af6800000611f7e565b90505b80156108c2576002546040516340c10f1960e01b8152306004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b1580156108a957600080fd5b505af11580156108bd573d6000803e3d6000fd5b505050505b600254604080516318160ddd60e01b8152905169152d02c7e14af6800000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561091057600080fd5b505afa158015610924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109489190611d88565b101580156109595750600019600954145b1561096357426009555b60058301546109778264e8d4a51000611f5f565b6109819190611f3f565b83600301546109909190611f27565b600384015550504260029091015550565b600260015414156109c45760405162461bcd60e51b815260040161043890611ef0565b60026001819055506000600582815481106109ef57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600680835260408086203380885294528520805486825560018201969096559302018054909450919291610a3c916001600160a01b0390911690836119dc565b80836005015410610a6157808360050154610a579190611f7e565b6005840155610a69565b600060058401555b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a35050600180555050565b60055460005b81811015610ad257610ac2816105d5565b610acb81611fc1565b9050610ab1565b5050565b60008060058481548110610afa57634e487b7160e01b600052603260045260246000fd5b60009182526020808320878452600680835260408086206001600160a01b038a168752909352919093209102909101600381015460028201549193509042118015610b485750600583015415155b15610bbb576000610b5d846002015442611013565b90506000600754856001015460035484610b779190611f5f565b610b819190611f5f565b610b8b9190611f3f565b6005860154909150610ba28264e8d4a51000611f5f565b610bac9190611f3f565b610bb69084611f27565b925050505b6001820154825464e8d4a5100090610bd4908490611f5f565b610bde9190611f3f565b610be89190611f7e565b93505050505b92915050565b6000546001600160a01b03163314610c1e5760405162461bcd60e51b815260040161043890611ebb565b610c286000611a44565b565b6000546001600160a01b03163314610c545760405162461bcd60e51b815260040161043890611ebb565b6001600160a01b0383166000908152600a6020526040902054839060ff1615610cbf5760405162461bcd60e51b815260206004820152601960248201527f6e6f6e4475706c6963617465643a206475706c696361746564000000000000006044820152606401610438565b6101918361ffff161115610d235760405162461bcd60e51b815260206004820152602560248201527f6164643a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b6064820152608401610438565b8115610d3157610d31610aab565b60006008544211610d4457600854610d46565b425b905085600754610d569190611f27565b6007556001600160a01b038581166000818152600a602090815260408083208054600160ff199091168117909155815160c0810183529485529184018b81529084018681526060850184815261ffff8b81166080880190815260a088018781526005805480890182559881905298517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0600690990298890180546001600160a01b03191691909b161790995593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db187015591517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2860155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db385015590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db48401805461ffff19169190921617905592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db59091015554610ed89190611f7e565b604080516001600160a01b03881681526020810189905261ffff87168183015290517faa6642278d4bbef86d8990c37355d5d4dfe365c194106bdf7a65162268606f079181900360600190a2505050505050565b6004546001600160a01b03163314610f865760405162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e00000000000000006044820152606401610438565b6001600160a01b038116610fc75760405162461bcd60e51b8152602060048201526008602482015267216e6f6e7a65726f60c01b6044820152606401610438565b600480546001600160a01b0319166001600160a01b03831690811790915560405133907fd44190acf9d04bdb5d3a1aafff7e6dee8b40b93dfb8c5d3f0eea4b9f4539c3f790600090a350565b600060095483111561102757506000610bee565b600954821115611046578260095461103f9190611f7e565b9050610bee565b61103f8383611f7e565b6000546001600160a01b0316331461107a5760405162461bcd60e51b815260040161043890611ebb565b600554156110e55760405162461bcd60e51b815260206004820152603260248201527f6e6f206368616e67696e672073746172742074696d6520616674657220706f6f6044820152711b1cc81a185d99481899595b88185919195960721b6064820152608401610438565b60085442106111555760405162461bcd60e51b815260206004820152603660248201527f63616e6e6f74206368616e67652073746172742074696d652069662073616c65604482015275081a185cc8185b1c9958591e4818dbdb5b595b98d95960521b6064820152608401610438565b8042106111b35760405162461bcd60e51b815260206004820152602660248201527f63616e6e6f742073657420737461727420626c74696d656f636b20696e20746860448201526519481c185cdd60d21b6064820152608401610438565b60088190556040518181527fa90edae3cef11606c5bb1d88f07e1a75420ce8660ece07077deb4a1e358e99b49060200160405180910390a150565b6000546001600160a01b031633146112185760405162461bcd60e51b815260040161043890611ebb565b6101918261ffff16111561127c5760405162461bcd60e51b815260206004820152602560248201527f7365743a20696e76616c6964206465706f7369742066656520626173697320706044820152646f696e747360d81b6064820152608401610438565b801561128a5761128a610aab565b82600585815481106112ac57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201600101546007546112cb9190611f7e565b6112d59190611f27565b60078190555082600585815481106112fd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160010181905550816005858154811061133457634e487b7160e01b600052603260045260246000fd5b906000526020600020906006020160040160006101000a81548161ffff021916908361ffff160217905550837f39f0c3d078af018954b4fa56832a05a2b511afaa999b133ea3f1c487c21ed287600586815481106113a257634e487b7160e01b600052603260045260246000fd5b60009182526020918290206006919091020154604080516001600160a01b03909216825291810187905261ffff86168183015290519081900360600190a250505050565b600260015414156114095760405162461bcd60e51b815260040161043890611ef0565b600260018190555060006005838154811061143457634e487b7160e01b600052603260045260246000fd5b60009182526020808320868452600680835260408086203387529093529190932091029091019150611465846105d5565b8054156114b5576000816001015464e8d4a510008460030154846000015461148d9190611f5f565b6114979190611f3f565b6114a19190611f7e565b905080156114b3576114b333826117df565b505b82156116ea5781546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156114fe57600080fd5b505afa158015611512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115369190611d88565b8354909150611550906001600160a01b0316333087611a94565b82546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b15801561159257600080fd5b505afa1580156115a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ca9190611d88565b6115d49190611f7e565b9350600084116116305760405162461bcd60e51b815260206004820152602160248201527f776520646f6e7420616363657074206465706f73697473206f6620302073697a6044820152606560f81b6064820152608401610438565b600483015461ffff16156116c3576004830154600090612710906116589061ffff1687611f5f565b6116629190611f3f565b6004548554919250611681916001600160a01b039081169116836119dc565b82548190611690908790611f27565b61169a9190611f7e565b8355600584015481906116ae908790611f27565b6116b89190611f7e565b6005850155506116e8565b81546116d0908590611f27565b825560058301546116e2908590611f27565b60058401555b505b6003820154815464e8d4a510009161170191611f5f565b61170b9190611f3f565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610a99565b6000546001600160a01b0316331461176e5760405162461bcd60e51b815260040161043890611ebb565b6001600160a01b0381166117d35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610438565b6117dc81611a44565b50565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561182357600080fd5b505afa158015611837573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185b9190611d88565b90506000818311156118f45760025460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b1580156118b557600080fd5b505af11580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed9190611d54565b905061197d565b60025460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529091169063a9059cbb90604401602060405180830381600087803b15801561194257600080fd5b505af1158015611956573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197a9190611d54565b90505b806119d65760405162461bcd60e51b815260206004820152602360248201527f73616665446f6769756d5472616e736665723a207472616e73666572206661696044820152621b195960ea1b6064820152608401610438565b50505050565b6040516001600160a01b038316602482015260448101829052611a3f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611acc565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526119d69085906323b872dd60e01b90608401611a08565b6000611b21826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b9e9092919063ffffffff16565b805190915015611a3f5780806020019051810190611b3f9190611d54565b611a3f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610438565b6060611bad8484600085611bb7565b90505b9392505050565b606082471015611c185760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610438565b6001600160a01b0385163b611c6f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610438565b600080866001600160a01b03168587604051611c8b9190611e6c565b60006040518083038185875af1925050503d8060008114611cc8576040519150601f19603f3d011682016040523d82523d6000602084013e611ccd565b606091505b5091509150611cdd828286611ce8565b979650505050505050565b60608315611cf7575081611bb0565b825115611d075782518084602001fd5b8160405162461bcd60e51b81526004016104389190611e88565b803561ffff81168114611d3357600080fd5b919050565b600060208284031215611d49578081fd5b8135611bb081611ff2565b600060208284031215611d65578081fd5b8151611bb081612007565b600060208284031215611d81578081fd5b5035919050565b600060208284031215611d99578081fd5b5051919050565b60008060408385031215611db2578081fd5b823591506020830135611dc481611ff2565b809150509250929050565b60008060008060808587031215611de4578182fd5b843593506020850135611df681611ff2565b9250611e0460408601611d21565b91506060850135611e1481612007565b939692955090935050565b60008060408385031215611e31578182fd5b50508035926020909101359150565b60008060008060808587031215611e55578384fd5b8435935060208501359250611e0460408601611d21565b60008251611e7e818460208701611f95565b9190910192915050565b6020815260008251806020840152611ea7816040850160208701611f95565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115611f3a57611f3a611fdc565b500190565b600082611f5a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611f7957611f79611fdc565b500290565b600082821015611f9057611f90611fdc565b500390565b60005b83811015611fb0578181015183820152602001611f98565b838111156119d65750506000910152565b6000600019821415611fd557611fd5611fdc565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146117dc57600080fd5b80151581146117dc57600080fdfea2646970667358221220c2706edb494a66569a952b652838f78459c67b66c00c0b4f99c5577583908bd364736f6c63430008040033