ETH Price: $1,980.53 (-4.56%)

Contract

0x050ff2C50ae26B25f63746e8Dd2D4b0C2f5ffc02
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Buy With ETH184752652023-11-01 5:47:35856 days ago1698817655IN
0x050ff2C5...C2f5ffc02
0.00001549 ETH0.0033992615.35705487

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer184752652023-11-01 5:47:35856 days ago1698817655
0x050ff2C5...C2f5ffc02
0.00001549 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RICCHSale

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;

import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import {Address} from '@openzeppelin/contracts/utils/Address.sol';
import {AggregatorV3Interface} from '@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol';

contract RICCHSaleBase is Ownable {
  using Address for address payable;
  using SafeERC20 for IERC20;

  uint constant public USD_UNIT = 1e6;
  uint constant public PRICE = 0.004 * 1e6;
  uint constant public DISCOUNT_30_PRICE = (PRICE * (100 - 30)) / 100;
  uint constant public DISCOUNT_20_PRICE = (PRICE * (100 - 20)) / 100;
  uint constant public DISCOUNT_10_PRICE = (PRICE * (100 - 10)) / 100;
  uint constant public DISCOUNT_5_PRICE = (PRICE * (100 - 5)) / 100;

  uint constant public SALE_START = 1698451200; // 28 Oct 2023, 00:00:00
  uint constant public DISCOUNT_30_END = 1699487999; // 08 Nov 2023, 23:59:59
  uint constant public DISCOUNT_20_END = 1702079999; // 08 Dec 2023, 23:59:59
  uint constant public DISCOUNT_10_END = 1704758399; // 08 Jan 2024, 23:59:59
  uint constant public DISCOUNT_5_END = 1706659199; // 30 Jan 2024, 23:59:59

  IERC20 immutable public USDT;
  IERC20 immutable public USDC;
  IERC20 immutable public RICCH;
  uint constant public RICCH_UNIT = 1e18;
  uint constant public ETH_UNIT = 1 ether;

  AggregatorV3Interface immutable public USD_ETH_FEED;

  event Purchase(address buyer, address paidWith, uint ricchAmount, uint price);

  constructor(IERC20 _ricch, IERC20 _usdt, IERC20 _usdc, AggregatorV3Interface _usdEthFeed, address _owner) {
    _transferOwnership(_owner);
    USDT = _usdt;
    USDC = _usdc;
    USD_ETH_FEED = _usdEthFeed;
    RICCH = _ricch;
  }

  function buyWithToken(IERC20 _payWith, uint _ricchAmount) external {
    bool allowedToken = _payWith == USDT || _payWith == USDC;
    require(allowedToken, 'Token is not allowed');
    require(_ricchAmount > 0, 'Amount should be positive');
    address bank = owner();
    uint priceUSDperRICCH = getCurrentPrice();
    _payWith.safeTransferFrom(msg.sender, bank, divCeil(_ricchAmount * priceUSDperRICCH, RICCH_UNIT));
    RICCH.safeTransferFrom(bank, msg.sender, _ricchAmount);
    emit Purchase(msg.sender, address(_payWith), _ricchAmount, priceUSDperRICCH);
  }

  function buyWithETH() external payable {
    address payable bank = payable(owner());
    uint priceETHperRICCH = divCeil(ETH_UNIT * getCurrentPrice(), getUSDETHPrice());
    uint ricchAmount = msg.value * RICCH_UNIT / priceETHperRICCH;
    require(ricchAmount > 0, 'Amount should be positive');
    RICCH.safeTransferFrom(bank, msg.sender, ricchAmount);
    bank.sendValue(msg.value);
    emit Purchase(msg.sender, address(0), ricchAmount, priceETHperRICCH);
  }

  function getCurrentPrice() public view returns(uint) {
    return getPrice(getTime());
  }

  function getPrice(uint _timestamp) public pure returns(uint) {
    if (_timestamp <= DISCOUNT_30_END) {
      return DISCOUNT_30_PRICE;
    }
    if (_timestamp <= DISCOUNT_20_END) {
      return DISCOUNT_20_PRICE;
    }
    if (_timestamp <= DISCOUNT_10_END) {
      return DISCOUNT_10_PRICE;
    }
    if (_timestamp <= DISCOUNT_5_END) {
      return DISCOUNT_5_PRICE;
    }
    return PRICE;
  }

  function getUSDETHPrice() public view returns(uint) {
    int256 usd8UnitsPerETH;
    (, usd8UnitsPerETH, , , ) = USD_ETH_FEED.latestRoundData();
    require(usd8UnitsPerETH > 0, 'Invalid ETH price');
    uint usdUnitsPerETH = uint(usd8UnitsPerETH / 100);
    require(usdUnitsPerETH > 0, 'usdUnitsPerETH == 0');
    return usdUnitsPerETH;
  }

  function divCeil(uint _a, uint _b) internal pure returns(uint) {
    if (_a % _b == 0) {
      return _a / _b;
    }
    return (_a / _b) + 1;
  }

  function getTime() internal virtual view returns(uint) {
    return block.timestamp;
  }
}

contract RICCHSale is RICCHSaleBase {
  constructor(IERC20 _ricch, address _owner)
  RICCHSaleBase(
    _ricch,
    IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7),
    IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48),
    AggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419),
    _owner
  ) {}
}

contract RICCHSaleSepolia is RICCHSaleBase {
  uint private testTime;

  constructor(IERC20 _ricch, IERC20 _usdt, IERC20 _usdc, address _owner)
  RICCHSaleBase(
    _ricch,
    _usdt,
    _usdc,
    AggregatorV3Interface(0x694AA1769357215DE4FAC081bf1f309aDC325306),
    _owner
  ) {}

  function setTime(uint _time) external {
    testTime = _time;
  }

  function getTime() internal override view returns(uint) {
    if (testTime == 0) {
      return block.timestamp;
    }
    return testTime;
  }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  function getRoundData(
    uint80 _roundId
  ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

  function latestRoundData()
    external
    view
    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 (last updated v4.9.0) (token/ERC20/extensions/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.9.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.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/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;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC20","name":"_ricch","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"paidWith","type":"address"},{"indexed":false,"internalType":"uint256","name":"ricchAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Purchase","type":"event"},{"inputs":[],"name":"DISCOUNT_10_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_10_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_20_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_20_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_30_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_30_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_5_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISCOUNT_5_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETH_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RICCH","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RICCH_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_START","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USD_ETH_FEED","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USD_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyWithETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_payWith","type":"address"},{"internalType":"uint256","name":"_ricchAmount","type":"uint256"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getUSDETHPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040523480156200001257600080fd5b50604051620013ca380380620013ca83398101604081905262000035916200011c565b8173dac17f958d2ee523a2206206994597c13d831ec773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48735f4ec3df9cbd43714fe2740f5e3616155c5b8419846200008133620000b3565b6200008c81620000b3565b506001600160a01b0392831660805290821660a052811660e0521660c052506200015b9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200011957600080fd5b50565b600080604083850312156200013057600080fd5b82516200013d8162000103565b6020840151909250620001508162000103565b809150509250929050565b60805160a05160c05160e051611212620001b860003960008181610250015261080101526000818161029c0152818161054b015261076901526000818161034e015261063f0152600081816103e3015261060401526112126000f3fe6080604052600436106101965760003560e01c80636e33a831116100e1578063987b31821161008a578063d6d9837611610064578063d6d9837614610405578063e75722301461041d578063eb91d37e1461043d578063f2fde38b1461045257600080fd5b8063987b3182146102eb578063a3ca17b2146103bc578063c54e44eb146103d157600080fd5b80638d859f3e116100bb5780638d859f3e146103705780638da5cb5b14610386578063945ead1f146103a457600080fd5b80636e33a83114610307578063715018a61461032757806389a302711461033c57600080fd5b806325768c58116101435780634f3fe8d21161011d5780634f3fe8d2146102be578063500dd06d146102d357806359f8e05c146102eb57600080fd5b806325768c58146102265780632d76dc651461023e5780634d3ab13b1461028a57600080fd5b80631cfa813a116101745780631cfa813a146101e457806320c761f5146101f9578063226730301461020e57600080fd5b8063059bcae01461019b578063150d283d146101c35780631baf72bf146101cd575b600080fd5b3480156101a757600080fd5b506101b0610472565b6040519081526020015b60405180910390f35b6101cb61048e565b005b3480156101d957600080fd5b506101b0620f424081565b3480156101f057600080fd5b506101b06105d3565b34801561020557600080fd5b506101b06105e2565b34801561021a57600080fd5b506101b063653c4f0081565b34801561023257600080fd5b506101b0636573adff81565b34801561024a57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101ba565b34801561029657600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156102ca57600080fd5b506101b06105f1565b3480156102df57600080fd5b506101b063654c20ff81565b3480156102f757600080fd5b506101b0670de0b6b3a764000081565b34801561031357600080fd5b506101cb610322366004610fae565b610600565b34801561033357600080fd5b506101cb6107e8565b34801561034857600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b34801561037c57600080fd5b506101b0610fa081565b34801561039257600080fd5b506000546001600160a01b0316610272565b3480156103b057600080fd5b506101b063659c8c7f81565b3480156103c857600080fd5b506101b06107fc565b3480156103dd57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b34801561041157600080fd5b506101b06365b98d7f81565b34801561042957600080fd5b506101b0610438366004610fda565b61093f565b34801561044957600080fd5b506101b06109bc565b34801561045e57600080fd5b506101cb61046d366004610ff3565b6109cc565b6064610481610fa06050611026565b61048b9190611053565b81565b600080546001600160a01b0316906104c66104a76109bc565b6104b990670de0b6b3a7640000611026565b6104c16107fc565b610a5c565b90506000816104dd670de0b6b3a764000034611026565b6104e79190611053565b90506000811161053e5760405162461bcd60e51b815260206004820152601960248201527f416d6f756e742073686f756c6420626520706f7369746976650000000000000060448201526064015b60405180910390fd5b6105736001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016843384610a9c565b6105866001600160a01b03841634610b2a565b6040805133815260006020820152908101829052606081018390527f46661dab58311a6838247afecbee792192b4f27fc8b3e7168c66bc55ec2e404e9060800160405180910390a1505050565b6064610481610fa0605f611026565b6064610481610fa06046611026565b6064610481610fa0605a611026565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316148061067357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316145b9050806106c25760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206973206e6f7420616c6c6f7765640000000000000000000000006044820152606401610535565b600082116107125760405162461bcd60e51b815260206004820152601960248201527f416d6f756e742073686f756c6420626520706f736974697665000000000000006044820152606401610535565b600080546001600160a01b0316906107286109bc565b905061075c338361074a61073c8589611026565b670de0b6b3a7640000610a5c565b6001600160a01b038916929190610a9c565b6107916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016833387610a9c565b604080513381526001600160a01b0387166020820152908101859052606081018290527f46661dab58311a6838247afecbee792192b4f27fc8b3e7168c66bc55ec2e404e9060800160405180910390a15050505050565b6107f0610c48565b6107fa6000610ca2565b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190611086565b50919350506000831391506108da90505760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964204554482070726963650000000000000000000000000000006044820152606401610535565b60006108e76064836110d6565b9050600081116109395760405162461bcd60e51b815260206004820152601360248201527f757364556e697473506572455448203d3d2030000000000000000000000000006044820152606401610535565b92915050565b600063654c20ff821161096557606461095b610fa06046611026565b6109399190611053565b636573adff821161097f57606461095b610fa06050611026565b63659c8c7f821161099957606461095b610fa0605a611026565b6365b98d7f82116109b357606461095b610fa0605f611026565b50610fa0919050565b60006109c74261093f565b905090565b6109d4610c48565b6001600160a01b038116610a505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610535565b610a5981610ca2565b50565b6000610a688284611120565b600003610a8057610a798284611053565b9050610939565b610a8a8284611053565b610a95906001611134565b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b24908590610d0a565b50505050565b80471015610b7a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610535565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610bc7576040519150601f19603f3d011682016040523d82523d6000602084013e610bcc565b606091505b5050905080610c435760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610535565b505050565b6000546001600160a01b031633146107fa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610535565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610d5f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610df29092919063ffffffff16565b9050805160001480610d80575080806020019051810190610d809190611147565b610c435760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610535565b6060610e018484600085610e09565b949350505050565b606082471015610e815760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610535565b600080866001600160a01b03168587604051610e9d919061118d565b60006040518083038185875af1925050503d8060008114610eda576040519150601f19603f3d011682016040523d82523d6000602084013e610edf565b606091505b5091509150610ef087838387610efb565b979650505050505050565b60608315610f6a578251600003610f63576001600160a01b0385163b610f635760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610535565b5081610e01565b610e018383815115610f7f5781518083602001fd5b8060405162461bcd60e51b815260040161053591906111a9565b6001600160a01b0381168114610a5957600080fd5b60008060408385031215610fc157600080fd5b8235610fcc81610f99565b946020939093013593505050565b600060208284031215610fec57600080fd5b5035919050565b60006020828403121561100557600080fd5b8135610a9581610f99565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761093957610939611010565b634e487b7160e01b600052601260045260246000fd5b6000826110625761106261103d565b500490565b805169ffffffffffffffffffff8116811461108157600080fd5b919050565b600080600080600060a0868803121561109e57600080fd5b6110a786611067565b94506020860151935060408601519250606086015191506110ca60808701611067565b90509295509295909350565b6000826110e5576110e561103d565b7f800000000000000000000000000000000000000000000000000000000000000082146000198414161561111b5761111b611010565b500590565b60008261112f5761112f61103d565b500690565b8082018082111561093957610939611010565b60006020828403121561115957600080fd5b81518015158114610a9557600080fd5b60005b8381101561118457818101518382015260200161116c565b50506000910152565b6000825161119f818460208701611169565b9190910192915050565b60208152600082518060208401526111c8816040850160208701611169565b601f01601f1916919091016040019291505056fea2646970667358221220d59fdcc2af2828f2d049005c543efa9728cb45c461b2e47a29425b0327aa3b6364736f6c63430008110033000000000000000000000000f9d3d094672cf7ebc2d7747e1aaf4b18c0310667000000000000000000000000e1683b588229035ac8e7ada85114d1f7ecf1e3e2

Deployed Bytecode

0x6080604052600436106101965760003560e01c80636e33a831116100e1578063987b31821161008a578063d6d9837611610064578063d6d9837614610405578063e75722301461041d578063eb91d37e1461043d578063f2fde38b1461045257600080fd5b8063987b3182146102eb578063a3ca17b2146103bc578063c54e44eb146103d157600080fd5b80638d859f3e116100bb5780638d859f3e146103705780638da5cb5b14610386578063945ead1f146103a457600080fd5b80636e33a83114610307578063715018a61461032757806389a302711461033c57600080fd5b806325768c58116101435780634f3fe8d21161011d5780634f3fe8d2146102be578063500dd06d146102d357806359f8e05c146102eb57600080fd5b806325768c58146102265780632d76dc651461023e5780634d3ab13b1461028a57600080fd5b80631cfa813a116101745780631cfa813a146101e457806320c761f5146101f9578063226730301461020e57600080fd5b8063059bcae01461019b578063150d283d146101c35780631baf72bf146101cd575b600080fd5b3480156101a757600080fd5b506101b0610472565b6040519081526020015b60405180910390f35b6101cb61048e565b005b3480156101d957600080fd5b506101b0620f424081565b3480156101f057600080fd5b506101b06105d3565b34801561020557600080fd5b506101b06105e2565b34801561021a57600080fd5b506101b063653c4f0081565b34801561023257600080fd5b506101b0636573adff81565b34801561024a57600080fd5b506102727f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b841981565b6040516001600160a01b0390911681526020016101ba565b34801561029657600080fd5b506102727f000000000000000000000000f9d3d094672cf7ebc2d7747e1aaf4b18c031066781565b3480156102ca57600080fd5b506101b06105f1565b3480156102df57600080fd5b506101b063654c20ff81565b3480156102f757600080fd5b506101b0670de0b6b3a764000081565b34801561031357600080fd5b506101cb610322366004610fae565b610600565b34801561033357600080fd5b506101cb6107e8565b34801561034857600080fd5b506102727f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b34801561037c57600080fd5b506101b0610fa081565b34801561039257600080fd5b506000546001600160a01b0316610272565b3480156103b057600080fd5b506101b063659c8c7f81565b3480156103c857600080fd5b506101b06107fc565b3480156103dd57600080fd5b506102727f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781565b34801561041157600080fd5b506101b06365b98d7f81565b34801561042957600080fd5b506101b0610438366004610fda565b61093f565b34801561044957600080fd5b506101b06109bc565b34801561045e57600080fd5b506101cb61046d366004610ff3565b6109cc565b6064610481610fa06050611026565b61048b9190611053565b81565b600080546001600160a01b0316906104c66104a76109bc565b6104b990670de0b6b3a7640000611026565b6104c16107fc565b610a5c565b90506000816104dd670de0b6b3a764000034611026565b6104e79190611053565b90506000811161053e5760405162461bcd60e51b815260206004820152601960248201527f416d6f756e742073686f756c6420626520706f7369746976650000000000000060448201526064015b60405180910390fd5b6105736001600160a01b037f000000000000000000000000f9d3d094672cf7ebc2d7747e1aaf4b18c031066716843384610a9c565b6105866001600160a01b03841634610b2a565b6040805133815260006020820152908101829052606081018390527f46661dab58311a6838247afecbee792192b4f27fc8b3e7168c66bc55ec2e404e9060800160405180910390a1505050565b6064610481610fa0605f611026565b6064610481610fa06046611026565b6064610481610fa0605a611026565b60007f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec76001600160a01b0316836001600160a01b0316148061067357507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316836001600160a01b0316145b9050806106c25760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206973206e6f7420616c6c6f7765640000000000000000000000006044820152606401610535565b600082116107125760405162461bcd60e51b815260206004820152601960248201527f416d6f756e742073686f756c6420626520706f736974697665000000000000006044820152606401610535565b600080546001600160a01b0316906107286109bc565b905061075c338361074a61073c8589611026565b670de0b6b3a7640000610a5c565b6001600160a01b038916929190610a9c565b6107916001600160a01b037f000000000000000000000000f9d3d094672cf7ebc2d7747e1aaf4b18c031066716833387610a9c565b604080513381526001600160a01b0387166020820152908101859052606081018290527f46661dab58311a6838247afecbee792192b4f27fc8b3e7168c66bc55ec2e404e9060800160405180910390a15050505050565b6107f0610c48565b6107fa6000610ca2565b565b6000807f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190611086565b50919350506000831391506108da90505760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964204554482070726963650000000000000000000000000000006044820152606401610535565b60006108e76064836110d6565b9050600081116109395760405162461bcd60e51b815260206004820152601360248201527f757364556e697473506572455448203d3d2030000000000000000000000000006044820152606401610535565b92915050565b600063654c20ff821161096557606461095b610fa06046611026565b6109399190611053565b636573adff821161097f57606461095b610fa06050611026565b63659c8c7f821161099957606461095b610fa0605a611026565b6365b98d7f82116109b357606461095b610fa0605f611026565b50610fa0919050565b60006109c74261093f565b905090565b6109d4610c48565b6001600160a01b038116610a505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610535565b610a5981610ca2565b50565b6000610a688284611120565b600003610a8057610a798284611053565b9050610939565b610a8a8284611053565b610a95906001611134565b9392505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b24908590610d0a565b50505050565b80471015610b7a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610535565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610bc7576040519150601f19603f3d011682016040523d82523d6000602084013e610bcc565b606091505b5050905080610c435760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610535565b505050565b6000546001600160a01b031633146107fa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610535565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610d5f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610df29092919063ffffffff16565b9050805160001480610d80575080806020019051810190610d809190611147565b610c435760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610535565b6060610e018484600085610e09565b949350505050565b606082471015610e815760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610535565b600080866001600160a01b03168587604051610e9d919061118d565b60006040518083038185875af1925050503d8060008114610eda576040519150601f19603f3d011682016040523d82523d6000602084013e610edf565b606091505b5091509150610ef087838387610efb565b979650505050505050565b60608315610f6a578251600003610f63576001600160a01b0385163b610f635760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610535565b5081610e01565b610e018383815115610f7f5781518083602001fd5b8060405162461bcd60e51b815260040161053591906111a9565b6001600160a01b0381168114610a5957600080fd5b60008060408385031215610fc157600080fd5b8235610fcc81610f99565b946020939093013593505050565b600060208284031215610fec57600080fd5b5035919050565b60006020828403121561100557600080fd5b8135610a9581610f99565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761093957610939611010565b634e487b7160e01b600052601260045260246000fd5b6000826110625761106261103d565b500490565b805169ffffffffffffffffffff8116811461108157600080fd5b919050565b600080600080600060a0868803121561109e57600080fd5b6110a786611067565b94506020860151935060408601519250606086015191506110ca60808701611067565b90509295509295909350565b6000826110e5576110e561103d565b7f800000000000000000000000000000000000000000000000000000000000000082146000198414161561111b5761111b611010565b500590565b60008261112f5761112f61103d565b500690565b8082018082111561093957610939611010565b60006020828403121561115957600080fd5b81518015158114610a9557600080fd5b60005b8381101561118457818101518382015260200161116c565b50506000910152565b6000825161119f818460208701611169565b9190910192915050565b60208152600082518060208401526111c8816040850160208701611169565b601f01601f1916919091016040019291505056fea2646970667358221220d59fdcc2af2828f2d049005c543efa9728cb45c461b2e47a29425b0327aa3b6364736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000f9d3d094672cf7ebc2d7747e1aaf4b18c0310667000000000000000000000000e1683b588229035ac8e7ada85114d1f7ecf1e3e2

-----Decoded View---------------
Arg [0] : _ricch (address): 0xf9D3d094672Cf7ebC2d7747E1AAf4b18c0310667
Arg [1] : _owner (address): 0xe1683B588229035AC8E7AdA85114D1F7ECF1E3e2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f9d3d094672cf7ebc2d7747e1aaf4b18c0310667
Arg [1] : 000000000000000000000000e1683b588229035ac8e7ada85114d1f7ecf1e3e2


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.