More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 92 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Admin Withdraw N... | 16170979 | 810 days ago | IN | 0 ETH | 0.00190166 | ||||
Admin Withdraw N... | 16170976 | 810 days ago | IN | 0 ETH | 0.00221072 | ||||
Admin Withdraw N... | 16170973 | 810 days ago | IN | 0 ETH | 0.00234557 | ||||
Admin Withdraw N... | 16170972 | 810 days ago | IN | 0 ETH | 0.00238513 | ||||
Admin Withdraw N... | 16170969 | 810 days ago | IN | 0 ETH | 0.00188779 | ||||
Admin Withdraw N... | 16170967 | 810 days ago | IN | 0 ETH | 0.00205763 | ||||
Admin Withdraw N... | 16170965 | 810 days ago | IN | 0 ETH | 0.00180195 | ||||
Admin Withdraw N... | 16170963 | 810 days ago | IN | 0 ETH | 0.00179161 | ||||
Admin Withdraw N... | 16170961 | 810 days ago | IN | 0 ETH | 0.00187003 | ||||
Admin Withdraw N... | 16170956 | 810 days ago | IN | 0 ETH | 0.00189099 | ||||
Admin Withdraw N... | 16170953 | 810 days ago | IN | 0 ETH | 0.002132 | ||||
Admin Withdraw N... | 16170950 | 810 days ago | IN | 0 ETH | 0.00203733 | ||||
Admin Withdraw N... | 16170946 | 810 days ago | IN | 0 ETH | 0.00228866 | ||||
Admin Withdraw N... | 16170942 | 810 days ago | IN | 0 ETH | 0.00204924 | ||||
Admin Withdraw N... | 16170937 | 810 days ago | IN | 0 ETH | 0.00275968 | ||||
Admin Withdraw N... | 16170934 | 810 days ago | IN | 0 ETH | 0.00289123 | ||||
Admin Withdraw N... | 16170930 | 810 days ago | IN | 0 ETH | 0.00292734 | ||||
Admin Withdraw N... | 16170926 | 810 days ago | IN | 0 ETH | 0.00261399 | ||||
Admin Withdraw N... | 16170924 | 810 days ago | IN | 0 ETH | 0.00281666 | ||||
Admin Withdraw N... | 16170921 | 810 days ago | IN | 0 ETH | 0.00239016 | ||||
Admin Withdraw N... | 16170917 | 810 days ago | IN | 0 ETH | 0.00222336 | ||||
Admin Withdraw N... | 16170899 | 810 days ago | IN | 0 ETH | 0.00237068 | ||||
Admin Withdraw N... | 16170896 | 810 days ago | IN | 0 ETH | 0.00194694 | ||||
Admin Withdraw N... | 16170892 | 810 days ago | IN | 0 ETH | 0.00214303 | ||||
Admin Withdraw N... | 16170887 | 810 days ago | IN | 0 ETH | 0.00221368 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
CrocoKingStaking
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; contract CrocoKingStaking is AccessControl { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); address public rewardToken; address public collectionAddress; uint256 public minTokenReward = 12 ether; bool public getRewardPaused; uint256[3] public defaultPackageIndex = [0, 1, 2]; uint256[3] public defaultLockTime = [90 days, 180 days, 270 days]; uint256[3] public defaultReward = [11.66 ether, 9.5 ether, 7 ether]; struct Stake { uint256 tokenId; uint256 stakeTime; uint256 lastTimeClaimed; uint256 totalClaimed; uint256 index; } mapping(address => Stake[]) public userStakes; mapping(uint256 => address) public usersToken; constructor( address _collectionAddress, address _rewardToken ) { _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(ADMIN_ROLE, msg.sender); collectionAddress = _collectionAddress; rewardToken = _rewardToken; } modifier onlyAdmin { require(hasRole(ADMIN_ROLE, msg.sender), "! Only Admin"); _; } modifier onlyTokenOwner(uint256 _tokenId) { require(IERC721(collectionAddress).ownerOf(_tokenId) == msg.sender, 'Staking: Only Token Owner'); _; } modifier onlyTokenStaker(uint256 _tokenId) { require(usersToken[_tokenId] == msg.sender, 'Only Token Staker'); _; } function stake( uint256 _tokenId, uint256 _packageIndex ) public onlyTokenOwner(_tokenId) { bool validIndex; for (uint i = 0; i < defaultPackageIndex.length; i++) { if (defaultPackageIndex[i] == _packageIndex) validIndex = true; } require(validIndex, 'Invalid Package'); IERC721(collectionAddress).transferFrom(msg.sender, address(this), _tokenId); userStakes[msg.sender].push(Stake({ tokenId: _tokenId, stakeTime: block.timestamp, lastTimeClaimed: block.timestamp, totalClaimed: 0, index: _packageIndex })); usersToken[_tokenId] = msg.sender; } function earned(uint256 _tokenId) public view returns(uint256 reward){ address user = usersToken[_tokenId]; if(user == address(0)) return reward; for (uint i = 0; i < userStakes[user].length; i++) { if (userStakes[user][i].tokenId == _tokenId) { uint256 rewardPerSecond = defaultReward[userStakes[user][i].index] / defaultLockTime[userStakes[user][i].index]; uint256 claimedPeriod = block.timestamp - userStakes[user][i].lastTimeClaimed; uint256 reward_ = rewardPerSecond * claimedPeriod; uint256 remainingReward = defaultReward[userStakes[user][i].index] - userStakes[user][i].totalClaimed; if (reward_ <= remainingReward) { reward = reward_; } else { reward = remainingReward; } break; } } } function getReward( uint256 _tokenId ) public onlyTokenStaker(_tokenId){ require(getRewardPaused, 'Paused'); uint256 reward = earned(_tokenId); require(reward >= minTokenReward, 'Less Than Min Token'); IERC20(rewardToken).transfer(msg.sender, reward); address user = usersToken[_tokenId]; for (uint i = 0; i < userStakes[user].length; i++) { if (userStakes[user][i].tokenId == _tokenId) { userStakes[user][i].lastTimeClaimed = block.timestamp; userStakes[user][i].totalClaimed += reward; break; } } } function unstake(uint256 _tokenId) public onlyTokenStaker(_tokenId) { address user = usersToken[_tokenId]; for (uint i = 0; i < userStakes[user].length; i++) { if (userStakes[user][i].tokenId == _tokenId) { require(block.timestamp - userStakes[user][i].stakeTime >= defaultLockTime[userStakes[user][i].index], 'Period Time Limitation'); uint256 totalReward = defaultReward[userStakes[user][i].index] - userStakes[user][i].totalClaimed; if (totalReward > 0) { IERC20(rewardToken).transfer(msg.sender, totalReward); } IERC721(collectionAddress).transferFrom(address(this), msg.sender, _tokenId); userStakes[user][i] = userStakes[user][userStakes[user].length - 1]; userStakes[user].pop(); delete usersToken[_tokenId]; break; } } } function setUsdtAddress(address _rewardToken) public onlyAdmin { rewardToken = _rewardToken; } function setGetRewardPause(bool _newVal) public onlyAdmin { getRewardPaused = _newVal; } function setCollectionAddress(address _collection) public onlyAdmin { collectionAddress = _collection; } function setMinTokenReward(uint256 _minReward) public onlyAdmin { minTokenReward = _minReward; } function setDefaultLockTime(uint256[3] memory _lockTimes) public onlyAdmin { defaultLockTime = _lockTimes; } function setDefaultReward(uint256[3] memory _rewards) public onlyAdmin { defaultReward = _rewards; } function userInfo(address user) public view returns(Stake[] memory stakes){ stakes = new Stake[](userStakes[user].length); for (uint i = 0; i < stakes.length; i++) { stakes[i] = userStakes[user][i]; } } function adminWithdrawTokens(address _tokenAddr, address _to, uint _amount) public onlyAdmin{ require(_to != address(0), "0x0"); if(_tokenAddr == address(0)){ payable(_to).transfer(_amount); }else{ IERC20(_tokenAddr).transfer(_to, _amount); } } function adminWithdrawNfts(address _to, uint256[] memory _tokenIds) public onlyAdmin{ for (uint i = 0; i < _tokenIds.length; i++) { IERC721(collectionAddress).transferFrom(address(this), _to, _tokenIds[i]); //remove from usersTokens delete usersToken[_tokenIds[i]]; address user = usersToken[_tokenIds[i]]; for (uint j = 0; j < userStakes[user].length; j++) { if (userStakes[user][j].tokenId == _tokenIds[i]) { userStakes[user][j] = userStakes[user][userStakes[user].length - 1]; userStakes[user].pop(); break; } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol) 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 Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * 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 // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_collectionAddress","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"adminWithdrawNfts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddr","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"adminWithdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectionAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"defaultLockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"defaultPackageIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"defaultReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"earned","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTokenReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"}],"name":"setCollectionAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_lockTimes","type":"uint256[3]"}],"name":"setDefaultLockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_rewards","type":"uint256[3]"}],"name":"setDefaultReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newVal","type":"bool"}],"name":"setGetRewardPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minReward","type":"uint256"}],"name":"setMinTokenReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"setUsdtAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_packageIndex","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"lastTimeClaimed","type":"uint256"},{"internalType":"uint256","name":"totalClaimed","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"internalType":"struct CrocoKingStaking.Stake[]","name":"stakes","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userStakes","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"lastTimeClaimed","type":"uint256"},{"internalType":"uint256","name":"totalClaimed","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usersToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
67a688906bd8b00000600390815560e060405260006080908152600160a052600260c0526200003291600591906200020f565b50604080516060810182526276a700815262ed4e006020820152630163f500918101919091526200006890600890600362000257565b506040805160608101825267a1d0a439010e000081526783d6c7aab63600006020820152676124fee993bc000091810191909152620000ac90600b90600362000290565b50348015620000ba57600080fd5b50604051620028c7380380620028c7833981016040819052620000dd9162000300565b620000ea60003362000148565b620001167fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000148565b600280546001600160a01b039384166001600160a01b0319918216179091556001805492909316911617905562000337565b62000154828262000158565b5050565b620001648282620001e2565b62000154576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200019e6200020b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3390565b826003810192821562000245579160200282015b8281111562000245578251829060ff1690559160200191906001019062000223565b5062000253929150620002cc565b5090565b826003810192821562000245579160200282015b8281111562000245578251829063ffffffff169055916020019190600101906200026b565b826003810192821562000245579160200282015b828111156200024557825182906001600160401b0316905591602001919060010190620002a4565b5b80821115620002535760008155600101620002cd565b80516001600160a01b0381168114620002fb57600080fd5b919050565b6000806040838503121562000313578182fd5b6200031e83620002e3565b91506200032e60208401620002e3565b90509250929050565b61258080620003476000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80636aa0037111610104578063a6904aa5116100a2578063d444129c11610071578063d444129c146103e6578063d547741f146103f9578063f25323b31461040c578063f7c618c11461041f576101da565b8063a6904aa514610389578063aa70fb981461039c578063b1eda92d146103af578063b5d5b5fa146103c2576101da565b8063812632ec116100de578063812632ec146103535780638638d4b91461035b57806391d148541461036e578063a217fddf14610381576101da565b80636aa003711461032357806375b238fc146103385780637b0472f014610340576101da565b8063248a9ca31161017c57806336568abe1161014b57806336568abe146102d75780634d6ed8c4146102ea57806352cacb66146102fd57806368a7710a14610310576101da565b8063248a9ca31461028b5780632a36c5101461029e5780632e17de78146102b15780632f2ff15d146102c4576101da565b80630d670372116101b85780630d6703721461023d578063104ed479146102455780631959a002146102585780631c4b774b14610278576101da565b806301ffc9a7146101df57806303773e76146102085780630cb46b7514610228575b600080fd5b6101f26101ed36600461202c565b610427565b6040516101ff91906121a9565b60405180910390f35b61021b610216366004611fe5565b610454565b6040516101ff91906121b4565b61023b610236366004611dcc565b61046b565b005b6101f26104ca565b61021b610253366004611fe5565b6104d3565b61026b610266366004611dcc565b6104e3565b6040516101ff919061213b565b61023b610286366004611fe5565b610634565b61021b610299366004611fe5565b6108a8565b61023b6102ac366004611f2b565b6108bd565b61023b6102bf366004611fe5565b610902565b61023b6102d2366004611ffd565b610de0565b61023b6102e5366004611ffd565b610e09565b61021b6102f8366004611fe5565b610e4b565b61021b61030b366004611fe5565b61113a565b61023b61031e366004611e04565b61114a565b61032b61126e565b6040516101ff91906120ea565b61021b61127d565b61023b61034e366004612054565b61128f565b61021b6114a2565b61023b610369366004611f2b565b6114a8565b6101f261037c366004611ffd565b6114e9565b61021b611512565b61023b610397366004611dcc565b611517565b61023b6103aa366004611fe5565b61156d565b61032b6103bd366004611fe5565b6115a6565b6103d56103d0366004611f00565b6115c1565b6040516101ff9594939291906123bf565b61023b6103f4366004611fad565b61160f565b61023b610407366004611ffd565b611656565b61023b61041a366004611e44565b611675565b61032b6119f9565b60006001600160e01b03198216637965db0b60e01b148061044c575061044c82611a08565b90505b919050565b6005816003811061046457600080fd5b0154905081565b61048360008051602061252b833981519152336114e9565b6104a85760405162461bcd60e51b815260040161049f906122e8565b60405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60045460ff1681565b6008816003811061046457600080fd5b6001600160a01b0381166000908152600e602052604090205460609067ffffffffffffffff81111561052557634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561055e57816020015b61054b611d4a565b8152602001906001900390816105435790505b50905060005b815181101561062e576001600160a01b0383166000908152600e602052604090208054829081106105a557634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505082828151811061061057634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080610626906124bd565b915050610564565b50919050565b6000818152600f602052604090205481906001600160a01b0316331461066c5760405162461bcd60e51b815260040161049f90612345565b60045460ff1661068e5760405162461bcd60e51b815260040161049f90612252565b600061069983610e4b565b90506003548110156106bd5760405162461bcd60e51b815260040161049f906121f0565b60015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906106ef9033908590600401612122565b602060405180830381600087803b15801561070957600080fd5b505af115801561071d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107419190611fc9565b506000838152600f60205260408120546001600160a01b0316905b6001600160a01b0382166000908152600e60205260409020548110156108a1576001600160a01b0382166000908152600e602052604090208054869190839081106107b757634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160000154141561088f576001600160a01b0382166000908152600e6020526040902080544291908390811061080a57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016002018190555082600e6000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061086457634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016003016000828254610884919061240c565b909155506108a19050565b80610899816124bd565b91505061075c565b5050505050565b60009081526020819052604090206001015490565b6108d560008051602061252b833981519152336114e9565b6108f15760405162461bcd60e51b815260040161049f906122e8565b6108fe6008826003611d79565b5050565b6000818152600f602052604090205481906001600160a01b0316331461093a5760405162461bcd60e51b815260040161049f90612345565b6000828152600f60205260408120546001600160a01b0316905b6001600160a01b0382166000908152600e6020526040902054811015610dda576001600160a01b0382166000908152600e602052604090208054859190839081106109af57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600001541415610dc8576001600160a01b0382166000908152600e6020526040902080546008919083908110610a0357634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016004015460038110610a3357634e487b7160e01b600052603260045260246000fd5b01546001600160a01b0383166000908152600e60205260409020805483908110610a6d57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016001015442610a8a9190612463565b1015610aa85760405162461bcd60e51b815260040161049f90612272565b6001600160a01b0382166000908152600e60205260408120805483908110610ae057634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160030154600b600e6000866001600160a01b03166001600160a01b031681526020019081526020016000208481548110610b3857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016004015460038110610b6857634e487b7160e01b600052603260045260246000fd5b0154610b749190612463565b90508015610c025760015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610bae9033908590600401612122565b602060405180830381600087803b158015610bc857600080fd5b505af1158015610bdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c009190611fc9565b505b6002546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610c3690309033908a906004016120fe565b600060405180830381600087803b158015610c5057600080fd5b505af1158015610c64573d6000803e3d6000fd5b505050506001600160a01b0383166000908152600e602052604090208054610c8e90600190612463565b81548110610cac57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600e6000856001600160a01b03166001600160a01b031681526020019081526020016000208381548110610cfe57634e487b7160e01b600052603260045260246000fd5b60009182526020808320845460059093020191825560018085015490830155600280850154908301556003808501549083015560049384015493909101929092556001600160a01b0385168152600e90915260409020805480610d7157634e487b7160e01b600052603160045260246000fd5b6000828152602080822060056000199094019384020182815560018101839055600281018390556003810183905560040182905591909255868252600f90526040902080546001600160a01b031916905550610dda565b80610dd2816124bd565b915050610954565b50505050565b610de9826108a8565b610dfa81610df5611a21565b611a25565b610e048383611a89565b505050565b610e11611a21565b6001600160a01b0316816001600160a01b031614610e415760405162461bcd60e51b815260040161049f90612370565b6108fe8282611b0e565b6000818152600f60205260408120546001600160a01b031680610e6e575061044f565b60005b6001600160a01b0382166000908152600e6020526040902054811015611133576001600160a01b0382166000908152600e60205260409020805485919083908110610ecc57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600001541415611121576001600160a01b0382166000908152600e6020526040812080546008919084908110610f2057634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016004015460038110610f5057634e487b7160e01b600052603260045260246000fd5b01546001600160a01b0384166000908152600e602052604090208054600b919085908110610f8e57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016004015460038110610fbe57634e487b7160e01b600052603260045260246000fd5b0154610fca9190612424565b6001600160a01b0384166000908152600e60205260408120805492935090918490811061100757634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160020154426110249190612463565b905060006110328284612444565b6001600160a01b0386166000908152600e60205260408120805492935090918690811061106f57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160030154600b600e6000896001600160a01b03166001600160a01b0316815260200190815260200160002087815481106110c757634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160040154600381106110f757634e487b7160e01b600052603260045260246000fd5b01546111039190612463565b905080821161111457819650611118565b8096505b50505050611133565b8061112b816124bd565b915050610e71565b5050919050565b600b816003811061046457600080fd5b61116260008051602061252b833981519152336114e9565b61117e5760405162461bcd60e51b815260040161049f906122e8565b6001600160a01b0382166111a45760405162461bcd60e51b815260040161049f906122cb565b6001600160a01b0383166111ee576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156111e8573d6000803e3d6000fd5b50610e04565b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb9061121c9085908590600401612122565b602060405180830381600087803b15801561123657600080fd5b505af115801561124a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dda9190611fc9565b6002546001600160a01b031681565b60008051602061252b83398151915281565b6002546040516331a9108f60e11b8152839133916001600160a01b0390911690636352211e906112c39085906004016121b4565b60206040518083038186803b1580156112db57600080fd5b505afa1580156112ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113139190611de8565b6001600160a01b0316146113395760405162461bcd60e51b815260040161049f9061230e565b6000805b600381101561138757836005826003811061136857634e487b7160e01b600052603260045260246000fd5b0154141561137557600191505b8061137f816124bd565b91505061133d565b50806113a55760405162461bcd60e51b815260040161049f906122a2565b6002546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906113d9903390309089906004016120fe565b600060405180830381600087803b1580156113f357600080fd5b505af1158015611407573d6000803e3d6000fd5b5050336000818152600e60209081526040808320815160a0810183528b81524281850181815282850191825260608301878152608084019d8e5284546001818101875595895287892094516005909102909401938455905193830193909355516002820155905160038201559851600490990198909855978152600f9097529490952080546001600160a01b03191690941790935550505050565b60035481565b6114c060008051602061252b833981519152336114e9565b6114dc5760405162461bcd60e51b815260040161049f906122e8565b6108fe600b826003611d79565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600081565b61152f60008051602061252b833981519152336114e9565b61154b5760405162461bcd60e51b815260040161049f906122e8565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b61158560008051602061252b833981519152336114e9565b6115a15760405162461bcd60e51b815260040161049f906122e8565b600355565b600f602052600090815260409020546001600160a01b031681565b600e60205281600052604060002081815481106115dd57600080fd5b600091825260209091206005909102018054600182015460028301546003840154600490940154929550909350919085565b61162760008051602061252b833981519152336114e9565b6116435760405162461bcd60e51b815260040161049f906122e8565b6004805460ff1916911515919091179055565b61165f826108a8565b61166b81610df5611a21565b610e048383611b0e565b61168d60008051602061252b833981519152336114e9565b6116a95760405162461bcd60e51b815260040161049f906122e8565b60005b8151811015610e045760025482516001600160a01b03909116906323b872dd90309086908690869081106116f057634e487b7160e01b600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b8152600401611716939291906120fe565b600060405180830381600087803b15801561173057600080fd5b505af1158015611744573d6000803e3d6000fd5b50505050600f600083838151811061176c57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a8154906001600160a01b0302191690556000600f60008484815181106117be57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b6001600160a01b0382166000908152600e60205260409020548110156119e45783838151811061182d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600e6000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061187957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000015414156119d2576001600160a01b0382166000908152600e6020526040902080546118b790600190612463565b815481106118d557634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600e6000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061192757634e487b7160e01b600052603260045260246000fd5b60009182526020808320845460059093020191825560018085015490830155600280850154908301556003808501549083015560049384015493909101929092556001600160a01b0384168152600e9091526040902080548061199a57634e487b7160e01b600052603160045260246000fd5b6000828152602081206005600019909301928302018181556001810182905560028101829055600381018290556004015590556119e4565b806119dc816124bd565b9150506117ed565b505080806119f1906124bd565b9150506116ac565b6001546001600160a01b031681565b6001600160e01b031981166301ffc9a760e01b14919050565b3390565b611a2f82826114e9565b6108fe57611a47816001600160a01b03166014611b91565b611a52836020611b91565b604051602001611a63929190612075565b60408051601f198184030181529082905262461bcd60e51b825261049f916004016121bd565b611a9382826114e9565b6108fe576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611aca611a21565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611b1882826114e9565b156108fe576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055611b4d611a21565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60606000611ba0836002612444565b611bab90600261240c565b67ffffffffffffffff811115611bd157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611bfb576020820181803683370190505b509050600360fc1b81600081518110611c2457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c6157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611c85846002612444565b611c9090600161240c565b90505b6001811115611d24576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cd257634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611cf657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d1d816124a6565b9050611c93565b508315611d435760405162461bcd60e51b815260040161049f9061221d565b9392505050565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8260038101928215611da7579160200282015b82811115611da7578251825591602001919060010190611d8c565b50611db3929150611db7565b5090565b5b80821115611db35760008155600101611db8565b600060208284031215611ddd578081fd5b8135611d4381612504565b600060208284031215611df9578081fd5b8151611d4381612504565b600080600060608486031215611e18578182fd5b8335611e2381612504565b92506020840135611e3381612504565b929592945050506040919091013590565b60008060408385031215611e56578182fd5b8235611e6181612504565b915060208381013567ffffffffffffffff80821115611e7e578384fd5b818601915086601f830112611e91578384fd5b813581811115611ea357611ea36124ee565b8381029150611eb38483016123e2565b8181528481019084860184860187018b1015611ecd578788fd5b8795505b83861015611eef578035835260019590950194918601918601611ed1565b508096505050505050509250929050565b60008060408385031215611f12578182fd5b8235611f1d81612504565b946020939093013593505050565b600060608284031215611f3c578081fd5b82601f830112611f4a578081fd5b6040516060810181811067ffffffffffffffff82111715611f6d57611f6d6124ee565b604052808360608101861015611f81578384fd5b835b6003811015611fa2578135835260209283019290910190600101611f83565b509195945050505050565b600060208284031215611fbe578081fd5b8135611d438161251c565b600060208284031215611fda578081fd5b8151611d438161251c565b600060208284031215611ff6578081fd5b5035919050565b6000806040838503121561200f578182fd5b82359150602083013561202181612504565b809150509250929050565b60006020828403121561203d578081fd5b81356001600160e01b031981168114611d43578182fd5b60008060408385031215612066578182fd5b50508035926020909101359150565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120ad81601785016020880161247a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120de81602884016020880161247a565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b8281101561219c5781518051855286810151878601528581015186860152606080820151908601526080908101519085015260a09093019290850190600101612158565b5091979650505050505050565b901515815260200190565b90815260200190565b60006020825282518060208401526121dc81604085016020870161247a565b601f01601f19169190910160400192915050565b6020808252601390820152722632b9b9902a3430b71026b4b7102a37b5b2b760691b604082015260600190565b6020808252818101527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604082015260600190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252601690820152752832b934b7b2102a34b6b2902634b6b4ba30ba34b7b760511b604082015260600190565b6020808252600f908201526e496e76616c6964205061636b61676560881b604082015260600190565b60208082526003908201526203078360ec1b604082015260600190565b6020808252600c908201526b109027b7363c9020b236b4b760a11b604082015260600190565b60208082526019908201527f5374616b696e673a204f6e6c7920546f6b656e204f776e657200000000000000604082015260600190565b60208082526011908201527027b7363c902a37b5b2b71029ba30b5b2b960791b604082015260600190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b948552602085019390935260408401919091526060830152608082015260a00190565b60405181810167ffffffffffffffff81118282101715612404576124046124ee565b604052919050565b6000821982111561241f5761241f6124d8565b500190565b60008261243f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561245e5761245e6124d8565b500290565b600082821015612475576124756124d8565b500390565b60005b8381101561249557818101518382015260200161247d565b83811115610dda5750506000910152565b6000816124b5576124b56124d8565b506000190190565b60006000198214156124d1576124d16124d8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461251957600080fd5b50565b801515811461251957600080fdfea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122029ed631bca234f4fc3c29efc11cfce0f188426b24f27b9ecd524508cd8b5dc4e64736f6c634300080000330000000000000000000000004d9b8203d4e88bbe84a31bd51912015710a00aae000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80636aa0037111610104578063a6904aa5116100a2578063d444129c11610071578063d444129c146103e6578063d547741f146103f9578063f25323b31461040c578063f7c618c11461041f576101da565b8063a6904aa514610389578063aa70fb981461039c578063b1eda92d146103af578063b5d5b5fa146103c2576101da565b8063812632ec116100de578063812632ec146103535780638638d4b91461035b57806391d148541461036e578063a217fddf14610381576101da565b80636aa003711461032357806375b238fc146103385780637b0472f014610340576101da565b8063248a9ca31161017c57806336568abe1161014b57806336568abe146102d75780634d6ed8c4146102ea57806352cacb66146102fd57806368a7710a14610310576101da565b8063248a9ca31461028b5780632a36c5101461029e5780632e17de78146102b15780632f2ff15d146102c4576101da565b80630d670372116101b85780630d6703721461023d578063104ed479146102455780631959a002146102585780631c4b774b14610278576101da565b806301ffc9a7146101df57806303773e76146102085780630cb46b7514610228575b600080fd5b6101f26101ed36600461202c565b610427565b6040516101ff91906121a9565b60405180910390f35b61021b610216366004611fe5565b610454565b6040516101ff91906121b4565b61023b610236366004611dcc565b61046b565b005b6101f26104ca565b61021b610253366004611fe5565b6104d3565b61026b610266366004611dcc565b6104e3565b6040516101ff919061213b565b61023b610286366004611fe5565b610634565b61021b610299366004611fe5565b6108a8565b61023b6102ac366004611f2b565b6108bd565b61023b6102bf366004611fe5565b610902565b61023b6102d2366004611ffd565b610de0565b61023b6102e5366004611ffd565b610e09565b61021b6102f8366004611fe5565b610e4b565b61021b61030b366004611fe5565b61113a565b61023b61031e366004611e04565b61114a565b61032b61126e565b6040516101ff91906120ea565b61021b61127d565b61023b61034e366004612054565b61128f565b61021b6114a2565b61023b610369366004611f2b565b6114a8565b6101f261037c366004611ffd565b6114e9565b61021b611512565b61023b610397366004611dcc565b611517565b61023b6103aa366004611fe5565b61156d565b61032b6103bd366004611fe5565b6115a6565b6103d56103d0366004611f00565b6115c1565b6040516101ff9594939291906123bf565b61023b6103f4366004611fad565b61160f565b61023b610407366004611ffd565b611656565b61023b61041a366004611e44565b611675565b61032b6119f9565b60006001600160e01b03198216637965db0b60e01b148061044c575061044c82611a08565b90505b919050565b6005816003811061046457600080fd5b0154905081565b61048360008051602061252b833981519152336114e9565b6104a85760405162461bcd60e51b815260040161049f906122e8565b60405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60045460ff1681565b6008816003811061046457600080fd5b6001600160a01b0381166000908152600e602052604090205460609067ffffffffffffffff81111561052557634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561055e57816020015b61054b611d4a565b8152602001906001900390816105435790505b50905060005b815181101561062e576001600160a01b0383166000908152600e602052604090208054829081106105a557634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152505082828151811061061057634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080610626906124bd565b915050610564565b50919050565b6000818152600f602052604090205481906001600160a01b0316331461066c5760405162461bcd60e51b815260040161049f90612345565b60045460ff1661068e5760405162461bcd60e51b815260040161049f90612252565b600061069983610e4b565b90506003548110156106bd5760405162461bcd60e51b815260040161049f906121f0565b60015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906106ef9033908590600401612122565b602060405180830381600087803b15801561070957600080fd5b505af115801561071d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107419190611fc9565b506000838152600f60205260408120546001600160a01b0316905b6001600160a01b0382166000908152600e60205260409020548110156108a1576001600160a01b0382166000908152600e602052604090208054869190839081106107b757634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160000154141561088f576001600160a01b0382166000908152600e6020526040902080544291908390811061080a57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016002018190555082600e6000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061086457634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016003016000828254610884919061240c565b909155506108a19050565b80610899816124bd565b91505061075c565b5050505050565b60009081526020819052604090206001015490565b6108d560008051602061252b833981519152336114e9565b6108f15760405162461bcd60e51b815260040161049f906122e8565b6108fe6008826003611d79565b5050565b6000818152600f602052604090205481906001600160a01b0316331461093a5760405162461bcd60e51b815260040161049f90612345565b6000828152600f60205260408120546001600160a01b0316905b6001600160a01b0382166000908152600e6020526040902054811015610dda576001600160a01b0382166000908152600e602052604090208054859190839081106109af57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600001541415610dc8576001600160a01b0382166000908152600e6020526040902080546008919083908110610a0357634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016004015460038110610a3357634e487b7160e01b600052603260045260246000fd5b01546001600160a01b0383166000908152600e60205260409020805483908110610a6d57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016001015442610a8a9190612463565b1015610aa85760405162461bcd60e51b815260040161049f90612272565b6001600160a01b0382166000908152600e60205260408120805483908110610ae057634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160030154600b600e6000866001600160a01b03166001600160a01b031681526020019081526020016000208481548110610b3857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016004015460038110610b6857634e487b7160e01b600052603260045260246000fd5b0154610b749190612463565b90508015610c025760015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610bae9033908590600401612122565b602060405180830381600087803b158015610bc857600080fd5b505af1158015610bdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c009190611fc9565b505b6002546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610c3690309033908a906004016120fe565b600060405180830381600087803b158015610c5057600080fd5b505af1158015610c64573d6000803e3d6000fd5b505050506001600160a01b0383166000908152600e602052604090208054610c8e90600190612463565b81548110610cac57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600e6000856001600160a01b03166001600160a01b031681526020019081526020016000208381548110610cfe57634e487b7160e01b600052603260045260246000fd5b60009182526020808320845460059093020191825560018085015490830155600280850154908301556003808501549083015560049384015493909101929092556001600160a01b0385168152600e90915260409020805480610d7157634e487b7160e01b600052603160045260246000fd5b6000828152602080822060056000199094019384020182815560018101839055600281018390556003810183905560040182905591909255868252600f90526040902080546001600160a01b031916905550610dda565b80610dd2816124bd565b915050610954565b50505050565b610de9826108a8565b610dfa81610df5611a21565b611a25565b610e048383611a89565b505050565b610e11611a21565b6001600160a01b0316816001600160a01b031614610e415760405162461bcd60e51b815260040161049f90612370565b6108fe8282611b0e565b6000818152600f60205260408120546001600160a01b031680610e6e575061044f565b60005b6001600160a01b0382166000908152600e6020526040902054811015611133576001600160a01b0382166000908152600e60205260409020805485919083908110610ecc57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600001541415611121576001600160a01b0382166000908152600e6020526040812080546008919084908110610f2057634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016004015460038110610f5057634e487b7160e01b600052603260045260246000fd5b01546001600160a01b0384166000908152600e602052604090208054600b919085908110610f8e57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016004015460038110610fbe57634e487b7160e01b600052603260045260246000fd5b0154610fca9190612424565b6001600160a01b0384166000908152600e60205260408120805492935090918490811061100757634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160020154426110249190612463565b905060006110328284612444565b6001600160a01b0386166000908152600e60205260408120805492935090918690811061106f57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160030154600b600e6000896001600160a01b03166001600160a01b0316815260200190815260200160002087815481106110c757634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160040154600381106110f757634e487b7160e01b600052603260045260246000fd5b01546111039190612463565b905080821161111457819650611118565b8096505b50505050611133565b8061112b816124bd565b915050610e71565b5050919050565b600b816003811061046457600080fd5b61116260008051602061252b833981519152336114e9565b61117e5760405162461bcd60e51b815260040161049f906122e8565b6001600160a01b0382166111a45760405162461bcd60e51b815260040161049f906122cb565b6001600160a01b0383166111ee576040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156111e8573d6000803e3d6000fd5b50610e04565b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb9061121c9085908590600401612122565b602060405180830381600087803b15801561123657600080fd5b505af115801561124a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dda9190611fc9565b6002546001600160a01b031681565b60008051602061252b83398151915281565b6002546040516331a9108f60e11b8152839133916001600160a01b0390911690636352211e906112c39085906004016121b4565b60206040518083038186803b1580156112db57600080fd5b505afa1580156112ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113139190611de8565b6001600160a01b0316146113395760405162461bcd60e51b815260040161049f9061230e565b6000805b600381101561138757836005826003811061136857634e487b7160e01b600052603260045260246000fd5b0154141561137557600191505b8061137f816124bd565b91505061133d565b50806113a55760405162461bcd60e51b815260040161049f906122a2565b6002546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906113d9903390309089906004016120fe565b600060405180830381600087803b1580156113f357600080fd5b505af1158015611407573d6000803e3d6000fd5b5050336000818152600e60209081526040808320815160a0810183528b81524281850181815282850191825260608301878152608084019d8e5284546001818101875595895287892094516005909102909401938455905193830193909355516002820155905160038201559851600490990198909855978152600f9097529490952080546001600160a01b03191690941790935550505050565b60035481565b6114c060008051602061252b833981519152336114e9565b6114dc5760405162461bcd60e51b815260040161049f906122e8565b6108fe600b826003611d79565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600081565b61152f60008051602061252b833981519152336114e9565b61154b5760405162461bcd60e51b815260040161049f906122e8565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b61158560008051602061252b833981519152336114e9565b6115a15760405162461bcd60e51b815260040161049f906122e8565b600355565b600f602052600090815260409020546001600160a01b031681565b600e60205281600052604060002081815481106115dd57600080fd5b600091825260209091206005909102018054600182015460028301546003840154600490940154929550909350919085565b61162760008051602061252b833981519152336114e9565b6116435760405162461bcd60e51b815260040161049f906122e8565b6004805460ff1916911515919091179055565b61165f826108a8565b61166b81610df5611a21565b610e048383611b0e565b61168d60008051602061252b833981519152336114e9565b6116a95760405162461bcd60e51b815260040161049f906122e8565b60005b8151811015610e045760025482516001600160a01b03909116906323b872dd90309086908690869081106116f057634e487b7160e01b600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b8152600401611716939291906120fe565b600060405180830381600087803b15801561173057600080fd5b505af1158015611744573d6000803e3d6000fd5b50505050600f600083838151811061176c57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a8154906001600160a01b0302191690556000600f60008484815181106117be57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b6001600160a01b0382166000908152600e60205260409020548110156119e45783838151811061182d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600e6000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061187957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000015414156119d2576001600160a01b0382166000908152600e6020526040902080546118b790600190612463565b815481106118d557634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600e6000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061192757634e487b7160e01b600052603260045260246000fd5b60009182526020808320845460059093020191825560018085015490830155600280850154908301556003808501549083015560049384015493909101929092556001600160a01b0384168152600e9091526040902080548061199a57634e487b7160e01b600052603160045260246000fd5b6000828152602081206005600019909301928302018181556001810182905560028101829055600381018290556004015590556119e4565b806119dc816124bd565b9150506117ed565b505080806119f1906124bd565b9150506116ac565b6001546001600160a01b031681565b6001600160e01b031981166301ffc9a760e01b14919050565b3390565b611a2f82826114e9565b6108fe57611a47816001600160a01b03166014611b91565b611a52836020611b91565b604051602001611a63929190612075565b60408051601f198184030181529082905262461bcd60e51b825261049f916004016121bd565b611a9382826114e9565b6108fe576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611aca611a21565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611b1882826114e9565b156108fe576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055611b4d611a21565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60606000611ba0836002612444565b611bab90600261240c565b67ffffffffffffffff811115611bd157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611bfb576020820181803683370190505b509050600360fc1b81600081518110611c2457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c6157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611c85846002612444565b611c9090600161240c565b90505b6001811115611d24576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cd257634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611cf657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d1d816124a6565b9050611c93565b508315611d435760405162461bcd60e51b815260040161049f9061221d565b9392505050565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8260038101928215611da7579160200282015b82811115611da7578251825591602001919060010190611d8c565b50611db3929150611db7565b5090565b5b80821115611db35760008155600101611db8565b600060208284031215611ddd578081fd5b8135611d4381612504565b600060208284031215611df9578081fd5b8151611d4381612504565b600080600060608486031215611e18578182fd5b8335611e2381612504565b92506020840135611e3381612504565b929592945050506040919091013590565b60008060408385031215611e56578182fd5b8235611e6181612504565b915060208381013567ffffffffffffffff80821115611e7e578384fd5b818601915086601f830112611e91578384fd5b813581811115611ea357611ea36124ee565b8381029150611eb38483016123e2565b8181528481019084860184860187018b1015611ecd578788fd5b8795505b83861015611eef578035835260019590950194918601918601611ed1565b508096505050505050509250929050565b60008060408385031215611f12578182fd5b8235611f1d81612504565b946020939093013593505050565b600060608284031215611f3c578081fd5b82601f830112611f4a578081fd5b6040516060810181811067ffffffffffffffff82111715611f6d57611f6d6124ee565b604052808360608101861015611f81578384fd5b835b6003811015611fa2578135835260209283019290910190600101611f83565b509195945050505050565b600060208284031215611fbe578081fd5b8135611d438161251c565b600060208284031215611fda578081fd5b8151611d438161251c565b600060208284031215611ff6578081fd5b5035919050565b6000806040838503121561200f578182fd5b82359150602083013561202181612504565b809150509250929050565b60006020828403121561203d578081fd5b81356001600160e01b031981168114611d43578182fd5b60008060408385031215612066578182fd5b50508035926020909101359150565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516120ad81601785016020880161247a565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120de81602884016020880161247a565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b8281101561219c5781518051855286810151878601528581015186860152606080820151908601526080908101519085015260a09093019290850190600101612158565b5091979650505050505050565b901515815260200190565b90815260200190565b60006020825282518060208401526121dc81604085016020870161247a565b601f01601f19169190910160400192915050565b6020808252601390820152722632b9b9902a3430b71026b4b7102a37b5b2b760691b604082015260600190565b6020808252818101527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604082015260600190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b6020808252601690820152752832b934b7b2102a34b6b2902634b6b4ba30ba34b7b760511b604082015260600190565b6020808252600f908201526e496e76616c6964205061636b61676560881b604082015260600190565b60208082526003908201526203078360ec1b604082015260600190565b6020808252600c908201526b109027b7363c9020b236b4b760a11b604082015260600190565b60208082526019908201527f5374616b696e673a204f6e6c7920546f6b656e204f776e657200000000000000604082015260600190565b60208082526011908201527027b7363c902a37b5b2b71029ba30b5b2b960791b604082015260600190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b948552602085019390935260408401919091526060830152608082015260a00190565b60405181810167ffffffffffffffff81118282101715612404576124046124ee565b604052919050565b6000821982111561241f5761241f6124d8565b500190565b60008261243f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561245e5761245e6124d8565b500290565b600082821015612475576124756124d8565b500390565b60005b8381101561249557818101518382015260200161247d565b83811115610dda5750506000910152565b6000816124b5576124b56124d8565b506000190190565b60006000198214156124d1576124d16124d8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461251957600080fd5b50565b801515811461251957600080fdfea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122029ed631bca234f4fc3c29efc11cfce0f188426b24f27b9ecd524508cd8b5dc4e64736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004d9b8203d4e88bbe84a31bd51912015710a00aae000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
-----Decoded View---------------
Arg [0] : _collectionAddress (address): 0x4d9B8203D4E88BbE84A31BD51912015710A00aae
Arg [1] : _rewardToken (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004d9b8203d4e88bbe84a31bd51912015710a00aae
Arg [1] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Loading...
Loading
Loading...
Loading
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.