Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 20652010 | 19 days ago | IN | 0 ETH | 0.0033426 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
DStreet
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "../IERC20.sol"; import "../TransferHelper.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; interface IERC721 { function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); } interface IERC1155 { function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external; function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external; function balanceOf(address owner, uint toenId) external returns (uint); } interface IDStreetRoyaltyConfig { function getRoyaltyInfo(address token) external view returns (address, uint); function getRoyaltyInfoById(address token,uint256 id) external view returns (address, uint); function getRoyaltyFee(uint price, address token) external view returns (address, uint256); function getRoyaltyFeeById(uint price, address token, uint256 id) external view returns (address, uint256); } interface IWETH is IERC20 { function deposit() external payable; function withdraw(uint256 wad) external; } contract DStreet is Initializable, UUPSUpgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable { using TransferHelper for IERC20; enum TokenType { ERC20, ERC721, ERC1155 } enum ActionType { LIST_ITEM, BID_ITEM, BUY_ITEM, SELL_ITEM } enum ItemStatus { UNKNOWN, OPEN, CLOSED, CANCELLED, APPROVED } struct Token { TokenType tokenType; bool any; address tokenAddress; uint tokenId; uint amount; } struct Item { Token tokenItem; ItemStatus status; bool exists; address party; address currencyAddress; uint price; uint deadline; } struct Handshake { uint256 id; uint256 partyTokensId; uint256 counterPartyTokensId; uint deadline; address party; address counterParty; ItemStatus status; bool exists; } struct ListingStatus { uint256 id; ItemStatus status; } IWETH public _weth; mapping(uint => Item) _listItems; mapping(uint => Item) _bidItems; mapping(uint => Handshake) _handshakeItems; mapping(address => mapping(uint256 => uint256)) _userListings; mapping(address => mapping(uint256 => uint256)) _userBids; mapping(address => mapping(uint256 => uint256)) _userHandshakes; mapping(uint => Token[]) _handshakeTokens; uint _handshakeTokenCounter; uint public _handShakeCount; uint public _listCount; uint public _bidCount; address payable public _feeAddress; uint public _feePct; IDStreetRoyaltyConfig _royaltyConfig; uint constant FEE_DENOMINATOR = 10000; uint constant HANDSHAKE_DEADLINE = 7 * 24 * 60 * 60; // 7 days uint _handshakeFee; address _freeFeeNftAddress; bool _checkForNFT; bool _paused; event HandshakeCreated(uint id, uint handshakeId, address indexed party, address indexed cParty, Token[] partyTokens, Token[] cPartyTokens); event HandshakeApproved(uint handshakeId, address indexed party, address indexed cParty); event HandshakeCompleted(uint handshakeId, address indexed party, address indexed cParty); event HandshakeCancelled(uint handshakeId, address indexed party, address indexed cParty); event ListingCreated(uint id, address tokenAddress, uint tokenId, uint amount, address indexed sender, address currencyAddress, uint price, uint deadline); event BidCreated(uint id, address tokenAddress, uint tokenId, uint amount, bool any, address indexed sender, address currencyAddress, uint price, uint deadline); event ListingUpdated(uint id, uint price, uint deadline); event ListingCancelled(uint id); event BidUpdated(uint id, uint price, uint deadline); event BidCancelled(uint id); event ItemBought(uint id, address tokenAddress, uint tokenId, uint amount, address indexed buyer, address indexed seller, uint price); event ItemSold(uint id, address tokenAddress, uint tokenId, uint amount, address indexed buyer, address indexed seller, uint price); event DStreetPausedUpdate(bool oldFlag, bool newFlag); error NotFound(); error NotInOpenStatus(); error NotInApprovedStatus(); error NotAuthorized(); error InSufficientAmount(); error FailedETHSend(); error NotZeroAddress(); error ExpiredItem(); error AlreadySet(); error AlreadyCancelled(); error DStreetPaused(); error InvalidAction(); error NoItems(); error InvalidPrice(); error InvalidDeadline(); constructor() {} function initialize() initializer public { __Ownable_init(); __UUPSUpgradeable_init(); __ReentrancyGuard_init(); } function _authorizeUpgrade(address) internal override onlyOwner {} function name() public pure returns (string memory) { return "DStreet"; } modifier notPaused() { if (_paused) revert DStreetPaused(); _; } function setPaused(bool paused) external onlyOwner { emit DStreetPausedUpdate(_paused, paused); _paused = paused; } function setFreeFeeNFTAddress(address addr) external onlyOwner { _freeFeeNftAddress = addr; } function getFreeFeeNFTAddress() external view returns (address) { return _freeFeeNftAddress; } function isFeeFreeAccount(address account) public view returns (bool) { if (_checkForNFT) { return IERC721(_freeFeeNftAddress).balanceOf(account) > 0; } return false; } function setCheckForNFT(bool flag) external onlyOwner { _checkForNFT = flag; } function getCheckForNFT() external view returns (bool) { return _checkForNFT; } function setFeeAddress(address payable newAddress) external onlyOwner { if (newAddress == address(0)) revert NotZeroAddress(); _feeAddress = newAddress; } function setRoyaltyConfig(address configAddress) external onlyOwner { if (configAddress == address(0)) revert NotZeroAddress(); _royaltyConfig = IDStreetRoyaltyConfig(configAddress); } function setWETH(address wethAddress) external onlyOwner { if (wethAddress == address(0)) revert NotZeroAddress(); if (address(_weth) != address(0)) revert AlreadySet(); _weth = IWETH(wethAddress); } function setFeePct(uint feePct) external onlyOwner { _feePct = feePct; } function getFeePct() external view returns (uint256) { return _feePct; } function setHandshakeFee(uint fee, uint decimals) external onlyOwner { _handshakeFee = fee * 10**18 / 10 ** decimals; } function getHandShakeFee() external view returns (uint) { return _handshakeFee; } function getRoyaltyInfo(address token) external view returns (address, uint256) { return _royaltyConfig.getRoyaltyInfo(token); } function getRoyaltyInfoById(address token, uint256 tokenId) external view returns (address, uint256) { return _royaltyConfig.getRoyaltyInfoById(token, tokenId); } function getListing(uint id) external view returns (Item memory) { return _listItems[id]; } function getBid(uint id) external view returns (Item memory) { return _bidItems[id]; } function createOrder(uint256 id, ActionType actionType, Token calldata token, address currency, uint price, uint deadline) external notPaused nonReentrant { if (price == 0) revert InvalidPrice(); if (deadline == 0) revert InvalidDeadline(); if (actionType == ActionType.LIST_ITEM) { if (token.tokenType == TokenType.ERC721 && IERC721(token.tokenAddress).ownerOf(token.tokenId) != msg.sender) revert NotAuthorized(); if (token.tokenType == TokenType.ERC1155 && IERC1155(token.tokenAddress).balanceOf(msg.sender, token.tokenId) == 0) revert NotAuthorized(); _listCount++; uint newDeadline = block.timestamp + deadline; _listItems[_listCount] = Item ( token, ItemStatus.OPEN, true, msg.sender, currency, price, newDeadline ); _userListings[msg.sender][id] = _listCount; emit ListingCreated(_listCount, token.tokenAddress, token.tokenId, token.amount, msg.sender, currency, price, newDeadline); } else if (actionType == ActionType.BID_ITEM) { _bidCount++; uint newDeadline = block.timestamp + deadline; _bidItems[_bidCount] = Item ( token, ItemStatus.OPEN, true, msg.sender, currency, price, newDeadline ); _userBids[msg.sender][id] = _bidCount; emit BidCreated(_bidCount, token.tokenAddress, token.tokenId, token.amount, token.any, msg.sender, currency, price, newDeadline); } else { revert InvalidAction(); } } function fulfillOrder(ActionType actionType, uint itemId, uint tokenId) external payable notPaused nonReentrant { Item storage item; address currencyAddress; address seller; address buyer; uint itemPrice; address tokenAddress; uint amount; if (actionType == ActionType.BUY_ITEM) { item = _listItems[itemId]; seller = item.party; buyer = msg.sender; } else if (actionType == ActionType.SELL_ITEM) { item = _bidItems[itemId]; seller = msg.sender; buyer = item.party; } else { revert InvalidAction(); } currencyAddress = item.currencyAddress; itemPrice = item.price; tokenAddress = item.tokenItem.tokenAddress; amount = item.tokenItem.amount; if (item.deadline < block.timestamp) revert ExpiredItem(); if (item.status != ItemStatus.OPEN) revert NotInOpenStatus(); _validateFulfillPrice(currencyAddress, buyer, itemPrice); item.status = ItemStatus.CLOSED; // Transfer NFT _transferTokens(item.tokenItem, seller, buyer, tokenId); (uint platformFee, uint royaltyAmount, uint remaining, address rAddress) = _calculateAmounts(item, seller); _sendAmounts(currencyAddress, seller, rAddress, platformFee, royaltyAmount, remaining); if (actionType == ActionType.BUY_ITEM) { emit ItemBought(itemId, tokenAddress, item.tokenItem.tokenId, amount, buyer, seller, itemPrice); } else { emit ItemSold(itemId, tokenAddress, item.tokenItem.tokenId, amount, seller, buyer, itemPrice); } } function checkOut(uint[] memory itemIds) external payable notPaused nonReentrant { if (itemIds.length == 0) revert NoItems(); uint remainingAmount = msg.value; for (uint i; i < itemIds.length;) { Item storage item = _listItems[itemIds[i]]; address currencyAddress = item.currencyAddress; uint tokenId = item.tokenItem.tokenId; address seller = item.party; if (item.deadline < block.timestamp || item.status != ItemStatus.OPEN || item.price > remainingAmount) { unchecked { ++i; } continue; } item.status = ItemStatus.CLOSED; // Transfer NFT _transferTokens(item.tokenItem, seller, msg.sender, tokenId); (uint platformFee, uint royaltyAmount, uint remaining, address rAddress) = _calculateAmounts(item, seller); _sendAmounts(currencyAddress, seller, rAddress, platformFee, royaltyAmount, remaining); unchecked { remainingAmount -= item.price; ++i; } emit ItemBought(itemIds[i], item.tokenItem.tokenAddress, tokenId, item.tokenItem.amount, msg.sender, seller, item.price); } if (remainingAmount > 0) { _transfer(msg.sender, remainingAmount); } } function _calculateAmounts(Item memory item, address itemOwner) internal view returns (uint pFee, uint rAmount, uint remaining, address rAddress) { pFee = _calculatePlatformFee(item.price, itemOwner); (rAddress, rAmount) = IDStreetRoyaltyConfig(_royaltyConfig).getRoyaltyFeeById(item.price, item.tokenItem.tokenAddress, item.tokenItem.tokenId); // Send remaining ETH to seller remaining = item.price - pFee - rAmount; } function _sendAmounts(address token, address to, address rAddress, uint pFee, uint rFee, uint remaining) internal { if (token == address(0)) { if (pFee > 0) _transfer(_feeAddress, pFee); if (rFee > 0) _transfer(rAddress, rFee); if (remaining > 0) _transfer(to, remaining); } else { if (pFee > 0) _transferTokens(Token(TokenType.ERC20, false, token, 0, pFee), address(this), _feeAddress, 0); if (rFee > 0) _transferTokens(Token(TokenType.ERC20, false, token, 0, rFee), address(this), rAddress, 0); if (remaining > 0) _transferTokens(Token(TokenType.ERC20, false, token, 0, remaining), address(this), to, 0); } } function _validateFulfillPrice(address currencyAddress, address from, uint price) internal { if(currencyAddress == address(0)) { if (msg.value < price) revert InSufficientAmount(); } else { uint initialBal = IERC20(currencyAddress).balanceOf(address(this)); IERC20(currencyAddress).transferFrom(from, address(this), price); uint amountReceived = IERC20(currencyAddress).balanceOf(address(this)) - initialBal; if (amountReceived < price) revert InSufficientAmount(); } } function editOrder(ActionType actionType, uint id, uint price, uint deadline) external notPaused nonReentrant { if (price == 0) revert InvalidPrice(); if (deadline == 0) revert InvalidDeadline(); if (actionType == ActionType.LIST_ITEM) { Item storage item = _listItems[id]; validateItem(item); item.price = price; item.deadline = block.timestamp + deadline; emit ListingUpdated(id, price, item.deadline); } else if (actionType == ActionType.BID_ITEM) { Item storage item = _bidItems[id]; validateItem(item); item.price = price; item.deadline = block.timestamp + deadline; emit BidUpdated(id, price, item.deadline); } else { revert InvalidAction(); } } function cancelOrder(ActionType actionType, uint id) external notPaused nonReentrant { if (actionType == ActionType.LIST_ITEM) { Item storage item = _listItems[id]; validateItem(item); item.status = ItemStatus.CANCELLED; emit ListingCancelled(id); } else if (actionType == ActionType.BID_ITEM) { Item storage item = _bidItems[id]; validateItem(item); item.status = ItemStatus.CANCELLED; emit BidCancelled(id); } else { revert InvalidAction(); } } function validateItem(Item memory item) internal view { if (msg.sender != item.party) revert NotAuthorized(); if (item.deadline < block.timestamp) revert ExpiredItem(); if (item.status != ItemStatus.OPEN) revert NotInOpenStatus(); } function _calculatePlatformFee(uint price, address itemOwner) internal view returns (uint) { if (isFeeFreeAccount(itemOwner)) return 0; return (price * _feePct) / FEE_DENOMINATOR; } function createHandshake(uint id, address cParty, Token[] memory tokens, Token[] memory cpTokens) external notPaused nonReentrant { if (cParty == address(0)) revert NotZeroAddress(); uint partyTokensId = ++_handshakeTokenCounter; uint counterPartyTokensId = ++_handshakeTokenCounter; uint tokensLength = tokens.length; for (uint i; i < tokensLength;) { _handshakeTokens[partyTokensId].push(tokens[i]); unchecked { ++i; } } uint cpTokensLength = cpTokens.length; for (uint i; i < cpTokensLength;) { _handshakeTokens[counterPartyTokensId].push(cpTokens[i]); unchecked { ++i; } } _handShakeCount++; _handshakeItems[_handShakeCount] = Handshake({ id: _handShakeCount, party: msg.sender, partyTokensId: partyTokensId, counterParty: cParty, counterPartyTokensId: counterPartyTokensId, status: ItemStatus.OPEN, deadline: block.timestamp + HANDSHAKE_DEADLINE, exists: true }); _userHandshakes[msg.sender][id] = _handShakeCount; emit HandshakeCreated(id, _handShakeCount, msg.sender, cParty, tokens, cpTokens); } function approveHandshake(uint id) external notPaused nonReentrant { Handshake storage handshake = _handshakeItems[id]; if (!handshake.exists) revert NotFound(); if (handshake.counterParty != msg.sender) revert NotAuthorized(); if (handshake.status != ItemStatus.OPEN) revert NotInOpenStatus(); if (handshake.deadline < block.timestamp) revert ExpiredItem(); handshake.status = ItemStatus.APPROVED; emit HandshakeApproved(id, handshake.party, handshake.counterParty); } function completeHandshake(uint id) external payable notPaused nonReentrant { Handshake storage handshake = _handshakeItems[id]; if (!handshake.exists) revert NotFound(); if (handshake.party != msg.sender) revert NotAuthorized(); if (handshake.status != ItemStatus.APPROVED) revert NotInApprovedStatus(); if (handshake.deadline < block.timestamp) revert ExpiredItem(); handshake.status = ItemStatus.CLOSED; if (_handshakeFee > 0 && !isFeeFreeAccount(msg.sender)) { if (msg.value < _handshakeFee) revert InSufficientAmount(); _transfer(_feeAddress, _handshakeFee); } //Transfer Party Items Token[] memory tokens = _handshakeTokens[handshake.partyTokensId]; uint itemsLength = tokens.length; for (uint i ; i < itemsLength;) { _transferTokens(tokens[i], handshake.party, handshake.counterParty, 0); unchecked { ++i; } } //Transfer Counter Party Items; Token[] memory cpTokens = _handshakeTokens[handshake.counterPartyTokensId]; uint cpItemsLength = cpTokens.length; for (uint i ; i < cpItemsLength;) { _transferTokens(cpTokens[i], handshake.counterParty, handshake.party, 0); unchecked { ++i; } } emit HandshakeCompleted(id, handshake.party, handshake.counterParty); } function cancelHandshake(uint id) external notPaused nonReentrant { Handshake storage handshake = _handshakeItems[id]; if (!handshake.exists) revert NotFound(); if (handshake.party != msg.sender) revert NotAuthorized(); if (handshake.status == ItemStatus.CANCELLED) revert AlreadyCancelled(); if (handshake.deadline < block.timestamp) revert ExpiredItem(); handshake.status = ItemStatus.CANCELLED; emit HandshakeCancelled(id, handshake.party, handshake.counterParty); } function _transferTokens(Token memory token, address from, address to, uint tokenId) internal { if (token.tokenType == TokenType.ERC20) { IERC20(token.tokenAddress).safeTransferFrom(from, to, token.amount); } else if (token.tokenType == TokenType.ERC721) { uint idToUse = token.any ? tokenId : token.tokenId; IERC721(token.tokenAddress).safeTransferFrom(from, to, idToUse); } else if (token.tokenType == TokenType.ERC1155) { uint idToUse = token.any ? tokenId : token.tokenId; IERC1155(token.tokenAddress).safeTransferFrom(from, to, idToUse, token.amount, ""); } } function _transfer(address to, uint256 amount) internal { if (to == address(0)) revert NotZeroAddress(); (bool success, ) = payable(to).call{value: amount}(""); if (!success) revert FailedETHSend(); } function getLatestListingId() external view returns (uint256) { return _listCount; } function getLatestBidId() external view returns (uint256) { return _bidCount; } function getFeeDetails(address token, uint256 tokenId, bool ignoreTokenId) external view returns (address, uint256, uint256) { address creatorAddress; uint royaltyFee; if (ignoreTokenId) { (creatorAddress, royaltyFee) = _royaltyConfig.getRoyaltyInfo(token); } else { (creatorAddress, royaltyFee) = _royaltyConfig.getRoyaltyInfoById(token, tokenId); } return (creatorAddress, royaltyFee, _feePct); } function getHandshakeId(address user, uint id) external view returns (uint256) { return _userHandshakes[user][id]; } function getListingId(address user, uint id) external view returns (uint256) { return _userListings[user][id]; } function getBidId(address user, uint id) external view returns (uint256) { return _userBids[user][id]; } function transferETH(address payable to) external onlyOwner { _transfer(to, address(this).balance); } function getListingStatus(uint[] memory ids) external view returns (ListingStatus[] memory) { ListingStatus[] memory returnValues = new ListingStatus[](ids.length); for (uint256 i; i < ids.length;) { returnValues[i] = ListingStatus(ids[i], _listItems[ids[i]].status); unchecked { ++i; } } return returnValues; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.8.3._ */ interface IERC1967Upgradeable { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/IERC1967Upgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { AddressUpgradeable.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeTo(address newImplementation) public virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ReentrancyGuardUpgradeable is Initializable { // 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; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function decimals() external view returns (uint8); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function transferFromWithPermit(address sender, address recipient, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "./IERC20.sol"; /// @title TransferHelper /// @notice Contains helper methods for interacting with ERC20 tokens that do not consistently return true/false library TransferHelper { /// @notice Transfers tokens from msg.sender to a recipient /// @dev Calls transfer on token contract, errors with TF if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( IERC20 token, address to, uint256 value ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TF'); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Calls transfer on token contract, errors with TF if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TF'); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyCancelled","type":"error"},{"inputs":[],"name":"AlreadySet","type":"error"},{"inputs":[],"name":"DStreetPaused","type":"error"},{"inputs":[],"name":"ExpiredItem","type":"error"},{"inputs":[],"name":"FailedETHSend","type":"error"},{"inputs":[],"name":"InSufficientAmount","type":"error"},{"inputs":[],"name":"InvalidAction","type":"error"},{"inputs":[],"name":"InvalidDeadline","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"NoItems","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[],"name":"NotInApprovedStatus","type":"error"},{"inputs":[],"name":"NotInOpenStatus","type":"error"},{"inputs":[],"name":"NotZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"BidCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"any","type":"bool"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"currencyAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"BidCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"BidUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"oldFlag","type":"bool"},{"indexed":false,"internalType":"bool","name":"newFlag","type":"bool"}],"name":"DStreetPausedUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"handshakeId","type":"uint256"},{"indexed":true,"internalType":"address","name":"party","type":"address"},{"indexed":true,"internalType":"address","name":"cParty","type":"address"}],"name":"HandshakeApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"handshakeId","type":"uint256"},{"indexed":true,"internalType":"address","name":"party","type":"address"},{"indexed":true,"internalType":"address","name":"cParty","type":"address"}],"name":"HandshakeCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"handshakeId","type":"uint256"},{"indexed":true,"internalType":"address","name":"party","type":"address"},{"indexed":true,"internalType":"address","name":"cParty","type":"address"}],"name":"HandshakeCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"handshakeId","type":"uint256"},{"indexed":true,"internalType":"address","name":"party","type":"address"},{"indexed":true,"internalType":"address","name":"cParty","type":"address"},{"components":[{"internalType":"enum DStreet.TokenType","name":"tokenType","type":"uint8"},{"internalType":"bool","name":"any","type":"bool"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct DStreet.Token[]","name":"partyTokens","type":"tuple[]"},{"components":[{"internalType":"enum DStreet.TokenType","name":"tokenType","type":"uint8"},{"internalType":"bool","name":"any","type":"bool"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct DStreet.Token[]","name":"cPartyTokens","type":"tuple[]"}],"name":"HandshakeCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"ItemBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"ItemSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ListingCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"currencyAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ListingCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ListingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"_bidCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_feeAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_feePct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_handShakeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_listCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approveHandshake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelHandshake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum DStreet.ActionType","name":"actionType","type":"uint8"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"itemIds","type":"uint256[]"}],"name":"checkOut","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"completeHandshake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"cParty","type":"address"},{"components":[{"internalType":"enum DStreet.TokenType","name":"tokenType","type":"uint8"},{"internalType":"bool","name":"any","type":"bool"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct DStreet.Token[]","name":"tokens","type":"tuple[]"},{"components":[{"internalType":"enum DStreet.TokenType","name":"tokenType","type":"uint8"},{"internalType":"bool","name":"any","type":"bool"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct DStreet.Token[]","name":"cpTokens","type":"tuple[]"}],"name":"createHandshake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"enum DStreet.ActionType","name":"actionType","type":"uint8"},{"components":[{"internalType":"enum DStreet.TokenType","name":"tokenType","type":"uint8"},{"internalType":"bool","name":"any","type":"bool"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct DStreet.Token","name":"token","type":"tuple"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"createOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum DStreet.ActionType","name":"actionType","type":"uint8"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"editOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum DStreet.ActionType","name":"actionType","type":"uint8"},{"internalType":"uint256","name":"itemId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"fulfillOrder","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getBid","outputs":[{"components":[{"components":[{"internalType":"enum DStreet.TokenType","name":"tokenType","type":"uint8"},{"internalType":"bool","name":"any","type":"bool"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct DStreet.Token","name":"tokenItem","type":"tuple"},{"internalType":"enum DStreet.ItemStatus","name":"status","type":"uint8"},{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"address","name":"party","type":"address"},{"internalType":"address","name":"currencyAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DStreet.Item","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getBidId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCheckForNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"ignoreTokenId","type":"bool"}],"name":"getFeeDetails","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeePct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFreeFeeNFTAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHandShakeFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getHandshakeId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestBidId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestListingId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getListing","outputs":[{"components":[{"components":[{"internalType":"enum DStreet.TokenType","name":"tokenType","type":"uint8"},{"internalType":"bool","name":"any","type":"bool"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct DStreet.Token","name":"tokenItem","type":"tuple"},{"internalType":"enum DStreet.ItemStatus","name":"status","type":"uint8"},{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"address","name":"party","type":"address"},{"internalType":"address","name":"currencyAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DStreet.Item","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getListingId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"getListingStatus","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"enum DStreet.ItemStatus","name":"status","type":"uint8"}],"internalType":"struct DStreet.ListingStatus[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getRoyaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyaltyInfoById","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isFeeFreeAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"flag","type":"bool"}],"name":"setCheckForNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"feePct","type":"uint256"}],"name":"setFeePct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setFreeFeeNFTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"name":"setHandshakeFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"configAddress","type":"address"}],"name":"setRoyaltyConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wethAddress","type":"address"}],"name":"setWETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"transferETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a06040523060805234801561001457600080fd5b50608051614bbf61004c60003960008181610f2601528181610f6f015281816113b1015281816113f101526114840152614bbf6000f3fe6080604052600436106102935760003560e01c80636b1b77611161015a578063ad378c68116100c1578063df9380031161007a578063df9380031461081c578063e58e9ffc14610833578063ea44bfd414610877578063f078d8cf1461088d578063f209be41146108ad578063f2fde38b146108cd57600080fd5b8063ad378c6814610741578063b2ce817f14610761578063bf060c4c14610781578063c679f788146107c6578063d392bcb2146107e6578063d50f6bf0146107fc57600080fd5b80638129fc1c116101135780638129fc1c1461068e5780638705fcd4146106a35780638da5cb5b146106c3578063a1764595146106e1578063a312c09a14610701578063aa45e06c1461072157600080fd5b80636b1b7761146105e65780637029ebd814610613578063715018a61461063357806373dcfe9014610648578063744856dc14610668578063780602d81461067b57600080fd5b80633a9dce0b116101fe5780634f1ef286116101b75780634f1ef2861461054857806352d1902d1461055b57806355dc48d71461057057806356d8cbd0146105905780635b769f3c146105a6578063660cb4e8146105c657600080fd5b80633a9dce0b146104ad5780633c889e6f146104c45780633dceb4e4146104e45780633f09f1e91461050457806347cf408d1461051b5780634af12c311461053157600080fd5b80631a082f2b116102505780631a082f2b146103b95780631f262c1d146103fc5780632084fad61461040f578063307733c91461042f5780633659cfe61461044e578063376a06f41461046e57600080fd5b80630135f74014610298578063067707ee146102d657806306fdde0314610304578063107a274a1461033a578063122cfd9c1461036757806316c38b3c14610397575b600080fd5b3480156102a457600080fd5b50610107546102b9906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102e257600080fd5b506102f66102f1366004614095565b6108ed565b6040519081526020016102cd565b34801561031057600080fd5b5060408051808201825260078152661114dd1c99595d60ca1b602082015290516102cd91906140e5565b34801561034657600080fd5b5061035a610355366004614118565b610919565b6040516102cd91906141a3565b34801561037357600080fd5b50610387610382366004614214565b610a37565b60405190151581526020016102cd565b3480156103a357600080fd5b506103b76103b236600461423f565b610acc565b005b3480156103c557600080fd5b506102f66103d4366004614095565b6001600160a01b0391909116600090815260ff60209081526040808320938352929052205490565b6103b761040a3660046142c7565b610b3d565b34801561041b57600080fd5b506103b761042a366004614214565b610eca565b34801561043b57600080fd5b5061010b546001600160a01b03166102b9565b34801561045a57600080fd5b506103b7610469366004614214565b610f1c565b34801561047a57600080fd5b5061048e610489366004614214565b611001565b604080516001600160a01b0390931683526020830191909152016102cd565b3480156104b957600080fd5b506102f66101065481565b3480156104d057600080fd5b5061035a6104df366004614118565b61107c565b3480156104f057600080fd5b506103b76104ff366004614371565b6110bf565b34801561051057600080fd5b506102f66101085481565b34801561052757600080fd5b50610105546102f6565b34801561053d57600080fd5b506102f66101055481565b6103b76105563660046143aa565b6113a7565b34801561056757600080fd5b506102f6611477565b34801561057c57600080fd5b506103b761058b366004614118565b61152a565b34801561059c57600080fd5b50610108546102f6565b3480156105b257600080fd5b506103b76105c1366004614214565b611695565b3480156105d257600080fd5b506103b76105e1366004614118565b611710565b3480156105f257600080fd5b506106066106013660046142c7565b61186c565b6040516102cd9190614452565b34801561061f57600080fd5b5061048e61062e366004614095565b61197f565b34801561063f57600080fd5b506103b7611a03565b34801561065457600080fd5b506103b76106633660046145b2565b611a17565b6103b7610676366004614632565b611e14565b6103b7610689366004614118565b612220565b34801561069a57600080fd5b506103b7612659565b3480156106af57600080fd5b506103b76106be366004614214565b612779565b3480156106cf57600080fd5b506097546001600160a01b03166102b9565b3480156106ed57600080fd5b5060fb546102b9906001600160a01b031681565b34801561070d57600080fd5b5061010b54600160a01b900460ff16610387565b34801561072d57600080fd5b506103b761073c36600461423f565b6127cb565b34801561074d57600080fd5b506103b761075c366004614665565b6127f2565b34801561076d57600080fd5b506103b761077c366004614681565b612972565b34801561078d57600080fd5b506107a161079c3660046146a3565b6129a9565b604080516001600160a01b0390941684526020840192909252908201526060016102cd565b3480156107d257600080fd5b506103b76107e13660046146e5565b612abd565b3480156107f257600080fd5b50610106546102f6565b34801561080857600080fd5b506103b7610817366004614214565b6131e7565b34801561082857600080fd5b506102f66101045481565b34801561083f57600080fd5b506102f661084e366004614095565b6001600160a01b0391909116600090815261010160209081526040808320938352929052205490565b34801561088357600080fd5b5061010a546102f6565b34801561089957600080fd5b506103b76108a8366004614214565b6131f9565b3480156108b957600080fd5b506103b76108c8366004614118565b613224565b3480156108d957600080fd5b506103b76108e8366004614214565b613232565b6001600160a01b0382166000908152610100602090815260408083208484529091529020545b92915050565b61092161401d565b600082815260fc602052604090819020815161018081019092528054829060e08201908390829060ff16600281111561095c5761095c614131565b600281111561096d5761096d614131565b81528154610100810460ff9081161515602080850191909152620100009092046001600160a01b0316604084015260018401546060840152600290930154608090920191909152918352600384015492909101911660048111156109d3576109d3614131565b60048111156109e4576109e4614131565b8152600382015460ff610100820416151560208301526001600160a01b03620100009091048116604083015260048301541660608201526005820154608082015260069091015460a09091015292915050565b61010b54600090600160a01b900460ff1615610ac45761010b546040516370a0823160e01b81526001600160a01b03848116600483015260009216906370a0823190602401602060405180830381865afa158015610a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abd9190614755565b1192915050565b506000919050565b610ad46132a8565b61010b5460408051600160a81b90920460ff161515825282151560208301527f8e4c96298704d397e33cf1bf00cf8cfbaca8c3485eaa92b4acd8989b9e2c69e1910160405180910390a161010b8054911515600160a81b0260ff60a81b19909216919091179055565b61010b54600160a81b900460ff1615610b69576040516325c9dad560e21b815260040160405180910390fd5b610b71613302565b8051600003610b9357604051630241d61b60e11b815260040160405180910390fd5b3460005b8251811015610eab57600060fc6000858481518110610bb857610bb861476e565b602090810291909101810151825281019190915260400160002060048101546001820154600383015460068401549394506001600160a01b03928316939192620100009091041690421180610c2657506001600385015460ff166004811115610c2357610c23614131565b14155b80610c345750858460050154115b15610c485784600101945050505050610b97565b60038401805460ff191660029081179091556040805160a081019091528554610cda928791839160ff90911690811115610c8457610c84614131565b6002811115610c9557610c95614131565b81528154610100810460ff16151560208301526201000090046001600160a01b031660408201526001820154606082015260029091015460809091015282338561335b565b6040805161018081019091528454600091829182918291610df291908a90829060e08201908390829060ff166002811115610d1757610d17614131565b6002811115610d2857610d28614131565b81528154610100810460ff9081161515602080850191909152620100009092046001600160a01b031660408401526001840154606084015260029093015460809092019190915291835260038401549290910191166004811115610d8e57610d8e614131565b6004811115610d9f57610d9f614131565b8152600382015460ff610100820416151560208301526001600160a01b03620100009091048116604083015260048301541660608201526005820154608082015260069091015460a0909101528661350f565b9350935093509350610e088786838787876135df565b87600501548a039950886001019850846001600160a01b0316336001600160a01b03167f4ad78fb2d35296510367ef0a83bad900b5083884578c23c320bd698bc3eb16428d8c81518110610e5e57610e5e61476e565b60209081029190910101518b5460028d015460058e0154604051610e9694936201000090046001600160a01b0316928e929091614784565b60405180910390a35050505050505050610b97565b508015610ebc57610ebc3382613710565b50610ec7600160c955565b50565b610ed26132a8565b6001600160a01b038116610ef9576040516366385fa360e01b815260040160405180910390fd5b61010980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610f6d5760405162461bcd60e51b8152600401610f64906147b0565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610fb6600080516020614b43833981519152546001600160a01b031690565b6001600160a01b031614610fdc5760405162461bcd60e51b8152600401610f64906147fc565b610fe5816137b2565b60408051600080825260208201909252610ec7918391906137ba565b61010954604051630dda81bd60e21b81526001600160a01b038381166004830152600092839291169063376a06f4906024016040805180830381865afa15801561104f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110739190614848565b91509150915091565b61108461401d565b600082815260fd602052604090819020815161018081019092528054829060e08201908390829060ff16600281111561095c5761095c614131565b61010b54600160a81b900460ff16156110eb576040516325c9dad560e21b815260040160405180910390fd5b6110f3613302565b816000036111135760405162bfc92160e01b815260040160405180910390fd5b8060000361113457604051631da7447960e21b815260040160405180910390fd5b600084600381111561114857611148614131565b036112cb57600083815260fc602052604090819020815161018081019092528054909161126a918390829060e08201908390829060ff16600281111561119057611190614131565b60028111156111a1576111a1614131565b81528154610100810460ff9081161515602080850191909152620100009092046001600160a01b03166040840152600184015460608401526002909301546080909201919091529183526003840154929091019116600481111561120757611207614131565b600481111561121857611218614131565b8152600382015460ff610100820416151560208301526001600160a01b03620100009091048116604083015260048301541660608201526005820154608082015260069091015460a090910152613925565b6005810183905561127b824261488c565b600682018190556040805186815260208101869052908101919091527ff7adc9a0380a940c6058d78194df6a9b9fa5bb431bbad15194913bb611f3f4f7906060015b60405180910390a150611397565b60018460038111156112df576112df614131565b0361137e57600083815260fd6020526040908190208151610180810190925280549091611327918390829060e08201908390829060ff16600281111561119057611190614131565b60058101839055611338824261488c565b600682018190556040805186815260208101869052908101919091527f25ef1279507fe1cecb423f08cba90c8ce9428d0b8ecab7c3f1a38d8e21e0f3c7906060016112bd565b604051634a7f394f60e01b815260040160405180910390fd5b6113a1600160c955565b50505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036113ef5760405162461bcd60e51b8152600401610f64906147b0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611438600080516020614b43833981519152546001600160a01b031690565b6001600160a01b03161461145e5760405162461bcd60e51b8152600401610f64906147fc565b611467826137b2565b611473828260016137ba565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115175760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610f64565b50600080516020614b4383398151915290565b61010b54600160a81b900460ff1615611556576040516325c9dad560e21b815260040160405180910390fd5b61155e613302565b600081815260fe602052604090206005810154600160a81b900460ff166115985760405163c5723b5160e01b815260040160405180910390fd5b60058101546001600160a01b031633146115c55760405163ea8e4eb560e01b815260040160405180910390fd5b60016005820154600160a01b900460ff1660048111156115e7576115e7614131565b14611605576040516301332be560e71b815260040160405180910390fd5b428160030154101561162a5760405163269b6aab60e11b815260040160405180910390fd5b600581018054600160a21b60ff60a01b1982161790915560048201546040518481526001600160a01b0392831692909116907f6420f3bef768048be88d7611dd51eb1315eb97a0f77ea1e279fdee851ebceb31906020015b60405180910390a350610ec7600160c955565b61169d6132a8565b6001600160a01b0381166116c4576040516366385fa360e01b815260040160405180910390fd5b60fb546001600160a01b0316156116ee5760405163a741a04560e01b815260040160405180910390fd5b60fb80546001600160a01b0319166001600160a01b0392909216919091179055565b61010b54600160a81b900460ff161561173c576040516325c9dad560e21b815260040160405180910390fd5b611744613302565b600081815260fe602052604090206005810154600160a81b900460ff1661177e5760405163c5723b5160e01b815260040160405180910390fd5b60048101546001600160a01b031633146117ab5760405163ea8e4eb560e01b815260040160405180910390fd5b60036005820154600160a01b900460ff1660048111156117cd576117cd614131565b036117eb576040516354e3762560e01b815260040160405180910390fd5b42816003015410156118105760405163269b6aab60e11b815260040160405180910390fd5b600581018054600360a01b60ff60a01b1982161790915560048201546040518481526001600160a01b0392831692909116907ff4f60cc7b3c9800eca6bfce01abb4aedd0dd80a8a11fed6c0465c7d29e96590a90602001611682565b60606000825167ffffffffffffffff81111561188a5761188a61425c565b6040519080825280602002602001820160405280156118cf57816020015b60408051808201909152600080825260208201528152602001906001900390816118a85790505b50905060005b83518110156119785760405180604001604052808583815181106118fb576118fb61476e565b6020026020010151815260200160fc600087858151811061191e5761191e61476e565b60209081029190910181015182528101919091526040016000206003015460ff16600481111561195057611950614131565b8152508282815181106119655761196561476e565b60209081029190910101526001016118d5565b5092915050565b61010954604051630e053d7b60e31b81526001600160a01b038481166004830152602482018490526000928392911690637029ebd8906044016040805180830381865afa1580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f89190614848565b915091509250929050565b611a0b6132a8565b611a1560006139b6565b565b61010b54600160a81b900460ff1615611a43576040516325c9dad560e21b815260040160405180910390fd5b611a4b613302565b6001600160a01b038316611a72576040516366385fa360e01b815260040160405180910390fd5b600061010360008154611a849061489f565b9190508190559050600061010360008154611a9e9061489f565b9182905550845190915060005b81811015611b85576000848152610102602052604090208651879083908110611ad657611ad661476e565b60209081029190910181015182546001818101855560009485529290932081516003909402018054919390929091839160ff1990911690836002811115611b1f57611b1f614131565b02179055506020820151815460408401516001600160a01b0316620100000262010000600160b01b03199215156101000292909216610100600160b01b031990911617178155606082015160018083019190915560809092015160029091015501611aab565b50835160005b81811015611c65576000848152610102602052604090208651879083908110611bb657611bb661476e565b60209081029190910181015182546001818101855560009485529290932081516003909402018054919390929091839160ff1990911690836002811115611bff57611bff614131565b02179055506020820151815460408401516001600160a01b0316620100000262010000600160b01b03199215156101000292909216610100600160b01b031990911617178155606082015160018083019190915560809092015160029091015501611b8b565b506101048054906000611c778361489f565b919050555060405180610100016040528061010454815260200185815260200184815260200162093a8042611cac919061488c565b81523360208201526001600160a01b0389166040820152606001600181526001602091820181905261010454600090815260fe83526040908190208451815592840151918301919091558201516002820155606082015160038201556080820151600480830180546001600160a01b03199081166001600160a01b039485161790915560a085015160058501805492831691909416908117845560c086015193926001600160a81b03199092161790600160a01b908490811115611d7257611d72614131565b021790555060e0919091015160059091018054911515600160a81b0260ff60a81b1990921691909117905561010454336000818152610101602090815260408083208d845290915290819020839055516001600160a01b038a16927fba02e52c989f3e7a3dabdf4247f8563f1ece11b2537396ce03f15f424fb994c591611dfe918d918c908c906148fd565b60405180910390a3505050506113a1600160c955565b61010b54600160a81b900460ff1615611e40576040516325c9dad560e21b815260040160405180910390fd5b611e48613302565b600080808080808060028a6003811115611e6457611e64614131565b03611e9857600089815260fc6020526040902060038101549097506201000090046001600160a01b03169450339350611edc565b60038a6003811115611eac57611eac614131565b0361137e57600089815260fd6020526040902060038101549097503395506201000090046001600160a01b031693505b505050600484015460058501548554600287015460068801546001600160a01b03948516975092936201000090920490911691421115611f2f5760405163269b6aab60e11b815260040160405180910390fd5b6001600388015460ff166004811115611f4a57611f4a614131565b14611f68576040516301332be560e71b815260040160405180910390fd5b611f73868585613a08565b60038701805460ff191660029081179091556040805160a081019091528854612005928a91839160ff90911690811115611faf57611faf614131565b6002811115611fc057611fc0614131565b81528154610100810460ff16151560208301526201000090046001600160a01b031660408201526001820154606082015260029091015460809091015286868b61335b565b604080516101808101909152875460009182918291829161211d91908d90829060e08201908390829060ff16600281111561204257612042614131565b600281111561205357612053614131565b81528154610100810460ff9081161515602080850191909152620100009092046001600160a01b0316604084015260018401546060840152600290930154608090920191909152918352600384015492909101911660048111156120b9576120b9614131565b60048111156120ca576120ca614131565b8152600382015460ff610100820416151560208301526001600160a01b03620100009091048116604083015260048301541660608201526005820154608082015260069091015460a0909101528a61350f565b93509350935093506121338a8a838787876135df565b60028e600381111561214757612147614131565b036121ab57886001600160a01b0316886001600160a01b03167f4ad78fb2d35296510367ef0a83bad900b5083884578c23c320bd698bc3eb16428f898f600001600101548a8d60405161219e959493929190614784565b60405180910390a3612206565b876001600160a01b0316896001600160a01b03167f26605728c2f63a417ebb709344cc6cb5311233144b84020f3542e485d25688b38f898f600001600101548a8d6040516121fd959493929190614784565b60405180910390a35b505050505050505050505061221b600160c955565b505050565b61010b54600160a81b900460ff161561224c576040516325c9dad560e21b815260040160405180910390fd5b612254613302565b600081815260fe602052604090206005810154600160a81b900460ff1661228e5760405163c5723b5160e01b815260040160405180910390fd5b60048101546001600160a01b031633146122bb5760405163ea8e4eb560e01b815260040160405180910390fd5b60046005820154600160a01b900460ff1660048111156122dd576122dd614131565b146122fb5760405163c6687c8b60e01b815260040160405180910390fd5b42816003015410156123205760405163269b6aab60e11b815260040160405180910390fd5b60058101805460ff60a01b1916600160a11b17905561010a541580159061234d575061234b33610a37565b155b156123915761010a5434101561237657604051632d617eaf60e21b815260040160405180910390fd5b6101075461010a54612391916001600160a01b031690613710565b6000610102600083600101548152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561246b576000848152602090206040805160a08101909152600384029091018054829060ff16600281111561240657612406614131565b600281111561241757612417614131565b81528154610100810460ff161515602080840191909152620100009091046001600160a01b0316604083015260018084015460608401526002909301546080909201919091529183529290920191016123cb565b5050825192935060009150505b818110156124c6576124be8382815181106124955761249561476e565b6020908102919091010151600486015460058701546001600160a01b039182169116600061335b565b600101612478565b506000610102600085600201548152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156125a1576000848152602090206040805160a08101909152600384029091018054829060ff16600281111561253c5761253c614131565b600281111561254d5761254d614131565b81528154610100810460ff161515602080840191909152620100009091046001600160a01b031660408301526001808401546060840152600290930154608090920191909152918352929092019101612501565b5050825192935060009150505b818110156125fc576125f48382815181106125cb576125cb61476e565b6020908102919091010151600588015460048901546001600160a01b039182169116600061335b565b6001016125ae565b50600585015460048601546040518881526001600160a01b0392831692909116907fcd9417753f79ae81b7cb18b74a9b4ef4411bca4a6bec8546a6bdc832d01e85809060200160405180910390a35050505050610ec7600160c955565b600054610100900460ff16158080156126795750600054600160ff909116105b806126935750303b158015612693575060005460ff166001145b6126f65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610f64565b6000805460ff191660011790558015612719576000805461ff0019166101001790555b612721613bc1565b612729613bf0565b612731613c17565b8015610ec7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b6127816132a8565b6001600160a01b0381166127a8576040516366385fa360e01b815260040160405180910390fd5b61010780546001600160a01b0319166001600160a01b0392909216919091179055565b6127d36132a8565b61010b8054911515600160a01b0260ff60a01b19909216919091179055565b61010b54600160a81b900460ff161561281e576040516325c9dad560e21b815260040160405180910390fd5b612826613302565b600082600381111561283a5761283a614131565b036128cc57600081815260fc6020526040908190208151610180810190925280549091612882918390829060e08201908390829060ff16600281111561119057611190614131565b6003818101805460ff191690911790556040518281527f411aee90354c51b1b04cd563fcab2617142a9d50da19232d888547c8a1b7fd8a906020015b60405180910390a150612968565b60018260038111156128e0576128e0614131565b0361137e57600081815260fd6020526040908190208151610180810190925280549091612928918390829060e08201908390829060ff16600281111561119057611190614131565b6003818101805460ff191690911790556040518281527fc1546e394b1975212fe013e7e6995653585f44e568c407d1157483f7d4b94581906020016128be565b611473600160c955565b61297a6132a8565b61298581600a614a12565b61299783670de0b6b3a7640000614a1e565b6129a19190614a35565b61010a555050565b60008060008060008515612a2f5761010954604051630dda81bd60e21b81526001600160a01b038a811660048301529091169063376a06f4906024016040805180830381865afa158015612a01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a259190614848565b9092509050612aaa565b61010954604051630e053d7b60e31b81526001600160a01b038a81166004830152602482018a905290911690637029ebd8906044016040805180830381865afa158015612a80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa49190614848565b90925090505b6101085491989097509095509350505050565b61010b54600160a81b900460ff1615612ae9576040516325c9dad560e21b815260040160405180910390fd5b612af1613302565b81600003612b115760405162bfc92160e01b815260040160405180910390fd5b80600003612b3257604051631da7447960e21b815260040160405180910390fd5b6000856003811115612b4657612b46614131565b03612f4f576001612b5a6020860186614a57565b6002811115612b6b57612b6b614131565b148015612bfe575033612b846060860160408701614214565b6040516331a9108f60e11b8152606087013560048201526001600160a01b039190911690636352211e90602401602060405180830381865afa158015612bce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf29190614a72565b6001600160a01b031614155b15612c1c5760405163ea8e4eb560e01b815260040160405180910390fd5b6002612c2b6020860186614a57565b6002811115612c3c57612c3c614131565b148015612cca5750612c546060850160408601614214565b604051627eeac760e11b8152336004820152606086013560248201526001600160a01b03919091169062fdd58e906044016020604051808303816000875af1158015612ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cc89190614755565b155b15612ce85760405163ea8e4eb560e01b815260040160405180910390fd5b6101058054906000612cf98361489f565b9091555060009050612d0b824261488c565b90506040518060e0016040528086803603810190612d299190614a8f565b81526001602080830182905260408084018390523360608501526001600160a01b038916608085015260a0840188905260c090930185905261010554600090815260fc90915291909120825180518254929391928492839160ff191690836002811115612d9857612d98614131565b0217905550602082810151825460408501516001600160a01b0316620100000262010000600160b01b03199215156101000292909216610100600160b01b03199091161717825560608301516001808401919091556080909301516002909201919091558301516003830180549192909160ff191690836004811115612e2057612e20614131565b0217905550604082810151600383018054606080870151610100600160b01b03199092166101009415159490940262010000600160b01b03191693909317620100006001600160a01b03928316021790915560808501516004850180546001600160a01b0319169190921617905560a0840151600584015560c0909301516006909201919091556101055433600081815260ff60209081528482208d83529052839020829055927f678c2ff4d73a2ea7f46b804fa12a53bd6af0a11541348722fb9806441c2e7b3992612ef7918a01908a01614214565b604080519283526001600160a01b0391821660208401526060808b0135918401919091526080808b0135918401919091529088169082015260a0810186905260c0810184905260e0015b60405180910390a2506131d5565b6001856003811115612f6357612f63614131565b0361137e576101068054906000612f798361489f565b9091555060009050612f8b824261488c565b90506040518060e0016040528086803603810190612fa99190614a8f565b81526001602080830182905260408084018390523360608501526001600160a01b038916608085015260a0840188905260c090930185905261010654600090815260fd90915291909120825180518254929391928492839160ff19169083600281111561301857613018614131565b0217905550602082810151825460408501516001600160a01b0316620100000262010000600160b01b03199215156101000292909216610100600160b01b03199091161717825560608301516001808401919091556080909301516002909201919091558301516003830180549192909160ff1916908360048111156130a0576130a0614131565b0217905550604082810151600383018054606080870151610100600160b01b0319909216610100941515850262010000600160b01b03191617620100006001600160a01b03938416021790925560808601516004860180546001600160a01b0319169190921617905560a0850151600585015560c0909401516006909301929092556101065433600081815260209485528381208d82529094529282902081905591927ffdf6fdd614f71f6eeffac405d09ace624626543346de5d7398b9ee74dc3b67d29291613174918a01908a01614214565b606089013560808a013561318e60408c0160208d0161423f565b604080519586526001600160a01b039485166020870152850192909252606084015215156080830152871660a082015260c0810186905260e0810184905261010001612f41565b6131df600160c955565b505050505050565b6131ef6132a8565b610ec78147613710565b6132016132a8565b61010b80546001600160a01b0319166001600160a01b0392909216919091179055565b61322c6132a8565b61010855565b61323a6132a8565b6001600160a01b03811661329f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f64565b610ec7816139b6565b6097546001600160a01b03163314611a155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f64565b600260c954036133545760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f64565b600260c955565b60008451600281111561337057613370614131565b036133a25761339d8383866080015187604001516001600160a01b0316613c46909392919063ffffffff16565b6113a1565b6001845160028111156133b7576133b7614131565b0361344b57600084602001516133d15784606001516133d3565b815b6040808701519051632142170760e11b81526001600160a01b0387811660048301528681166024830152604482018490529293509116906342842e0e90606401600060405180830381600087803b15801561342d57600080fd5b505af1158015613441573d6000803e3d6000fd5b50505050506113a1565b60028451600281111561346057613460614131565b036113a1576000846020015161347a57846060015161347c565b815b60408087015160808801519151637921219560e11b81526001600160a01b038881166004830152878116602483015260448201859052606482019390935260a06084820152600060a4820152929350169063f242432a9060c401600060405180830381600087803b1580156134f057600080fd5b505af1158015613504573d6000803e3d6000fd5b505050505050505050565b6000806000806135238660a0015186613d47565b6101095460a088015188516040808201516060909201519051635750768760e11b815260048101939093526001600160a01b039182166024840152604483015292965091169063aea0ed0e906064016040805180830381865afa15801561358e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135b29190614848565b60a088015190945090915083906135ca908690614aab565b6135d49190614aab565b915092959194509250565b6001600160a01b03861661362f57821561360a576101075461360a906001600160a01b031684613710565b811561361a5761361a8483613710565b801561362a5761362a8582613710565b6131df565b821561367e576040805160a0810190915261367e9080600081526000602082018190526001600160a01b03808b166040840152606083018290526080909201879052610107543092169061335b565b81156136c7576040805160a081019091526136c7908060008152602001600015158152602001886001600160a01b0316815260200160008152602001848152503086600061335b565b80156131df576040805160a081019091526131df908060008152602001600015158152602001886001600160a01b0316815260200160008152602001838152503087600061335b565b6001600160a01b038216613737576040516366385fa360e01b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613784576040519150601f19603f3d011682016040523d82523d6000602084013e613789565b606091505b505090508061221b5760405163af3f219560e01b815260040160405180910390fd5b600160c955565b610ec76132a8565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156137ed5761221b83613d82565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613847575060408051601f3d908101601f1916820190925261384491810190614755565b60015b6138aa5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610f64565b600080516020614b4383398151915281146139195760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610f64565b5061221b838383613e1e565b80606001516001600160a01b0316336001600160a01b03161461395b5760405163ea8e4eb560e01b815260040160405180910390fd5b428160c0015110156139805760405163269b6aab60e11b815260040160405180910390fd5b60018160200151600481111561399857613998614131565b14610ec7576040516301332be560e71b815260040160405180910390fd5b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038316613a37578034101561221b57604051632d617eaf60e21b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015613a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa29190614755565b6040516323b872dd60e01b81526001600160a01b03858116600483015230602483015260448201859052919250908516906323b872dd906064016020604051808303816000875af1158015613afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b1f9190614abe565b506040516370a0823160e01b815230600482015260009082906001600160a01b038716906370a0823190602401602060405180830381865afa158015613b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b8d9190614755565b613b979190614aab565b905082811015613bba57604051632d617eaf60e21b815260040160405180910390fd5b5050505050565b600054610100900460ff16613be85760405162461bcd60e51b8152600401610f6490614adb565b611a15613e43565b600054610100900460ff16611a155760405162461bcd60e51b8152600401610f6490614adb565b600054610100900460ff16613c3e5760405162461bcd60e51b8152600401610f6490614adb565b611a15613e73565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691613caa9190614b26565b6000604051808303816000865af19150503d8060008114613ce7576040519150601f19603f3d011682016040523d82523d6000602084013e613cec565b606091505b5091509150818015613d16575080511580613d16575080806020019051810190613d169190614abe565b6131df5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b6044820152606401610f64565b6000613d5282610a37565b15613d5f57506000610913565b6127106101085484613d719190614a1e565b613d7b9190614a35565b9392505050565b6001600160a01b0381163b613def5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610f64565b600080516020614b4383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b613e2783613e9a565b600082511180613e345750805b1561221b576113a18383613eda565b600054610100900460ff16613e6a5760405162461bcd60e51b8152600401610f6490614adb565b611a15336139b6565b600054610100900460ff166137ab5760405162461bcd60e51b8152600401610f6490614adb565b613ea381613d82565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060613d7b8383604051806060016040528060278152602001614b63602791396060600080856001600160a01b031685604051613f179190614b26565b600060405180830381855af49150503d8060008114613f52576040519150601f19603f3d011682016040523d82523d6000602084013e613f57565b606091505b5091509150613f6886838387613f72565b9695505050505050565b60608315613fe1578251600003613fda576001600160a01b0385163b613fda5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f64565b5081613feb565b613feb8383613ff3565b949350505050565b8151156140035781518083602001fd5b8060405162461bcd60e51b8152600401610f6491906140e5565b6040805161018081018252600060e082018181526101008301829052610120830182905261014083018290526101608301829052825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b6001600160a01b0381168114610ec757600080fd5b600080604083850312156140a857600080fd5b82356140b381614080565b946020939093013593505050565b60005b838110156140dc5781810151838201526020016140c4565b50506000910152565b60208152600082518060208401526141048160408501602087016140c1565b601f01601f19169190910160400192915050565b60006020828403121561412a57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b80516003811061415957614159614131565b82526020818101511515908301526040808201516001600160a01b03169083015260608082015190830152608090810151910152565b6005811061419f5761419f614131565b9052565b6000610160820190506141b7828451614147565b60208301516141c960a084018261418f565b506040830151151560c08381019190915260608401516001600160a01b0390811660e085015260808501511661010084015260a0840151610120840152909201516101409091015290565b60006020828403121561422657600080fd5b8135613d7b81614080565b8015158114610ec757600080fd5b60006020828403121561425157600080fd5b8135613d7b81614231565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561429b5761429b61425c565b604052919050565b600067ffffffffffffffff8211156142bd576142bd61425c565b5060051b60200190565b600060208083850312156142da57600080fd5b823567ffffffffffffffff8111156142f157600080fd5b8301601f8101851361430257600080fd5b8035614315614310826142a3565b614272565b81815260059190911b8201830190838101908783111561433457600080fd5b928401925b8284101561435257833582529284019290840190614339565b979650505050505050565b80356004811061436c57600080fd5b919050565b6000806000806080858703121561438757600080fd5b6143908561435d565b966020860135965060408601359560600135945092505050565b600080604083850312156143bd57600080fd5b82356143c881614080565b915060208381013567ffffffffffffffff808211156143e657600080fd5b818601915086601f8301126143fa57600080fd5b81358181111561440c5761440c61425c565b61441e601f8201601f19168501614272565b9150808252878482850101111561443457600080fd5b80848401858401376000848284010152508093505050509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561449d5781518051855286015161448c8786018261418f565b50928401929085019060010161446f565b5091979650505050505050565b80356003811061436c57600080fd5b600060a082840312156144cb57600080fd5b60405160a0810181811067ffffffffffffffff821117156144ee576144ee61425c565b6040529050806144fd836144aa565b8152602083013561450d81614231565b6020820152604083013561452081614080565b8060408301525060608301356060820152608083013560808201525092915050565b600082601f83011261455357600080fd5b81356020614563614310836142a3565b82815260a0928302850182019282820191908785111561458257600080fd5b8387015b858110156145a55761459889826144b9565b8452928401928101614586565b5090979650505050505050565b600080600080608085870312156145c857600080fd5b8435935060208501356145da81614080565b9250604085013567ffffffffffffffff808211156145f757600080fd5b61460388838901614542565b9350606087013591508082111561461957600080fd5b5061462687828801614542565b91505092959194509250565b60008060006060848603121561464757600080fd5b6146508461435d565b95602085013595506040909401359392505050565b6000806040838503121561467857600080fd5b6140b38361435d565b6000806040838503121561469457600080fd5b50508035926020909101359150565b6000806000606084860312156146b857600080fd5b83356146c381614080565b92506020840135915060408401356146da81614231565b809150509250925092565b60008060008060008086880361014081121561470057600080fd5b873596506147106020890161435d565b955060a0603f198201121561472457600080fd5b5060408701935060e087013561473981614080565b9598949750929561010081013594610120909101359350915050565b60006020828403121561476757600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b9485526001600160a01b0393909316602085015260408401919091526060830152608082015260a00190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000806040838503121561485b57600080fd5b825161486681614080565b6020939093015192949293505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561091357610913614876565b6000600182016148b1576148b1614876565b5060010190565b600081518084526020808501945080840160005b838110156148f2576148df878351614147565b60a09690960195908201906001016148cc565b509495945050505050565b84815283602082015260806040820152600061491c60808301856148b8565b828103606084015261435281856148b8565b600181815b8085111561496957816000190482111561494f5761494f614876565b8085161561495c57918102915b93841c9390800290614933565b509250929050565b60008261498057506001610913565b8161498d57506000610913565b81600181146149a357600281146149ad576149c9565b6001915050610913565b60ff8411156149be576149be614876565b50506001821b610913565b5060208310610133831016604e8410600b84101617156149ec575081810a610913565b6149f6838361492e565b8060001904821115614a0a57614a0a614876565b029392505050565b6000613d7b8383614971565b808202811582820484141761091357610913614876565b600082614a5257634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215614a6957600080fd5b613d7b826144aa565b600060208284031215614a8457600080fd5b8151613d7b81614080565b600060a08284031215614aa157600080fd5b613d7b83836144b9565b8181038181111561091357610913614876565b600060208284031215614ad057600080fd5b8151613d7b81614231565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251614b388184602087016140c1565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ecc53e891858ec51bdb0236e9394e9cfdf1e7a67ca44c479071581dc4177ae1e64736f6c63430008140033
Deployed Bytecode
0x6080604052600436106102935760003560e01c80636b1b77611161015a578063ad378c68116100c1578063df9380031161007a578063df9380031461081c578063e58e9ffc14610833578063ea44bfd414610877578063f078d8cf1461088d578063f209be41146108ad578063f2fde38b146108cd57600080fd5b8063ad378c6814610741578063b2ce817f14610761578063bf060c4c14610781578063c679f788146107c6578063d392bcb2146107e6578063d50f6bf0146107fc57600080fd5b80638129fc1c116101135780638129fc1c1461068e5780638705fcd4146106a35780638da5cb5b146106c3578063a1764595146106e1578063a312c09a14610701578063aa45e06c1461072157600080fd5b80636b1b7761146105e65780637029ebd814610613578063715018a61461063357806373dcfe9014610648578063744856dc14610668578063780602d81461067b57600080fd5b80633a9dce0b116101fe5780634f1ef286116101b75780634f1ef2861461054857806352d1902d1461055b57806355dc48d71461057057806356d8cbd0146105905780635b769f3c146105a6578063660cb4e8146105c657600080fd5b80633a9dce0b146104ad5780633c889e6f146104c45780633dceb4e4146104e45780633f09f1e91461050457806347cf408d1461051b5780634af12c311461053157600080fd5b80631a082f2b116102505780631a082f2b146103b95780631f262c1d146103fc5780632084fad61461040f578063307733c91461042f5780633659cfe61461044e578063376a06f41461046e57600080fd5b80630135f74014610298578063067707ee146102d657806306fdde0314610304578063107a274a1461033a578063122cfd9c1461036757806316c38b3c14610397575b600080fd5b3480156102a457600080fd5b50610107546102b9906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102e257600080fd5b506102f66102f1366004614095565b6108ed565b6040519081526020016102cd565b34801561031057600080fd5b5060408051808201825260078152661114dd1c99595d60ca1b602082015290516102cd91906140e5565b34801561034657600080fd5b5061035a610355366004614118565b610919565b6040516102cd91906141a3565b34801561037357600080fd5b50610387610382366004614214565b610a37565b60405190151581526020016102cd565b3480156103a357600080fd5b506103b76103b236600461423f565b610acc565b005b3480156103c557600080fd5b506102f66103d4366004614095565b6001600160a01b0391909116600090815260ff60209081526040808320938352929052205490565b6103b761040a3660046142c7565b610b3d565b34801561041b57600080fd5b506103b761042a366004614214565b610eca565b34801561043b57600080fd5b5061010b546001600160a01b03166102b9565b34801561045a57600080fd5b506103b7610469366004614214565b610f1c565b34801561047a57600080fd5b5061048e610489366004614214565b611001565b604080516001600160a01b0390931683526020830191909152016102cd565b3480156104b957600080fd5b506102f66101065481565b3480156104d057600080fd5b5061035a6104df366004614118565b61107c565b3480156104f057600080fd5b506103b76104ff366004614371565b6110bf565b34801561051057600080fd5b506102f66101085481565b34801561052757600080fd5b50610105546102f6565b34801561053d57600080fd5b506102f66101055481565b6103b76105563660046143aa565b6113a7565b34801561056757600080fd5b506102f6611477565b34801561057c57600080fd5b506103b761058b366004614118565b61152a565b34801561059c57600080fd5b50610108546102f6565b3480156105b257600080fd5b506103b76105c1366004614214565b611695565b3480156105d257600080fd5b506103b76105e1366004614118565b611710565b3480156105f257600080fd5b506106066106013660046142c7565b61186c565b6040516102cd9190614452565b34801561061f57600080fd5b5061048e61062e366004614095565b61197f565b34801561063f57600080fd5b506103b7611a03565b34801561065457600080fd5b506103b76106633660046145b2565b611a17565b6103b7610676366004614632565b611e14565b6103b7610689366004614118565b612220565b34801561069a57600080fd5b506103b7612659565b3480156106af57600080fd5b506103b76106be366004614214565b612779565b3480156106cf57600080fd5b506097546001600160a01b03166102b9565b3480156106ed57600080fd5b5060fb546102b9906001600160a01b031681565b34801561070d57600080fd5b5061010b54600160a01b900460ff16610387565b34801561072d57600080fd5b506103b761073c36600461423f565b6127cb565b34801561074d57600080fd5b506103b761075c366004614665565b6127f2565b34801561076d57600080fd5b506103b761077c366004614681565b612972565b34801561078d57600080fd5b506107a161079c3660046146a3565b6129a9565b604080516001600160a01b0390941684526020840192909252908201526060016102cd565b3480156107d257600080fd5b506103b76107e13660046146e5565b612abd565b3480156107f257600080fd5b50610106546102f6565b34801561080857600080fd5b506103b7610817366004614214565b6131e7565b34801561082857600080fd5b506102f66101045481565b34801561083f57600080fd5b506102f661084e366004614095565b6001600160a01b0391909116600090815261010160209081526040808320938352929052205490565b34801561088357600080fd5b5061010a546102f6565b34801561089957600080fd5b506103b76108a8366004614214565b6131f9565b3480156108b957600080fd5b506103b76108c8366004614118565b613224565b3480156108d957600080fd5b506103b76108e8366004614214565b613232565b6001600160a01b0382166000908152610100602090815260408083208484529091529020545b92915050565b61092161401d565b600082815260fc602052604090819020815161018081019092528054829060e08201908390829060ff16600281111561095c5761095c614131565b600281111561096d5761096d614131565b81528154610100810460ff9081161515602080850191909152620100009092046001600160a01b0316604084015260018401546060840152600290930154608090920191909152918352600384015492909101911660048111156109d3576109d3614131565b60048111156109e4576109e4614131565b8152600382015460ff610100820416151560208301526001600160a01b03620100009091048116604083015260048301541660608201526005820154608082015260069091015460a09091015292915050565b61010b54600090600160a01b900460ff1615610ac45761010b546040516370a0823160e01b81526001600160a01b03848116600483015260009216906370a0823190602401602060405180830381865afa158015610a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abd9190614755565b1192915050565b506000919050565b610ad46132a8565b61010b5460408051600160a81b90920460ff161515825282151560208301527f8e4c96298704d397e33cf1bf00cf8cfbaca8c3485eaa92b4acd8989b9e2c69e1910160405180910390a161010b8054911515600160a81b0260ff60a81b19909216919091179055565b61010b54600160a81b900460ff1615610b69576040516325c9dad560e21b815260040160405180910390fd5b610b71613302565b8051600003610b9357604051630241d61b60e11b815260040160405180910390fd5b3460005b8251811015610eab57600060fc6000858481518110610bb857610bb861476e565b602090810291909101810151825281019190915260400160002060048101546001820154600383015460068401549394506001600160a01b03928316939192620100009091041690421180610c2657506001600385015460ff166004811115610c2357610c23614131565b14155b80610c345750858460050154115b15610c485784600101945050505050610b97565b60038401805460ff191660029081179091556040805160a081019091528554610cda928791839160ff90911690811115610c8457610c84614131565b6002811115610c9557610c95614131565b81528154610100810460ff16151560208301526201000090046001600160a01b031660408201526001820154606082015260029091015460809091015282338561335b565b6040805161018081019091528454600091829182918291610df291908a90829060e08201908390829060ff166002811115610d1757610d17614131565b6002811115610d2857610d28614131565b81528154610100810460ff9081161515602080850191909152620100009092046001600160a01b031660408401526001840154606084015260029093015460809092019190915291835260038401549290910191166004811115610d8e57610d8e614131565b6004811115610d9f57610d9f614131565b8152600382015460ff610100820416151560208301526001600160a01b03620100009091048116604083015260048301541660608201526005820154608082015260069091015460a0909101528661350f565b9350935093509350610e088786838787876135df565b87600501548a039950886001019850846001600160a01b0316336001600160a01b03167f4ad78fb2d35296510367ef0a83bad900b5083884578c23c320bd698bc3eb16428d8c81518110610e5e57610e5e61476e565b60209081029190910101518b5460028d015460058e0154604051610e9694936201000090046001600160a01b0316928e929091614784565b60405180910390a35050505050505050610b97565b508015610ebc57610ebc3382613710565b50610ec7600160c955565b50565b610ed26132a8565b6001600160a01b038116610ef9576040516366385fa360e01b815260040160405180910390fd5b61010980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b037f0000000000000000000000009f57e6fc83c8d09c92deaa5feff24a77e3940b17163003610f6d5760405162461bcd60e51b8152600401610f64906147b0565b60405180910390fd5b7f0000000000000000000000009f57e6fc83c8d09c92deaa5feff24a77e3940b176001600160a01b0316610fb6600080516020614b43833981519152546001600160a01b031690565b6001600160a01b031614610fdc5760405162461bcd60e51b8152600401610f64906147fc565b610fe5816137b2565b60408051600080825260208201909252610ec7918391906137ba565b61010954604051630dda81bd60e21b81526001600160a01b038381166004830152600092839291169063376a06f4906024016040805180830381865afa15801561104f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110739190614848565b91509150915091565b61108461401d565b600082815260fd602052604090819020815161018081019092528054829060e08201908390829060ff16600281111561095c5761095c614131565b61010b54600160a81b900460ff16156110eb576040516325c9dad560e21b815260040160405180910390fd5b6110f3613302565b816000036111135760405162bfc92160e01b815260040160405180910390fd5b8060000361113457604051631da7447960e21b815260040160405180910390fd5b600084600381111561114857611148614131565b036112cb57600083815260fc602052604090819020815161018081019092528054909161126a918390829060e08201908390829060ff16600281111561119057611190614131565b60028111156111a1576111a1614131565b81528154610100810460ff9081161515602080850191909152620100009092046001600160a01b03166040840152600184015460608401526002909301546080909201919091529183526003840154929091019116600481111561120757611207614131565b600481111561121857611218614131565b8152600382015460ff610100820416151560208301526001600160a01b03620100009091048116604083015260048301541660608201526005820154608082015260069091015460a090910152613925565b6005810183905561127b824261488c565b600682018190556040805186815260208101869052908101919091527ff7adc9a0380a940c6058d78194df6a9b9fa5bb431bbad15194913bb611f3f4f7906060015b60405180910390a150611397565b60018460038111156112df576112df614131565b0361137e57600083815260fd6020526040908190208151610180810190925280549091611327918390829060e08201908390829060ff16600281111561119057611190614131565b60058101839055611338824261488c565b600682018190556040805186815260208101869052908101919091527f25ef1279507fe1cecb423f08cba90c8ce9428d0b8ecab7c3f1a38d8e21e0f3c7906060016112bd565b604051634a7f394f60e01b815260040160405180910390fd5b6113a1600160c955565b50505050565b6001600160a01b037f0000000000000000000000009f57e6fc83c8d09c92deaa5feff24a77e3940b171630036113ef5760405162461bcd60e51b8152600401610f64906147b0565b7f0000000000000000000000009f57e6fc83c8d09c92deaa5feff24a77e3940b176001600160a01b0316611438600080516020614b43833981519152546001600160a01b031690565b6001600160a01b03161461145e5760405162461bcd60e51b8152600401610f64906147fc565b611467826137b2565b611473828260016137ba565b5050565b6000306001600160a01b037f0000000000000000000000009f57e6fc83c8d09c92deaa5feff24a77e3940b1716146115175760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610f64565b50600080516020614b4383398151915290565b61010b54600160a81b900460ff1615611556576040516325c9dad560e21b815260040160405180910390fd5b61155e613302565b600081815260fe602052604090206005810154600160a81b900460ff166115985760405163c5723b5160e01b815260040160405180910390fd5b60058101546001600160a01b031633146115c55760405163ea8e4eb560e01b815260040160405180910390fd5b60016005820154600160a01b900460ff1660048111156115e7576115e7614131565b14611605576040516301332be560e71b815260040160405180910390fd5b428160030154101561162a5760405163269b6aab60e11b815260040160405180910390fd5b600581018054600160a21b60ff60a01b1982161790915560048201546040518481526001600160a01b0392831692909116907f6420f3bef768048be88d7611dd51eb1315eb97a0f77ea1e279fdee851ebceb31906020015b60405180910390a350610ec7600160c955565b61169d6132a8565b6001600160a01b0381166116c4576040516366385fa360e01b815260040160405180910390fd5b60fb546001600160a01b0316156116ee5760405163a741a04560e01b815260040160405180910390fd5b60fb80546001600160a01b0319166001600160a01b0392909216919091179055565b61010b54600160a81b900460ff161561173c576040516325c9dad560e21b815260040160405180910390fd5b611744613302565b600081815260fe602052604090206005810154600160a81b900460ff1661177e5760405163c5723b5160e01b815260040160405180910390fd5b60048101546001600160a01b031633146117ab5760405163ea8e4eb560e01b815260040160405180910390fd5b60036005820154600160a01b900460ff1660048111156117cd576117cd614131565b036117eb576040516354e3762560e01b815260040160405180910390fd5b42816003015410156118105760405163269b6aab60e11b815260040160405180910390fd5b600581018054600360a01b60ff60a01b1982161790915560048201546040518481526001600160a01b0392831692909116907ff4f60cc7b3c9800eca6bfce01abb4aedd0dd80a8a11fed6c0465c7d29e96590a90602001611682565b60606000825167ffffffffffffffff81111561188a5761188a61425c565b6040519080825280602002602001820160405280156118cf57816020015b60408051808201909152600080825260208201528152602001906001900390816118a85790505b50905060005b83518110156119785760405180604001604052808583815181106118fb576118fb61476e565b6020026020010151815260200160fc600087858151811061191e5761191e61476e565b60209081029190910181015182528101919091526040016000206003015460ff16600481111561195057611950614131565b8152508282815181106119655761196561476e565b60209081029190910101526001016118d5565b5092915050565b61010954604051630e053d7b60e31b81526001600160a01b038481166004830152602482018490526000928392911690637029ebd8906044016040805180830381865afa1580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f89190614848565b915091509250929050565b611a0b6132a8565b611a1560006139b6565b565b61010b54600160a81b900460ff1615611a43576040516325c9dad560e21b815260040160405180910390fd5b611a4b613302565b6001600160a01b038316611a72576040516366385fa360e01b815260040160405180910390fd5b600061010360008154611a849061489f565b9190508190559050600061010360008154611a9e9061489f565b9182905550845190915060005b81811015611b85576000848152610102602052604090208651879083908110611ad657611ad661476e565b60209081029190910181015182546001818101855560009485529290932081516003909402018054919390929091839160ff1990911690836002811115611b1f57611b1f614131565b02179055506020820151815460408401516001600160a01b0316620100000262010000600160b01b03199215156101000292909216610100600160b01b031990911617178155606082015160018083019190915560809092015160029091015501611aab565b50835160005b81811015611c65576000848152610102602052604090208651879083908110611bb657611bb661476e565b60209081029190910181015182546001818101855560009485529290932081516003909402018054919390929091839160ff1990911690836002811115611bff57611bff614131565b02179055506020820151815460408401516001600160a01b0316620100000262010000600160b01b03199215156101000292909216610100600160b01b031990911617178155606082015160018083019190915560809092015160029091015501611b8b565b506101048054906000611c778361489f565b919050555060405180610100016040528061010454815260200185815260200184815260200162093a8042611cac919061488c565b81523360208201526001600160a01b0389166040820152606001600181526001602091820181905261010454600090815260fe83526040908190208451815592840151918301919091558201516002820155606082015160038201556080820151600480830180546001600160a01b03199081166001600160a01b039485161790915560a085015160058501805492831691909416908117845560c086015193926001600160a81b03199092161790600160a01b908490811115611d7257611d72614131565b021790555060e0919091015160059091018054911515600160a81b0260ff60a81b1990921691909117905561010454336000818152610101602090815260408083208d845290915290819020839055516001600160a01b038a16927fba02e52c989f3e7a3dabdf4247f8563f1ece11b2537396ce03f15f424fb994c591611dfe918d918c908c906148fd565b60405180910390a3505050506113a1600160c955565b61010b54600160a81b900460ff1615611e40576040516325c9dad560e21b815260040160405180910390fd5b611e48613302565b600080808080808060028a6003811115611e6457611e64614131565b03611e9857600089815260fc6020526040902060038101549097506201000090046001600160a01b03169450339350611edc565b60038a6003811115611eac57611eac614131565b0361137e57600089815260fd6020526040902060038101549097503395506201000090046001600160a01b031693505b505050600484015460058501548554600287015460068801546001600160a01b03948516975092936201000090920490911691421115611f2f5760405163269b6aab60e11b815260040160405180910390fd5b6001600388015460ff166004811115611f4a57611f4a614131565b14611f68576040516301332be560e71b815260040160405180910390fd5b611f73868585613a08565b60038701805460ff191660029081179091556040805160a081019091528854612005928a91839160ff90911690811115611faf57611faf614131565b6002811115611fc057611fc0614131565b81528154610100810460ff16151560208301526201000090046001600160a01b031660408201526001820154606082015260029091015460809091015286868b61335b565b604080516101808101909152875460009182918291829161211d91908d90829060e08201908390829060ff16600281111561204257612042614131565b600281111561205357612053614131565b81528154610100810460ff9081161515602080850191909152620100009092046001600160a01b0316604084015260018401546060840152600290930154608090920191909152918352600384015492909101911660048111156120b9576120b9614131565b60048111156120ca576120ca614131565b8152600382015460ff610100820416151560208301526001600160a01b03620100009091048116604083015260048301541660608201526005820154608082015260069091015460a0909101528a61350f565b93509350935093506121338a8a838787876135df565b60028e600381111561214757612147614131565b036121ab57886001600160a01b0316886001600160a01b03167f4ad78fb2d35296510367ef0a83bad900b5083884578c23c320bd698bc3eb16428f898f600001600101548a8d60405161219e959493929190614784565b60405180910390a3612206565b876001600160a01b0316896001600160a01b03167f26605728c2f63a417ebb709344cc6cb5311233144b84020f3542e485d25688b38f898f600001600101548a8d6040516121fd959493929190614784565b60405180910390a35b505050505050505050505061221b600160c955565b505050565b61010b54600160a81b900460ff161561224c576040516325c9dad560e21b815260040160405180910390fd5b612254613302565b600081815260fe602052604090206005810154600160a81b900460ff1661228e5760405163c5723b5160e01b815260040160405180910390fd5b60048101546001600160a01b031633146122bb5760405163ea8e4eb560e01b815260040160405180910390fd5b60046005820154600160a01b900460ff1660048111156122dd576122dd614131565b146122fb5760405163c6687c8b60e01b815260040160405180910390fd5b42816003015410156123205760405163269b6aab60e11b815260040160405180910390fd5b60058101805460ff60a01b1916600160a11b17905561010a541580159061234d575061234b33610a37565b155b156123915761010a5434101561237657604051632d617eaf60e21b815260040160405180910390fd5b6101075461010a54612391916001600160a01b031690613710565b6000610102600083600101548152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561246b576000848152602090206040805160a08101909152600384029091018054829060ff16600281111561240657612406614131565b600281111561241757612417614131565b81528154610100810460ff161515602080840191909152620100009091046001600160a01b0316604083015260018084015460608401526002909301546080909201919091529183529290920191016123cb565b5050825192935060009150505b818110156124c6576124be8382815181106124955761249561476e565b6020908102919091010151600486015460058701546001600160a01b039182169116600061335b565b600101612478565b506000610102600085600201548152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156125a1576000848152602090206040805160a08101909152600384029091018054829060ff16600281111561253c5761253c614131565b600281111561254d5761254d614131565b81528154610100810460ff161515602080840191909152620100009091046001600160a01b031660408301526001808401546060840152600290930154608090920191909152918352929092019101612501565b5050825192935060009150505b818110156125fc576125f48382815181106125cb576125cb61476e565b6020908102919091010151600588015460048901546001600160a01b039182169116600061335b565b6001016125ae565b50600585015460048601546040518881526001600160a01b0392831692909116907fcd9417753f79ae81b7cb18b74a9b4ef4411bca4a6bec8546a6bdc832d01e85809060200160405180910390a35050505050610ec7600160c955565b600054610100900460ff16158080156126795750600054600160ff909116105b806126935750303b158015612693575060005460ff166001145b6126f65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610f64565b6000805460ff191660011790558015612719576000805461ff0019166101001790555b612721613bc1565b612729613bf0565b612731613c17565b8015610ec7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b6127816132a8565b6001600160a01b0381166127a8576040516366385fa360e01b815260040160405180910390fd5b61010780546001600160a01b0319166001600160a01b0392909216919091179055565b6127d36132a8565b61010b8054911515600160a01b0260ff60a01b19909216919091179055565b61010b54600160a81b900460ff161561281e576040516325c9dad560e21b815260040160405180910390fd5b612826613302565b600082600381111561283a5761283a614131565b036128cc57600081815260fc6020526040908190208151610180810190925280549091612882918390829060e08201908390829060ff16600281111561119057611190614131565b6003818101805460ff191690911790556040518281527f411aee90354c51b1b04cd563fcab2617142a9d50da19232d888547c8a1b7fd8a906020015b60405180910390a150612968565b60018260038111156128e0576128e0614131565b0361137e57600081815260fd6020526040908190208151610180810190925280549091612928918390829060e08201908390829060ff16600281111561119057611190614131565b6003818101805460ff191690911790556040518281527fc1546e394b1975212fe013e7e6995653585f44e568c407d1157483f7d4b94581906020016128be565b611473600160c955565b61297a6132a8565b61298581600a614a12565b61299783670de0b6b3a7640000614a1e565b6129a19190614a35565b61010a555050565b60008060008060008515612a2f5761010954604051630dda81bd60e21b81526001600160a01b038a811660048301529091169063376a06f4906024016040805180830381865afa158015612a01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a259190614848565b9092509050612aaa565b61010954604051630e053d7b60e31b81526001600160a01b038a81166004830152602482018a905290911690637029ebd8906044016040805180830381865afa158015612a80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa49190614848565b90925090505b6101085491989097509095509350505050565b61010b54600160a81b900460ff1615612ae9576040516325c9dad560e21b815260040160405180910390fd5b612af1613302565b81600003612b115760405162bfc92160e01b815260040160405180910390fd5b80600003612b3257604051631da7447960e21b815260040160405180910390fd5b6000856003811115612b4657612b46614131565b03612f4f576001612b5a6020860186614a57565b6002811115612b6b57612b6b614131565b148015612bfe575033612b846060860160408701614214565b6040516331a9108f60e11b8152606087013560048201526001600160a01b039190911690636352211e90602401602060405180830381865afa158015612bce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf29190614a72565b6001600160a01b031614155b15612c1c5760405163ea8e4eb560e01b815260040160405180910390fd5b6002612c2b6020860186614a57565b6002811115612c3c57612c3c614131565b148015612cca5750612c546060850160408601614214565b604051627eeac760e11b8152336004820152606086013560248201526001600160a01b03919091169062fdd58e906044016020604051808303816000875af1158015612ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cc89190614755565b155b15612ce85760405163ea8e4eb560e01b815260040160405180910390fd5b6101058054906000612cf98361489f565b9091555060009050612d0b824261488c565b90506040518060e0016040528086803603810190612d299190614a8f565b81526001602080830182905260408084018390523360608501526001600160a01b038916608085015260a0840188905260c090930185905261010554600090815260fc90915291909120825180518254929391928492839160ff191690836002811115612d9857612d98614131565b0217905550602082810151825460408501516001600160a01b0316620100000262010000600160b01b03199215156101000292909216610100600160b01b03199091161717825560608301516001808401919091556080909301516002909201919091558301516003830180549192909160ff191690836004811115612e2057612e20614131565b0217905550604082810151600383018054606080870151610100600160b01b03199092166101009415159490940262010000600160b01b03191693909317620100006001600160a01b03928316021790915560808501516004850180546001600160a01b0319169190921617905560a0840151600584015560c0909301516006909201919091556101055433600081815260ff60209081528482208d83529052839020829055927f678c2ff4d73a2ea7f46b804fa12a53bd6af0a11541348722fb9806441c2e7b3992612ef7918a01908a01614214565b604080519283526001600160a01b0391821660208401526060808b0135918401919091526080808b0135918401919091529088169082015260a0810186905260c0810184905260e0015b60405180910390a2506131d5565b6001856003811115612f6357612f63614131565b0361137e576101068054906000612f798361489f565b9091555060009050612f8b824261488c565b90506040518060e0016040528086803603810190612fa99190614a8f565b81526001602080830182905260408084018390523360608501526001600160a01b038916608085015260a0840188905260c090930185905261010654600090815260fd90915291909120825180518254929391928492839160ff19169083600281111561301857613018614131565b0217905550602082810151825460408501516001600160a01b0316620100000262010000600160b01b03199215156101000292909216610100600160b01b03199091161717825560608301516001808401919091556080909301516002909201919091558301516003830180549192909160ff1916908360048111156130a0576130a0614131565b0217905550604082810151600383018054606080870151610100600160b01b0319909216610100941515850262010000600160b01b03191617620100006001600160a01b03938416021790925560808601516004860180546001600160a01b0319169190921617905560a0850151600585015560c0909401516006909301929092556101065433600081815260209485528381208d82529094529282902081905591927ffdf6fdd614f71f6eeffac405d09ace624626543346de5d7398b9ee74dc3b67d29291613174918a01908a01614214565b606089013560808a013561318e60408c0160208d0161423f565b604080519586526001600160a01b039485166020870152850192909252606084015215156080830152871660a082015260c0810186905260e0810184905261010001612f41565b6131df600160c955565b505050505050565b6131ef6132a8565b610ec78147613710565b6132016132a8565b61010b80546001600160a01b0319166001600160a01b0392909216919091179055565b61322c6132a8565b61010855565b61323a6132a8565b6001600160a01b03811661329f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f64565b610ec7816139b6565b6097546001600160a01b03163314611a155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f64565b600260c954036133545760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f64565b600260c955565b60008451600281111561337057613370614131565b036133a25761339d8383866080015187604001516001600160a01b0316613c46909392919063ffffffff16565b6113a1565b6001845160028111156133b7576133b7614131565b0361344b57600084602001516133d15784606001516133d3565b815b6040808701519051632142170760e11b81526001600160a01b0387811660048301528681166024830152604482018490529293509116906342842e0e90606401600060405180830381600087803b15801561342d57600080fd5b505af1158015613441573d6000803e3d6000fd5b50505050506113a1565b60028451600281111561346057613460614131565b036113a1576000846020015161347a57846060015161347c565b815b60408087015160808801519151637921219560e11b81526001600160a01b038881166004830152878116602483015260448201859052606482019390935260a06084820152600060a4820152929350169063f242432a9060c401600060405180830381600087803b1580156134f057600080fd5b505af1158015613504573d6000803e3d6000fd5b505050505050505050565b6000806000806135238660a0015186613d47565b6101095460a088015188516040808201516060909201519051635750768760e11b815260048101939093526001600160a01b039182166024840152604483015292965091169063aea0ed0e906064016040805180830381865afa15801561358e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135b29190614848565b60a088015190945090915083906135ca908690614aab565b6135d49190614aab565b915092959194509250565b6001600160a01b03861661362f57821561360a576101075461360a906001600160a01b031684613710565b811561361a5761361a8483613710565b801561362a5761362a8582613710565b6131df565b821561367e576040805160a0810190915261367e9080600081526000602082018190526001600160a01b03808b166040840152606083018290526080909201879052610107543092169061335b565b81156136c7576040805160a081019091526136c7908060008152602001600015158152602001886001600160a01b0316815260200160008152602001848152503086600061335b565b80156131df576040805160a081019091526131df908060008152602001600015158152602001886001600160a01b0316815260200160008152602001838152503087600061335b565b6001600160a01b038216613737576040516366385fa360e01b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613784576040519150601f19603f3d011682016040523d82523d6000602084013e613789565b606091505b505090508061221b5760405163af3f219560e01b815260040160405180910390fd5b600160c955565b610ec76132a8565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156137ed5761221b83613d82565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613847575060408051601f3d908101601f1916820190925261384491810190614755565b60015b6138aa5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610f64565b600080516020614b4383398151915281146139195760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610f64565b5061221b838383613e1e565b80606001516001600160a01b0316336001600160a01b03161461395b5760405163ea8e4eb560e01b815260040160405180910390fd5b428160c0015110156139805760405163269b6aab60e11b815260040160405180910390fd5b60018160200151600481111561399857613998614131565b14610ec7576040516301332be560e71b815260040160405180910390fd5b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038316613a37578034101561221b57604051632d617eaf60e21b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015613a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa29190614755565b6040516323b872dd60e01b81526001600160a01b03858116600483015230602483015260448201859052919250908516906323b872dd906064016020604051808303816000875af1158015613afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b1f9190614abe565b506040516370a0823160e01b815230600482015260009082906001600160a01b038716906370a0823190602401602060405180830381865afa158015613b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b8d9190614755565b613b979190614aab565b905082811015613bba57604051632d617eaf60e21b815260040160405180910390fd5b5050505050565b600054610100900460ff16613be85760405162461bcd60e51b8152600401610f6490614adb565b611a15613e43565b600054610100900460ff16611a155760405162461bcd60e51b8152600401610f6490614adb565b600054610100900460ff16613c3e5760405162461bcd60e51b8152600401610f6490614adb565b611a15613e73565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691613caa9190614b26565b6000604051808303816000865af19150503d8060008114613ce7576040519150601f19603f3d011682016040523d82523d6000602084013e613cec565b606091505b5091509150818015613d16575080511580613d16575080806020019051810190613d169190614abe565b6131df5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b6044820152606401610f64565b6000613d5282610a37565b15613d5f57506000610913565b6127106101085484613d719190614a1e565b613d7b9190614a35565b9392505050565b6001600160a01b0381163b613def5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610f64565b600080516020614b4383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b613e2783613e9a565b600082511180613e345750805b1561221b576113a18383613eda565b600054610100900460ff16613e6a5760405162461bcd60e51b8152600401610f6490614adb565b611a15336139b6565b600054610100900460ff166137ab5760405162461bcd60e51b8152600401610f6490614adb565b613ea381613d82565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060613d7b8383604051806060016040528060278152602001614b63602791396060600080856001600160a01b031685604051613f179190614b26565b600060405180830381855af49150503d8060008114613f52576040519150601f19603f3d011682016040523d82523d6000602084013e613f57565b606091505b5091509150613f6886838387613f72565b9695505050505050565b60608315613fe1578251600003613fda576001600160a01b0385163b613fda5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f64565b5081613feb565b613feb8383613ff3565b949350505050565b8151156140035781518083602001fd5b8060405162461bcd60e51b8152600401610f6491906140e5565b6040805161018081018252600060e082018181526101008301829052610120830182905261014083018290526101608301829052825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b6001600160a01b0381168114610ec757600080fd5b600080604083850312156140a857600080fd5b82356140b381614080565b946020939093013593505050565b60005b838110156140dc5781810151838201526020016140c4565b50506000910152565b60208152600082518060208401526141048160408501602087016140c1565b601f01601f19169190910160400192915050565b60006020828403121561412a57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b80516003811061415957614159614131565b82526020818101511515908301526040808201516001600160a01b03169083015260608082015190830152608090810151910152565b6005811061419f5761419f614131565b9052565b6000610160820190506141b7828451614147565b60208301516141c960a084018261418f565b506040830151151560c08381019190915260608401516001600160a01b0390811660e085015260808501511661010084015260a0840151610120840152909201516101409091015290565b60006020828403121561422657600080fd5b8135613d7b81614080565b8015158114610ec757600080fd5b60006020828403121561425157600080fd5b8135613d7b81614231565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561429b5761429b61425c565b604052919050565b600067ffffffffffffffff8211156142bd576142bd61425c565b5060051b60200190565b600060208083850312156142da57600080fd5b823567ffffffffffffffff8111156142f157600080fd5b8301601f8101851361430257600080fd5b8035614315614310826142a3565b614272565b81815260059190911b8201830190838101908783111561433457600080fd5b928401925b8284101561435257833582529284019290840190614339565b979650505050505050565b80356004811061436c57600080fd5b919050565b6000806000806080858703121561438757600080fd5b6143908561435d565b966020860135965060408601359560600135945092505050565b600080604083850312156143bd57600080fd5b82356143c881614080565b915060208381013567ffffffffffffffff808211156143e657600080fd5b818601915086601f8301126143fa57600080fd5b81358181111561440c5761440c61425c565b61441e601f8201601f19168501614272565b9150808252878482850101111561443457600080fd5b80848401858401376000848284010152508093505050509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561449d5781518051855286015161448c8786018261418f565b50928401929085019060010161446f565b5091979650505050505050565b80356003811061436c57600080fd5b600060a082840312156144cb57600080fd5b60405160a0810181811067ffffffffffffffff821117156144ee576144ee61425c565b6040529050806144fd836144aa565b8152602083013561450d81614231565b6020820152604083013561452081614080565b8060408301525060608301356060820152608083013560808201525092915050565b600082601f83011261455357600080fd5b81356020614563614310836142a3565b82815260a0928302850182019282820191908785111561458257600080fd5b8387015b858110156145a55761459889826144b9565b8452928401928101614586565b5090979650505050505050565b600080600080608085870312156145c857600080fd5b8435935060208501356145da81614080565b9250604085013567ffffffffffffffff808211156145f757600080fd5b61460388838901614542565b9350606087013591508082111561461957600080fd5b5061462687828801614542565b91505092959194509250565b60008060006060848603121561464757600080fd5b6146508461435d565b95602085013595506040909401359392505050565b6000806040838503121561467857600080fd5b6140b38361435d565b6000806040838503121561469457600080fd5b50508035926020909101359150565b6000806000606084860312156146b857600080fd5b83356146c381614080565b92506020840135915060408401356146da81614231565b809150509250925092565b60008060008060008086880361014081121561470057600080fd5b873596506147106020890161435d565b955060a0603f198201121561472457600080fd5b5060408701935060e087013561473981614080565b9598949750929561010081013594610120909101359350915050565b60006020828403121561476757600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b9485526001600160a01b0393909316602085015260408401919091526060830152608082015260a00190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000806040838503121561485b57600080fd5b825161486681614080565b6020939093015192949293505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561091357610913614876565b6000600182016148b1576148b1614876565b5060010190565b600081518084526020808501945080840160005b838110156148f2576148df878351614147565b60a09690960195908201906001016148cc565b509495945050505050565b84815283602082015260806040820152600061491c60808301856148b8565b828103606084015261435281856148b8565b600181815b8085111561496957816000190482111561494f5761494f614876565b8085161561495c57918102915b93841c9390800290614933565b509250929050565b60008261498057506001610913565b8161498d57506000610913565b81600181146149a357600281146149ad576149c9565b6001915050610913565b60ff8411156149be576149be614876565b50506001821b610913565b5060208310610133831016604e8410600b84101617156149ec575081810a610913565b6149f6838361492e565b8060001904821115614a0a57614a0a614876565b029392505050565b6000613d7b8383614971565b808202811582820484141761091357610913614876565b600082614a5257634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215614a6957600080fd5b613d7b826144aa565b600060208284031215614a8457600080fd5b8151613d7b81614080565b600060a08284031215614aa157600080fd5b613d7b83836144b9565b8181038181111561091357610913614876565b600060208284031215614ad057600080fd5b8151613d7b81614231565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251614b388184602087016140c1565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ecc53e891858ec51bdb0236e9394e9cfdf1e7a67ca44c479071581dc4177ae1e64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.