Feature Tip: Add private address tag to any address under My Name Tag !
This nametag was submitted by Kleros Curate.
Latest 25 from a total of 11,749 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Mint Winning Bid | 21716828 | 375 days ago | IN | 0 ETH | 0.00143239 | ||||
| Mint Winning Bid | 21716796 | 375 days ago | IN | 0 ETH | 0.00154015 | ||||
| Set Stage | 21475081 | 408 days ago | IN | 0 ETH | 0.00016238 | ||||
| Mint Winning Bid | 21459560 | 411 days ago | IN | 0 ETH | 0.00017875 | ||||
| Mint Public Mult... | 21388415 | 420 days ago | IN | 0.2 ETH | 0.00763925 | ||||
| Mint Public Mult... | 21388294 | 420 days ago | IN | 0.2 ETH | 0.00793589 | ||||
| Mint Winning Bid | 21363506 | 424 days ago | IN | 0 ETH | 0.0023087 | ||||
| Withdraw | 21088996 | 462 days ago | IN | 0 ETH | 0.00023291 | ||||
| Mint Public Mult... | 20909318 | 487 days ago | IN | 0.2 ETH | 0.0034601 | ||||
| Mint Winning Bid | 20898815 | 489 days ago | IN | 0 ETH | 0.00037845 | ||||
| Mint Public Mult... | 20877190 | 492 days ago | IN | 0.2 ETH | 0.00206427 | ||||
| Mint Winning Bid | 20405502 | 558 days ago | IN | 0 ETH | 0.00103537 | ||||
| Mint Winning Bid | 20200816 | 586 days ago | IN | 0 ETH | 0.00043222 | ||||
| Mint Winning Bid | 20200790 | 586 days ago | IN | 0 ETH | 0.00049899 | ||||
| Mint Public Mult... | 19864923 | 633 days ago | IN | 0.2 ETH | 0.00121235 | ||||
| Mint Public Mult... | 19816534 | 640 days ago | IN | 0.3 ETH | 0.00172284 | ||||
| Mint Public | 19806300 | 641 days ago | IN | 0.2 ETH | 0.00177584 | ||||
| Mint Public Mult... | 19753677 | 649 days ago | IN | 0.2 ETH | 0.00272355 | ||||
| Mint Public Mult... | 19753665 | 649 days ago | IN | 0.2 ETH | 0.00230091 | ||||
| Mint Public Mult... | 19749241 | 649 days ago | IN | 0.2 ETH | 0.00163349 | ||||
| Mint Public Mult... | 19749236 | 649 days ago | IN | 0.2 ETH | 0.00159825 | ||||
| Mint Winning Bid | 19691024 | 658 days ago | IN | 0 ETH | 0.00023779 | ||||
| Mint Public Mult... | 19613949 | 668 days ago | IN | 0.2 ETH | 0.00869436 | ||||
| Mint Public Mult... | 19499899 | 684 days ago | IN | 0.2 ETH | 0.0049773 | ||||
| Mint Public Mult... | 19453931 | 691 days ago | IN | 0.2 ETH | 0.00775382 |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
LandAuctionV2
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";
import "./LandAuction.sol";
contract LandAuctionV2 is ILandAuction, AccessControl, ReentrancyGuard {
using ECDSA for bytes32;
uint32 constant clearLow = 0xffff0000;
uint32 constant clearHigh = 0x0000ffff;
uint32 constant factor = 0x10000;
/*
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,
Inactive,
PrivateSale,
PublicSale
}
struct Bid {
uint256 amount;
address bidder;
}
LandAuction public auctionV1;
ILandRegistry public landRegistry;
ILockLeash public lockLeash;
ILockShiboshi public lockShiboshi;
bool public multiMintEnabled;
address public signerAddress;
Stage public currentStage;
mapping(int16 => mapping(int16 => Bid)) public getCurrentBid;
mapping(address => uint256) private _winningsBidsOf;
mapping(address => uint32[]) private _mintedBy;
mapping(address => uint32[]) private _allBidsOf;
mapping(address => mapping(uint32 => uint8)) private _statusOfBidsOf;
event StageSet(uint256 stage);
event SignerSet(address signer);
event multiMintToggled(bool newValue);
event LandBought(
address indexed user,
uint32 indexed encXY,
int16 x,
int16 y,
uint256 price,
uint256 time,
Stage saleStage
);
constructor(
LandAuction _auctionV1,
ILandRegistry _landRegistry,
ILockLeash _lockLeash,
ILockShiboshi _lockShiboshi
) {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
auctionV1 = _auctionV1;
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 winningsBidsOf(address user) public view returns (uint256) {
return _winningsBidsOf[user] + auctionV1.winningsBidsOf(user);
}
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) {
return auctionV1.getReservePrice(x, y);
}
function getPriceOf(int16 x, int16 y) public view returns (uint256) {
Bid storage currentBid = getCurrentBid[x][y];
if (currentBid.amount == 0) {
// no bids on this contract
return auctionV1.getPriceOf(x, y);
} else {
// attempt to outbid a bid placed here
return getOutbidPrice(currentBid.amount);
}
}
function priceOfCategory(int8 category) external view returns (uint256) {
return auctionV1.priceOfCategory(category);
}
function getCategory(int16 x, int16 y) public view returns (int8) {
return auctionV1.getCategory(x, y);
}
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)
{
(int16[] memory xsV1, int16[] memory ysV1) = auctionV1.bidInfoOf(user);
uint256 lengthV1 = xsV1.length;
uint256 bidCount = _winningsBidsOf[user];
int16[] memory xs = new int16[](bidCount + lengthV1);
int16[] memory ys = new int16[](bidCount + lengthV1);
for (uint256 i = 0; i < lengthV1; i = _uncheckedInc(i)) {
xs[i] = xsV1[i];
ys[i] = ysV1[i];
}
uint256 ptr = lengthV1;
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)
{
(int16[] memory xsV1, int16[] memory ysV1) = auctionV1.allBidInfoOf(
user
);
uint256 lengthV1 = xsV1.length;
uint32[] storage allBids = _allBidsOf[user];
uint256 bidCount = allBids.length;
int16[] memory xs = new int16[](bidCount + lengthV1);
int16[] memory ys = new int16[](bidCount + lengthV1);
for (uint256 i = 0; i < lengthV1; i = _uncheckedInc(i)) {
xs[i] = xsV1[i];
ys[i] = ysV1[i];
}
for (
uint256 i = lengthV1;
i < lengthV1 + bidCount;
i = _uncheckedInc(i)
) {
(int16 x, int16 y) = _decodeXY(allBids[i - lengthV1]);
xs[i] = x;
ys[i] = y;
}
return (xs, ys);
}
function mintedBy(address user) external
view
returns (int16[] memory, int16[] memory) {
uint32[] storage allMints = _mintedBy[user];
uint256 mintCount = allMints.length;
int16[] memory xs = new int16[](mintCount);
int16[] memory ys = new int16[](mintCount);
for (uint256 i = 0; i < mintCount; i = _uncheckedInc(i)) {
(int16 x, int16 y) = _decodeXY(allMints[i]);
xs[i] = x;
ys[i] = y;
}
return (xs, ys);
}
function setStage(uint256 stage) external onlyRole(DEFAULT_ADMIN_ROLE) {
if (stage >= 2) {
require(
uint256(auctionV1.currentStage()) == 0,
"ERR_AUCTION_V1_IS_NOT_DISABLED"
);
}
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 setAuctionV1(LandAuction _auctionV1)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
auctionV1 = _auctionV1;
}
function setMultiMint(bool desiredValue)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
require(multiMintEnabled != desiredValue, "ERR_ALREADY_DESIRED_VALUE");
multiMintEnabled = desiredValue;
emit multiMintToggled(desiredValue);
}
function withdraw(address to, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
payable(to).transfer(amount);
}
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) = auctionV1.getCurrentBid(x, y);
require(user != address(0), "ERR_NO_BID_FOUND");
landRegistry.mint(user, x, y);
_mintedBy[user].push(_encodeXY(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, msg.value);
emit LandBought(
msg.sender,
_encodeXY(x, y),
x,
y,
msg.value,
block.timestamp,
Stage.PrivateSale
);
}
function mintPrivateMulti(
int16[] calldata xs,
int16[] calldata ys,
uint256[] calldata prices
) external payable onlyStage(Stage.PrivateSale) nonReentrant {
require(multiMintEnabled, "ERR_MULTI_BID_DISABLED");
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");
address user = msg.sender;
require(
availableCapacityOf(user) >= length,
"ERR_INSUFFICIENT_BIDS_REMAINING"
);
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_NO_MINT_IN_SHIBOSHI_ZONE");
_mintPublicOrPrivate(user, x, y, prices[i]);
emit LandBought(
user,
_encodeXY(x, y),
x,
y,
prices[i],
block.timestamp,
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, msg.value);
emit LandBought(
msg.sender,
_encodeXY(x, y),
x,
y,
msg.value,
block.timestamp,
Stage.PrivateSale
);
}
function mintPrivateShiboshiZoneMulti(
int16[] calldata xs,
int16[] calldata ys,
uint256[] calldata prices,
bytes calldata signature
) external payable onlyStage(Stage.PrivateSale) nonReentrant {
require(multiMintEnabled, "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");
_mintPublicOrPrivate(user, x, y, prices[i]);
emit LandBought(
user,
_encodeXY(x, y),
x,
y,
prices[i],
block.timestamp,
Stage.PrivateSale
);
}
}
function mintPublic(int16 x, int16 y)
external
payable
onlyStage(Stage.PublicSale)
nonReentrant
{
_mintPublicOrPrivate(msg.sender, x, y, msg.value);
emit LandBought(
msg.sender,
_encodeXY(x, y),
x,
y,
msg.value,
block.timestamp,
Stage.PublicSale
);
}
function mintPublicMulti(
int16[] calldata xs,
int16[] calldata ys,
uint256[] calldata prices
) external payable onlyStage(Stage.PublicSale) nonReentrant {
require(multiMintEnabled, "ERR_MULTI_BID_DISABLED");
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");
address user = msg.sender;
for (uint256 i = 0; i < length; i = _uncheckedInc(i)) {
int16 x = xs[i];
int16 y = ys[i];
_mintPublicOrPrivate(user, x, y, prices[i]);
emit LandBought(
user,
_encodeXY(x, y),
x,
y,
prices[i],
block.timestamp,
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 _mintPublicOrPrivate(
address user,
int16 x,
int16 y,
uint256 price
) internal onlyValid(x, y) {
Bid storage currentBid = getCurrentBid[x][y];
require(currentBid.amount == 0, "ERR_NOT_UP_FOR_SALE");
require(price == getReservePrice(x, y), "ERR_INSUFFICIENT_AMOUNT_SENT");
currentBid.bidder = user;
currentBid.amount = price;
_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);
}
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));
}
}// 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
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 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":"contract LandAuction","name":"_auctionV1","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"},{"indexed":false,"internalType":"enum LandAuctionV2.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":"multiMintToggled","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[],"name":"auctionV1","outputs":[{"internalType":"contract LandAuction","name":"","type":"address"}],"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":[],"name":"currentStage","outputs":[{"internalType":"enum LandAuctionV2.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":"xs","type":"int16[]"},{"internalType":"int16[]","name":"ys","type":"int16[]"},{"internalType":"uint256[]","name":"prices","type":"uint256[]"}],"name":"mintPrivateMulti","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":"xs","type":"int16[]"},{"internalType":"int16[]","name":"ys","type":"int16[]"},{"internalType":"uint256[]","name":"prices","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintPrivateShiboshiZoneMulti","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[]"},{"internalType":"uint256[]","name":"prices","type":"uint256[]"}],"name":"mintPublicMulti","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":[{"internalType":"address","name":"user","type":"address"}],"name":"mintedBy","outputs":[{"internalType":"int16[]","name":"","type":"int16[]"},{"internalType":"int16[]","name":"","type":"int16[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int8","name":"category","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":"contract LandAuction","name":"_auctionV1","type":"address"}],"name":"setAuctionV1","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":"setMultiMint","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":[{"internalType":"address","name":"user","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
60806040523480156200001157600080fd5b50604051620040443803806200404483398101604081905262000034916200015f565b6001805562000045600033620000a5565b600280546001600160a01b03199081166001600160a01b03968716179091556003805482169486169490941790935560048054841692851692909217909155600580548316919093161790915560068054339216919091179055620001c7565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000142576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001013390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6001600160a01b03811681146200015c57600080fd5b50565b600080600080608085870312156200017657600080fd5b8451620001838162000146565b6020860151909450620001968162000146565b6040860151909350620001a98162000146565b6060860151909250620001bc8162000146565b939692955090935050565b613e6d80620001d76000396000f3fe60806040526004361061027c5760003560e01c8063935302cc1161014f578063d5ed9cba116100c1578063ed9969a41161007a578063ed9969a4146107da578063f3fef3a3146107ed578063f43612b91461080d578063f4c9cbf314610820578063f5ada9ad14610840578063f7eeae621461086057600080fd5b8063d5ed9cba14610731578063d630891014610751578063dce5fdbf14610771578063dfc1a73114610791578063e45d1cf8146107a7578063ebd6f3c0146107c757600080fd5b8063bd4dc02411610113578063bd4dc02414610689578063c67d0545146106a9578063c78daced146106c9578063cacee621146106e9578063d547741f146106fc578063d598c9e91461071c57600080fd5b8063935302cc146105b9578063a217fddf146105d9578063aaf5ddcd146105ee578063afc01ac314610653578063b3a6807c1461066957600080fd5b806344619830116101f35780636e6bdc2b116101ac5780636e6bdc2b146104f857806370cbc961146105185780637be8a6771461053857806380ca56a3146105585780638a37a3791461057957806391d148541461059957600080fd5b8063446198301461042457806347c3593f146104375780635b7633d01461045f5780635bf5d54c1461049757806363b15769146104c5578063674cb7c6146104d857600080fd5b80631b3e9916116102455780631b3e991614610346578063248a9ca3146103745780632f2ff15d146103a457806336568abe146103c45780633cef28d2146103e45780633eb1d7771461040457600080fd5b80626a25dd1461028157806301ffc9a7146102b457806302ed71ae146102e4578063046dc166146103065780630c6838bc14610326575b600080fd5b34801561028d57600080fd5b506102a161029c366004613480565b610893565b6040519081526020015b60405180910390f35b3480156102c057600080fd5b506102d46102cf36600461349d565b6109a2565b60405190151581526020016102ab565b3480156102f057600080fd5b506103046102ff366004613480565b6109d9565b005b34801561031257600080fd5b50610304610321366004613480565b610a08565b34801561033257600080fd5b506102a1610341366004613480565b610ac5565b34801561035257600080fd5b50610366610361366004613480565b610b57565b6040516102ab929190613505565b34801561038057600080fd5b506102a161038f366004613533565b60009081526020819052604090206001015490565b3480156103b057600080fd5b506103046103bf36600461354c565b610def565b3480156103d057600080fd5b506103046103df36600461354c565b610e1a565b3480156103f057600080fd5b506103666103ff366004613480565b610e98565b34801561041057600080fd5b5061030461041f366004613533565b610fd3565b6103046104323660046135c0565b611125565b34801561044357600080fd5b5061044c606381565b60405160019190910b81526020016102ab565b34801561046b57600080fd5b5060065461047f906001600160a01b031681565b6040516001600160a01b0390911681526020016102ab565b3480156104a357600080fd5b506006546104b890600160a01b900460ff1681565b6040516102ab9190613691565b6103046104d33660046136ef565b61136e565b3480156104e457600080fd5b5060055461047f906001600160a01b031681565b34801561050457600080fd5b506102d4610513366004613753565b61150f565b34801561052457600080fd5b5060045461047f906001600160a01b031681565b34801561054457600080fd5b506102a1610553366004613753565b61161d565b34801561056457600080fd5b506005546102d490600160a01b900460ff1681565b34801561058557600080fd5b50610304610594366004613480565b6116d2565b3480156105a557600080fd5b506102d46105b436600461354c565b611701565b3480156105c557600080fd5b506102a16105d4366004613753565b61172a565b3480156105e557600080fd5b506102a1600081565b3480156105fa57600080fd5b50610636610609366004613753565b6007602090815260009283526040808420909152908252902080546001909101546001600160a01b031682565b604080519283526001600160a01b039091166020830152016102ab565b34801561065f57600080fd5b5061044c60621981565b34801561067557600080fd5b5060025461047f906001600160a01b031681565b34801561069557600080fd5b5060035461047f906001600160a01b031681565b3480156106b557600080fd5b506102a16106c4366004613781565b6117aa565b3480156106d557600080fd5b506103046106e43660046137a3565b611984565b6103046106f7366004613753565b611a3f565b34801561070857600080fd5b5061030461071736600461354c565b611b01565b34801561072857600080fd5b5061044c606081565b34801561073d57600080fd5b5061030461074c366004613480565b611b27565b34801561075d57600080fd5b506102a161076c366004613533565b611b56565b34801561077d57600080fd5b506102a161078c3660046137d4565b611b6f565b34801561079d57600080fd5b5061044c605f1981565b3480156107b357600080fd5b506103046107c23660046137f1565b611bde565b6103046107d53660046135c0565b611f5e565b6103046107e8366004613753565b612239565b3480156107f957600080fd5b50610304610808366004613850565b612391565b61030461081b36600461387c565b6123d9565b34801561082c57600080fd5b5061030461083b366004613480565b6126f5565b34801561084c57600080fd5b5061036661085b366004613480565b612724565b34801561086c57600080fd5b5061088061087b366004613753565b612a04565b60405160009190910b81526020016102ab565b6004805460405163dd4bc10160e01b81526001600160a01b03848116938201939093526000928392169063dd4bc10190602401602060405180830381865afa1580156108e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610907919061393f565b60055460405163dd4bc10160e01b81526001600160a01b0386811660048301529293506000929091169063dd4bc10190602401602060405180830381865afa158015610957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097b919061393f565b905061098684610ac5565b61099083836117aa565b61099a919061396e565b949350505050565b60006001600160e01b03198216637965db0b60e01b14806109d357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006109e58133612a7d565b50600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000610a148133612a7d565b6001600160a01b038216610a6f5760405162461bcd60e51b815260206004820152601a60248201527f4552525f43414e4e4f545f42455f5a45524f5f4144445245535300000000000060448201526064015b60405180910390fd5b600680546001600160a01b0319166001600160a01b0384169081179091556040519081527f9eaa897564d022fb8c5efaf0acdb5d9d27b440b2aad44400b6e1c702e65b9ed3906020015b60405180910390a15050565b60025460405163031a0e2f60e21b81526001600160a01b0383811660048301526000921690630c6838bc90602401602060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061393f565b6001600160a01b0383166000908152600860205260409020546109d39190613985565b600254604051630d9f4c8b60e11b81526001600160a01b038381166004830152606092839260009283921690631b3e991690602401600060405180830381865afa158015610ba9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bd19190810190613a64565b81516001600160a01b0388166000908152600a602052604081208054949650929450909290610c008483613985565b6001600160401b03811115610c1757610c1761399d565b604051908082528060200260200182016040528015610c40578160200160208202803683370190505b5090506000610c4f8584613985565b6001600160401b03811115610c6657610c6661399d565b604051908082528060200260200182016040528015610c8f578160200160208202803683370190505b50905060005b85811015610d1f57878181518110610caf57610caf613ac7565b6020026020010151838281518110610cc957610cc9613ac7565b602002602001019060010b908160010b81525050868181518110610cef57610cef613ac7565b6020026020010151828281518110610d0957610d09613ac7565b600192830b602091820292909201015201610c95565b50845b610d2c8487613985565b811015610ddf57600080610d7f87610d448a8661396e565b81548110610d5457610d54613ac7565b90600052602060002090600891828204019190066004029054906101000a900463ffffffff16612ae1565b9150915081858481518110610d9657610d96613ac7565b602002602001019060010b908160010b8152505080848481518110610dbd57610dbd613ac7565b600192830b602091820292909201015283019150610dd89050565b9050610d22565b5090999098509650505050505050565b600082815260208190526040902060010154610e0b8133612a7d565b610e158383612b0b565b505050565b6001600160a01b0381163314610e8a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a66565b610e948282612b8f565b5050565b6001600160a01b0381166000908152600960205260408120805460609283929190816001600160401b03811115610ed157610ed161399d565b604051908082528060200260200182016040528015610efa578160200160208202803683370190505b5090506000826001600160401b03811115610f1757610f1761399d565b604051908082528060200260200182016040528015610f40578160200160208202803683370190505b50905060005b83811015610fc657600080610f66878481548110610d5457610d54613ac7565b9150915081858481518110610f7d57610f7d613ac7565b602002602001019060010b908160010b8152505080848481518110610fa457610fa4613ac7565b600192830b602091820292909201015283019150610fbf9050565b9050610f46565b5090969095509350505050565b6000610fdf8133612a7d565b600282106110bc57600260009054906101000a90046001600160a01b03166001600160a01b0316635bf5d54c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561103a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e9190613add565b600381111561106f5761106f613659565b156110bc5760405162461bcd60e51b815260206004820152601e60248201527f4552525f41554354494f4e5f56315f49535f4e4f545f44495341424c454400006044820152606401610a66565b8160038111156110ce576110ce613659565b6006805460ff60a01b1916600160a01b8360038111156110f0576110f0613659565b02179055506040518281527f02f604feff374725ab69a4a6b22fbfb7f79b787bc42299abdea1de38ec4ef4b690602001610ab9565b600380600654600160a01b900460ff16600381111561114657611146613659565b146111635760405162461bcd60e51b8152600401610a6690613afe565b6002600154036111855760405162461bcd60e51b8152600401610a6690613b35565b6002600155600554600160a01b900460ff166111b35760405162461bcd60e51b8152600401610a6690613b6c565b8560008190036111d55760405162461bcd60e51b8152600401610a6690613b9c565b8085146111f45760405162461bcd60e51b8152600401610a6690613bc2565b8083146112135760405162461bcd60e51b8152600401610a6690613bc2565b6000805b8281101561124d5785858281811061123157611231613ac7565b90506020020135826112439190613985565b9150600101611217565b5080341461126d5760405162461bcd60e51b8152600401610a6690613bf9565b3360005b8381101561135d5760008b8b8381811061128d5761128d613ac7565b90506020020160208101906112a29190613c30565b905060008a8a848181106112b8576112b8613ac7565b90506020020160208101906112cd9190613c30565b90506112f38483838c8c888181106112e7576112e7613ac7565b90506020020135612bf4565b6112fd8282612e71565b63ffffffff16846001600160a01b0316600080516020613e1883398151915284848d8d8981811061133057611330613ac7565b9050602002013542600360405161134b959493929190613c4d565b60405180910390a35050600101611271565b505060018055505050505050505050565b600280600654600160a01b900460ff16600381111561138f5761138f613659565b146113ac5760405162461bcd60e51b8152600401610a6690613afe565b6002600154036113ce5760405162461bcd60e51b8152600401610a6690613b35565b600260015561141b6113df33612e9d565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612edd92505050565b61145f5760405162461bcd60e51b815260206004820152601560248201527411549497d4d251d3905515549157d2539590531251605a1b6044820152606401610a66565b611469858561150f565b6114b05760405162461bcd60e51b81526020600482015260186024820152774552525f4e4f545f494e5f534849424f5348495f5a4f4e4560401b6044820152606401610a66565b6114bc33868634612bf4565b6114c68585612e71565b63ffffffff16336001600160a01b0316600080516020613e188339815191528787344260026040516114fc959493929190613c4d565b60405180910390a3505060018055505050565b6000600c8360010b12158015611529575060308360010b13155b8015611539575060638260010b13155b8015611549575060418260010b12155b15611556575060016109d3565b60318360010b1215801561156e5750604d8360010b13155b801561157e575060638260010b13155b801561158e5750604e8260010b12155b1561159b575060016109d3565b604c8360010b121580156115b35750604d8360010b13155b80156115c35750604d8260010b13155b80156115d3575060328260010b12155b156115e0575060016109d3565b60418360010b121580156115f85750604b8360010b13155b801561160757508160010b6032145b15611614575060016109d3565b50600092915050565b600182810b60009081526007602090815260408083209385900b8352929052908120805482036116c757600254604051637be8a67760e01b8152600186810b600483015285900b60248201526001600160a01b0390911690637be8a67790604401602060405180830381865afa15801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf919061393f565b9150506109d3565b80546116bf90611b56565b60006116de8133612a7d565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6002546040516324d4c0b360e21b8152600184810b600483015283900b60248201526000916001600160a01b03169063935302cc90604401602060405180830381865afa15801561177f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a3919061393f565b9392505050565b60008060405180610140016040528060098152602001601e8152602001603c8152602001606481526020016082815260200160b4815260200160dc815260200161012c815260200161017281526020016101a381525090506000604051806101400160405280602d8152602001605981526020016096815260200160fa815260200161015e81526020016101e0815260200161025881526020016102bc81526020016103208152602001610352815250905060006040518061014001604052806001815260200160058152602001600a815260200160148152602001603281526020016050815260200160648152602001608c815260200160b4815260200160c881525090506000808711156119205760095b8481600a81106118cf576118cf613ac7565b60200201516118e690670de0b6b3a7640000613c7d565b881115611915578281600a81106118ff576118ff613ac7565b602002015161190e9083613985565b915061191e565b600019016118bd565b505b851561197a5760095b8381600a811061193b5761193b613ac7565b602002015187111561196f578281600a811061195957611959613ac7565b60200201516119689083613985565b9150611978565b60001901611929565b505b9695505050505050565b60006119908133612a7d565b811515600560149054906101000a900460ff161515036119f25760405162461bcd60e51b815260206004820152601960248201527f4552525f414c52454144595f444553495245445f56414c5545000000000000006044820152606401610a66565b60058054831515600160a01b0260ff60a01b199091161790556040517f81d89e0116bfd05c650b4de6b8a465c851946c4305a9552b6f757c4229df7c3b90610ab990841515815260200190565b600380600654600160a01b900460ff166003811115611a6057611a60613659565b14611a7d5760405162461bcd60e51b8152600401610a6690613afe565b600260015403611a9f5760405162461bcd60e51b8152600401610a6690613b35565b6002600155611ab033848434612bf4565b611aba8383612e71565b63ffffffff16336001600160a01b0316600080516020613e18833981519152858534426003604051611af0959493929190613c4d565b60405180910390a350506001805550565b600082815260208190526040902060010154611b1d8133612a7d565b610e158383612b8f565b6000611b338133612a7d565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006014611b65836015613c7d565b6109d39190613c9c565b60025460405163dce5fdbf60e01b8152600083810b6004830152916001600160a01b03169063dce5fdbf90602401602060405180830381865afa158015611bba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d3919061393f565b6003600654600160a01b900460ff166003811115611bfe57611bfe613659565b1480611c2757506002600654600160a01b900460ff166003811115611c2557611c25613659565b145b611c735760405162461bcd60e51b815260206004820181905260248201527f4552525f4d5553545f574149545f464f525f42494444494e475f544f5f454e446044820152606401610a66565b82818114611c935760405162461bcd60e51b8152600401610a6690613bc2565b60005b81811015611f56576000868683818110611cb257611cb2613ac7565b9050602002016020810190611cc79190613c30565b90506000858584818110611cdd57611cdd613ac7565b9050602002016020810190611cf29190613c30565b9050600182900b605f1913801590611d0f57506060600183900b13155b611d505760405162461bcd60e51b81526020600482015260126024820152714552525f585f4f55545f4f465f52414e474560701b6044820152606401610a66565b600181900b60621913801590611d6b57506063600182900b13155b611dac5760405162461bcd60e51b81526020600482015260126024820152714552525f595f4f55545f4f465f52414e474560701b6044820152606401610a66565b60025460405163aaf5ddcd60e01b8152600184810b600483015283900b60248201526000916001600160a01b03169063aaf5ddcd906044016040805180830381865afa158015611e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e249190613cbe565b9150506001600160a01b038116611e705760405162461bcd60e51b815260206004820152601060248201526f11549497d393d7d0925117d193d5539160821b6044820152606401610a66565b60035460405162edcc2360e71b81526001600160a01b038381166004830152600186810b602484015285900b6044830152909116906376e6118090606401600060405180830381600087803b158015611ec857600080fd5b505af1158015611edc573d6000803e3d6000fd5b505050506001600160a01b0381166000908152600960205260409020611f028484612e71565b8154600181018355600092835260209092206008830401805463ffffffff92831660046007909516949094026101000a938402929093021990921617905550611f4f915082905060010190565b9050611c96565b505050505050565b600280600654600160a01b900460ff166003811115611f7f57611f7f613659565b14611f9c5760405162461bcd60e51b8152600401610a6690613afe565b600260015403611fbe5760405162461bcd60e51b8152600401610a6690613b35565b6002600155600554600160a01b900460ff16611fec5760405162461bcd60e51b8152600401610a6690613b6c565b85600081900361200e5760405162461bcd60e51b8152600401610a6690613b9c565b80851461202d5760405162461bcd60e51b8152600401610a6690613bc2565b80831461204c5760405162461bcd60e51b8152600401610a6690613bc2565b338161205782610893565b10156120a55760405162461bcd60e51b815260206004820152601f60248201527f4552525f494e53554646494349454e545f424944535f52454d41494e494e47006044820152606401610a66565b6000805b838110156120df578686828181106120c3576120c3613ac7565b90506020020135826120d59190613985565b91506001016120a9565b508034146120ff5760405162461bcd60e51b8152600401610a6690613bf9565b60005b8381101561135d5760008b8b8381811061211e5761211e613ac7565b90506020020160208101906121339190613c30565b905060008a8a8481811061214957612149613ac7565b905060200201602081019061215e9190613c30565b905061216a828261150f565b156121b75760405162461bcd60e51b815260206004820152601c60248201527f4552525f4e4f5f4d494e545f494e5f534849424f5348495f5a4f4e45000000006044820152606401610a66565b6121cf8583838c8c888181106112e7576112e7613ac7565b6121d98282612e71565b63ffffffff16856001600160a01b0316600080516020613e1883398151915284848d8d8981811061220c5761220c613ac7565b90506020020135426002604051612227959493929190613c4d565b60405180910390a35050600101612102565b600280600654600160a01b900460ff16600381111561225a5761225a613659565b146122775760405162461bcd60e51b8152600401610a6690613afe565b6002600154036122995760405162461bcd60e51b8152600401610a6690613b35565b60026001556122a733610893565b6000036122ee5760405162461bcd60e51b81526020600482015260156024820152744552525f4e4f5f424944535f52454d41494e494e4760581b6044820152606401610a66565b6122f8838361150f565b156123455760405162461bcd60e51b815260206004820152601c60248201527f4552525f4e4f5f4d494e545f494e5f534849424f5348495f5a4f4e45000000006044820152606401610a66565b61235133848434612bf4565b61235b8383612e71565b63ffffffff16336001600160a01b0316600080516020613e18833981519152858534426002604051611af0959493929190613c4d565b600061239d8133612a7d565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501580156123d3573d6000803e3d6000fd5b50505050565b600280600654600160a01b900460ff1660038111156123fa576123fa613659565b146124175760405162461bcd60e51b8152600401610a6690613afe565b6002600154036124395760405162461bcd60e51b8152600401610a6690613b35565b6002600155600554600160a01b900460ff166124675760405162461bcd60e51b8152600401610a6690613b6c565b336124b061247482612e9d565b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612edd92505050565b6124f45760405162461bcd60e51b815260206004820152601560248201527411549497d4d251d3905515549157d2539590531251605a1b6044820152606401610a66565b8860008190036125165760405162461bcd60e51b8152600401610a6690613b9c565b8088146125355760405162461bcd60e51b8152600401610a6690613bc2565b8086146125545760405162461bcd60e51b8152600401610a6690613bc2565b6000805b8281101561258e5788888281811061257257612572613ac7565b90506020020135826125849190613985565b9150600101612558565b508034146125ae5760405162461bcd60e51b8152600401610a6690613bf9565b60005b828110156126e25760008d8d838181106125cd576125cd613ac7565b90506020020160208101906125e29190613c30565b905060008c8c848181106125f8576125f8613ac7565b905060200201602081019061260d9190613c30565b9050612619828261150f565b6126605760405162461bcd60e51b81526020600482015260186024820152774552525f4e4f545f494e5f534849424f5348495f5a4f4e4560401b6044820152606401610a66565b6126788683838e8e888181106112e7576112e7613ac7565b6126828282612e71565b63ffffffff16866001600160a01b0316600080516020613e1883398151915284848f8f898181106126b5576126b5613ac7565b905060200201354260026040516126d0959493929190613c4d565b60405180910390a350506001016125b1565b5050600180555050505050505050505050565b60006127018133612a7d565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60025460405163f5ada9ad60e01b81526001600160a01b03838116600483015260609283926000928392169063f5ada9ad90602401600060405180830381865afa158015612776573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261279e9190810190613a64565b81516001600160a01b03881660009081526008602052604081205493955091935091906127cb8383613985565b6001600160401b038111156127e2576127e261399d565b60405190808252806020026020018201604052801561280b578160200160208202803683370190505b509050600061281a8484613985565b6001600160401b038111156128315761283161399d565b60405190808252806020026020018201604052801561285a578160200160208202803683370190505b50905060005b848110156128ea5786818151811061287a5761287a613ac7565b602002602001015183828151811061289457612894613ac7565b602002602001019060010b908160010b815250508581815181106128ba576128ba613ac7565b60200260200101518282815181106128d4576128d4613ac7565b600192830b602091820292909201015201612860565b506001600160a01b0389166000908152600a60205260408120805486925b818110156129f1576001600160a01b038d166000908152600b60205260408120845490919085908490811061293f5761293f613ac7565b6000918252602080832060088304015460079092166004026101000a90910463ffffffff16835282019290925260400190205460ff166001036129e957600080612994858481548110610d5457610d54613ac7565b91509150818887815181106129ab576129ab613ac7565b602002602001019060010b908160010b81525050808787815181106129d2576129d2613ac7565b600192830b60209182029290920101528601955050505b600101612908565b50939b929a509198505050505050505050565b600254604051637bf7573160e11b8152600184810b600483015283900b60248201526000916001600160a01b03169063f7eeae6290604401602060405180830381865afa158015612a59573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a39190613ce3565b612a878282611701565b610e9457612a9f816001600160a01b03166014612f0a565b612aaa836020612f0a565b604051602001612abb929190613d2c565b60408051601f198184030181529082905262461bcd60e51b8252610a6691600401613da1565b600080612af561ffff601085901c166130a5565b9150612b0461ffff84166130a5565b9050915091565b612b158282611701565b610e94576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612b4b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612b998282611701565b15610e94576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8282600182900b605f1913801590612c1157506060600183900b13155b612c525760405162461bcd60e51b81526020600482015260126024820152714552525f585f4f55545f4f465f52414e474560701b6044820152606401610a66565b600181900b60621913801590612c6d57506063600182900b13155b612cae5760405162461bcd60e51b81526020600482015260126024820152714552525f595f4f55545f4f465f52414e474560701b6044820152606401610a66565b600185810b60009081526007602090815260408083209388900b835292905220805415612d135760405162461bcd60e51b81526020600482015260136024820152724552525f4e4f545f55505f464f525f53414c4560681b6044820152606401610a66565b612d1d868661172a565b8414612d3b5760405162461bcd60e51b8152600401610a6690613bf9565b600181810180546001600160a01b0319166001600160a01b038a1690811790915585835560009081526008602052604081208054909190612d7d908490613985565b9091555060009050612d8f8787612e71565b6001600160a01b038981166000818152600a602090815260408083208054600180820183559185528385206008820401805463ffffffff8a81166004600790951685026101000a81810292021990921617909155868652600b855283862090865290935292819020805460ff191684179055600354905162edcc2360e71b8152918201939093528b820b6024820152908a900b604482015292935016906376e6118090606401600060405180830381600087803b158015612e4f57600080fd5b505af1158015612e63573d6000803e3d6000fd5b505050505050505050505050565b600061ffff8261ffff161663ffff0000620100008561ffff16612e949190613dd4565b16179392505050565b6040516bffffffffffffffffffffffff19606083901b1660208201526000906034015b604051602081830303815290604052805190602001209050919050565b6000612ef282612eec856130bf565b906130fa565b6006546001600160a01b039182169116149392505050565b60606000612f19836002613c7d565b612f24906002613985565b6001600160401b03811115612f3b57612f3b61399d565b6040519080825280601f01601f191660200182016040528015612f65576020820181803683370190505b509050600360fc1b81600081518110612f8057612f80613ac7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612faf57612faf613ac7565b60200101906001600160f81b031916908160001a9053506000612fd3846002613c7d565b612fde906001613985565b90505b6001811115613056576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061301257613012613ac7565b1a60f81b82828151811061302857613028613ac7565b60200101906001600160f81b031916908160001a90535060049490941c9361304f81613e00565b9050612fe1565b5083156117a35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a66565b60006180008216156130bb575063ffff00001790565b5090565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01612ec0565b6000806000613109858561311e565b915091506131168161318c565b509392505050565b60008082516041036131545760208301516040840151606085015160001a61314887828585613345565b94509450505050613185565b825160400361317d5760208301516040840151613172868383613432565b935093505050613185565b506000905060025b9250929050565b60008160048111156131a0576131a0613659565b036131a85750565b60018160048111156131bc576131bc613659565b036132095760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a66565b600281600481111561321d5761321d613659565b0361326a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a66565b600381600481111561327e5761327e613659565b036132d65760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a66565b60048160048111156132ea576132ea613659565b036133425760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a66565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561337c5750600090506003613429565b8460ff16601b1415801561339457508460ff16601c14155b156133a55750600090506004613429565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156133f9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661342257600060019250925050613429565b9150600090505b94509492505050565b6000806001600160ff1b0383168161344f60ff86901c601b613985565b905061345d87828885613345565b935093505050935093915050565b6001600160a01b038116811461334257600080fd5b60006020828403121561349257600080fd5b81356117a38161346b565b6000602082840312156134af57600080fd5b81356001600160e01b0319811681146117a357600080fd5b600081518084526020808501945080840160005b838110156134fa578151600190810b88529683019691830191016134db565b509495945050505050565b60408152600061351860408301856134c7565b828103602084015261352a81856134c7565b95945050505050565b60006020828403121561354557600080fd5b5035919050565b6000806040838503121561355f57600080fd5b8235915060208301356135718161346b565b809150509250929050565b60008083601f84011261358e57600080fd5b5081356001600160401b038111156135a557600080fd5b6020830191508360208260051b850101111561318557600080fd5b600080600080600080606087890312156135d957600080fd5b86356001600160401b03808211156135f057600080fd5b6135fc8a838b0161357c565b9098509650602089013591508082111561361557600080fd5b6136218a838b0161357c565b9096509450604089013591508082111561363a57600080fd5b5061364789828a0161357c565b979a9699509497509295939492505050565b634e487b7160e01b600052602160045260246000fd5b6004811061368d57634e487b7160e01b600052602160045260246000fd5b9052565b602081016109d3828461366f565b8060010b811461334257600080fd5b60008083601f8401126136c057600080fd5b5081356001600160401b038111156136d757600080fd5b60208301915083602082850101111561318557600080fd5b6000806000806060858703121561370557600080fd5b84356137108161369f565b935060208501356137208161369f565b925060408501356001600160401b0381111561373b57600080fd5b613747878288016136ae565b95989497509550505050565b6000806040838503121561376657600080fd5b82356137718161369f565b915060208301356135718161369f565b6000806040838503121561379457600080fd5b50508035926020909101359150565b6000602082840312156137b557600080fd5b813580151581146117a357600080fd5b8060000b811461334257600080fd5b6000602082840312156137e657600080fd5b81356117a3816137c5565b6000806000806040858703121561380757600080fd5b84356001600160401b038082111561381e57600080fd5b61382a8883890161357c565b9096509450602087013591508082111561384357600080fd5b506137478782880161357c565b6000806040838503121561386357600080fd5b823561386e8161346b565b946020939093013593505050565b6000806000806000806000806080898b03121561389857600080fd5b88356001600160401b03808211156138af57600080fd5b6138bb8c838d0161357c565b909a50985060208b01359150808211156138d457600080fd5b6138e08c838d0161357c565b909850965060408b01359150808211156138f957600080fd5b6139058c838d0161357c565b909650945060608b013591508082111561391e57600080fd5b5061392b8b828c016136ae565b999c989b5096995094979396929594505050565b60006020828403121561395157600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561398057613980613958565b500390565b6000821982111561399857613998613958565b500190565b634e487b7160e01b600052604160045260246000fd5b80516139be8161369f565b919050565b600082601f8301126139d457600080fd5b815160206001600160401b03808311156139f0576139f061399d565b8260051b604051601f19603f83011681018181108482111715613a1557613a1561399d565b604052938452858101830193838101925087851115613a3357600080fd5b83870191505b84821015613a5957613a4a826139b3565b83529183019190830190613a39565b979650505050505050565b60008060408385031215613a7757600080fd5b82516001600160401b0380821115613a8e57600080fd5b613a9a868387016139c3565b93506020850151915080821115613ab057600080fd5b50613abd858286016139c3565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613aef57600080fd5b8151600481106117a357600080fd5b6020808252601b908201527f4552525f544849535f53544147455f4e4f545f4c4956455f5945540000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526016908201527511549497d35553151257d0925117d11254d05093115160521b604082015260600190565b6020808252600c908201526b11549497d393d7d25394155560a21b604082015260600190565b60208082526019908201527f4552525f494e5055545f4c454e4754485f4d49534d4154434800000000000000604082015260600190565b6020808252601c908201527f4552525f494e53554646494349454e545f414d4f554e545f53454e5400000000604082015260600190565b600060208284031215613c4257600080fd5b81356117a38161369f565b600060a0820190508660010b82528560010b602083015284604083015283606083015261197a608083018461366f565b6000816000190483118215151615613c9757613c97613958565b500290565b600082613cb957634e487b7160e01b600052601260045260246000fd5b500490565b60008060408385031215613cd157600080fd5b8251915060208301516135718161346b565b600060208284031215613cf557600080fd5b81516117a3816137c5565b60005b83811015613d1b578181015183820152602001613d03565b838111156123d35750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613d64816017850160208801613d00565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613d95816028840160208801613d00565b01602801949350505050565b6020815260008251806020840152613dc0816040850160208701613d00565b601f01601f19169190910160400192915050565b600063ffffffff80831681851681830481118215151615613df757613df7613958565b02949350505050565b600081613e0f57613e0f613958565b50600019019056fed62a7516129ae59493adc9aebaefd2a06d20313fdd586db8540cca620ef97ce3a2646970667358221220ce9e8ebc627c51a76bdb8b294b646b2fdf49aaeb29cfc8bcc35f563ddc90fd7e64736f6c634300080d00330000000000000000000000009ed0f787223ff1feb0cfb33a9207c646d182e918000000000000000000000000efaed650f1a94801806bb110019d9b0dc79531a8000000000000000000000000f790b73f11fa1636d0d26db24bafb0f9b0ac337200000000000000000000000067cf6ebc89cc50f09a10745c414192fd62bbccd3
Deployed Bytecode
0x60806040526004361061027c5760003560e01c8063935302cc1161014f578063d5ed9cba116100c1578063ed9969a41161007a578063ed9969a4146107da578063f3fef3a3146107ed578063f43612b91461080d578063f4c9cbf314610820578063f5ada9ad14610840578063f7eeae621461086057600080fd5b8063d5ed9cba14610731578063d630891014610751578063dce5fdbf14610771578063dfc1a73114610791578063e45d1cf8146107a7578063ebd6f3c0146107c757600080fd5b8063bd4dc02411610113578063bd4dc02414610689578063c67d0545146106a9578063c78daced146106c9578063cacee621146106e9578063d547741f146106fc578063d598c9e91461071c57600080fd5b8063935302cc146105b9578063a217fddf146105d9578063aaf5ddcd146105ee578063afc01ac314610653578063b3a6807c1461066957600080fd5b806344619830116101f35780636e6bdc2b116101ac5780636e6bdc2b146104f857806370cbc961146105185780637be8a6771461053857806380ca56a3146105585780638a37a3791461057957806391d148541461059957600080fd5b8063446198301461042457806347c3593f146104375780635b7633d01461045f5780635bf5d54c1461049757806363b15769146104c5578063674cb7c6146104d857600080fd5b80631b3e9916116102455780631b3e991614610346578063248a9ca3146103745780632f2ff15d146103a457806336568abe146103c45780633cef28d2146103e45780633eb1d7771461040457600080fd5b80626a25dd1461028157806301ffc9a7146102b457806302ed71ae146102e4578063046dc166146103065780630c6838bc14610326575b600080fd5b34801561028d57600080fd5b506102a161029c366004613480565b610893565b6040519081526020015b60405180910390f35b3480156102c057600080fd5b506102d46102cf36600461349d565b6109a2565b60405190151581526020016102ab565b3480156102f057600080fd5b506103046102ff366004613480565b6109d9565b005b34801561031257600080fd5b50610304610321366004613480565b610a08565b34801561033257600080fd5b506102a1610341366004613480565b610ac5565b34801561035257600080fd5b50610366610361366004613480565b610b57565b6040516102ab929190613505565b34801561038057600080fd5b506102a161038f366004613533565b60009081526020819052604090206001015490565b3480156103b057600080fd5b506103046103bf36600461354c565b610def565b3480156103d057600080fd5b506103046103df36600461354c565b610e1a565b3480156103f057600080fd5b506103666103ff366004613480565b610e98565b34801561041057600080fd5b5061030461041f366004613533565b610fd3565b6103046104323660046135c0565b611125565b34801561044357600080fd5b5061044c606381565b60405160019190910b81526020016102ab565b34801561046b57600080fd5b5060065461047f906001600160a01b031681565b6040516001600160a01b0390911681526020016102ab565b3480156104a357600080fd5b506006546104b890600160a01b900460ff1681565b6040516102ab9190613691565b6103046104d33660046136ef565b61136e565b3480156104e457600080fd5b5060055461047f906001600160a01b031681565b34801561050457600080fd5b506102d4610513366004613753565b61150f565b34801561052457600080fd5b5060045461047f906001600160a01b031681565b34801561054457600080fd5b506102a1610553366004613753565b61161d565b34801561056457600080fd5b506005546102d490600160a01b900460ff1681565b34801561058557600080fd5b50610304610594366004613480565b6116d2565b3480156105a557600080fd5b506102d46105b436600461354c565b611701565b3480156105c557600080fd5b506102a16105d4366004613753565b61172a565b3480156105e557600080fd5b506102a1600081565b3480156105fa57600080fd5b50610636610609366004613753565b6007602090815260009283526040808420909152908252902080546001909101546001600160a01b031682565b604080519283526001600160a01b039091166020830152016102ab565b34801561065f57600080fd5b5061044c60621981565b34801561067557600080fd5b5060025461047f906001600160a01b031681565b34801561069557600080fd5b5060035461047f906001600160a01b031681565b3480156106b557600080fd5b506102a16106c4366004613781565b6117aa565b3480156106d557600080fd5b506103046106e43660046137a3565b611984565b6103046106f7366004613753565b611a3f565b34801561070857600080fd5b5061030461071736600461354c565b611b01565b34801561072857600080fd5b5061044c606081565b34801561073d57600080fd5b5061030461074c366004613480565b611b27565b34801561075d57600080fd5b506102a161076c366004613533565b611b56565b34801561077d57600080fd5b506102a161078c3660046137d4565b611b6f565b34801561079d57600080fd5b5061044c605f1981565b3480156107b357600080fd5b506103046107c23660046137f1565b611bde565b6103046107d53660046135c0565b611f5e565b6103046107e8366004613753565b612239565b3480156107f957600080fd5b50610304610808366004613850565b612391565b61030461081b36600461387c565b6123d9565b34801561082c57600080fd5b5061030461083b366004613480565b6126f5565b34801561084c57600080fd5b5061036661085b366004613480565b612724565b34801561086c57600080fd5b5061088061087b366004613753565b612a04565b60405160009190910b81526020016102ab565b6004805460405163dd4bc10160e01b81526001600160a01b03848116938201939093526000928392169063dd4bc10190602401602060405180830381865afa1580156108e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610907919061393f565b60055460405163dd4bc10160e01b81526001600160a01b0386811660048301529293506000929091169063dd4bc10190602401602060405180830381865afa158015610957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097b919061393f565b905061098684610ac5565b61099083836117aa565b61099a919061396e565b949350505050565b60006001600160e01b03198216637965db0b60e01b14806109d357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006109e58133612a7d565b50600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000610a148133612a7d565b6001600160a01b038216610a6f5760405162461bcd60e51b815260206004820152601a60248201527f4552525f43414e4e4f545f42455f5a45524f5f4144445245535300000000000060448201526064015b60405180910390fd5b600680546001600160a01b0319166001600160a01b0384169081179091556040519081527f9eaa897564d022fb8c5efaf0acdb5d9d27b440b2aad44400b6e1c702e65b9ed3906020015b60405180910390a15050565b60025460405163031a0e2f60e21b81526001600160a01b0383811660048301526000921690630c6838bc90602401602060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061393f565b6001600160a01b0383166000908152600860205260409020546109d39190613985565b600254604051630d9f4c8b60e11b81526001600160a01b038381166004830152606092839260009283921690631b3e991690602401600060405180830381865afa158015610ba9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bd19190810190613a64565b81516001600160a01b0388166000908152600a602052604081208054949650929450909290610c008483613985565b6001600160401b03811115610c1757610c1761399d565b604051908082528060200260200182016040528015610c40578160200160208202803683370190505b5090506000610c4f8584613985565b6001600160401b03811115610c6657610c6661399d565b604051908082528060200260200182016040528015610c8f578160200160208202803683370190505b50905060005b85811015610d1f57878181518110610caf57610caf613ac7565b6020026020010151838281518110610cc957610cc9613ac7565b602002602001019060010b908160010b81525050868181518110610cef57610cef613ac7565b6020026020010151828281518110610d0957610d09613ac7565b600192830b602091820292909201015201610c95565b50845b610d2c8487613985565b811015610ddf57600080610d7f87610d448a8661396e565b81548110610d5457610d54613ac7565b90600052602060002090600891828204019190066004029054906101000a900463ffffffff16612ae1565b9150915081858481518110610d9657610d96613ac7565b602002602001019060010b908160010b8152505080848481518110610dbd57610dbd613ac7565b600192830b602091820292909201015283019150610dd89050565b9050610d22565b5090999098509650505050505050565b600082815260208190526040902060010154610e0b8133612a7d565b610e158383612b0b565b505050565b6001600160a01b0381163314610e8a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a66565b610e948282612b8f565b5050565b6001600160a01b0381166000908152600960205260408120805460609283929190816001600160401b03811115610ed157610ed161399d565b604051908082528060200260200182016040528015610efa578160200160208202803683370190505b5090506000826001600160401b03811115610f1757610f1761399d565b604051908082528060200260200182016040528015610f40578160200160208202803683370190505b50905060005b83811015610fc657600080610f66878481548110610d5457610d54613ac7565b9150915081858481518110610f7d57610f7d613ac7565b602002602001019060010b908160010b8152505080848481518110610fa457610fa4613ac7565b600192830b602091820292909201015283019150610fbf9050565b9050610f46565b5090969095509350505050565b6000610fdf8133612a7d565b600282106110bc57600260009054906101000a90046001600160a01b03166001600160a01b0316635bf5d54c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561103a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e9190613add565b600381111561106f5761106f613659565b156110bc5760405162461bcd60e51b815260206004820152601e60248201527f4552525f41554354494f4e5f56315f49535f4e4f545f44495341424c454400006044820152606401610a66565b8160038111156110ce576110ce613659565b6006805460ff60a01b1916600160a01b8360038111156110f0576110f0613659565b02179055506040518281527f02f604feff374725ab69a4a6b22fbfb7f79b787bc42299abdea1de38ec4ef4b690602001610ab9565b600380600654600160a01b900460ff16600381111561114657611146613659565b146111635760405162461bcd60e51b8152600401610a6690613afe565b6002600154036111855760405162461bcd60e51b8152600401610a6690613b35565b6002600155600554600160a01b900460ff166111b35760405162461bcd60e51b8152600401610a6690613b6c565b8560008190036111d55760405162461bcd60e51b8152600401610a6690613b9c565b8085146111f45760405162461bcd60e51b8152600401610a6690613bc2565b8083146112135760405162461bcd60e51b8152600401610a6690613bc2565b6000805b8281101561124d5785858281811061123157611231613ac7565b90506020020135826112439190613985565b9150600101611217565b5080341461126d5760405162461bcd60e51b8152600401610a6690613bf9565b3360005b8381101561135d5760008b8b8381811061128d5761128d613ac7565b90506020020160208101906112a29190613c30565b905060008a8a848181106112b8576112b8613ac7565b90506020020160208101906112cd9190613c30565b90506112f38483838c8c888181106112e7576112e7613ac7565b90506020020135612bf4565b6112fd8282612e71565b63ffffffff16846001600160a01b0316600080516020613e1883398151915284848d8d8981811061133057611330613ac7565b9050602002013542600360405161134b959493929190613c4d565b60405180910390a35050600101611271565b505060018055505050505050505050565b600280600654600160a01b900460ff16600381111561138f5761138f613659565b146113ac5760405162461bcd60e51b8152600401610a6690613afe565b6002600154036113ce5760405162461bcd60e51b8152600401610a6690613b35565b600260015561141b6113df33612e9d565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612edd92505050565b61145f5760405162461bcd60e51b815260206004820152601560248201527411549497d4d251d3905515549157d2539590531251605a1b6044820152606401610a66565b611469858561150f565b6114b05760405162461bcd60e51b81526020600482015260186024820152774552525f4e4f545f494e5f534849424f5348495f5a4f4e4560401b6044820152606401610a66565b6114bc33868634612bf4565b6114c68585612e71565b63ffffffff16336001600160a01b0316600080516020613e188339815191528787344260026040516114fc959493929190613c4d565b60405180910390a3505060018055505050565b6000600c8360010b12158015611529575060308360010b13155b8015611539575060638260010b13155b8015611549575060418260010b12155b15611556575060016109d3565b60318360010b1215801561156e5750604d8360010b13155b801561157e575060638260010b13155b801561158e5750604e8260010b12155b1561159b575060016109d3565b604c8360010b121580156115b35750604d8360010b13155b80156115c35750604d8260010b13155b80156115d3575060328260010b12155b156115e0575060016109d3565b60418360010b121580156115f85750604b8360010b13155b801561160757508160010b6032145b15611614575060016109d3565b50600092915050565b600182810b60009081526007602090815260408083209385900b8352929052908120805482036116c757600254604051637be8a67760e01b8152600186810b600483015285900b60248201526001600160a01b0390911690637be8a67790604401602060405180830381865afa15801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf919061393f565b9150506109d3565b80546116bf90611b56565b60006116de8133612a7d565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6002546040516324d4c0b360e21b8152600184810b600483015283900b60248201526000916001600160a01b03169063935302cc90604401602060405180830381865afa15801561177f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a3919061393f565b9392505050565b60008060405180610140016040528060098152602001601e8152602001603c8152602001606481526020016082815260200160b4815260200160dc815260200161012c815260200161017281526020016101a381525090506000604051806101400160405280602d8152602001605981526020016096815260200160fa815260200161015e81526020016101e0815260200161025881526020016102bc81526020016103208152602001610352815250905060006040518061014001604052806001815260200160058152602001600a815260200160148152602001603281526020016050815260200160648152602001608c815260200160b4815260200160c881525090506000808711156119205760095b8481600a81106118cf576118cf613ac7565b60200201516118e690670de0b6b3a7640000613c7d565b881115611915578281600a81106118ff576118ff613ac7565b602002015161190e9083613985565b915061191e565b600019016118bd565b505b851561197a5760095b8381600a811061193b5761193b613ac7565b602002015187111561196f578281600a811061195957611959613ac7565b60200201516119689083613985565b9150611978565b60001901611929565b505b9695505050505050565b60006119908133612a7d565b811515600560149054906101000a900460ff161515036119f25760405162461bcd60e51b815260206004820152601960248201527f4552525f414c52454144595f444553495245445f56414c5545000000000000006044820152606401610a66565b60058054831515600160a01b0260ff60a01b199091161790556040517f81d89e0116bfd05c650b4de6b8a465c851946c4305a9552b6f757c4229df7c3b90610ab990841515815260200190565b600380600654600160a01b900460ff166003811115611a6057611a60613659565b14611a7d5760405162461bcd60e51b8152600401610a6690613afe565b600260015403611a9f5760405162461bcd60e51b8152600401610a6690613b35565b6002600155611ab033848434612bf4565b611aba8383612e71565b63ffffffff16336001600160a01b0316600080516020613e18833981519152858534426003604051611af0959493929190613c4d565b60405180910390a350506001805550565b600082815260208190526040902060010154611b1d8133612a7d565b610e158383612b8f565b6000611b338133612a7d565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006014611b65836015613c7d565b6109d39190613c9c565b60025460405163dce5fdbf60e01b8152600083810b6004830152916001600160a01b03169063dce5fdbf90602401602060405180830381865afa158015611bba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d3919061393f565b6003600654600160a01b900460ff166003811115611bfe57611bfe613659565b1480611c2757506002600654600160a01b900460ff166003811115611c2557611c25613659565b145b611c735760405162461bcd60e51b815260206004820181905260248201527f4552525f4d5553545f574149545f464f525f42494444494e475f544f5f454e446044820152606401610a66565b82818114611c935760405162461bcd60e51b8152600401610a6690613bc2565b60005b81811015611f56576000868683818110611cb257611cb2613ac7565b9050602002016020810190611cc79190613c30565b90506000858584818110611cdd57611cdd613ac7565b9050602002016020810190611cf29190613c30565b9050600182900b605f1913801590611d0f57506060600183900b13155b611d505760405162461bcd60e51b81526020600482015260126024820152714552525f585f4f55545f4f465f52414e474560701b6044820152606401610a66565b600181900b60621913801590611d6b57506063600182900b13155b611dac5760405162461bcd60e51b81526020600482015260126024820152714552525f595f4f55545f4f465f52414e474560701b6044820152606401610a66565b60025460405163aaf5ddcd60e01b8152600184810b600483015283900b60248201526000916001600160a01b03169063aaf5ddcd906044016040805180830381865afa158015611e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e249190613cbe565b9150506001600160a01b038116611e705760405162461bcd60e51b815260206004820152601060248201526f11549497d393d7d0925117d193d5539160821b6044820152606401610a66565b60035460405162edcc2360e71b81526001600160a01b038381166004830152600186810b602484015285900b6044830152909116906376e6118090606401600060405180830381600087803b158015611ec857600080fd5b505af1158015611edc573d6000803e3d6000fd5b505050506001600160a01b0381166000908152600960205260409020611f028484612e71565b8154600181018355600092835260209092206008830401805463ffffffff92831660046007909516949094026101000a938402929093021990921617905550611f4f915082905060010190565b9050611c96565b505050505050565b600280600654600160a01b900460ff166003811115611f7f57611f7f613659565b14611f9c5760405162461bcd60e51b8152600401610a6690613afe565b600260015403611fbe5760405162461bcd60e51b8152600401610a6690613b35565b6002600155600554600160a01b900460ff16611fec5760405162461bcd60e51b8152600401610a6690613b6c565b85600081900361200e5760405162461bcd60e51b8152600401610a6690613b9c565b80851461202d5760405162461bcd60e51b8152600401610a6690613bc2565b80831461204c5760405162461bcd60e51b8152600401610a6690613bc2565b338161205782610893565b10156120a55760405162461bcd60e51b815260206004820152601f60248201527f4552525f494e53554646494349454e545f424944535f52454d41494e494e47006044820152606401610a66565b6000805b838110156120df578686828181106120c3576120c3613ac7565b90506020020135826120d59190613985565b91506001016120a9565b508034146120ff5760405162461bcd60e51b8152600401610a6690613bf9565b60005b8381101561135d5760008b8b8381811061211e5761211e613ac7565b90506020020160208101906121339190613c30565b905060008a8a8481811061214957612149613ac7565b905060200201602081019061215e9190613c30565b905061216a828261150f565b156121b75760405162461bcd60e51b815260206004820152601c60248201527f4552525f4e4f5f4d494e545f494e5f534849424f5348495f5a4f4e45000000006044820152606401610a66565b6121cf8583838c8c888181106112e7576112e7613ac7565b6121d98282612e71565b63ffffffff16856001600160a01b0316600080516020613e1883398151915284848d8d8981811061220c5761220c613ac7565b90506020020135426002604051612227959493929190613c4d565b60405180910390a35050600101612102565b600280600654600160a01b900460ff16600381111561225a5761225a613659565b146122775760405162461bcd60e51b8152600401610a6690613afe565b6002600154036122995760405162461bcd60e51b8152600401610a6690613b35565b60026001556122a733610893565b6000036122ee5760405162461bcd60e51b81526020600482015260156024820152744552525f4e4f5f424944535f52454d41494e494e4760581b6044820152606401610a66565b6122f8838361150f565b156123455760405162461bcd60e51b815260206004820152601c60248201527f4552525f4e4f5f4d494e545f494e5f534849424f5348495f5a4f4e45000000006044820152606401610a66565b61235133848434612bf4565b61235b8383612e71565b63ffffffff16336001600160a01b0316600080516020613e18833981519152858534426002604051611af0959493929190613c4d565b600061239d8133612a7d565b6040516001600160a01b0384169083156108fc029084906000818181858888f193505050501580156123d3573d6000803e3d6000fd5b50505050565b600280600654600160a01b900460ff1660038111156123fa576123fa613659565b146124175760405162461bcd60e51b8152600401610a6690613afe565b6002600154036124395760405162461bcd60e51b8152600401610a6690613b35565b6002600155600554600160a01b900460ff166124675760405162461bcd60e51b8152600401610a6690613b6c565b336124b061247482612e9d565b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612edd92505050565b6124f45760405162461bcd60e51b815260206004820152601560248201527411549497d4d251d3905515549157d2539590531251605a1b6044820152606401610a66565b8860008190036125165760405162461bcd60e51b8152600401610a6690613b9c565b8088146125355760405162461bcd60e51b8152600401610a6690613bc2565b8086146125545760405162461bcd60e51b8152600401610a6690613bc2565b6000805b8281101561258e5788888281811061257257612572613ac7565b90506020020135826125849190613985565b9150600101612558565b508034146125ae5760405162461bcd60e51b8152600401610a6690613bf9565b60005b828110156126e25760008d8d838181106125cd576125cd613ac7565b90506020020160208101906125e29190613c30565b905060008c8c848181106125f8576125f8613ac7565b905060200201602081019061260d9190613c30565b9050612619828261150f565b6126605760405162461bcd60e51b81526020600482015260186024820152774552525f4e4f545f494e5f534849424f5348495f5a4f4e4560401b6044820152606401610a66565b6126788683838e8e888181106112e7576112e7613ac7565b6126828282612e71565b63ffffffff16866001600160a01b0316600080516020613e1883398151915284848f8f898181106126b5576126b5613ac7565b905060200201354260026040516126d0959493929190613c4d565b60405180910390a350506001016125b1565b5050600180555050505050505050505050565b60006127018133612a7d565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60025460405163f5ada9ad60e01b81526001600160a01b03838116600483015260609283926000928392169063f5ada9ad90602401600060405180830381865afa158015612776573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261279e9190810190613a64565b81516001600160a01b03881660009081526008602052604081205493955091935091906127cb8383613985565b6001600160401b038111156127e2576127e261399d565b60405190808252806020026020018201604052801561280b578160200160208202803683370190505b509050600061281a8484613985565b6001600160401b038111156128315761283161399d565b60405190808252806020026020018201604052801561285a578160200160208202803683370190505b50905060005b848110156128ea5786818151811061287a5761287a613ac7565b602002602001015183828151811061289457612894613ac7565b602002602001019060010b908160010b815250508581815181106128ba576128ba613ac7565b60200260200101518282815181106128d4576128d4613ac7565b600192830b602091820292909201015201612860565b506001600160a01b0389166000908152600a60205260408120805486925b818110156129f1576001600160a01b038d166000908152600b60205260408120845490919085908490811061293f5761293f613ac7565b6000918252602080832060088304015460079092166004026101000a90910463ffffffff16835282019290925260400190205460ff166001036129e957600080612994858481548110610d5457610d54613ac7565b91509150818887815181106129ab576129ab613ac7565b602002602001019060010b908160010b81525050808787815181106129d2576129d2613ac7565b600192830b60209182029290920101528601955050505b600101612908565b50939b929a509198505050505050505050565b600254604051637bf7573160e11b8152600184810b600483015283900b60248201526000916001600160a01b03169063f7eeae6290604401602060405180830381865afa158015612a59573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a39190613ce3565b612a878282611701565b610e9457612a9f816001600160a01b03166014612f0a565b612aaa836020612f0a565b604051602001612abb929190613d2c565b60408051601f198184030181529082905262461bcd60e51b8252610a6691600401613da1565b600080612af561ffff601085901c166130a5565b9150612b0461ffff84166130a5565b9050915091565b612b158282611701565b610e94576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612b4b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612b998282611701565b15610e94576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8282600182900b605f1913801590612c1157506060600183900b13155b612c525760405162461bcd60e51b81526020600482015260126024820152714552525f585f4f55545f4f465f52414e474560701b6044820152606401610a66565b600181900b60621913801590612c6d57506063600182900b13155b612cae5760405162461bcd60e51b81526020600482015260126024820152714552525f595f4f55545f4f465f52414e474560701b6044820152606401610a66565b600185810b60009081526007602090815260408083209388900b835292905220805415612d135760405162461bcd60e51b81526020600482015260136024820152724552525f4e4f545f55505f464f525f53414c4560681b6044820152606401610a66565b612d1d868661172a565b8414612d3b5760405162461bcd60e51b8152600401610a6690613bf9565b600181810180546001600160a01b0319166001600160a01b038a1690811790915585835560009081526008602052604081208054909190612d7d908490613985565b9091555060009050612d8f8787612e71565b6001600160a01b038981166000818152600a602090815260408083208054600180820183559185528385206008820401805463ffffffff8a81166004600790951685026101000a81810292021990921617909155868652600b855283862090865290935292819020805460ff191684179055600354905162edcc2360e71b8152918201939093528b820b6024820152908a900b604482015292935016906376e6118090606401600060405180830381600087803b158015612e4f57600080fd5b505af1158015612e63573d6000803e3d6000fd5b505050505050505050505050565b600061ffff8261ffff161663ffff0000620100008561ffff16612e949190613dd4565b16179392505050565b6040516bffffffffffffffffffffffff19606083901b1660208201526000906034015b604051602081830303815290604052805190602001209050919050565b6000612ef282612eec856130bf565b906130fa565b6006546001600160a01b039182169116149392505050565b60606000612f19836002613c7d565b612f24906002613985565b6001600160401b03811115612f3b57612f3b61399d565b6040519080825280601f01601f191660200182016040528015612f65576020820181803683370190505b509050600360fc1b81600081518110612f8057612f80613ac7565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612faf57612faf613ac7565b60200101906001600160f81b031916908160001a9053506000612fd3846002613c7d565b612fde906001613985565b90505b6001811115613056576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061301257613012613ac7565b1a60f81b82828151811061302857613028613ac7565b60200101906001600160f81b031916908160001a90535060049490941c9361304f81613e00565b9050612fe1565b5083156117a35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a66565b60006180008216156130bb575063ffff00001790565b5090565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01612ec0565b6000806000613109858561311e565b915091506131168161318c565b509392505050565b60008082516041036131545760208301516040840151606085015160001a61314887828585613345565b94509450505050613185565b825160400361317d5760208301516040840151613172868383613432565b935093505050613185565b506000905060025b9250929050565b60008160048111156131a0576131a0613659565b036131a85750565b60018160048111156131bc576131bc613659565b036132095760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a66565b600281600481111561321d5761321d613659565b0361326a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a66565b600381600481111561327e5761327e613659565b036132d65760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a66565b60048160048111156132ea576132ea613659565b036133425760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a66565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561337c5750600090506003613429565b8460ff16601b1415801561339457508460ff16601c14155b156133a55750600090506004613429565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156133f9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661342257600060019250925050613429565b9150600090505b94509492505050565b6000806001600160ff1b0383168161344f60ff86901c601b613985565b905061345d87828885613345565b935093505050935093915050565b6001600160a01b038116811461334257600080fd5b60006020828403121561349257600080fd5b81356117a38161346b565b6000602082840312156134af57600080fd5b81356001600160e01b0319811681146117a357600080fd5b600081518084526020808501945080840160005b838110156134fa578151600190810b88529683019691830191016134db565b509495945050505050565b60408152600061351860408301856134c7565b828103602084015261352a81856134c7565b95945050505050565b60006020828403121561354557600080fd5b5035919050565b6000806040838503121561355f57600080fd5b8235915060208301356135718161346b565b809150509250929050565b60008083601f84011261358e57600080fd5b5081356001600160401b038111156135a557600080fd5b6020830191508360208260051b850101111561318557600080fd5b600080600080600080606087890312156135d957600080fd5b86356001600160401b03808211156135f057600080fd5b6135fc8a838b0161357c565b9098509650602089013591508082111561361557600080fd5b6136218a838b0161357c565b9096509450604089013591508082111561363a57600080fd5b5061364789828a0161357c565b979a9699509497509295939492505050565b634e487b7160e01b600052602160045260246000fd5b6004811061368d57634e487b7160e01b600052602160045260246000fd5b9052565b602081016109d3828461366f565b8060010b811461334257600080fd5b60008083601f8401126136c057600080fd5b5081356001600160401b038111156136d757600080fd5b60208301915083602082850101111561318557600080fd5b6000806000806060858703121561370557600080fd5b84356137108161369f565b935060208501356137208161369f565b925060408501356001600160401b0381111561373b57600080fd5b613747878288016136ae565b95989497509550505050565b6000806040838503121561376657600080fd5b82356137718161369f565b915060208301356135718161369f565b6000806040838503121561379457600080fd5b50508035926020909101359150565b6000602082840312156137b557600080fd5b813580151581146117a357600080fd5b8060000b811461334257600080fd5b6000602082840312156137e657600080fd5b81356117a3816137c5565b6000806000806040858703121561380757600080fd5b84356001600160401b038082111561381e57600080fd5b61382a8883890161357c565b9096509450602087013591508082111561384357600080fd5b506137478782880161357c565b6000806040838503121561386357600080fd5b823561386e8161346b565b946020939093013593505050565b6000806000806000806000806080898b03121561389857600080fd5b88356001600160401b03808211156138af57600080fd5b6138bb8c838d0161357c565b909a50985060208b01359150808211156138d457600080fd5b6138e08c838d0161357c565b909850965060408b01359150808211156138f957600080fd5b6139058c838d0161357c565b909650945060608b013591508082111561391e57600080fd5b5061392b8b828c016136ae565b999c989b5096995094979396929594505050565b60006020828403121561395157600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561398057613980613958565b500390565b6000821982111561399857613998613958565b500190565b634e487b7160e01b600052604160045260246000fd5b80516139be8161369f565b919050565b600082601f8301126139d457600080fd5b815160206001600160401b03808311156139f0576139f061399d565b8260051b604051601f19603f83011681018181108482111715613a1557613a1561399d565b604052938452858101830193838101925087851115613a3357600080fd5b83870191505b84821015613a5957613a4a826139b3565b83529183019190830190613a39565b979650505050505050565b60008060408385031215613a7757600080fd5b82516001600160401b0380821115613a8e57600080fd5b613a9a868387016139c3565b93506020850151915080821115613ab057600080fd5b50613abd858286016139c3565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613aef57600080fd5b8151600481106117a357600080fd5b6020808252601b908201527f4552525f544849535f53544147455f4e4f545f4c4956455f5945540000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526016908201527511549497d35553151257d0925117d11254d05093115160521b604082015260600190565b6020808252600c908201526b11549497d393d7d25394155560a21b604082015260600190565b60208082526019908201527f4552525f494e5055545f4c454e4754485f4d49534d4154434800000000000000604082015260600190565b6020808252601c908201527f4552525f494e53554646494349454e545f414d4f554e545f53454e5400000000604082015260600190565b600060208284031215613c4257600080fd5b81356117a38161369f565b600060a0820190508660010b82528560010b602083015284604083015283606083015261197a608083018461366f565b6000816000190483118215151615613c9757613c97613958565b500290565b600082613cb957634e487b7160e01b600052601260045260246000fd5b500490565b60008060408385031215613cd157600080fd5b8251915060208301516135718161346b565b600060208284031215613cf557600080fd5b81516117a3816137c5565b60005b83811015613d1b578181015183820152602001613d03565b838111156123d35750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613d64816017850160208801613d00565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613d95816028840160208801613d00565b01602801949350505050565b6020815260008251806020840152613dc0816040850160208701613d00565b601f01601f19169190910160400192915050565b600063ffffffff80831681851681830481118215151615613df757613df7613958565b02949350505050565b600081613e0f57613e0f613958565b50600019019056fed62a7516129ae59493adc9aebaefd2a06d20313fdd586db8540cca620ef97ce3a2646970667358221220ce9e8ebc627c51a76bdb8b294b646b2fdf49aaeb29cfc8bcc35f563ddc90fd7e64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009ed0f787223ff1feb0cfb33a9207c646d182e918000000000000000000000000efaed650f1a94801806bb110019d9b0dc79531a8000000000000000000000000f790b73f11fa1636d0d26db24bafb0f9b0ac337200000000000000000000000067cf6ebc89cc50f09a10745c414192fd62bbccd3
-----Decoded View---------------
Arg [0] : _auctionV1 (address): 0x9ed0F787223FF1FeB0cFB33a9207c646d182E918
Arg [1] : _landRegistry (address): 0xEfAEd650f1a94801806BB110019d9B0dc79531A8
Arg [2] : _lockLeash (address): 0xF790B73f11fA1636d0d26Db24BAfB0f9B0Ac3372
Arg [3] : _lockShiboshi (address): 0x67cf6EbC89cC50F09A10745c414192Fd62BbCcd3
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000009ed0f787223ff1feb0cfb33a9207c646d182e918
Arg [1] : 000000000000000000000000efaed650f1a94801806bb110019d9b0dc79531a8
Arg [2] : 000000000000000000000000f790b73f11fa1636d0d26db24bafb0f9b0ac3372
Arg [3] : 00000000000000000000000067cf6ebc89cc50f09a10745c414192fd62bbccd3
Loading...
Loading
Loading...
Loading
Net Worth in USD
$2,409.23
Net Worth in ETH
1.159608
Token Allocations
ETH
61.26%
BNB
38.65%
AVAX
0.08%
Others
0.02%
Multichain Portfolio | 34 Chains
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.