![ads](/images/gen/moonpay_20.png)
20M+ users trust MoonPay worldwide. Checkout with your preferred payment method.
![ads](/images/gen/cons_20.png)
Ready to onboard to Ethereum? With MetaMask Portfolio, you're in control.
![ads](/images/gen/nexo.png)
Get up to 0.5% cashback per purchase and receive daily interest.
![ads](/images/gen/cons_20.png)
Ready to simplify your web3 experience? Try the all-in-one web3 app trusted by millions worldwide.
Opt-in, make your first trade on Exchange Plus & receive random crypto rewards from 10,000 SHIB, to 0.01 BTC.
![ads](/images/gen/coinsgame_20a.png)
Everyday giveaways up to 100 ETH, Lucky Spins. Deposit BONUS 300% and Cashbacks!
![ads](/images/gen/celsiuscasino_20.png)
9 years old Licensed Crypto Casino, Instant Withdraw 24/7, 6000+ Slots available, Paypal Deposit, Instant Live Support 24/7, 30% Rakeback.
![ads](/images/gen/bcgames_20.png)
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
![ads](/images/gen/bcgames_20.png)
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
![ads](/images/gen/cw_20.png)
Play 100s of games anonymously with all major cryptos. Join CryptoWins & start winning!
![ads](/images/gen/cryptoslots.png)
Anonymous play on awesome games - sign up now for 25 free jackpot spins - worth $100s!
Overview
ETH Balance
Eth Value
$0.00Token Holdings
Could not find any matches!
- ERC-20 Tokens (4)512,722.078261 USDCUSDC (USDC)$512,722.08@1.003,999.99 TokenERC-20 TOKEN*[Suspicious]8,271 TokenERC-20 TOKEN*[Suspicious]3,999.99 TokenERC-20 TOKEN*[Suspicious]NFT Tokens (7)
More Info
Private Name Tags
ContractCreator
TokenTracker
- Transactions
- Internal Transactions
- Token Transfers (ERC-20)
- NFT Transfers
- Contract
- Events
- Analytics
- Multichain Portfolio
- Cards New
- Filter by Tx Type:
- Tx
- Internal Tx
- ERC-20
- NFTs
Latest 25 from a total of 581 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Approve | 20548956 | 2024-08-17 14:30:59 | 4 days ago | 1723905059 | IN | 0 ETH$0.00 | 0.00011047 | 2.37043694 | ||||
Approve | 20546688 | 2024-08-17 6:55:11 | 4 days ago | 1723877711 | IN | 0 ETH$0.00 | 0.00004127 | 0.8856105 | ||||
Approve | 20546682 | 2024-08-17 6:53:59 | 4 days ago | 1723877639 | IN | 0 ETH$0.00 | 0.00004228 | 0.90727578 | ||||
Approve | 20546676 | 2024-08-17 6:52:47 | 4 days ago | 1723877567 | IN | 0 ETH$0.00 | 0.00004485 | 0.96238888 | ||||
Approve | 20496575 | 2024-08-10 6:59:23 | 11 days ago | 1723273163 | IN | 0 ETH$0.00 | 0.00006386 | 1.3703341 | ||||
Approve | 20490952 | 2024-08-09 12:10:11 | 12 days ago | 1723205411 | IN | 0 ETH$0.00 | 0.00015553 | 3.33741125 | ||||
Approve | 20490946 | 2024-08-09 12:08:59 | 12 days ago | 1723205339 | IN | 0 ETH$0.00 | 0.00011213 | 2.40619384 | ||||
Approve | 20490940 | 2024-08-09 12:07:47 | 12 days ago | 1723205267 | IN | 0 ETH$0.00 | 0.00011633 | 2.49616584 | ||||
Approve | 20445095 | 2024-08-03 2:40:59 | 18 days ago | 1722652859 | IN | 0 ETH$0.00 | 0.00006663 | 1.42991577 | ||||
Approve | 20445088 | 2024-08-03 2:39:35 | 18 days ago | 1722652775 | IN | 0 ETH$0.00 | 0.00005887 | 1.26335848 | ||||
Approve | 20445083 | 2024-08-03 2:38:35 | 18 days ago | 1722652715 | IN | 0 ETH$0.00 | 0.00006537 | 1.40285772 | ||||
Approve | 20404069 | 2024-07-28 9:11:59 | 24 days ago | 1722157919 | IN | 0 ETH$0.00 | 0.00010917 | 2.3425754 | ||||
Approve | 20390492 | 2024-07-26 11:41:47 | 26 days ago | 1721994107 | IN | 0 ETH$0.00 | 0.00007948 | 1.70547806 | ||||
Approve | 20390487 | 2024-07-26 11:40:47 | 26 days ago | 1721994047 | IN | 0 ETH$0.00 | 0.00008612 | 1.84801709 | ||||
Approve | 20390473 | 2024-07-26 11:37:59 | 26 days ago | 1721993879 | IN | 0 ETH$0.00 | 0.00008407 | 1.8039772 | ||||
Approve | 20348070 | 2024-07-20 13:33:59 | 32 days ago | 1721482439 | IN | 0 ETH$0.00 | 0.00021648 | 4.64515775 | ||||
Approve | 20348063 | 2024-07-20 13:32:35 | 32 days ago | 1721482355 | IN | 0 ETH$0.00 | 0.00023047 | 4.94537231 | ||||
Approve | 20348057 | 2024-07-20 13:31:23 | 32 days ago | 1721482283 | IN | 0 ETH$0.00 | 0.00021438 | 4.60015799 | ||||
Approve | 20348048 | 2024-07-20 13:29:35 | 32 days ago | 1721482175 | IN | 0 ETH$0.00 | 0.00023846 | 5.11682831 | ||||
Approve | 20290243 | 2024-07-12 11:52:47 | 40 days ago | 1720785167 | IN | 0 ETH$0.00 | 0.00010577 | 2.26967563 | ||||
Approve | 20290238 | 2024-07-12 11:51:47 | 40 days ago | 1720785107 | IN | 0 ETH$0.00 | 0.00011253 | 2.4146793 | ||||
Approve | 20290226 | 2024-07-12 11:49:23 | 40 days ago | 1720784963 | IN | 0 ETH$0.00 | 0.00010989 | 2.35803962 | ||||
Approve | 20290221 | 2024-07-12 11:48:23 | 40 days ago | 1720784903 | IN | 0 ETH$0.00 | 0.00010722 | 2.30077846 | ||||
Approve | 20290214 | 2024-07-12 11:46:59 | 40 days ago | 1720784819 | IN | 0 ETH$0.00 | 0.00010436 | 2.23938419 | ||||
Approve | 20290202 | 2024-07-12 11:44:35 | 40 days ago | 1720784675 | IN | 0 ETH$0.00 | 0.00010288 | 2.20768802 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | ||||||
---|---|---|---|---|---|---|---|---|---|
20560519 | 2024-08-19 5:15:23 | 2 days ago | 1724044523 | 0 ETH$0.00 | |||||
20560519 | 2024-08-19 5:15:23 | 2 days ago | 1724044523 | 0 ETH$0.00 | |||||
20560519 | 2024-08-19 5:15:23 | 2 days ago | 1724044523 | 0 ETH$0.00 | |||||
20560519 | 2024-08-19 5:15:23 | 2 days ago | 1724044523 | 0 ETH$0.00 | |||||
20560517 | 2024-08-19 5:14:59 | 2 days ago | 1724044499 | 0 ETH$0.00 | |||||
20560517 | 2024-08-19 5:14:59 | 2 days ago | 1724044499 | 0 ETH$0.00 | |||||
20560517 | 2024-08-19 5:14:59 | 2 days ago | 1724044499 | 0 ETH$0.00 | |||||
20560517 | 2024-08-19 5:14:59 | 2 days ago | 1724044499 | 0 ETH$0.00 | |||||
20560465 | 2024-08-19 5:04:23 | 2 days ago | 1724043863 | 0 ETH$0.00 | |||||
20560465 | 2024-08-19 5:04:23 | 2 days ago | 1724043863 | 0 ETH$0.00 | |||||
20548959 | 2024-08-17 14:31:35 | 4 days ago | 1723905095 | 0 ETH$0.00 | |||||
20548959 | 2024-08-17 14:31:35 | 4 days ago | 1723905095 | 0 ETH$0.00 | |||||
20548959 | 2024-08-17 14:31:35 | 4 days ago | 1723905095 | 0 ETH$0.00 | |||||
20548949 | 2024-08-17 14:29:35 | 4 days ago | 1723904975 | 0 ETH$0.00 | |||||
20548949 | 2024-08-17 14:29:35 | 4 days ago | 1723904975 | 0 ETH$0.00 | |||||
20548949 | 2024-08-17 14:29:35 | 4 days ago | 1723904975 | 0 ETH$0.00 | |||||
20548949 | 2024-08-17 14:29:35 | 4 days ago | 1723904975 | 0 ETH$0.00 | |||||
20548945 | 2024-08-17 14:28:47 | 4 days ago | 1723904927 | 0 ETH$0.00 | |||||
20546692 | 2024-08-17 6:55:59 | 4 days ago | 1723877759 | 0 ETH$0.00 | |||||
20546692 | 2024-08-17 6:55:59 | 4 days ago | 1723877759 | 0 ETH$0.00 | |||||
20546692 | 2024-08-17 6:55:59 | 4 days ago | 1723877759 | 0 ETH$0.00 | |||||
20546684 | 2024-08-17 6:54:23 | 4 days ago | 1723877663 | 0 ETH$0.00 | |||||
20546684 | 2024-08-17 6:54:23 | 4 days ago | 1723877663 | 0 ETH$0.00 | |||||
20546684 | 2024-08-17 6:54:23 | 4 days ago | 1723877663 | 0 ETH$0.00 | |||||
20546678 | 2024-08-17 6:53:11 | 4 days ago | 1723877591 | 0 ETH$0.00 |
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Wrapper.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "../option/Distributions.sol"; /** * @title HODLToken * @author DeOrderBook * @custom:license Copyright (c) DeOrderBook, 2023 — All Rights Reserved * @notice HODL tokens are wrappers for external tokens designed to incentivize holders to retain their position by offering special functionality, like the ability to check if a holder owns a certain NFT. * @dev Inherits from ERC20Wrapper and Ownable. Uses the SafeMath library for all mathematical operations to prevent overflow and underflow errors. */ contract HODLToken is ERC20Wrapper, Ownable { using SafeMath for uint256; /** * @notice An instance of the Distributions contract. * @dev This contract is responsible for managing the distribution of fees collected from HODL tokens. */ Distributions public immutable distributions; /** * @notice A flag indicating whether NFT ownership checks are enabled or disabled. * @dev If true, the contract will check if a token holder owns a certain NFT before allowing certain operations. */ bool public isCheckNFT; /** * @notice The address of the ERC721 token contract against which NFT ownership checks are to be performed. * @dev This address is set via the `setIsCheckNFT` function and is used in the `nftCheckSuccess` function. */ ERC721 public NFTAddress; /** * @notice The conversion rate used to determine the number of HODL tokens minted in exchange for the underlying token. * @dev This rate is applied when depositing the underlying token to mint HODL tokens, essentially defining the ratio between the underlying token and HODL token. * It's specified as a power of 10, meaning that a conversion rate of N would lead to a conversion ratio of 10^N. */ uint256 public conversionRate; /** * @notice Constructs the HODLToken contract. * @dev Assigns the underlying ERC20 token that the HODL token wraps and the Distributions contract. * @param underlyingTokenAddress The address of the ERC20 token that the HODL token wraps. * @param distributionsAddress The address of the Distributions contract. * @param symbol_ The symbol of the HODL token. * @param _conversionRate The conversion rate of the HODL token. */ constructor( address underlyingTokenAddress, address distributionsAddress, string memory symbol_, uint256 _conversionRate ) ERC20("HODL Token", symbol_) ERC20Wrapper(IERC20(underlyingTokenAddress)) { require(underlyingTokenAddress != address(0), "HODLToken: zero address"); distributions = Distributions(distributionsAddress); conversionRate = _conversionRate; } /** * @notice Allows the contract owner to enable or disable NFT ownership checks and to set the NFT contract address. * @dev If NFT checks are enabled, the provided NFT contract address must be a valid contract address. * @param _isCheckNFT Indicates whether NFT checks are to be enabled or disabled. * @param _nftAddress The address of the NFT contract against which checks are to be performed. */ function setIsCheckNFT(bool _isCheckNFT, ERC721 _nftAddress) public onlyOwner { if (_isCheckNFT) { require(address(_nftAddress) != address(0), "HODLToken: NFT zero address"); uint256 size; assembly { size := extcodesize(_nftAddress) } require(size > 0, "Not a contract"); NFTAddress = _nftAddress; } isCheckNFT = _isCheckNFT; } /** * @notice Checks whether the caller owns an NFT, if NFT checks are enabled. * @dev Returns true if NFT checks are disabled or if the caller owns an NFT. * @return Returns true if NFT checks are disabled or if the caller owns an NFT. */ function nftCheckSuccess() private view returns (bool) { if (isCheckNFT) { uint256 userNft = NFTAddress.balanceOf(msg.sender); if (userNft > 0) { return true; } else { return false; } } else { return true; } } /** * @notice Allows a user to deposit a specified amount of the underlying token and mints them an equivalent amount of HODL tokens. * @dev The sender must own an NFT if NFT checks are enabled. The sender cannot be the zero address. * @param amount The amount of the underlying token to deposit. * @return Returns true upon success. */ function deposit(uint256 amount) external returns (bool) { depositFor(msg.sender, amount); return true; } /** * @notice Allows an account to deposit a specified amount of the underlying token on behalf of another address and mints them an equivalent amount of HODL tokens. * @dev The underlying token is transferred from the sender's address to the contract, and HODL tokens are minted to the specified account. The minted amount is adjusted by the conversion rate. * @param account The address for whom the deposit is made. * @param amount The amount of the underlying token to deposit. * @return Returns true upon success. */ function depositFor(address account, uint256 amount) public override returns (bool) { require(amount > 0, "HODLToken: zero amount"); require(nftCheckSuccess(), "HODLToken: you do not have NFT"); SafeERC20.safeTransferFrom(underlying, _msgSender(), address(this), amount); uint256 adjustAmount = amount.mul(10**conversionRate); _mint(account, adjustAmount); return true; } /** * @notice Allows a user to withdraw a specified amount of the underlying token by burning an equivalent amount of HODL tokens. * @dev The sender cannot be the zero address. * @param amount The amount of the underlying token to withdraw. * @return Returns true upon success. */ function withdraw(uint256 amount) external returns (bool) { require(msg.sender != address(0), "HODLToken: zero address"); require(amount > 0, "HODLToken: zero amount"); withdrawTo(msg.sender, amount); return true; } /** * @notice Burns a specified amount of HODL tokens from the sender's account and transfers the underlying tokens to a specified account. * @dev A withdrawal fee is charged, part of which is burned and part of which is distributed as per the rules in the Distributions contract. * @param account The account to receive the underlying tokens. * @param amount The amount of HODL tokens to burn. * @return Returns true upon success. */ function withdrawTo(address account, uint256 amount) public override returns (bool) { uint256 feeAmount = amount.mul(distributions.hodlWithdrawFeeRatio()).div(10000); uint256 adjustedAmount = amount.sub(feeAmount).div(10**conversionRate); uint256 remainder = amount.sub(feeAmount).sub(adjustedAmount.mul(10**conversionRate)); uint256 adjustedFee = feeAmount.add(remainder); uint256 burnAmount = amount.sub(adjustedFee); _burn(_msgSender(), burnAmount); for (uint8 i = 0; i < distributions.hodlWithdrawFeeDistributionLength(); i++) { (uint8 percentage, address to) = distributions.hodlWithdrawFeeDistribution(i); SafeERC20.safeTransferFrom(IERC20(address(this)), _msgSender(), to, adjustedFee.mul(percentage).div(100)); } SafeERC20.safeTransfer(underlying, account, adjustedAmount); return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.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}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20.sol"; import "../utils/SafeERC20.sol"; /** * @dev Extension of the ERC20 token contract to support token wrapping. * * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the * wrapping of an existing "basic" ERC20 into a governance token. * * _Available since v4.2._ */ abstract contract ERC20Wrapper is ERC20 { IERC20 public immutable underlying; constructor(IERC20 underlyingToken) { underlying = underlyingToken; } /** * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens. */ function depositFor(address account, uint256 amount) public virtual returns (bool) { SafeERC20.safeTransferFrom(underlying, _msgSender(), address(this), amount); _mint(account, amount); return true; } /** * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens. */ function withdrawTo(address account, uint256 amount) public virtual returns (bool) { _burn(_msgSender(), amount); SafeERC20.safeTransfer(underlying, account, amount); return true; } /** * @dev Mint wrapped token to cover any underlyingTokens that would have been transfered by mistake. Internal * function that can be exposed with access control if desired. */ function _recover(address account) internal virtual returns (uint256) { uint256 value = underlying.balanceOf(address(this)) - totalSupply(); _mint(account, value); return value; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT 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() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "../interfaces/IDistributions.sol"; /** * @title Distributions * @author DeOrderBook * @custom:license Copyright (c) DeOrderBook, 2023 — All Rights Reserved * @notice This contract manages different types of fees and their distributions. It is responsible for * defining fee ratios and their allocations. It is upgradeable and only the contract owner has * the permission to change these values. The types of fees include Entry, Exercise, Withdraw, * Redeem, and HODL Withdraw fees. It also manages the ratio of Bullet to Reward and the * distributions of these fees and bullet rewards. * @dev This contact uses the concept of "ratio" for managing fee ratios and uses an array of Distribution structs for allocating these fees. The * Distribution struct has two properties: percentage and recipient's address. The contract emits * various events when fee ratios or distributions are changed. */ contract Distributions is OwnableUpgradeable { /** * @notice The ratio of the entry fee for a DeOrder. * @dev Represents the percentage of the fee taken when a new DeOrder is created. Values are in basis points, so a value of 100 means 1%. */ uint16 public entryFeeRatio; /** * @notice The ratio of the exercise fee. * @dev Represents the percentage of the fee taken when a DeOrder is exercised. Values are in basis points, so a value of 100 means 1%. */ uint16 public exerciseFeeRatio; /** * @notice The ratio of the withdrawal fee when collecting from a DeOrder. * @dev Represents the percentage of the fee taken when funds are withdrawn from a DeOrder. Values are in basis points, so a value of 100 means 1%. */ uint16 public withdrawFeeRatio; /** * @notice The ratio of the redeem fee. * @dev Represents the percentage of the fee taken when a DeOrder is redeemed. Values are in basis points, so a value of 100 means 1%. */ uint16 public redeemFeeRatio; /** * @notice The ratio of bullet to reward. * @dev This is used to calculate rewards from bullets. For example, a value of 80 means for every 1 bullet, 0.8 rewards are given. */ uint8 public bulletToRewardRatio; /** * @notice The ratio of HODL withdrawal fee. * @dev Represents the percentage of the fee taken when funds are withdrawn from a HODL. Values are in basis points, so a value of 100 means 1%. */ uint16 public hodlWithdrawFeeRatio; /** * @notice Represents a fee distribution. * @dev A struct representing a fee distribution, containing the percentage of the fee and the address to which it should be distributed. */ struct Distribution { uint8 percentage; address to; } /** * @notice An array representing the fee distribution. * @dev An array of Distribution structs representing how the fee is distributed among multiple addresses. */ Distribution[] public feeDistribution; /** * @notice An array representing the bullet distribution. * @dev An array of Distribution structs representing how the bullet rewards are distributed among multiple addresses. */ Distribution[] public bulletDistribution; /** * @notice An array representing the HODL withdrawal fee distribution. * @dev An array of Distribution structs representing how the HODL withdrawal fee is distributed among multiple addresses. */ Distribution[] public hodlWithdrawFeeDistribution; /** * @notice The length of the fee distribution array. * @dev The current length (i.e., the number of recipients) of the fee distribution array. */ uint256 public feeDistributionLength; /** * @notice The length of the bullet distribution array. * @dev The current length (i.e., the number of recipients) of the bullet distribution array. */ uint256 public bulletDistributionLength; /** * @notice The length of the HODL withdrawal fee distribution array. * @dev The current length (i.e., the number of recipients) of the HODL withdrawal fee distribution array. */ uint256 public hodlWithdrawFeeDistributionLength; /** * @notice Emitted when the entry fee ratio is updated. * @dev This event triggers when the existing entry fee ratio changes to a new value. * @param oldEntryFeeRatio The old entry fee ratio. * @param newEntryFeeRatio The new entry fee ratio. */ event EntryFeeRatioChanged(uint16 oldEntryFeeRatio, uint16 newEntryFeeRatio); /** * @notice Emitted when the exercise fee ratio is updated. * @dev This event triggers when the existing exercise fee ratio changes to a new value. * @param oldExerciseFeeRatio The old exercise fee ratio. * @param newExerciseFeeRatio The new exercise fee ratio. */ event ExerciseFeeRatioChanged(uint16 oldExerciseFeeRatio, uint16 newExerciseFeeRatio); /** * @notice Emitted when the withdraw fee ratio is updated. * @dev This event triggers when the existing withdraw fee ratio changes to a new value. * @param oldWithdrawFeeRatio The old withdraw fee ratio. * @param newWithdrawFeeRatio The new withdraw fee ratio. */ event WithdrawFeeRatioChanged(uint16 oldWithdrawFeeRatio, uint16 newWithdrawFeeRatio); /** * @notice Emitted when the redeem fee ratio is updated. * @dev This event triggers when the existing redeem fee ratio changes to a new value. * @param oldRedeemFeeRatio The old redeem fee ratio. * @param newRedeemFeeRatio The new redeem fee ratio. */ event RedeemFeeRatioChanged(uint16 oldRedeemFeeRatio, uint16 newRedeemFeeRatio); /** * @notice Emitted when the HODL withdraw fee ratio is updated. * @dev This event triggers when the existing HODL withdraw fee ratio changes to a new value. * @param oldHodlWithdrawFeeRatio The old HODL withdraw fee ratio. * @param newHodlWithdrawFeeRatio The new HODL withdraw fee ratio. */ event HodlWithdrawFeeRatioChanged(uint16 oldHodlWithdrawFeeRatio, uint16 newHodlWithdrawFeeRatio); /** * @notice Emitted when the bullet-to-reward ratio is updated. * @dev This event triggers when the existing bullet-to-reward ratio changes to a new value. * @param oldBulletToRewardRatio The old bullet-to-reward ratio. * @param newBulletToRewardRatio The new bullet-to-reward ratio. */ event BulletToRewardRatioChanged(uint8 oldBulletToRewardRatio, uint8 newBulletToRewardRatio); /** * @notice Emitted when the fee distribution is updated. * @dev This event triggers when the fee distribution list is changed. It includes the updated percentages and recipient addresses. * @param percentage The array of fee distribution percentages. * @param to The array of fee distribution recipients. */ event FeeDistributionSet(uint8[] percentage, address[] to); /** * @notice Emitted when the bullet distribution is updated. * @dev This event triggers when the bullet distribution list is changed. It includes the updated percentages and recipient addresses. * @param percentage The array of bullet distribution percentages. * @param to The array of bullet distribution recipients. */ event BulletDistributionSet(uint8[] percentage, address[] to); /** * @notice Emitted when the HODL withdraw fee distribution is updated. * @dev This event triggers when the HODL withdraw fee distribution list is changed. It includes the updated percentages and recipient addresses. * @param percentage The array of HODL withdraw fee distribution percentages. * @param to The array of HODL withdraw fee distribution recipients. */ event HodlWithdrawFeeDistributionSet(uint8[] percentage, address[] to); /** * @notice Initializes the Distributions contract. * @dev Invokes the initialization function of the parent contract and sets the bulletToRewardRatio to 80. */ function __Distributions_init() public initializer { __Ownable_init(); bulletToRewardRatio = 80; exerciseFeeRatio = 20; withdrawFeeRatio = 20; hodlWithdrawFeeRatio = 20; redeemFeeRatio = 20; entryFeeRatio = 20; } /** * @notice Only the contract owner can call this function. * @dev Sets the exercise fee ratio. * @param _feeRatio The new exercise fee ratio. */ function setExerciseFee(uint16 _feeRatio) external onlyOwner { require(0 <= _feeRatio && _feeRatio < 10000, "Distributions: Illegal value range"); uint16 oldFeeRatio = exerciseFeeRatio; exerciseFeeRatio = _feeRatio; emit ExerciseFeeRatioChanged(oldFeeRatio, exerciseFeeRatio); } /** * @notice Only the contract owner can call this function. * @dev Sets the withdraw fee ratio. * @param _feeRatio The new withdraw fee ratio. */ function setWithdrawFee(uint16 _feeRatio) external onlyOwner { require(0 <= _feeRatio && _feeRatio < 10000, "Distributions: Illegal value range"); uint16 oldFeeRatio = withdrawFeeRatio; withdrawFeeRatio = _feeRatio; emit WithdrawFeeRatioChanged(oldFeeRatio, withdrawFeeRatio); } /** * @notice Only the contract owner can call this function. * @dev Sets the redeem fee ratio. * @param _feeRatio The new redeem fee ratio. */ function setRedeemFee(uint16 _feeRatio) external onlyOwner { require(0 <= _feeRatio && _feeRatio < 10000, "Distributions: Illegal value range"); uint16 oldFeeRatio = redeemFeeRatio; redeemFeeRatio = _feeRatio; emit RedeemFeeRatioChanged(oldFeeRatio, redeemFeeRatio); } /** * @notice Only the contract owner can call this function. * @dev Sets the HODL withdraw fee ratio. * @param _feeRatio The new HODL withdraw fee ratio. */ function setHodlWithdrawFee(uint16 _feeRatio) external onlyOwner { require(0 <= _feeRatio && _feeRatio < 10000, "Distributions: Illegal value range"); uint16 oldFeeRatio = hodlWithdrawFeeRatio; hodlWithdrawFeeRatio = _feeRatio; emit HodlWithdrawFeeRatioChanged(oldFeeRatio, hodlWithdrawFeeRatio); } /** * @notice Only the contract owner can call this function. * @dev Sets the bullet-to-reward ratio. * @param _bulletToRewardRatio The new bullet-to-reward ratio. */ function setBulletToRewardRatio(uint8 _bulletToRewardRatio) external onlyOwner { require(0 <= _bulletToRewardRatio && _bulletToRewardRatio <= 80, "Distributions: Illegal value range"); uint8 oldBulletToRewardRatio = bulletToRewardRatio; bulletToRewardRatio = _bulletToRewardRatio; emit BulletToRewardRatioChanged(oldBulletToRewardRatio, bulletToRewardRatio); } /** * @notice Only the contract owner can call this function. * @dev Sets the entry fee ratio. * @param _feeRatio The new entry fee ratio. */ function setEntryFee(uint16 _feeRatio) external onlyOwner { require(0 <= _feeRatio && _feeRatio < 10000, "Distributions: Illegal value range"); uint16 oldFeeRatio = entryFeeRatio; entryFeeRatio = _feeRatio; emit EntryFeeRatioChanged(oldFeeRatio, entryFeeRatio); } /** * @notice Only the contract owner can call this function. * @dev Sets the fee distribution percentages and recipients. * @param _percentage The array of fee distribution percentages. * @param _to The array of fee distribution recipients. */ function setFeeDistribution(uint8[] memory _percentage, address[] memory _to) external onlyOwner { require(_percentage.length == _to.length, "Distributions: Array length does not match"); uint8 sum; for (uint8 i = 0; i < _percentage.length; i++) { sum += _percentage[i]; } require(sum == 100, "Distributions: Sum of percentages is not 100"); delete feeDistribution; for (uint8 j = 0; j < _percentage.length; j++) { uint8 percentage = _percentage[j]; address to = _to[j]; Distribution memory distribution = Distribution({percentage: percentage, to: to}); feeDistribution.push(distribution); } feeDistributionLength = _percentage.length; emit FeeDistributionSet(_percentage, _to); } /** * @notice Only the contract owner can call this function. * @dev Sets the bullet distribution percentages and recipients. * @param _percentage The array of bullet distribution percentages. * @param _to The array of bullet distribution recipients. */ function setBulletDistribution(uint8[] memory _percentage, address[] memory _to) external onlyOwner { require(_percentage.length == _to.length, "Distributions: Array length does not match"); uint8 sum; for (uint8 i = 0; i < _percentage.length; i++) { sum += _percentage[i]; } require(sum == 100, "Distributions: Sum of percentages is not 100"); delete bulletDistribution; for (uint8 j = 0; j < _percentage.length; j++) { uint8 percentage = _percentage[j]; address to = _to[j]; Distribution memory distribution = Distribution({percentage: percentage, to: to}); bulletDistribution.push(distribution); } bulletDistributionLength = _percentage.length; emit BulletDistributionSet(_percentage, _to); } /** * @notice Only the contract owner can call this function. * @dev Sets the HODL withdraw fee distribution percentages and recipients. * @param _percentage The array of HODL withdraw fee distribution percentages. * @param _to The array of HODL withdraw fee distribution recipients. */ function setHodlWithdrawFeeDistribution(uint8[] memory _percentage, address[] memory _to) external onlyOwner { require(_percentage.length == _to.length, "Distributions: Array length does not match"); uint8 sum; for (uint8 i = 0; i < _percentage.length; i++) { sum += _percentage[i]; } require(sum == 100, "Distributions: Sum of percentages is not 100"); delete hodlWithdrawFeeDistribution; for (uint8 j = 0; j < _percentage.length; j++) { uint8 percentage = _percentage[j]; address to = _to[j]; Distribution memory distribution = Distribution({percentage: percentage, to: to}); hodlWithdrawFeeDistribution.push(distribution); } hodlWithdrawFeeDistributionLength = _percentage.length; emit HodlWithdrawFeeDistributionSet(_percentage, _to); } /** * @notice Get the current entry fee ratio. * @dev Provides access to the value of the `entryFeeRatio` state variable. * @return The entry fee ratio. */ function readEntryFeeRatio() public view returns (uint16) { return entryFeeRatio; } /** * @notice Get the current exercise fee ratio. * @dev Provides access to the value of the `exerciseFeeRatio` state variable. * @return The exercise fee ratio. */ function readExerciseFeeRatio() public view returns (uint16) { return exerciseFeeRatio; } /** * @notice Get the current withdrawal fee ratio. * @dev Provides access to the value of the `withdrawFeeRatio` state variable. * @return The withdraw fee ratio. */ function readWithdrawFeeRatio() public view returns (uint16) { return withdrawFeeRatio; } /** * @notice Get the current redeem fee ratio. * @dev Provides access to the value of the `redeemFeeRatio` state variable. * @return The redeem fee ratio. */ function readRedeemFeeRatio() public view returns (uint16) { return redeemFeeRatio; } /** * @notice Get the current bullet-to-reward ratio. * @dev Provides access to the value of the `bulletToRewardRatio` state variable. * @return The bullet-to-reward ratio. */ function readBulletToRewardRatio() public view returns (uint16) { return bulletToRewardRatio; } /** * @notice Get the current length of the fee distribution array. * @dev Provides access to the value of the `feeDistributionLength` state variable. * @return The length of the fee distribution array. */ function readFeeDistributionLength() public view returns (uint256) { return feeDistributionLength; } /** * @notice Get the fee distribution at the given index. * @dev Provides access to the `feeDistribution` array at a given index `i`. * @param i The index of the fee distribution. * @return percentage The percentage of the fee distribution. * @return to The recipient of the fee distribution. */ function readFeeDistribution(uint256 i) public view returns (uint8 percentage, address to) { percentage = feeDistribution[i].percentage; to = feeDistribution[i].to; } /** * @notice Get the current length of the bullet distribution array. * @dev Provides access to the value of the `bulletDistributionLength` state variable. * @return The length of the bullet distribution array. */ function readBulletDistributionLength() public view returns (uint256) { return bulletDistributionLength; } /** * @notice Get the bullet distribution at the given index. * @dev Provides access to the `bulletDistribution` array at a given index `i`. * @param i The index of the bullet distribution. * @return percentage The percentage of the bullet distribution. * @return to The recipient of the bullet distribution. */ function readBulletDistribution(uint256 i) public view returns (uint8 percentage, address to) { percentage = bulletDistribution[i].percentage; to = bulletDistribution[i].to; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.4; /** * @title IDistributions interface * @author DeOrderBook * @custom:license Copyright (c) DeOrderBook, 2023 — All Rights Reserved * @dev Interface for managing fee and reward distributions */ interface IDistributions { /** * @notice Get the entry fee ratio * @dev Returns the current entry fee ratio in basis points (i.e., parts per 10,000) * @return The current entry fee ratio */ function readEntryFeeRatio() external view returns (uint16); /** * @notice Get the exercise fee ratio * @dev Returns the current exercise fee ratio in basis points (i.e., parts per 10,000) * @return The current exercise fee ratio */ function readExerciseFeeRatio() external view returns (uint16); /** * @notice Get the withdraw fee ratio * @dev Returns the current withdraw fee ratio in basis points (i.e., parts per 10,000) * @return The current withdraw fee ratio */ function readWithdrawFeeRatio() external view returns (uint16); /** * @notice Get the redeem fee ratio * @dev Returns the current redeem fee ratio in basis points (i.e., parts per 10,000) * @return The current redeem fee ratio */ function readRedeemFeeRatio() external view returns (uint16); /** * @notice Get the BULLET-to-reward ratio * @dev Returns the current BULLET-to-reward ratio in percentage points (i.e., parts per 100) * @return The current BULLET-to-reward ratio */ function readBulletToRewardRatio() external view returns (uint16); /** * @notice Get the number of fee distribution targets * @dev Returns the number of fee distribution targets * @return The number of fee distribution targets */ function readFeeDistributionLength() external view returns (uint256); /** * @notice Get the fee distribution target at the specified index * @dev Returns the fee distribution target at the specified index * @param i The index of the fee distribution target to retrieve * @return The fee distribution target at the specified index as a tuple (fee ratio, target address) */ function readFeeDistribution(uint256 i) external view returns (uint8, address); /** * @notice Get the number of BULLET distribution targets * @dev Returns the number of BULLET distribution targets * @return The number of BULLET distribution targets */ function readBulletDistributionLength() external view returns (uint256); /** * @notice Get the BULLET distribution target at the specified index * @dev Returns the BULLET distribution target at the specified index * @param i The index of the BULLET distribution target to retrieve * @return The BULLET distribution target at the specified index as a tuple (distribution ratio, target address) */ function readBulletDistribution(uint256 i) external view returns (uint8, address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /* * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
[{"inputs":[{"internalType":"address","name":"underlyingTokenAddress","type":"address"},{"internalType":"address","name":"distributionsAddress","type":"address"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint256","name":"_conversionRate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"NFTAddress","outputs":[{"internalType":"contract ERC721","name":"","type":"address"}],"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":"amount","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":[],"name":"conversionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributions","outputs":[{"internalType":"contract Distributions","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isCheckNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isCheckNFT","type":"bool"},{"internalType":"contract ERC721","name":"_nftAddress","type":"address"}],"name":"setIsCheckNFT","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":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","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"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162001d8e38038062001d8e833981016040819052620000349162000235565b60408051808201909152600a808252692427a226102a37b5b2b760b11b6020830190815286929185916200006c916003919062000172565b5080516200008290600490602084019062000172565b50505060601b6001600160601b031916608052620000a7620000a13390565b62000120565b6001600160a01b038416620001025760405162461bcd60e51b815260206004820152601760248201527f484f444c546f6b656e3a207a65726f2061646472657373000000000000000000604482015260640160405180910390fd5b60609290921b6001600160601b03191660a05250600755506200038c565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001809062000339565b90600052602060002090601f016020900481019282620001a45760008555620001ef565b82601f10620001bf57805160ff1916838001178555620001ef565b82800160010185558215620001ef579182015b82811115620001ef578251825591602001919060010190620001d2565b50620001fd92915062000201565b5090565b5b80821115620001fd576000815560010162000202565b80516001600160a01b03811681146200023057600080fd5b919050565b600080600080608085870312156200024b578384fd5b620002568562000218565b935060206200026781870162000218565b60408701519094506001600160401b038082111562000284578485fd5b818801915088601f83011262000298578485fd5b815181811115620002ad57620002ad62000376565b604051601f8201601f19908116603f01168101908382118183101715620002d857620002d862000376565b816040528281528b86848701011115620002f0578788fd5b8793505b82841015620003135784840186015181850187015292850192620002f4565b828411156200032457878684830101525b60609a909a0151989b979a5050505050505050565b600181811c908216806200034e57607f821691505b602082108114156200037057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c6119b3620003db600039600081816103630152818161055a015281816106770152610735015260008181610263015281816107f00152610a1501526119b36000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806370a08231116100c3578063a9059cbb1161007c578063a9059cbb146102eb578063aa545300146102fe578063b6b55f2514610312578063dd62ed3e14610325578063e4e940f01461035e578063f2fde38b1461038557600080fd5b806370a0823114610285578063715018a6146102ae5780637ffdf53e146102b65780638da5cb5b146102bf57806395d89b41146102d0578063a457c2d7146102d857600080fd5b80632e1a7d4d116101155780632e1a7d4d146101eb5780632f4f21e2146101fe578063310c87cc14610211578063313ce5671461023c578063395093511461024b5780636f307dc31461025e57600080fd5b80630184bf901461015d57806306fdde0314610172578063095ea7b31461019057806318160ddd146101b3578063205c2878146101c557806323b872dd146101d8575b600080fd5b61017061016b36600461163e565b610398565b005b61017a6104a3565b60405161018791906116fc565b60405180910390f35b6101a361019e3660046115f7565b610535565b6040519015158152602001610187565b6002545b604051908152602001610187565b6101a36101d33660046115f7565b61054c565b6101a36101e63660046115b7565b610824565b6101a36101f936600461167d565b6108d0565b6101a361020c3660046115f7565b610972565b600654610224906001600160a01b031681565b6040516001600160a01b039091168152602001610187565b60405160128152602001610187565b6101a36102593660046115f7565b610a66565b6102247f000000000000000000000000000000000000000000000000000000000000000081565b6101b7610293366004611563565b6001600160a01b031660009081526020819052604090205490565b610170610aa2565b6101b760075481565b6005546001600160a01b0316610224565b61017a610ad8565b6101a36102e63660046115f7565b610ae7565b6101a36102f93660046115f7565b610b76565b6005546101a390600160a01b900460ff1681565b6101a361032036600461167d565b610b83565b6101b761033336600461157f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102247f000000000000000000000000000000000000000000000000000000000000000081565b610170610393366004611563565b610b8f565b6005546001600160a01b031633146103cb5760405162461bcd60e51b81526004016103c29061172f565b60405180910390fd5b8115610484576001600160a01b0381166104275760405162461bcd60e51b815260206004820152601b60248201527f484f444c546f6b656e3a204e4654207a65726f2061646472657373000000000060448201526064016103c2565b803b806104675760405162461bcd60e51b815260206004820152600e60248201526d139bdd08184818dbdb9d1c9858dd60921b60448201526064016103c2565b50600680546001600160a01b0319166001600160a01b0383161790555b5060058054911515600160a01b0260ff60a01b19909216919091179055565b6060600380546104b2906118e9565b80601f01602080910402602001604051908101604052809291908181526020018280546104de906118e9565b801561052b5780601f106105005761010080835404028352916020019161052b565b820191906000526020600020905b81548152906001019060200180831161050e57829003601f168201915b5050505050905090565b6000610542338484610c2a565b5060015b92915050565b6000806105fa6127106105f47f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ffda6e376040518163ffffffff1660e01b815260040160206040518083038186803b1580156105b157600080fd5b505afa1580156105c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e9919061165b565b869061ffff16610d4f565b90610d5b565b9050600061061a600754600a61061091906117df565b6105f48685610d67565b9050600061064a61063a600754600a61063391906117df565b8490610d4f565b6106448786610d67565b90610d67565b905060006106588483610d73565b905060006106668783610d67565b90506106723382610d7f565b60005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166349ee1fd56040518163ffffffff1660e01b815260040160206040518083038186803b1580156106ce57600080fd5b505afa1580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190611695565b8160ff1610156107ea57604051631c4c66a960e11b815260ff8216600482015260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633898cd5290602401604080518083038186803b15801561077657600080fd5b505afa15801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae91906116ad565b915091506107d5306107bd3390565b836107d060646105f48b60ff8a16610d4f565b610eca565b505080806107e290611924565b915050610675565b506108167f00000000000000000000000000000000000000000000000000000000000000008986610f3b565b506001979650505050505050565b6000610831848484610f6b565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156108b65760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016103c2565b6108c38533858403610c2a565b60019150505b9392505050565b60003361091f5760405162461bcd60e51b815260206004820152601760248201527f484f444c546f6b656e3a207a65726f206164647265737300000000000000000060448201526064016103c2565b600082116109685760405162461bcd60e51b81526020600482015260166024820152751213d113151bdad95b8e881e995c9bc8185b5bdd5b9d60521b60448201526064016103c2565b610542338361054c565b60008082116109bc5760405162461bcd60e51b81526020600482015260166024820152751213d113151bdad95b8e881e995c9bc8185b5bdd5b9d60521b60448201526064016103c2565b6109c4611139565b610a105760405162461bcd60e51b815260206004820152601e60248201527f484f444c546f6b656e3a20796f7520646f206e6f742068617665204e4654000060448201526064016103c2565b610a3c7f0000000000000000000000000000000000000000000000000000000000000000333085610eca565b6000610a50600754600a61063391906117df565b9050610a5c84826111e8565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610542918590610a9d908690611764565b610c2a565b6005546001600160a01b03163314610acc5760405162461bcd60e51b81526004016103c29061172f565b610ad660006112c7565b565b6060600480546104b2906118e9565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610b695760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103c2565b610a5c3385858403610c2a565b6000610542338484610f6b565b60006105423383610972565b6005546001600160a01b03163314610bb95760405162461bcd60e51b81526004016103c29061172f565b6001600160a01b038116610c1e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c2565b610c27816112c7565b50565b6001600160a01b038316610c8c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103c2565b6001600160a01b038216610ced5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103c2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006108c98284611887565b60006108c9828461177c565b60006108c982846118a6565b60006108c98284611764565b6001600160a01b038216610ddf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103c2565b6001600160a01b03821660009081526020819052604090205481811015610e535760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103c2565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610e829084906118a6565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610d42565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f359085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611319565b50505050565b6040516001600160a01b038316602482015260448101829052610ec590849063a9059cbb60e01b90606401610efe565b6001600160a01b038316610fcf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103c2565b6001600160a01b0382166110315760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103c2565b6001600160a01b038316600090815260208190526040902054818110156110a95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103c2565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906110e0908490611764565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161112c91815260200190565b60405180910390a3610f35565b600554600090600160a01b900460ff16156111e2576006546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561119257600080fd5b505afa1580156111a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ca9190611695565b905080156111da57600191505090565b600091505090565b50600190565b6001600160a01b03821661123e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103c2565b80600260008282546112509190611764565b90915550506001600160a01b0382166000908152602081905260408120805483929061127d908490611764565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061136e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113eb9092919063ffffffff16565b805190915015610ec5578080602001905181019061138c9190611622565b610ec55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103c2565b60606113fa8484600085611402565b949350505050565b6060824710156114635760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103c2565b843b6114b15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103c2565b600080866001600160a01b031685876040516114cd91906116e0565b60006040518083038185875af1925050503d806000811461150a576040519150601f19603f3d011682016040523d82523d6000602084013e61150f565b606091505b509150915061151f82828661152a565b979650505050505050565b606083156115395750816108c9565b8251156115495782518084602001fd5b8160405162461bcd60e51b81526004016103c291906116fc565b600060208284031215611574578081fd5b81356108c98161195a565b60008060408385031215611591578081fd5b823561159c8161195a565b915060208301356115ac8161195a565b809150509250929050565b6000806000606084860312156115cb578081fd5b83356115d68161195a565b925060208401356115e68161195a565b929592945050506040919091013590565b60008060408385031215611609578182fd5b82356116148161195a565b946020939093013593505050565b600060208284031215611633578081fd5b81516108c98161196f565b60008060408385031215611650578182fd5b823561159c8161196f565b60006020828403121561166c578081fd5b815161ffff811681146108c9578182fd5b60006020828403121561168e578081fd5b5035919050565b6000602082840312156116a6578081fd5b5051919050565b600080604083850312156116bf578182fd5b825160ff811681146116cf578283fd5b60208401519092506115ac8161195a565b600082516116f28184602087016118bd565b9190910192915050565b602081526000825180602084015261171b8160408501602087016118bd565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561177757611777611944565b500190565b60008261179757634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156117d75781600019048211156117bd576117bd611944565b808516156117ca57918102915b93841c93908002906117a1565b509250929050565b60006108c983836000826117f557506001610546565b8161180257506000610546565b816001811461181857600281146118225761183e565b6001915050610546565b60ff84111561183357611833611944565b50506001821b610546565b5060208310610133831016604e8410600b8410161715611861575081810a610546565b61186b838361179c565b806000190482111561187f5761187f611944565b029392505050565b60008160001904831182151516156118a1576118a1611944565b500290565b6000828210156118b8576118b8611944565b500390565b60005b838110156118d85781810151838201526020016118c0565b83811115610f355750506000910152565b600181811c908216806118fd57607f821691505b6020821081141561191e57634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff81141561193b5761193b611944565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c2757600080fd5b8015158114610c2757600080fdfea26469706673582212202779e4ce5b79c22113f77035e5d20adabf6b3f51b58e19119fa445febd5f9b3d64736f6c63430008040033000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000349660bc15df1da5d31c1ee8abcef76f051949620000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000575484f444c000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c806370a08231116100c3578063a9059cbb1161007c578063a9059cbb146102eb578063aa545300146102fe578063b6b55f2514610312578063dd62ed3e14610325578063e4e940f01461035e578063f2fde38b1461038557600080fd5b806370a0823114610285578063715018a6146102ae5780637ffdf53e146102b65780638da5cb5b146102bf57806395d89b41146102d0578063a457c2d7146102d857600080fd5b80632e1a7d4d116101155780632e1a7d4d146101eb5780632f4f21e2146101fe578063310c87cc14610211578063313ce5671461023c578063395093511461024b5780636f307dc31461025e57600080fd5b80630184bf901461015d57806306fdde0314610172578063095ea7b31461019057806318160ddd146101b3578063205c2878146101c557806323b872dd146101d8575b600080fd5b61017061016b36600461163e565b610398565b005b61017a6104a3565b60405161018791906116fc565b60405180910390f35b6101a361019e3660046115f7565b610535565b6040519015158152602001610187565b6002545b604051908152602001610187565b6101a36101d33660046115f7565b61054c565b6101a36101e63660046115b7565b610824565b6101a36101f936600461167d565b6108d0565b6101a361020c3660046115f7565b610972565b600654610224906001600160a01b031681565b6040516001600160a01b039091168152602001610187565b60405160128152602001610187565b6101a36102593660046115f7565b610a66565b6102247f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6101b7610293366004611563565b6001600160a01b031660009081526020819052604090205490565b610170610aa2565b6101b760075481565b6005546001600160a01b0316610224565b61017a610ad8565b6101a36102e63660046115f7565b610ae7565b6101a36102f93660046115f7565b610b76565b6005546101a390600160a01b900460ff1681565b6101a361032036600461167d565b610b83565b6101b761033336600461157f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102247f000000000000000000000000349660bc15df1da5d31c1ee8abcef76f0519496281565b610170610393366004611563565b610b8f565b6005546001600160a01b031633146103cb5760405162461bcd60e51b81526004016103c29061172f565b60405180910390fd5b8115610484576001600160a01b0381166104275760405162461bcd60e51b815260206004820152601b60248201527f484f444c546f6b656e3a204e4654207a65726f2061646472657373000000000060448201526064016103c2565b803b806104675760405162461bcd60e51b815260206004820152600e60248201526d139bdd08184818dbdb9d1c9858dd60921b60448201526064016103c2565b50600680546001600160a01b0319166001600160a01b0383161790555b5060058054911515600160a01b0260ff60a01b19909216919091179055565b6060600380546104b2906118e9565b80601f01602080910402602001604051908101604052809291908181526020018280546104de906118e9565b801561052b5780601f106105005761010080835404028352916020019161052b565b820191906000526020600020905b81548152906001019060200180831161050e57829003601f168201915b5050505050905090565b6000610542338484610c2a565b5060015b92915050565b6000806105fa6127106105f47f000000000000000000000000349660bc15df1da5d31c1ee8abcef76f051949626001600160a01b031663ffda6e376040518163ffffffff1660e01b815260040160206040518083038186803b1580156105b157600080fd5b505afa1580156105c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e9919061165b565b869061ffff16610d4f565b90610d5b565b9050600061061a600754600a61061091906117df565b6105f48685610d67565b9050600061064a61063a600754600a61063391906117df565b8490610d4f565b6106448786610d67565b90610d67565b905060006106588483610d73565b905060006106668783610d67565b90506106723382610d7f565b60005b7f000000000000000000000000349660bc15df1da5d31c1ee8abcef76f051949626001600160a01b03166349ee1fd56040518163ffffffff1660e01b815260040160206040518083038186803b1580156106ce57600080fd5b505afa1580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190611695565b8160ff1610156107ea57604051631c4c66a960e11b815260ff8216600482015260009081906001600160a01b037f000000000000000000000000349660bc15df1da5d31c1ee8abcef76f051949621690633898cd5290602401604080518083038186803b15801561077657600080fd5b505afa15801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae91906116ad565b915091506107d5306107bd3390565b836107d060646105f48b60ff8a16610d4f565b610eca565b505080806107e290611924565b915050610675565b506108167f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488986610f3b565b506001979650505050505050565b6000610831848484610f6b565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156108b65760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016103c2565b6108c38533858403610c2a565b60019150505b9392505050565b60003361091f5760405162461bcd60e51b815260206004820152601760248201527f484f444c546f6b656e3a207a65726f206164647265737300000000000000000060448201526064016103c2565b600082116109685760405162461bcd60e51b81526020600482015260166024820152751213d113151bdad95b8e881e995c9bc8185b5bdd5b9d60521b60448201526064016103c2565b610542338361054c565b60008082116109bc5760405162461bcd60e51b81526020600482015260166024820152751213d113151bdad95b8e881e995c9bc8185b5bdd5b9d60521b60448201526064016103c2565b6109c4611139565b610a105760405162461bcd60e51b815260206004820152601e60248201527f484f444c546f6b656e3a20796f7520646f206e6f742068617665204e4654000060448201526064016103c2565b610a3c7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48333085610eca565b6000610a50600754600a61063391906117df565b9050610a5c84826111e8565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610542918590610a9d908690611764565b610c2a565b6005546001600160a01b03163314610acc5760405162461bcd60e51b81526004016103c29061172f565b610ad660006112c7565b565b6060600480546104b2906118e9565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610b695760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103c2565b610a5c3385858403610c2a565b6000610542338484610f6b565b60006105423383610972565b6005546001600160a01b03163314610bb95760405162461bcd60e51b81526004016103c29061172f565b6001600160a01b038116610c1e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c2565b610c27816112c7565b50565b6001600160a01b038316610c8c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103c2565b6001600160a01b038216610ced5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103c2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006108c98284611887565b60006108c9828461177c565b60006108c982846118a6565b60006108c98284611764565b6001600160a01b038216610ddf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103c2565b6001600160a01b03821660009081526020819052604090205481811015610e535760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103c2565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610e829084906118a6565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610d42565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f359085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611319565b50505050565b6040516001600160a01b038316602482015260448101829052610ec590849063a9059cbb60e01b90606401610efe565b6001600160a01b038316610fcf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103c2565b6001600160a01b0382166110315760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103c2565b6001600160a01b038316600090815260208190526040902054818110156110a95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103c2565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906110e0908490611764565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161112c91815260200190565b60405180910390a3610f35565b600554600090600160a01b900460ff16156111e2576006546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561119257600080fd5b505afa1580156111a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ca9190611695565b905080156111da57600191505090565b600091505090565b50600190565b6001600160a01b03821661123e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103c2565b80600260008282546112509190611764565b90915550506001600160a01b0382166000908152602081905260408120805483929061127d908490611764565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061136e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113eb9092919063ffffffff16565b805190915015610ec5578080602001905181019061138c9190611622565b610ec55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103c2565b60606113fa8484600085611402565b949350505050565b6060824710156114635760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103c2565b843b6114b15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103c2565b600080866001600160a01b031685876040516114cd91906116e0565b60006040518083038185875af1925050503d806000811461150a576040519150601f19603f3d011682016040523d82523d6000602084013e61150f565b606091505b509150915061151f82828661152a565b979650505050505050565b606083156115395750816108c9565b8251156115495782518084602001fd5b8160405162461bcd60e51b81526004016103c291906116fc565b600060208284031215611574578081fd5b81356108c98161195a565b60008060408385031215611591578081fd5b823561159c8161195a565b915060208301356115ac8161195a565b809150509250929050565b6000806000606084860312156115cb578081fd5b83356115d68161195a565b925060208401356115e68161195a565b929592945050506040919091013590565b60008060408385031215611609578182fd5b82356116148161195a565b946020939093013593505050565b600060208284031215611633578081fd5b81516108c98161196f565b60008060408385031215611650578182fd5b823561159c8161196f565b60006020828403121561166c578081fd5b815161ffff811681146108c9578182fd5b60006020828403121561168e578081fd5b5035919050565b6000602082840312156116a6578081fd5b5051919050565b600080604083850312156116bf578182fd5b825160ff811681146116cf578283fd5b60208401519092506115ac8161195a565b600082516116f28184602087016118bd565b9190910192915050565b602081526000825180602084015261171b8160408501602087016118bd565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561177757611777611944565b500190565b60008261179757634e487b7160e01b81526012600452602481fd5b500490565b600181815b808511156117d75781600019048211156117bd576117bd611944565b808516156117ca57918102915b93841c93908002906117a1565b509250929050565b60006108c983836000826117f557506001610546565b8161180257506000610546565b816001811461181857600281146118225761183e565b6001915050610546565b60ff84111561183357611833611944565b50506001821b610546565b5060208310610133831016604e8410600b8410161715611861575081810a610546565b61186b838361179c565b806000190482111561187f5761187f611944565b029392505050565b60008160001904831182151516156118a1576118a1611944565b500290565b6000828210156118b8576118b8611944565b500390565b60005b838110156118d85781810151838201526020016118c0565b83811115610f355750506000910152565b600181811c908216806118fd57607f821691505b6020821081141561191e57634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff81141561193b5761193b611944565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c2757600080fd5b8015158114610c2757600080fdfea26469706673582212202779e4ce5b79c22113f77035e5d20adabf6b3f51b58e19119fa445febd5f9b3d64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000349660bc15df1da5d31c1ee8abcef76f051949620000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000575484f444c000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : underlyingTokenAddress (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [1] : distributionsAddress (address): 0x349660BC15DF1DA5D31C1Ee8abcef76f05194962
Arg [2] : symbol_ (string): uHODL
Arg [3] : _conversionRate (uint256): 12
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [1] : 000000000000000000000000349660bc15df1da5d31c1ee8abcef76f05194962
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 75484f444c000000000000000000000000000000000000000000000000000000
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $1 | 512,722.0783 | $512,722.08 |
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.
Address QR Code
My Address - Private Name Tag or Note
My Name Tag:
Private Note:
Please DO NOT store any passwords or private keys here.
The compiled contract might be susceptible to FullInlinerNonExpressionSplitArgumentEvaluationOrder (low-severity), MissingSideEffectsOnSelectorAccess (low-severity), AbiReencodingHeadOverflowWithStaticArrayCleanup (medium-severity), DirtyBytesArrayToStorage (low-severity), DataLocationChangeInInternalOverride (very low-severity), NestedCalldataArrayAbiReencodingSizeValidation (very low-severity), SignedImmutables (very low-severity) Solidity Compiler Bugs.
Connect a Wallet
Connect a Wallet
Connect a Wallet
Address Cards
Before You Copy
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.