Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
- Contract name:
- CalciumInu
- Optimization enabled
- true
- Compiler version
- v0.8.4+commit.c7e474f2
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2022-04-19T13:50:53.271150Z
Constructor Arguments
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000ca4d3e03db00c4339e9924a6a8f16f6b11db3584000000000000000000000000000000000000000000000000000000000000000100000000000000000000000031247b69e2df8bd04f2dee472395aa26649764f400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000031247b69e2df8bd04f2dee472395aa26649764f40000000000000000000000009e9604abd90bee88c84a35b087bc174ecba04948000000000000000000000000b6806f7c12a63c80904e5de15382a7b8040ac645
Arg [0] (address[]) : [0x31247b69e2df8bd04f2dee472395aa26649764f4]
Arg [1] (uint256[]) : [1]
Arg [2] (address[]) : [0x31247b69e2df8bd04f2dee472395aa26649764f4, 0x9e9604abd90bee88c84a35b087bc174ecba04948, 0xb6806f7c12a63c80904e5de15382a7b8040ac645]
Arg [3] (address) : 0xca4d3e03db00c4339e9924a6a8f16f6b11db3584
Contract source code
// SPDX-License-Identifier: MIT // File: IterableMapping.sol pragma solidity >=0.5.0; interface IDEXFactory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // File: interfaces/IDEXRouter.sol pragma solidity >=0.6.2; interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountOut); function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } pragma solidity ^0.8.0; interface INodeManager { function getMinPrice() external view returns (uint256); function createNode(address account, string memory nodeName, uint256 amount) external; function getNodeReward(address account, uint256 _creationTime) external view returns (uint256); function getAllNodesRewards(address account) external view returns (uint256); function cashoutNodeReward(address account, uint256 _creationTime) external; function cashoutAllNodesRewards(address account) external; function compoundNodeReward(address account, uint256 creationTime, uint256 rewardAmount) external; function getNodeNumberOf(address account) external view returns (uint256); } // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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; } 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"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } 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"); } 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); } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } 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: @openzeppelin/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface 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/token/ERC20/utils/SafeERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/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/token/ERC20/extensions/IERC20Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/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: @openzeppelin/contracts/utils/Context.sol // 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; } } pragma solidity ^0.8.0; contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } } // File: @openzeppelin/contracts/token/ERC20/ERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/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 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 {} } // File: @openzeppelin/contracts/access/Ownable.sol // 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/utils/math/SafeMath.sol // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } pragma solidity ^0.8.4; contract CalciumInu is ERC20, Ownable, PaymentSplitter { using SafeMath for uint256; address public milkPair; address public routerAddress = 0x9D2E30C2FB648BeE307EDBaFDb461b09DF79516C; // Milky Router address public teamPool; address public rewardsPool; // Burn address address public constant BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD; uint256 public rewardsFee; uint256 public liquidityPoolFee; uint256 public teamPoolFee; uint256 public cashoutFee; uint256 public totalFees; IERC20 public boosterNFTaddress; // Max transfer uint16 public maxTransferAmountRate = 1000; // Max balance uint16 public maxBalanceAmountRate = 500; uint256 public sellFees; uint256 public swapTokensAmount; uint256 public totalClaimed = 0; bool public isTradingEnabled = false; bool public swapLiquifyEnabled = true; bool public NFTboosterActivated = false; bool public sellTaxActivated = false; uint256 public add_reward = 0; uint256 public swapAmount; IDEXRouter private router; INodeManager private nodeManager; uint256 private rwSwap; bool private swapping = false; mapping(address => bool) public isBlacklisted; mapping(address => bool) public automatedMarketMakerPairs; mapping (address => bool) public _isExcludedFromFee; mapping (address => uint256) public _lastClaim; // Addresses that excluded from antiWhale mapping(address => bool) private _excludedFromAntiWhale; event routerUpdateMilkRouter( address indexed newAddress, address indexed oldAddress ); event MaxTransferAmountRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate); event maxBalanceAmountRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event LiquidityWalletUpdated( address indexed newLiquidityWallet, address indexed oldLiquidityWallet ); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); event Cashout( address indexed account, uint256 amount, uint256 indexed blockTime ); event Compound( address indexed account, uint256 amount, uint256 indexed blockTime ); modifier antiWhale(address sender, address recipient, uint256 amount) { if (maxTransferAmount() > 0) { if ( _excludedFromAntiWhale[sender] == false && _excludedFromAntiWhale[recipient] == false ) { require(amount <= maxTransferAmount(), "CalciumInu::antiWhale: Transfer amount exceeds the maxTransferAmount"); if (sender == milkPair) { require(balanceOf(recipient).add(amount) <= maxBalanceAmount(), "CalciumInu::antiWhale: Transfer would exceed the maxBalanceAmount of the recipient"); } } } _; } constructor( address[] memory payees, uint256[] memory shares, address[] memory addresses, address _boosternftaddress ) ERC20("Calcium Inu", "CINU") PaymentSplitter(payees, shares) { _excludedFromAntiWhale[msg.sender] = true; _excludedFromAntiWhale[address(0)] = true; _excludedFromAntiWhale[address(this)] = true; _excludedFromAntiWhale[BURN_ADDRESS] = true; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[BURN_ADDRESS] = true; _isExcludedFromFee[address(0)] = true; boosterNFTaddress = IERC20(_boosternftaddress); require( addresses[0] != address(0) && addresses[1] != address(0) && addresses[2] != address(0), "CONSTR:1" ); teamPool = addresses[0]; rewardsPool = addresses[1]; nodeManager = INodeManager(addresses[2]); require(routerAddress != address(0), "CONSTR:2"); IDEXRouter _router = IDEXRouter(routerAddress); address _milkPair = IDEXFactory(_router.factory()) .createPair(address(this), _router.WETH()); router = _router; milkPair = _milkPair; _setAutomatedMarketMakerPair(_milkPair, true); sellFees = 12; // fee on selling, sent in native to the contract. Only swapped during node creation, compounding or redeeming. teamPoolFee = 10; // fee in ADA, sent to the team address after node creation and compounding rewardsFee = 20; // fee that is sent to the reward pool after node creation and compounding, part in ADA part in native to increase treasury liquidityPoolFee = 10; //LP fee, triggers swap and liquefy. Happens after node creation and node compounding cashoutFee = 10; //same as selling, but only happens after cashout rwSwap = 50; //% of the rewards pool that will be swapped back totalFees = rewardsFee.add(liquidityPoolFee).add(teamPoolFee); swapAmount = 100; require(swapAmount > 0, "CONSTR:7"); swapTokensAmount = swapAmount * (10**18); _mint(_msgSender(), 20010000 * 10**18); } function migrate(address[] memory addresses_, uint256[] memory balances_) external onlyOwner { for (uint256 i = 0; i < addresses_.length; i++) { _mint(addresses_[i], balances_[i]); } } function burn(address account, uint256 amount) external onlyOwner { _burn(account, amount); } function updateMilkyRouterAddress(address newAddress) external onlyOwner { require( newAddress != address(router), "TKN:1" ); emit routerUpdateMilkRouter(newAddress, address(router)); IDEXRouter _router = IDEXRouter(newAddress); address _milkPair = IDEXFactory(router.factory()).createPair( address(this), _router.WETH() ); milkPair = _milkPair; routerAddress = newAddress; } function updateSwapTokensAmount(uint256 newVal) external onlyOwner { swapTokensAmount = newVal; } function updateTeamPool(address payable newVal) external onlyOwner { teamPool = newVal; } function updateRewardsPool(address payable newVal) external onlyOwner { rewardsPool = newVal; } function updateRewardsFee(uint256 newVal) external onlyOwner { rewardsFee = newVal; totalFees = rewardsFee.add(liquidityPoolFee).add(teamPoolFee); } function updateLiquidityFee(uint256 newVal) external onlyOwner { liquidityPoolFee = newVal; totalFees = rewardsFee.add(liquidityPoolFee).add(teamPoolFee); } function updateTeamFee(uint256 newVal) external onlyOwner { teamPoolFee = newVal; totalFees = rewardsFee.add(liquidityPoolFee).add(teamPoolFee); } function updateCashoutFee(uint256 newVal) external onlyOwner { cashoutFee = newVal; } function updateRwSwapFee(uint256 newVal) external onlyOwner { rwSwap = newVal; } function updateSellFees(uint256 newVal) external onlyOwner { require (newVal < 25, "Fees for selling must be less than 25%"); sellFees = newVal; } function updateSwapLiquify(bool newVal) external onlyOwner { swapLiquifyEnabled = newVal; } function updateIsTradingEnabled(bool newVal) external onlyOwner { isTradingEnabled = newVal; } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { require( pair != milkPair, "TKN:2" ); _setAutomatedMarketMakerPair(pair, value); } function blacklistAddress(address account, bool value) external onlyOwner { isBlacklisted[account] = value; } function isExcludedFromAntiWhale(address _account) public view returns (bool) { return _excludedFromAntiWhale[_account]; } /** * @dev Returns the max wallet amount. */ function maxBalanceAmount() public view returns (uint256) { return (totalSupply()-balanceOf(rewardsPool)).mul(maxBalanceAmountRate).div(10000); } /** * @dev Returns the max transfer amount. */ function maxTransferAmount() public view returns (uint256) { return (totalSupply()-balanceOf(rewardsPool)).mul(maxTransferAmountRate).div(10000); } function setExcludedFromAntiWhale(address _account, bool _excluded) public onlyOwner { _excludedFromAntiWhale[_account] = _excluded; } /** * @dev Update the max balance amount rate. * Can only be called by the current operator. */ function updatemaxBalanceAmountRate(uint16 _maxBalanceAmountRate) external onlyOwner { require(_maxBalanceAmountRate <= 10000, "CalciumInu::updatemaxBalanceAmountRate: Max transfer amount rate must not exceed the maximum rate."); require(_maxBalanceAmountRate >= 200, "CalciumInu::updatemaxBalanceAmountRate: Max transfer amount rate must exceed the minimum rate."); emit maxBalanceAmountRateUpdated(msg.sender, maxBalanceAmountRate, _maxBalanceAmountRate); maxBalanceAmountRate = _maxBalanceAmountRate; } /** * @dev Update the max transfer amount rate. * Can only be called by the current operator. */ function updateMaxTransferAmountRate(uint16 _maxTransferAmountRate) public onlyOwner { require(_maxTransferAmountRate <= 10000, "CalciumInu::updateMaxTransferAmountRate: Max transfer amount rate must not exceed the maximum rate."); require(_maxTransferAmountRate >= 100, "CalciumInu::updateMaxTransferAmountRate: Max transfer amount rate must exceed the minimum rate."); emit MaxTransferAmountRateUpdated(msg.sender, maxTransferAmountRate, _maxTransferAmountRate); maxTransferAmountRate = _maxTransferAmountRate; } // Private methods function _setAutomatedMarketMakerPair(address pair, bool value) private { require( automatedMarketMakerPairs[pair] != value, "TKN:3" ); automatedMarketMakerPairs[pair] = value; emit SetAutomatedMarketMakerPair(pair, value); } function _transfer( address from, address to, uint256 amount ) internal override antiWhale(from, to, amount){ require( !isBlacklisted[from] && !isBlacklisted[to], "BLACKLISTED" ); require(from != address(0), "ERC20:1"); require(to != address(0), "ERC20:2"); if (from != owner() && to != milkPair && to != address(router) && to != address(this) && from != address(this)) { require(isTradingEnabled, "TRADING_DISABLED"); } //sell tax if (sellTaxActivated && to == milkPair) { uint256 taxAmount = amount * sellFees /100; uint256 sendAmount = amount - taxAmount; require (amount == taxAmount + sendAmount, "invalid Tax"); //send to contract super._transfer(from, address(this), taxAmount); super._transfer(from, to, sendAmount); } else { super._transfer(from, to, amount); } } function swapAndSendToFee(address destination, uint256 tokens) private { uint256 initialETHBalance = address(this).balance; swapTokensForETH(tokens); uint256 newBalance = (address(this).balance).sub(initialETHBalance); payable(destination).transfer(newBalance); } function swapAndLiquify(uint256 tokens) private { uint256 half = tokens.div(2); uint256 otherHalf = tokens.sub(half); uint256 initialBalance = address(this).balance; swapTokensForETH(half); uint256 newBalance = address(this).balance.sub(initialBalance); addLiquidity(otherHalf, newBalance); emit SwapAndLiquify(half, newBalance, otherHalf); } function swapTokensForETH(uint256 tokenAmount) private { address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); _approve(address(this), address(router), tokenAmount); router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(router), tokenAmount); // add the liquidity router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable address(0), block.timestamp ); } // External node methods function createNodeWithTokens(string memory name, uint256 amount_) external { address sender = _msgSender(); require( bytes(name).length > 3 && bytes(name).length < 32, "NC:1" ); require( sender != address(0), "NC:2" ); require(!isBlacklisted[sender], "BLACKLISTED"); require( sender != teamPool && sender != rewardsPool, "NC:4" ); require( balanceOf(sender) >= amount_, "NC:5" ); uint256 contractTokenBalance = balanceOf(address(this)); bool swapAmountOk = contractTokenBalance >= swapTokensAmount; if ( swapAmountOk && swapLiquifyEnabled && !swapping && sender != owner() && !automatedMarketMakerPairs[sender] ) { swapping = true; uint256 teamTokens = contractTokenBalance .mul(teamPoolFee) .div(100); swapAndSendToFee(teamPool, teamTokens); uint256 rewardsPoolTokens = contractTokenBalance .mul(rewardsFee) .div(100); uint256 rewardsTokenstoSwap = rewardsPoolTokens.mul(rwSwap).div( 100 ); swapAndSendToFee(rewardsPool, rewardsTokenstoSwap); super._transfer( address(this), rewardsPool, rewardsPoolTokens.sub(rewardsTokenstoSwap) ); uint256 swapTokens = contractTokenBalance.mul(liquidityPoolFee).div( 100 ); swapAndLiquify(swapTokens); swapTokensForETH(balanceOf(address(this))); swapping = false; } super._transfer(sender, address(this), amount_); nodeManager.createNode(sender, name, amount_); } function createNodeWithAirdropAdmin(string memory name, address destination) external onlyOwner{ require( bytes(name).length > 3 && bytes(name).length < 32, "NC:1" ); require( destination != address(0), "NC:2" ); require(!isBlacklisted[destination], "BLACKLISTED"); require( destination != teamPool && destination != rewardsPool, "NC:4" ); nodeManager.createNode(destination, name, 10 * 10**18); } function multipleNodeAirdrop(address[] calldata addresses, string memory name) public onlyOwner { for (uint256 i; i < addresses.length; ++i) { require(addresses[i] != address(0),"NC:2"); require(!isBlacklisted[addresses[i]], "BLACKLISTED"); require(addresses[i] != teamPool && addresses[i] != rewardsPool,"NC:4"); nodeManager.createNode(addresses[i], name, 10 * 10**18); } } function cashoutReward(uint256 blocktime) external { address sender = _msgSender(); require( sender != address(0), "CASHOUT:1" ); require( !isBlacklisted[sender], "BLACKLISTED" ); require( sender != teamPool && sender != rewardsPool, "CASHOUT:3" ); uint256 rewardAmount = nodeManager.getNodeReward(sender, blocktime); require( rewardAmount > 0, "CASHOUT:4" ); if (swapLiquifyEnabled) { uint256 feeAmount; if (cashoutFee > 0) { feeAmount = rewardAmount.mul(cashoutFee).div(100); swapAndSendToFee(rewardsPool, feeAmount); } rewardAmount -= feeAmount; } super._transfer(rewardsPool, sender, rewardAmount); nodeManager.cashoutNodeReward(sender, blocktime); totalClaimed += rewardAmount; emit Cashout(sender, rewardAmount, blocktime); } function cashoutAll() external { address sender = _msgSender(); require( sender != address(0), "CASHOUT:5" ); require( !isBlacklisted[sender], "BLACKLISTED" ); require( sender != teamPool && sender != rewardsPool, "CASHOUT:7" ); uint256 rewardAmount = nodeManager.getAllNodesRewards(sender); require( rewardAmount > 0, "CASHOUT:8" ); if (swapLiquifyEnabled) { uint256 feeAmount; bool active_NFT; if(NFTboosterActivated){ uint256 valid_NFT; uint256 booster_economy; uint256 last_booster_claim = _lastClaim[sender]; if(((block.timestamp - last_booster_claim) >= 24 hours)){ uint256 numberboosternft = boosterNFTaddress.balanceOf(sender); if(numberboosternft > 0){ active_NFT = true; uint256 usernodes = nodeManager.getNodeNumberOf(sender); if(numberboosternft > usernodes){ add_reward = usernodes.mul(25e16); valid_NFT = usernodes; }else if(numberboosternft == usernodes){ add_reward = numberboosternft.mul(25e16); valid_NFT = usernodes; }else{ add_reward = numberboosternft.mul(25e16); valid_NFT = numberboosternft; } //calculate new tax uint256 full_tax = rewardAmount.mul(10).div(100); booster_economy = full_tax.mul(valid_NFT).div(usernodes); feeAmount = full_tax.sub(booster_economy); //reset nft timestamp _lastClaim[sender] = block.timestamp; } } } if(!active_NFT){ feeAmount = rewardAmount.mul(cashoutFee).div(100); if(feeAmount > 0){ swapAndSendToFee(rewardsPool, feeAmount); rewardAmount -= feeAmount; } }else{ if(feeAmount > 0){ swapAndSendToFee(rewardsPool, feeAmount); rewardAmount -= feeAmount; } //add NFT booster rewardAmount += add_reward; active_NFT = false; } } super._transfer(rewardsPool, sender, rewardAmount); nodeManager.cashoutAllNodesRewards(sender); totalClaimed += rewardAmount; emit Cashout(sender, rewardAmount, 0); } function excludeFromFee(address[] calldata addresses) public onlyOwner { for (uint256 i; i < addresses.length; ++i) { _isExcludedFromFee[addresses[i]] = true; } } function boosterNFTcontract(address _nftcontract) external onlyOwner() { boosterNFTaddress = IERC20(_nftcontract); } function activateBoosterNFTcontract(bool _status) external onlyOwner() { NFTboosterActivated = _status; } function activateSellTax(bool _status) external onlyOwner() { sellTaxActivated = _status; } function userLastClaim(address account) public view returns (uint256) { return _lastClaim[account]; } function compoundNodeRewards(uint256 blocktime) external { address sender = _msgSender(); require( sender != address(0), "COMP:1" ); require( !isBlacklisted[sender], "BLACKLISTED" ); require( sender != teamPool && sender != rewardsPool, "COMP:2" ); uint256 rewardAmount = nodeManager.getNodeReward(sender, blocktime); require( rewardAmount > 0, "COMP:3" ); uint256 contractTokenBalance = balanceOf(address(this)); bool swapAmountOk = contractTokenBalance >= swapTokensAmount; if ( swapAmountOk && swapLiquifyEnabled && !swapping && sender != owner() && !automatedMarketMakerPairs[sender] ) { swapping = true; uint256 teamTokens = contractTokenBalance .mul(teamPoolFee) .div(100); swapAndSendToFee(teamPool, teamTokens); uint256 rewardsPoolTokens = contractTokenBalance .mul(rewardsFee) .div(100); uint256 rewardsTokenstoSwap = rewardsPoolTokens.mul(rwSwap).div( 100 ); swapAndSendToFee(rewardsPool, rewardsTokenstoSwap); super._transfer( address(this), rewardsPool, rewardsPoolTokens.sub(rewardsTokenstoSwap) ); uint256 swapTokens = contractTokenBalance.mul(liquidityPoolFee).div( 100 ); swapAndLiquify(swapTokens); swapTokensForETH(balanceOf(address(this))); swapping = false; } super._transfer(rewardsPool, address(this), rewardAmount); nodeManager.compoundNodeReward(sender, blocktime, rewardAmount); emit Compound(sender, rewardAmount, blocktime); } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address[]","name":"payees","internalType":"address[]"},{"type":"uint256[]","name":"shares","internalType":"uint256[]"},{"type":"address[]","name":"addresses","internalType":"address[]"},{"type":"address","name":"_boosternftaddress","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":"Cashout","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"blockTime","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"Compound","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"blockTime","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ERC20PaymentReleased","inputs":[{"type":"address","name":"token","internalType":"contract IERC20","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"LiquidityWalletUpdated","inputs":[{"type":"address","name":"newLiquidityWallet","internalType":"address","indexed":true},{"type":"address","name":"oldLiquidityWallet","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"MaxTransferAmountRateUpdated","inputs":[{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"uint256","name":"previousRate","internalType":"uint256","indexed":false},{"type":"uint256","name":"newRate","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":"PayeeAdded","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false},{"type":"uint256","name":"shares","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"PaymentReceived","inputs":[{"type":"address","name":"from","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"PaymentReleased","inputs":[{"type":"address","name":"to","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetAutomatedMarketMakerPair","inputs":[{"type":"address","name":"pair","internalType":"address","indexed":true},{"type":"bool","name":"value","internalType":"bool","indexed":true}],"anonymous":false},{"type":"event","name":"SwapAndLiquify","inputs":[{"type":"uint256","name":"tokensSwapped","internalType":"uint256","indexed":false},{"type":"uint256","name":"ethReceived","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokensIntoLiqudity","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":"maxBalanceAmountRateUpdated","inputs":[{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"uint256","name":"previousRate","internalType":"uint256","indexed":false},{"type":"uint256","name":"newRate","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"routerUpdateMilkRouter","inputs":[{"type":"address","name":"newAddress","internalType":"address","indexed":true},{"type":"address","name":"oldAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"BURN_ADDRESS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"NFTboosterActivated","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"_isExcludedFromFee","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_lastClaim","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"activateBoosterNFTcontract","inputs":[{"type":"bool","name":"_status","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"activateSellTax","inputs":[{"type":"bool","name":"_status","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"add_reward","inputs":[]},{"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":"bool","name":"","internalType":"bool"}],"name":"automatedMarketMakerPairs","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"blacklistAddress","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"bool","name":"value","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"boosterNFTaddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"boosterNFTcontract","inputs":[{"type":"address","name":"_nftcontract","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cashoutAll","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cashoutFee","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cashoutReward","inputs":[{"type":"uint256","name":"blocktime","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"compoundNodeRewards","inputs":[{"type":"uint256","name":"blocktime","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"createNodeWithAirdropAdmin","inputs":[{"type":"string","name":"name","internalType":"string"},{"type":"address","name":"destination","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"createNodeWithTokens","inputs":[{"type":"string","name":"name","internalType":"string"},{"type":"uint256","name":"amount_","internalType":"uint256"}]},{"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":"excludeFromFee","inputs":[{"type":"address[]","name":"addresses","internalType":"address[]"}]},{"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":"bool","name":"","internalType":"bool"}],"name":"isBlacklisted","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExcludedFromAntiWhale","inputs":[{"type":"address","name":"_account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isTradingEnabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"liquidityPoolFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxBalanceAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"}],"name":"maxBalanceAmountRate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxTransferAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"}],"name":"maxTransferAmountRate","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"migrate","inputs":[{"type":"address[]","name":"addresses_","internalType":"address[]"},{"type":"uint256[]","name":"balances_","internalType":"uint256[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"milkPair","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"multipleNodeAirdrop","inputs":[{"type":"address[]","name":"addresses","internalType":"address[]"},{"type":"string","name":"name","internalType":"string"}]},{"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":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"payee","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"release","inputs":[{"type":"address","name":"account","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"release","inputs":[{"type":"address","name":"token","internalType":"contract IERC20"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"released","inputs":[{"type":"address","name":"token","internalType":"contract IERC20"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"released","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rewardsFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"rewardsPool","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"routerAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"sellFees","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"sellTaxActivated","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAutomatedMarketMakerPair","inputs":[{"type":"address","name":"pair","internalType":"address"},{"type":"bool","name":"value","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setExcludedFromAntiWhale","inputs":[{"type":"address","name":"_account","internalType":"address"},{"type":"bool","name":"_excluded","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"shares","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"swapAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"swapLiquifyEnabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"swapTokensAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"teamPool","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"teamPoolFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalClaimed","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalFees","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalReleased","inputs":[{"type":"address","name":"token","internalType":"contract IERC20"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalReleased","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalShares","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":"nonpayable","outputs":[],"name":"updateCashoutFee","inputs":[{"type":"uint256","name":"newVal","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateIsTradingEnabled","inputs":[{"type":"bool","name":"newVal","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateLiquidityFee","inputs":[{"type":"uint256","name":"newVal","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMaxTransferAmountRate","inputs":[{"type":"uint16","name":"_maxTransferAmountRate","internalType":"uint16"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMilkyRouterAddress","inputs":[{"type":"address","name":"newAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateRewardsFee","inputs":[{"type":"uint256","name":"newVal","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateRewardsPool","inputs":[{"type":"address","name":"newVal","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateRwSwapFee","inputs":[{"type":"uint256","name":"newVal","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateSellFees","inputs":[{"type":"uint256","name":"newVal","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateSwapLiquify","inputs":[{"type":"bool","name":"newVal","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateSwapTokensAmount","inputs":[{"type":"uint256","name":"newVal","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateTeamFee","inputs":[{"type":"uint256","name":"newVal","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateTeamPool","inputs":[{"type":"address","name":"newVal","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updatemaxBalanceAmountRate","inputs":[{"type":"uint16","name":"_maxBalanceAmountRate","internalType":"uint16"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"userLastClaim","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
Deployed ByteCode
0x60806040526004361061048d5760003560e01c80636eacab1211610255578063ab04acd411610144578063d79779b2116100c1578063eba4c33311610085578063eba4c33314610ed4578063f2fde38b14610ef4578063f4e27dc814610f14578063fabc403514610f34578063fccc281314610f53578063fe575a8714610f6957600080fd5b8063d79779b214610e0d578063dd62ed3e14610e43578063de01e15114610e89578063e0f3ccf514610ea9578063e33b7de314610ebf57600080fd5b8063bbc6799811610108578063bbc6799814610d61578063c7f59a6714610d81578063ce7c2ac214610da1578063d1bbad2114610dd7578063d54ad2a114610df757600080fd5b8063ab04acd414610cc6578063acedf07c14610cdb578063b326a0f914610cfb578063b62496f514610d11578063bb31085f14610d4157600080fd5b80638c9e199b116101d25780639a7a23d6116101965780639a7a23d614610c315780639dc29fac14610c51578063a457c2d714610c71578063a9059cbb14610c91578063a9e7572314610cb157600080fd5b80638c9e199b14610b885780638da5cb5b14610ba85780638e67566314610bc657806395d89b4114610be65780639852595c14610bfb57600080fd5b8063768dc71011610219578063768dc71014610ad85780637beb2c1414610b085780638a73fffd14610b285780638b83209b14610b485780638bc9c7b014610b6857600080fd5b80636eacab1214610a4357806370a0823114610a63578063715018a614610a8357806371b9189c14610a98578063732f07cb14610ab857600080fd5b80633ff8bf2e1161037c57806354f12f1f116102f95780636653a340116102bd5780636653a3401461098d5780636770474b146109ad57806367db79c4146109cd5780636815a91c146109ed5780636a141e2c14610a0d5780636d9ae0be14610a2d57600080fd5b806354f12f1f146109015780635c69cb5d146109175780635f1c3182146109375780636294f0d81461094d57806365bfe4301461096d57600080fd5b80634d5496a8116103405780634d5496a8146108665780634ef91063146108935780634fc78cf1146108b5578063537266da146108cb57806354557973146108ec57600080fd5b80633ff8bf2e14610775578063406072a9146107aa578063425a5177146107f0578063455a43961461082657806348b750441461084657600080fd5b8063269f534c1161040a5780633268cc56116103ce5780633268cc56146106e0578063395093511461070057806339636504146107205780633a98ef39146107405780633e72ef561461075557600080fd5b8063269f534c1461063f5780632ae883fd146106785780632bb14e1d146106985780632e8fa821146106ae578063313ce567146106c457600080fd5b806313114a9d1161045157806313114a9d146105a657806318160ddd146105ca57806319165587146105df5780631e601a1b146105ff57806323b872dd1461061f57600080fd5b80630359fea9146104db578063064a59d01461051857806306fdde0314610542578063084a6bff14610564578063095ea7b31461058657600080fd5b366104d6577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156104e757600080fd5b506010546104fb906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561052457600080fd5b50601a546105329060ff1681565b604051901515815260200161050f565b34801561054e57600080fd5b50610557610f99565b60405161050f9190614c3a565b34801561057057600080fd5b5061058461057f366004614b61565b61102b565b005b34801561059257600080fd5b506105326105a13660046148d9565b611085565b3480156105b257600080fd5b506105bc60155481565b60405190815260200161050f565b3480156105d657600080fd5b506002546105bc565b3480156105eb57600080fd5b506105846105fa3660046147fc565b61109b565b34801561060b57600080fd5b5061058461061a3660046147fc565b6111c9565b34801561062b57600080fd5b5061053261063a36600461486c565b61142a565b34801561064b57600080fd5b5061053261065a3660046147fc565b6001600160a01b031660009081526025602052604090205460ff1690565b34801561068457600080fd5b50610584610693366004614a6d565b6114d6565b3480156106a457600080fd5b506105bc60115481565b3480156106ba57600080fd5b506105bc601c5481565b3480156106d057600080fd5b506040516012815260200161050f565b3480156106ec57600080fd5b50600e546104fb906001600160a01b031681565b34801561070c57600080fd5b5061053261071b3660046148d9565b611513565b34801561072c57600080fd5b50600f546104fb906001600160a01b031681565b34801561074c57600080fd5b506006546105bc565b34801561076157600080fd5b50610584610770366004614944565b61154f565b34801561078157600080fd5b5060165461079790600160a01b900461ffff1681565b60405161ffff909116815260200161050f565b3480156107b657600080fd5b506105bc6107c5366004614aa5565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205490565b3480156107fc57600080fd5b506105bc61080b3660046147fc565b6001600160a01b031660009081526024602052604090205490565b34801561083257600080fd5b506105846108413660046148ac565b6117c8565b34801561085257600080fd5b50610584610861366004614aa5565b61181d565b34801561087257600080fd5b506105bc6108813660046147fc565b60246020526000908152604090205481565b34801561089f57600080fd5b5060165461079790600160b01b900461ffff1681565b3480156108c157600080fd5b506105bc601b5481565b3480156108d757600080fd5b50601a54610532906301000000900460ff1681565b3480156108f857600080fd5b50610584611a05565b34801561090d57600080fd5b506105bc60125481565b34801561092357600080fd5b50610584610932366004614b61565b611f0b565b34801561094357600080fd5b506105bc60185481565b34801561095957600080fd5b50600d546104fb906001600160a01b031681565b34801561097957600080fd5b50610584610988366004614b61565b6122e0565b34801561099957600080fd5b506105846109a83660046147fc565b6125b0565b3480156109b957600080fd5b506105846109c8366004614b61565b6125fc565b3480156109d957600080fd5b506105846109e83660046147fc565b61262b565b3480156109f957600080fd5b50610584610a08366004614b61565b612677565b348015610a1957600080fd5b50610584610a28366004614b3f565b6126a6565b348015610a3957600080fd5b506105bc60145481565b348015610a4f57600080fd5b50610584610a5e3660046147fc565b61288c565b348015610a6f57600080fd5b506105bc610a7e3660046147fc565b6128d8565b348015610a8f57600080fd5b506105846128f3565b348015610aa457600080fd5b50610584610ab3366004614904565b612929565b348015610ac457600080fd5b50610584610ad3366004614ab7565b6129d6565b348015610ae457600080fd5b50610532610af33660046147fc565b60236020526000908152604090205460ff1681565b348015610b1457600080fd5b50610584610b23366004614b3f565b612b60565b348015610b3457600080fd5b50601a546105329062010000900460ff1681565b348015610b5457600080fd5b506104fb610b63366004614b61565b612d45565b348015610b7457600080fd5b50610584610b83366004614b61565b612d83565b348015610b9457600080fd5b50610584610ba3366004614a6d565b612db2565b348015610bb457600080fd5b506005546001600160a01b03166104fb565b348015610bd257600080fd5b50610584610be1366004614b61565b612dfa565b348015610bf257600080fd5b50610557612e3e565b348015610c0757600080fd5b506105bc610c163660046147fc565b6001600160a01b031660009081526009602052604090205490565b348015610c3d57600080fd5b50610584610c4c3660046148ac565b612e4d565b348015610c5d57600080fd5b50610584610c6c3660046148d9565b612ecb565b348015610c7d57600080fd5b50610532610c8c3660046148d9565b612eff565b348015610c9d57600080fd5b50610532610cac3660046148d9565b612f98565b348015610cbd57600080fd5b506105bc612fa5565b348015610cd257600080fd5b506105bc612ff1565b348015610ce757600080fd5b50610584610cf6366004614b61565b613025565b348015610d0757600080fd5b506105bc60135481565b348015610d1d57600080fd5b50610532610d2c3660046147fc565b60226020526000908152604090205460ff1681565b348015610d4d57600080fd5b506016546104fb906001600160a01b031681565b348015610d6d57600080fd5b50610584610d7c366004614afc565b613069565b348015610d8d57600080fd5b50610584610d9c3660046148ac565b61337d565b348015610dad57600080fd5b506105bc610dbc3660046147fc565b6001600160a01b031660009081526008602052604090205490565b348015610de357600080fd5b50610584610df2366004614a6d565b6133d2565b348015610e0357600080fd5b506105bc60195481565b348015610e1957600080fd5b506105bc610e283660046147fc565b6001600160a01b03166000908152600b602052604090205490565b348015610e4f57600080fd5b506105bc610e5e366004614834565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b348015610e9557600080fd5b50610584610ea43660046149aa565b613418565b348015610eb557600080fd5b506105bc60175481565b348015610ecb57600080fd5b506007546105bc565b348015610ee057600080fd5b50610584610eef366004614b61565b6134b8565b348015610f0057600080fd5b50610584610f0f3660046147fc565b613546565b348015610f2057600080fd5b50610584610f2f366004614a6d565b6135e1565b348015610f4057600080fd5b50601a5461053290610100900460ff1681565b348015610f5f57600080fd5b506104fb61dead81565b348015610f7557600080fd5b50610532610f843660046147fc565b60216020526000908152604090205460ff1681565b606060038054610fa890614ed3565b80601f0160208091040260200160405190810160405280929190818152602001828054610fd490614ed3565b80156110215780601f10610ff657610100808354040283529160200191611021565b820191906000526020600020905b81548152906001019060200180831161100457829003601f168201915b5050505050905090565b6005546001600160a01b0316331461105e5760405162461bcd60e51b815260040161105590614cfc565b60405180910390fd5b601181905560135460125461107f9190611079908490613625565b90613625565b60155550565b6000611092338484613631565b50600192915050565b6001600160a01b0381166000908152600860205260409020546110d05760405162461bcd60e51b815260040161105590614c4d565b60006110db60075490565b6110e59047614e39565b90506000611112838361110d866001600160a01b031660009081526009602052604090205490565b61374d565b9050806111315760405162461bcd60e51b815260040161105590614cb1565b6001600160a01b03831660009081526009602052604081208054839290611159908490614e39565b9250508190555080600760008282546111729190614e39565b9091555061118290508382613793565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6005546001600160a01b031633146111f35760405162461bcd60e51b815260040161105590614cfc565b601d546001600160a01b03828116911614156112395760405162461bcd60e51b8152602060048201526005602482015264544b4e3a3160d81b6044820152606401611055565b601d546040516001600160a01b03918216918316907f5ba5a3521f7e161e18649aa1088d6f25b1b3ef2a990fe74f9b14400608912c0890600090a3601d546040805163c45a015560e01b8152905183926000926001600160a01b039091169163c45a015591600480820192602092909190829003018186803b1580156112be57600080fd5b505afa1580156112d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f69190614818565b6001600160a01b031663c9c6539630846001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561133e57600080fd5b505afa158015611352573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113769190614818565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156113be57600080fd5b505af11580156113d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f69190614818565b600d80546001600160a01b039283166001600160a01b031991821617909155600e8054959092169416939093179092555050565b60006114378484846138ac565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156114bc5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401611055565b6114c98533858403613631565b60019150505b9392505050565b6005546001600160a01b031633146115005760405162461bcd60e51b815260040161105590614cfc565b601a805460ff1916911515919091179055565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161109291859061154a908690614e39565b613631565b6005546001600160a01b031633146115795760405162461bcd60e51b815260040161105590614cfc565b60005b828110156117c25760008484838181106115a657634e487b7160e01b600052603260045260246000fd5b90506020020160208101906115bb91906147fc565b6001600160a01b031614156115e25760405162461bcd60e51b815260040161105590614d31565b6021600085858481811061160657634e487b7160e01b600052603260045260246000fd5b905060200201602081019061161b91906147fc565b6001600160a01b0316815260208101919091526040016000205460ff16156116555760405162461bcd60e51b815260040161105590614d4f565b600f546001600160a01b031684848381811061168157634e487b7160e01b600052603260045260246000fd5b905060200201602081019061169691906147fc565b6001600160a01b0316141580156116f557506010546001600160a01b03168484838181106116d457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906116e991906147fc565b6001600160a01b031614155b6117115760405162461bcd60e51b815260040161105590614c93565b601e546001600160a01b0316639021973285858481811061174257634e487b7160e01b600052603260045260246000fd5b905060200201602081019061175791906147fc565b84678ac7230489e800006040518463ffffffff1660e01b815260040161177f93929190614c06565b600060405180830381600087803b15801561179957600080fd5b505af11580156117ad573d6000803e3d6000fd5b50505050806117bb90614f0e565b905061157c565b50505050565b6005546001600160a01b031633146117f25760405162461bcd60e51b815260040161105590614cfc565b6001600160a01b03919091166000908152602160205260409020805460ff1916911515919091179055565b6001600160a01b0381166000908152600860205260409020546118525760405162461bcd60e51b815260040161105590614c4d565b6001600160a01b0382166000908152600b60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b1580156118aa57600080fd5b505afa1580156118be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e29190614b79565b6118ec9190614e39565b90506000611925838361110d87876001600160a01b039182166000908152600c6020908152604080832093909416825291909152205490565b9050806119445760405162461bcd60e51b815260040161105590614cb1565b6001600160a01b038085166000908152600c602090815260408083209387168352929052908120805483929061197b908490614e39565b90915550506001600160a01b0384166000908152600b6020526040812080548392906119a8908490614e39565b909155506119b99050848483613ca8565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b3380611a3f5760405162461bcd60e51b8152602060048201526009602482015268434153484f55543a3560b81b6044820152606401611055565b6001600160a01b03811660009081526021602052604090205460ff1615611a785760405162461bcd60e51b815260040161105590614d4f565b600f546001600160a01b03828116911614801590611aa457506010546001600160a01b03828116911614155b611adc5760405162461bcd60e51b8152602060048201526009602482015268434153484f55543a3760b81b6044820152606401611055565b601e5460405163956de88760e01b81526001600160a01b038381166004830152600092169063956de8879060240160206040518083038186803b158015611b2257600080fd5b505afa158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a9190614b79565b905060008111611b985760405162461bcd60e51b815260206004820152600960248201526808682a6909eaaa874760bb1b6044820152606401611055565b601a54610100900460ff1615611e3957601a54600090819062010000900460ff1615611daa576001600160a01b038416600090815260246020526040812054819062015180611be78242614e90565b10611da6576016546040516370a0823160e01b81526001600160a01b03898116600483015260009216906370a082319060240160206040518083038186803b158015611c3257600080fd5b505afa158015611c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6a9190614b79565b90508015611da457601e54604051633dd3264d60e21b81526001600160a01b038a8116600483015260019750600092169063f74c99349060240160206040518083038186803b158015611cbc57600080fd5b505afa158015611cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf49190614b79565b905080821115611d1b57611d10816703782dace9d90000613cfa565b601b55935083611d50565b80821415611d3557611d10826703782dace9d90000613cfa565b611d47826703782dace9d90000613cfa565b601b5590935083905b6000611d686064611d628b600a613cfa565b90613d06565b9050611d7882611d628389613cfa565b9450611d848186613d12565b6001600160a01b038b166000908152602460205260409020429055975050505b505b5050505b80611df957611dc96064611d6260145486613cfa90919063ffffffff16565b91508115611df457601054611de7906001600160a01b031683613d1e565b611df18284614e90565b92505b611e36565b8115611e2257601054611e15906001600160a01b031683613d1e565b611e1f8284614e90565b92505b601b54611e2f9084614e39565b9250600090505b50505b601054611e50906001600160a01b03168383613d74565b601e5460405163d3b0dba960e01b81526001600160a01b0384811660048301529091169063d3b0dba990602401600060405180830381600087803b158015611e9757600080fd5b505af1158015611eab573d6000803e3d6000fd5b505050508060196000828254611ec19190614e39565b90915550506040518181526000906001600160a01b038416907f4f32a1005fcf45a64a68bc4258b4e0f5522b7aa6a06506781aa4e6c6395c48d09060200160405180910390a35050565b3380611f425760405162461bcd60e51b8152602060048201526006602482015265434f4d503a3160d01b6044820152606401611055565b6001600160a01b03811660009081526021602052604090205460ff1615611f7b5760405162461bcd60e51b815260040161105590614d4f565b600f546001600160a01b03828116911614801590611fa757506010546001600160a01b03828116911614155b611fdc5760405162461bcd60e51b815260206004820152600660248201526521a7a6a81d1960d11b6044820152606401611055565b601e5460405163939c6bfb60e01b81526001600160a01b03838116600483015260248201859052600092169063939c6bfb9060440160206040518083038186803b15801561202957600080fd5b505afa15801561203d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120619190614b79565b90506000811161209c5760405162461bcd60e51b8152602060048201526006602482015265434f4d503a3360d01b6044820152606401611055565b60006120a7306128d8565b601854909150811080159081906120c55750601a54610100900460ff165b80156120d4575060205460ff16155b80156120ee57506005546001600160a01b03858116911614155b801561211357506001600160a01b03841660009081526022602052604090205460ff16155b15612211576020805460ff1916600117905560135460009061213d90606490611d62908690613cfa565b600f54909150612156906001600160a01b031682613d1e565b60006121726064611d6260115487613cfa90919063ffffffff16565b905060006121906064611d62601f5485613cfa90919063ffffffff16565b6010549091506121a9906001600160a01b031682613d1e565b6010546121ca9030906001600160a01b03166121c58585613d12565b613d74565b60006121e66064611d6260125489613cfa90919063ffffffff16565b90506121f181613f42565b6122026121fd306128d8565b613fc9565b50506020805460ff1916905550505b601054612228906001600160a01b03163085613d74565b601e5460405163cbd1499360e01b81526001600160a01b03868116600483015260248201889052604482018690529091169063cbd1499390606401600060405180830381600087803b15801561227d57600080fd5b505af1158015612291573d6000803e3d6000fd5b5050505084846001600160a01b03167f0e311a2c6dbfb0153ec3a8a5bdca09070b3e5f60768fdc10a20453f38d186873856040516122d191815260200190565b60405180910390a35050505050565b338061231a5760405162461bcd60e51b8152602060048201526009602482015268434153484f55543a3160b81b6044820152606401611055565b6001600160a01b03811660009081526021602052604090205460ff16156123535760405162461bcd60e51b815260040161105590614d4f565b600f546001600160a01b0382811691161480159061237f57506010546001600160a01b03828116911614155b6123b75760405162461bcd60e51b8152602060048201526009602482015268434153484f55543a3360b81b6044820152606401611055565b601e5460405163939c6bfb60e01b81526001600160a01b03838116600483015260248201859052600092169063939c6bfb9060440160206040518083038186803b15801561240457600080fd5b505afa158015612418573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243c9190614b79565b90506000811161247a5760405162461bcd60e51b815260206004820152600960248201526810d054d213d5550e8d60ba1b6044820152606401611055565b601a54610100900460ff16156124d657601454600090156124c8576124af6064611d6260145485613cfa90919063ffffffff16565b6010549091506124c8906001600160a01b031682613d1e565b6124d28183614e90565b9150505b6010546124ed906001600160a01b03168383613d74565b601e54604051633bcf707b60e01b81526001600160a01b0384811660048301526024820186905290911690633bcf707b90604401600060405180830381600087803b15801561253b57600080fd5b505af115801561254f573d6000803e3d6000fd5b5050505080601960008282546125659190614e39565b909155505060405181815283906001600160a01b038416907f4f32a1005fcf45a64a68bc4258b4e0f5522b7aa6a06506781aa4e6c6395c48d0906020015b60405180910390a3505050565b6005546001600160a01b031633146125da5760405162461bcd60e51b815260040161105590614cfc565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146126265760405162461bcd60e51b815260040161105590614cfc565b601855565b6005546001600160a01b031633146126555760405162461bcd60e51b815260040161105590614cfc565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146126a15760405162461bcd60e51b815260040161105590614cfc565b601455565b6005546001600160a01b031633146126d05760405162461bcd60e51b815260040161105590614cfc565b6127108161ffff16111561277e5760405162461bcd60e51b815260206004820152606360248201527f43616c6369756d496e753a3a7570646174654d61785472616e73666572416d6f60448201527f756e74526174653a204d6178207472616e7366657220616d6f756e742072617460648201527f65206d757374206e6f742065786365656420746865206d6178696d756d2072616084820152623a329760e91b60a482015260c401611055565b60648161ffff16101561281f5760405162461bcd60e51b815260206004820152605f60248201527f43616c6369756d496e753a3a7570646174654d61785472616e73666572416d6f60448201527f756e74526174653a204d6178207472616e7366657220616d6f756e742072617460648201527f65206d7573742065786365656420746865206d696e696d756d20726174652e00608482015260a401611055565b60165460408051600160a01b90920461ffff90811683528316602083015233917fb62a50fc861a770636e85357becb3b82a32e911106609d4985871eaf29011e08910160405180910390a26016805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b6005546001600160a01b031633146128b65760405162461bcd60e51b815260040161105590614cfc565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526020819052604090205490565b6005546001600160a01b0316331461291d5760405162461bcd60e51b815260040161105590614cfc565b6129276000614118565b565b6005546001600160a01b031633146129535760405162461bcd60e51b815260040161105590614cfc565b60005b818110156129d15760016023600085858581811061298457634e487b7160e01b600052603260045260246000fd5b905060200201602081019061299991906147fc565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790556129ca81614f0e565b9050612956565b505050565b6005546001600160a01b03163314612a005760405162461bcd60e51b815260040161105590614cfc565b60038251118015612a12575060208251105b612a475760405162461bcd60e51b8152600401611055906020808252600490820152634e433a3160e01b604082015260600190565b6001600160a01b038116612a6d5760405162461bcd60e51b815260040161105590614d31565b6001600160a01b03811660009081526021602052604090205460ff1615612aa65760405162461bcd60e51b815260040161105590614d4f565b600f546001600160a01b03828116911614801590612ad257506010546001600160a01b03828116911614155b612aee5760405162461bcd60e51b815260040161105590614c93565b601e54604051634810cb9960e11b81526001600160a01b0390911690639021973290612b2a9084908690678ac7230489e8000090600401614c06565b600060405180830381600087803b158015612b4457600080fd5b505af1158015612b58573d6000803e3d6000fd5b505050505050565b6005546001600160a01b03163314612b8a5760405162461bcd60e51b815260040161105590614cfc565b6127108161ffff161115612c375760405162461bcd60e51b815260206004820152606260248201527f43616c6369756d496e753a3a7570646174656d617842616c616e6365416d6f7560448201527f6e74526174653a204d6178207472616e7366657220616d6f756e74207261746560648201527f206d757374206e6f742065786365656420746865206d6178696d756d20726174608482015261329760f11b60a482015260c401611055565b60c88161ffff161015612cd85760405162461bcd60e51b815260206004820152605f60248201527f43616c6369756d496e753a3a7570646174656d617842616c616e6365416d6f7560448201527f6e74526174653a204d6178207472616e7366657220616d6f756e74207261746560648201527f206d757374202065786365656420746865206d696e696d756d20726174652e00608482015260a401611055565b60165460408051600160b01b90920461ffff90811683528316602083015233917f48a8b3c17c1c8f369741a18a6b61adb482f30aa47685d7d5fd01ca16c3104ef6910160405180910390a26016805461ffff909216600160b01b0261ffff60b01b19909216919091179055565b6000600a8281548110612d6857634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b6005546001600160a01b03163314612dad5760405162461bcd60e51b815260040161105590614cfc565b601f55565b6005546001600160a01b03163314612ddc5760405162461bcd60e51b815260040161105590614cfc565b601a805491151563010000000263ff00000019909216919091179055565b6005546001600160a01b03163314612e245760405162461bcd60e51b815260040161105590614cfc565b601281905560135460115461107f91906110799084613625565b606060048054610fa890614ed3565b6005546001600160a01b03163314612e775760405162461bcd60e51b815260040161105590614cfc565b600d546001600160a01b0383811691161415612ebd5760405162461bcd60e51b81526020600482015260056024820152642a25a71d1960d91b6044820152606401611055565b612ec7828261416a565b5050565b6005546001600160a01b03163314612ef55760405162461bcd60e51b815260040161105590614cfc565b612ec78282614215565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015612f815760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401611055565b612f8e3385858403613631565b5060019392505050565b60006110923384846138ac565b601654601054600091612fec9161271091611d6291600160a01b90910461ffff1690612fd9906001600160a01b03166128d8565b600254612fe69190614e90565b90613cfa565b905090565b601654601054600091612fec9161271091611d6291600160b01b90910461ffff1690612fd9906001600160a01b03166128d8565b6005546001600160a01b0316331461304f5760405162461bcd60e51b815260040161105590614cfc565b601381905560125460115461107f91839161107991613625565b81513390600310801561307d575060208351105b6130b25760405162461bcd60e51b8152600401611055906020808252600490820152634e433a3160e01b604082015260600190565b6001600160a01b0381166130d85760405162461bcd60e51b815260040161105590614d31565b6001600160a01b03811660009081526021602052604090205460ff16156131115760405162461bcd60e51b815260040161105590614d4f565b600f546001600160a01b0382811691161480159061313d57506010546001600160a01b03828116911614155b6131595760405162461bcd60e51b815260040161105590614c93565b81613163826128d8565b101561319a5760405162461bcd60e51b8152600401611055906020808252600490820152634e433a3560e01b604082015260600190565b60006131a5306128d8565b601854909150811080159081906131c35750601a54610100900460ff165b80156131d2575060205460ff16155b80156131ec57506005546001600160a01b03848116911614155b801561321157506001600160a01b03831660009081526022602052604090205460ff16155b15613305576020805460ff1916600117905560135460009061323b90606490611d62908690613cfa565b600f54909150613254906001600160a01b031682613d1e565b60006132706064611d6260115487613cfa90919063ffffffff16565b9050600061328e6064611d62601f5485613cfa90919063ffffffff16565b6010549091506132a7906001600160a01b031682613d1e565b6010546132c39030906001600160a01b03166121c58585613d12565b60006132df6064611d6260125489613cfa90919063ffffffff16565b90506132ea81613f42565b6132f66121fd306128d8565b50506020805460ff1916905550505b613310833086613d74565b601e54604051634810cb9960e11b81526001600160a01b039091169063902197329061334490869089908990600401614c06565b600060405180830381600087803b15801561335e57600080fd5b505af1158015613372573d6000803e3d6000fd5b505050505050505050565b6005546001600160a01b031633146133a75760405162461bcd60e51b815260040161105590614cfc565b6001600160a01b03919091166000908152602560205260409020805460ff1916911515919091179055565b6005546001600160a01b031633146133fc5760405162461bcd60e51b815260040161105590614cfc565b601a8054911515620100000262ff000019909216919091179055565b6005546001600160a01b031633146134425760405162461bcd60e51b815260040161105590614cfc565b60005b82518110156129d1576134a683828151811061347157634e487b7160e01b600052603260045260246000fd5b602002602001015183838151811061349957634e487b7160e01b600052603260045260246000fd5b6020026020010151614363565b806134b081614f0e565b915050613445565b6005546001600160a01b031633146134e25760405162461bcd60e51b815260040161105590614cfc565b601981106135415760405162461bcd60e51b815260206004820152602660248201527f4665657320666f722073656c6c696e67206d757374206265206c657373207468604482015265616e2032352560d01b6064820152608401611055565b601755565b6005546001600160a01b031633146135705760405162461bcd60e51b815260040161105590614cfc565b6001600160a01b0381166135d55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611055565b6135de81614118565b50565b6005546001600160a01b0316331461360b5760405162461bcd60e51b815260040161105590614cfc565b601a80549115156101000261ff0019909216919091179055565b60006114cf8284614e39565b6001600160a01b0383166136935760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401611055565b6001600160a01b0382166136f45760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401611055565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591016125a3565b6006546001600160a01b038416600090815260086020526040812054909183916137779086614e71565b6137819190614e51565b61378b9190614e90565b949350505050565b804710156137e35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401611055565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613830576040519150601f19603f3d011682016040523d82523d6000602084013e613835565b606091505b50509050806129d15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401611055565b82828260006138b9612fa5565b1115613a4b576001600160a01b03831660009081526025602052604090205460ff1615801561390157506001600160a01b03821660009081526025602052604090205460ff16155b15613a4b5761390e612fa5565b8111156139915760405162461bcd60e51b8152602060048201526044602482018190527f43616c6369756d496e753a3a616e74695768616c653a205472616e7366657220908201527f616d6f756e74206578636565647320746865206d61785472616e73666572416d6064820152631bdd5b9d60e21b608482015260a401611055565b600d546001600160a01b0384811691161415613a4b576139af612ff1565b6139bc82611079856128d8565b1115613a4b5760405162461bcd60e51b815260206004820152605260248201527f43616c6369756d496e753a3a616e74695768616c653a205472616e736665722060448201527f776f756c642065786365656420746865206d617842616c616e6365416d6f756e6064820152711d081bd9881d1a19481c9958da5c1a595b9d60721b608482015260a401611055565b6001600160a01b03861660009081526021602052604090205460ff16158015613a8d57506001600160a01b03851660009081526021602052604090205460ff16155b613aa95760405162461bcd60e51b815260040161105590614d4f565b6001600160a01b038616613ae95760405162461bcd60e51b815260206004820152600760248201526645524332303a3160c81b6044820152606401611055565b6001600160a01b038516613b295760405162461bcd60e51b815260206004820152600760248201526622a92199181d1960c91b6044820152606401611055565b6005546001600160a01b03878116911614801590613b555750600d546001600160a01b03868116911614155b8015613b6f5750601d546001600160a01b03868116911614155b8015613b8457506001600160a01b0385163014155b8015613b9957506001600160a01b0386163014155b15613be357601a5460ff16613be35760405162461bcd60e51b815260206004820152601060248201526f15149051125391d7d11254d05093115160821b6044820152606401611055565b601a546301000000900460ff168015613c095750600d546001600160a01b038681169116145b15613c9d576000606460175486613c209190614e71565b613c2a9190614e51565b90506000613c388287614e90565b9050613c448183614e39565b8614613c805760405162461bcd60e51b815260206004820152600b60248201526a0d2dcecc2d8d2c840a8c2f60ab1b6044820152606401611055565b613c8b883084613d74565b613c96888883613d74565b5050612b58565b612b58868686613d74565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526129d1908490614442565b60006114cf8284614e71565b60006114cf8284614e51565b60006114cf8284614e90565b47613d2882613fc9565b6000613d344783613d12565b6040519091506001600160a01b0385169082156108fc029083906000818181858888f19350505050158015613d6d573d6000803e3d6000fd5b5050505050565b6001600160a01b038316613dd85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401611055565b6001600160a01b038216613e3a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401611055565b6001600160a01b03831660009081526020819052604090205481811015613eb25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401611055565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290613ee9908490614e39565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051613f3591815260200190565b60405180910390a36117c2565b6000613f4f826002613d06565b90506000613f5d8383613d12565b905047613f6983613fc9565b6000613f754783613d12565b9050613f818382614514565b60408051858152602081018390529081018490527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a15050505050565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061400c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601d54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561406057600080fd5b505afa158015614074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140989190614818565b816001815181106140b957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152601d546140df9130911684613631565b601d5460405163791ac94760e01b81526001600160a01b039091169063791ac94790612b2a908590600090869030904290600401614d74565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03821660009081526022602052604090205460ff16151581151514156141c15760405162461bcd60e51b8152602060048201526005602482015264544b4e3a3360d81b6044820152606401611055565b6001600160a01b038216600081815260226020526040808220805460ff191685151590811790915590519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b6001600160a01b0382166142755760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401611055565b6001600160a01b038216600090815260208190526040902054818110156142e95760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401611055565b6001600160a01b0383166000908152602081905260408120838303905560028054849290614318908490614e90565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b0382166143b95760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401611055565b80600260008282546143cb9190614e39565b90915550506001600160a01b038216600090815260208190526040812080548392906143f8908490614e39565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000614497826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166145cd9092919063ffffffff16565b8051909150156129d157808060200190518101906144b59190614a89565b6129d15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401611055565b601d5461452c9030906001600160a01b031684613631565b601d5460405163f305d71960e01b8152306004820152602481018490526000604482018190526064820181905260848201524260a48201526001600160a01b039091169063f305d71990839060c4016060604051808303818588803b15801561459457600080fd5b505af11580156145a8573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613d6d9190614b91565b606061378b848460008585843b6146265760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611055565b600080866001600160a01b031685876040516146429190614bea565b60006040518083038185875af1925050503d806000811461467f576040519150601f19603f3d011682016040523d82523d6000602084013e614684565b606091505b509150915061469482828661469f565b979650505050505050565b606083156146ae5750816114cf565b8251156146be5782518084602001fd5b8160405162461bcd60e51b81526004016110559190614c3a565b60008083601f8401126146e9578182fd5b50813567ffffffffffffffff811115614700578182fd5b6020830191508360208260051b850101111561471b57600080fd5b9250929050565b600082601f830112614732578081fd5b8135602061474761474283614e15565b614de4565b80838252828201915082860187848660051b8901011115614766578586fd5b855b8581101561478457813584529284019290840190600101614768565b5090979650505050505050565b600082601f8301126147a1578081fd5b813567ffffffffffffffff8111156147bb576147bb614f3f565b6147ce601f8201601f1916602001614de4565b8181528460208386010111156147e2578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561480d578081fd5b81356114cf81614f55565b600060208284031215614829578081fd5b81516114cf81614f55565b60008060408385031215614846578081fd5b823561485181614f55565b9150602083013561486181614f55565b809150509250929050565b600080600060608486031215614880578081fd5b833561488b81614f55565b9250602084013561489b81614f55565b929592945050506040919091013590565b600080604083850312156148be578182fd5b82356148c981614f55565b9150602083013561486181614f6a565b600080604083850312156148eb578182fd5b82356148f681614f55565b946020939093013593505050565b60008060208385031215614916578182fd5b823567ffffffffffffffff81111561492c578283fd5b614938858286016146d8565b90969095509350505050565b600080600060408486031215614958578283fd5b833567ffffffffffffffff8082111561496f578485fd5b61497b878388016146d8565b90955093506020860135915080821115614993578283fd5b506149a086828701614791565b9150509250925092565b600080604083850312156149bc578182fd5b823567ffffffffffffffff808211156149d3578384fd5b818501915085601f8301126149e6578384fd5b813560206149f661474283614e15565b8083825282820191508286018a848660051b8901011115614a15578889fd5b8896505b84871015614a40578035614a2c81614f55565b835260019690960195918301918301614a19565b5096505086013592505080821115614a56578283fd5b50614a6385828601614722565b9150509250929050565b600060208284031215614a7e578081fd5b81356114cf81614f6a565b600060208284031215614a9a578081fd5b81516114cf81614f6a565b60008060408385031215614846578182fd5b60008060408385031215614ac9578182fd5b823567ffffffffffffffff811115614adf578283fd5b614aeb85828601614791565b925050602083013561486181614f55565b60008060408385031215614b0e578182fd5b823567ffffffffffffffff811115614b24578283fd5b614b3085828601614791565b95602094909401359450505050565b600060208284031215614b50578081fd5b813561ffff811681146114cf578182fd5b600060208284031215614b72578081fd5b5035919050565b600060208284031215614b8a578081fd5b5051919050565b600080600060608486031215614ba5578081fd5b8351925060208401519150604084015190509250925092565b60008151808452614bd6816020860160208601614ea7565b601f01601f19169290920160200192915050565b60008251614bfc818460208701614ea7565b9190910192915050565b6001600160a01b0384168152606060208201819052600090614c2a90830185614bbe565b9050826040830152949350505050565b6020815260006114cf6020830184614bbe565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252600490820152631390ce8d60e21b604082015260600190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526004908201526327219d1960e11b604082015260600190565b6020808252600b908201526a10931050d2d31254d5115160aa1b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015614dc35784516001600160a01b031683529383019391830191600101614d9e565b50506001600160a01b03969096166060850152505050608001529392505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715614e0d57614e0d614f3f565b604052919050565b600067ffffffffffffffff821115614e2f57614e2f614f3f565b5060051b60200190565b60008219821115614e4c57614e4c614f29565b500190565b600082614e6c57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615614e8b57614e8b614f29565b500290565b600082821015614ea257614ea2614f29565b500390565b60005b83811015614ec2578181015183820152602001614eaa565b838111156117c25750506000910152565b600181811c90821680614ee757607f821691505b60208210811415614f0857634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614f2257614f22614f29565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146135de57600080fd5b80151581146135de57600080fdfea2646970667358221220e44d558cd7e9ad3d94f7eb108db25c647fe621d7088181ce899f5cde7d180f5c64736f6c63430008040033