Contract Address Details

0x87CC7290897cbe50Eb38e0C299B26798f87C8D5F

Contract Name
FeeDistributor
Creator
0x3ac393–ae476b at 0x3c1d6e–faff95
Balance
0 ELA
Tokens
Fetching tokens...
Transactions
Transfers
Gas Used
Last Balance Update
29406430
Contract name:
FeeDistributor




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
999999
EVM Version
constantinople




Verified at
2021-10-27 08:04:35.464730Z

Constructor Arguments

00000000000000000000000080f2cf7059336b44a75f00451b81f8d742dd2b940000000000000000000000003ac3935326cca3146365a39458b5905bcdae476b00000000000000000000000052b337a04dd35bc66d49018c09bc70a35bcf7272000000000000000000000000517e9e5d46c1ea8ab6f78677d6114ef47f71f6c4

Arg [0] (address) : 0x80f2cf7059336b44a75f00451b81f8d742dd2b94
Arg [1] (address) : 0x3ac3935326cca3146365a39458b5905bcdae476b
Arg [2] (address) : 0x52b337a04dd35bc66d49018c09bc70a35bcf7272
Arg [3] (address) : 0x517e9e5d46c1ea8ab6f78677d6114ef47f71f6c4

              

Contract source code

// File: contracts/Dividends/interfaces/IFeeReceiver.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface IFeeReceiver {
function income(uint256 dollarAmount) external;
}
// File: contracts/Swap/interfaces/IGlidePair.sol
pragma solidity >=0.6.6;
interface IGlidePair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
// File: contracts/Swap/interfaces/IGlideRouter.sol
pragma solidity >=0.6.2;
interface IGlideRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external view returns (uint256 amountB);
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external view returns (uint256 amountOut);
function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) external view 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,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
// File: @openzeppelin/contracts/math/Math.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
}
// File: @openzeppelin/contracts/utils/Address.sol
pragma solidity >=0.6.2 <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;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
pragma solidity >=0.6.0 <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/GSN/Context.sol
pragma solidity >=0.6.0 <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 GSN 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 payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
pragma solidity >=0.6.0 <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 () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view 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 {
emit OwnershipTransferred(_owner, address(0));
_owner = 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");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
// File: @openzeppelin/contracts/math/SafeMath.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @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) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @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 sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @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) {
// 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 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts 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 mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol
pragma solidity >=0.6.0 <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 SafeMath for uint256;
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'
// solhint-disable-next-line max-line-length
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).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_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
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// File: contracts/Swap/libraries/RouterHelper.sol
pragma solidity ^0.6.0;
library RouterHelper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
function getTxDeadline() private view returns (uint256){
return block.timestamp + 60;
}
//Given X input tokens, return Y output tokens without concern about minimum/slippage
function swapTokens(address router, uint256 amount, address inputToken, address outputToken, address[] memory path) internal returns (uint256) {
if (inputToken == outputToken) {
return amount;
}
require(path.length > 0, "swapTokens: INVALID PATH");
require(path[0] == inputToken, "swapTokens: INVALID PATH");
require(path[path.length - 1] == outputToken, "swapTokens: INVALID PATH");
uint256 inputTokenBal = IERC20(inputToken).balanceOf(address(this));
require(inputTokenBal >= amount, "swapTokens: INSUFFICIENT AMOUNT");
uint256 outputTokenBal = IERC20(outputToken).balanceOf(address(this));
IERC20(inputToken).safeIncreaseAllowance(router, amount);
IGlideRouter(router).swapExactTokensForTokensSupportingFeeOnTransferTokens(
amount,
0,
path,
address(this),
getTxDeadline()
);
uint256 gains = IERC20(outputToken).balanceOf(address(this)).sub(outputTokenBal);
return gains;
}
function addLiquidity(
address router,
address token0Address,
address token1Address,
uint256 token0Amt,
uint256 token1Amt
) internal returns (uint256, uint256, uint256) {
IERC20(token0Address).safeIncreaseAllowance(router, token0Amt);
IERC20(token1Address).safeIncreaseAllowance(router, token1Amt);
(uint amount0, uint amount1, uint liquidity) = IGlideRouter(router).addLiquidity(
token0Address,
token1Address,
token0Amt,
token1Amt,
0,
0,
address(this),
getTxDeadline()
);
return (amount0, amount1, liquidity);
}
function removeLiquidity(
address router,
address pairAddress,
uint256 pairAmount
) internal returns (uint256, uint256){
address token0Address = IGlidePair(pairAddress).token0();
address token1Address = IGlidePair(pairAddress).token1();
IERC20(pairAddress).safeIncreaseAllowance(router, pairAmount);
(uint256 amount0, uint256 amount1) = IGlideRouter(router).removeLiquidity(
token0Address,
token1Address,
pairAmount,
0,
0,
address(this),
getTxDeadline()
);
return (amount0, amount1);
}
}
// File: contracts/Dividends/FeeDistributor.sol
pragma solidity 0.6.12;
contract FeeDistributor is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 public platformShareBP;
address public rewardsReceiver;
address public feeHolder;
address public schedulerAddress;
address public wElaAddress;
event RescueTokens(address indexed user, address indexed token, uint256 amount);
event UpdateFeeSettings(address indexed user, uint platformShareBP);
event UpdateFeeReceivers(address indexed user, address rewardsReceiver, address feeHolder);
event SetSchedulerAddress(address indexed user, address newAddr);
constructor(
address _rewardsReceiver,
address _feeHolder,
address _schedulerAddress,
address _wElaAddress
) public {
rewardsReceiver = _rewardsReceiver;
feeHolder = _feeHolder;
schedulerAddress = _schedulerAddress;
wElaAddress = _wElaAddress;
}
modifier onlyAdmins(){
require(msg.sender == schedulerAddress || msg.sender == owner(), "onlyAdmins: FORBIDDEN");
_;
}
function removeLiquidity(address router, address lpToken) external onlyAdmins {
uint256 amount = IERC20(lpToken).balanceOf(address(this));
RouterHelper.removeLiquidity(router, lpToken, amount);
}
function sellTokens(address router, address inputToken, address outputToken, address[] memory path) external onlyAdmins {
uint256 amount = IERC20(inputToken).balanceOf(address(this));
RouterHelper.swapTokens(router, amount, inputToken, outputToken, path);
}
function distributeFees() external onlyAdmins {
uint256 balance = IERC20(wElaAddress).balanceOf(address(this));
uint256 platformAmount = balance.mul(platformShareBP).div(10000);
uint256 receiverAmount = balance.sub(platformAmount);
IERC20(wElaAddress).safeIncreaseAllowance(rewardsReceiver, receiverAmount);
IFeeReceiver(rewardsReceiver).income(receiverAmount);
safeTokenTransfer(feeHolder, platformAmount);
}
function safeTokenTransfer(address to, uint256 amount) internal {
uint256 balance = IERC20(wElaAddress).balanceOf(address(this));
if (amount > balance) {
IERC20(wElaAddress).safeTransfer(to, balance);
} else {
IERC20(wElaAddress).safeTransfer(to, amount);
}
}
function rescueToken(address token) external onlyOwner {
uint256 balance = IERC20(token).balanceOf(address(this));
IERC20(token).safeTransfer(feeHolder, balance);
emit RescueTokens(msg.sender, token, balance);
}
function updateFeeSettings(uint256 _platformShareBP) external onlyOwner {
platformShareBP = _platformShareBP;
emit UpdateFeeSettings(msg.sender, platformShareBP);
}
function updateFeeReceivers(address _rewardsReceiver, address _feeHolder) external onlyOwner {
rewardsReceiver = _rewardsReceiver;
feeHolder = _feeHolder;
emit UpdateFeeReceivers(msg.sender, rewardsReceiver, feeHolder);
}
function setSchedulerAddr(address newAddr) external onlyAdmins {
schedulerAddress = newAddr;
emit SetSchedulerAddress(msg.sender, newAddr);
}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_rewardsReceiver","internalType":"address"},{"type":"address","name":"_feeHolder","internalType":"address"},{"type":"address","name":"_schedulerAddress","internalType":"address"},{"type":"address","name":"_wElaAddress","internalType":"address"}]},{"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":"RescueTokens","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetSchedulerAddress","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"newAddr","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateFeeReceivers","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"rewardsReceiver","internalType":"address","indexed":false},{"type":"address","name":"feeHolder","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateFeeSettings","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"platformShareBP","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"distributeFees","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeHolder","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"platformShareBP","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeLiquidity","inputs":[{"type":"address","name":"router","internalType":"address"},{"type":"address","name":"lpToken","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescueToken","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"rewardsReceiver","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"schedulerAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"sellTokens","inputs":[{"type":"address","name":"router","internalType":"address"},{"type":"address","name":"inputToken","internalType":"address"},{"type":"address","name":"outputToken","internalType":"address"},{"type":"address[]","name":"path","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSchedulerAddr","inputs":[{"type":"address","name":"newAddr","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateFeeReceivers","inputs":[{"type":"address","name":"_rewardsReceiver","internalType":"address"},{"type":"address","name":"_feeHolder","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateFeeSettings","inputs":[{"type":"uint256","name":"_platformShareBP","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"wElaAddress","inputs":[]}]
            

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80639cf38f7c11610097578063cc6be5e411610066578063cc6be5e4146102f6578063d7236159146102fe578063f2fde38b14610339578063fca11cb81461036c576100f5565b80639cf38f7c14610291578063ae45850b146102cc578063bb57ad20146102d4578063c0d46b91146102dc576100f5565b8063715018a6116100d3578063715018a61461017f578063717815de146101875780637a2829d2146101b85780638da5cb5b14610289576100f5565b8063208995cf146100fa57806343abd319146101195780634460d3cf1461014c575b600080fd5b6101176004803603602081101561011057600080fd5b5035610374565b005b6101176004803603602081101561012f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610443565b6101176004803603602081101561016257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610582565b610117610723565b61018f610823565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610117600480360360808110156101ce57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013582169260408201359092169181019060808101606082013564010000000081111561021757600080fd5b82018360208201111561022957600080fd5b8035906020019184602083028401116401000000008311171561024b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061083f945050505050565b61018f6109ae565b610117600480360360408110156102a757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166109ca565b61018f610b36565b610117610b52565b6102e4610dc3565b60408051918252519081900360200190f35b61018f610dc9565b6101176004803603604081101561031457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610de5565b6101176004803603602081101561034f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f0d565b61018f611097565b61037c6110b3565b60005473ffffffffffffffffffffffffffffffffffffffff90811691161461040557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600181905560408051828152905133917f4707e55f0a09c2af9ce22cf5f17b652615a810a1ea25f650cb18276dee658d6e919081900360200190a250565b60045473ffffffffffffffffffffffffffffffffffffffff1633148061049b575061046c6109ae565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61050657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6f6e6c7941646d696e733a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b6004805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155604080519182525133917f3286106f3d6ecbfd95574eec1ebdfd0640a1d7bfea3ac1ef867907e32830ec3f919081900360200190a250565b61058a6110b3565b60005473ffffffffffffffffffffffffffffffffffffffff90811691161461061357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561067c57600080fd5b505afa158015610690573d6000803e3d6000fd5b505050506040513d60208110156106a657600080fd5b50516003549091506106d29073ffffffffffffffffffffffffffffffffffffffff8481169116836110b7565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917f0de377c3f3362540c047602ad996510f81ec5d84f9ad151c7b6ebecce8ea6b7b9181900360200190a35050565b61072b6110b3565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146107b457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60045473ffffffffffffffffffffffffffffffffffffffff1633148061089757506108686109ae565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61090257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6f6e6c7941646d696e733a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561096b57600080fd5b505afa15801561097f573d6000803e3d6000fd5b505050506040513d602081101561099557600080fd5b505190506109a68582868686611144565b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60045473ffffffffffffffffffffffffffffffffffffffff16331480610a2257506109f36109ae565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610a8d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6f6e6c7941646d696e733a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610af657600080fd5b505afa158015610b0a573d6000803e3d6000fd5b505050506040513d6020811015610b2057600080fd5b50519050610b2f8383836116a3565b5050505050565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60045473ffffffffffffffffffffffffffffffffffffffff16331480610baa5750610b7b6109ae565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610c1557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6f6e6c7941646d696e733a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015610c8657600080fd5b505afa158015610c9a573d6000803e3d6000fd5b505050506040513d6020811015610cb057600080fd5b5051600154909150600090610cd49061271090610cce9085906118e7565b90611963565b90506000610ce283836119a5565b600254600554919250610d0f9173ffffffffffffffffffffffffffffffffffffffff9081169116836119e7565b600254604080517f84ed8c5600000000000000000000000000000000000000000000000000000000815260048101849052905173ffffffffffffffffffffffffffffffffffffffff909216916384ed8c569160248082019260009290919082900301818387803b158015610d8257600080fd5b505af1158015610d96573d6000803e3d6000fd5b5050600354610dbe925073ffffffffffffffffffffffffffffffffffffffff16905083611b3a565b505050565b60015481565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b610ded6110b3565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610e7657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6002805473ffffffffffffffffffffffffffffffffffffffff8085167fffffffffffffffffffffffff00000000000000000000000000000000000000009283161792839055600380548583169316929092179182905560408051938216845291166020830152805133927fe21787ff2af43740120359435dbc79c3d7431032c8974862cbc5c8dbaa207fe692908290030190a25050565b610f156110b3565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610f9e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661100a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061210d6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b3390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610dbe908490611c2e565b60008273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561118157508361169a565b60008251116111f157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f73776170546f6b656e733a20494e56414c494420504154480000000000000000604482015290519081900360640190fd5b8373ffffffffffffffffffffffffffffffffffffffff168260008151811061121557fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461129f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f73776170546f6b656e733a20494e56414c494420504154480000000000000000604482015290519081900360640190fd5b8273ffffffffffffffffffffffffffffffffffffffff16826001845103815181106112c657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461135057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f73776170546f6b656e733a20494e56414c494420504154480000000000000000604482015290519081900360640190fd5b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113b957600080fd5b505afa1580156113cd573d6000803e3d6000fd5b505050506040513d60208110156113e357600080fd5b505190508581101561145657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f73776170546f6b656e733a20494e53554646494349454e5420414d4f554e5400604482015290519081900360640190fd5b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156114bf57600080fd5b505afa1580156114d3573d6000803e3d6000fd5b505050506040513d60208110156114e957600080fd5b5051905061150e73ffffffffffffffffffffffffffffffffffffffff871689896119e7565b8773ffffffffffffffffffffffffffffffffffffffff16635c11d7958860008730611537611d06565b6040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156115b457818101518382015260200161159c565b505050509050019650505050505050600060405180830381600087803b1580156115dd57600080fd5b505af11580156115f1573d6000803e3d6000fd5b505050506000611694828773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561166257600080fd5b505afa158015611676573d6000803e3d6000fd5b505050506040513d602081101561168c57600080fd5b5051906119a5565b93505050505b95945050505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156116ee57600080fd5b505afa158015611702573d6000803e3d6000fd5b505050506040513d602081101561171857600080fd5b5051604080517fd21220a7000000000000000000000000000000000000000000000000000000008152905191925060009173ffffffffffffffffffffffffffffffffffffffff88169163d21220a7916004808301926020929190829003018186803b15801561178657600080fd5b505afa15801561179a573d6000803e3d6000fd5b505050506040513d60208110156117b057600080fd5b505190506117d573ffffffffffffffffffffffffffffffffffffffff871688876119e7565b6000808873ffffffffffffffffffffffffffffffffffffffff1663baa2abde85858a60008030611803611d06565b6040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019750505050505050506040805180830381600087803b1580156118a457600080fd5b505af11580156118b8573d6000803e3d6000fd5b505050506040513d60408110156118ce57600080fd5b508051602090910151909a909950975050505050505050565b6000826118f65750600061195d565b8282028284828161190357fe5b041461195a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806121596021913960400191505060405180910390fd5b90505b92915050565b600061195a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611d0d565b600061195a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611dcb565b6000611aa4828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b505190611e3f565b6040805173ffffffffffffffffffffffffffffffffffffffff8616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052909150611b34908590611c2e565b50505050565b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611bab57600080fd5b505afa158015611bbf573d6000803e3d6000fd5b505050506040513d6020811015611bd557600080fd5b5051905080821115611c0a57600554611c059073ffffffffffffffffffffffffffffffffffffffff1684836110b7565b610dbe565b600554610dbe9073ffffffffffffffffffffffffffffffffffffffff1684846110b7565b6060611c90826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611eb39092919063ffffffff16565b805190915015610dbe57808060200190516020811015611caf57600080fd5b5051610dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061217a602a913960400191505060405180910390fd5b603c420190565b60008183611db3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d78578181015183820152602001611d60565b50505050905090810190601f168015611da55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611dbf57fe5b049150505b9392505050565b60008184841115611e37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152835160248401528351909283926044909101919085019080838360008315611d78578181015183820152602001611d60565b505050900390565b60008282018381101561195a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060611ec28484600085611eca565b949350505050565b60603031831115611f26576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806121336026913960400191505060405180910390fd5b611f2f85612086565b611f9a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b6020831061200457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611fc7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612066576040519150601f19603f3d011682016040523d82523d6000602084013e61206b565b606091505b509150915061207b82828661208c565b979650505050505050565b3b151590565b6060831561209b575081611dc4565b8251156120ab5782518084602001fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201818152845160248401528451859391928392604401919085019080838360008315611d78578181015183820152602001611d6056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220f79e8e42a155f760107fc826b37097c57c4bfd8fe5face1ced655ad74833d88d64736f6c634300060c0033