Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 27,139 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Get Token Reward | 21754277 | 14 hrs ago | IN | 0 ETH | 0.00044312 | ||||
Get Token Reward | 21753667 | 16 hrs ago | IN | 0 ETH | 0.00023663 | ||||
Get Token Reward | 21750713 | 26 hrs ago | IN | 0 ETH | 0.00010776 | ||||
Get Token Reward | 21750713 | 26 hrs ago | IN | 0 ETH | 0.00015708 | ||||
Get Token Reward | 21750427 | 27 hrs ago | IN | 0 ETH | 0.00013686 | ||||
Get Token Reward | 21742833 | 2 days ago | IN | 0 ETH | 0.00014389 | ||||
Get Token Reward | 21740528 | 2 days ago | IN | 0 ETH | 0.00019895 | ||||
Get Token Reward | 21738131 | 2 days ago | IN | 0 ETH | 0.00058232 | ||||
Get Token Reward | 21737638 | 2 days ago | IN | 0 ETH | 0.0003588 | ||||
Get Token Reward | 21737507 | 2 days ago | IN | 0 ETH | 0.0002633 | ||||
Get Token Reward | 21732090 | 3 days ago | IN | 0 ETH | 0.0003067 | ||||
Get Token Reward | 21732087 | 3 days ago | IN | 0 ETH | 0.00037861 | ||||
Get Token Reward | 21731693 | 3 days ago | IN | 0 ETH | 0.00032379 | ||||
Get Token Reward | 21730926 | 3 days ago | IN | 0 ETH | 0.00048314 | ||||
Get Token Reward | 21729986 | 3 days ago | IN | 0 ETH | 0.00018527 | ||||
Get Token Reward | 21727473 | 4 days ago | IN | 0 ETH | 0.00017423 | ||||
Get Token Reward | 21721346 | 5 days ago | IN | 0 ETH | 0.00029104 | ||||
Get Token Reward | 21712264 | 6 days ago | IN | 0 ETH | 0.00052596 | ||||
Get Token Reward | 21712263 | 6 days ago | IN | 0 ETH | 0.00050811 | ||||
Get Token Reward | 21711382 | 6 days ago | IN | 0 ETH | 0.00058823 | ||||
Get Token Reward | 21710724 | 6 days ago | IN | 0 ETH | 0.0005536 | ||||
Get Token Reward | 21709397 | 6 days ago | IN | 0 ETH | 0.00029393 | ||||
Get Token Reward | 21708186 | 7 days ago | IN | 0 ETH | 0.00026856 | ||||
Get Token Reward | 21704379 | 7 days ago | IN | 0 ETH | 0.00046684 | ||||
Get Token Reward | 21699311 | 8 days ago | IN | 0 ETH | 0.00036262 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
YieldHub
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.6.12; import "IERC20.sol"; import "ERC20.sol"; import "IERC721.sol"; import "IERC1155.sol"; import "SafeMath.sol"; import "Ownable.sol"; /* * ,_, * (',') * {/"\} * -"-"- */ interface IMintable20 is IERC20 { function mint(address _user, uint256 _amount) external; function burnFrom(address _from, uint256 _amount) external; } interface IMintable1155 is IERC1155 { function mint(address _to, uint256 _tokenId, uint256 _amount) external; } interface IKongz is IERC721 { function balanceOG(address _user) external view returns(uint256); } contract YieldHub is Ownable { using SafeMath for uint256; struct YieldToken { uint8 stake; uint8 issuanceType; // mint/transfer uint32 tokenType; // erc20/erc1155 uint256 tokenId; uint256 start; uint256 end; uint256 rate; } struct UserData { uint256 rewards; uint256 lastUpdate; } IKongz public constant kongzContract = IKongz(0x57a204AA1042f6E66DD7730813f4024114d74f37); address public newNana; mapping(address => YieldToken) public yieldTokens; mapping(uint256 => address) public indexToAddress; uint256 public yieldTokenCount; // user => token => user data mapping(address => mapping(address => UserData)) public userData; /////////// // admin // /////////// function updateBanana(address _nana) external onlyOwner { newNana = _nana; } function addNewToken( address _token, uint256 _start, uint256 _end, uint256 _tokenType, // erc20/erc1155 uint256 _tokenId, uint256 _rate, uint256 _issuanceType, // mint/transfer uint256 _stake ) external onlyOwner { require(_start > 0); require(_token != address(0)); require(_tokenType == 20 || _tokenType == 1155); require(_issuanceType <= 1); require(_stake <= 2); require(_start > yieldTokens[_token].end); indexToAddress[yieldTokenCount++] = _token; yieldTokens[_token] = YieldToken({ stake: uint8(_stake), tokenType: uint32(_tokenType), issuanceType: uint8(_issuanceType), tokenId: _tokenId, start: _start, end: _end, rate: _rate }); } function removeToken(address _token) external onlyOwner { require(block.timestamp >= yieldTokens[_token].end, "Can't remove token"); uint256 count = yieldTokenCount; for (uint256 i = 0; i < count; i++) { if (_token == indexToAddress[i]) { if (i + 1 != count) { indexToAddress[i] = indexToAddress[count - 1]; } yieldTokenCount--; delete indexToAddress[count - 1]; } } } /////////////////////// // User interactions // /////////////////////// function getTokenReward(address _token) public { uint256 balOf = kongzContract.balanceOf(msg.sender); uint256 balOg = kongzContract.balanceOG(msg.sender); updateUserToken(msg.sender, _token, balOf, balOg); _getReward(_token, msg.sender); } function getTotalClaimable(address _user, address _token) external view returns(uint256) { UserData memory data = userData[_user][_token]; YieldToken memory yieldToken = yieldTokens[_token]; uint256 time = min(block.timestamp, yieldToken.end); uint256 bal; uint256 delta = time.sub(max(data.lastUpdate, yieldToken.start)); if (yieldToken.stake == uint8(0)) bal = kongzContract.balanceOG(_user); else if (yieldToken.stake == uint8(1)) bal = kongzContract.balanceOf(_user); else if (yieldToken.stake == uint8(2)) bal = kongzContract.balanceOf(_user) - kongzContract.balanceOG(_user); uint256 pending = bal.mul(yieldToken.rate.mul(delta)).div(86400); return data.rewards + pending; } function getReward(address _user) public { require(msg.sender == address(kongzContract), "!kongz contract"); uint256 balOf = kongzContract.balanceOf(msg.sender); uint256 balOg = kongzContract.balanceOG(msg.sender); updateUserToken(_user, newNana, balOf, balOg); _getReward(newNana, _user); } // called on transfers function updateReward(address _from, address _to, uint256 _tokenId) external { require(msg.sender == address(kongzContract), "!kongz caller"); uint256 tokensFarmed = yieldTokenCount; updateUser(_from, tokensFarmed); if (_to != address(0)) updateUser(_to, tokensFarmed); } //////////// // helper // //////////// function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } function updateUser(address _user, uint256 _tokensFarmed) internal { uint256 balOf = kongzContract.balanceOf(_user); uint256 balOg = kongzContract.balanceOG(_user); for (uint256 i = 0; i < _tokensFarmed; i++) updateUserToken(_user, indexToAddress[i], balOf, balOg); } function updateUserToken(address _user, address _token, uint256 _balOf, uint256 _balOg) internal { YieldToken memory yieldToken = yieldTokens[_token]; UserData storage _userData = userData[_user][_token]; if (block.timestamp > yieldToken.start) { uint256 trueLastUpdate = _userData.lastUpdate; uint256 userLastUpdate = trueLastUpdate; uint256 time = min(yieldToken.end, block.timestamp); uint256 delta; userLastUpdate = max(userLastUpdate, yieldToken.start); delta = time.sub(userLastUpdate); if (userLastUpdate > 0 && delta > 0) { if (yieldToken.stake == uint8(0)) _userData.rewards += _balOg.mul(yieldToken.rate).mul(delta).div(86400); else if (yieldToken.stake == uint8(1)) _userData.rewards += _balOf.mul(yieldToken.rate).mul(delta).div(86400); else if (yieldToken.stake == uint8(2)) _userData.rewards += _balOf.sub(_balOg).mul(yieldToken.rate).mul(delta).div(86400); } if (trueLastUpdate < time) _userData.lastUpdate = time; } } function _getReward(address _token, address _user) internal { YieldToken memory yieldToken = yieldTokens[_token]; require(yieldToken.start > 0); UserData storage _userData = userData[_user][_token]; uint256 amount = _userData.rewards; if (amount == 0) return; uint256 tokenType = uint256(yieldToken.tokenType); _userData.rewards = 0; if (tokenType == 20) { if (yieldToken.issuanceType == 0) // mint IMintable20(_token).mint(_user, amount); else IERC20(_token).transfer(_user, amount); } else if (tokenType == 1155) { if (yieldToken.issuanceType == 0) // mint IMintable1155(_token).mint(_user, yieldToken.tokenId, amount); else IERC1155(_token).safeTransferFrom(address(this), _user, yieldToken.tokenId, amount, ""); } } // needs to burn new banana function burn(address _from, uint256 _amount) external { require(msg.sender == address(kongzContract), "!kongz contract"); IMintable20(newNana).burnFrom(_from, _amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.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.6.0; import "Context.sol"; import "IERC20.sol"; import "SafeMath.sol"; import "Address.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 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view 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 {_setupDecimals} is * called. * * 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 returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view 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); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); 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].add(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) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is 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); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(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 * * - `to` 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 = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(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); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(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 Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @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 to 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 { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @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 in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "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.6.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.6.2; import "IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "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. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"},{"internalType":"uint256","name":"_tokenType","type":"uint256"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_issuanceType","type":"uint256"},{"internalType":"uint256","name":"_stake","type":"uint256"}],"name":"addNewToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getTokenReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"getTotalClaimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"indexToAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kongzContract","outputs":[{"internalType":"contract IKongz","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newNana","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nana","type":"address"}],"name":"updateBanana","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"updateReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userData","outputs":[{"internalType":"uint256","name":"rewards","type":"uint256"},{"internalType":"uint256","name":"lastUpdate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yieldTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"yieldTokens","outputs":[{"internalType":"uint8","name":"stake","type":"uint8"},{"internalType":"uint8","name":"issuanceType","type":"uint8"},{"internalType":"uint32","name":"tokenType","type":"uint32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b6119f38061007d6000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063c00007b011610071578063c00007b0146102dc578063c6cf7c5f14610302578063e61ca8191461036b578063f2fde38b14610388578063fea99c4b146103ae5761010b565b80638da5cb5b1461024f5780639787d6a0146102575780639dc29fac146102a8578063a197e026146102d45761010b565b8063715018a6116100de578063715018a6146101d4578063768e5b27146101dc57806377c3858714610223578063785c9872146102475761010b565b80632c8e8dfa14610110578063476ea95e146101485780635dd95376146101885780635fa7b584146101ae575b600080fd5b6101466004803603606081101561012657600080fd5b506001600160a01b038135811691602081013590911690604001356103d4565b005b6101766004803603604081101561015e57600080fd5b506001600160a01b0381358116916020013516610452565b60408051918252519081900360200190f35b6101466004803603602081101561019e57600080fd5b50356001600160a01b031661078f565b610146600480360360208110156101c457600080fd5b50356001600160a01b0316610809565b610146610971565b61020a600480360360408110156101f257600080fd5b506001600160a01b0381358116916020013516610a13565b6040805192835260208301919091528051918290030190f35b61022b610a37565b604080516001600160a01b039092168252519081900360200190f35b61022b610a46565b61022b610a58565b610146600480360361010081101561026e57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c08101359060e00135610a67565b610146600480360360408110156102be57600080fd5b506001600160a01b038135169060200135610c21565b610176610ce6565b610146600480360360208110156102f257600080fd5b50356001600160a01b0316610cec565b6103286004803603602081101561031857600080fd5b50356001600160a01b0316610e6a565b6040805160ff988916815296909716602087015263ffffffff909416858701526060850192909252608084015260a083015260c082015290519081900360e00190f35b61022b6004803603602081101561038157600080fd5b5035610eb4565b6101466004803603602081101561039e57600080fd5b50356001600160a01b0316610ecf565b610146600480360360208110156103c457600080fd5b50356001600160a01b0316610fc7565b3360008051602061199e83398151915214610426576040805162461bcd60e51b815260206004820152600d60248201526c10b5b7b733bd1031b0b63632b960991b604482015290519081900360640190fd5b60045461043384826110d7565b6001600160a01b0383161561044c5761044c83826110d7565b50505050565b600061045c6118d3565b506001600160a01b03808416600090815260056020908152604080832093861683529281529082902082518084019093528054835260010154908201526104a16118ed565b506001600160a01b0383166000908152600260208181526040808420815160e081018352815460ff8082168352610100820416948201949094526201000090930463ffffffff169183019190915260018101546060830152918201546080820152600382015460a0820181905260049092015460c08201529190610526904290611227565b90506000806105476105408660200151866080015161123f565b849061124e565b845190915060ff166105da57604080516338712d8d60e01b81526001600160a01b038a166004820152905160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b1580156105a757600080fd5b505afa1580156105bb573d6000803e3d6000fd5b505050506040513d60208110156105d157600080fd5b5051915061074c565b835160ff166001141561063b57604080516370a0823160e01b81526001600160a01b038a166004820152905160008051602061199e833981519152916370a08231916024808301926020929190829003018186803b1580156105a757600080fd5b835160ff166002141561074c57604080516338712d8d60e01b81526001600160a01b038a166004820152905160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b15801561069c57600080fd5b505afa1580156106b0573d6000803e3d6000fd5b505050506040513d60208110156106c657600080fd5b5051604080516370a0823160e01b81526001600160a01b038b166004820152905160008051602061199e833981519152916370a08231916024808301926020929190829003018186803b15801561071c57600080fd5b505afa158015610730573d6000803e3d6000fd5b505050506040513d602081101561074657600080fd5b50510391505b600061077c6201518061077661076f858960c0015161129090919063ffffffff16565b8690611290565b906112e9565b9551909501955050505050505b92915050565b61079761132b565b6000546001600160a01b039081169116146107e7576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61081161132b565b6000546001600160a01b03908116911614610861576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600260205260409020600301544210156108c6576040805162461bcd60e51b815260206004820152601260248201527121b0b713ba103932b6b7bb32903a37b5b2b760711b604482015290519081900360640190fd5b60045460005b8181101561096c576000818152600360205260409020546001600160a01b03848116911614156109645781816001011461093857600019820160009081526003602052604080822054838352912080546001600160a01b0319166001600160a01b039092169190911790555b600480546000199081019091558201600090815260036020526040902080546001600160a01b03191690555b6001016108cc565b505050565b61097961132b565b6000546001600160a01b039081169116146109c9576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60056020908152600092835260408084209091529082529020805460019091015482565b6001546001600160a01b031681565b60008051602061199e83398151915281565b6000546001600160a01b031690565b610a6f61132b565b6000546001600160a01b03908116911614610abf576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b60008711610acc57600080fd5b6001600160a01b038816610adf57600080fd5b8460141480610aef575084610483145b610af857600080fd5b6001821115610b0657600080fd5b6002811115610b1457600080fd5b6001600160a01b0388166000908152600260205260409020600301548711610b3b57600080fd5b6004805460018082018355600091825260036020818152604080852080546001600160a01b0319166001600160a01b039f909f169e8f179055805160e08101825260ff978816815297871688830190815263ffffffff9b8c1689830190815260608a019b8c5260808a019e8f5260a08a019d8e5260c08a019a8b529e865260029283905294209651875494519d5160ff199095169087161761ff0019166101009d9096169c909c029490941765ffffffff000019166201000092909816919091029690961783559351948201949094559451958501959095559151908301559151910155565b3360008051602061199e83398151915214610c75576040805162461bcd60e51b815260206004820152600f60248201526e085adbdb99de8818dbdb9d1c9858dd608a1b604482015290519081900360640190fd5b6001546040805163079cc67960e41b81526001600160a01b03858116600483015260248201859052915191909216916379cc679091604480830192600092919082900301818387803b158015610cca57600080fd5b505af1158015610cde573d6000803e3d6000fd5b505050505050565b60045481565b3360008051602061199e83398151915214610d40576040805162461bcd60e51b815260206004820152600f60248201526e085adbdb99de8818dbdb9d1c9858dd608a1b604482015290519081900360640190fd5b604080516370a0823160e01b8152336004820152905160009160008051602061199e833981519152916370a0823191602480820192602092909190829003018186803b158015610d8f57600080fd5b505afa158015610da3573d6000803e3d6000fd5b505050506040513d6020811015610db957600080fd5b5051604080516338712d8d60e01b8152336004820152905191925060009160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b158015610e0c57600080fd5b505afa158015610e20573d6000803e3d6000fd5b505050506040513d6020811015610e3657600080fd5b5051600154909150610e549084906001600160a01b0316848461132f565b60015461096c906001600160a01b0316846114d7565b60026020819052600091825260409091208054600182015492820154600383015460049093015460ff808416956101008504909116946201000090940463ffffffff169390929187565b6003602052600090815260409020546001600160a01b031681565b610ed761132b565b6000546001600160a01b03908116911614610f27576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b6001600160a01b038116610f6c5760405162461bcd60e51b81526004018080602001828103825260268152602001806119376026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516370a0823160e01b8152336004820152905160009160008051602061199e833981519152916370a0823191602480820192602092909190829003018186803b15801561101657600080fd5b505afa15801561102a573d6000803e3d6000fd5b505050506040513d602081101561104057600080fd5b5051604080516338712d8d60e01b8152336004820152905191925060009160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b15801561109357600080fd5b505afa1580156110a7573d6000803e3d6000fd5b505050506040513d60208110156110bd57600080fd5b505190506110cd3384848461132f565b61096c83336114d7565b600060008051602061199e8339815191526001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561113457600080fd5b505afa158015611148573d6000803e3d6000fd5b505050506040513d602081101561115e57600080fd5b5051604080516338712d8d60e01b81526001600160a01b0386166004820152905191925060009160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b1580156111ba57600080fd5b505afa1580156111ce573d6000803e3d6000fd5b505050506040513d60208110156111e457600080fd5b5051905060005b83811015611220576000818152600360205260409020546112189086906001600160a01b0316858561132f565b6001016111eb565b5050505050565b60008183106112365781611238565b825b9392505050565b60008183116112365781611238565b600061123883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117d7565b60008261129f57506000610789565b828202828482816112ac57fe5b04146112385760405162461bcd60e51b815260040180806020018281038252602181526020018061195d6021913960400191505060405180910390fd5b600061123883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061186e565b3390565b6113376118ed565b506001600160a01b038381166000818152600260208181526040808420815160e081018352815460ff80821683526101008204168286015262010000900463ffffffff1681840152600182015460608201529381015460808501908152600382015460a086015260049091015460c0850152958a168452600582528084209484529390529190209151909190421115610cde57600181015460a083015181906000906113e39042611227565b905060006113f583876080015161123f565b9250611401828461124e565b90506000831180156114135750600081115b156114bb57855160ff166114535761144962015180610776836114438a60c001518c61129090919063ffffffff16565b90611290565b85540185556114bb565b855160ff16600114156114825761144962015180610776836114438a60c001518d61129090919063ffffffff16565b855160ff16600214156114bb576114b562015180610776836114438a60c001516114438d8f61124e90919063ffffffff16565b85540185555b818410156114cb57600185018290555b50505050505050505050565b6114df6118ed565b506001600160a01b038216600090815260026020818152604092839020835160e081018552815460ff8082168352610100820416938201939093526201000090920463ffffffff1693820193909352600183015460608201529082015460808201819052600383015460a083015260049092015460c08201529061156257600080fd5b6001600160a01b038083166000908152600560209081526040808320938716835292905220805480611596575050506117d3565b60408301516000835563ffffffff1660148114156116b757602084015160ff1661162e57856001600160a01b03166340c10f1986846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561161157600080fd5b505af1158015611625573d6000803e3d6000fd5b505050506116b2565b856001600160a01b031663a9059cbb86846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561168557600080fd5b505af1158015611699573d6000803e3d6000fd5b505050506040513d60208110156116af57600080fd5b50505b610cde565b806104831415610cde57602084015160ff1661174d57856001600160a01b031663156e29f6868660600151856040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b15801561173057600080fd5b505af1158015611744573d6000803e3d6000fd5b50505050610cde565b606084015160408051637921219560e11b81523060048201526001600160a01b03888116602483015260448201939093526064810185905260a06084820152600060a4820181905291519289169263f242432a9260e48084019391929182900301818387803b1580156117bf57600080fd5b505af11580156114cb573d6000803e3d6000fd5b5050565b600081848411156118665760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561182b578181015183820152602001611813565b50505050905090810190601f1680156118585780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836118bd5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561182b578181015183820152602001611813565b5060008385816118c957fe5b0495945050505050565b604051806040016040528060008152602001600081525090565b6040518060e00160405280600060ff168152602001600060ff168152602001600063ffffffff16815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000057a204aa1042f6e66dd7730813f4024114d74f37a2646970667358221220680c11d3575b96cd69455d966637140a1247a90ebc2269ccd5952bf2b3ec5ed064736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063c00007b011610071578063c00007b0146102dc578063c6cf7c5f14610302578063e61ca8191461036b578063f2fde38b14610388578063fea99c4b146103ae5761010b565b80638da5cb5b1461024f5780639787d6a0146102575780639dc29fac146102a8578063a197e026146102d45761010b565b8063715018a6116100de578063715018a6146101d4578063768e5b27146101dc57806377c3858714610223578063785c9872146102475761010b565b80632c8e8dfa14610110578063476ea95e146101485780635dd95376146101885780635fa7b584146101ae575b600080fd5b6101466004803603606081101561012657600080fd5b506001600160a01b038135811691602081013590911690604001356103d4565b005b6101766004803603604081101561015e57600080fd5b506001600160a01b0381358116916020013516610452565b60408051918252519081900360200190f35b6101466004803603602081101561019e57600080fd5b50356001600160a01b031661078f565b610146600480360360208110156101c457600080fd5b50356001600160a01b0316610809565b610146610971565b61020a600480360360408110156101f257600080fd5b506001600160a01b0381358116916020013516610a13565b6040805192835260208301919091528051918290030190f35b61022b610a37565b604080516001600160a01b039092168252519081900360200190f35b61022b610a46565b61022b610a58565b610146600480360361010081101561026e57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c08101359060e00135610a67565b610146600480360360408110156102be57600080fd5b506001600160a01b038135169060200135610c21565b610176610ce6565b610146600480360360208110156102f257600080fd5b50356001600160a01b0316610cec565b6103286004803603602081101561031857600080fd5b50356001600160a01b0316610e6a565b6040805160ff988916815296909716602087015263ffffffff909416858701526060850192909252608084015260a083015260c082015290519081900360e00190f35b61022b6004803603602081101561038157600080fd5b5035610eb4565b6101466004803603602081101561039e57600080fd5b50356001600160a01b0316610ecf565b610146600480360360208110156103c457600080fd5b50356001600160a01b0316610fc7565b3360008051602061199e83398151915214610426576040805162461bcd60e51b815260206004820152600d60248201526c10b5b7b733bd1031b0b63632b960991b604482015290519081900360640190fd5b60045461043384826110d7565b6001600160a01b0383161561044c5761044c83826110d7565b50505050565b600061045c6118d3565b506001600160a01b03808416600090815260056020908152604080832093861683529281529082902082518084019093528054835260010154908201526104a16118ed565b506001600160a01b0383166000908152600260208181526040808420815160e081018352815460ff8082168352610100820416948201949094526201000090930463ffffffff169183019190915260018101546060830152918201546080820152600382015460a0820181905260049092015460c08201529190610526904290611227565b90506000806105476105408660200151866080015161123f565b849061124e565b845190915060ff166105da57604080516338712d8d60e01b81526001600160a01b038a166004820152905160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b1580156105a757600080fd5b505afa1580156105bb573d6000803e3d6000fd5b505050506040513d60208110156105d157600080fd5b5051915061074c565b835160ff166001141561063b57604080516370a0823160e01b81526001600160a01b038a166004820152905160008051602061199e833981519152916370a08231916024808301926020929190829003018186803b1580156105a757600080fd5b835160ff166002141561074c57604080516338712d8d60e01b81526001600160a01b038a166004820152905160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b15801561069c57600080fd5b505afa1580156106b0573d6000803e3d6000fd5b505050506040513d60208110156106c657600080fd5b5051604080516370a0823160e01b81526001600160a01b038b166004820152905160008051602061199e833981519152916370a08231916024808301926020929190829003018186803b15801561071c57600080fd5b505afa158015610730573d6000803e3d6000fd5b505050506040513d602081101561074657600080fd5b50510391505b600061077c6201518061077661076f858960c0015161129090919063ffffffff16565b8690611290565b906112e9565b9551909501955050505050505b92915050565b61079761132b565b6000546001600160a01b039081169116146107e7576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61081161132b565b6000546001600160a01b03908116911614610861576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b6001600160a01b0381166000908152600260205260409020600301544210156108c6576040805162461bcd60e51b815260206004820152601260248201527121b0b713ba103932b6b7bb32903a37b5b2b760711b604482015290519081900360640190fd5b60045460005b8181101561096c576000818152600360205260409020546001600160a01b03848116911614156109645781816001011461093857600019820160009081526003602052604080822054838352912080546001600160a01b0319166001600160a01b039092169190911790555b600480546000199081019091558201600090815260036020526040902080546001600160a01b03191690555b6001016108cc565b505050565b61097961132b565b6000546001600160a01b039081169116146109c9576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60056020908152600092835260408084209091529082529020805460019091015482565b6001546001600160a01b031681565b60008051602061199e83398151915281565b6000546001600160a01b031690565b610a6f61132b565b6000546001600160a01b03908116911614610abf576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b60008711610acc57600080fd5b6001600160a01b038816610adf57600080fd5b8460141480610aef575084610483145b610af857600080fd5b6001821115610b0657600080fd5b6002811115610b1457600080fd5b6001600160a01b0388166000908152600260205260409020600301548711610b3b57600080fd5b6004805460018082018355600091825260036020818152604080852080546001600160a01b0319166001600160a01b039f909f169e8f179055805160e08101825260ff978816815297871688830190815263ffffffff9b8c1689830190815260608a019b8c5260808a019e8f5260a08a019d8e5260c08a019a8b529e865260029283905294209651875494519d5160ff199095169087161761ff0019166101009d9096169c909c029490941765ffffffff000019166201000092909816919091029690961783559351948201949094559451958501959095559151908301559151910155565b3360008051602061199e83398151915214610c75576040805162461bcd60e51b815260206004820152600f60248201526e085adbdb99de8818dbdb9d1c9858dd608a1b604482015290519081900360640190fd5b6001546040805163079cc67960e41b81526001600160a01b03858116600483015260248201859052915191909216916379cc679091604480830192600092919082900301818387803b158015610cca57600080fd5b505af1158015610cde573d6000803e3d6000fd5b505050505050565b60045481565b3360008051602061199e83398151915214610d40576040805162461bcd60e51b815260206004820152600f60248201526e085adbdb99de8818dbdb9d1c9858dd608a1b604482015290519081900360640190fd5b604080516370a0823160e01b8152336004820152905160009160008051602061199e833981519152916370a0823191602480820192602092909190829003018186803b158015610d8f57600080fd5b505afa158015610da3573d6000803e3d6000fd5b505050506040513d6020811015610db957600080fd5b5051604080516338712d8d60e01b8152336004820152905191925060009160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b158015610e0c57600080fd5b505afa158015610e20573d6000803e3d6000fd5b505050506040513d6020811015610e3657600080fd5b5051600154909150610e549084906001600160a01b0316848461132f565b60015461096c906001600160a01b0316846114d7565b60026020819052600091825260409091208054600182015492820154600383015460049093015460ff808416956101008504909116946201000090940463ffffffff169390929187565b6003602052600090815260409020546001600160a01b031681565b610ed761132b565b6000546001600160a01b03908116911614610f27576040805162461bcd60e51b8152602060048201819052602482015260008051602061197e833981519152604482015290519081900360640190fd5b6001600160a01b038116610f6c5760405162461bcd60e51b81526004018080602001828103825260268152602001806119376026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516370a0823160e01b8152336004820152905160009160008051602061199e833981519152916370a0823191602480820192602092909190829003018186803b15801561101657600080fd5b505afa15801561102a573d6000803e3d6000fd5b505050506040513d602081101561104057600080fd5b5051604080516338712d8d60e01b8152336004820152905191925060009160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b15801561109357600080fd5b505afa1580156110a7573d6000803e3d6000fd5b505050506040513d60208110156110bd57600080fd5b505190506110cd3384848461132f565b61096c83336114d7565b600060008051602061199e8339815191526001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561113457600080fd5b505afa158015611148573d6000803e3d6000fd5b505050506040513d602081101561115e57600080fd5b5051604080516338712d8d60e01b81526001600160a01b0386166004820152905191925060009160008051602061199e833981519152916338712d8d916024808301926020929190829003018186803b1580156111ba57600080fd5b505afa1580156111ce573d6000803e3d6000fd5b505050506040513d60208110156111e457600080fd5b5051905060005b83811015611220576000818152600360205260409020546112189086906001600160a01b0316858561132f565b6001016111eb565b5050505050565b60008183106112365781611238565b825b9392505050565b60008183116112365781611238565b600061123883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117d7565b60008261129f57506000610789565b828202828482816112ac57fe5b04146112385760405162461bcd60e51b815260040180806020018281038252602181526020018061195d6021913960400191505060405180910390fd5b600061123883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061186e565b3390565b6113376118ed565b506001600160a01b038381166000818152600260208181526040808420815160e081018352815460ff80821683526101008204168286015262010000900463ffffffff1681840152600182015460608201529381015460808501908152600382015460a086015260049091015460c0850152958a168452600582528084209484529390529190209151909190421115610cde57600181015460a083015181906000906113e39042611227565b905060006113f583876080015161123f565b9250611401828461124e565b90506000831180156114135750600081115b156114bb57855160ff166114535761144962015180610776836114438a60c001518c61129090919063ffffffff16565b90611290565b85540185556114bb565b855160ff16600114156114825761144962015180610776836114438a60c001518d61129090919063ffffffff16565b855160ff16600214156114bb576114b562015180610776836114438a60c001516114438d8f61124e90919063ffffffff16565b85540185555b818410156114cb57600185018290555b50505050505050505050565b6114df6118ed565b506001600160a01b038216600090815260026020818152604092839020835160e081018552815460ff8082168352610100820416938201939093526201000090920463ffffffff1693820193909352600183015460608201529082015460808201819052600383015460a083015260049092015460c08201529061156257600080fd5b6001600160a01b038083166000908152600560209081526040808320938716835292905220805480611596575050506117d3565b60408301516000835563ffffffff1660148114156116b757602084015160ff1661162e57856001600160a01b03166340c10f1986846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561161157600080fd5b505af1158015611625573d6000803e3d6000fd5b505050506116b2565b856001600160a01b031663a9059cbb86846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561168557600080fd5b505af1158015611699573d6000803e3d6000fd5b505050506040513d60208110156116af57600080fd5b50505b610cde565b806104831415610cde57602084015160ff1661174d57856001600160a01b031663156e29f6868660600151856040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b15801561173057600080fd5b505af1158015611744573d6000803e3d6000fd5b50505050610cde565b606084015160408051637921219560e11b81523060048201526001600160a01b03888116602483015260448201939093526064810185905260a06084820152600060a4820181905291519289169263f242432a9260e48084019391929182900301818387803b1580156117bf57600080fd5b505af11580156114cb573d6000803e3d6000fd5b5050565b600081848411156118665760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561182b578181015183820152602001611813565b50505050905090810190601f1680156118585780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836118bd5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561182b578181015183820152602001611813565b5060008385816118c957fe5b0495945050505050565b604051806040016040528060008152602001600081525090565b6040518060e00160405280600060ff168152602001600060ff168152602001600063ffffffff16815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000057a204aa1042f6e66dd7730813f4024114d74f37a2646970667358221220680c11d3575b96cd69455d966637140a1247a90ebc2269ccd5952bf2b3ec5ed064736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.