This nametag was submitted by Kleros Curate.
Overview
ETH Balance
4 wei
Eth Value
Less Than $0.01 (@ $1,974.79/ETH)More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 25 from a total of 13,786 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Bid One | 15945311 | 860 days ago | IN | 0.3570205 ETH | 0.0003949 | ||||
Bid One | 15664874 | 899 days ago | IN | 1.00001 ETH | 0.00018686 | ||||
Bid One | 14742449 | 1046 days ago | IN | 0.30000999 ETH | 0.00101038 | ||||
Bid One | 14742438 | 1046 days ago | IN | 0.30000999 ETH | 0.00100315 | ||||
Withdraw | 14628538 | 1064 days ago | IN | 0 ETH | 0.00145224 | ||||
Withdraw | 14628528 | 1064 days ago | IN | 0 ETH | 0.00148628 | ||||
Bid One | 14622572 | 1065 days ago | IN | 0.20219999 ETH | 0.00143273 | ||||
Bid One | 14617468 | 1065 days ago | IN | 0.53000999 ETH | 0.00125052 | ||||
Bid One | 14617464 | 1065 days ago | IN | 0.53000999 ETH | 0.00121237 | ||||
Bid One | 14617459 | 1065 days ago | IN | 0.53000999 ETH | 0.00140727 | ||||
Bid One | 14616969 | 1065 days ago | IN | 0.21501 ETH | 0.00116153 | ||||
Bid One | 14612598 | 1066 days ago | IN | 0.25001 ETH | 0.00070354 | ||||
Bid One | 14608588 | 1067 days ago | IN | 0.50000999 ETH | 0.00069862 | ||||
Bid One | 14602152 | 1068 days ago | IN | 0.30999999 ETH | 0.00046146 | ||||
Transfer | 14601554 | 1068 days ago | IN | 0.00001 ETH | 0.00055484 | ||||
Bid One | 14601426 | 1068 days ago | IN | 0.90000999 ETH | 0.00102045 | ||||
Bid One | 14599842 | 1068 days ago | IN | 0.30000999 ETH | 0.00064229 | ||||
Bid One | 14599842 | 1068 days ago | IN | 0.30000999 ETH | 0.00064229 | ||||
Bid One | 14599841 | 1068 days ago | IN | 0.30000999 ETH | 0.000686 | ||||
Bid One | 14599841 | 1068 days ago | IN | 0.30000999 ETH | 0.000686 | ||||
Bid One | 14599841 | 1068 days ago | IN | 0.30000999 ETH | 0.000686 | ||||
Bid One | 14599841 | 1068 days ago | IN | 0.30000999 ETH | 0.000686 | ||||
Bid One | 14599841 | 1068 days ago | IN | 0.30000999 ETH | 0.000686 | ||||
Bid One | 14599841 | 1068 days ago | IN | 0.30000999 ETH | 0.000686 | ||||
Bid One | 14599841 | 1068 days ago | IN | 0.30000999 ETH | 0.000686 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
- | 14628538 | 1064 days ago | 3,794.81563027 ETH | ||||
- | 14628528 | 1064 days ago | 1 ETH | ||||
- | 14594116 | 1069 days ago | 2.70001 ETH | ||||
- | 14594116 | 1069 days ago | 1.94001 ETH | ||||
- | 14594116 | 1069 days ago | 2.40000999 ETH | ||||
- | 14594116 | 1069 days ago | 2.00001 ETH | ||||
- | 14594116 | 1069 days ago | 7.00000999 ETH | ||||
- | 14594115 | 1069 days ago | 0.46401 ETH | ||||
- | 14594115 | 1069 days ago | 0.70666049 ETH | ||||
- | 14594115 | 1069 days ago | 0.22001 ETH | ||||
- | 14594115 | 1069 days ago | 7.72000999 ETH | ||||
- | 14594115 | 1069 days ago | 2.30000999 ETH | ||||
- | 14594115 | 1069 days ago | 0.31501049 ETH | ||||
- | 14594115 | 1069 days ago | 0.22052152 ETH | ||||
- | 14594115 | 1069 days ago | 2.20001 ETH | ||||
- | 14594115 | 1069 days ago | 1.96797407 ETH | ||||
- | 14594115 | 1069 days ago | 2.75001 ETH | ||||
- | 14594115 | 1069 days ago | 0.21101 ETH | ||||
- | 14594115 | 1069 days ago | 1.72001 ETH | ||||
- | 14594115 | 1069 days ago | 0.2 ETH | ||||
- | 14594115 | 1069 days ago | 0.44101102 ETH | ||||
- | 14594115 | 1069 days ago | 1.77001 ETH | ||||
- | 14594115 | 1069 days ago | 0.35000999 ETH | ||||
- | 14594115 | 1069 days ago | 1.74301049 ETH | ||||
- | 14594115 | 1069 days ago | 2.57000999 ETH |
Loading...
Loading
Contract Name:
LandAuction
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./interfaces/IWETH.sol"; import "./interfaces/ILockShiboshi.sol"; import "./interfaces/ILockLeash.sol"; import "./interfaces/ILandRegistry.sol"; import "./interfaces/ILandAuction.sol"; contract LandAuction is ILandAuction, AccessControl, ReentrancyGuard { using ECDSA for bytes32; bytes32 public constant GRID_SETTER_ROLE = keccak256("GRID_SETTER_ROLE"); uint32 constant clearLow = 0xffff0000; uint32 constant clearHigh = 0x0000ffff; uint32 constant factor = 0x10000; uint16 public constant N = 194; // xHigh + 97 + 1 uint16 public constant M = 200; // yHigh + 100 + 1 /* xLow, yHigh gets mapped to 1,1 transform: x + 97, 100 - y y_mapped = 100 - y x_mapped = 97 + x */ int16 public constant xLow = -96; int16 public constant yLow = -99; int16 public constant xHigh = 96; int16 public constant yHigh = 99; enum Stage { Default, Bidding, PrivateSale, PublicSale } struct Bid { uint256 amount; address bidder; } address public immutable weth; ILandRegistry public landRegistry; ILockLeash public lockLeash; ILockShiboshi public lockShiboshi; bool public multiBidEnabled; address public signerAddress; Stage public currentStage; int8[N + 10][M + 10] private _categoryBIT; mapping(int16 => mapping(int16 => Bid)) public getCurrentBid; mapping(int8 => uint256) public priceOfCategory; mapping(address => uint256) public winningsBidsOf; mapping(address => uint32[]) private _allBidsOf; mapping(address => mapping(uint32 => uint8)) private _statusOfBidsOf; event CategoryPriceSet(int8 category, uint256 price); event StageSet(uint256 stage); event SignerSet(address signer); event multiBidToggled(bool newValue); event BidCreated( address indexed user, uint32 indexed encXY, int16 x, int16 y, uint256 price, uint256 time ); event LandBought( address indexed user, uint32 indexed encXY, int16 x, int16 y, uint256 price, Stage saleStage ); constructor( address _weth, ILandRegistry _landRegistry, ILockLeash _lockLeash, ILockShiboshi _lockShiboshi ) { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(GRID_SETTER_ROLE, msg.sender); weth = _weth; landRegistry = _landRegistry; lockLeash = _lockLeash; lockShiboshi = _lockShiboshi; signerAddress = msg.sender; } modifier onlyValid(int16 x, int16 y) { require(xLow <= x && x <= xHigh, "ERR_X_OUT_OF_RANGE"); require(yLow <= y && y <= yHigh, "ERR_Y_OUT_OF_RANGE"); _; } modifier onlyStage(Stage s) { require(currentStage == s, "ERR_THIS_STAGE_NOT_LIVE_YET"); _; } function weightToCapacity(uint256 weightLeash, uint256 weightShiboshi) public pure returns (uint256) { uint256[10] memory QRangeLeash = [ uint256(9), uint256(30), uint256(60), uint256(100), uint256(130), uint256(180), uint256(220), uint256(300), uint256(370), uint256(419) ]; uint256[10] memory QRangeShiboshi = [ uint256(45), uint256(89), uint256(150), uint256(250), uint256(350), uint256(480), uint256(600), uint256(700), uint256(800), uint256(850) ]; uint256[10] memory buckets = [ uint256(1), uint256(5), uint256(10), uint256(20), uint256(50), uint256(80), uint256(100), uint256(140), uint256(180), uint256(200) ]; uint256 capacity; if (weightLeash > 0) { for (uint256 i = 9; i >= 0; i = _uncheckedDec(i)) { if (weightLeash > QRangeLeash[i] * 1e18) { capacity += buckets[i]; break; } } } if (weightShiboshi > 0) { for (uint256 i = 9; i >= 0; i = _uncheckedDec(i)) { if (weightShiboshi > QRangeShiboshi[i]) { capacity += buckets[i]; break; } } } return capacity; } function getOutbidPrice(uint256 bidPrice) public pure returns (uint256) { // 5% more than the current price return (bidPrice * 21) / 20; } function availableCapacityOf(address user) public view returns (uint256) { uint256 weightLeash = lockLeash.weightOf(user); uint256 weightShiboshi = lockShiboshi.weightOf(user); return weightToCapacity(weightLeash, weightShiboshi) - winningsBidsOf[user]; } function getReservePrice(int16 x, int16 y) public view returns (uint256) { uint256 price = priceOfCategory[getCategory(x, y)]; require(price != 0, "ERR_NOT_UP_FOR_SALE"); return price; } function getPriceOf(int16 x, int16 y) public view returns (uint256) { Bid storage currentBid = getCurrentBid[x][y]; if (currentBid.amount == 0) { return getReservePrice(x, y); } else { // attempt to outbid return getOutbidPrice(currentBid.amount); } } function getCategory(int16 x, int16 y) public view returns (int8) { (uint16 x_mapped, uint16 y_mapped) = _transformXY(x, y); int8 category; for (uint16 i = x_mapped; i > 0; i = _subLowbit(i)) { for (uint16 j = y_mapped; j > 0; j = _subLowbit(j)) { unchecked { category += _categoryBIT[i][j]; } } } return category; } function isShiboshiZone(int16 x, int16 y) public pure returns (bool) { /* (12,99) to (48, 65) (49, 99) to (77, 78) (76, 77) to (77, 50) (65, 50) to (75, 50) */ if (x >= 12 && x <= 48 && y <= 99 && y >= 65) { return true; } if (x >= 49 && x <= 77 && y <= 99 && y >= 78) { return true; } if (x >= 76 && x <= 77 && y <= 77 && y >= 50) { return true; } if (x >= 65 && x <= 75 && y == 50) { return true; } return false; } // List of currently winning bids of this user function bidInfoOf(address user) external view returns (int16[] memory, int16[] memory) { uint256 bidCount = winningsBidsOf[user]; int16[] memory xs = new int16[](bidCount); int16[] memory ys = new int16[](bidCount); uint256 ptr; uint32[] storage allBids = _allBidsOf[user]; uint256 length = allBids.length; for (uint256 i = 0; i < length; i = _uncheckedInc(i)) { if (_statusOfBidsOf[user][allBids[i]] == 1) { (int16 x, int16 y) = _decodeXY(allBids[i]); xs[ptr] = x; ys[ptr] = y; ptr = _uncheckedInc(ptr); } } return (xs, ys); } // List of all bids, ever done by this user function allBidInfoOf(address user) external view returns (int16[] memory, int16[] memory) { uint32[] storage allBids = _allBidsOf[user]; uint256 bidCount = allBids.length; int16[] memory xs = new int16[](bidCount); int16[] memory ys = new int16[](bidCount); for (uint256 i = 0; i < bidCount; i = _uncheckedInc(i)) { (int16 x, int16 y) = _decodeXY(allBids[i]); xs[i] = x; ys[i] = y; } return (xs, ys); } function setGridVal( int16 x1, int16 y1, int16 x2, int16 y2, int8 val ) external onlyRole(GRID_SETTER_ROLE) { (uint16 x1_mapped, uint16 y1_mapped) = _transformXY(x1, y1); (uint16 x2_mapped, uint16 y2_mapped) = _transformXY(x2, y2); _updateGrid(x2_mapped + 1, y2_mapped + 1, val); _updateGrid(x1_mapped, y1_mapped, val); _updateGrid(x1_mapped, y2_mapped + 1, -val); _updateGrid(x2_mapped + 1, y1_mapped, -val); } function setPriceOfCategory(int8 category, uint256 price) external onlyRole(GRID_SETTER_ROLE) { priceOfCategory[category] = price; emit CategoryPriceSet(category, price); } function setStage(uint256 stage) external onlyRole(DEFAULT_ADMIN_ROLE) { currentStage = Stage(stage); emit StageSet(stage); } function setSignerAddress(address signer) external onlyRole(DEFAULT_ADMIN_ROLE) { require(signer != address(0), "ERR_CANNOT_BE_ZERO_ADDRESS"); signerAddress = signer; emit SignerSet(signer); } function setLandRegistry(address _landRegistry) external onlyRole(DEFAULT_ADMIN_ROLE) { landRegistry = ILandRegistry(_landRegistry); } function setLockLeash(address _lockLeash) external onlyRole(DEFAULT_ADMIN_ROLE) { lockLeash = ILockLeash(_lockLeash); } function setLockShiboshi(address _lockShiboshi) external onlyRole(DEFAULT_ADMIN_ROLE) { lockShiboshi = ILockShiboshi(_lockShiboshi); } function setMultiBid(bool desiredValue) external onlyRole(DEFAULT_ADMIN_ROLE) { require(multiBidEnabled != desiredValue, "ERR_ALREADY_DESIRED_VALUE"); multiBidEnabled = desiredValue; emit multiBidToggled(desiredValue); } function withdraw(address to, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { payable(to).transfer(amount); } function bidOne(int16 x, int16 y) external payable onlyStage(Stage.Bidding) nonReentrant { address user = msg.sender; require(availableCapacityOf(user) != 0, "ERR_NO_BIDS_REMAINING"); require(!isShiboshiZone(x, y), "ERR_NO_MINT_IN_SHIBOSHI_ZONE"); _bid(user, x, y, msg.value); } function bidShiboshiZoneOne( int16 x, int16 y, bytes calldata signature ) external payable onlyStage(Stage.Bidding) nonReentrant { address user = msg.sender; require( _verifySigner(_hashMessage(user), signature), "ERR_SIGNATURE_INVALID" ); require(isShiboshiZone(x, y), "ERR_NOT_IN_SHIBOSHI_ZONE"); _bid(user, x, y, msg.value); } function bidMulti( int16[] calldata xs, int16[] calldata ys, uint256[] calldata prices ) external payable onlyStage(Stage.Bidding) nonReentrant { require(multiBidEnabled, "ERR_MULTI_BID_DISABLED"); address user = msg.sender; uint256 length = xs.length; require(length != 0, "ERR_NO_INPUT"); require(length == ys.length, "ERR_INPUT_LENGTH_MISMATCH"); require(length == prices.length, "ERR_INPUT_LENGTH_MISMATCH"); uint256 total; require( availableCapacityOf(user) >= length, "ERR_INSUFFICIENT_BIDS_REMAINING" ); for (uint256 i = 0; i < length; i = _uncheckedInc(i)) { total += prices[i]; } require(msg.value == total, "ERR_INSUFFICIENT_AMOUNT_SENT"); for (uint256 i = 0; i < length; i = _uncheckedInc(i)) { int16 x = xs[i]; int16 y = ys[i]; require(!isShiboshiZone(x, y), "ERR_NO_MINT_IN_SHIBOSHI_ZONE"); _bid(user, x, y, prices[i]); } } function bidShiboshiZoneMulti( int16[] calldata xs, int16[] calldata ys, uint256[] calldata prices, bytes calldata signature ) external payable onlyStage(Stage.Bidding) nonReentrant { require(multiBidEnabled, "ERR_MULTI_BID_DISABLED"); address user = msg.sender; require( _verifySigner(_hashMessage(user), signature), "ERR_SIGNATURE_INVALID" ); uint256 length = xs.length; require(length != 0, "ERR_NO_INPUT"); require(length == ys.length, "ERR_INPUT_LENGTH_MISMATCH"); require(length == prices.length, "ERR_INPUT_LENGTH_MISMATCH"); uint256 total; for (uint256 i = 0; i < length; i = _uncheckedInc(i)) { total += prices[i]; } require(msg.value == total, "ERR_INSUFFICIENT_AMOUNT_SENT"); for (uint256 i = 0; i < length; i = _uncheckedInc(i)) { int16 x = xs[i]; int16 y = ys[i]; require(isShiboshiZone(x, y), "ERR_NOT_IN_SHIBOSHI_ZONE"); _bid(user, x, y, prices[i]); } } function mintWinningBid(int16[] calldata xs, int16[] calldata ys) external { require( currentStage == Stage.PublicSale || currentStage == Stage.PrivateSale, "ERR_MUST_WAIT_FOR_BIDDING_TO_END" ); uint256 length = xs.length; require(length == ys.length, "ERR_INPUT_LENGTH_MISMATCH"); for (uint256 i = 0; i < length; i = _uncheckedInc(i)) { int16 x = xs[i]; int16 y = ys[i]; require(xLow <= x && x <= xHigh, "ERR_X_OUT_OF_RANGE"); require(yLow <= y && y <= yHigh, "ERR_Y_OUT_OF_RANGE"); address user = getCurrentBid[x][y].bidder; require(user != address(0), "ERR_NO_BID_FOUND"); landRegistry.mint(user, x, y); } } function mintPrivate(int16 x, int16 y) external payable onlyStage(Stage.PrivateSale) nonReentrant { require(availableCapacityOf(msg.sender) != 0, "ERR_NO_BIDS_REMAINING"); require(!isShiboshiZone(x, y), "ERR_NO_MINT_IN_SHIBOSHI_ZONE"); _mintPublicOrPrivate(msg.sender, x, y); emit LandBought( msg.sender, _encodeXY(x, y), x, y, msg.value, Stage.PrivateSale ); } function mintPrivateShiboshiZone( int16 x, int16 y, bytes calldata signature ) external payable onlyStage(Stage.PrivateSale) nonReentrant { require( _verifySigner(_hashMessage(msg.sender), signature), "ERR_SIGNATURE_INVALID" ); require(isShiboshiZone(x, y), "ERR_NOT_IN_SHIBOSHI_ZONE"); _mintPublicOrPrivate(msg.sender, x, y); emit LandBought( msg.sender, _encodeXY(x, y), x, y, msg.value, Stage.PrivateSale ); } function mintPublic(int16 x, int16 y) external payable onlyStage(Stage.PublicSale) nonReentrant { _mintPublicOrPrivate(msg.sender, x, y); emit LandBought( msg.sender, _encodeXY(x, y), x, y, msg.value, Stage.PublicSale ); } // transform: +97, +100 function _transformXY(int16 x, int16 y) internal pure onlyValid(x, y) returns (uint16, uint16) { return (uint16(x + 97), uint16(100 - y)); } function _bid( address user, int16 x, int16 y, uint256 price ) internal onlyValid(x, y) { uint32 encXY = _encodeXY(x, y); Bid storage currentBid = getCurrentBid[x][y]; if (currentBid.amount == 0) { // first bid on this land require( price >= getReservePrice(x, y), "ERR_INSUFFICIENT_AMOUNT_SENT" ); } else { // attempt to outbid require(user != currentBid.bidder, "ERR_CANNOT_OUTBID_YOURSELF"); require( price >= getOutbidPrice(currentBid.amount), "ERR_INSUFFICIENT_AMOUNT_SENT" ); _safeTransferETHWithFallback(currentBid.bidder, currentBid.amount); winningsBidsOf[currentBid.bidder] -= 1; _statusOfBidsOf[currentBid.bidder][encXY] = 2; } currentBid.bidder = user; currentBid.amount = price; winningsBidsOf[user] += 1; if (_statusOfBidsOf[user][encXY] == 0) { // user has never bid on this land earlier _allBidsOf[user].push(encXY); } _statusOfBidsOf[user][encXY] = 1; emit BidCreated(user, encXY, x, y, price, block.timestamp); } function _mintPublicOrPrivate( address user, int16 x, int16 y ) internal onlyValid(x, y) { Bid storage currentBid = getCurrentBid[x][y]; require(currentBid.amount == 0, "ERR_NOT_UP_FOR_SALE"); require( msg.value == getReservePrice(x, y), "ERR_INSUFFICIENT_AMOUNT_SENT" ); currentBid.bidder = user; currentBid.amount = msg.value; winningsBidsOf[user] += 1; uint32 encXY = _encodeXY(x, y); _allBidsOf[user].push(encXY); _statusOfBidsOf[user][encXY] = 1; landRegistry.mint(user, x, y); } function _hashMessage(address sender) private pure returns (bytes32) { return keccak256(abi.encodePacked(sender)); } function _verifySigner(bytes32 messageHash, bytes memory signature) private view returns (bool) { return signerAddress == messageHash.toEthSignedMessageHash().recover(signature); } /** * @notice Transfer ETH. If the ETH transfer fails, wrap the ETH and try send it as WETH. */ function _safeTransferETHWithFallback(address to, uint256 amount) internal { if (!_safeTransferETH(to, amount)) { IWETH(weth).deposit{value: amount}(); IERC20(weth).transfer(to, amount); } } /** * @notice Transfer ETH and return the success status. * @dev This function only forwards 30,000 gas to the callee. */ function _safeTransferETH(address to, uint256 value) internal returns (bool) { (bool success, ) = to.call{value: value, gas: 30_000}(new bytes(0)); return success; } function _uncheckedInc(uint256 i) internal pure returns (uint256) { unchecked { return i + 1; } } function _uncheckedDec(uint256 i) internal pure returns (uint256) { unchecked { return i - 1; } } function _encodeXY(int16 x, int16 y) internal pure returns (uint32) { return ((uint32(uint16(x)) * factor) & clearLow) | (uint32(uint16(y)) & clearHigh); } function _decodeXY(uint32 value) internal pure returns (int16 x, int16 y) { x = _expandNegative16BitCast((value & clearLow) >> 16); y = _expandNegative16BitCast(value & clearHigh); } function _expandNegative16BitCast(uint32 value) internal pure returns (int16) { if (value & (1 << 15) != 0) { return int16(int32(value | clearLow)); } return int16(int32(value)); } // Functions for BIT function _updateGrid( uint16 x, uint16 y, int8 val ) internal { for (uint16 i = x; i <= N; i = _addLowbit(i)) { for (uint16 j = y; j <= M; j = _addLowbit(j)) { unchecked { _categoryBIT[i][j] += val; } } } } function _addLowbit(uint16 i) internal pure returns (uint16) { unchecked { return i + uint16(int16(i) & (-int16(i))); } } function _subLowbit(uint16 i) internal pure returns (uint16) { unchecked { return i - uint16(int16(i) & (-int16(i))); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (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 virtual 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 virtual { 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 virtual 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/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 (last updated v4.5.0) (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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, 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 (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: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.13; interface IWETH { function deposit() external payable; function withdraw(uint256 wad) external; function transfer(address to, uint256 value) external returns (bool); }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface ILockShiboshi { function lockInfoOf(address user) external view returns ( uint256[] memory ids, uint256 startTime, uint256 numDays, address ogUser ); function weightOf(address user) external view returns (uint256); function extraShiboshiNeeded(address user, uint256 targetWeight) external view returns (uint256); function extraDaysNeeded(address user, uint256 targetWeight) external view returns (uint256); function isWinner(address user) external view returns (bool); function unlockAt(address user) external view returns (uint256); }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface ILockLeash { function lockInfoOf(address user) external view returns ( uint256 amount, uint256 startTime, uint256 numDays, address ogUser ); function weightOf(address user) external view returns (uint256); function extraLeashNeeded(address user, uint256 targetWeight) external view returns (uint256); function extraDaysNeeded(address user, uint256 targetWeight) external view returns (uint256); function isWinner(address user) external view returns (bool); function unlockAt(address user) external view returns (uint256); }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface ILandRegistry { function mint( address user, int16 x, int16 y ) external; }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface ILandAuction { function winningsBidsOf(address user) external view returns (uint256); }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"contract ILandRegistry","name":"_landRegistry","type":"address"},{"internalType":"contract ILockLeash","name":"_lockLeash","type":"address"},{"internalType":"contract ILockShiboshi","name":"_lockShiboshi","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint32","name":"encXY","type":"uint32"},{"indexed":false,"internalType":"int16","name":"x","type":"int16"},{"indexed":false,"internalType":"int16","name":"y","type":"int16"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"BidCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int8","name":"category","type":"int8"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"CategoryPriceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint32","name":"encXY","type":"uint32"},{"indexed":false,"internalType":"int16","name":"x","type":"int16"},{"indexed":false,"internalType":"int16","name":"y","type":"int16"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"enum LandAuction.Stage","name":"saleStage","type":"uint8"}],"name":"LandBought","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":"signer","type":"address"}],"name":"SignerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"stage","type":"uint256"}],"name":"StageSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newValue","type":"bool"}],"name":"multiBidToggled","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GRID_SETTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"M","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"N","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"allBidInfoOf","outputs":[{"internalType":"int16[]","name":"","type":"int16[]"},{"internalType":"int16[]","name":"","type":"int16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"availableCapacityOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"bidInfoOf","outputs":[{"internalType":"int16[]","name":"","type":"int16[]"},{"internalType":"int16[]","name":"","type":"int16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int16[]","name":"xs","type":"int16[]"},{"internalType":"int16[]","name":"ys","type":"int16[]"},{"internalType":"uint256[]","name":"prices","type":"uint256[]"}],"name":"bidMulti","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"}],"name":"bidOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int16[]","name":"xs","type":"int16[]"},{"internalType":"int16[]","name":"ys","type":"int16[]"},{"internalType":"uint256[]","name":"prices","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"bidShiboshiZoneMulti","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"bidShiboshiZoneOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"currentStage","outputs":[{"internalType":"enum LandAuction.Stage","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"}],"name":"getCategory","outputs":[{"internalType":"int8","name":"","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int16","name":"","type":"int16"},{"internalType":"int16","name":"","type":"int16"}],"name":"getCurrentBid","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"bidder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"name":"getOutbidPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"}],"name":"getPriceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"}],"name":"getReservePrice","outputs":[{"internalType":"uint256","name":"","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":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"}],"name":"isShiboshiZone","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"landRegistry","outputs":[{"internalType":"contract ILandRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockLeash","outputs":[{"internalType":"contract ILockLeash","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockShiboshi","outputs":[{"internalType":"contract ILockShiboshi","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"}],"name":"mintPrivate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintPrivateShiboshiZone","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int16","name":"x","type":"int16"},{"internalType":"int16","name":"y","type":"int16"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int16[]","name":"xs","type":"int16[]"},{"internalType":"int16[]","name":"ys","type":"int16[]"}],"name":"mintWinningBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"multiBidEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int8","name":"","type":"int8"}],"name":"priceOfCategory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int16","name":"x1","type":"int16"},{"internalType":"int16","name":"y1","type":"int16"},{"internalType":"int16","name":"x2","type":"int16"},{"internalType":"int16","name":"y2","type":"int16"},{"internalType":"int8","name":"val","type":"int8"}],"name":"setGridVal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_landRegistry","type":"address"}],"name":"setLandRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lockLeash","type":"address"}],"name":"setLockLeash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lockShiboshi","type":"address"}],"name":"setLockShiboshi","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"desiredValue","type":"bool"}],"name":"setMultiBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int8","name":"category","type":"int8"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceOfCategory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stage","type":"uint256"}],"name":"setStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"weightLeash","type":"uint256"},{"internalType":"uint256","name":"weightShiboshi","type":"uint256"}],"name":"weightToCapacity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"winningsBidsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xHigh","outputs":[{"internalType":"int16","name":"","type":"int16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xLow","outputs":[{"internalType":"int16","name":"","type":"int16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yHigh","outputs":[{"internalType":"int16","name":"","type":"int16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yLow","outputs":[{"internalType":"int16","name":"","type":"int16"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620040c7380380620040c783398101604081905262000034916200017f565b6001805562000045600033620000c5565b620000707e2250fe51283021e04a7ab438c6e1fb5184bc6bc6b97d70d0deb8942f11485a33620000c5565b6001600160a01b03938416608052600280549385166001600160a01b031994851617905560038054928516928416929092179091556004805491909316908216179091556005805490911633179055620001e7565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000162576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001213390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6001600160a01b03811681146200017c57600080fd5b50565b600080600080608085870312156200019657600080fd5b8451620001a38162000166565b6020860151909450620001b68162000166565b6040860151909350620001c98162000166565b6060860151909250620001dc8162000166565b939692955090935050565b608051613eb6620002116000396000818161048301528181612f390152612fce0152613eb66000f3fe6080604052600436106102c85760003560e01c806391d1485411610175578063d598c9e9116100dc578063e45d1cf811610095578063f4bdf6ac1161006f578063f4bdf6ac1461090d578063f4c9cbf314610920578063f5ada9ad14610940578063f7eeae621461096057600080fd5b8063e45d1cf8146108ba578063ed9969a4146108da578063f3fef3a3146108ed57600080fd5b8063d598c9e91461080e578063d5ed9cba14610823578063d630891014610843578063d9d99d2314610863578063dce5fdbf14610876578063dfc1a731146108a457600080fd5b8063bd4dc0241161012e578063bd4dc02414610766578063c67d054514610786578063c9e525df146107a6578063cacee621146107bb578063d25b730a146107ce578063d547741f146107ee57600080fd5b806391d1485414610662578063935302cc14610682578063983316db146106a2578063a217fddf146106d5578063aaf5ddcd146106ea578063afc01ac31461075057600080fd5b80634441a88d11610234578063674cb7c6116101ed57806370cbc961116101c757806370cbc961146105e257806374ed6242146106025780637be8a6771461062257806386d35a7b1461064257600080fd5b8063674cb7c61461057a578063693f917e1461059a5780636e6bdc2b146105c257600080fd5b80634441a88d146104bd57806347c3593f146104d05780635b7633d0146104f85780635bf5d54c146105185780635f4b10251461054657806363b157691461056757600080fd5b80631b3e9916116102865780631b3e9916146103b3578063248a9ca3146103e15780632f2ff15d1461041157806336568abe146104315780633eb1d777146104515780633fc8cef31461047157600080fd5b80626a25dd146102cd57806301ffc9a71461030057806302ed71ae14610330578063046dc166146103525780630c6838bc1461037257806317996362146103a0575b600080fd5b3480156102d957600080fd5b506102ed6102e8366004613440565b610993565b6040519081526020015b60405180910390f35b34801561030c57600080fd5b5061032061031b36600461345b565b610ab4565b60405190151581526020016102f7565b34801561033c57600080fd5b5061035061034b366004613440565b610aeb565b005b34801561035e57600080fd5b5061035061036d366004613440565b610b1a565b34801561037e57600080fd5b506102ed61038d366004613440565b6105c66020526000908152604090205481565b6103506103ae3660046134d9565b610bd7565b3480156103bf57600080fd5b506103d36103ce366004613440565b610cdf565b6040516102f7929190613578565b3480156103ed57600080fd5b506102ed6103fc3660046135a6565b60009081526020819052604090206001015490565b34801561041d57600080fd5b5061035061042c3660046135bf565b610e48565b34801561043d57600080fd5b5061035061044c3660046135bf565b610e73565b34801561045d57600080fd5b5061035061046c3660046135a6565b610ef1565b34801561047d57600080fd5b506104a57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102f7565b6103506104cb366004613630565b610f66565b3480156104dc57600080fd5b506104e5606381565b60405160019190910b81526020016102f7565b34801561050457600080fd5b506005546104a5906001600160a01b031681565b34801561052457600080fd5b5060055461053990600160a01b900460ff1681565b6040516102f7919061372c565b34801561055257600080fd5b5060045461032090600160a01b900460ff1681565b6103506105753660046134d9565b6111e7565b34801561058657600080fd5b506004546104a5906001600160a01b031681565b3480156105a657600080fd5b506105af60c881565b60405161ffff90911681526020016102f7565b3480156105ce57600080fd5b506103206105dd36600461373a565b611344565b3480156105ee57600080fd5b506003546104a5906001600160a01b031681565b34801561060e57600080fd5b5061035061061d366004613776565b611452565b34801561062e57600080fd5b506102ed61063d36600461373a565b6114cf565b34801561064e57600080fd5b5061035061065d3660046137a0565b611517565b34801561066e57600080fd5b5061032061067d3660046135bf565b6115cf565b34801561068e57600080fd5b506102ed61069d36600461373a565b6115f8565b3480156106ae57600080fd5b506102ed7e2250fe51283021e04a7ab438c6e1fb5184bc6bc6b97d70d0deb8942f11485a81565b3480156106e157600080fd5b506102ed600081565b3480156106f657600080fd5b5061073361070536600461373a565b6105c4602090815260009283526040808420909152908252902080546001909101546001600160a01b031682565b604080519283526001600160a01b039091166020830152016102f7565b34801561075c57600080fd5b506104e560621981565b34801561077257600080fd5b506002546104a5906001600160a01b031681565b34801561079257600080fd5b506102ed6107a1366004613805565b61166e565b3480156107b257600080fd5b506105af60c281565b6103506107c936600461373a565b611848565b3480156107da57600080fd5b506103506107e9366004613835565b611919565b3480156107fa57600080fd5b506103506108093660046135bf565b6119d4565b34801561081a57600080fd5b506104e5606081565b34801561082f57600080fd5b5061035061083e366004613440565b6119fa565b34801561084f57600080fd5b506102ed61085e3660046135a6565b611a29565b610350610871366004613852565b611a42565b34801561088257600080fd5b506102ed6108913660046138ec565b6105c56020526000908152604090205481565b3480156108b057600080fd5b506104e5605f1981565b3480156108c657600080fd5b506103506108d5366004613907565b611ce7565b6103506108e836600461373a565b611f63565b3480156108f957600080fd5b50610350610908366004613967565b61209a565b61035061091b36600461373a565b6120e2565b34801561092c57600080fd5b5061035061093b366004613440565b6121d5565b34801561094c57600080fd5b506103d361095b366004613440565b612204565b34801561096c57600080fd5b5061098061097b36600461373a565b6123ca565b60405160009190910b81526020016102f7565b60035460405163dd4bc10160e01b81526001600160a01b038381166004830152600092839291169063dd4bc10190602401602060405180830381865afa1580156109e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a059190613983565b6004805460405163dd4bc10160e01b81526001600160a01b038781169382019390935292935060009291169063dd4bc10190602401602060405180830381865afa158015610a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7b9190613983565b6001600160a01b03851660009081526105c66020526040902054909150610aa2838361166e565b610aac91906139b2565b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610ae557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000610af7813361246b565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610b26813361246b565b6001600160a01b038216610b815760405162461bcd60e51b815260206004820152601a60248201527f4552525f43414e4e4f545f42455f5a45524f5f4144445245535300000000000060448201526064015b60405180910390fd5b600580546001600160a01b0319166001600160a01b0384169081179091556040519081527f9eaa897564d022fb8c5efaf0acdb5d9d27b440b2aad44400b6e1c702e65b9ed3906020015b60405180910390a15050565b600180600554600160a01b900460ff166003811115610bf857610bf86136f4565b14610c155760405162461bcd60e51b8152600401610b78906139c9565b600260015403610c375760405162461bcd60e51b8152600401610b7890613a00565b600260015533610c85610c49826124cf565b85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061250f92505050565b610ca15760405162461bcd60e51b8152600401610b7890613a37565b610cab8686611344565b610cc75760405162461bcd60e51b8152600401610b7890613a66565b610cd38187873461253c565b50506001805550505050565b6001600160a01b03811660009081526105c7602052604081208054606092839291908167ffffffffffffffff811115610d1a57610d1a613a9d565b604051908082528060200260200182016040528015610d43578160200160208202803683370190505b50905060008267ffffffffffffffff811115610d6157610d61613a9d565b604051908082528060200260200182016040528015610d8a578160200160208202803683370190505b50905060005b83811015610e3b57600080610ddb878481548110610db057610db0613ab3565b90600052602060002090600891828204019190066004029054906101000a900463ffffffff16612886565b9150915081858481518110610df257610df2613ab3565b602002602001019060010b908160010b8152505080848481518110610e1957610e19613ab3565b600192830b602091820292909201015283019150610e349050565b9050610d90565b5090969095509350505050565b600082815260208190526040902060010154610e64813361246b565b610e6e83836128b0565b505050565b6001600160a01b0381163314610ee35760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b78565b610eed8282612934565b5050565b6000610efd813361246b565b816003811115610f0f57610f0f6136f4565b6005805460ff60a01b1916600160a01b836003811115610f3157610f316136f4565b02179055506040518281527f02f604feff374725ab69a4a6b22fbfb7f79b787bc42299abdea1de38ec4ef4b690602001610bcb565b600180600554600160a01b900460ff166003811115610f8757610f876136f4565b14610fa45760405162461bcd60e51b8152600401610b78906139c9565b600260015403610fc65760405162461bcd60e51b8152600401610b7890613a00565b6002600155600454600160a01b900460ff1661101d5760405162461bcd60e51b815260206004820152601660248201527511549497d35553151257d0925117d11254d05093115160521b6044820152606401610b78565b3361102a610c49826124cf565b6110465760405162461bcd60e51b8152600401610b7890613a37565b8860008190036110875760405162461bcd60e51b815260206004820152600c60248201526b11549497d393d7d25394155560a21b6044820152606401610b78565b8088146110a65760405162461bcd60e51b8152600401610b7890613ac9565b8086146110c55760405162461bcd60e51b8152600401610b7890613ac9565b6000805b828110156110ff578888828181106110e3576110e3613ab3565b90506020020135826110f59190613b00565b91506001016110c9565b5080341461111f5760405162461bcd60e51b8152600401610b7890613b18565b60005b828110156111d45760008d8d8381811061113e5761113e613ab3565b90506020020160208101906111539190613b4f565b905060008c8c8481811061116957611169613ab3565b905060200201602081019061117e9190613b4f565b905061118a8282611344565b6111a65760405162461bcd60e51b8152600401610b7890613a66565b6111ca8683838e8e888181106111be576111be613ab3565b9050602002013561253c565b5050600101611122565b5050600180555050505050505050505050565b600280600554600160a01b900460ff166003811115611208576112086136f4565b146112255760405162461bcd60e51b8152600401610b78906139c9565b6002600154036112475760405162461bcd60e51b8152600401610b7890613a00565b6002600155611294611258336124cf565b84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061250f92505050565b6112b05760405162461bcd60e51b8152600401610b7890613a37565b6112ba8585611344565b6112d65760405162461bcd60e51b8152600401610b7890613a66565b6112e1338686612999565b6112eb8585612bcf565b63ffffffff16336001600160a01b03167f43b6df8ffaf0a6a2607904d905d7f580b6beba1e6be91cbadb435af747ad2d7d87873460026040516113319493929190613b6a565b60405180910390a3505060018055505050565b6000600c8360010b1215801561135e575060308360010b13155b801561136e575060638260010b13155b801561137e575060418260010b12155b1561138b57506001610ae5565b60318360010b121580156113a35750604d8360010b13155b80156113b3575060638260010b13155b80156113c35750604e8260010b12155b156113d057506001610ae5565b604c8360010b121580156113e85750604d8360010b13155b80156113f85750604d8260010b13155b8015611408575060328260010b12155b1561141557506001610ae5565b60418360010b1215801561142d5750604b8360010b13155b801561143c57508160010b6032145b1561144957506001610ae5565b50600092915050565b7e2250fe51283021e04a7ab438c6e1fb5184bc6bc6b97d70d0deb8942f11485a61147c813361246b565b600083810b8082526105c56020908152604092839020859055825191825281018490527fea1da7e36fe3951edfbb12f84178022f310397711a3ae0c018285e5aaaef0e2e910160405180910390a1505050565b600182810b60009081526105c4602090815260408083209385900b83529290529081208054820361150c5761150484846115f8565b915050610ae5565b805461150490611a29565b7e2250fe51283021e04a7ab438c6e1fb5184bc6bc6b97d70d0deb8942f11485a611541813361246b565b60008061154e8888612bfb565b9150915060008061155f8888612bfb565b9092509050611583611572836001613b91565b61157d836001613b91565b88612c91565b61158e848488612c91565b6115ab8461159d836001613b91565b6115a689613bb7565b612c91565b6115c36115b9836001613b91565b846115a689613bb7565b50505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000806105c5600061160a86866123ca565b60000b60000b8152602001908152602001600020549050806000036116675760405162461bcd60e51b81526020600482015260136024820152724552525f4e4f545f55505f464f525f53414c4560681b6044820152606401610b78565b9392505050565b60008060405180610140016040528060098152602001601e8152602001603c8152602001606481526020016082815260200160b4815260200160dc815260200161012c815260200161017281526020016101a381525090506000604051806101400160405280602d8152602001605981526020016096815260200160fa815260200161015e81526020016101e0815260200161025881526020016102bc81526020016103208152602001610352815250905060006040518061014001604052806001815260200160058152602001600a815260200160148152602001603281526020016050815260200160648152602001608c815260200160b4815260200160c881525090506000808711156117e45760095b8481600a811061179357611793613ab3565b60200201516117aa90670de0b6b3a7640000613bd5565b8811156117d9578281600a81106117c3576117c3613ab3565b60200201516117d29083613b00565b91506117e2565b60001901611781565b505b851561183e5760095b8381600a81106117ff576117ff613ab3565b6020020151871115611833578281600a811061181d5761181d613ab3565b602002015161182c9083613b00565b915061183c565b600019016117ed565b505b9695505050505050565b600380600554600160a01b900460ff166003811115611869576118696136f4565b146118865760405162461bcd60e51b8152600401610b78906139c9565b6002600154036118a85760405162461bcd60e51b8152600401610b7890613a00565b60026001556118b8338484612999565b6118c28383612bcf565b63ffffffff16336001600160a01b03167f43b6df8ffaf0a6a2607904d905d7f580b6beba1e6be91cbadb435af747ad2d7d85853460036040516119089493929190613b6a565b60405180910390a350506001805550565b6000611925813361246b565b811515600460149054906101000a900460ff161515036119875760405162461bcd60e51b815260206004820152601960248201527f4552525f414c52454144595f444553495245445f56414c5545000000000000006044820152606401610b78565b60048054831515600160a01b0260ff60a01b199091161790556040517f76a6a5331d7729d07d3b7aa48167f88011af5b788170ae801a227eac3bc21a3790610bcb90841515815260200190565b6000828152602081905260409020600101546119f0813361246b565b610e6e8383612934565b6000611a06813361246b565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b60006014611a38836015613bd5565b610ae59190613bf4565b600180600554600160a01b900460ff166003811115611a6357611a636136f4565b14611a805760405162461bcd60e51b8152600401610b78906139c9565b600260015403611aa25760405162461bcd60e51b8152600401610b7890613a00565b6002600155600454600160a01b900460ff16611af95760405162461bcd60e51b815260206004820152601660248201527511549497d35553151257d0925117d11254d05093115160521b6044820152606401610b78565b33866000819003611b3b5760405162461bcd60e51b815260206004820152600c60248201526b11549497d393d7d25394155560a21b6044820152606401610b78565b808614611b5a5760405162461bcd60e51b8152600401610b7890613ac9565b808414611b795760405162461bcd60e51b8152600401610b7890613ac9565b600081611b8584610993565b1015611bd35760405162461bcd60e51b815260206004820152601f60248201527f4552525f494e53554646494349454e545f424944535f52454d41494e494e47006044820152606401610b78565b60005b82811015611c0c57868682818110611bf057611bf0613ab3565b9050602002013582611c029190613b00565b9150600101611bd6565b50803414611c2c5760405162461bcd60e51b8152600401610b7890613b18565b60005b82811015611cd65760008b8b83818110611c4b57611c4b613ab3565b9050602002016020810190611c609190613b4f565b905060008a8a84818110611c7657611c76613ab3565b9050602002016020810190611c8b9190613b4f565b9050611c978282611344565b15611cb45760405162461bcd60e51b8152600401610b7890613c16565b611ccc8683838c8c888181106111be576111be613ab3565b5050600101611c2f565b505060018055505050505050505050565b6003600554600160a01b900460ff166003811115611d0757611d076136f4565b1480611d3057506002600554600160a01b900460ff166003811115611d2e57611d2e6136f4565b145b611d7c5760405162461bcd60e51b815260206004820181905260248201527f4552525f4d5553545f574149545f464f525f42494444494e475f544f5f454e446044820152606401610b78565b82818114611d9c5760405162461bcd60e51b8152600401610b7890613ac9565b60005b81811015611f5b576000868683818110611dbb57611dbb613ab3565b9050602002016020810190611dd09190613b4f565b90506000858584818110611de657611de6613ab3565b9050602002016020810190611dfb9190613b4f565b9050600182900b605f1913801590611e1857506060600183900b13155b611e345760405162461bcd60e51b8152600401610b7890613c4d565b600181900b60621913801590611e4f57506063600182900b13155b611e6b5760405162461bcd60e51b8152600401610b7890613c79565b600182810b60009081526105c46020908152604080832085850b8452909152902001546001600160a01b031680611ed75760405162461bcd60e51b815260206004820152601060248201526f11549497d393d7d0925117d193d5539160821b6044820152606401610b78565b60025460405162edcc2360e71b81526001600160a01b038381166004830152600186810b602484015285900b6044830152909116906376e6118090606401600060405180830381600087803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b50505050505050611f548160010190565b9050611d9f565b505050505050565b600280600554600160a01b900460ff166003811115611f8457611f846136f4565b14611fa15760405162461bcd60e51b8152600401610b78906139c9565b600260015403611fc35760405162461bcd60e51b8152600401610b7890613a00565b6002600155611fd133610993565b6000036120185760405162461bcd60e51b81526020600482015260156024820152744552525f4e4f5f424944535f52454d41494e494e4760581b6044820152606401610b78565b6120228383611344565b1561203f5760405162461bcd60e51b8152600401610b7890613c16565b61204a338484612999565b6120548383612bcf565b63ffffffff16336001600160a01b03167f43b6df8ffaf0a6a2607904d905d7f580b6beba1e6be91cbadb435af747ad2d7d85853460026040516119089493929190613b6a565b60006120a6813361246b565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501580156120dc573d6000803e3d6000fd5b50505050565b600180600554600160a01b900460ff166003811115612103576121036136f4565b146121205760405162461bcd60e51b8152600401610b78906139c9565b6002600154036121425760405162461bcd60e51b8152600401610b7890613a00565b60026001553361215181610993565b6000036121985760405162461bcd60e51b81526020600482015260156024820152744552525f4e4f5f424944535f52454d41494e494e4760581b6044820152606401610b78565b6121a28484611344565b156121bf5760405162461bcd60e51b8152600401610b7890613c16565b6121cb8185853461253c565b5050600180555050565b60006121e1813361246b565b50600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526105c660205260408120546060918291908167ffffffffffffffff81111561223d5761223d613a9d565b604051908082528060200260200182016040528015612266578160200160208202803683370190505b50905060008267ffffffffffffffff81111561228457612284613a9d565b6040519080825280602002602001820160405280156122ad578160200160208202803683370190505b506001600160a01b03871660009081526105c76020526040812080549293509091825b818110156123ba576001600160a01b038a1660009081526105c860205260408120845490919085908490811061230857612308613ab3565b6000918252602080832060088304015460079092166004026101000a90910463ffffffff16835282019290925260400190205460ff166001036123b25760008061235d858481548110610db057610db0613ab3565b915091508188878151811061237457612374613ab3565b602002602001019060010b908160010b815250508087878151811061239b5761239b613ab3565b600192830b60209182029290920101528601955050505b6001016122d0565b5093989297509195505050505050565b60008060006123d98585612bfb565b90925090506000825b61ffff81161561246157825b61ffff8116156124525760068261ffff1660d2811061240f5761240f613ab3565b600702018161ffff1660cc811061242857612428613ab3565b602081049190910154601f9091166101000a9004600090810b9390930192819003811690036123ee565b506000819003811690036123e2565b5095945050505050565b61247582826115cf565b610eed5761248d816001600160a01b03166014612d2e565b612498836020612d2e565b6040516020016124a9929190613cd1565b60408051601f198184030181529082905262461bcd60e51b8252610b7891600401613d46565b6040516bffffffffffffffffffffffff19606083901b1660208201526000906034015b604051602081830303815290604052805190602001209050919050565b60006125248261251e85612eca565b90612f05565b6005546001600160a01b039182169116149392505050565b8282600182900b605f191380159061255957506060600183900b13155b6125755760405162461bcd60e51b8152600401610b7890613c4d565b600181900b6062191380159061259057506063600182900b13155b6125ac5760405162461bcd60e51b8152600401610b7890613c79565b60006125b88686612bcf565b600187810b60009081526105c460209081526040808320938a900b83529290529081208054929350919003612615576125f187876115f8565b8510156126105760405162461bcd60e51b8152600401610b7890613b18565b612726565b60018101546001600160a01b03908116908916036126755760405162461bcd60e51b815260206004820152601a60248201527f4552525f43414e4e4f545f4f55544249445f594f555253454c460000000000006044820152606401610b78565b805461268090611a29565b85101561269f5760405162461bcd60e51b8152600401610b7890613b18565b600181015481546126b9916001600160a01b031690612f29565b6001818101546001600160a01b031660009081526105c66020526040812080549091906126e79084906139b2565b909155505060018101546001600160a01b031660009081526105c86020908152604080832063ffffffff861684529091529020805460ff191660021790555b600181810180546001600160a01b0319166001600160a01b038b1690811790915586835560009081526105c6602052604081208054909190612769908490613b00565b90915550506001600160a01b03881660009081526105c86020908152604080832063ffffffff8616845290915281205460ff1690036127f4576001600160a01b03881660009081526105c7602090815260408220805460018101825590835291206008820401805460079092166004026101000a63ffffffff81810219909316928516029190911790555b6001600160a01b03881660008181526105c86020908152604080832063ffffffff871680855290835292819020805460ff1916600190811790915581518c820b8152908b900b9281019290925281018890524260608201529091907f634d7a21f3602fc1b9ebe6a41b4de9dedabd8186a8e4d4f8c04bcac3e11e133c9060800160405180910390a35050505050505050565b60008061289a61ffff601085901c1661303f565b91506128a961ffff841661303f565b9050915091565b6128ba82826115cf565b610eed576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556128f03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61293e82826115cf565b15610eed576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8181600182900b605f19138015906129b657506060600183900b13155b6129d25760405162461bcd60e51b8152600401610b7890613c4d565b600181900b606219138015906129ed57506063600182900b13155b612a095760405162461bcd60e51b8152600401610b7890613c79565b600184810b60009081526105c4602090815260408083209387900b835292905220805415612a6f5760405162461bcd60e51b81526020600482015260136024820152724552525f4e4f545f55505f464f525f53414c4560681b6044820152606401610b78565b612a7985856115f8565b3414612a975760405162461bcd60e51b8152600401610b7890613b18565b600181810180546001600160a01b0319166001600160a01b03891690811790915534835560009081526105c6602052604081208054909190612ada908490613b00565b9091555060009050612aec8686612bcf565b6001600160a01b0388811660008181526105c7602090815260408083208054600180820183559185528385206008820401805463ffffffff8a81166004600790951685026101000a818102920219909216179091558686526105c8855283862090865290935292819020805460ff191684179055600254905162edcc2360e71b8152918201939093528a820b60248201529089900b604482015292935016906376e6118090606401600060405180830381600087803b158015612bae57600080fd5b505af1158015612bc2573d6000803e3d6000fd5b5050505050505050505050565b600061ffff8261ffff161663ffff0000620100008561ffff16612bf29190613d79565b16179392505050565b6000808383600182900b605f1913801590612c1b57506060600183900b13155b612c375760405162461bcd60e51b8152600401610b7890613c4d565b600181900b60621913801590612c5257506063600182900b13155b612c6e5760405162461bcd60e51b8152600401610b7890613c79565b612c79866061613da5565b612c84866064613dea565b9350935050509250929050565b825b60c261ffff8216116120dc57825b60c861ffff821611612d20578260068361ffff1660d28110612cc557612cc5613ab3565b600702018261ffff1660cc8110612cde57612cde613ab3565b60208104909101805460ff601f9093166101000a80820460000b909401831684029290930219909216179055612d1981600081900381160190565b9050612ca1565b506000819003811601612c93565b60606000612d3d836002613bd5565b612d48906002613b00565b67ffffffffffffffff811115612d6057612d60613a9d565b6040519080825280601f01601f191660200182016040528015612d8a576020820181803683370190505b509050600360fc1b81600081518110612da557612da5613ab3565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612dd457612dd4613ab3565b60200101906001600160f81b031916908160001a9053506000612df8846002613bd5565b612e03906001613b00565b90505b6001811115612e7b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612e3757612e37613ab3565b1a60f81b828281518110612e4d57612e4d613ab3565b60200101906001600160f81b031916908160001a90535060049490941c93612e7481613e30565b9050612e06565b5083156116675760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b78565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c016124f2565b6000806000612f148585613059565b91509150612f21816130c7565b509392505050565b612f338282613280565b610eed577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015612f9257600080fd5b505af1158015612fa6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690527f000000000000000000000000000000000000000000000000000000000000000016935063a9059cbb925060440190506020604051808303816000875af115801561301b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6e9190613e47565b6000618000821615613055575063ffff00001790565b5090565b600080825160410361308f5760208301516040840151606085015160001a613083878285856132fe565b945094505050506130c0565b82516040036130b857602083015160408401516130ad8683836133eb565b9350935050506130c0565b506000905060025b9250929050565b60008160048111156130db576130db6136f4565b036130e35750565b60018160048111156130f7576130f76136f4565b036131445760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b78565b6002816004811115613158576131586136f4565b036131a55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b78565b60038160048111156131b9576131b96136f4565b036132115760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b78565b6004816004811115613225576132256136f4565b0361327d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610b78565b50565b6040805160008082526020820190925281906001600160a01b038516906175309085906040516132b09190613e64565b600060405180830381858888f193505050503d80600081146132ee576040519150601f19603f3d011682016040523d82523d6000602084013e6132f3565b606091505b509095945050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561333557506000905060036133e2565b8460ff16601b1415801561334d57508460ff16601c14155b1561335e57506000905060046133e2565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156133b2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166133db576000600192509250506133e2565b9150600090505b94509492505050565b6000806001600160ff1b0383168161340860ff86901c601b613b00565b9050613416878288856132fe565b935093505050935093915050565b80356001600160a01b038116811461343b57600080fd5b919050565b60006020828403121561345257600080fd5b61166782613424565b60006020828403121561346d57600080fd5b81356001600160e01b03198116811461166757600080fd5b8035600181900b811461343b57600080fd5b60008083601f8401126134a957600080fd5b50813567ffffffffffffffff8111156134c157600080fd5b6020830191508360208285010111156130c057600080fd5b600080600080606085870312156134ef57600080fd5b6134f885613485565b935061350660208601613485565b9250604085013567ffffffffffffffff81111561352257600080fd5b61352e87828801613497565b95989497509550505050565b600081518084526020808501945080840160005b8381101561356d578151600190810b885296830196918301910161354e565b509495945050505050565b60408152600061358b604083018561353a565b828103602084015261359d818561353a565b95945050505050565b6000602082840312156135b857600080fd5b5035919050565b600080604083850312156135d257600080fd5b823591506135e260208401613424565b90509250929050565b60008083601f8401126135fd57600080fd5b50813567ffffffffffffffff81111561361557600080fd5b6020830191508360208260051b85010111156130c057600080fd5b6000806000806000806000806080898b03121561364c57600080fd5b883567ffffffffffffffff8082111561366457600080fd5b6136708c838d016135eb565b909a50985060208b013591508082111561368957600080fd5b6136958c838d016135eb565b909850965060408b01359150808211156136ae57600080fd5b6136ba8c838d016135eb565b909650945060608b01359150808211156136d357600080fd5b506136e08b828c01613497565b999c989b5096995094979396929594505050565b634e487b7160e01b600052602160045260246000fd5b6004811061372857634e487b7160e01b600052602160045260246000fd5b9052565b60208101610ae5828461370a565b6000806040838503121561374d57600080fd5b61375683613485565b91506135e260208401613485565b8035600081900b811461343b57600080fd5b6000806040838503121561378957600080fd5b61379283613764565b946020939093013593505050565b600080600080600060a086880312156137b857600080fd5b6137c186613485565b94506137cf60208701613485565b93506137dd60408701613485565b92506137eb60608701613485565b91506137f960808701613764565b90509295509295909350565b6000806040838503121561381857600080fd5b50508035926020909101359150565b801515811461327d57600080fd5b60006020828403121561384757600080fd5b813561166781613827565b6000806000806000806060878903121561386b57600080fd5b863567ffffffffffffffff8082111561388357600080fd5b61388f8a838b016135eb565b909850965060208901359150808211156138a857600080fd5b6138b48a838b016135eb565b909650945060408901359150808211156138cd57600080fd5b506138da89828a016135eb565b979a9699509497509295939492505050565b6000602082840312156138fe57600080fd5b61166782613764565b6000806000806040858703121561391d57600080fd5b843567ffffffffffffffff8082111561393557600080fd5b613941888389016135eb565b9096509450602087013591508082111561395a57600080fd5b5061352e878288016135eb565b6000806040838503121561397a57600080fd5b61379283613424565b60006020828403121561399557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156139c4576139c461399c565b500390565b6020808252601b908201527f4552525f544849535f53544147455f4e4f545f4c4956455f5945540000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526015908201527411549497d4d251d3905515549157d2539590531251605a1b604082015260600190565b60208082526018908201527f4552525f4e4f545f494e5f534849424f5348495f5a4f4e450000000000000000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60208082526019908201527f4552525f494e5055545f4c454e4754485f4d49534d4154434800000000000000604082015260600190565b60008219821115613b1357613b1361399c565b500190565b6020808252601c908201527f4552525f494e53554646494349454e545f414d4f554e545f53454e5400000000604082015260600190565b600060208284031215613b6157600080fd5b61166782613485565b600185810b825284900b6020820152604081018390526080810161359d606083018461370a565b600061ffff808316818516808303821115613bae57613bae61399c565b01949350505050565b600081810b60808101613bcc57613bcc61399c565b60000392915050565b6000816000190483118215151615613bef57613bef61399c565b500290565b600082613c1157634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601c908201527f4552525f4e4f5f4d494e545f494e5f534849424f5348495f5a4f4e4500000000604082015260600190565b6020808252601290820152714552525f585f4f55545f4f465f52414e474560701b604082015260600190565b6020808252601290820152714552525f595f4f55545f4f465f52414e474560701b604082015260600190565b60005b83811015613cc0578181015183820152602001613ca8565b838111156120dc5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613d09816017850160208801613ca5565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613d3a816028840160208801613ca5565b01602801949350505050565b6020815260008251806020840152613d65816040850160208701613ca5565b601f01601f19169190910160400192915050565b600063ffffffff80831681851681830481118215151615613d9c57613d9c61399c565b02949350505050565b60008160010b8360010b6000821282617fff03821381151615613dca57613dca61399c565b82617fff19038212811615613de157613de161399c565b50019392505050565b60008160010b8360010b6000811281617fff1901831281151615613e1057613e1061399c565b81617fff018313811615613e2657613e2661399c565b5090039392505050565b600081613e3f57613e3f61399c565b506000190190565b600060208284031215613e5957600080fd5b815161166781613827565b60008251613e76818460208701613ca5565b919091019291505056fea2646970667358221220afebf16deae3a623e1e5356aff2fdb29d6e7137aae804d82fd7f910a8c025cc964736f6c634300080d0033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000efaed650f1a94801806bb110019d9b0dc79531a8000000000000000000000000cdefd353ba028a77c1cfbbf9571e7a19df582380000000000000000000000000be4e191b22368bff26aa60be498575c477af5cc3
Deployed Bytecode
0x6080604052600436106102c85760003560e01c806391d1485411610175578063d598c9e9116100dc578063e45d1cf811610095578063f4bdf6ac1161006f578063f4bdf6ac1461090d578063f4c9cbf314610920578063f5ada9ad14610940578063f7eeae621461096057600080fd5b8063e45d1cf8146108ba578063ed9969a4146108da578063f3fef3a3146108ed57600080fd5b8063d598c9e91461080e578063d5ed9cba14610823578063d630891014610843578063d9d99d2314610863578063dce5fdbf14610876578063dfc1a731146108a457600080fd5b8063bd4dc0241161012e578063bd4dc02414610766578063c67d054514610786578063c9e525df146107a6578063cacee621146107bb578063d25b730a146107ce578063d547741f146107ee57600080fd5b806391d1485414610662578063935302cc14610682578063983316db146106a2578063a217fddf146106d5578063aaf5ddcd146106ea578063afc01ac31461075057600080fd5b80634441a88d11610234578063674cb7c6116101ed57806370cbc961116101c757806370cbc961146105e257806374ed6242146106025780637be8a6771461062257806386d35a7b1461064257600080fd5b8063674cb7c61461057a578063693f917e1461059a5780636e6bdc2b146105c257600080fd5b80634441a88d146104bd57806347c3593f146104d05780635b7633d0146104f85780635bf5d54c146105185780635f4b10251461054657806363b157691461056757600080fd5b80631b3e9916116102865780631b3e9916146103b3578063248a9ca3146103e15780632f2ff15d1461041157806336568abe146104315780633eb1d777146104515780633fc8cef31461047157600080fd5b80626a25dd146102cd57806301ffc9a71461030057806302ed71ae14610330578063046dc166146103525780630c6838bc1461037257806317996362146103a0575b600080fd5b3480156102d957600080fd5b506102ed6102e8366004613440565b610993565b6040519081526020015b60405180910390f35b34801561030c57600080fd5b5061032061031b36600461345b565b610ab4565b60405190151581526020016102f7565b34801561033c57600080fd5b5061035061034b366004613440565b610aeb565b005b34801561035e57600080fd5b5061035061036d366004613440565b610b1a565b34801561037e57600080fd5b506102ed61038d366004613440565b6105c66020526000908152604090205481565b6103506103ae3660046134d9565b610bd7565b3480156103bf57600080fd5b506103d36103ce366004613440565b610cdf565b6040516102f7929190613578565b3480156103ed57600080fd5b506102ed6103fc3660046135a6565b60009081526020819052604090206001015490565b34801561041d57600080fd5b5061035061042c3660046135bf565b610e48565b34801561043d57600080fd5b5061035061044c3660046135bf565b610e73565b34801561045d57600080fd5b5061035061046c3660046135a6565b610ef1565b34801561047d57600080fd5b506104a57f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6040516001600160a01b0390911681526020016102f7565b6103506104cb366004613630565b610f66565b3480156104dc57600080fd5b506104e5606381565b60405160019190910b81526020016102f7565b34801561050457600080fd5b506005546104a5906001600160a01b031681565b34801561052457600080fd5b5060055461053990600160a01b900460ff1681565b6040516102f7919061372c565b34801561055257600080fd5b5060045461032090600160a01b900460ff1681565b6103506105753660046134d9565b6111e7565b34801561058657600080fd5b506004546104a5906001600160a01b031681565b3480156105a657600080fd5b506105af60c881565b60405161ffff90911681526020016102f7565b3480156105ce57600080fd5b506103206105dd36600461373a565b611344565b3480156105ee57600080fd5b506003546104a5906001600160a01b031681565b34801561060e57600080fd5b5061035061061d366004613776565b611452565b34801561062e57600080fd5b506102ed61063d36600461373a565b6114cf565b34801561064e57600080fd5b5061035061065d3660046137a0565b611517565b34801561066e57600080fd5b5061032061067d3660046135bf565b6115cf565b34801561068e57600080fd5b506102ed61069d36600461373a565b6115f8565b3480156106ae57600080fd5b506102ed7e2250fe51283021e04a7ab438c6e1fb5184bc6bc6b97d70d0deb8942f11485a81565b3480156106e157600080fd5b506102ed600081565b3480156106f657600080fd5b5061073361070536600461373a565b6105c4602090815260009283526040808420909152908252902080546001909101546001600160a01b031682565b604080519283526001600160a01b039091166020830152016102f7565b34801561075c57600080fd5b506104e560621981565b34801561077257600080fd5b506002546104a5906001600160a01b031681565b34801561079257600080fd5b506102ed6107a1366004613805565b61166e565b3480156107b257600080fd5b506105af60c281565b6103506107c936600461373a565b611848565b3480156107da57600080fd5b506103506107e9366004613835565b611919565b3480156107fa57600080fd5b506103506108093660046135bf565b6119d4565b34801561081a57600080fd5b506104e5606081565b34801561082f57600080fd5b5061035061083e366004613440565b6119fa565b34801561084f57600080fd5b506102ed61085e3660046135a6565b611a29565b610350610871366004613852565b611a42565b34801561088257600080fd5b506102ed6108913660046138ec565b6105c56020526000908152604090205481565b3480156108b057600080fd5b506104e5605f1981565b3480156108c657600080fd5b506103506108d5366004613907565b611ce7565b6103506108e836600461373a565b611f63565b3480156108f957600080fd5b50610350610908366004613967565b61209a565b61035061091b36600461373a565b6120e2565b34801561092c57600080fd5b5061035061093b366004613440565b6121d5565b34801561094c57600080fd5b506103d361095b366004613440565b612204565b34801561096c57600080fd5b5061098061097b36600461373a565b6123ca565b60405160009190910b81526020016102f7565b60035460405163dd4bc10160e01b81526001600160a01b038381166004830152600092839291169063dd4bc10190602401602060405180830381865afa1580156109e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a059190613983565b6004805460405163dd4bc10160e01b81526001600160a01b038781169382019390935292935060009291169063dd4bc10190602401602060405180830381865afa158015610a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7b9190613983565b6001600160a01b03851660009081526105c66020526040902054909150610aa2838361166e565b610aac91906139b2565b949350505050565b60006001600160e01b03198216637965db0b60e01b1480610ae557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000610af7813361246b565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610b26813361246b565b6001600160a01b038216610b815760405162461bcd60e51b815260206004820152601a60248201527f4552525f43414e4e4f545f42455f5a45524f5f4144445245535300000000000060448201526064015b60405180910390fd5b600580546001600160a01b0319166001600160a01b0384169081179091556040519081527f9eaa897564d022fb8c5efaf0acdb5d9d27b440b2aad44400b6e1c702e65b9ed3906020015b60405180910390a15050565b600180600554600160a01b900460ff166003811115610bf857610bf86136f4565b14610c155760405162461bcd60e51b8152600401610b78906139c9565b600260015403610c375760405162461bcd60e51b8152600401610b7890613a00565b600260015533610c85610c49826124cf565b85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061250f92505050565b610ca15760405162461bcd60e51b8152600401610b7890613a37565b610cab8686611344565b610cc75760405162461bcd60e51b8152600401610b7890613a66565b610cd38187873461253c565b50506001805550505050565b6001600160a01b03811660009081526105c7602052604081208054606092839291908167ffffffffffffffff811115610d1a57610d1a613a9d565b604051908082528060200260200182016040528015610d43578160200160208202803683370190505b50905060008267ffffffffffffffff811115610d6157610d61613a9d565b604051908082528060200260200182016040528015610d8a578160200160208202803683370190505b50905060005b83811015610e3b57600080610ddb878481548110610db057610db0613ab3565b90600052602060002090600891828204019190066004029054906101000a900463ffffffff16612886565b9150915081858481518110610df257610df2613ab3565b602002602001019060010b908160010b8152505080848481518110610e1957610e19613ab3565b600192830b602091820292909201015283019150610e349050565b9050610d90565b5090969095509350505050565b600082815260208190526040902060010154610e64813361246b565b610e6e83836128b0565b505050565b6001600160a01b0381163314610ee35760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b78565b610eed8282612934565b5050565b6000610efd813361246b565b816003811115610f0f57610f0f6136f4565b6005805460ff60a01b1916600160a01b836003811115610f3157610f316136f4565b02179055506040518281527f02f604feff374725ab69a4a6b22fbfb7f79b787bc42299abdea1de38ec4ef4b690602001610bcb565b600180600554600160a01b900460ff166003811115610f8757610f876136f4565b14610fa45760405162461bcd60e51b8152600401610b78906139c9565b600260015403610fc65760405162461bcd60e51b8152600401610b7890613a00565b6002600155600454600160a01b900460ff1661101d5760405162461bcd60e51b815260206004820152601660248201527511549497d35553151257d0925117d11254d05093115160521b6044820152606401610b78565b3361102a610c49826124cf565b6110465760405162461bcd60e51b8152600401610b7890613a37565b8860008190036110875760405162461bcd60e51b815260206004820152600c60248201526b11549497d393d7d25394155560a21b6044820152606401610b78565b8088146110a65760405162461bcd60e51b8152600401610b7890613ac9565b8086146110c55760405162461bcd60e51b8152600401610b7890613ac9565b6000805b828110156110ff578888828181106110e3576110e3613ab3565b90506020020135826110f59190613b00565b91506001016110c9565b5080341461111f5760405162461bcd60e51b8152600401610b7890613b18565b60005b828110156111d45760008d8d8381811061113e5761113e613ab3565b90506020020160208101906111539190613b4f565b905060008c8c8481811061116957611169613ab3565b905060200201602081019061117e9190613b4f565b905061118a8282611344565b6111a65760405162461bcd60e51b8152600401610b7890613a66565b6111ca8683838e8e888181106111be576111be613ab3565b9050602002013561253c565b5050600101611122565b5050600180555050505050505050505050565b600280600554600160a01b900460ff166003811115611208576112086136f4565b146112255760405162461bcd60e51b8152600401610b78906139c9565b6002600154036112475760405162461bcd60e51b8152600401610b7890613a00565b6002600155611294611258336124cf565b84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061250f92505050565b6112b05760405162461bcd60e51b8152600401610b7890613a37565b6112ba8585611344565b6112d65760405162461bcd60e51b8152600401610b7890613a66565b6112e1338686612999565b6112eb8585612bcf565b63ffffffff16336001600160a01b03167f43b6df8ffaf0a6a2607904d905d7f580b6beba1e6be91cbadb435af747ad2d7d87873460026040516113319493929190613b6a565b60405180910390a3505060018055505050565b6000600c8360010b1215801561135e575060308360010b13155b801561136e575060638260010b13155b801561137e575060418260010b12155b1561138b57506001610ae5565b60318360010b121580156113a35750604d8360010b13155b80156113b3575060638260010b13155b80156113c35750604e8260010b12155b156113d057506001610ae5565b604c8360010b121580156113e85750604d8360010b13155b80156113f85750604d8260010b13155b8015611408575060328260010b12155b1561141557506001610ae5565b60418360010b1215801561142d5750604b8360010b13155b801561143c57508160010b6032145b1561144957506001610ae5565b50600092915050565b7e2250fe51283021e04a7ab438c6e1fb5184bc6bc6b97d70d0deb8942f11485a61147c813361246b565b600083810b8082526105c56020908152604092839020859055825191825281018490527fea1da7e36fe3951edfbb12f84178022f310397711a3ae0c018285e5aaaef0e2e910160405180910390a1505050565b600182810b60009081526105c4602090815260408083209385900b83529290529081208054820361150c5761150484846115f8565b915050610ae5565b805461150490611a29565b7e2250fe51283021e04a7ab438c6e1fb5184bc6bc6b97d70d0deb8942f11485a611541813361246b565b60008061154e8888612bfb565b9150915060008061155f8888612bfb565b9092509050611583611572836001613b91565b61157d836001613b91565b88612c91565b61158e848488612c91565b6115ab8461159d836001613b91565b6115a689613bb7565b612c91565b6115c36115b9836001613b91565b846115a689613bb7565b50505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000806105c5600061160a86866123ca565b60000b60000b8152602001908152602001600020549050806000036116675760405162461bcd60e51b81526020600482015260136024820152724552525f4e4f545f55505f464f525f53414c4560681b6044820152606401610b78565b9392505050565b60008060405180610140016040528060098152602001601e8152602001603c8152602001606481526020016082815260200160b4815260200160dc815260200161012c815260200161017281526020016101a381525090506000604051806101400160405280602d8152602001605981526020016096815260200160fa815260200161015e81526020016101e0815260200161025881526020016102bc81526020016103208152602001610352815250905060006040518061014001604052806001815260200160058152602001600a815260200160148152602001603281526020016050815260200160648152602001608c815260200160b4815260200160c881525090506000808711156117e45760095b8481600a811061179357611793613ab3565b60200201516117aa90670de0b6b3a7640000613bd5565b8811156117d9578281600a81106117c3576117c3613ab3565b60200201516117d29083613b00565b91506117e2565b60001901611781565b505b851561183e5760095b8381600a81106117ff576117ff613ab3565b6020020151871115611833578281600a811061181d5761181d613ab3565b602002015161182c9083613b00565b915061183c565b600019016117ed565b505b9695505050505050565b600380600554600160a01b900460ff166003811115611869576118696136f4565b146118865760405162461bcd60e51b8152600401610b78906139c9565b6002600154036118a85760405162461bcd60e51b8152600401610b7890613a00565b60026001556118b8338484612999565b6118c28383612bcf565b63ffffffff16336001600160a01b03167f43b6df8ffaf0a6a2607904d905d7f580b6beba1e6be91cbadb435af747ad2d7d85853460036040516119089493929190613b6a565b60405180910390a350506001805550565b6000611925813361246b565b811515600460149054906101000a900460ff161515036119875760405162461bcd60e51b815260206004820152601960248201527f4552525f414c52454144595f444553495245445f56414c5545000000000000006044820152606401610b78565b60048054831515600160a01b0260ff60a01b199091161790556040517f76a6a5331d7729d07d3b7aa48167f88011af5b788170ae801a227eac3bc21a3790610bcb90841515815260200190565b6000828152602081905260409020600101546119f0813361246b565b610e6e8383612934565b6000611a06813361246b565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b60006014611a38836015613bd5565b610ae59190613bf4565b600180600554600160a01b900460ff166003811115611a6357611a636136f4565b14611a805760405162461bcd60e51b8152600401610b78906139c9565b600260015403611aa25760405162461bcd60e51b8152600401610b7890613a00565b6002600155600454600160a01b900460ff16611af95760405162461bcd60e51b815260206004820152601660248201527511549497d35553151257d0925117d11254d05093115160521b6044820152606401610b78565b33866000819003611b3b5760405162461bcd60e51b815260206004820152600c60248201526b11549497d393d7d25394155560a21b6044820152606401610b78565b808614611b5a5760405162461bcd60e51b8152600401610b7890613ac9565b808414611b795760405162461bcd60e51b8152600401610b7890613ac9565b600081611b8584610993565b1015611bd35760405162461bcd60e51b815260206004820152601f60248201527f4552525f494e53554646494349454e545f424944535f52454d41494e494e47006044820152606401610b78565b60005b82811015611c0c57868682818110611bf057611bf0613ab3565b9050602002013582611c029190613b00565b9150600101611bd6565b50803414611c2c5760405162461bcd60e51b8152600401610b7890613b18565b60005b82811015611cd65760008b8b83818110611c4b57611c4b613ab3565b9050602002016020810190611c609190613b4f565b905060008a8a84818110611c7657611c76613ab3565b9050602002016020810190611c8b9190613b4f565b9050611c978282611344565b15611cb45760405162461bcd60e51b8152600401610b7890613c16565b611ccc8683838c8c888181106111be576111be613ab3565b5050600101611c2f565b505060018055505050505050505050565b6003600554600160a01b900460ff166003811115611d0757611d076136f4565b1480611d3057506002600554600160a01b900460ff166003811115611d2e57611d2e6136f4565b145b611d7c5760405162461bcd60e51b815260206004820181905260248201527f4552525f4d5553545f574149545f464f525f42494444494e475f544f5f454e446044820152606401610b78565b82818114611d9c5760405162461bcd60e51b8152600401610b7890613ac9565b60005b81811015611f5b576000868683818110611dbb57611dbb613ab3565b9050602002016020810190611dd09190613b4f565b90506000858584818110611de657611de6613ab3565b9050602002016020810190611dfb9190613b4f565b9050600182900b605f1913801590611e1857506060600183900b13155b611e345760405162461bcd60e51b8152600401610b7890613c4d565b600181900b60621913801590611e4f57506063600182900b13155b611e6b5760405162461bcd60e51b8152600401610b7890613c79565b600182810b60009081526105c46020908152604080832085850b8452909152902001546001600160a01b031680611ed75760405162461bcd60e51b815260206004820152601060248201526f11549497d393d7d0925117d193d5539160821b6044820152606401610b78565b60025460405162edcc2360e71b81526001600160a01b038381166004830152600186810b602484015285900b6044830152909116906376e6118090606401600060405180830381600087803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b50505050505050611f548160010190565b9050611d9f565b505050505050565b600280600554600160a01b900460ff166003811115611f8457611f846136f4565b14611fa15760405162461bcd60e51b8152600401610b78906139c9565b600260015403611fc35760405162461bcd60e51b8152600401610b7890613a00565b6002600155611fd133610993565b6000036120185760405162461bcd60e51b81526020600482015260156024820152744552525f4e4f5f424944535f52454d41494e494e4760581b6044820152606401610b78565b6120228383611344565b1561203f5760405162461bcd60e51b8152600401610b7890613c16565b61204a338484612999565b6120548383612bcf565b63ffffffff16336001600160a01b03167f43b6df8ffaf0a6a2607904d905d7f580b6beba1e6be91cbadb435af747ad2d7d85853460026040516119089493929190613b6a565b60006120a6813361246b565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501580156120dc573d6000803e3d6000fd5b50505050565b600180600554600160a01b900460ff166003811115612103576121036136f4565b146121205760405162461bcd60e51b8152600401610b78906139c9565b6002600154036121425760405162461bcd60e51b8152600401610b7890613a00565b60026001553361215181610993565b6000036121985760405162461bcd60e51b81526020600482015260156024820152744552525f4e4f5f424944535f52454d41494e494e4760581b6044820152606401610b78565b6121a28484611344565b156121bf5760405162461bcd60e51b8152600401610b7890613c16565b6121cb8185853461253c565b5050600180555050565b60006121e1813361246b565b50600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526105c660205260408120546060918291908167ffffffffffffffff81111561223d5761223d613a9d565b604051908082528060200260200182016040528015612266578160200160208202803683370190505b50905060008267ffffffffffffffff81111561228457612284613a9d565b6040519080825280602002602001820160405280156122ad578160200160208202803683370190505b506001600160a01b03871660009081526105c76020526040812080549293509091825b818110156123ba576001600160a01b038a1660009081526105c860205260408120845490919085908490811061230857612308613ab3565b6000918252602080832060088304015460079092166004026101000a90910463ffffffff16835282019290925260400190205460ff166001036123b25760008061235d858481548110610db057610db0613ab3565b915091508188878151811061237457612374613ab3565b602002602001019060010b908160010b815250508087878151811061239b5761239b613ab3565b600192830b60209182029290920101528601955050505b6001016122d0565b5093989297509195505050505050565b60008060006123d98585612bfb565b90925090506000825b61ffff81161561246157825b61ffff8116156124525760068261ffff1660d2811061240f5761240f613ab3565b600702018161ffff1660cc811061242857612428613ab3565b602081049190910154601f9091166101000a9004600090810b9390930192819003811690036123ee565b506000819003811690036123e2565b5095945050505050565b61247582826115cf565b610eed5761248d816001600160a01b03166014612d2e565b612498836020612d2e565b6040516020016124a9929190613cd1565b60408051601f198184030181529082905262461bcd60e51b8252610b7891600401613d46565b6040516bffffffffffffffffffffffff19606083901b1660208201526000906034015b604051602081830303815290604052805190602001209050919050565b60006125248261251e85612eca565b90612f05565b6005546001600160a01b039182169116149392505050565b8282600182900b605f191380159061255957506060600183900b13155b6125755760405162461bcd60e51b8152600401610b7890613c4d565b600181900b6062191380159061259057506063600182900b13155b6125ac5760405162461bcd60e51b8152600401610b7890613c79565b60006125b88686612bcf565b600187810b60009081526105c460209081526040808320938a900b83529290529081208054929350919003612615576125f187876115f8565b8510156126105760405162461bcd60e51b8152600401610b7890613b18565b612726565b60018101546001600160a01b03908116908916036126755760405162461bcd60e51b815260206004820152601a60248201527f4552525f43414e4e4f545f4f55544249445f594f555253454c460000000000006044820152606401610b78565b805461268090611a29565b85101561269f5760405162461bcd60e51b8152600401610b7890613b18565b600181015481546126b9916001600160a01b031690612f29565b6001818101546001600160a01b031660009081526105c66020526040812080549091906126e79084906139b2565b909155505060018101546001600160a01b031660009081526105c86020908152604080832063ffffffff861684529091529020805460ff191660021790555b600181810180546001600160a01b0319166001600160a01b038b1690811790915586835560009081526105c6602052604081208054909190612769908490613b00565b90915550506001600160a01b03881660009081526105c86020908152604080832063ffffffff8616845290915281205460ff1690036127f4576001600160a01b03881660009081526105c7602090815260408220805460018101825590835291206008820401805460079092166004026101000a63ffffffff81810219909316928516029190911790555b6001600160a01b03881660008181526105c86020908152604080832063ffffffff871680855290835292819020805460ff1916600190811790915581518c820b8152908b900b9281019290925281018890524260608201529091907f634d7a21f3602fc1b9ebe6a41b4de9dedabd8186a8e4d4f8c04bcac3e11e133c9060800160405180910390a35050505050505050565b60008061289a61ffff601085901c1661303f565b91506128a961ffff841661303f565b9050915091565b6128ba82826115cf565b610eed576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556128f03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61293e82826115cf565b15610eed576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8181600182900b605f19138015906129b657506060600183900b13155b6129d25760405162461bcd60e51b8152600401610b7890613c4d565b600181900b606219138015906129ed57506063600182900b13155b612a095760405162461bcd60e51b8152600401610b7890613c79565b600184810b60009081526105c4602090815260408083209387900b835292905220805415612a6f5760405162461bcd60e51b81526020600482015260136024820152724552525f4e4f545f55505f464f525f53414c4560681b6044820152606401610b78565b612a7985856115f8565b3414612a975760405162461bcd60e51b8152600401610b7890613b18565b600181810180546001600160a01b0319166001600160a01b03891690811790915534835560009081526105c6602052604081208054909190612ada908490613b00565b9091555060009050612aec8686612bcf565b6001600160a01b0388811660008181526105c7602090815260408083208054600180820183559185528385206008820401805463ffffffff8a81166004600790951685026101000a818102920219909216179091558686526105c8855283862090865290935292819020805460ff191684179055600254905162edcc2360e71b8152918201939093528a820b60248201529089900b604482015292935016906376e6118090606401600060405180830381600087803b158015612bae57600080fd5b505af1158015612bc2573d6000803e3d6000fd5b5050505050505050505050565b600061ffff8261ffff161663ffff0000620100008561ffff16612bf29190613d79565b16179392505050565b6000808383600182900b605f1913801590612c1b57506060600183900b13155b612c375760405162461bcd60e51b8152600401610b7890613c4d565b600181900b60621913801590612c5257506063600182900b13155b612c6e5760405162461bcd60e51b8152600401610b7890613c79565b612c79866061613da5565b612c84866064613dea565b9350935050509250929050565b825b60c261ffff8216116120dc57825b60c861ffff821611612d20578260068361ffff1660d28110612cc557612cc5613ab3565b600702018261ffff1660cc8110612cde57612cde613ab3565b60208104909101805460ff601f9093166101000a80820460000b909401831684029290930219909216179055612d1981600081900381160190565b9050612ca1565b506000819003811601612c93565b60606000612d3d836002613bd5565b612d48906002613b00565b67ffffffffffffffff811115612d6057612d60613a9d565b6040519080825280601f01601f191660200182016040528015612d8a576020820181803683370190505b509050600360fc1b81600081518110612da557612da5613ab3565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612dd457612dd4613ab3565b60200101906001600160f81b031916908160001a9053506000612df8846002613bd5565b612e03906001613b00565b90505b6001811115612e7b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612e3757612e37613ab3565b1a60f81b828281518110612e4d57612e4d613ab3565b60200101906001600160f81b031916908160001a90535060049490941c93612e7481613e30565b9050612e06565b5083156116675760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b78565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c016124f2565b6000806000612f148585613059565b91509150612f21816130c7565b509392505050565b612f338282613280565b610eed577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015612f9257600080fd5b505af1158015612fa6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216935063a9059cbb925060440190506020604051808303816000875af115801561301b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6e9190613e47565b6000618000821615613055575063ffff00001790565b5090565b600080825160410361308f5760208301516040840151606085015160001a613083878285856132fe565b945094505050506130c0565b82516040036130b857602083015160408401516130ad8683836133eb565b9350935050506130c0565b506000905060025b9250929050565b60008160048111156130db576130db6136f4565b036130e35750565b60018160048111156130f7576130f76136f4565b036131445760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b78565b6002816004811115613158576131586136f4565b036131a55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b78565b60038160048111156131b9576131b96136f4565b036132115760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b78565b6004816004811115613225576132256136f4565b0361327d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610b78565b50565b6040805160008082526020820190925281906001600160a01b038516906175309085906040516132b09190613e64565b600060405180830381858888f193505050503d80600081146132ee576040519150601f19603f3d011682016040523d82523d6000602084013e6132f3565b606091505b509095945050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561333557506000905060036133e2565b8460ff16601b1415801561334d57508460ff16601c14155b1561335e57506000905060046133e2565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156133b2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166133db576000600192509250506133e2565b9150600090505b94509492505050565b6000806001600160ff1b0383168161340860ff86901c601b613b00565b9050613416878288856132fe565b935093505050935093915050565b80356001600160a01b038116811461343b57600080fd5b919050565b60006020828403121561345257600080fd5b61166782613424565b60006020828403121561346d57600080fd5b81356001600160e01b03198116811461166757600080fd5b8035600181900b811461343b57600080fd5b60008083601f8401126134a957600080fd5b50813567ffffffffffffffff8111156134c157600080fd5b6020830191508360208285010111156130c057600080fd5b600080600080606085870312156134ef57600080fd5b6134f885613485565b935061350660208601613485565b9250604085013567ffffffffffffffff81111561352257600080fd5b61352e87828801613497565b95989497509550505050565b600081518084526020808501945080840160005b8381101561356d578151600190810b885296830196918301910161354e565b509495945050505050565b60408152600061358b604083018561353a565b828103602084015261359d818561353a565b95945050505050565b6000602082840312156135b857600080fd5b5035919050565b600080604083850312156135d257600080fd5b823591506135e260208401613424565b90509250929050565b60008083601f8401126135fd57600080fd5b50813567ffffffffffffffff81111561361557600080fd5b6020830191508360208260051b85010111156130c057600080fd5b6000806000806000806000806080898b03121561364c57600080fd5b883567ffffffffffffffff8082111561366457600080fd5b6136708c838d016135eb565b909a50985060208b013591508082111561368957600080fd5b6136958c838d016135eb565b909850965060408b01359150808211156136ae57600080fd5b6136ba8c838d016135eb565b909650945060608b01359150808211156136d357600080fd5b506136e08b828c01613497565b999c989b5096995094979396929594505050565b634e487b7160e01b600052602160045260246000fd5b6004811061372857634e487b7160e01b600052602160045260246000fd5b9052565b60208101610ae5828461370a565b6000806040838503121561374d57600080fd5b61375683613485565b91506135e260208401613485565b8035600081900b811461343b57600080fd5b6000806040838503121561378957600080fd5b61379283613764565b946020939093013593505050565b600080600080600060a086880312156137b857600080fd5b6137c186613485565b94506137cf60208701613485565b93506137dd60408701613485565b92506137eb60608701613485565b91506137f960808701613764565b90509295509295909350565b6000806040838503121561381857600080fd5b50508035926020909101359150565b801515811461327d57600080fd5b60006020828403121561384757600080fd5b813561166781613827565b6000806000806000806060878903121561386b57600080fd5b863567ffffffffffffffff8082111561388357600080fd5b61388f8a838b016135eb565b909850965060208901359150808211156138a857600080fd5b6138b48a838b016135eb565b909650945060408901359150808211156138cd57600080fd5b506138da89828a016135eb565b979a9699509497509295939492505050565b6000602082840312156138fe57600080fd5b61166782613764565b6000806000806040858703121561391d57600080fd5b843567ffffffffffffffff8082111561393557600080fd5b613941888389016135eb565b9096509450602087013591508082111561395a57600080fd5b5061352e878288016135eb565b6000806040838503121561397a57600080fd5b61379283613424565b60006020828403121561399557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156139c4576139c461399c565b500390565b6020808252601b908201527f4552525f544849535f53544147455f4e4f545f4c4956455f5945540000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526015908201527411549497d4d251d3905515549157d2539590531251605a1b604082015260600190565b60208082526018908201527f4552525f4e4f545f494e5f534849424f5348495f5a4f4e450000000000000000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60208082526019908201527f4552525f494e5055545f4c454e4754485f4d49534d4154434800000000000000604082015260600190565b60008219821115613b1357613b1361399c565b500190565b6020808252601c908201527f4552525f494e53554646494349454e545f414d4f554e545f53454e5400000000604082015260600190565b600060208284031215613b6157600080fd5b61166782613485565b600185810b825284900b6020820152604081018390526080810161359d606083018461370a565b600061ffff808316818516808303821115613bae57613bae61399c565b01949350505050565b600081810b60808101613bcc57613bcc61399c565b60000392915050565b6000816000190483118215151615613bef57613bef61399c565b500290565b600082613c1157634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601c908201527f4552525f4e4f5f4d494e545f494e5f534849424f5348495f5a4f4e4500000000604082015260600190565b6020808252601290820152714552525f585f4f55545f4f465f52414e474560701b604082015260600190565b6020808252601290820152714552525f595f4f55545f4f465f52414e474560701b604082015260600190565b60005b83811015613cc0578181015183820152602001613ca8565b838111156120dc5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613d09816017850160208801613ca5565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613d3a816028840160208801613ca5565b01602801949350505050565b6020815260008251806020840152613d65816040850160208701613ca5565b601f01601f19169190910160400192915050565b600063ffffffff80831681851681830481118215151615613d9c57613d9c61399c565b02949350505050565b60008160010b8360010b6000821282617fff03821381151615613dca57613dca61399c565b82617fff19038212811615613de157613de161399c565b50019392505050565b60008160010b8360010b6000811281617fff1901831281151615613e1057613e1061399c565b81617fff018313811615613e2657613e2661399c565b5090039392505050565b600081613e3f57613e3f61399c565b506000190190565b600060208284031215613e5957600080fd5b815161166781613827565b60008251613e76818460208701613ca5565b919091019291505056fea2646970667358221220afebf16deae3a623e1e5356aff2fdb29d6e7137aae804d82fd7f910a8c025cc964736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000efaed650f1a94801806bb110019d9b0dc79531a8000000000000000000000000cdefd353ba028a77c1cfbbf9571e7a19df582380000000000000000000000000be4e191b22368bff26aa60be498575c477af5cc3
-----Decoded View---------------
Arg [0] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _landRegistry (address): 0xEfAEd650f1a94801806BB110019d9B0dc79531A8
Arg [2] : _lockLeash (address): 0xCdEfD353Ba028a77C1cFbbF9571E7A19df582380
Arg [3] : _lockShiboshi (address): 0xBe4E191B22368bfF26aA60Be498575C477AF5Cc3
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 000000000000000000000000efaed650f1a94801806bb110019d9b0dc79531a8
Arg [2] : 000000000000000000000000cdefd353ba028a77c1cfbbf9571e7a19df582380
Arg [3] : 000000000000000000000000be4e191b22368bff26aa60be498575c477af5cc3
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.