Token Marinated UMAMI
Overview ERC20
Price
$0.00 @ 0.000000 ETH
Fully Diluted Market Cap
Total Supply:
494,783.967378 mUMAMI
Holders:
35,449 addresses
Contract:
Decimals:
9
Balance
0.002 mUMAMIValue
$0.00
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
MarinateV2
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GNU GPLv3 pragma solidity ^0.8.0; //////////////////////////////////////////////////////////////////////////////// // // // // // #@@@@@@@@@@@@&, // // .@@@@@ .@@@@@@@@@@@@@@@@@@@* // // %@@@, @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // *@@@# .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // *@@@% &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // // // (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@, // // (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@, // // // // @@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ // // &@@@@@@@ #@@@@@@@. ,@@@@@@@, .@@@@@@@/ @@@@ // // // // @@@@@ @@@% *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@ @@@@ %@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // .@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // @@@@@ &@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ // // (&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&( // // // // // //////////////////////////////////////////////////////////////////////////////// // Libraries import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import { ContractWhitelist } from "./ContractWhitelist.sol"; // Interfaces import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IERC721 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import { IERC721Receiver } from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; /// @title Umami MarinateV2 Staking /// @author 0xtoki luffyowls contract MarinateV2 is AccessControl, IERC721Receiver, ReentrancyGuard, ERC20, ContractWhitelist { using SafeERC20 for IERC20; /************************************************ * STORAGE ***********************************************/ /// @notice ttal token rewards mapping(address => uint256) public totalTokenRewardsPerStake; /// @notice number of reward epochs paid to marinator mapping(address => mapping(address => uint256)) public paidTokenRewardsPerStake; /// @notice the multiplier percentage of an nft /// the multiplier amount for that nft collection represented as a percentage with base 10000 -> 5% = 500 mapping(address => uint256) public nftMultiplier; /// @notice if the user has an nft staked mapping(address => mapping(address => bool)) public isNFTStaked; /// @notice if the token is an approved reward token mapping(address => bool) public isApprovedRewardToken; /// @notice if the token is an approved NFT for staking mapping(address => bool) public isApprovedMultiplierNFT; /// @notice the marinator info for a marinator mapping(address => Marinator) public marinatorInfo; /// @notice rewards due to be paid to marinator mapping(address => mapping(address => uint256)) public toBePaid; /// @notice an array of reward tokens to issue rewards in address[] public rewardTokens; /// @notice an array of multiplier tokens to use for multiplying the reward address[] public multiplierNFTs; /// @notice is staking enabled bool public stakeEnabled; /// @notice is nft staking enabled bool public multiplierStakingEnabled; /// @notice are withdrawals enabled bool public withdrawEnabled; /// @notice allow early withdrawals from staking multiplier bool public multiplierWithdrawEnabled; /// @notice if transfering mUMAMI is enabled bool public transferEnabled; /// @notice allow payment of rewards bool public payRewardsEnabled; /// @notice total UMAMI staked uint256 public totalStaked; /// @notice total staked taking into consideration multipliers uint256 public totalMultipliedStaked; /// @notice scale used for calcs uint256 public SCALE; /// @notice deposit upper limit uint256 public depositLimit; /************************************************ * IMMUTABLES & CONSTANTS ***********************************************/ /// @notice the admin role hash bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); /// @notice for base calculations uint256 public constant BASE = 10000; /// @notice address of the UMAMI token address public immutable UMAMI; /************************************************ * STRUCTS ***********************************************/ struct Marinator { uint256 amount; uint256 multipliedAmount; } /************************************************ * EVENTS ***********************************************/ event Stake(address addr, uint256 amount, uint256 multipliedAmount); event StakeMultiplier(address addr, address nft, uint256 tokenId, uint256 multipliedAmount); event Withdraw(address addr, uint256 amount); event WithdrawMultiplier(address addr, address nft, uint256 tokenId, uint256 multipliedAmount); event RewardCollection(address token, address addr, uint256 amount); event RewardAdded(address token, uint256 amount, uint256 rps); event RewardClaimed(address token, address staker, uint256 amount); /************************************************ * CONSTRUCTOR ***********************************************/ constructor( address _UMAMI, string memory name, string memory symbol, uint256 _depositLimit ) ERC20(name, symbol) { UMAMI = _UMAMI; _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(ADMIN_ROLE, msg.sender); rewardTokens.push(_UMAMI); isApprovedRewardToken[_UMAMI] = true; stakeEnabled = true; multiplierStakingEnabled = true; withdrawEnabled = false; multiplierWithdrawEnabled = false; transferEnabled = true; payRewardsEnabled = true; depositLimit = _depositLimit; totalStaked = 0; totalMultipliedStaked = 0; SCALE = 1e40; } /************************************************ * DEPOSIT & WITHDRAW ***********************************************/ /** * @notice stake a multiplier nft * @param nft the address of the NFT contract * @param tokenId the tokenId of the nft to stake */ function stakeMultiplier(address nft, uint256 tokenId) external isEligibleSender { require(multiplierStakingEnabled, "NFT staking not enabled"); require(isApprovedMultiplierNFT[nft], "Unapproved NFT"); require(!isNFTStaked[msg.sender][nft], "NFT already staked"); // stake nft multiplier IERC721(nft).safeTransferFrom(msg.sender, address(this), tokenId); isNFTStaked[msg.sender][nft] = true; // update existing marinated amount Marinator memory info = marinatorInfo[msg.sender]; uint256 newMultipliedAmount = _getMultipliedAmount(info.amount, msg.sender); // update marinator info marinatorInfo[msg.sender] = Marinator({ amount: info.amount, multipliedAmount: newMultipliedAmount }); // update totals totalMultipliedStaked -= info.multipliedAmount; totalMultipliedStaked += newMultipliedAmount; // store the sender's info emit StakeMultiplier(msg.sender, nft, tokenId, newMultipliedAmount); } /** * @notice withdraw a multiplier nft * @param nft the address of the NFT contract * @param tokenId the tokenId of the nft to stake */ function withdrawMultiplier(address nft, uint256 tokenId) external { require(multiplierWithdrawEnabled, "Withdraw not enabled"); require(isApprovedMultiplierNFT[nft], "Unapproved NFT"); require(isNFTStaked[msg.sender][nft], "NFT not staked"); Marinator memory info = marinatorInfo[msg.sender]; isNFTStaked[msg.sender][nft] = false; IERC721(nft).safeTransferFrom(address(this), msg.sender, tokenId); uint256 newMultipliedAmount = _getMultipliedAmount(info.amount, msg.sender); // update existing marinated amount marinatorInfo[msg.sender] = Marinator({ amount: info.amount, multipliedAmount: newMultipliedAmount }); // update totals totalMultipliedStaked -= info.multipliedAmount; totalMultipliedStaked += newMultipliedAmount; emit WithdrawMultiplier(msg.sender, nft, tokenId, newMultipliedAmount); } /** * @notice stake UMAMI * @param amount the amount of umami to stake */ function stake(uint256 amount) external isEligibleSender { require(stakeEnabled, "Staking not enabled"); require(amount > 0, "Invalid stake amount"); require(totalStaked < depositLimit, "Deposit capacity reached"); Marinator memory info = marinatorInfo[msg.sender]; if (info.amount == 0) { // new user - not eligible for any previous rewards on any token _resetPaidRewards(msg.sender); } else { _collectRewards(msg.sender); } IERC20(UMAMI).safeTransferFrom(msg.sender, address(this), amount); _mint(msg.sender, amount); uint256 multipliedAmount = _getMultipliedAmount(amount, msg.sender); // store the sender's info marinatorInfo[msg.sender] = Marinator({ amount: info.amount + amount, multipliedAmount: info.multipliedAmount + multipliedAmount }); totalStaked += amount; totalMultipliedStaked += multipliedAmount; emit Stake(msg.sender, amount, multipliedAmount); } /** * @notice withdraw staked UMAMI and burn mUMAMI */ function withdraw() public nonReentrant { require(withdrawEnabled, "Withdraw not enabled"); Marinator memory info = marinatorInfo[msg.sender]; require(info.multipliedAmount > 0, "No staked balance"); _collectRewards(msg.sender); _payRewards(msg.sender); delete marinatorInfo[msg.sender]; totalMultipliedStaked -= info.multipliedAmount; totalStaked -= info.amount; IERC20(UMAMI).safeTransfer(msg.sender, info.amount); _burn(msg.sender, info.amount); emit Withdraw(msg.sender, info.amount); } /************************************************ * REWARDS ***********************************************/ /** * @notice claim rewards */ function claimRewards() public nonReentrant { _collectRewards(msg.sender); _payRewards(msg.sender); } /** * @notice adds a reward token amount * @param token the token address of the reward * @param amount the amount of the token */ function addReward(address token, uint256 amount) external nonReentrant { require(isApprovedRewardToken[token], "Token is not approved"); require(totalMultipliedStaked > 0, "Total multiplied staked zero"); IERC20(token).safeTransferFrom(msg.sender, address(this), amount); uint256 rewardPerStake = (amount * SCALE) / totalMultipliedStaked; require(rewardPerStake > 0, "Insufficient reward per stake"); totalTokenRewardsPerStake[token] += rewardPerStake; emit RewardAdded(token, amount, rewardPerStake); } /** * @notice pay rewards to a marinator */ function _payRewards(address user) private { require(payRewardsEnabled, "Pay rewards disabled"); for (uint256 i = 0; i < rewardTokens.length; i++) { address token = rewardTokens[i]; uint256 amount = toBePaid[token][user]; IERC20(token).safeTransfer(user, amount); emit RewardClaimed(token, user, amount); delete toBePaid[token][user]; } } /** * @notice reset rewards for user * @param user the user to reset rewards paid for */ function _resetPaidRewards(address user) private { for (uint256 i = 0; i < rewardTokens.length; i++) { address token = rewardTokens[i]; paidTokenRewardsPerStake[token][user] = totalTokenRewardsPerStake[token]; } } /** * @notice collect rewards from a marinator * @param user the amount of umami to stake */ function _collectRewards(address user) private { for (uint256 i = 0; i < rewardTokens.length; i++) { _collectRewardsForToken(rewardTokens[i], user); } } /** * @notice collect rewards for a token * @param token the token to collect rewards for * @param user the amount of umami to stake */ function _collectRewardsForToken(address token, address user) private { Marinator memory info = marinatorInfo[user]; if (info.multipliedAmount > 0) { uint256 owedPerUnitStake = totalTokenRewardsPerStake[token] - paidTokenRewardsPerStake[token][user]; uint256 totalRewards = (info.multipliedAmount * owedPerUnitStake) / SCALE; paidTokenRewardsPerStake[token][user] = totalTokenRewardsPerStake[token]; toBePaid[token][user] += totalRewards; } } /************************************************ * MUTATORS ***********************************************/ /** * @notice add an approved reward token to be paid * @param token the address of the token to be paid in */ function addApprovedRewardToken(address token) external onlyAdmin { require(!isApprovedRewardToken[token], "Reward token exists"); isApprovedRewardToken[token] = true; rewardTokens.push(token); } /** * @notice remove a reward token * @param token the address of the token to remove */ function removeApprovedRewardToken(address token) external onlyAdmin { require(isApprovedRewardToken[token], "Reward token does not exist"); for (uint256 i = 0; i < rewardTokens.length; i++) { if (rewardTokens[i] == token) { rewardTokens[i] = rewardTokens[rewardTokens.length - 1]; rewardTokens.pop(); isApprovedRewardToken[token] = false; } } } /** * @notice add an nft multiplier token * @param token the address of the token to add * @param multiplier the multiplier amount for that nft collection represented as a percentaage with base 10000 * eg. a multiplier of 500 will be 5% */ function addApprovedMultiplierToken(address token, uint256 multiplier) external onlyAdmin { require(!isApprovedMultiplierNFT[token], "Approved NFT exists"); isApprovedMultiplierNFT[token] = true; nftMultiplier[token] = multiplier; multiplierNFTs.push(token); } /** * @notice remove a nft multiplier token * @param token the address of the token to remove */ function removeApprovedMultiplierToken(address token) external onlyAdmin { require(isApprovedMultiplierNFT[token], "Approved NFT does not exist"); for (uint256 i = 0; i < multiplierNFTs.length; i++) { if (multiplierNFTs[i] == token) { multiplierNFTs[i] = multiplierNFTs[multiplierNFTs.length - 1]; multiplierNFTs.pop(); isApprovedMultiplierNFT[token] = false; } } } /** * @notice set the scale * @param _scale scale */ function setScale(uint256 _scale) external onlyAdmin { SCALE = _scale; } /** * @notice set staking enabled * @param enabled enabled */ function setStakeEnabled(bool enabled) external onlyAdmin { stakeEnabled = enabled; } /** * @notice set multiplier staking enabled * @param enabled enabled */ function setMultiplierStakeEnabled(bool enabled) external onlyAdmin { multiplierStakingEnabled = enabled; } /** * @notice set withdrawal enabled * @param enabled enabled */ function setStakingWithdrawEnabled(bool enabled) external onlyAdmin { withdrawEnabled = enabled; } /** * @notice set multiplier withdrawal enabled * @param enabled enabled */ function setMultiplierWithdrawEnabled(bool enabled) external onlyAdmin { multiplierWithdrawEnabled = enabled; } /** * @notice set transfer enabled * @param enabled enabled */ function setTransferEnabled(bool enabled) external onlyAdmin { transferEnabled = enabled; } /** * @notice set pay rewards enabled * @param enabled enabled */ function setPayRewardsEnabled(bool enabled) external onlyAdmin { payRewardsEnabled = enabled; } /** * @notice set deposit limit * @param limit upper limit for deposits */ function setDepositLimit(uint256 limit) external onlyAdmin { depositLimit = limit; } /************************************************ * VIEWS ***********************************************/ /** * @notice get the multiplied amount of total share * @param amount the unmultiplied amount * @return multipliedAmount the reward amount considering the multiplier nft's the user has staked */ function _getMultipliedAmount(uint256 amount, address account) private view returns (uint256 multipliedAmount) { if (!isWhitelisted(account)) { return 0; } uint256 multiplier = BASE; for (uint256 i = 0; i < multiplierNFTs.length; i++) { if (isNFTStaked[account][multiplierNFTs[i]]) { multiplier += nftMultiplier[multiplierNFTs[i]]; } } multipliedAmount = (amount * SCALE * multiplier) / BASE; } /** * @notice get the available token rewards * @param staker the marinator * @param token the token to check for * @return totalRewards - the available rewards for that token and marinator */ function getAvailableTokenRewards(address staker, address token) external view returns (uint256 totalRewards) { Marinator memory info = marinatorInfo[staker]; uint256 owedPerUnitStake = totalTokenRewardsPerStake[token] - paidTokenRewardsPerStake[token][staker]; uint256 pendingRewards = (info.multipliedAmount * owedPerUnitStake) / SCALE; totalRewards = pendingRewards + toBePaid[token][staker]; } /************************************************ * ERC20 OVERRIDES ***********************************************/ /** * @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. */ function _beforeTokenTransfer( address from, address to, uint256 ) internal virtual override { require(transferEnabled, "Transfer disabled"); if (from == address(0) || to == address(0)) { return; } else { Marinator memory info = marinatorInfo[to]; if (info.amount == 0) { _resetPaidRewards(to); } if (isWhitelisted(from)) { _collectRewards(from); } if (isWhitelisted(to)) { _collectRewards(to); } } } /** * @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. */ function _afterTokenTransfer( address from, address to, uint256 ) internal virtual override { if (from == address(0) || to == address(0)) { return; } else { uint256 fromBalance = balanceOf(from); uint256 toBalance = balanceOf(to); Marinator memory marinatorFrom = marinatorInfo[from]; Marinator memory marinatorTo = marinatorInfo[to]; // get new multiplied amounts uint256 multipliedFromAmount = _getMultipliedAmount(fromBalance, from); uint256 multipliedToAmount = _getMultipliedAmount(toBalance, to); // calculate total old multiplied amounts uint256 oldMultipliedAmount = marinatorFrom.multipliedAmount + marinatorTo.multipliedAmount; uint256 newMultipliedAmount = multipliedFromAmount + multipliedToAmount; // calculate new total multiplied staked if (isWhitelisted(from) && isWhitelisted(to)) { totalMultipliedStaked -= oldMultipliedAmount; totalMultipliedStaked += newMultipliedAmount; } else { if (!isWhitelisted(to)) { totalMultipliedStaked -= marinatorFrom.multipliedAmount; totalMultipliedStaked += multipliedFromAmount; } if (!isWhitelisted(from)) { totalMultipliedStaked -= marinatorTo.multipliedAmount; totalMultipliedStaked += multipliedToAmount; } } // update marinator info marinatorInfo[from] = Marinator({ amount: fromBalance, multipliedAmount: multipliedFromAmount }); marinatorInfo[to] = Marinator({ amount: toBalance, multipliedAmount: multipliedToAmount }); } } /** * @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 9; } /************************************************ * ERC721 HANDLERS ***********************************************/ /** * @notice ERC721 transfer */ function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { return MarinateV2.onERC721Received.selector; } /************************************************ * ADMIN ***********************************************/ /** * @notice migrate a token to a different address * @param token the token address * @param destination the token destination * @param amount the token amount */ function migrateToken( address token, address destination, uint256 amount ) external onlyAdmin { uint256 total = 0; if (amount == 0) { total = IERC20(token).balanceOf(address(this)); } else { total = amount; } IERC20(token).safeTransfer(destination, total); } /** * @notice recover eth */ function recoverEth() external onlyAdmin { (bool success, ) = msg.sender.call{ value: address(this).balance }(""); require(success, "Withdraw failed"); } /************************************************ * MODIFIERS ***********************************************/ modifier onlyAdmin() { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); _; } }
// 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()); } } }
// 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 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: GNU GPLv3 pragma solidity ^0.8.0; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; /// @title ContractWhitelist /// @notice A helper contract that lets you add a list of whitelisted contracts that should be able to interact with restricted functions abstract contract ContractWhitelist is Ownable { /// @dev contract => whitelisted or not mapping(address => bool) public whitelistedContracts; /*==== SETTERS ====*/ /// @dev add to the contract whitelist /// @param _contract the address of the contract to add to the contract whitelist /// @return whether the contract was successfully added to the whitelist function addToContractWhitelist(address _contract) external onlyOwner returns (bool) { require(isContract(_contract), "ContractWhitelist: Address must be a contract address"); require(!whitelistedContracts[_contract], "ContractWhitelist: Contract already whitelisted"); whitelistedContracts[_contract] = true; emit AddToContractWhitelist(_contract); return true; } /// @dev remove from the contract whitelist /// @param _contract the address of the contract to remove from the contract whitelist /// @return whether the contract was successfully removed from the whitelist function removeFromContractWhitelist(address _contract) external returns (bool) { require(whitelistedContracts[_contract], "ContractWhitelist: Contract not whitelisted"); whitelistedContracts[_contract] = false; emit RemoveFromContractWhitelist(_contract); return true; } /* ==== MODIFIERS ==== */ // Modifier is eligible sender modifier modifier isEligibleSender() { require(isWhitelisted(msg.sender), "ContractWhitelist: Contract must be whitelisted"); _; } /*==== VIEWS ====*/ /// @dev is the reciever whitelisted /// @param addr the address to check function isWhitelisted(address addr) public view returns (bool) { if (isContract(addr)) { return whitelistedContracts[addr]; } return true; } /// @dev checks for contract or eoa addresses /// @param addr the address to check /// @return whether the passed address is a contract address function isContract(address addr) public view returns (bool) { uint256 size; assembly { size := extcodesize(addr) } return size > 0; } /*==== EVENTS ====*/ event AddToContractWhitelist(address indexed _contract); event RemoveFromContractWhitelist(address indexed _contract); }
// 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/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/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // 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 (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 (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/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/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 (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 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_UMAMI","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"_depositLimit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_contract","type":"address"}],"name":"AddToContractWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_contract","type":"address"}],"name":"RemoveFromContractWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rps","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardCollection","type":"event"},{"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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"multipliedAmount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"multipliedAmount","type":"uint256"}],"name":"StakeMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"multipliedAmount","type":"uint256"}],"name":"WithdrawMultiplier","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SCALE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UMAMI","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"addApprovedMultiplierToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"addApprovedRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"addToContractWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"getAvailableTokenRewards","outputs":[{"internalType":"uint256","name":"totalRewards","type":"uint256"}],"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":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isApprovedMultiplierNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isApprovedRewardToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isNFTStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"marinatorInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"multipliedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrateToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"multiplierNFTs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiplierStakingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiplierWithdrawEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nftMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"paidTokenRewardsPerStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payRewardsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recoverEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"removeApprovedMultiplierToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"removeApprovedRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"removeFromContractWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setDepositLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setMultiplierStakeEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setMultiplierWithdrawEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setPayRewardsEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_scale","type":"uint256"}],"name":"setScale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setStakeEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setStakingWithdrawEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setTransferEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakeMultiplier","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"toBePaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMultipliedStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalTokenRewardsPerStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162004412380380620044128339810160408190526200003491620003d1565b600180558251839083906200005190600590602085019062000278565b5080516200006790600690602084019062000278565b505050620000846200007e6200017260201b60201c565b62000176565b6001600160601b0319606085901b16608052620000a3600033620001c8565b620000cf7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620001d8565b6011805460018082019092557f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b039690961695861790556000948552600d60205260408520805460ff191690911790556013805465ffffffffffff19166501010000010117905560175550506014819055601555701d6329f1c35ca4bfabb9f5610000000000601655620004b2565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001d48282620001d8565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620001d4576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002343390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b82805462000286906200045f565b90600052602060002090601f016020900481019282620002aa5760008555620002f5565b82601f10620002c557805160ff1916838001178555620002f5565b82800160010185558215620002f5579182015b82811115620002f5578251825591602001919060010190620002d8565b506200030392915062000307565b5090565b5b8082111562000303576000815560010162000308565b600082601f8301126200032f578081fd5b81516001600160401b03808211156200034c576200034c6200049c565b604051601f8301601f19908116603f011681019082821181831017156200037757620003776200049c565b8160405283815260209250868385880101111562000393578485fd5b8491505b83821015620003b6578582018301518183018401529082019062000397565b83821115620003c757848385830101525b9695505050505050565b60008060008060808587031215620003e7578384fd5b84516001600160a01b0381168114620003fe578485fd5b60208601519094506001600160401b03808211156200041b578485fd5b62000429888389016200031e565b945060408701519150808211156200043f578384fd5b506200044e878288016200031e565b606096909601519497939650505050565b600181811c908216806200047457607f821691505b602082108114156200049657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c613f33620004df6000396000818161052e015281816111a20152611da90152613f336000f3fe608060405234801561001057600080fd5b506004361061041d5760003560e01c8063715018a61161022b578063a9059cbb11610130578063c5644c86116100b8578063dd62ed3e11610087578063dd62ed3e146109ff578063ec342ad014610a38578063eced552614610a41578063ecf7085814610a4a578063f2fde38b14610a5357600080fd5b8063c5644c86146109b0578063ca49ff65146109c3578063d547741f146109d6578063db0e9d66146109e957600080fd5b8063bcdb446b116100ff578063bcdb446b14610944578063bdc8144b1461094c578063bfd994ce1461095f578063bfe0bc9814610972578063c3d9ed391461099d57600080fd5b8063a9059cbb146108e0578063acc3a006146108f3578063afb27a7514610906578063bc35e3fa1461091957600080fd5b806391d14854116101b35780639fe9f623116101825780639fe9f6231461088c5780639feb8f501461089f578063a217fddf146108b2578063a457c2d7146108ba578063a694fc3a146108cd57600080fd5b806391d148541461082257806393bfa2821461083557806395d89b41146108485780639b5f61a41461085057600080fd5b8063817b1cd2116101fa578063817b1cd2146107bf57806382461948146107c85780638c6fd36b146107db5780638da5cb5b146107fe5780638fa9484d1461080f57600080fd5b8063715018a61461077c57806372c215971461078457806375b238fc146107975780637bb7bed1146107ac57600080fd5b8063372500ab116103315780635526b05f116102b95780636580221f116102885780636580221f146106f85780636f5d3a5a1461070b578063700d27cf1461071e5780637095bffc1461073057806370a082311461075357600080fd5b80635526b05f1461069b57806355d84c1c146106c95780635d80dbe9146106dc5780635f46c8cc146106ef57600080fd5b80633af32abf116103005780633af32abf1461064b5780633b17c7361461065e5780633ccfd60b1461066b5780633edc3519146106735780634cd412d51461068657600080fd5b8063372500ab146105fa578063391feebb1461060257806339509351146106255780633abfbfef1461063857600080fd5b806318160ddd116103b4578063248a9ca311610383578063248a9ca31461058e5780632f2ff15d146105b1578063311d8a51146105c4578063313ce567146105d857806336568abe146105e757600080fd5b806318160ddd146105215780631eee01b0146105295780632287e96a1461056857806323b872dd1461057b57600080fd5b8063095ea7b3116103f0578063095ea7b3146104a25780630b09e5fb146104b5578063150b7a02146104d5578063162790551461050d57600080fd5b806301b6c9691461042257806301ffc9a71461045557806306fdde031461047857806308a8c0e01461048d575b600080fd5b6104426104303660046139e7565b60096020526000908152604090205481565b6040519081526020015b60405180910390f35b610468610463366004613b9f565b610a66565b604051901515815260200161044c565b610480610a9d565b60405161044c9190613c94565b6104a061049b366004613b04565b610b2f565b005b6104686104b0366004613b04565b610c42565b6104426104c33660046139e7565b600b6020526000908152604090205481565b6104f46104e3366004613a6e565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161044c565b61046861051b3660046139e7565b3b151590565b600454610442565b6105507f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161044c565b6013546104689062010000900460ff1681565b610468610589366004613a33565b610c58565b61044261059c366004613b65565b60009081526020819052604090206001015490565b6104a06105bf366004613b7d565b610d04565b601354610468906301000000900460ff1681565b6040516009815260200161044c565b6104a06105f5366004613b7d565b610d2f565b6104a0610dad565b6104686106103660046139e7565b60086020526000908152604090205460ff1681565b610468610633366004613b04565b610ded565b6104a06106463660046139e7565b610e29565b6104686106593660046139e7565b611022565b6013546104689060ff1681565b6104a0611052565b6104a0610681366004613b65565b61121b565b60135461046890640100000000900460ff1681565b6104686106a9366004613a01565b600c60209081526000928352604080842090915290825290205460ff1681565b6105506106d7366004613b65565b611254565b6104a06106ea366004613b2d565b61127e565b61044260155481565b6104a0610706366004613b2d565b6112cc565b6104a06107193660046139e7565b61131c565b60135461046890610100900460ff1681565b61046861073e3660046139e7565b600d6020526000908152604090205460ff1681565b6104426107613660046139e7565b6001600160a01b031660009081526002602052604090205490565b6104a0611515565b6104a0610792366004613b04565b61154b565b610442600080516020613ede83398151915281565b6105506107ba366004613b65565b6117cb565b61044260145481565b6104a06107d6366004613b2d565b6117db565b6104686107e93660046139e7565b600e6020526000908152604090205460ff1681565b6007546001600160a01b0316610550565b6104a061081d366004613b2d565b611822565b610468610830366004613b7d565b611874565b6104a0610843366004613a33565b61189d565b610480611973565b61087761085e3660046139e7565b600f602052600090815260409020805460019091015482565b6040805192835260208301919091520161044c565b6104a061089a366004613b2d565b611982565b6104a06108ad366004613b04565b6119d6565b610442600081565b6104686108c8366004613b04565b611bb4565b6104a06108db366004613b65565b611c4d565b6104686108ee366004613b04565b611eb2565b6104686109013660046139e7565b611ebf565b6104a0610914366004613b04565b61202b565b610442610927366004613a01565b601060209081526000928352604080842090915290825290205481565b6104a06122de565b6104a061095a366004613b65565b61239f565b6104a061096d366004613b2d565b6123d8565b610442610980366004613a01565b600a60209081526000928352604080842090915290825290205481565b6104686109ab3660046139e7565b61242e565b6104426109be366004613a01565b6124f8565b6104a06109d13660046139e7565b6125b8565b6104a06109e4366004613b7d565b6126b1565b6013546104689065010000000000900460ff1681565b610442610a0d366004613a01565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61044261271081565b61044260165481565b61044260175481565b6104a0610a613660046139e7565b6126d7565b60006001600160e01b03198216637965db0b60e01b1480610a9757506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060058054610aac90613e63565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad890613e63565b8015610b255780601f10610afa57610100808354040283529160200191610b25565b820191906000526020600020905b815481529060010190602001808311610b0857829003601f168201915b5050505050905090565b610b47600080516020613ede83398151915233611874565b610b6c5760405162461bcd60e51b8152600401610b6390613d4b565b60405180910390fd5b6001600160a01b0382166000908152600e602052604090205460ff1615610bcb5760405162461bcd60e51b8152602060048201526013602482015272417070726f766564204e46542065786973747360681b6044820152606401610b63565b6001600160a01b039091166000818152600e60209081526040808320805460ff19166001908117909155600b90925282209390935560128054938401815590527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344490910180546001600160a01b0319169091179055565b6000610c4f33848461276f565b50600192915050565b6000610c65848484612893565b6001600160a01b038416600090815260036020908152604080832033845290915290205482811015610cea5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610b63565b610cf7853385840361276f565b60019150505b9392505050565b600082815260208190526040902060010154610d208133612a72565b610d2a8383612ad6565b505050565b6001600160a01b0381163314610d9f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b63565b610da98282612b5a565b5050565b60026001541415610dd05760405162461bcd60e51b8152600401610b6390613d7b565b6002600155610dde33612bbf565b610de733612c1d565b60018055565b3360008181526003602090815260408083206001600160a01b03871684529091528120549091610c4f918590610e24908690613db2565b61276f565b610e41600080516020613ede83398151915233611874565b610e5d5760405162461bcd60e51b8152600401610b6390613d4b565b6001600160a01b0381166000908152600e602052604090205460ff16610ec55760405162461bcd60e51b815260206004820152601b60248201527f417070726f766564204e465420646f6573206e6f7420657869737400000000006044820152606401610b63565b60005b601254811015610da957816001600160a01b031660128281548110610efd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156110105760128054610f2890600190613e09565b81548110610f4657634e487b7160e01b600052603260045260246000fd5b600091825260209091200154601280546001600160a01b039092169183908110610f8057634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506012805480610fcd57634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0384168252600e905260409020805460ff191690555b8061101a81613e9e565b915050610ec8565b6000813b1561104a57506001600160a01b031660009081526008602052604090205460ff1690565b506001919050565b600260015414156110755760405162461bcd60e51b8152600401610b6390613d7b565b600260015560135462010000900460ff166110c95760405162461bcd60e51b815260206004820152601460248201527315da5d1a191c985dc81b9bdd08195b98589b195960621b6044820152606401610b63565b336000908152600f6020908152604091829020825180840190935280548352600101549082018190526111325760405162461bcd60e51b81526020600482015260116024820152704e6f207374616b65642062616c616e636560781b6044820152606401610b63565b61113b33612bbf565b61114433612c1d565b336000908152600f6020908152604082208281556001018290558201516015805491929091611174908490613e09565b909155505080516014805460009061118d908490613e09565b909155505080516111ca906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903390612d55565b6111d8338260000151612db8565b80516040805133815260208101929092527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a15060018055565b611233600080516020613ede83398151915233611874565b61124f5760405162461bcd60e51b8152600401610b6390613d4b565b601655565b6012818154811061126457600080fd5b6000918252602090912001546001600160a01b0316905081565b611296600080516020613ede83398151915233611874565b6112b25760405162461bcd60e51b8152600401610b6390613d4b565b601380549115156101000261ff0019909216919091179055565b6112e4600080516020613ede83398151915233611874565b6113005760405162461bcd60e51b8152600401610b6390613d4b565b60138054911515620100000262ff000019909216919091179055565b611334600080516020613ede83398151915233611874565b6113505760405162461bcd60e51b8152600401610b6390613d4b565b6001600160a01b0381166000908152600d602052604090205460ff166113b85760405162461bcd60e51b815260206004820152601b60248201527f52657761726420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401610b63565b60005b601154811015610da957816001600160a01b0316601182815481106113f057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415611503576011805461141b90600190613e09565b8154811061143957634e487b7160e01b600052603260045260246000fd5b600091825260209091200154601180546001600160a01b03909216918390811061147357634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060118054806114c057634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0384168252600d905260409020805460ff191690555b8061150d81613e9e565b9150506113bb565b6007546001600160a01b0316331461153f5760405162461bcd60e51b8152600401610b6390613d16565b6115496000612f19565b565b6013546301000000900460ff1661159b5760405162461bcd60e51b815260206004820152601460248201527315da5d1a191c985dc81b9bdd08195b98589b195960621b6044820152606401610b63565b6001600160a01b0382166000908152600e602052604090205460ff166115f45760405162461bcd60e51b815260206004820152600e60248201526d155b985c1c1c9bdd99590813919560921b6044820152606401610b63565b336000908152600c602090815260408083206001600160a01b038616845290915290205460ff166116585760405162461bcd60e51b815260206004820152600e60248201526d139195081b9bdd081cdd185ad95960921b6044820152606401610b63565b336000818152600f60209081526040808320815180830183528154815260019091015481840152848452600c83528184206001600160a01b038816808652935292819020805460ff1916905551632142170760e11b8152919290916342842e0e916116ca913091908790600401613c70565b600060405180830381600087803b1580156116e457600080fd5b505af11580156116f8573d6000803e3d6000fd5b50505050600061170c826000015133612f6b565b604080518082018252845181526020808201848152336000908152600f83529384209251835551600190920191909155840151601580549394509092909190611756908490613e09565b92505081905550806015600082825461176f9190613db2565b9091555050604080513381526001600160a01b0386166020820152908101849052606081018290527f45d2a91600dc69305825e109ffd66b221ea47086a5ac4ed7ce4afde017f78bc6906080015b60405180910390a150505050565b6011818154811061126457600080fd5b6117f3600080516020613ede83398151915233611874565b61180f5760405162461bcd60e51b8152600401610b6390613d4b565b6013805460ff1916911515919091179055565b61183a600080516020613ede83398151915233611874565b6118565760405162461bcd60e51b8152600401610b6390613d4b565b6013805491151563010000000263ff00000019909216919091179055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6118b5600080516020613ede83398151915233611874565b6118d15760405162461bcd60e51b8152600401610b6390613d4b565b600081611956576040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561191757600080fd5b505afa15801561192b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194f9190613bc7565b9050611959565b50805b61196d6001600160a01b0385168483612d55565b50505050565b606060068054610aac90613e63565b61199a600080516020613ede83398151915233611874565b6119b65760405162461bcd60e51b8152600401610b6390613d4b565b601380549115156401000000000264ff0000000019909216919091179055565b600260015414156119f95760405162461bcd60e51b8152600401610b6390613d7b565b60026001556001600160a01b0382166000908152600d602052604090205460ff16611a5e5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881a5cc81b9bdd08185c1c1c9bdd9959605a1b6044820152606401610b63565b600060155411611ab05760405162461bcd60e51b815260206004820152601c60248201527f546f74616c206d756c7469706c696564207374616b6564207a65726f000000006044820152606401610b63565b611ac56001600160a01b038316333084613094565b600060155460165483611ad89190613dea565b611ae29190613dca565b905060008111611b345760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e742072657761726420706572207374616b650000006044820152606401610b63565b6001600160a01b03831660009081526009602052604081208054839290611b5c908490613db2565b9091555050604080516001600160a01b0385168152602081018490529081018290527f6a6f77044107a33658235d41bedbbaf2fe9ccdceb313143c947a5e76e1ec84749060600160405180910390a150506001805550565b3360009081526003602090815260408083206001600160a01b038616845290915281205482811015611c365760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610b63565b611c43338585840361276f565b5060019392505050565b611c5633611022565b611c725760405162461bcd60e51b8152600401610b6390613cc7565b60135460ff16611cba5760405162461bcd60e51b815260206004820152601360248201527214dd185ada5b99c81b9bdd08195b98589b1959606a1b6044820152606401610b63565b60008111611d015760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081cdd185ad948185b5bdd5b9d60621b6044820152606401610b63565b60175460145410611d545760405162461bcd60e51b815260206004820152601860248201527f4465706f736974206361706163697479207265616368656400000000000000006044820152606401610b63565b336000908152600f60209081526040918290208251808401909352805480845260019091015491830191909152611d9357611d8e336130b5565b611d9c565b611d9c33612bbf565b611dd16001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085613094565b611ddb3383613130565b6000611de78333612f6b565b90506040518060400160405280848460000151611e049190613db2565b8152602001828460200151611e199190613db2565b9052336000908152600f6020908152604082208351815592015160019092019190915560148054859290611e4e908490613db2565b925050819055508060156000828254611e679190613db2565b909155505060408051338152602081018590529081018290527f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b69060600160405180910390a1505050565b6000610c4f338484612893565b6007546000906001600160a01b03163314611eec5760405162461bcd60e51b8152600401610b6390613d16565b813b611f585760405162461bcd60e51b815260206004820152603560248201527f436f6e747261637457686974656c6973743a2041646472657373206d757374206044820152746265206120636f6e7472616374206164647265737360581b6064820152608401610b63565b6001600160a01b03821660009081526008602052604090205460ff1615611fd95760405162461bcd60e51b815260206004820152602f60248201527f436f6e747261637457686974656c6973743a20436f6e747261637420616c726560448201526e18591e481dda1a5d195b1a5cdd1959608a1b6064820152608401610b63565b6001600160a01b038216600081815260086020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a25060015b919050565b61203433611022565b6120505760405162461bcd60e51b8152600401610b6390613cc7565b601354610100900460ff166120a75760405162461bcd60e51b815260206004820152601760248201527f4e4654207374616b696e67206e6f7420656e61626c65640000000000000000006044820152606401610b63565b6001600160a01b0382166000908152600e602052604090205460ff166121005760405162461bcd60e51b815260206004820152600e60248201526d155b985c1c1c9bdd99590813919560921b6044820152606401610b63565b336000908152600c602090815260408083206001600160a01b038616845290915290205460ff16156121695760405162461bcd60e51b815260206004820152601260248201527113919508185b1c9958591e481cdd185ad95960721b6044820152606401610b63565b604051632142170760e11b81526001600160a01b038316906342842e0e9061219990339030908690600401613c70565b600060405180830381600087803b1580156121b357600080fd5b505af11580156121c7573d6000803e3d6000fd5b5050336000818152600c602090815260408083206001600160a01b03891684528252808320805460ff19166001908117909155848452600f83528184208251808401909352805480845291015492820192909252945090925061222991612f6b565b604080518082018252845181526020808201848152336000908152600f83529384209251835551600190920191909155840151601580549394509092909190612273908490613e09565b92505081905550806015600082825461228c9190613db2565b9091555050604080513381526001600160a01b0386166020820152908101849052606081018290527fc3daea287989ddc10f62ff010419ab2227ed3b8c7497506e97a02fa5184c3ec4906080016117bd565b6122f6600080516020613ede83398151915233611874565b6123125760405162461bcd60e51b8152600401610b6390613d4b565b604051600090339047908381818185875af1925050503d8060008114612354576040519150601f19603f3d011682016040523d82523d6000602084013e612359565b606091505b505090508061239c5760405162461bcd60e51b815260206004820152600f60248201526e15da5d1a191c985dc819985a5b1959608a1b6044820152606401610b63565b50565b6123b7600080516020613ede83398151915233611874565b6123d35760405162461bcd60e51b8152600401610b6390613d4b565b601755565b6123f0600080516020613ede83398151915233611874565b61240c5760405162461bcd60e51b8152600401610b6390613d4b565b60138054911515650100000000000265ff000000000019909216919091179055565b6001600160a01b03811660009081526008602052604081205460ff166124aa5760405162461bcd60e51b815260206004820152602b60248201527f436f6e747261637457686974656c6973743a20436f6e7472616374206e6f742060448201526a1dda1a5d195b1a5cdd195960aa1b6064820152608401610b63565b6001600160a01b038216600081815260086020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a2506001919050565b6001600160a01b038083166000818152600f60209081526040808320815180830183528154815260019091015481840152948616808452600a8352818420948452938252808320549383526009909152812054909291839161255a9190613e09565b905060006016548284602001516125719190613dea565b61257b9190613dca565b6001600160a01b038087166000908152601060209081526040808320938b16835292905220549091506125ae9082613db2565b9695505050505050565b6125d0600080516020613ede83398151915233611874565b6125ec5760405162461bcd60e51b8152600401610b6390613d4b565b6001600160a01b0381166000908152600d602052604090205460ff161561264b5760405162461bcd60e51b815260206004820152601360248201527252657761726420746f6b656e2065786973747360681b6044820152606401610b63565b6001600160a01b03166000818152600d60205260408120805460ff191660019081179091556011805491820181559091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319169091179055565b6000828152602081905260409020600101546126cd8133612a72565b610d2a8383612b5a565b6007546001600160a01b031633146127015760405162461bcd60e51b8152600401610b6390613d16565b6001600160a01b0381166127665760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b63565b61239c81612f19565b6001600160a01b0383166127d15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610b63565b6001600160a01b0382166128325760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610b63565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166128f75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610b63565b6001600160a01b0382166129595760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610b63565b612964838383613223565b6001600160a01b038316600090815260026020526040902054818110156129dc5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610b63565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290612a13908490613db2565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612a5f91815260200190565b60405180910390a361196d848484613309565b612a7c8282611874565b610da957612a94816001600160a01b03166014613517565b612a9f836020613517565b604051602001612ab0929190613bfb565b60408051601f198184030181529082905262461bcd60e51b8252610b6391600401613c94565b612ae08282611874565b610da9576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612b163390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612b648282611874565b15610da9576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005b601154811015610da957612c0b60118281548110612bf057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316836136f9565b80612c1581613e9e565b915050612bc2565b60135465010000000000900460ff16612c6f5760405162461bcd60e51b815260206004820152601460248201527314185e481c995dd85c991cc8191a5cd8589b195960621b6044820152606401610b63565b60005b601154811015610da957600060118281548110612c9f57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0390811680845260108352604080852092881685529190925290912054909150612cdf828583612d55565b7f0aa4d283470c904c551d18bb894d37e17674920f3261a7f854be501e25f421b7828583604051612d1293929190613c70565b60405180910390a1506001600160a01b03908116600090815260106020908152604080832093861683529290529081205580612d4d81613e9e565b915050612c72565b6040516001600160a01b038316602482015260448101829052610d2a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526137f3565b6001600160a01b038216612e185760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610b63565b612e2482600083613223565b6001600160a01b03821660009081526002602052604090205481811015612e985760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610b63565b6001600160a01b0383166000908152600260205260408120838303905560048054849290612ec7908490613e09565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610d2a83600084613309565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612f7682611022565b612f8257506000610a97565b61271060005b601254811015613065576001600160a01b0384166000908152600c602052604081206012805491929184908110612fcf57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff161561305357600b60006012838154811061302157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020546130509083613db2565b91505b8061305d81613e9e565b915050612f88565b5061271081601654866130789190613dea565b6130829190613dea565b61308c9190613dca565b949350505050565b61196d846323b872dd60e01b858585604051602401612d8193929190613c70565b60005b601154811015610da9576000601182815481106130e557634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03908116835260098252604080842054600a8452818520928816855291909252912055508061312881613e9e565b9150506130b8565b6001600160a01b0382166131865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610b63565b61319260008383613223565b80600460008282546131a49190613db2565b90915550506001600160a01b038216600090815260026020526040812080548392906131d1908490613db2565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610da960008383613309565b601354640100000000900460ff166132715760405162461bcd60e51b8152602060048201526011602482015270151c985b9cd9995c88191a5cd8589b1959607a1b6044820152606401610b63565b6001600160a01b038316158061328e57506001600160a01b038216155b1561329857505050565b6001600160a01b0382166000908152600f602090815260409182902082518084019093528054808452600190910154918301919091526132db576132db836130b5565b6132e484611022565b156132f2576132f284612bbf565b6132fb83611022565b1561196d5761196d83612bbf565b6001600160a01b038316158061332657506001600160a01b038216155b1561333057505050565b6001600160a01b0383811660008181526002602090815260408083205494871680845281842054948452600f80845282852083518085018552815481526001918201548187015292865290845282852083518085019094528054845201549282019290925290916133a18589612f6b565b905060006133af8589612f6b565b90506000836020015185602001516133c79190613db2565b905060006133d58385613db2565b90506133e08b611022565b80156133f057506133f08a611022565b1561342b5781601560008282546134079190613e09565b9250508190555080601560008282546134209190613db2565b909155506134af9050565b6134348a611022565b61346d5785602001516015600082825461344e9190613e09565b9250508190555083601560008282546134679190613db2565b90915550505b6134768b611022565b6134af578460200151601560008282546134909190613e09565b9250508190555082601560008282546134a99190613db2565b90915550505b505060408051808201825296875260208088019384526001600160a01b039a8b166000908152600f80835283822099518a5594516001998a01558251808401845297885287820193845299909a16895291909852909520915182555093519301929092555050565b60606000613526836002613dea565b613531906002613db2565b67ffffffffffffffff81111561355757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613581576020820181803683370190505b509050600360fc1b816000815181106135aa57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106135e757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061360b846002613dea565b613616906001613db2565b90505b60018111156136aa576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061365857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061367c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936136a381613e4c565b9050613619565b508315610cfd5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b63565b6001600160a01b0381166000908152600f60209081526040918290208251808401909352805483526001015490820181905215610d2a576001600160a01b038084166000818152600a60209081526040808320948716835293815283822054928252600990529182205461376d9190613e09565b905060006016548284602001516137849190613dea565b61378e9190613dca565b6001600160a01b03808716600081815260096020908152604080832054600a8352818420958b168085529583528184205592825260108152828220938252929092528120805492935083929091906137e7908490613db2565b90915550505050505050565b6000613848826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166138c59092919063ffffffff16565b805190915015610d2a57808060200190518101906138669190613b49565b610d2a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b63565b606061308c848460008585843b61391e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b63565b600080866001600160a01b0316858760405161393a9190613bdf565b60006040518083038185875af1925050503d8060008114613977576040519150601f19603f3d011682016040523d82523d6000602084013e61397c565b606091505b509150915061398c828286613997565b979650505050505050565b606083156139a6575081610cfd565b8251156139b65782518084602001fd5b8160405162461bcd60e51b8152600401610b639190613c94565b80356001600160a01b038116811461202657600080fd5b6000602082840312156139f8578081fd5b610cfd826139d0565b60008060408385031215613a13578081fd5b613a1c836139d0565b9150613a2a602084016139d0565b90509250929050565b600080600060608486031215613a47578081fd5b613a50846139d0565b9250613a5e602085016139d0565b9150604084013590509250925092565b600080600080600060808688031215613a85578081fd5b613a8e866139d0565b9450613a9c602087016139d0565b935060408601359250606086013567ffffffffffffffff80821115613abf578283fd5b818801915088601f830112613ad2578283fd5b813581811115613ae0578384fd5b896020828501011115613af1578384fd5b9699959850939650602001949392505050565b60008060408385031215613b16578182fd5b613b1f836139d0565b946020939093013593505050565b600060208284031215613b3e578081fd5b8135610cfd81613ecf565b600060208284031215613b5a578081fd5b8151610cfd81613ecf565b600060208284031215613b76578081fd5b5035919050565b60008060408385031215613b8f578182fd5b82359150613a2a602084016139d0565b600060208284031215613bb0578081fd5b81356001600160e01b031981168114610cfd578182fd5b600060208284031215613bd8578081fd5b5051919050565b60008251613bf1818460208701613e20565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613c33816017850160208801613e20565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613c64816028840160208801613e20565b01602801949350505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020815260008251806020840152613cb3816040850160208701613e20565b601f01601f19169190910160400192915050565b6020808252602f908201527f436f6e747261637457686974656c6973743a20436f6e7472616374206d75737460408201526e081899481dda1a5d195b1a5cdd1959608a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526016908201527521b0b63632b91034b9903737ba1030b71030b236b4b760511b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115613dc557613dc5613eb9565b500190565b600082613de557634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613e0457613e04613eb9565b500290565b600082821015613e1b57613e1b613eb9565b500390565b60005b83811015613e3b578181015183820152602001613e23565b8381111561196d5750506000910152565b600081613e5b57613e5b613eb9565b506000190190565b600181811c90821680613e7757607f821691505b60208210811415613e9857634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613eb257613eb2613eb9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b801515811461239c57600080fdfea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220de99b4bf802ee1307d1b9bfd5d710750b0ece3a743473037e3affc2d0b50447464736f6c634300080400330000000000000000000000001622bf67e6e5747b81866fe0b85178a93c7f86e3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000002d79883d2000000000000000000000000000000000000000000000000000000000000000000f4d6172696e6174656420554d414d49000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066d554d414d490000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061041d5760003560e01c8063715018a61161022b578063a9059cbb11610130578063c5644c86116100b8578063dd62ed3e11610087578063dd62ed3e146109ff578063ec342ad014610a38578063eced552614610a41578063ecf7085814610a4a578063f2fde38b14610a5357600080fd5b8063c5644c86146109b0578063ca49ff65146109c3578063d547741f146109d6578063db0e9d66146109e957600080fd5b8063bcdb446b116100ff578063bcdb446b14610944578063bdc8144b1461094c578063bfd994ce1461095f578063bfe0bc9814610972578063c3d9ed391461099d57600080fd5b8063a9059cbb146108e0578063acc3a006146108f3578063afb27a7514610906578063bc35e3fa1461091957600080fd5b806391d14854116101b35780639fe9f623116101825780639fe9f6231461088c5780639feb8f501461089f578063a217fddf146108b2578063a457c2d7146108ba578063a694fc3a146108cd57600080fd5b806391d148541461082257806393bfa2821461083557806395d89b41146108485780639b5f61a41461085057600080fd5b8063817b1cd2116101fa578063817b1cd2146107bf57806382461948146107c85780638c6fd36b146107db5780638da5cb5b146107fe5780638fa9484d1461080f57600080fd5b8063715018a61461077c57806372c215971461078457806375b238fc146107975780637bb7bed1146107ac57600080fd5b8063372500ab116103315780635526b05f116102b95780636580221f116102885780636580221f146106f85780636f5d3a5a1461070b578063700d27cf1461071e5780637095bffc1461073057806370a082311461075357600080fd5b80635526b05f1461069b57806355d84c1c146106c95780635d80dbe9146106dc5780635f46c8cc146106ef57600080fd5b80633af32abf116103005780633af32abf1461064b5780633b17c7361461065e5780633ccfd60b1461066b5780633edc3519146106735780634cd412d51461068657600080fd5b8063372500ab146105fa578063391feebb1461060257806339509351146106255780633abfbfef1461063857600080fd5b806318160ddd116103b4578063248a9ca311610383578063248a9ca31461058e5780632f2ff15d146105b1578063311d8a51146105c4578063313ce567146105d857806336568abe146105e757600080fd5b806318160ddd146105215780631eee01b0146105295780632287e96a1461056857806323b872dd1461057b57600080fd5b8063095ea7b3116103f0578063095ea7b3146104a25780630b09e5fb146104b5578063150b7a02146104d5578063162790551461050d57600080fd5b806301b6c9691461042257806301ffc9a71461045557806306fdde031461047857806308a8c0e01461048d575b600080fd5b6104426104303660046139e7565b60096020526000908152604090205481565b6040519081526020015b60405180910390f35b610468610463366004613b9f565b610a66565b604051901515815260200161044c565b610480610a9d565b60405161044c9190613c94565b6104a061049b366004613b04565b610b2f565b005b6104686104b0366004613b04565b610c42565b6104426104c33660046139e7565b600b6020526000908152604090205481565b6104f46104e3366004613a6e565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161044c565b61046861051b3660046139e7565b3b151590565b600454610442565b6105507f0000000000000000000000001622bf67e6e5747b81866fe0b85178a93c7f86e381565b6040516001600160a01b03909116815260200161044c565b6013546104689062010000900460ff1681565b610468610589366004613a33565b610c58565b61044261059c366004613b65565b60009081526020819052604090206001015490565b6104a06105bf366004613b7d565b610d04565b601354610468906301000000900460ff1681565b6040516009815260200161044c565b6104a06105f5366004613b7d565b610d2f565b6104a0610dad565b6104686106103660046139e7565b60086020526000908152604090205460ff1681565b610468610633366004613b04565b610ded565b6104a06106463660046139e7565b610e29565b6104686106593660046139e7565b611022565b6013546104689060ff1681565b6104a0611052565b6104a0610681366004613b65565b61121b565b60135461046890640100000000900460ff1681565b6104686106a9366004613a01565b600c60209081526000928352604080842090915290825290205460ff1681565b6105506106d7366004613b65565b611254565b6104a06106ea366004613b2d565b61127e565b61044260155481565b6104a0610706366004613b2d565b6112cc565b6104a06107193660046139e7565b61131c565b60135461046890610100900460ff1681565b61046861073e3660046139e7565b600d6020526000908152604090205460ff1681565b6104426107613660046139e7565b6001600160a01b031660009081526002602052604090205490565b6104a0611515565b6104a0610792366004613b04565b61154b565b610442600080516020613ede83398151915281565b6105506107ba366004613b65565b6117cb565b61044260145481565b6104a06107d6366004613b2d565b6117db565b6104686107e93660046139e7565b600e6020526000908152604090205460ff1681565b6007546001600160a01b0316610550565b6104a061081d366004613b2d565b611822565b610468610830366004613b7d565b611874565b6104a0610843366004613a33565b61189d565b610480611973565b61087761085e3660046139e7565b600f602052600090815260409020805460019091015482565b6040805192835260208301919091520161044c565b6104a061089a366004613b2d565b611982565b6104a06108ad366004613b04565b6119d6565b610442600081565b6104686108c8366004613b04565b611bb4565b6104a06108db366004613b65565b611c4d565b6104686108ee366004613b04565b611eb2565b6104686109013660046139e7565b611ebf565b6104a0610914366004613b04565b61202b565b610442610927366004613a01565b601060209081526000928352604080842090915290825290205481565b6104a06122de565b6104a061095a366004613b65565b61239f565b6104a061096d366004613b2d565b6123d8565b610442610980366004613a01565b600a60209081526000928352604080842090915290825290205481565b6104686109ab3660046139e7565b61242e565b6104426109be366004613a01565b6124f8565b6104a06109d13660046139e7565b6125b8565b6104a06109e4366004613b7d565b6126b1565b6013546104689065010000000000900460ff1681565b610442610a0d366004613a01565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b61044261271081565b61044260165481565b61044260175481565b6104a0610a613660046139e7565b6126d7565b60006001600160e01b03198216637965db0b60e01b1480610a9757506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060058054610aac90613e63565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad890613e63565b8015610b255780601f10610afa57610100808354040283529160200191610b25565b820191906000526020600020905b815481529060010190602001808311610b0857829003601f168201915b5050505050905090565b610b47600080516020613ede83398151915233611874565b610b6c5760405162461bcd60e51b8152600401610b6390613d4b565b60405180910390fd5b6001600160a01b0382166000908152600e602052604090205460ff1615610bcb5760405162461bcd60e51b8152602060048201526013602482015272417070726f766564204e46542065786973747360681b6044820152606401610b63565b6001600160a01b039091166000818152600e60209081526040808320805460ff19166001908117909155600b90925282209390935560128054938401815590527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344490910180546001600160a01b0319169091179055565b6000610c4f33848461276f565b50600192915050565b6000610c65848484612893565b6001600160a01b038416600090815260036020908152604080832033845290915290205482811015610cea5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610b63565b610cf7853385840361276f565b60019150505b9392505050565b600082815260208190526040902060010154610d208133612a72565b610d2a8383612ad6565b505050565b6001600160a01b0381163314610d9f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b63565b610da98282612b5a565b5050565b60026001541415610dd05760405162461bcd60e51b8152600401610b6390613d7b565b6002600155610dde33612bbf565b610de733612c1d565b60018055565b3360008181526003602090815260408083206001600160a01b03871684529091528120549091610c4f918590610e24908690613db2565b61276f565b610e41600080516020613ede83398151915233611874565b610e5d5760405162461bcd60e51b8152600401610b6390613d4b565b6001600160a01b0381166000908152600e602052604090205460ff16610ec55760405162461bcd60e51b815260206004820152601b60248201527f417070726f766564204e465420646f6573206e6f7420657869737400000000006044820152606401610b63565b60005b601254811015610da957816001600160a01b031660128281548110610efd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156110105760128054610f2890600190613e09565b81548110610f4657634e487b7160e01b600052603260045260246000fd5b600091825260209091200154601280546001600160a01b039092169183908110610f8057634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506012805480610fcd57634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0384168252600e905260409020805460ff191690555b8061101a81613e9e565b915050610ec8565b6000813b1561104a57506001600160a01b031660009081526008602052604090205460ff1690565b506001919050565b600260015414156110755760405162461bcd60e51b8152600401610b6390613d7b565b600260015560135462010000900460ff166110c95760405162461bcd60e51b815260206004820152601460248201527315da5d1a191c985dc81b9bdd08195b98589b195960621b6044820152606401610b63565b336000908152600f6020908152604091829020825180840190935280548352600101549082018190526111325760405162461bcd60e51b81526020600482015260116024820152704e6f207374616b65642062616c616e636560781b6044820152606401610b63565b61113b33612bbf565b61114433612c1d565b336000908152600f6020908152604082208281556001018290558201516015805491929091611174908490613e09565b909155505080516014805460009061118d908490613e09565b909155505080516111ca906001600160a01b037f0000000000000000000000001622bf67e6e5747b81866fe0b85178a93c7f86e316903390612d55565b6111d8338260000151612db8565b80516040805133815260208101929092527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a15060018055565b611233600080516020613ede83398151915233611874565b61124f5760405162461bcd60e51b8152600401610b6390613d4b565b601655565b6012818154811061126457600080fd5b6000918252602090912001546001600160a01b0316905081565b611296600080516020613ede83398151915233611874565b6112b25760405162461bcd60e51b8152600401610b6390613d4b565b601380549115156101000261ff0019909216919091179055565b6112e4600080516020613ede83398151915233611874565b6113005760405162461bcd60e51b8152600401610b6390613d4b565b60138054911515620100000262ff000019909216919091179055565b611334600080516020613ede83398151915233611874565b6113505760405162461bcd60e51b8152600401610b6390613d4b565b6001600160a01b0381166000908152600d602052604090205460ff166113b85760405162461bcd60e51b815260206004820152601b60248201527f52657761726420746f6b656e20646f6573206e6f7420657869737400000000006044820152606401610b63565b60005b601154811015610da957816001600160a01b0316601182815481106113f057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415611503576011805461141b90600190613e09565b8154811061143957634e487b7160e01b600052603260045260246000fd5b600091825260209091200154601180546001600160a01b03909216918390811061147357634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060118054806114c057634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0384168252600d905260409020805460ff191690555b8061150d81613e9e565b9150506113bb565b6007546001600160a01b0316331461153f5760405162461bcd60e51b8152600401610b6390613d16565b6115496000612f19565b565b6013546301000000900460ff1661159b5760405162461bcd60e51b815260206004820152601460248201527315da5d1a191c985dc81b9bdd08195b98589b195960621b6044820152606401610b63565b6001600160a01b0382166000908152600e602052604090205460ff166115f45760405162461bcd60e51b815260206004820152600e60248201526d155b985c1c1c9bdd99590813919560921b6044820152606401610b63565b336000908152600c602090815260408083206001600160a01b038616845290915290205460ff166116585760405162461bcd60e51b815260206004820152600e60248201526d139195081b9bdd081cdd185ad95960921b6044820152606401610b63565b336000818152600f60209081526040808320815180830183528154815260019091015481840152848452600c83528184206001600160a01b038816808652935292819020805460ff1916905551632142170760e11b8152919290916342842e0e916116ca913091908790600401613c70565b600060405180830381600087803b1580156116e457600080fd5b505af11580156116f8573d6000803e3d6000fd5b50505050600061170c826000015133612f6b565b604080518082018252845181526020808201848152336000908152600f83529384209251835551600190920191909155840151601580549394509092909190611756908490613e09565b92505081905550806015600082825461176f9190613db2565b9091555050604080513381526001600160a01b0386166020820152908101849052606081018290527f45d2a91600dc69305825e109ffd66b221ea47086a5ac4ed7ce4afde017f78bc6906080015b60405180910390a150505050565b6011818154811061126457600080fd5b6117f3600080516020613ede83398151915233611874565b61180f5760405162461bcd60e51b8152600401610b6390613d4b565b6013805460ff1916911515919091179055565b61183a600080516020613ede83398151915233611874565b6118565760405162461bcd60e51b8152600401610b6390613d4b565b6013805491151563010000000263ff00000019909216919091179055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6118b5600080516020613ede83398151915233611874565b6118d15760405162461bcd60e51b8152600401610b6390613d4b565b600081611956576040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561191757600080fd5b505afa15801561192b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194f9190613bc7565b9050611959565b50805b61196d6001600160a01b0385168483612d55565b50505050565b606060068054610aac90613e63565b61199a600080516020613ede83398151915233611874565b6119b65760405162461bcd60e51b8152600401610b6390613d4b565b601380549115156401000000000264ff0000000019909216919091179055565b600260015414156119f95760405162461bcd60e51b8152600401610b6390613d7b565b60026001556001600160a01b0382166000908152600d602052604090205460ff16611a5e5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881a5cc81b9bdd08185c1c1c9bdd9959605a1b6044820152606401610b63565b600060155411611ab05760405162461bcd60e51b815260206004820152601c60248201527f546f74616c206d756c7469706c696564207374616b6564207a65726f000000006044820152606401610b63565b611ac56001600160a01b038316333084613094565b600060155460165483611ad89190613dea565b611ae29190613dca565b905060008111611b345760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e742072657761726420706572207374616b650000006044820152606401610b63565b6001600160a01b03831660009081526009602052604081208054839290611b5c908490613db2565b9091555050604080516001600160a01b0385168152602081018490529081018290527f6a6f77044107a33658235d41bedbbaf2fe9ccdceb313143c947a5e76e1ec84749060600160405180910390a150506001805550565b3360009081526003602090815260408083206001600160a01b038616845290915281205482811015611c365760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610b63565b611c43338585840361276f565b5060019392505050565b611c5633611022565b611c725760405162461bcd60e51b8152600401610b6390613cc7565b60135460ff16611cba5760405162461bcd60e51b815260206004820152601360248201527214dd185ada5b99c81b9bdd08195b98589b1959606a1b6044820152606401610b63565b60008111611d015760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081cdd185ad948185b5bdd5b9d60621b6044820152606401610b63565b60175460145410611d545760405162461bcd60e51b815260206004820152601860248201527f4465706f736974206361706163697479207265616368656400000000000000006044820152606401610b63565b336000908152600f60209081526040918290208251808401909352805480845260019091015491830191909152611d9357611d8e336130b5565b611d9c565b611d9c33612bbf565b611dd16001600160a01b037f0000000000000000000000001622bf67e6e5747b81866fe0b85178a93c7f86e316333085613094565b611ddb3383613130565b6000611de78333612f6b565b90506040518060400160405280848460000151611e049190613db2565b8152602001828460200151611e199190613db2565b9052336000908152600f6020908152604082208351815592015160019092019190915560148054859290611e4e908490613db2565b925050819055508060156000828254611e679190613db2565b909155505060408051338152602081018590529081018290527f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b69060600160405180910390a1505050565b6000610c4f338484612893565b6007546000906001600160a01b03163314611eec5760405162461bcd60e51b8152600401610b6390613d16565b813b611f585760405162461bcd60e51b815260206004820152603560248201527f436f6e747261637457686974656c6973743a2041646472657373206d757374206044820152746265206120636f6e7472616374206164647265737360581b6064820152608401610b63565b6001600160a01b03821660009081526008602052604090205460ff1615611fd95760405162461bcd60e51b815260206004820152602f60248201527f436f6e747261637457686974656c6973743a20436f6e747261637420616c726560448201526e18591e481dda1a5d195b1a5cdd1959608a1b6064820152608401610b63565b6001600160a01b038216600081815260086020526040808220805460ff19166001179055517ffbd3cde7ff522a917e485c8ed2a6e87590887ab399f5ac312307903f498543079190a25060015b919050565b61203433611022565b6120505760405162461bcd60e51b8152600401610b6390613cc7565b601354610100900460ff166120a75760405162461bcd60e51b815260206004820152601760248201527f4e4654207374616b696e67206e6f7420656e61626c65640000000000000000006044820152606401610b63565b6001600160a01b0382166000908152600e602052604090205460ff166121005760405162461bcd60e51b815260206004820152600e60248201526d155b985c1c1c9bdd99590813919560921b6044820152606401610b63565b336000908152600c602090815260408083206001600160a01b038616845290915290205460ff16156121695760405162461bcd60e51b815260206004820152601260248201527113919508185b1c9958591e481cdd185ad95960721b6044820152606401610b63565b604051632142170760e11b81526001600160a01b038316906342842e0e9061219990339030908690600401613c70565b600060405180830381600087803b1580156121b357600080fd5b505af11580156121c7573d6000803e3d6000fd5b5050336000818152600c602090815260408083206001600160a01b03891684528252808320805460ff19166001908117909155848452600f83528184208251808401909352805480845291015492820192909252945090925061222991612f6b565b604080518082018252845181526020808201848152336000908152600f83529384209251835551600190920191909155840151601580549394509092909190612273908490613e09565b92505081905550806015600082825461228c9190613db2565b9091555050604080513381526001600160a01b0386166020820152908101849052606081018290527fc3daea287989ddc10f62ff010419ab2227ed3b8c7497506e97a02fa5184c3ec4906080016117bd565b6122f6600080516020613ede83398151915233611874565b6123125760405162461bcd60e51b8152600401610b6390613d4b565b604051600090339047908381818185875af1925050503d8060008114612354576040519150601f19603f3d011682016040523d82523d6000602084013e612359565b606091505b505090508061239c5760405162461bcd60e51b815260206004820152600f60248201526e15da5d1a191c985dc819985a5b1959608a1b6044820152606401610b63565b50565b6123b7600080516020613ede83398151915233611874565b6123d35760405162461bcd60e51b8152600401610b6390613d4b565b601755565b6123f0600080516020613ede83398151915233611874565b61240c5760405162461bcd60e51b8152600401610b6390613d4b565b60138054911515650100000000000265ff000000000019909216919091179055565b6001600160a01b03811660009081526008602052604081205460ff166124aa5760405162461bcd60e51b815260206004820152602b60248201527f436f6e747261637457686974656c6973743a20436f6e7472616374206e6f742060448201526a1dda1a5d195b1a5cdd195960aa1b6064820152608401610b63565b6001600160a01b038216600081815260086020526040808220805460ff19169055517f8e81447740597754af5db3e176253a36f7981a9549f48ace3f0cb233913f9d859190a2506001919050565b6001600160a01b038083166000818152600f60209081526040808320815180830183528154815260019091015481840152948616808452600a8352818420948452938252808320549383526009909152812054909291839161255a9190613e09565b905060006016548284602001516125719190613dea565b61257b9190613dca565b6001600160a01b038087166000908152601060209081526040808320938b16835292905220549091506125ae9082613db2565b9695505050505050565b6125d0600080516020613ede83398151915233611874565b6125ec5760405162461bcd60e51b8152600401610b6390613d4b565b6001600160a01b0381166000908152600d602052604090205460ff161561264b5760405162461bcd60e51b815260206004820152601360248201527252657761726420746f6b656e2065786973747360681b6044820152606401610b63565b6001600160a01b03166000818152600d60205260408120805460ff191660019081179091556011805491820181559091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319169091179055565b6000828152602081905260409020600101546126cd8133612a72565b610d2a8383612b5a565b6007546001600160a01b031633146127015760405162461bcd60e51b8152600401610b6390613d16565b6001600160a01b0381166127665760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b63565b61239c81612f19565b6001600160a01b0383166127d15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610b63565b6001600160a01b0382166128325760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610b63565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166128f75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610b63565b6001600160a01b0382166129595760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610b63565b612964838383613223565b6001600160a01b038316600090815260026020526040902054818110156129dc5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610b63565b6001600160a01b03808516600090815260026020526040808220858503905591851681529081208054849290612a13908490613db2565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612a5f91815260200190565b60405180910390a361196d848484613309565b612a7c8282611874565b610da957612a94816001600160a01b03166014613517565b612a9f836020613517565b604051602001612ab0929190613bfb565b60408051601f198184030181529082905262461bcd60e51b8252610b6391600401613c94565b612ae08282611874565b610da9576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612b163390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612b648282611874565b15610da9576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005b601154811015610da957612c0b60118281548110612bf057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316836136f9565b80612c1581613e9e565b915050612bc2565b60135465010000000000900460ff16612c6f5760405162461bcd60e51b815260206004820152601460248201527314185e481c995dd85c991cc8191a5cd8589b195960621b6044820152606401610b63565b60005b601154811015610da957600060118281548110612c9f57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0390811680845260108352604080852092881685529190925290912054909150612cdf828583612d55565b7f0aa4d283470c904c551d18bb894d37e17674920f3261a7f854be501e25f421b7828583604051612d1293929190613c70565b60405180910390a1506001600160a01b03908116600090815260106020908152604080832093861683529290529081205580612d4d81613e9e565b915050612c72565b6040516001600160a01b038316602482015260448101829052610d2a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526137f3565b6001600160a01b038216612e185760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610b63565b612e2482600083613223565b6001600160a01b03821660009081526002602052604090205481811015612e985760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610b63565b6001600160a01b0383166000908152600260205260408120838303905560048054849290612ec7908490613e09565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610d2a83600084613309565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000612f7682611022565b612f8257506000610a97565b61271060005b601254811015613065576001600160a01b0384166000908152600c602052604081206012805491929184908110612fcf57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff161561305357600b60006012838154811061302157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020546130509083613db2565b91505b8061305d81613e9e565b915050612f88565b5061271081601654866130789190613dea565b6130829190613dea565b61308c9190613dca565b949350505050565b61196d846323b872dd60e01b858585604051602401612d8193929190613c70565b60005b601154811015610da9576000601182815481106130e557634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03908116835260098252604080842054600a8452818520928816855291909252912055508061312881613e9e565b9150506130b8565b6001600160a01b0382166131865760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610b63565b61319260008383613223565b80600460008282546131a49190613db2565b90915550506001600160a01b038216600090815260026020526040812080548392906131d1908490613db2565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3610da960008383613309565b601354640100000000900460ff166132715760405162461bcd60e51b8152602060048201526011602482015270151c985b9cd9995c88191a5cd8589b1959607a1b6044820152606401610b63565b6001600160a01b038316158061328e57506001600160a01b038216155b1561329857505050565b6001600160a01b0382166000908152600f602090815260409182902082518084019093528054808452600190910154918301919091526132db576132db836130b5565b6132e484611022565b156132f2576132f284612bbf565b6132fb83611022565b1561196d5761196d83612bbf565b6001600160a01b038316158061332657506001600160a01b038216155b1561333057505050565b6001600160a01b0383811660008181526002602090815260408083205494871680845281842054948452600f80845282852083518085018552815481526001918201548187015292865290845282852083518085019094528054845201549282019290925290916133a18589612f6b565b905060006133af8589612f6b565b90506000836020015185602001516133c79190613db2565b905060006133d58385613db2565b90506133e08b611022565b80156133f057506133f08a611022565b1561342b5781601560008282546134079190613e09565b9250508190555080601560008282546134209190613db2565b909155506134af9050565b6134348a611022565b61346d5785602001516015600082825461344e9190613e09565b9250508190555083601560008282546134679190613db2565b90915550505b6134768b611022565b6134af578460200151601560008282546134909190613e09565b9250508190555082601560008282546134a99190613db2565b90915550505b505060408051808201825296875260208088019384526001600160a01b039a8b166000908152600f80835283822099518a5594516001998a01558251808401845297885287820193845299909a16895291909852909520915182555093519301929092555050565b60606000613526836002613dea565b613531906002613db2565b67ffffffffffffffff81111561355757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613581576020820181803683370190505b509050600360fc1b816000815181106135aa57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106135e757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061360b846002613dea565b613616906001613db2565b90505b60018111156136aa576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061365857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061367c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936136a381613e4c565b9050613619565b508315610cfd5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b63565b6001600160a01b0381166000908152600f60209081526040918290208251808401909352805483526001015490820181905215610d2a576001600160a01b038084166000818152600a60209081526040808320948716835293815283822054928252600990529182205461376d9190613e09565b905060006016548284602001516137849190613dea565b61378e9190613dca565b6001600160a01b03808716600081815260096020908152604080832054600a8352818420958b168085529583528184205592825260108152828220938252929092528120805492935083929091906137e7908490613db2565b90915550505050505050565b6000613848826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166138c59092919063ffffffff16565b805190915015610d2a57808060200190518101906138669190613b49565b610d2a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b63565b606061308c848460008585843b61391e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b63565b600080866001600160a01b0316858760405161393a9190613bdf565b60006040518083038185875af1925050503d8060008114613977576040519150601f19603f3d011682016040523d82523d6000602084013e61397c565b606091505b509150915061398c828286613997565b979650505050505050565b606083156139a6575081610cfd565b8251156139b65782518084602001fd5b8160405162461bcd60e51b8152600401610b639190613c94565b80356001600160a01b038116811461202657600080fd5b6000602082840312156139f8578081fd5b610cfd826139d0565b60008060408385031215613a13578081fd5b613a1c836139d0565b9150613a2a602084016139d0565b90509250929050565b600080600060608486031215613a47578081fd5b613a50846139d0565b9250613a5e602085016139d0565b9150604084013590509250925092565b600080600080600060808688031215613a85578081fd5b613a8e866139d0565b9450613a9c602087016139d0565b935060408601359250606086013567ffffffffffffffff80821115613abf578283fd5b818801915088601f830112613ad2578283fd5b813581811115613ae0578384fd5b896020828501011115613af1578384fd5b9699959850939650602001949392505050565b60008060408385031215613b16578182fd5b613b1f836139d0565b946020939093013593505050565b600060208284031215613b3e578081fd5b8135610cfd81613ecf565b600060208284031215613b5a578081fd5b8151610cfd81613ecf565b600060208284031215613b76578081fd5b5035919050565b60008060408385031215613b8f578182fd5b82359150613a2a602084016139d0565b600060208284031215613bb0578081fd5b81356001600160e01b031981168114610cfd578182fd5b600060208284031215613bd8578081fd5b5051919050565b60008251613bf1818460208701613e20565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613c33816017850160208801613e20565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613c64816028840160208801613e20565b01602801949350505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020815260008251806020840152613cb3816040850160208701613e20565b601f01601f19169190910160400192915050565b6020808252602f908201527f436f6e747261637457686974656c6973743a20436f6e7472616374206d75737460408201526e081899481dda1a5d195b1a5cdd1959608a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526016908201527521b0b63632b91034b9903737ba1030b71030b236b4b760511b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115613dc557613dc5613eb9565b500190565b600082613de557634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613e0457613e04613eb9565b500290565b600082821015613e1b57613e1b613eb9565b500390565b60005b83811015613e3b578181015183820152602001613e23565b8381111561196d5750506000910152565b600081613e5b57613e5b613eb9565b506000190190565b600181811c90821680613e7757607f821691505b60208210811415613e9857634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613eb257613eb2613eb9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b801515811461239c57600080fdfea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220de99b4bf802ee1307d1b9bfd5d710750b0ece3a743473037e3affc2d0b50447464736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001622bf67e6e5747b81866fe0b85178a93c7f86e3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000002d79883d2000000000000000000000000000000000000000000000000000000000000000000f4d6172696e6174656420554d414d49000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066d554d414d490000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _UMAMI (address): 0x1622bF67e6e5747b81866fE0b85178a93C7F86e3
Arg [1] : name (string): Marinated UMAMI
Arg [2] : symbol (string): mUMAMI
Arg [3] : _depositLimit (uint256): 50000000000000
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000001622bf67e6e5747b81866fe0b85178a93c7f86e3
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 00000000000000000000000000000000000000000000000000002d79883d2000
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [5] : 4d6172696e6174656420554d414d490000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 6d554d414d490000000000000000000000000000000000000000000000000000