Contract Address Details

0x4c4BF319237D98a30A929A96112EfFa8DA3510EB

Token
StakedThorus (sTHO)
Creator
0x8beca4–dd5448 at 0x998225–50b939
Balance
0 GLMR
Tokens
Fetching tokens...
Transactions
5,034 Transactions
Transfers
14,979 Transfers
Gas Used
727,619,518
Last Balance Update
2431537
Contract name:
ThorusAutoStake




Optimization enabled
false
Compiler version
v0.8.10+commit.fc410830




EVM Version
default




Verified at
2022-01-14 01:33:28.079573Z

Constructor Arguments

000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ce8df46e23e4ec4ffa959af72fac0b6375cd7b5

Arg [0] (address) : 0x735abe48e8782948a37c7765ecb76b98cde97b0f
Arg [1] (address) : 0xeeb84a24e10502d8a5c97b11df381d1550b25b9d
Arg [2] (uint256) : 0
Arg [3] (address) : 0x0ce8df46e23e4ec4ffa959af72fac0b6375cd7b5

              

Contract source code

// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
/*
* @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;
}
}
/**
* @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.
*
* The renounceOwnership removed to prevent accidents
*/
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() {
_setOwner(_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 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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
/**
* @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);
}
/**
* @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);
}
/**
* @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 ERC20 is Context, IERC20, IERC20Metadata {
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 {}
}
/**
* @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
* ====
*/
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 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);
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private 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);
}
}
}
}
/**
* @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");
}
}
}
/**
* @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 Pausable is Context {
/**
* @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 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());
}
}
/**
* @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 make 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;
}
}
interface IThorusMaster {
function deposit(uint256 _pid, uint256 _amount, bool _withdrawRewards) external;
function withdraw(uint256 _pid, uint256 _amount, bool _withdrawRewards) external;
function claim(uint256 _pid) external;
function pendingThorus(uint256 _pid, address _user) external view returns (uint256);
function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256, uint256);
function emergencyWithdraw(uint256 _pid) external;
}
contract ThorusAutoStake is ERC20("StakedThorus", "sTHO"), Ownable, Pausable, ReentrancyGuard {
using SafeERC20 for IERC20;
struct UserInfo {
uint256 lastDepositedTime;
uint256 thorusAtLastUserAction;
uint256 lastUserActionTime;
}
IERC20 public immutable thorus;
IThorusMaster public immutable thorusMaster;
uint256 public immutable stakingPid;
mapping(address => UserInfo) public userInfo;
mapping(address => bool) public whitelistedProxies;
uint256 public lastHarvestedTime;
address public treasury;
uint256 internal constant MAX_PERFORMANCE_FEE = 500;
uint256 internal constant MAX_CALL_FEE = 100;
uint256 internal constant MAX_WITHDRAW_FEE = 200;
uint256 internal constant MAX_WITHDRAW_FEE_PERIOD = 72 hours;
uint256 public performanceFee = 400;
uint256 public callFee = 5;
uint256 public withdrawFee = 0;
uint256 public withdrawFeePeriod = 72 hours;
bool public hadEmergencyWithdrawn = false;
event Deposit(address indexed sender, uint256 amount, uint256 mintSupply, uint256 lastDepositedTime);
event Withdraw(address indexed sender, uint256 currentAmount, uint256 amount);
event Harvest(address indexed sender, uint256 performanceFee, uint256 callFee);
event WhitelistedProxy(address indexed proxy);
event DewhitelistedProxy(address indexed proxy);
event SetTreasury(address indexed treasury);
event SetPerformanceFee(uint256 performanceFee);
event SetCallFee(uint256 callFee);
event SetWithdrawFee(uint256 withdrawFee);
event SetWithdrawFeePeriod(uint256 withdrawFeePeriod);
event EmergencyWithdraw();
constructor(
IERC20 _thorus,
IThorusMaster _thorusMaster,
uint256 _stakingPid,
address _treasury
) {
thorus = _thorus;
thorusMaster = _thorusMaster;
stakingPid = _stakingPid;
treasury = _treasury;
IERC20(_thorus).approve(address(_thorusMaster), type(uint256).max);
}
function whitelistProxy(address _proxy) external onlyOwner {
require(_proxy != address(0), 'zero address');
require(!whitelistedProxies[_proxy], 'proxy already whitelisted');
whitelistedProxies[_proxy] = true;
emit WhitelistedProxy(_proxy);
}
function dewhitelistProxy(address _proxy) external onlyOwner {
require(_proxy != address(0), 'zero address');
require(whitelistedProxies[_proxy], 'proxy not whitelisted');
whitelistedProxies[_proxy] = false;
emit DewhitelistedProxy(_proxy);
}
function deposit(address _user, uint256 _amount) external whenNotPaused nonReentrant {
require(_amount > 0, "Nothing to deposit");
require(_user == msg.sender || whitelistedProxies[msg.sender], 'msg.sender is not allowed proxy');
uint256 pool = thorusBalanceOf();
thorus.safeTransferFrom(msg.sender, address(this), _amount);
uint256 mintSupply = 0;
if (totalSupply() != 0) {
mintSupply = _amount * totalSupply() / pool;
} else {
mintSupply = _amount;
}
UserInfo storage user = userInfo[_user];
_mint(_user, mintSupply);
user.lastDepositedTime = block.timestamp;
user.thorusAtLastUserAction = balanceOf(_user) * thorusBalanceOf() / totalSupply();
user.lastUserActionTime = block.timestamp;
_earn();
emit Deposit(_user, _amount, mintSupply, block.timestamp);
}
function withdrawAll() external {
withdraw(balanceOf(msg.sender));
}
function harvest() external whenNotPaused nonReentrant {
IThorusMaster(thorusMaster).claim(stakingPid);
uint256 bal = available();
uint256 currentPerformanceFee = bal * performanceFee / 10000;
thorus.safeTransfer(treasury, currentPerformanceFee);
uint256 currentCallFee = bal * callFee / 10000;
thorus.safeTransfer(msg.sender, currentCallFee);
_earn();
lastHarvestedTime = block.timestamp;
emit Harvest(msg.sender, currentPerformanceFee, currentCallFee);
}
function setTreasury(address _treasury) external onlyOwner {
require(_treasury != address(0), "Cannot be zero address");
treasury = _treasury;
emit SetTreasury(_treasury);
}
function setPerformanceFee(uint256 _performanceFee) external onlyOwner {
require(_performanceFee <= MAX_PERFORMANCE_FEE, "performanceFee cannot be more than MAX_PERFORMANCE_FEE");
performanceFee = _performanceFee;
emit SetPerformanceFee(_performanceFee);
}
function setCallFee(uint256 _callFee) external onlyOwner {
require(_callFee <= MAX_CALL_FEE, "callFee cannot be more than MAX_CALL_FEE");
callFee = _callFee;
emit SetCallFee(_callFee);
}
function setWithdrawFee(uint256 _withdrawFee) external onlyOwner {
require(_withdrawFee <= MAX_WITHDRAW_FEE, "withdrawFee cannot be more than MAX_WITHDRAW_FEE");
withdrawFee = _withdrawFee;
emit SetWithdrawFee(_withdrawFee);
}
function setWithdrawFeePeriod(uint256 _withdrawFeePeriod) external onlyOwner {
require(
_withdrawFeePeriod <= MAX_WITHDRAW_FEE_PERIOD,
"withdrawFeePeriod cannot be more than MAX_WITHDRAW_FEE_PERIOD"
);
withdrawFeePeriod = _withdrawFeePeriod;
emit SetWithdrawFeePeriod(_withdrawFeePeriod);
}
function emergencyWithdraw() external onlyOwner {
IThorusMaster(thorusMaster).emergencyWithdraw(stakingPid);
hadEmergencyWithdrawn = true;
_pause();
emit EmergencyWithdraw();
}
function pause() external onlyOwner {
_pause();
}
function unpause() external onlyOwner {
require(!hadEmergencyWithdrawn, 'cannot unpause after emergency withdraw');
_unpause();
}
function calculateHarvestThorusRewards() external view returns (uint256) {
uint256 amount = IThorusMaster(thorusMaster).pendingThorus(stakingPid, address(this));
amount = amount + available();
uint256 currentCallFee = amount * callFee / 10000;
return currentCallFee;
}
function calculateTotalPendingThorusRewards() external view returns (uint256) {
uint256 amount = IThorusMaster(thorusMaster).pendingThorus(stakingPid, address(this));
amount = amount + available();
return amount;
}
function getPricePerFullShare() external view returns (uint256) {
return totalSupply() == 0 ? 1e18 : thorusBalanceOf() * 1e18 / totalSupply();
}
function withdraw(uint256 _amount) public nonReentrant {
UserInfo storage user = userInfo[msg.sender];
require(_amount > 0, "Nothing to withdraw");
require(_amount <= balanceOf(msg.sender), "Withdraw amount exceeds balance");
uint256 currentAmount = thorusBalanceOf() * _amount / totalSupply();
_burn(msg.sender, _amount);
uint256 bal = available();
if (bal < currentAmount) {
uint256 balWithdraw = currentAmount - bal;
IThorusMaster(thorusMaster).withdraw(stakingPid, balWithdraw, true);
uint256 balAfter = available();
uint256 diff = balAfter - bal;
if (diff < balWithdraw) {
currentAmount = balAfter;
}
}
if (block.timestamp < user.lastDepositedTime + withdrawFeePeriod) {
uint256 currentWithdrawFee = currentAmount * withdrawFee / 10000;
thorus.safeTransfer(treasury, currentWithdrawFee);
currentAmount = currentAmount - currentWithdrawFee;
}
if (balanceOf(msg.sender) > 0) {
user.thorusAtLastUserAction = balanceOf(msg.sender) * thorusBalanceOf() / totalSupply();
} else {
user.thorusAtLastUserAction = 0;
}
user.lastUserActionTime = block.timestamp;
thorus.safeTransfer(msg.sender, currentAmount);
emit Withdraw(msg.sender, currentAmount, _amount);
}
function available() public view returns (uint256) {
return thorus.balanceOf(address(this));
}
function thorusBalanceOf() public view returns (uint256) {
(uint256 amount, , ) = IThorusMaster(thorusMaster).userInfo(stakingPid, address(this));
return thorus.balanceOf(address(this)) + amount;
}
function _earn() internal {
uint256 bal = available();
if (bal > 0) {
IThorusMaster(thorusMaster).deposit(stakingPid, bal, true);
}
}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_thorus","internalType":"contract IERC20"},{"type":"address","name":"_thorusMaster","internalType":"contract IThorusMaster"},{"type":"uint256","name":"_stakingPid","internalType":"uint256"},{"type":"address","name":"_treasury","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"mintSupply","internalType":"uint256","indexed":false},{"type":"uint256","name":"lastDepositedTime","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DewhitelistedProxy","inputs":[{"type":"address","name":"proxy","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[],"anonymous":false},{"type":"event","name":"Harvest","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"performanceFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"callFee","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":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"SetCallFee","inputs":[{"type":"uint256","name":"callFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetPerformanceFee","inputs":[{"type":"uint256","name":"performanceFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetTreasury","inputs":[{"type":"address","name":"treasury","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SetWithdrawFee","inputs":[{"type":"uint256","name":"withdrawFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetWithdrawFeePeriod","inputs":[{"type":"uint256","name":"withdrawFeePeriod","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"WhitelistedProxy","inputs":[{"type":"address","name":"proxy","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"currentAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"available","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateHarvestThorusRewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateTotalPendingThorusRewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"callFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"dewhitelistProxy","inputs":[{"type":"address","name":"_proxy","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPricePerFullShare","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hadEmergencyWithdrawn","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"harvest","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastHarvestedTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"performanceFee","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCallFee","inputs":[{"type":"uint256","name":"_callFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPerformanceFee","inputs":[{"type":"uint256","name":"_performanceFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTreasury","inputs":[{"type":"address","name":"_treasury","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWithdrawFee","inputs":[{"type":"uint256","name":"_withdrawFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWithdrawFeePeriod","inputs":[{"type":"uint256","name":"_withdrawFeePeriod","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"stakingPid","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"thorus","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"thorusBalanceOf","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IThorusMaster"}],"name":"thorusMaster","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasury","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"lastDepositedTime","internalType":"uint256"},{"type":"uint256","name":"thorusAtLastUserAction","internalType":"uint256"},{"type":"uint256","name":"lastUserActionTime","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"whitelistProxy","inputs":[{"type":"address","name":"_proxy","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"whitelistedProxies","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawAll","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawFeePeriod","inputs":[]}]
            

Deployed ByteCode

0x608060405234801561001057600080fd5b506004361061027f5760003560e01c806370a082311161015c578063a9059cbb116100ce578063df10b4e611610087578063df10b4e614610746578063e941fa7814610764578063eb9e1ef714610782578063f0f44260146107a0578063f2fde38b146107bc578063f5ece500146107d85761027f565b8063a9059cbb14610684578063b60f0531146106b4578063b6ac642a146106d2578063b7243ea3146106ee578063db2e21bc1461070c578063dd62ed3e146107165761027f565b8063877887821161012057806387788782146105be5780638da5cb5b146105dc57806390321e1a146105fa57806395d89b4114610618578063a2f062dd14610636578063a457c2d7146106545761027f565b806370a082311461053e57806377c7b8fc1461056e5780637d858d701461058c5780638456cb59146105aa578063853828b6146105b45761027f565b80632e1a7d4d116101f55780634641257d116101b95780634641257d146104a257806347e7ef24146104ac57806348a0d754146104c85780635c975abb146104e657806361d027b31461050457806370897b23146105225761027f565b80632e1a7d4d146104125780632e6808db1461042e578063313ce5671461044a57806339509351146104685780633f4ba83a146104985761027f565b80631959a002116102475780631959a0021461032c5780631cc94c961461035e5780631efac1b81461038e57806323b872dd146103aa57806326465826146103da57806326529b4c146103f65761027f565b8063027651a01461028457806306fdde03146102a2578063095ea7b3146102c05780630b5204c8146102f057806318160ddd1461030e575b600080fd5b61028c6107f6565b604051610299919061381b565b60405180910390f35b6102aa61081a565b6040516102b791906138cf565b60405180910390f35b6102da60048036038101906102d5919061396a565b6108ac565b6040516102e791906139c5565b60405180910390f35b6102f86108ca565b6040516103059190613a01565b60405180910390f35b6103166108ee565b6040516103239190613a2b565b60405180910390f35b61034660048036038101906103419190613a46565b6108f8565b60405161035593929190613a73565b60405180910390f35b61037860048036038101906103739190613a46565b610922565b60405161038591906139c5565b60405180910390f35b6103a860048036038101906103a39190613aaa565b610942565b005b6103c460048036038101906103bf9190613ad7565b610a45565b6040516103d191906139c5565b60405180910390f35b6103f460048036038101906103ef9190613aaa565b610b3d565b005b610410600480360381019061040b9190613a46565b610c3e565b005b61042c60048036038101906104279190613aaa565b610e55565b005b61044860048036038101906104439190613a46565b611264565b005b61045261147a565b60405161045f9190613b46565b60405180910390f35b610482600480360381019061047d919061396a565b611483565b60405161048f91906139c5565b60405180910390f35b6104a061152f565b005b6104aa611605565b005b6104c660048036038101906104c1919061396a565b6118b4565b005b6104d0611bde565b6040516104dd9190613a2b565b60405180910390f35b6104ee611c7f565b6040516104fb91906139c5565b60405180910390f35b61050c611c96565b6040516105199190613b70565b60405180910390f35b61053c60048036038101906105379190613aaa565b611cbc565b005b61055860048036038101906105539190613a46565b611dbe565b6040516105659190613a2b565b60405180910390f35b610576611e06565b6040516105839190613a2b565b60405180910390f35b610594611e57565b6040516105a191906139c5565b60405180910390f35b6105b2611e6a565b005b6105bc611ef0565b005b6105c6611f03565b6040516105d39190613a2b565b60405180910390f35b6105e4611f09565b6040516105f19190613b70565b60405180910390f35b610602611f33565b60405161060f9190613a2b565b60405180910390f35b610620611f39565b60405161062d91906138cf565b60405180910390f35b61063e611fcb565b60405161064b9190613a2b565b60405180910390f35b61066e6004803603810190610669919061396a565b6120c8565b60405161067b91906139c5565b60405180910390f35b61069e6004803603810190610699919061396a565b6121b3565b6040516106ab91906139c5565b60405180910390f35b6106bc6121d1565b6040516106c99190613a2b565b60405180910390f35b6106ec60048036038101906106e79190613aaa565b6121d7565b005b6106f66122d8565b6040516107039190613a2b565b60405180910390f35b6107146123b5565b005b610730600480360381019061072b9190613b8b565b61252d565b60405161073d9190613a2b565b60405180910390f35b61074e6125b4565b60405161075b9190613a2b565b60405180910390f35b61076c6125ba565b6040516107799190613a2b565b60405180910390f35b61078a6125c0565b6040516107979190613a2b565b60405180910390f35b6107ba60048036038101906107b59190613a46565b61272e565b005b6107d660048036038101906107d19190613a46565b6128a1565b005b6107e0612999565b6040516107ed9190613a2b565b60405180910390f35b7f000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f81565b60606003805461082990613bfa565b80601f016020809104026020016040519081016040528092919081815260200182805461085590613bfa565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050505050905090565b60006108c06108b96129bd565b84846129c5565b6001905092915050565b7f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d81565b6000600254905090565b60076020528060005260406000206000915090508060000154908060010154908060020154905083565b60086020528060005260406000206000915054906101000a900460ff1681565b61094a6129bd565b73ffffffffffffffffffffffffffffffffffffffff16610968611f09565b73ffffffffffffffffffffffffffffffffffffffff16146109be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b590613c78565b60405180910390fd5b6203f480811115610a04576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109fb90613d0a565b60405180910390fd5b80600e819055507f597cf231de011d0c1fb0be77fc3449d8a2e0c239eed996c9021a7a699fadf76981604051610a3a9190613a2b565b60405180910390a150565b6000610a52848484612b90565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a9d6129bd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610b1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1490613d9c565b60405180910390fd5b610b3185610b296129bd565b8584036129c5565b60019150509392505050565b610b456129bd565b73ffffffffffffffffffffffffffffffffffffffff16610b63611f09565b73ffffffffffffffffffffffffffffffffffffffff1614610bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb090613c78565b60405180910390fd5b6064811115610bfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf490613e2e565b60405180910390fd5b80600c819055507f589643087c0743c4f44030e1994d37c73dcd0630bfc83573775b0d8ed22cdb7481604051610c339190613a2b565b60405180910390a150565b610c466129bd565b73ffffffffffffffffffffffffffffffffffffffff16610c64611f09565b73ffffffffffffffffffffffffffffffffffffffff1614610cba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb190613c78565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2190613e9a565b60405180910390fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610db7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dae90613f06565b60405180910390fd5b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167ff3b5c348073287450f94e6bcd394aa95a801d3981fac14c1cf0f03100bbed60c60405160405180910390a250565b60026006541415610e9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9290613f72565b60405180910390fd5b60026006819055506000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008211610f29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2090613fde565b60405180910390fd5b610f3233611dbe565b821115610f74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6b9061404a565b60405180910390fd5b6000610f7e6108ee565b83610f876125c0565b610f919190614099565b610f9b9190614122565b9050610fa73384612e11565b6000610fb1611bde565b9050818110156110a75760008183610fc99190614153565b90507f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d73ffffffffffffffffffffffffffffffffffffffff166333cfcd3b7f00000000000000000000000000000000000000000000000000000000000000008360016040518463ffffffff1660e01b815260040161104993929190614187565b600060405180830381600087803b15801561106357600080fd5b505af1158015611077573d6000803e3d6000fd5b505050506000611085611bde565b9050600083826110959190614153565b9050828110156110a3578194505b5050505b600e5483600001546110b991906141be565b42101561115c576000612710600d54846110d39190614099565b6110dd9190614122565b905061114c600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f73ffffffffffffffffffffffffffffffffffffffff16612fe89092919063ffffffff16565b80836111589190614153565b9250505b600061116733611dbe565b11156111a7576111756108ee565b61117d6125c0565b61118633611dbe565b6111909190614099565b61119a9190614122565b83600101819055506111b2565b600083600101819055505b42836002018190555061120633837f000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f73ffffffffffffffffffffffffffffffffffffffff16612fe89092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568838660405161124e929190614214565b60405180910390a2505050600160068190555050565b61126c6129bd565b73ffffffffffffffffffffffffffffffffffffffff1661128a611f09565b73ffffffffffffffffffffffffffffffffffffffff16146112e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d790613c78565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611350576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134790613e9a565b60405180910390fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166113dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d390614289565b60405180910390fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fe33dae9ee1ffc4c4bc7e748cd3ae482ba443700f1887f33732bbeb2ce339daa660405160405180910390a250565b60006012905090565b60006115256114906129bd565b84846001600061149e6129bd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461152091906141be565b6129c5565b6001905092915050565b6115376129bd565b73ffffffffffffffffffffffffffffffffffffffff16611555611f09565b73ffffffffffffffffffffffffffffffffffffffff16146115ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a290613c78565b60405180910390fd5b600f60009054906101000a900460ff16156115fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f29061431b565b60405180910390fd5b61160361306e565b565b61160d611c7f565b1561164d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164490614387565b60405180910390fd5b60026006541415611693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168a90613f72565b60405180910390fd5b60026006819055507f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d73ffffffffffffffffffffffffffffffffffffffff1663379607f57f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016117149190613a2b565b600060405180830381600087803b15801561172e57600080fd5b505af1158015611742573d6000803e3d6000fd5b505050506000611750611bde565b90506000612710600b54836117659190614099565b61176f9190614122565b90506117de600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f73ffffffffffffffffffffffffffffffffffffffff16612fe89092919063ffffffff16565b6000612710600c54846117f19190614099565b6117fb9190614122565b905061184833827f000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f73ffffffffffffffffffffffffffffffffffffffff16612fe89092919063ffffffff16565b611850613110565b426009819055503373ffffffffffffffffffffffffffffffffffffffff167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954838360405161189f929190614214565b60405180910390a25050506001600681905550565b6118bc611c7f565b156118fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f390614387565b60405180910390fd5b60026006541415611942576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193990613f72565b60405180910390fd5b60026006819055506000811161198d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611984906143f3565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480611a105750600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a469061445f565b60405180910390fd5b6000611a596125c0565b9050611aa83330847f000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f73ffffffffffffffffffffffffffffffffffffffff166131d9909392919063ffffffff16565b600080611ab36108ee565b14611add5781611ac16108ee565b84611acc9190614099565b611ad69190614122565b9050611ae1565b8290505b6000600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050611b2e8583613262565b428160000181905550611b3f6108ee565b611b476125c0565b611b5087611dbe565b611b5a9190614099565b611b649190614122565b8160010181905550428160020181905550611b7d613110565b8473ffffffffffffffffffffffffffffffffffffffff167f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e858442604051611bc793929190613a73565b60405180910390a250505060016006819055505050565b60007f000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611c399190613b70565b602060405180830381865afa158015611c56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7a9190614494565b905090565b6000600560149054906101000a900460ff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611cc46129bd565b73ffffffffffffffffffffffffffffffffffffffff16611ce2611f09565b73ffffffffffffffffffffffffffffffffffffffff1614611d38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2f90613c78565b60405180910390fd5b6101f4811115611d7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7490614533565b60405180910390fd5b80600b819055507f8b940a95968ad5b511f89b01075446a4fe9f614f2dc5fbb9e9a6b227d6d4fd7081604051611db39190613a2b565b60405180910390a150565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080611e116108ee565b14611e4857611e1e6108ee565b670de0b6b3a7640000611e2f6125c0565b611e399190614099565b611e439190614122565b611e52565b670de0b6b3a76400005b905090565b600f60009054906101000a900460ff1681565b611e726129bd565b73ffffffffffffffffffffffffffffffffffffffff16611e90611f09565b73ffffffffffffffffffffffffffffffffffffffff1614611ee6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611edd90613c78565b60405180910390fd5b611eee6133c2565b565b611f01611efc33611dbe565b610e55565b565b600b5481565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c5481565b606060048054611f4890613bfa565b80601f0160208091040260200160405190810160405280929190818152602001828054611f7490613bfa565b8015611fc15780601f10611f9657610100808354040283529160200191611fc1565b820191906000526020600020905b815481529060010190602001808311611fa457829003601f168201915b5050505050905090565b6000807f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d73ffffffffffffffffffffffffffffffffffffffff16636c9160777f0000000000000000000000000000000000000000000000000000000000000000306040518363ffffffff1660e01b8152600401612049929190614553565b602060405180830381865afa158015612066573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208a9190614494565b9050612094611bde565b8161209f91906141be565b90506000612710600c54836120b49190614099565b6120be9190614122565b9050809250505090565b600080600160006120d76129bd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015612194576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218b906145ee565b60405180910390fd5b6121a861219f6129bd565b858584036129c5565b600191505092915050565b60006121c76121c06129bd565b8484612b90565b6001905092915050565b60095481565b6121df6129bd565b73ffffffffffffffffffffffffffffffffffffffff166121fd611f09565b73ffffffffffffffffffffffffffffffffffffffff1614612253576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224a90613c78565b60405180910390fd5b60c8811115612297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228e90614680565b60405180910390fd5b80600d819055507f7be0a744e4d6f887e4fd578978ae62cb2568d860f0f2eb0a54fd0de804b16440816040516122cd9190613a2b565b60405180910390a150565b6000807f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d73ffffffffffffffffffffffffffffffffffffffff16636c9160777f0000000000000000000000000000000000000000000000000000000000000000306040518363ffffffff1660e01b8152600401612356929190614553565b602060405180830381865afa158015612373573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123979190614494565b90506123a1611bde565b816123ac91906141be565b90508091505090565b6123bd6129bd565b73ffffffffffffffffffffffffffffffffffffffff166123db611f09565b73ffffffffffffffffffffffffffffffffffffffff1614612431576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242890613c78565b60405180910390fd5b7f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d73ffffffffffffffffffffffffffffffffffffffff16635312ea8e7f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016124aa9190613a2b565b600060405180830381600087803b1580156124c457600080fd5b505af11580156124d8573d6000803e3d6000fd5b505050506001600f60006101000a81548160ff0219169083151502179055506124ff6133c2565b7fcc6a1a065ab514031862e10458cbf117148ff1f8a168cfacab350e6644c174f060405160405180910390a1565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600e5481565b600d5481565b6000807f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d73ffffffffffffffffffffffffffffffffffffffff166393f1a40b7f0000000000000000000000000000000000000000000000000000000000000000306040518363ffffffff1660e01b815260040161263e929190614553565b606060405180830381865afa15801561265b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061267f91906146a0565b50509050807f000000000000000000000000735abe48e8782948a37c7765ecb76b98cde97b0f73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016126dd9190613b70565b602060405180830381865afa1580156126fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061271e9190614494565b61272891906141be565b91505090565b6127366129bd565b73ffffffffffffffffffffffffffffffffffffffff16612754611f09565b73ffffffffffffffffffffffffffffffffffffffff16146127aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127a190613c78565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561281a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128119061473f565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef360405160405180910390a250565b6128a96129bd565b73ffffffffffffffffffffffffffffffffffffffff166128c7611f09565b73ffffffffffffffffffffffffffffffffffffffff161461291d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291490613c78565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561298d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612984906147d1565b60405180910390fd5b61299681613465565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612a35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2c90614863565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612aa5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9c906148f5565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051612b839190613a2b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612c00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bf790614987565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612c70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c6790614a19565b60405180910390fd5b612c7b838383613525565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612d01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cf890614aab565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612d9491906141be565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612df89190613a2b565b60405180910390a3612e0b84848461352a565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612e81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e7890614b3d565b60405180910390fd5b612e8d82600083613525565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612f13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f0a90614bcf565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160026000828254612f6a9190614153565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612fcf9190613a2b565b60405180910390a3612fe38360008461352a565b505050565b6130698363a9059cbb60e01b8484604051602401613007929190614bef565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061352f565b505050565b613076611c7f565b6130b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130ac90614c64565b60405180910390fd5b6000600560146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6130f96129bd565b6040516131069190613b70565b60405180910390a1565b600061311a611bde565b905060008111156131d6577f000000000000000000000000eeb84a24e10502d8a5c97b11df381d1550b25b9d73ffffffffffffffffffffffffffffffffffffffff166343a0d0667f00000000000000000000000000000000000000000000000000000000000000008360016040518463ffffffff1660e01b81526004016131a393929190614187565b600060405180830381600087803b1580156131bd57600080fd5b505af11580156131d1573d6000803e3d6000fd5b505050505b50565b61325c846323b872dd60e01b8585856040516024016131fa93929190614c84565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061352f565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156132d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132c990614d07565b60405180910390fd5b6132de60008383613525565b80600260008282546132f091906141be565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461334591906141be565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516133aa9190613a2b565b60405180910390a36133be6000838361352a565b5050565b6133ca611c7f565b1561340a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161340190614387565b60405180910390fd5b6001600560146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861344e6129bd565b60405161345b9190613b70565b60405180910390a1565b8073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b505050565b505050565b6000613591826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166135f69092919063ffffffff16565b90506000815111156135f157808060200190518101906135b19190614d53565b6135f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135e790614df2565b60405180910390fd5b5b505050565b6060613605848460008561360e565b90509392505050565b606082471015613653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161364a90614e84565b60405180910390fd5b61365c85613722565b61369b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161369290614ef0565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516136c49190614f57565b60006040518083038185875af1925050503d8060008114613701576040519150601f19603f3d011682016040523d82523d6000602084013e613706565b606091505b5091509150613716828286613735565b92505050949350505050565b600080823b905060008111915050919050565b6060831561374557829050613795565b6000835111156137585782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161378c91906138cf565b60405180910390fd5b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006137e16137dc6137d78461379c565b6137bc565b61379c565b9050919050565b60006137f3826137c6565b9050919050565b6000613805826137e8565b9050919050565b613815816137fa565b82525050565b6000602082019050613830600083018461380c565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613870578082015181840152602081019050613855565b8381111561387f576000848401525b50505050565b6000601f19601f8301169050919050565b60006138a182613836565b6138ab8185613841565b93506138bb818560208601613852565b6138c481613885565b840191505092915050565b600060208201905081810360008301526138e98184613896565b905092915050565b600080fd5b60006139018261379c565b9050919050565b613911816138f6565b811461391c57600080fd5b50565b60008135905061392e81613908565b92915050565b6000819050919050565b61394781613934565b811461395257600080fd5b50565b6000813590506139648161393e565b92915050565b60008060408385031215613981576139806138f1565b5b600061398f8582860161391f565b92505060206139a085828601613955565b9150509250929050565b60008115159050919050565b6139bf816139aa565b82525050565b60006020820190506139da60008301846139b6565b92915050565b60006139eb826137e8565b9050919050565b6139fb816139e0565b82525050565b6000602082019050613a1660008301846139f2565b92915050565b613a2581613934565b82525050565b6000602082019050613a406000830184613a1c565b92915050565b600060208284031215613a5c57613a5b6138f1565b5b6000613a6a8482850161391f565b91505092915050565b6000606082019050613a886000830186613a1c565b613a956020830185613a1c565b613aa26040830184613a1c565b949350505050565b600060208284031215613ac057613abf6138f1565b5b6000613ace84828501613955565b91505092915050565b600080600060608486031215613af057613aef6138f1565b5b6000613afe8682870161391f565b9350506020613b0f8682870161391f565b9250506040613b2086828701613955565b9150509250925092565b600060ff82169050919050565b613b4081613b2a565b82525050565b6000602082019050613b5b6000830184613b37565b92915050565b613b6a816138f6565b82525050565b6000602082019050613b856000830184613b61565b92915050565b60008060408385031215613ba257613ba16138f1565b5b6000613bb08582860161391f565b9250506020613bc18582860161391f565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613c1257607f821691505b60208210811415613c2657613c25613bcb565b5b50919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613c62602083613841565b9150613c6d82613c2c565b602082019050919050565b60006020820190508181036000830152613c9181613c55565b9050919050565b7f7769746864726177466565506572696f642063616e6e6f74206265206d6f726560008201527f207468616e204d41585f57495448445241575f4645455f504552494f44000000602082015250565b6000613cf4603d83613841565b9150613cff82613c98565b604082019050919050565b60006020820190508181036000830152613d2381613ce7565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b6000613d86602883613841565b9150613d9182613d2a565b604082019050919050565b60006020820190508181036000830152613db581613d79565b9050919050565b7f63616c6c4665652063616e6e6f74206265206d6f7265207468616e204d41585f60008201527f43414c4c5f464545000000000000000000000000000000000000000000000000602082015250565b6000613e18602883613841565b9150613e2382613dbc565b604082019050919050565b60006020820190508181036000830152613e4781613e0b565b9050919050565b7f7a65726f20616464726573730000000000000000000000000000000000000000600082015250565b6000613e84600c83613841565b9150613e8f82613e4e565b602082019050919050565b60006020820190508181036000830152613eb381613e77565b9050919050565b7f70726f787920616c72656164792077686974656c697374656400000000000000600082015250565b6000613ef0601983613841565b9150613efb82613eba565b602082019050919050565b60006020820190508181036000830152613f1f81613ee3565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613f5c601f83613841565b9150613f6782613f26565b602082019050919050565b60006020820190508181036000830152613f8b81613f4f565b9050919050565b7f4e6f7468696e6720746f20776974686472617700000000000000000000000000600082015250565b6000613fc8601383613841565b9150613fd382613f92565b602082019050919050565b60006020820190508181036000830152613ff781613fbb565b9050919050565b7f576974686472617720616d6f756e7420657863656564732062616c616e636500600082015250565b6000614034601f83613841565b915061403f82613ffe565b602082019050919050565b6000602082019050818103600083015261406381614027565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006140a482613934565b91506140af83613934565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156140e8576140e761406a565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061412d82613934565b915061413883613934565b925082614148576141476140f3565b5b828204905092915050565b600061415e82613934565b915061416983613934565b92508282101561417c5761417b61406a565b5b828203905092915050565b600060608201905061419c6000830186613a1c565b6141a96020830185613a1c565b6141b660408301846139b6565b949350505050565b60006141c982613934565b91506141d483613934565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156142095761420861406a565b5b828201905092915050565b60006040820190506142296000830185613a1c565b6142366020830184613a1c565b9392505050565b7f70726f7879206e6f742077686974656c69737465640000000000000000000000600082015250565b6000614273601583613841565b915061427e8261423d565b602082019050919050565b600060208201905081810360008301526142a281614266565b9050919050565b7f63616e6e6f7420756e706175736520616674657220656d657267656e6379207760008201527f6974686472617700000000000000000000000000000000000000000000000000602082015250565b6000614305602783613841565b9150614310826142a9565b604082019050919050565b60006020820190508181036000830152614334816142f8565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000614371601083613841565b915061437c8261433b565b602082019050919050565b600060208201905081810360008301526143a081614364565b9050919050565b7f4e6f7468696e6720746f206465706f7369740000000000000000000000000000600082015250565b60006143dd601283613841565b91506143e8826143a7565b602082019050919050565b6000602082019050818103600083015261440c816143d0565b9050919050565b7f6d73672e73656e646572206973206e6f7420616c6c6f7765642070726f787900600082015250565b6000614449601f83613841565b915061445482614413565b602082019050919050565b600060208201905081810360008301526144788161443c565b9050919050565b60008151905061448e8161393e565b92915050565b6000602082840312156144aa576144a96138f1565b5b60006144b88482850161447f565b91505092915050565b7f706572666f726d616e63654665652063616e6e6f74206265206d6f726520746860008201527f616e204d41585f504552464f524d414e43455f46454500000000000000000000602082015250565b600061451d603683613841565b9150614528826144c1565b604082019050919050565b6000602082019050818103600083015261454c81614510565b9050919050565b60006040820190506145686000830185613a1c565b6145756020830184613b61565b9392505050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006145d8602583613841565b91506145e38261457c565b604082019050919050565b60006020820190508181036000830152614607816145cb565b9050919050565b7f77697468647261774665652063616e6e6f74206265206d6f7265207468616e2060008201527f4d41585f57495448445241575f46454500000000000000000000000000000000602082015250565b600061466a603083613841565b91506146758261460e565b604082019050919050565b600060208201905081810360008301526146998161465d565b9050919050565b6000806000606084860312156146b9576146b86138f1565b5b60006146c78682870161447f565b93505060206146d88682870161447f565b92505060406146e98682870161447f565b9150509250925092565b7f43616e6e6f74206265207a65726f206164647265737300000000000000000000600082015250565b6000614729601683613841565b9150614734826146f3565b602082019050919050565b600060208201905081810360008301526147588161471c565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006147bb602683613841565b91506147c68261475f565b604082019050919050565b600060208201905081810360008301526147ea816147ae565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061484d602483613841565b9150614858826147f1565b604082019050919050565b6000602082019050818103600083015261487c81614840565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006148df602283613841565b91506148ea82614883565b604082019050919050565b6000602082019050818103600083015261490e816148d2565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000614971602583613841565b915061497c82614915565b604082019050919050565b600060208201905081810360008301526149a081614964565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000614a03602383613841565b9150614a0e826149a7565b604082019050919050565b60006020820190508181036000830152614a32816149f6565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000614a95602683613841565b9150614aa082614a39565b604082019050919050565b60006020820190508181036000830152614ac481614a88565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614b27602183613841565b9150614b3282614acb565b604082019050919050565b60006020820190508181036000830152614b5681614b1a565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000614bb9602283613841565b9150614bc482614b5d565b604082019050919050565b60006020820190508181036000830152614be881614bac565b9050919050565b6000604082019050614c046000830185613b61565b614c116020830184613a1c565b9392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000614c4e601483613841565b9150614c5982614c18565b602082019050919050565b60006020820190508181036000830152614c7d81614c41565b9050919050565b6000606082019050614c996000830186613b61565b614ca66020830185613b61565b614cb36040830184613a1c565b949350505050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000614cf1601f83613841565b9150614cfc82614cbb565b602082019050919050565b60006020820190508181036000830152614d2081614ce4565b9050919050565b614d30816139aa565b8114614d3b57600080fd5b50565b600081519050614d4d81614d27565b92915050565b600060208284031215614d6957614d686138f1565b5b6000614d7784828501614d3e565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000614ddc602a83613841565b9150614de782614d80565b604082019050919050565b60006020820190508181036000830152614e0b81614dcf565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000614e6e602683613841565b9150614e7982614e12565b604082019050919050565b60006020820190508181036000830152614e9d81614e61565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000614eda601d83613841565b9150614ee582614ea4565b602082019050919050565b60006020820190508181036000830152614f0981614ecd565b9050919050565b600081519050919050565b600081905092915050565b6000614f3182614f10565b614f3b8185614f1b565b9350614f4b818560208601613852565b80840191505092915050565b6000614f638284614f26565b91508190509291505056fea2646970667358221220bf6786bb5495981d8332387277095af19976f96d5b9edbd96d949d89402c506264736f6c634300080a0033