Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 801 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Convert Rain | 19114888 | 361 days ago | IN | 0 ETH | 0.00251797 | ||||
Convert Rain | 19048462 | 370 days ago | IN | 0 ETH | 0.0022301 | ||||
Convert Rain | 19043775 | 371 days ago | IN | 0 ETH | 0.00242871 | ||||
Convert Rain | 19043111 | 371 days ago | IN | 0 ETH | 0.00346969 | ||||
Convert Rain | 19033881 | 372 days ago | IN | 0 ETH | 0.00439617 | ||||
Convert Rain | 19033622 | 372 days ago | IN | 0 ETH | 0.00592192 | ||||
Approve | 19011838 | 375 days ago | IN | 0 ETH | 0.0010016 | ||||
Approve | 19011837 | 375 days ago | IN | 0 ETH | 0.00096347 | ||||
Convert Rain | 19004739 | 376 days ago | IN | 0 ETH | 0.00392031 | ||||
Convert Rain | 19004737 | 376 days ago | IN | 0 ETH | 0.00622366 | ||||
Convert Rain | 19001841 | 376 days ago | IN | 0 ETH | 0.00199102 | ||||
Convert Rain | 19001486 | 376 days ago | IN | 0 ETH | 0.00237583 | ||||
Convert Rain | 18999448 | 377 days ago | IN | 0 ETH | 0.00235159 | ||||
Swap And Stake | 18998306 | 377 days ago | IN | 0 ETH | 0.00307676 | ||||
Convert Rain | 18998209 | 377 days ago | IN | 0 ETH | 0.00220333 | ||||
Convert Rain | 18998031 | 377 days ago | IN | 0 ETH | 0.00193619 | ||||
Convert Rain | 18997520 | 377 days ago | IN | 0 ETH | 0.00185244 | ||||
Convert Rain | 18997498 | 377 days ago | IN | 0 ETH | 0.00200192 | ||||
Convert Rain | 18997496 | 377 days ago | IN | 0 ETH | 0.00190621 | ||||
Convert Rain | 18995341 | 377 days ago | IN | 0 ETH | 0.00259306 | ||||
Swap And Stake | 18995301 | 377 days ago | IN | 0 ETH | 0.00262281 | ||||
Swap And Stake | 18995234 | 377 days ago | IN | 0 ETH | 0.00249268 | ||||
Convert Rain | 18995209 | 377 days ago | IN | 0 ETH | 0.00056302 | ||||
Approve | 18995186 | 377 days ago | IN | 0 ETH | 0.0007046 | ||||
Approve | 18995073 | 377 days ago | IN | 0 ETH | 0.00034993 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
DUELToken
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./UniswapV2/interfaces/IUniswapV2Router.sol"; interface IVesting { function allocateDUEL(address, uint256) external; function allocateDUEL(address, uint256, uint256) external; function claimDUEL() external; } interface IStaking { function stakeFor( address wallet, uint256 amount, uint32 periodDays ) external; } /// @title Main ERC-20 DUEL Token with vesting contract connection and convertRain() functionality /// @author Haider /// @notice Contract is ownable for the period of vesting, ownership to renounced later contract DUELToken is ERC20, Ownable { address private _rainToken; address private _wethToken; address private _usdtToken; address private _dynamicVestingContract; address private _stakingContract; uint256 private _markedUpRainValueUnit; uint256 public _deploymentTime; IUniswapV2Router _uniswapRouter; constructor( address rainToken, address wethToken, address usdtToken, IUniswapV2Router uniswapRouter ) Ownable(msg.sender) ERC20("DUEL Token", "DUEL") { _rainToken = rainToken; _wethToken = wethToken; _usdtToken = usdtToken; _uniswapRouter = uniswapRouter; _markedUpRainValueUnit = 1 * 10 ** 4; _deploymentTime = block.timestamp; _mint(owner(), 10000000000 * 10 ** 18); // 10bil total supply } function setVestingContract(address dynamicVesting) external onlyOwner { _dynamicVestingContract = dynamicVesting; } function setStakingContract(address newStaker) external onlyOwner { _stakingContract = newStaker; } function setRainMarkup(uint256 newRate) external onlyOwner { _markedUpRainValueUnit = newRate; } function getRainValue() public view returns (uint256) { address[] memory route = new address[](3); route[0] = address(_rainToken); route[1] = address(_wethToken); route[2] = address(_usdtToken); uint256[] memory amounts = _uniswapRouter.getAmountsOut( 1 * 10 ** 18, route ); return amounts[2]; } function _convertInternal( uint256 rainAmount ) internal returns (uint256 baseDuelAmount, uint256 bonusDuelAmount) { IERC20(_rainToken).transferFrom( _msgSender(), 0x000000000000000000000000000000000000dEaD, rainAmount ); // [6 decimals] Fetch market price of RAIN in USD uint256 rainValueUnit = getRainValue(); // [6 decimals] Calculate user's provided RAIN token's USD worth // Dividing by 10**18 is eliminating rainAmount's decimal offset uint256 rainValueUSD = (rainAmount * rainValueUnit) / 10 ** 18; uint markedUpRainValueUnit = 100000; // $0.01 // It is the rain value that is decaying not the bonus if (block.timestamp >= _deploymentTime + 60 days) { markedUpRainValueUnit = 60000; // $0.006 } else if (block.timestamp >= _deploymentTime + 30 days) { markedUpRainValueUnit = 80000; // $0.008 } // [6 decimals] Calculate rewarded RAIN value in USD (including bonus) uint256 markedUpRainValueUSD = (block.timestamp >= _deploymentTime + 180 days)? rainValueUSD : (rainAmount * _markedUpRainValueUnit) / 10 ** 18; // [6 decimals] Set parameters for duel value at $0.0045 uint256 duelValueUnit = 4500; uint256 duelValueBase = 10 ** 6; // [18 decimals] Calculate duel amount to reward in total (base + bonus) baseDuelAmount = ((markedUpRainValueUSD * duelValueBase) / duelValueUnit) * 10 ** 12; // By default, we assume that there is no bonus, i.e. rainValueUSD > markedUpRainValueUSD // In this case, user will get all the baseDuelAmount after 30 days bonusDuelAmount = 0; // Check if bonus is applicable if (markedUpRainValueUSD > rainValueUSD) { // [6 decimals] Calculate the bonus value USD uint256 difference = markedUpRainValueUSD - rainValueUSD; // [18 decimals] Set the bonus duel amount for 90-days lockup bonusDuelAmount = ((difference * duelValueBase) / duelValueUnit) * 10 ** 12; // [18 decimals] Set the 1:1 duel amount for 30-days lockup baseDuelAmount -= bonusDuelAmount; } } function convertRain(uint256 rainAmount) external { (uint256 baseDuelAmount, uint256 bonusDuelAmount) = _convertInternal( rainAmount ); IVesting(_dynamicVestingContract).allocateDUEL( _msgSender(), baseDuelAmount, bonusDuelAmount ); } function swapAndStake(uint256 rainAmount, uint32 stakePeriodDays) external { require(stakePeriodDays >= 3 * 30, "Minimum stake duration is 3 months"); (uint256 baseDuelAmount, uint256 bonusDuelAmount) = _convertInternal( rainAmount ); IStaking(_stakingContract).stakeFor( _msgSender(), baseDuelAmount + bonusDuelAmount, stakePeriodDays * 1 days ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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 v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.4; import {IUniswapV2Router01} from "./IUniswapV2Router01.sol"; interface IUniswapV2Router is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.4; //solhint-disable func-name-mixedcase interface IUniswapV2Router01 { function factory() external view returns (address); function WETH() external view returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountOut); function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountIn); function getAmountsOut( uint256 amountIn, address[] calldata path ) external view returns (uint256[] memory amounts); function getAmountsIn( uint256 amountOut, address[] calldata path ) external view returns (uint256[] memory amounts); }
{ "optimizer": { "enabled": true, "runs": 200, "details": { "yul": false } }, "evmVersion": "paris", "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":"rainToken","type":"address"},{"internalType":"address","name":"wethToken","type":"address"},{"internalType":"address","name":"usdtToken","type":"address"},{"internalType":"contract IUniswapV2Router","name":"uniswapRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"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":"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":[],"name":"_deploymentTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rainAmount","type":"uint256"}],"name":"convertRain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRainValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"setRainMarkup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newStaker","type":"address"}],"name":"setStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"dynamicVesting","type":"address"}],"name":"setVestingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rainAmount","type":"uint256"},{"internalType":"uint32","name":"stakePeriodDays","type":"uint32"}],"name":"swapAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620018a7380380620018a7833981016040819052620000349162000361565b336040518060400160405280600a815260200169222aa2a6102a37b5b2b760b11b815250604051806040016040528060048152602001631115515360e21b8152508160039081620000869190620004d9565b506004620000958282620004d9565b5050506001600160a01b038116620000ce576000604051631e4fbdf760e01b8152600401620000c59190620005ba565b60405180910390fd5b620000d98162000151565b50600680546001600160a01b03199081166001600160a01b0387811691909117909255600780548216868416179055600880548216858416179055600d8054909116838316179055612710600b5542600c556005546200014791166b204fce5e3e25026110000000620001a3565b5050505062000643565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620001d057600060405163ec442f0560e01b8152600401620000c59190620005ba565b620001de60008383620001e2565b5050565b6001600160a01b03831662000211578060026000828254620002059190620005e0565b90915550620002739050565b6001600160a01b03831660009081526020819052604090205481811015620002545783818360405163391434e360e21b8152600401620000c593929190620005fd565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b0382166200029157600280548290039055620002b0565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002f5919062000633565b60405180910390a3505050565b60006001600160a01b0382165b92915050565b620003208162000302565b81146200032c57600080fd5b50565b80516200030f8162000315565b60006200030f8262000302565b62000320816200033c565b80516200030f8162000349565b600080600080608085870312156200037c576200037c600080fd5b60006200038a87876200032f565b94505060206200039d878288016200032f565b9350506040620003b0878288016200032f565b9250506060620003c38782880162000354565b91505092959194509250565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200041057607f821691505b602082108103620004255762000425620003e5565b50919050565b60006200030f620004398381565b90565b62000447836200042b565b815460001960089490940293841b1916921b91909117905550565b6000620004718184846200043c565b505050565b81811015620001de576200048c60008262000462565b60010162000476565b601f82111562000471576000818152602090206020601f85010481016020851015620004be5750805b620004d26020601f86010483018262000476565b5050505050565b81516001600160401b03811115620004f557620004f5620003cf565b620005018254620003fb565b6200050e82828562000495565b6020601f8311600181146200054557600084156200052c5750858201515b600019600886021c1981166002860217865550620005a1565b600085815260208120601f198616915b8281101562000577578885015182556020948501946001909201910162000555565b86831015620005945784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b620005b48162000302565b82525050565b602081016200030f8284620005a9565b634e487b7160e01b600052601160045260246000fd5b808201808211156200030f576200030f620005ca565b80620005b4565b606081016200060d8286620005a9565b6200061c6020830185620005f6565b6200062b6040830184620005f6565b949350505050565b602081016200030f8284620005f6565b61125480620006536000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b41146102445780639dd373b91461024c578063a9059cbb1461025f578063dd62ed3e14610272578063f2fde38b146102ab57600080fd5b806370a08231146101d4578063715018a6146101fd57806374991569146102055780638309179e146102185780638da5cb5b1461022b57600080fd5b806318160ddd116100f457806318160ddd1461018257806323b872dd1461018a578063313ce5671461019d57806338682268146101ac5780636282cbbc146101c157600080fd5b806306fdde0314610126578063095ea7b3146101445780630d9c8a7e1461016457806312097e5514610179575b600080fd5b61012e6102be565b60405161013b9190610c44565b60405180910390f35b610157610152366004610c9d565b610350565b60405161013b9190610ce4565b61016c61036a565b60405161013b9190610cf8565b61016c600c5481565b60025461016c565b610157610198366004610d06565b6104c7565b601260405161013b9190610d5f565b6101bf6101ba366004610d6d565b6104eb565b005b6101bf6101cf366004610d6d565b6104f8565b61016c6101e2366004610d96565b6001600160a01b031660009081526020819052604090205490565b6101bf610573565b6101bf610213366004610d96565b610587565b6101bf610226366004610dce565b6105b1565b6005546001600160a01b031660405161013b9190610e0a565b61012e610671565b6101bf61025a366004610d96565b610680565b61015761026d366004610c9d565b6106aa565b61016c610280366004610e18565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101bf6102b9366004610d96565b6106b8565b6060600380546102cd90610e61565b80601f01602080910402602001604051908101604052809291908181526020018280546102f990610e61565b80156103465780601f1061031b57610100808354040283529160200191610346565b820191906000526020600020905b81548152906001019060200180831161032957829003601f168201915b5050505050905090565b60003361035e8185856106f6565b60019150505b92915050565b6040805160038082526080820190925260009182919060208201606080368337505060065482519293506001600160a01b0316918391506000906103b0576103b0610ea3565b6001600160a01b0392831660209182029290920101526007548251911690829060019081106103e1576103e1610ea3565b6001600160a01b03928316602091820292909201015260085482519116908290600290811061041257610412610ea3565b6001600160a01b039283166020918202929092010152600d5460405163d06ca61f60e01b8152600092919091169063d06ca61f9061045e90670de0b6b3a7640000908690600401610f2e565b600060405180830381865afa15801561047b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104a3919081019061104a565b9050806002815181106104b8576104b8610ea3565b60200260200101519250505090565b6000336104d5858285610708565b6104e0858585610773565b506001949350505050565b6104f36107d2565b600b55565b600080610504836107ff565b600954604051636e0ecc0360e11b81529294509092506001600160a01b03169063dc1d98069061053c90339086908690600401611085565b600060405180830381600087803b15801561055657600080fd5b505af115801561056a573d6000803e3d6000fd5b50505050505050565b61057b6107d2565b61058560006109b4565b565b61058f6107d2565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b605a8163ffffffff1610156105e15760405162461bcd60e51b81526004016105d8906110ad565b60405180910390fd5b6000806105ed846107ff565b600a5491935091506001600160a01b03166340f320bb3361060e8486611109565b61061b876201518061111c565b6040518463ffffffff1660e01b815260040161063993929190611152565b600060405180830381600087803b15801561065357600080fd5b505af1158015610667573d6000803e3d6000fd5b5050505050505050565b6060600480546102cd90610e61565b6106886107d2565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60003361035e818585610773565b6106c06107d2565b6001600160a01b0381166106ea576000604051631e4fbdf760e01b81526004016105d89190610e0a565b6106f3816109b4565b50565b6107038383836001610a06565b505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461076d578181101561075e57828183604051637dc7a0d960e11b81526004016105d893929190611085565b61076d84848484036000610a06565b50505050565b6001600160a01b03831661079d576000604051634b637e8f60e11b81526004016105d89190610e0a565b6001600160a01b0382166107c757600060405163ec442f0560e01b81526004016105d89190610e0a565b610703838383610ad9565b6005546001600160a01b03163314610585573360405163118cdaa760e01b81526004016105d89190610e0a565b60065460009081906001600160a01b03166323b872dd3361dead866040518463ffffffff1660e01b81526004016108389392919061117a565b6020604051808303816000875af1158015610857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087b91906111a8565b50600061088661036a565b90506000670de0b6b3a764000061089d83876111c9565b6108a791906111f7565b600c54909150620186a0906108bf90624f1a00611109565b42106108ce575061ea606108ea565b600c546108de9062278d00611109565b42106108ea5750620138805b6000600c5462ed4e006108fd9190611109565b42101561092a57670de0b6b3a7640000600b548861091b91906111c9565b61092591906111f7565b61092c565b825b9050611194620f42408161094082856111c9565b61094a91906111f7565b6109599064e8d4a510006111c9565b975060009650848311156109a9576000610973868561120b565b90508261098083836111c9565b61098a91906111f7565b6109999064e8d4a510006111c9565b97506109a5888a61120b565b9850505b505050505050915091565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416610a3057600060405163e602df0560e01b81526004016105d89190610e0a565b6001600160a01b038316610a5a576000604051634a1406b160e11b81526004016105d89190610e0a565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561076d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610acb9190610cf8565b60405180910390a350505050565b6001600160a01b038316610b04578060026000828254610af99190611109565b90915550610b639050565b6001600160a01b03831660009081526020819052604090205481811015610b445783818360405163391434e360e21b81526004016105d893929190611085565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610b7f57600280548290039055610b9e565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610be19190610cf8565b60405180910390a3505050565b60005b83811015610c09578181015183820152602001610bf1565b50506000910152565b6000610c1c825190565b808452602084019350610c33818560208601610bee565b601f01601f19169290920192915050565b60208082528101610c558184610c12565b9392505050565b60006001600160a01b038216610364565b610c7681610c5c565b81146106f357600080fd5b803561036481610c6d565b80610c76565b803561036481610c8c565b60008060408385031215610cb357610cb3600080fd5b6000610cbf8585610c81565b9250506020610cd085828601610c92565b9150509250929050565b8015155b82525050565b602081016103648284610cda565b80610cde565b602081016103648284610cf2565b600080600060608486031215610d1e57610d1e600080fd5b6000610d2a8686610c81565b9350506020610d3b86828701610c81565b9250506040610d4c86828701610c92565b9150509250925092565b60ff8116610cde565b602081016103648284610d56565b600060208284031215610d8257610d82600080fd5b6000610d8e8484610c92565b949350505050565b600060208284031215610dab57610dab600080fd5b6000610d8e8484610c81565b63ffffffff8116610c76565b803561036481610db7565b60008060408385031215610de457610de4600080fd5b6000610df08585610c92565b9250506020610cd085828601610dc3565b610cde81610c5c565b602081016103648284610e01565b60008060408385031215610e2e57610e2e600080fd5b6000610e3a8585610c81565b9250506020610cd085828601610c81565b634e487b7160e01b600052602260045260246000fd5b600281046001821680610e7557607f821691505b602082108103610e8757610e87610e4b565b50919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000610364610ec58381565b90565b610cde81610eb9565b6000610edd8383610e01565b505060200190565b6000610eef825190565b80845260209384019383018060005b83811015610f23578151610f128882610ed1565b975060208301925050600101610efe565b509495945050505050565b60408101610f3c8285610ec8565b8181036020830152610d8e8184610ee5565b601f19601f830116810181811067ffffffffffffffff82111715610f7457610f74610e8d565b6040525050565b6000610f8660405190565b9050610f928282610f4e565b919050565b600067ffffffffffffffff821115610fb157610fb1610e8d565b5060209081020190565b805161036481610c8c565b6000610fd9610fd484610f97565b610f7b565b83815290506020808201908402830185811115610ff857610ff8600080fd5b835b8181101561101c578061100d8882610fbb565b84525060209283019201610ffa565b5050509392505050565b600082601f83011261103a5761103a600080fd5b8151610d8e848260208601610fc6565b60006020828403121561105f5761105f600080fd5b815167ffffffffffffffff81111561107957611079600080fd5b610d8e84828501611026565b606081016110938286610e01565b6110a06020830185610cf2565b610d8e6040830184610cf2565b6020808252810161036481602281527f4d696e696d756d207374616b65206475726174696f6e2069732033206d6f6e74602082015261687360f01b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610364576103646110f3565b63ffffffff91821691908116908282029081169081811461113f5761113f6110f3565b5092915050565b63ffffffff8116610cde565b606081016111608286610e01565b61116d6020830185610cf2565b610d8e6040830184611146565b606081016111888286610e01565b6110a06020830185610e01565b801515610c76565b805161036481611195565b6000602082840312156111bd576111bd600080fd5b6000610d8e848461119d565b81810280821583820485141761113f5761113f6110f3565b634e487b7160e01b600052601260045260246000fd5b600082611206576112066111e1565b500490565b81810381811115610364576103646110f356fea2646970667358221220d1220ac73ca085b07f8ee24bb8416f37b9bc836c874b96c84a53038b530efdcd64736f6c6343000814003300000000000000000000000071fc1f555a39e0b698653ab0b475488ec3c34d57000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b41146102445780639dd373b91461024c578063a9059cbb1461025f578063dd62ed3e14610272578063f2fde38b146102ab57600080fd5b806370a08231146101d4578063715018a6146101fd57806374991569146102055780638309179e146102185780638da5cb5b1461022b57600080fd5b806318160ddd116100f457806318160ddd1461018257806323b872dd1461018a578063313ce5671461019d57806338682268146101ac5780636282cbbc146101c157600080fd5b806306fdde0314610126578063095ea7b3146101445780630d9c8a7e1461016457806312097e5514610179575b600080fd5b61012e6102be565b60405161013b9190610c44565b60405180910390f35b610157610152366004610c9d565b610350565b60405161013b9190610ce4565b61016c61036a565b60405161013b9190610cf8565b61016c600c5481565b60025461016c565b610157610198366004610d06565b6104c7565b601260405161013b9190610d5f565b6101bf6101ba366004610d6d565b6104eb565b005b6101bf6101cf366004610d6d565b6104f8565b61016c6101e2366004610d96565b6001600160a01b031660009081526020819052604090205490565b6101bf610573565b6101bf610213366004610d96565b610587565b6101bf610226366004610dce565b6105b1565b6005546001600160a01b031660405161013b9190610e0a565b61012e610671565b6101bf61025a366004610d96565b610680565b61015761026d366004610c9d565b6106aa565b61016c610280366004610e18565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101bf6102b9366004610d96565b6106b8565b6060600380546102cd90610e61565b80601f01602080910402602001604051908101604052809291908181526020018280546102f990610e61565b80156103465780601f1061031b57610100808354040283529160200191610346565b820191906000526020600020905b81548152906001019060200180831161032957829003601f168201915b5050505050905090565b60003361035e8185856106f6565b60019150505b92915050565b6040805160038082526080820190925260009182919060208201606080368337505060065482519293506001600160a01b0316918391506000906103b0576103b0610ea3565b6001600160a01b0392831660209182029290920101526007548251911690829060019081106103e1576103e1610ea3565b6001600160a01b03928316602091820292909201015260085482519116908290600290811061041257610412610ea3565b6001600160a01b039283166020918202929092010152600d5460405163d06ca61f60e01b8152600092919091169063d06ca61f9061045e90670de0b6b3a7640000908690600401610f2e565b600060405180830381865afa15801561047b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104a3919081019061104a565b9050806002815181106104b8576104b8610ea3565b60200260200101519250505090565b6000336104d5858285610708565b6104e0858585610773565b506001949350505050565b6104f36107d2565b600b55565b600080610504836107ff565b600954604051636e0ecc0360e11b81529294509092506001600160a01b03169063dc1d98069061053c90339086908690600401611085565b600060405180830381600087803b15801561055657600080fd5b505af115801561056a573d6000803e3d6000fd5b50505050505050565b61057b6107d2565b61058560006109b4565b565b61058f6107d2565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b605a8163ffffffff1610156105e15760405162461bcd60e51b81526004016105d8906110ad565b60405180910390fd5b6000806105ed846107ff565b600a5491935091506001600160a01b03166340f320bb3361060e8486611109565b61061b876201518061111c565b6040518463ffffffff1660e01b815260040161063993929190611152565b600060405180830381600087803b15801561065357600080fd5b505af1158015610667573d6000803e3d6000fd5b5050505050505050565b6060600480546102cd90610e61565b6106886107d2565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60003361035e818585610773565b6106c06107d2565b6001600160a01b0381166106ea576000604051631e4fbdf760e01b81526004016105d89190610e0a565b6106f3816109b4565b50565b6107038383836001610a06565b505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461076d578181101561075e57828183604051637dc7a0d960e11b81526004016105d893929190611085565b61076d84848484036000610a06565b50505050565b6001600160a01b03831661079d576000604051634b637e8f60e11b81526004016105d89190610e0a565b6001600160a01b0382166107c757600060405163ec442f0560e01b81526004016105d89190610e0a565b610703838383610ad9565b6005546001600160a01b03163314610585573360405163118cdaa760e01b81526004016105d89190610e0a565b60065460009081906001600160a01b03166323b872dd3361dead866040518463ffffffff1660e01b81526004016108389392919061117a565b6020604051808303816000875af1158015610857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087b91906111a8565b50600061088661036a565b90506000670de0b6b3a764000061089d83876111c9565b6108a791906111f7565b600c54909150620186a0906108bf90624f1a00611109565b42106108ce575061ea606108ea565b600c546108de9062278d00611109565b42106108ea5750620138805b6000600c5462ed4e006108fd9190611109565b42101561092a57670de0b6b3a7640000600b548861091b91906111c9565b61092591906111f7565b61092c565b825b9050611194620f42408161094082856111c9565b61094a91906111f7565b6109599064e8d4a510006111c9565b975060009650848311156109a9576000610973868561120b565b90508261098083836111c9565b61098a91906111f7565b6109999064e8d4a510006111c9565b97506109a5888a61120b565b9850505b505050505050915091565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416610a3057600060405163e602df0560e01b81526004016105d89190610e0a565b6001600160a01b038316610a5a576000604051634a1406b160e11b81526004016105d89190610e0a565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561076d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610acb9190610cf8565b60405180910390a350505050565b6001600160a01b038316610b04578060026000828254610af99190611109565b90915550610b639050565b6001600160a01b03831660009081526020819052604090205481811015610b445783818360405163391434e360e21b81526004016105d893929190611085565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610b7f57600280548290039055610b9e565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610be19190610cf8565b60405180910390a3505050565b60005b83811015610c09578181015183820152602001610bf1565b50506000910152565b6000610c1c825190565b808452602084019350610c33818560208601610bee565b601f01601f19169290920192915050565b60208082528101610c558184610c12565b9392505050565b60006001600160a01b038216610364565b610c7681610c5c565b81146106f357600080fd5b803561036481610c6d565b80610c76565b803561036481610c8c565b60008060408385031215610cb357610cb3600080fd5b6000610cbf8585610c81565b9250506020610cd085828601610c92565b9150509250929050565b8015155b82525050565b602081016103648284610cda565b80610cde565b602081016103648284610cf2565b600080600060608486031215610d1e57610d1e600080fd5b6000610d2a8686610c81565b9350506020610d3b86828701610c81565b9250506040610d4c86828701610c92565b9150509250925092565b60ff8116610cde565b602081016103648284610d56565b600060208284031215610d8257610d82600080fd5b6000610d8e8484610c92565b949350505050565b600060208284031215610dab57610dab600080fd5b6000610d8e8484610c81565b63ffffffff8116610c76565b803561036481610db7565b60008060408385031215610de457610de4600080fd5b6000610df08585610c92565b9250506020610cd085828601610dc3565b610cde81610c5c565b602081016103648284610e01565b60008060408385031215610e2e57610e2e600080fd5b6000610e3a8585610c81565b9250506020610cd085828601610c81565b634e487b7160e01b600052602260045260246000fd5b600281046001821680610e7557607f821691505b602082108103610e8757610e87610e4b565b50919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000610364610ec58381565b90565b610cde81610eb9565b6000610edd8383610e01565b505060200190565b6000610eef825190565b80845260209384019383018060005b83811015610f23578151610f128882610ed1565b975060208301925050600101610efe565b509495945050505050565b60408101610f3c8285610ec8565b8181036020830152610d8e8184610ee5565b601f19601f830116810181811067ffffffffffffffff82111715610f7457610f74610e8d565b6040525050565b6000610f8660405190565b9050610f928282610f4e565b919050565b600067ffffffffffffffff821115610fb157610fb1610e8d565b5060209081020190565b805161036481610c8c565b6000610fd9610fd484610f97565b610f7b565b83815290506020808201908402830185811115610ff857610ff8600080fd5b835b8181101561101c578061100d8882610fbb565b84525060209283019201610ffa565b5050509392505050565b600082601f83011261103a5761103a600080fd5b8151610d8e848260208601610fc6565b60006020828403121561105f5761105f600080fd5b815167ffffffffffffffff81111561107957611079600080fd5b610d8e84828501611026565b606081016110938286610e01565b6110a06020830185610cf2565b610d8e6040830184610cf2565b6020808252810161036481602281527f4d696e696d756d207374616b65206475726174696f6e2069732033206d6f6e74602082015261687360f01b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610364576103646110f3565b63ffffffff91821691908116908282029081169081811461113f5761113f6110f3565b5092915050565b63ffffffff8116610cde565b606081016111608286610e01565b61116d6020830185610cf2565b610d8e6040830184611146565b606081016111888286610e01565b6110a06020830185610e01565b801515610c76565b805161036481611195565b6000602082840312156111bd576111bd600080fd5b6000610d8e848461119d565b81810280821583820485141761113f5761113f6110f3565b634e487b7160e01b600052601260045260246000fd5b600082611206576112066111e1565b500490565b81810381811115610364576103646110f356fea2646970667358221220d1220ac73ca085b07f8ee24bb8416f37b9bc836c874b96c84a53038b530efdcd64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000071fc1f555a39e0b698653ab0b475488ec3c34d57000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
-----Decoded View---------------
Arg [0] : rainToken (address): 0x71Fc1F555a39E0B698653AB0b475488EC3c34D57
Arg [1] : wethToken (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : usdtToken (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [3] : uniswapRouter (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000071fc1f555a39e0b698653ab0b475488ec3c34d57
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [3] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.