ERC-20
Overview
Max Total Supply
710,616,186.943067401650660458 Digits_DividendTracker
Holders
412
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
DividendTracker
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "./interfaces/IDividendTracker.sol"; contract DividendTracker is Ownable, IERC20, IDividendTracker { using SafeERC20 for IERC20; /* ============ State ============ */ string private constant _name = "Digits_DividendTracker"; string private constant _symbol = "Digits_DividendTracker"; uint256 private constant minTokenBalanceForDividends = 10000 * (10**18); uint256 private constant magnitude = 2**128; address public immutable dai; address public immutable tokenAddress; IUniswapV2Router02 public immutable uniswapV2Router; uint256 public totalDividendsDistributed; uint256 public totalDividendsWithdrawn; mapping(address => bool) public excludedFromDividends; uint256 private magnifiedDividendPerShare; uint256 private _totalSupply; mapping(address => uint256) private _balances; mapping(address => int256) private magnifiedDividendCorrections; mapping(address => uint256) private withdrawnDividends; mapping(address => uint256) private lastClaimTimes; constructor( address _dai, address _tokenAddress, address _uniswapRouter ) { require(_dai != address(0), "DAI address zero"); require(_tokenAddress != address(0), "Token address zero"); require(_uniswapRouter != address(0), "Uniswap router address zero"); dai = _dai; tokenAddress = _tokenAddress; uniswapV2Router = IUniswapV2Router02(_uniswapRouter); } /* ============ External Functions ============ */ function distributeDividends(uint256 daiDividends) external { require(_totalSupply > 0, "dividends unavailable yet"); if (daiDividends > 0) { IERC20(dai).safeTransferFrom( msg.sender, address(this), daiDividends ); magnifiedDividendPerShare = magnifiedDividendPerShare + ((daiDividends * magnitude) / _totalSupply); emit DividendsDistributed(msg.sender, daiDividends); totalDividendsDistributed += daiDividends; } } /* ============ External Owner Functions ============ */ function setBalance(address account, uint256 newBalance) external onlyOwner { if (excludedFromDividends[account]) { return; } if (newBalance >= minTokenBalanceForDividends) { _setBalance(account, newBalance); } else { _setBalance(account, 0); } } function excludeFromDividends(address account, bool excluded) external onlyOwner { require( excludedFromDividends[account] != excluded, "Digits_DividendTracker: account already set to requested state" ); excludedFromDividends[account] = excluded; if (excluded) { _setBalance(account, 0); } else { uint256 newBalance = IERC20(tokenAddress).balanceOf(account); if (newBalance >= minTokenBalanceForDividends) { _setBalance(account, newBalance); } else { _setBalance(account, 0); } } emit ExcludeFromDividends(account, excluded); } function processAccount(address account) external onlyOwner returns (bool) { uint256 amount = _withdrawDividendOfUser(account); if (amount > 0) { lastClaimTimes[account] = block.timestamp; emit Claim(account, amount); return true; } return false; } function compoundAccount(address account) external onlyOwner returns (bool) { (uint256 amount, uint256 tokens) = _compoundDividendOfUser(account); if (amount > 0) { lastClaimTimes[account] = block.timestamp; emit Compound(account, amount, tokens); return true; } return false; } /* ============ External View Functions ============ */ function isExcludedFromDividends(address account) external view returns (bool) { return excludedFromDividends[account]; } function withdrawableDividendOf(address account) public view returns (uint256) { return accumulativeDividendOf(account) - withdrawnDividends[account]; } function withdrawnDividendOf(address account) public view returns (uint256) { return withdrawnDividends[account]; } function accumulativeDividendOf(address account) public view returns (uint256) { int256 a = int256(magnifiedDividendPerShare * balanceOf(account)); int256 b = magnifiedDividendCorrections[account]; // this is an explicit int256 (signed) return uint256(a + b) / magnitude; } function getAccountInfo(address account) external view returns ( address, uint256, uint256, uint256, uint256 ) { uint256 withdrawableDividends = withdrawableDividendOf(account); uint256 totalDividends = accumulativeDividendOf(account); uint256 lastClaimTime = lastClaimTimes[account]; uint256 withdrawn = withdrawnDividendOf(account); return ( account, withdrawableDividends, totalDividends, lastClaimTime, withdrawn ); } function getLastClaimTime(address account) external view returns (uint256) { return lastClaimTimes[account]; } function name() external view returns (string memory) { return _name; } function symbol() external view returns (string memory) { return _symbol; } function decimals() external view returns (uint8) { return 18; } function totalSupply() public view override(IDividendTracker, IERC20) returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address, uint256) public pure override returns (bool) { revert("Digits_DividendTracker: method not implemented"); } function allowance(address, address) public pure override returns (uint256) { revert("Digits_DividendTracker: method not implemented"); } function approve(address, uint256) public pure override returns (bool) { revert("Digits_DividendTracker: method not implemented"); } function transferFrom( address, address, uint256 ) public pure override returns (bool) { revert("Digits_DividendTracker: method not implemented"); } /* ============ Internal/Private Functions ============ */ function _setBalance(address account, uint256 newBalance) internal { uint256 currentBalance = _balances[account]; if (newBalance > currentBalance) { uint256 addAmount = newBalance - currentBalance; _mint(account, addAmount); } else if (newBalance < currentBalance) { uint256 subAmount = currentBalance - newBalance; _burn(account, subAmount); } } function _mint(address account, uint256 amount) private { require( account != address(0), "Digits_DividendTracker: mint to the zero address" ); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account] - int256(magnifiedDividendPerShare * amount); } function _burn(address account, uint256 amount) private { require( account != address(0), "Digits_DividendTracker: burn from the zero address" ); uint256 accountBalance = _balances[account]; require( accountBalance >= amount, "Digits_DividendTracker: burn amount exceeds balance" ); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account] + int256(magnifiedDividendPerShare * amount); } function _withdrawDividendOfUser(address account) private returns (uint256) { uint256 _withdrawableDividend = withdrawableDividendOf(account); if (_withdrawableDividend > 0) { withdrawnDividends[account] += _withdrawableDividend; totalDividendsWithdrawn += _withdrawableDividend; emit DividendWithdrawn(account, _withdrawableDividend); IERC20(dai).safeTransfer(account, _withdrawableDividend); return _withdrawableDividend; } return 0; } function _compoundDividendOfUser(address account) private returns (uint256, uint256) { uint256 _withdrawableDividend = withdrawableDividendOf(account); if (_withdrawableDividend > 0) { withdrawnDividends[account] += _withdrawableDividend; totalDividendsWithdrawn += _withdrawableDividend; emit DividendWithdrawn(account, _withdrawableDividend); address[] memory path = new address[](2); path[0] = dai; path[1] = address(tokenAddress); bool success = false; uint256 tokens = 0; uint256 initTokenBal = IERC20(tokenAddress).balanceOf(account); IERC20(dai).approve( address(uniswapV2Router), _withdrawableDividend ); try uniswapV2Router .swapExactTokensForTokensSupportingFeeOnTransferTokens( _withdrawableDividend, 0, path, address(account), block.timestamp ) { success = true; tokens = IERC20(tokenAddress).balanceOf(account) - initTokenBal; } catch Error( string memory /*err*/ ) { success = false; } if (!success) { withdrawnDividends[account] -= _withdrawableDividend; totalDividendsWithdrawn -= _withdrawableDividend; return (0, 0); } return (_withdrawableDividend, tokens); } return (0, 0); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract 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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev 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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library 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)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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.6.2; interface IUniswapV2Router01 { 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(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { 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; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; interface IDividendTracker { event DividendsDistributed(address indexed from, uint256 weiAmount); event DividendWithdrawn(address indexed to, uint256 weiAmount); event ExcludeFromDividends(address indexed account, bool excluded); event Claim(address indexed account, uint256 amount); event Compound(address indexed account, uint256 amount, uint256 tokens); function distributeDividends(uint256 daiDividends) external; function excludeFromDividends(address account, bool excluded) external; function setBalance(address account, uint256 newBalance) external; function totalSupply() external view returns (uint256); function isExcludedFromDividends(address account) external view returns (bool); function processAccount(address account) external returns (bool); function compoundAccount(address account) external returns (bool); function withdrawableDividendOf(address account) external view returns (uint256); function withdrawnDividendOf(address account) external view returns (uint256); function accumulativeDividendOf(address account) external view returns (uint256); function getAccountInfo(address account) external view returns ( address, uint256, uint256, uint256, uint256 ); function getLastClaimTime(address account) external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_dai","type":"address"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"Compound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"weiAmount","type":"uint256"}],"name":"DividendWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"weiAmount","type":"uint256"}],"name":"DividendsDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludeFromDividends","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accumulativeDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"compoundAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dai","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"daiDividends","type":"uint256"}],"name":"distributeDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludedFromDividends","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getLastClaimTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromDividends","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"processAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"setBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDividendsDistributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDividendsWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdrawableDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdrawnDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b5060405162001e4538038062001e458339810160408190526200003491620001be565b6200003f3362000151565b6001600160a01b0383166200008e5760405162461bcd60e51b815260206004820152601060248201526f4441492061646472657373207a65726f60801b60448201526064015b60405180910390fd5b6001600160a01b038216620000db5760405162461bcd60e51b8152602060048201526012602482015271546f6b656e2061646472657373207a65726f60701b604482015260640162000085565b6001600160a01b038116620001335760405162461bcd60e51b815260206004820152601b60248201527f556e697377617020726f757465722061646472657373207a65726f0000000000604482015260640162000085565b6001600160a01b0392831660805290821660a0521660c05262000208565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001b957600080fd5b919050565b600080600060608486031215620001d457600080fd5b620001df84620001a1565b9250620001ef60208501620001a1565b9150620001ff60408501620001a1565b90509250925092565b60805160a05160c051611bc76200027e6000396000818161025201528181610e250152610ede0152600081816103bf015281816105d701528181610d3d01528181610da30152610fae0152600081816104b4015281816107e701528181610ce901528181610e5701526111920152611bc76000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063807ab4f711610104578063a8b9d240116100a2578063dd62ed3e11610071578063dd62ed3e1461047b578063e30443bc14610489578063f2fde38b1461049c578063f4b9fa75146104af57600080fd5b8063a8b9d24014610413578063a9059cbb1461022a578063aafd847a14610426578063c705c5691461044f57600080fd5b806395d89b41116100de57806395d89b41146101e95780639d76ea58146103ba5780639e1e0661146103e1578063a680e0bc146103ea57600080fd5b8063807ab4f71461038d57806385a6b3ae146103a05780638da5cb5b146103a957600080fd5b8063313ce567116101715780636de1a5a91161014b5780636de1a5a91461030457806370a0823114610317578063715018a6146103405780637b510fe81461034857600080fd5b8063313ce567146102bf5780633243c791146102ce5780634e7b827f146102e157600080fd5b80631694505e116101ad5780631694505e1461024d57806318160ddd1461028c57806323b872dd1461029e57806327ce0147146102ac57600080fd5b80630483f7a0146101d457806306fdde03146101e9578063095ea7b31461022a575b600080fd5b6101e76101e236600461176e565b6104d6565b005b60408051808201825260168152752234b3b4ba39afa234bb34b232b7322a3930b1b5b2b960511b6020820152905161022191906117d1565b60405180910390f35b61023d610238366004611804565b6106bc565b6040519015158152602001610221565b6102747f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610221565b6005545b604051908152602001610221565b61023d61023836600461182e565b6102906102ba36600461186a565b61071e565b60405160128152602001610221565b6101e76102dc366004611885565b610782565b61023d6102ef36600461186a565b60036020526000908152604090205460ff1681565b61023d61031236600461186a565b61088a565b61029061032536600461186a565b6001600160a01b031660009081526006602052604090205490565b6101e7610916565b61035b61035636600461186a565b61092a565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a001610221565b61023d61039b36600461186a565b610980565b61029060015481565b6000546001600160a01b0316610274565b6102747f000000000000000000000000000000000000000000000000000000000000000081565b61029060025481565b6102906103f836600461186a565b6001600160a01b031660009081526009602052604090205490565b61029061042136600461186a565b610a04565b61029061043436600461186a565b6001600160a01b031660009081526008602052604090205490565b61023d61045d36600461186a565b6001600160a01b031660009081526003602052604090205460ff1690565b61029061023836600461189e565b6101e7610497366004611804565b610a36565b6101e76104aa36600461186a565b610a8d565b6102747f000000000000000000000000000000000000000000000000000000000000000081565b6104de610b03565b6001600160a01b03821660009081526003602052604090205460ff16151581151514156105785760405162461bcd60e51b815260206004820152603e60248201527f4469676974735f4469766964656e64547261636b65723a206163636f756e742060448201527f616c72656164792073657420746f20726571756573746564207374617465000060648201526084015b60405180910390fd5b6001600160a01b0382166000908152600360205260409020805460ff191682158015919091179091556105b5576105b0826000610b5d565b610673565b6040516370a0823160e01b81526001600160a01b0383811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610620573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064491906118d1565b905069021e19e0c9bab24000008110610666576106618382610b5d565b610671565b610671836000610b5d565b505b816001600160a01b03167fa3c7c11b2e12c4144b09a7813f3393ba646392788638998c97be8da908cf04be826040516106b0911515815260200190565b60405180910390a25050565b60405162461bcd60e51b815260206004820152602e60248201527f4469676974735f4469766964656e64547261636b65723a206d6574686f64206e60448201526d1bdd081a5b5c1b195b595b9d195960921b606482015260009060840161056f565b6001600160a01b038116600090815260066020526040812054600454829161074591611900565b6001600160a01b038416600090815260076020526040902054909150600160801b610770828461191f565b61077a9190611960565b949350505050565b6000600554116107d45760405162461bcd60e51b815260206004820152601960248201527f6469766964656e647320756e617661696c61626c652079657400000000000000604482015260640161056f565b80156108875761080f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084610bc1565b600554610820600160801b83611900565b61082a9190611960565b6004546108379190611982565b60045560405181815233907fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d784541165119060200160405180910390a280600160008282546108819190611982565b90915550505b50565b6000610894610b03565b6000806108a084610c2c565b9092509050811561090a576001600160a01b03841660008181526009602090815260409182902042905581518581529081018490527f0e311a2c6dbfb0153ec3a8a5bdca09070b3e5f60768fdc10a20453f38d186873910160405180910390a25060019392505050565b6000925050505b919050565b61091e610b03565b610928600061109d565b565b60008060008060008061093c87610a04565b905060006109498861071e565b6001600160a01b038916600090815260096020908152604080832054600890925290912054999a9399919850965094509092505050565b600061098a610b03565b6000610995836110ed565b905080156109fb576001600160a01b03831660008181526009602052604090819020429055517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906109ea9084815260200190565b60405180910390a250600192915050565b50600092915050565b6001600160a01b038116600090815260086020526040812054610a268361071e565b610a30919061199a565b92915050565b610a3e610b03565b6001600160a01b03821660009081526003602052604090205460ff1615610a63575050565b69021e19e0c9bab24000008110610a8257610a7e8282610b5d565b5050565b610a7e826000610b5d565b610a95610b03565b6001600160a01b038116610afa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161056f565b6108878161109d565b6000546001600160a01b031633146109285760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161056f565b6001600160a01b03821660009081526006602052604090205480821115610b9c576000610b8a828461199a565b9050610b9684826111b9565b50505050565b80821015610bbc576000610bb0838361199a565b9050610b9684826112fe565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610b969085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526114c4565b6000806000610c3a84610a04565b90508015611091576001600160a01b03841660009081526008602052604081208054839290610c6a908490611982565b925050819055508060026000828254610c839190611982565b90915550506040518181526001600160a01b038516907fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d9060200160405180910390a26040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610d1b57610d1b6119b1565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610d6f57610d6f6119b1565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81528682166004820152600091829182917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0e91906118d1565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018890529192507f00000000000000000000000000000000000000000000000000000000000000009091169063095ea7b3906044016020604051808303816000875af1158015610ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec691906119c7565b50604051635c11d79560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635c11d79590610f1c90889060009089908e9042906004016119e4565b600060405180830381600087803b158015610f3657600080fd5b505af1925050508015610f47575060015b610f8957610f53611a55565b806308c379a01415610f7d5750610f68611aac565b80610f735750610f7f565b6000935050611028565b505b3d6000803e3d6000fd5b6040516370a0823160e01b81526001600160a01b0389811660048301526001945082917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610ff7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101b91906118d1565b611025919061199a565b91505b82611083576001600160a01b0388166000908152600860205260408120805487929061105590849061199a565b92505081905550846002600082825461106e919061199a565b909155506000998a9950975050505050505050565b509296929550919350505050565b50600093849350915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806110f983610a04565b905080156109fb576001600160a01b03831660009081526008602052604081208054839290611129908490611982565b9250508190555080600260008282546111429190611982565b90915550506040518181526001600160a01b038416907fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d9060200160405180910390a2610a306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483611596565b6001600160a01b0382166112285760405162461bcd60e51b815260206004820152603060248201527f4469676974735f4469766964656e64547261636b65723a206d696e7420746f2060448201526f746865207a65726f206164647265737360801b606482015260840161056f565b806005600082825461123a9190611982565b90915550506001600160a01b03821660009081526006602052604081208054839290611267908490611982565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3806004546112bb9190611900565b6001600160a01b0383166000908152600760205260409020546112de9190611b36565b6001600160a01b0390921660009081526007602052604090209190915550565b6001600160a01b03821661136f5760405162461bcd60e51b815260206004820152603260248201527f4469676974735f4469766964656e64547261636b65723a206275726e2066726f6044820152716d20746865207a65726f206164647265737360701b606482015260840161056f565b6001600160a01b038216600090815260066020526040902054818110156113f45760405162461bcd60e51b815260206004820152603360248201527f4469676974735f4469766964656e64547261636b65723a206275726e20616d6f604482015272756e7420657863656564732062616c616e636560681b606482015260840161056f565b6113fe828261199a565b6001600160a01b0384166000908152600660205260408120919091556005805484929061142c90849061199a565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3816004546114809190611900565b6001600160a01b0384166000908152600760205260409020546114a3919061191f565b6001600160a01b039093166000908152600760205260409020929092555050565b6000611519826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115c69092919063ffffffff16565b805190915015610bbc578080602001905181019061153791906119c7565b610bbc5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161056f565b6040516001600160a01b038316602482015260448101829052610bbc90849063a9059cbb60e01b90606401610bf5565b60606115d584846000856115df565b90505b9392505050565b6060824710156116405760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161056f565b6001600160a01b0385163b6116975760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161056f565b600080866001600160a01b031685876040516116b39190611b75565b60006040518083038185875af1925050503d80600081146116f0576040519150601f19603f3d011682016040523d82523d6000602084013e6116f5565b606091505b5091509150611705828286611710565b979650505050505050565b6060831561171f5750816115d8565b82511561172f5782518084602001fd5b8160405162461bcd60e51b815260040161056f91906117d1565b80356001600160a01b038116811461091157600080fd5b801515811461088757600080fd5b6000806040838503121561178157600080fd5b61178a83611749565b9150602083013561179a81611760565b809150509250929050565b60005b838110156117c05781810151838201526020016117a8565b83811115610b965750506000910152565b60208152600082518060208401526117f08160408501602087016117a5565b601f01601f19169190910160400192915050565b6000806040838503121561181757600080fd5b61182083611749565b946020939093013593505050565b60008060006060848603121561184357600080fd5b61184c84611749565b925061185a60208501611749565b9150604084013590509250925092565b60006020828403121561187c57600080fd5b6115d882611749565b60006020828403121561189757600080fd5b5035919050565b600080604083850312156118b157600080fd5b6118ba83611749565b91506118c860208401611749565b90509250929050565b6000602082840312156118e357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561191a5761191a6118ea565b500290565b600080821280156001600160ff1b0384900385131615611941576119416118ea565b600160ff1b839003841281161561195a5761195a6118ea565b50500190565b60008261197d57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611995576119956118ea565b500190565b6000828210156119ac576119ac6118ea565b500390565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156119d957600080fd5b81516115d881611760565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a345784516001600160a01b031683529383019391830191600101611a0f565b50506001600160a01b03969096166060850152505050608001529392505050565b600060033d1115611a6e5760046000803e5060005160e01c5b90565b601f8201601f1916810167ffffffffffffffff81118282101715611aa557634e487b7160e01b600052604160045260246000fd5b6040525050565b600060443d1015611aba5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611aea57505050505090565b8285019150815181811115611b025750505050505090565b843d8701016020828501011115611b1c5750505050505090565b611b2b60208286010187611a71565b509095945050505050565b60008083128015600160ff1b850184121615611b5457611b546118ea565b6001600160ff1b0384018313811615611b6f57611b6f6118ea565b50500390565b60008251611b878184602087016117a5565b919091019291505056fea26469706673582212203f00d34d83f57e427717ab4c27d56dabc66e52567f6aa417581f96b32f0e0f6c64736f6c634300080a00330000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000be56ab825fd35678a32dc35bc4eb17e238e1404f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063807ab4f711610104578063a8b9d240116100a2578063dd62ed3e11610071578063dd62ed3e1461047b578063e30443bc14610489578063f2fde38b1461049c578063f4b9fa75146104af57600080fd5b8063a8b9d24014610413578063a9059cbb1461022a578063aafd847a14610426578063c705c5691461044f57600080fd5b806395d89b41116100de57806395d89b41146101e95780639d76ea58146103ba5780639e1e0661146103e1578063a680e0bc146103ea57600080fd5b8063807ab4f71461038d57806385a6b3ae146103a05780638da5cb5b146103a957600080fd5b8063313ce567116101715780636de1a5a91161014b5780636de1a5a91461030457806370a0823114610317578063715018a6146103405780637b510fe81461034857600080fd5b8063313ce567146102bf5780633243c791146102ce5780634e7b827f146102e157600080fd5b80631694505e116101ad5780631694505e1461024d57806318160ddd1461028c57806323b872dd1461029e57806327ce0147146102ac57600080fd5b80630483f7a0146101d457806306fdde03146101e9578063095ea7b31461022a575b600080fd5b6101e76101e236600461176e565b6104d6565b005b60408051808201825260168152752234b3b4ba39afa234bb34b232b7322a3930b1b5b2b960511b6020820152905161022191906117d1565b60405180910390f35b61023d610238366004611804565b6106bc565b6040519015158152602001610221565b6102747f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610221565b6005545b604051908152602001610221565b61023d61023836600461182e565b6102906102ba36600461186a565b61071e565b60405160128152602001610221565b6101e76102dc366004611885565b610782565b61023d6102ef36600461186a565b60036020526000908152604090205460ff1681565b61023d61031236600461186a565b61088a565b61029061032536600461186a565b6001600160a01b031660009081526006602052604090205490565b6101e7610916565b61035b61035636600461186a565b61092a565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a001610221565b61023d61039b36600461186a565b610980565b61029060015481565b6000546001600160a01b0316610274565b6102747f000000000000000000000000be56ab825fd35678a32dc35bc4eb17e238e1404f81565b61029060025481565b6102906103f836600461186a565b6001600160a01b031660009081526009602052604090205490565b61029061042136600461186a565b610a04565b61029061043436600461186a565b6001600160a01b031660009081526008602052604090205490565b61023d61045d36600461186a565b6001600160a01b031660009081526003602052604090205460ff1690565b61029061023836600461189e565b6101e7610497366004611804565b610a36565b6101e76104aa36600461186a565b610a8d565b6102747f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b6104de610b03565b6001600160a01b03821660009081526003602052604090205460ff16151581151514156105785760405162461bcd60e51b815260206004820152603e60248201527f4469676974735f4469766964656e64547261636b65723a206163636f756e742060448201527f616c72656164792073657420746f20726571756573746564207374617465000060648201526084015b60405180910390fd5b6001600160a01b0382166000908152600360205260409020805460ff191682158015919091179091556105b5576105b0826000610b5d565b610673565b6040516370a0823160e01b81526001600160a01b0383811660048301526000917f000000000000000000000000be56ab825fd35678a32dc35bc4eb17e238e1404f909116906370a0823190602401602060405180830381865afa158015610620573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064491906118d1565b905069021e19e0c9bab24000008110610666576106618382610b5d565b610671565b610671836000610b5d565b505b816001600160a01b03167fa3c7c11b2e12c4144b09a7813f3393ba646392788638998c97be8da908cf04be826040516106b0911515815260200190565b60405180910390a25050565b60405162461bcd60e51b815260206004820152602e60248201527f4469676974735f4469766964656e64547261636b65723a206d6574686f64206e60448201526d1bdd081a5b5c1b195b595b9d195960921b606482015260009060840161056f565b6001600160a01b038116600090815260066020526040812054600454829161074591611900565b6001600160a01b038416600090815260076020526040902054909150600160801b610770828461191f565b61077a9190611960565b949350505050565b6000600554116107d45760405162461bcd60e51b815260206004820152601960248201527f6469766964656e647320756e617661696c61626c652079657400000000000000604482015260640161056f565b80156108875761080f6001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16333084610bc1565b600554610820600160801b83611900565b61082a9190611960565b6004546108379190611982565b60045560405181815233907fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d784541165119060200160405180910390a280600160008282546108819190611982565b90915550505b50565b6000610894610b03565b6000806108a084610c2c565b9092509050811561090a576001600160a01b03841660008181526009602090815260409182902042905581518581529081018490527f0e311a2c6dbfb0153ec3a8a5bdca09070b3e5f60768fdc10a20453f38d186873910160405180910390a25060019392505050565b6000925050505b919050565b61091e610b03565b610928600061109d565b565b60008060008060008061093c87610a04565b905060006109498861071e565b6001600160a01b038916600090815260096020908152604080832054600890925290912054999a9399919850965094509092505050565b600061098a610b03565b6000610995836110ed565b905080156109fb576001600160a01b03831660008181526009602052604090819020429055517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906109ea9084815260200190565b60405180910390a250600192915050565b50600092915050565b6001600160a01b038116600090815260086020526040812054610a268361071e565b610a30919061199a565b92915050565b610a3e610b03565b6001600160a01b03821660009081526003602052604090205460ff1615610a63575050565b69021e19e0c9bab24000008110610a8257610a7e8282610b5d565b5050565b610a7e826000610b5d565b610a95610b03565b6001600160a01b038116610afa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161056f565b6108878161109d565b6000546001600160a01b031633146109285760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161056f565b6001600160a01b03821660009081526006602052604090205480821115610b9c576000610b8a828461199a565b9050610b9684826111b9565b50505050565b80821015610bbc576000610bb0838361199a565b9050610b9684826112fe565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610b969085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526114c4565b6000806000610c3a84610a04565b90508015611091576001600160a01b03841660009081526008602052604081208054839290610c6a908490611982565b925050819055508060026000828254610c839190611982565b90915550506040518181526001600160a01b038516907fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d9060200160405180910390a26040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81600081518110610d1b57610d1b6119b1565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000be56ab825fd35678a32dc35bc4eb17e238e1404f81600181518110610d6f57610d6f6119b1565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81528682166004820152600091829182917f000000000000000000000000be56ab825fd35678a32dc35bc4eb17e238e1404f16906370a0823190602401602060405180830381865afa158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0e91906118d1565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81166004830152602482018890529192507f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f9091169063095ea7b3906044016020604051808303816000875af1158015610ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec691906119c7565b50604051635c11d79560e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d1690635c11d79590610f1c90889060009089908e9042906004016119e4565b600060405180830381600087803b158015610f3657600080fd5b505af1925050508015610f47575060015b610f8957610f53611a55565b806308c379a01415610f7d5750610f68611aac565b80610f735750610f7f565b6000935050611028565b505b3d6000803e3d6000fd5b6040516370a0823160e01b81526001600160a01b0389811660048301526001945082917f000000000000000000000000be56ab825fd35678a32dc35bc4eb17e238e1404f909116906370a0823190602401602060405180830381865afa158015610ff7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101b91906118d1565b611025919061199a565b91505b82611083576001600160a01b0388166000908152600860205260408120805487929061105590849061199a565b92505081905550846002600082825461106e919061199a565b909155506000998a9950975050505050505050565b509296929550919350505050565b50600093849350915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806110f983610a04565b905080156109fb576001600160a01b03831660009081526008602052604081208054839290611129908490611982565b9250508190555080600260008282546111429190611982565b90915550506040518181526001600160a01b038416907fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d9060200160405180910390a2610a306001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f168483611596565b6001600160a01b0382166112285760405162461bcd60e51b815260206004820152603060248201527f4469676974735f4469766964656e64547261636b65723a206d696e7420746f2060448201526f746865207a65726f206164647265737360801b606482015260840161056f565b806005600082825461123a9190611982565b90915550506001600160a01b03821660009081526006602052604081208054839290611267908490611982565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3806004546112bb9190611900565b6001600160a01b0383166000908152600760205260409020546112de9190611b36565b6001600160a01b0390921660009081526007602052604090209190915550565b6001600160a01b03821661136f5760405162461bcd60e51b815260206004820152603260248201527f4469676974735f4469766964656e64547261636b65723a206275726e2066726f6044820152716d20746865207a65726f206164647265737360701b606482015260840161056f565b6001600160a01b038216600090815260066020526040902054818110156113f45760405162461bcd60e51b815260206004820152603360248201527f4469676974735f4469766964656e64547261636b65723a206275726e20616d6f604482015272756e7420657863656564732062616c616e636560681b606482015260840161056f565b6113fe828261199a565b6001600160a01b0384166000908152600660205260408120919091556005805484929061142c90849061199a565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3816004546114809190611900565b6001600160a01b0384166000908152600760205260409020546114a3919061191f565b6001600160a01b039093166000908152600760205260409020929092555050565b6000611519826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115c69092919063ffffffff16565b805190915015610bbc578080602001905181019061153791906119c7565b610bbc5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161056f565b6040516001600160a01b038316602482015260448101829052610bbc90849063a9059cbb60e01b90606401610bf5565b60606115d584846000856115df565b90505b9392505050565b6060824710156116405760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161056f565b6001600160a01b0385163b6116975760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161056f565b600080866001600160a01b031685876040516116b39190611b75565b60006040518083038185875af1925050503d80600081146116f0576040519150601f19603f3d011682016040523d82523d6000602084013e6116f5565b606091505b5091509150611705828286611710565b979650505050505050565b6060831561171f5750816115d8565b82511561172f5782518084602001fd5b8160405162461bcd60e51b815260040161056f91906117d1565b80356001600160a01b038116811461091157600080fd5b801515811461088757600080fd5b6000806040838503121561178157600080fd5b61178a83611749565b9150602083013561179a81611760565b809150509250929050565b60005b838110156117c05781810151838201526020016117a8565b83811115610b965750506000910152565b60208152600082518060208401526117f08160408501602087016117a5565b601f01601f19169190910160400192915050565b6000806040838503121561181757600080fd5b61182083611749565b946020939093013593505050565b60008060006060848603121561184357600080fd5b61184c84611749565b925061185a60208501611749565b9150604084013590509250925092565b60006020828403121561187c57600080fd5b6115d882611749565b60006020828403121561189757600080fd5b5035919050565b600080604083850312156118b157600080fd5b6118ba83611749565b91506118c860208401611749565b90509250929050565b6000602082840312156118e357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561191a5761191a6118ea565b500290565b600080821280156001600160ff1b0384900385131615611941576119416118ea565b600160ff1b839003841281161561195a5761195a6118ea565b50500190565b60008261197d57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611995576119956118ea565b500190565b6000828210156119ac576119ac6118ea565b500390565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156119d957600080fd5b81516115d881611760565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a345784516001600160a01b031683529383019391830191600101611a0f565b50506001600160a01b03969096166060850152505050608001529392505050565b600060033d1115611a6e5760046000803e5060005160e01c5b90565b601f8201601f1916810167ffffffffffffffff81118282101715611aa557634e487b7160e01b600052604160045260246000fd5b6040525050565b600060443d1015611aba5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611aea57505050505090565b8285019150815181811115611b025750505050505090565b843d8701016020828501011115611b1c5750505050505090565b611b2b60208286010187611a71565b509095945050505050565b60008083128015600160ff1b850184121615611b5457611b546118ea565b6001600160ff1b0384018313811615611b6f57611b6f6118ea565b50500390565b60008251611b878184602087016117a5565b919091019291505056fea26469706673582212203f00d34d83f57e427717ab4c27d56dabc66e52567f6aa417581f96b32f0e0f6c64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000be56ab825fd35678a32dc35bc4eb17e238e1404f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
-----Decoded View---------------
Arg [0] : _dai (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F
Arg [1] : _tokenAddress (address): 0xBE56ab825fD35678A32dc35bc4EB17e238e1404F
Arg [2] : _uniswapRouter (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Arg [1] : 000000000000000000000000be56ab825fd35678a32dc35bc4eb17e238e1404f
Arg [2] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.