Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 14383992 | 849 days ago | IN | Create: FraktalMarket | 0 ETH | 0.06038146 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
FraktalMarket
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./FraktalNFT.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/ClonesUpgradeable.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; // import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; contract FraktalMarket is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, ERC1155Holder { uint16 public fee; uint256 public listingFee; uint256 private feesAccrued; struct Proposal { uint256 value; bool winner; } struct Listing { address tokenAddress; uint256 price; uint256 numberOfShares; string name; } struct AuctionListing { address tokenAddress; uint256 reservePrice; uint256 numberOfShares; uint256 auctionEndTime; string name; } mapping(address => mapping(address => Listing)) listings; mapping(address => mapping(address => mapping(uint256 => AuctionListing))) public auctionListings; mapping(address => uint256) public auctionNonce; mapping(address => mapping(uint256 => uint256)) public auctionReserve; mapping(address => mapping(uint256 => bool)) public auctionSellerRedeemed; //use below mapping as like this: participantContribution[auctioneer][sellerNonce][participant] mapping(address => mapping(uint256 => mapping(address => uint256))) public participantContribution; mapping(address => mapping(address => Proposal)) public offers; mapping(address => uint256) public sellersBalance; mapping(address => uint256) public maxPriceRegistered; event Bought( address buyer, address seller, address tokenAddress, uint256 numberOfShares ); event FeeUpdated(uint16 newFee); event ListingFeeUpdated(uint256 newFee); event ItemListed( address owner, address tokenAddress, uint256 price, uint256 amountOfShares, string name ); event AuctionItemListed( address owner, address tokenAddress, uint256 reservePrice, uint256 amountOfShares, uint256 endTime, uint256 nonce, string name ); event AuctionContribute( address participant, address tokenAddress, address seller, uint256 sellerNonce, uint256 value ); event FraktalClaimed(address owner, address tokenAddress); event SellerPaymentPull(address seller, uint256 balance); event AdminWithdrawFees(uint256 feesAccrued); event OfferMade(address offerer, address tokenAddress, uint256 value); event OfferVoted(address voter, address offerer, address tokenAddress, bool sold); event Volume(address user, uint256 volume); function initialize() public initializer { __Ownable_init(); fee = 500; //5% } // Admin Functions ////////////////////////////////// function setFee(uint16 _newFee) external onlyOwner { require(_newFee >= 0); require(_newFee < 10000); fee = _newFee; emit FeeUpdated(_newFee); } function setListingFee(uint256 _newListingFee) external onlyOwner { require(_newListingFee >= 0); require(_newListingFee < 10000); listingFee = _newListingFee; emit ListingFeeUpdated(_newListingFee); } function withdrawAccruedFees() external onlyOwner nonReentrant returns (bool) { address payable wallet = payable(_msgSender()); uint256 bufferedFees = feesAccrued; feesAccrued = 0; AddressUpgradeable.sendValue(wallet, bufferedFees); emit AdminWithdrawFees(bufferedFees); return true; } // Users Functions ////////////////////////////////// function rescueEth() external nonReentrant { require(sellersBalance[_msgSender()] > 0, "No claimed ETH"); address payable seller = payable(_msgSender()); uint256 balance = sellersBalance[_msgSender()]; sellersBalance[_msgSender()] = 0; AddressUpgradeable.sendValue(seller, balance); emit SellerPaymentPull(_msgSender(), balance); } function redeemAuctionSeller( address _tokenAddress, address _seller, uint256 _sellerNonce ) external nonReentrant { require(_seller == _msgSender()); require(!auctionSellerRedeemed[_seller][_sellerNonce]);//is seller already claim? AuctionListing storage auctionListed = auctionListings[_tokenAddress][_msgSender()][_sellerNonce]; require(block.timestamp >= auctionListed.auctionEndTime);//is auction ended? uint256 _auctionReserve = auctionReserve[_seller][_sellerNonce]; //auction successful //give eth minus fee to seller if(_auctionReserve>=auctionListed.reservePrice){ uint256 totalForSeller = _auctionReserve - ((_auctionReserve * fee) / 10000); feesAccrued += _auctionReserve - totalForSeller; (bool sent,) = _msgSender().call{value: totalForSeller}(""); auctionSellerRedeemed[_seller][_sellerNonce] = true; emit Volume(_msgSender(),totalForSeller); require(sent);//check if ether failed to send } //auction failed else{ auctionSellerRedeemed[_seller][_sellerNonce] = true; FraktalNFT(_tokenAddress).safeTransferFrom( address(this), _msgSender(), FraktalNFT(_tokenAddress).fraktionsIndex(), auctionListed.numberOfShares, "" ); } } function redeemAuctionParticipant( address _tokenAddress, address _seller, uint256 _sellerNonce ) external nonReentrant { AuctionListing storage auctionListing = auctionListings[_tokenAddress][_seller][_sellerNonce]; require(block.timestamp >= auctionListing.auctionEndTime);//is auction ended? require(auctionListing.auctionEndTime>0);//is auction exist? uint256 _auctionReserve = auctionReserve[_seller][_sellerNonce]; uint256 fraktionsIndex = FraktalNFT(_tokenAddress).fraktionsIndex(); //auction successful //give participant fraktions according to their contribution if(_auctionReserve>=auctionListing.reservePrice){ uint256 auctionFraks = auctionListing.numberOfShares; uint256 _participantContribution = participantContribution[_seller][_sellerNonce][_msgSender()]; uint256 eligibleFrak = (_participantContribution * auctionFraks) / _auctionReserve; participantContribution[_seller][_sellerNonce][_msgSender()] = 0; emit Volume(_msgSender(),_participantContribution); FraktalNFT(_tokenAddress).safeTransferFrom( address(this), _msgSender(), fraktionsIndex, eligibleFrak, "" ); } //auction failed //give back contributed eth to participant else{ uint256 _contributed = participantContribution[_seller][_sellerNonce][_msgSender()]; participantContribution[_seller][_sellerNonce][_msgSender()] = 0; (bool sent,) = _msgSender().call{value: _contributed}(""); require(sent);//check if ether failed to send } } function importFraktal(address tokenAddress, uint256 fraktionsIndex) external { FraktalNFT(tokenAddress).safeTransferFrom( _msgSender(), address(this), 0, 1, "" ); FraktalNFT(tokenAddress).fraktionalize(_msgSender(), fraktionsIndex); FraktalNFT(tokenAddress).lockSharesTransfer( _msgSender(), 10000*10**18, address(this) ); FraktalNFT(tokenAddress).unlockSharesTransfer(_msgSender(), address(this)); } function buyFraktions( address from, address tokenAddress, uint256 _numberOfShares ) external payable nonReentrant { Listing storage listing = listings[tokenAddress][from]; require(!FraktalNFT(tokenAddress).sold(), "item sold"); require( listing.numberOfShares >= _numberOfShares );//"Not enough Fraktions on sale" uint256 buyPrice = (listing.price * _numberOfShares)/(10**18); require(buyPrice!=0); uint256 totalFees = (buyPrice * fee) / 10000; uint256 totalForSeller = buyPrice - totalFees; uint256 fraktionsIndex = FraktalNFT(tokenAddress).fraktionsIndex(); require(msg.value >= buyPrice);//"FraktalMarket: insufficient funds" listing.numberOfShares = listing.numberOfShares - _numberOfShares; if (listing.price * 10000 > maxPriceRegistered[tokenAddress]) { maxPriceRegistered[tokenAddress] = listing.price * 10000; } feesAccrued += msg.value - totalForSeller; sellersBalance[from] += totalForSeller; FraktalNFT(tokenAddress).safeTransferFrom( from, _msgSender(), fraktionsIndex, _numberOfShares, "" ); emit Bought(_msgSender(), from, tokenAddress, _numberOfShares); emit Volume(_msgSender(),msg.value); emit Volume(from,msg.value); } function participateAuction( address tokenAddress, address seller, uint256 sellerNonce ) external payable nonReentrant { AuctionListing storage auctionListing = auctionListings[tokenAddress][seller][sellerNonce]; require(block.timestamp < auctionListing.auctionEndTime);//is auction still ongoing? require(auctionListing.auctionEndTime>0);//is auction exist? uint256 contribution = msg.value; require(contribution>0);//need eth to participate //note of Eth contribution to auction reserve and participant auctionReserve[seller][sellerNonce] += msg.value; participantContribution[seller][sellerNonce][_msgSender()] += contribution; emit AuctionContribute(_msgSender(), tokenAddress, seller, sellerNonce, contribution); } function listItem( address _tokenAddress, uint256 _price,//wei per frak uint256 _numberOfShares, string memory _name ) payable external returns (bool) { require(msg.value >= listingFee); require(_price>0); uint256 fraktionsIndex = FraktalNFT(_tokenAddress).fraktionsIndex(); require( FraktalNFT(_tokenAddress).balanceOf(address(this), 0) == 1 );// "nft not in market" require(!FraktalNFT(_tokenAddress).sold());//"item sold" require( FraktalNFT(_tokenAddress).balanceOf(_msgSender(), fraktionsIndex) >= _numberOfShares );//"no valid Fraktions" Listing memory listed = listings[_tokenAddress][_msgSender()]; require(listed.numberOfShares == 0);//"unlist first" Listing memory listing = Listing({ tokenAddress: _tokenAddress, price: _price, numberOfShares: _numberOfShares, name: _name }); listings[_tokenAddress][_msgSender()] = listing; emit ItemListed(_msgSender(), _tokenAddress, _price, _numberOfShares, _name); return true; } function listItemAuction( address _tokenAddress, uint256 _reservePrice, uint256 _numberOfShares, string memory _name ) payable external returns (uint256) { require(msg.value >= listingFee); uint256 fraktionsIndex = FraktalNFT(_tokenAddress).fraktionsIndex(); require( FraktalNFT(_tokenAddress).balanceOf(address(this), 0) == 1 );//"nft not in market" require(!FraktalNFT(_tokenAddress).sold());// "item sold" require( FraktalNFT(_tokenAddress).balanceOf(_msgSender(), fraktionsIndex) >= _numberOfShares );//"no valid Fraktions" require(_reservePrice>0); uint256 sellerNonce = auctionNonce[_msgSender()]++; uint256 _endTime = block.timestamp + (10 days); auctionListings[_tokenAddress][_msgSender()][sellerNonce] = AuctionListing({ tokenAddress: _tokenAddress, reservePrice: _reservePrice, numberOfShares: _numberOfShares, auctionEndTime: _endTime, name: _name }); FraktalNFT(_tokenAddress).safeTransferFrom( _msgSender(), address(this), fraktionsIndex, _numberOfShares, "" ); emit AuctionItemListed(_msgSender(), _tokenAddress, _reservePrice, _numberOfShares, _endTime, sellerNonce, _name); return auctionNonce[_msgSender()]; } function exportFraktal(address tokenAddress) public { uint256 fraktionsIndex = FraktalNFT(tokenAddress).fraktionsIndex(); FraktalNFT(tokenAddress).safeTransferFrom(_msgSender(), address(this), fraktionsIndex, 10000*10**18, ''); FraktalNFT(tokenAddress).defraktionalize(); FraktalNFT(tokenAddress).safeTransferFrom(address(this), _msgSender(), 0, 1, ''); } function makeOffer(address tokenAddress, uint256 _value) public payable { require(msg.value >= _value);//"No pay" Proposal storage prop = offers[_msgSender()][tokenAddress]; address payable offerer = payable(_msgSender()); require(!prop.winner);// "offer accepted" if (_value >= prop.value) { require(_value >= maxPriceRegistered[tokenAddress], "Min offer"); require(msg.value >= _value - prop.value); } else { uint256 bufferedValue = prop.value; prop.value = 0; AddressUpgradeable.sendValue(offerer, bufferedValue); } offers[_msgSender()][tokenAddress] = Proposal({ value: _value, winner: false }); emit OfferMade(_msgSender(), tokenAddress, _value); } function rejectOffer(address from, address to, address tokenAddress) external { FraktalNFT(tokenAddress).unlockSharesTransfer( from, to ); } function voteOffer(address offerer, address tokenAddress) external { uint256 fraktionsIndex = FraktalNFT(tokenAddress).fraktionsIndex(); Proposal storage offer = offers[offerer][tokenAddress]; uint256 lockedShares = FraktalNFT(tokenAddress).lockedShares(fraktionsIndex,_msgSender()); uint256 votesAvailable = FraktalNFT(tokenAddress).balanceOf( _msgSender(), fraktionsIndex ) - lockedShares; FraktalNFT(tokenAddress).lockSharesTransfer( _msgSender(), votesAvailable, offerer ); uint256 lockedToOfferer = FraktalNFT(tokenAddress).lockedToTotal(fraktionsIndex,offerer); bool sold = false; if (lockedToOfferer > FraktalNFT(tokenAddress).majority()) { FraktalNFT(tokenAddress).sellItem(); offer.winner = true; sold = true; } emit OfferVoted(_msgSender(), offerer, tokenAddress, sold); } function claimFraktal(address tokenAddress) external { uint256 fraktionsIndex = FraktalNFT(tokenAddress).fraktionsIndex(); if (FraktalNFT(tokenAddress).sold()) { Proposal memory offer = offers[_msgSender()][tokenAddress]; require( FraktalNFT(tokenAddress).lockedToTotal(fraktionsIndex,_msgSender()) > FraktalNFT(tokenAddress).majority(), "not buyer" ); FraktalNFT(tokenAddress).createRevenuePayment{ value: offer.value }(address(this)); maxPriceRegistered[tokenAddress] = 0; } FraktalNFT(tokenAddress).safeTransferFrom( address(this), _msgSender(), 0, 1, "" ); emit FraktalClaimed(_msgSender(), tokenAddress); } function unlistItem(address tokenAddress) external { delete listings[tokenAddress][_msgSender()]; emit ItemListed(_msgSender(), tokenAddress, 0, 0, ""); } function unlistAuctionItem(address tokenAddress,uint256 sellerNonce) external { AuctionListing storage auctionListed = auctionListings[tokenAddress][_msgSender()][sellerNonce]; require(auctionListed.auctionEndTime>0); auctionListed.auctionEndTime = block.timestamp; emit AuctionItemListed(_msgSender(), tokenAddress, 0, 0, auctionListed.auctionEndTime,sellerNonce, ""); } // GETTERS ////////////////////////////////// function getFee() external view returns (uint256) { return (fee); } function getListingPrice(address _listOwner, address tokenAddress) external view returns (uint256) { return listings[tokenAddress][_listOwner].price; } function getListingAmount(address _listOwner, address tokenAddress) external view returns (uint256) { return listings[tokenAddress][_listOwner].numberOfShares; } function getSellerBalance(address _who) external view returns (uint256) { return (sellersBalance[_who]); } function getOffer(address offerer, address tokenAddress) external view returns (uint256) { return (offers[offerer][tokenAddress].value); } fallback() external payable { feesAccrued += msg.value; } receive() external payable { feesAccrued += msg.value; } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/proxy/ClonesUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "./PaymentSplitterUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; contract FraktalNFT is ERC1155Upgradeable,ERC721HolderUpgradeable,ERC1155HolderUpgradeable{ using EnumerableSet for EnumerableSet.AddressSet; using EnumerableMap for EnumerableMap.UintToAddressMap; address revenueChannelImplementation; bool fraktionalized; bool public sold; uint256 public fraktionsIndex; uint16 public majority; mapping(uint256 => bool) public indexUsed; mapping(uint256 => mapping(address => uint256)) public lockedShares; mapping(uint256 => mapping(address => uint256)) public lockedToTotal; EnumerableSet.AddressSet private holders; EnumerableMap.UintToAddressMap private revenues; string public name = "FraktalNFT"; string public symbol = "FRAK"; address public factory; address collateral; event LockedSharesForTransfer( address shareOwner, address to, uint256 numShares ); event unLockedSharesForTransfer( address shareOwner, address to, uint256 numShares ); event ItemSold(address buyer, uint256 indexUsed); event NewRevenueAdded( address payer, address revenueChannel, uint256 amount, bool sold ); event Fraktionalized(address holder, address minter, uint256 index); event Defraktionalized(address holder, uint256 index); event MajorityValueChanged(uint16 newValue); // constructor() initializer {} function init( address _creator, address _revenueChannelImplementation, string calldata uri, uint16 _majority, string memory _name, string memory _symbol ) external initializer { __ERC1155_init(uri); _mint(_creator, 0, 1, ""); fraktionalized = false; sold = false; majority = _majority; revenueChannelImplementation = _revenueChannelImplementation; holders.add(_creator); if(keccak256(abi.encodePacked(_name)) != keccak256(abi.encodePacked("")) && keccak256(abi.encodePacked(_symbol)) != keccak256(abi.encodePacked("")) ){ name = _name; symbol = _symbol; } factory = msg.sender;//factory as msg.sender } // User Functions /////////////////////////// function fraktionalize(address _to, uint256 _tokenId) external { require((_tokenId != 0) && (this.balanceOf(_msgSender(), 0) == 1) && !fraktionalized && (indexUsed[_tokenId] == false) ); // require(this.balanceOf(_msgSender(), 0) == 1); // require(fraktionalized == false); // require(indexUsed[_tokenId] == false); fraktionalized = true; sold = false; fraktionsIndex = _tokenId; _mint(_to, _tokenId, 10000*10**18, ""); emit Fraktionalized(_msgSender(), _to, _tokenId); } function defraktionalize() external { fraktionalized = false; _burn(_msgSender(), fraktionsIndex, 10000*10**18); emit Defraktionalized(_msgSender(), fraktionsIndex); } function setMajority(uint16 newValue) external { require((this.balanceOf(_msgSender(), 0) == 1)&& (newValue <= 10000*10**18) ); // require(newValue <= 10000*10**18); // require(newValue > 0); majority = newValue; emit MajorityValueChanged(newValue); } function soldBurn( address owner, uint256 _tokenId, uint256 bal ) external { if (_msgSender() != owner) { require(isApprovedForAll(owner, _msgSender())); } _burn(owner, _tokenId, bal); } function lockSharesTransfer( address from, uint256 numShares, address _to ) external { if (from != _msgSender()) { require(isApprovedForAll(from, _msgSender())); } require( balanceOf(from, fraktionsIndex) - lockedShares[fraktionsIndex][from] >= numShares ); lockedShares[fraktionsIndex][from] += numShares; lockedToTotal[fraktionsIndex][_to] += numShares; emit LockedSharesForTransfer(from, _to, numShares); } function unlockSharesTransfer(address from, address _to) external { require(!sold); if (from != _msgSender()) { require(isApprovedForAll(from, _msgSender())); } uint256 balance = lockedShares[fraktionsIndex][from]; lockedShares[fraktionsIndex][from] -= balance; lockedToTotal[fraktionsIndex][_to] -= balance; emit unLockedSharesForTransfer(from, _to, 0); } function createRevenuePayment(address _marketAddress) external payable returns (address _clone) { cleanUpHolders(); address[] memory owners = holders.values(); uint256 listLength = holders.length(); uint256[] memory fraktions = new uint256[](listLength); for (uint256 i = 0; i < listLength; i++) { fraktions[i] = this.balanceOf(owners[i], fraktionsIndex); } _clone = ClonesUpgradeable.clone(revenueChannelImplementation); address payable revenueContract = payable(_clone); PaymentSplitterUpgradeable(revenueContract).init(owners, fraktions, _marketAddress); uint256 bufferedValue = msg.value; AddressUpgradeable.sendValue(revenueContract, bufferedValue); uint256 index = revenues.length(); revenues.set(index, _clone); emit NewRevenueAdded(_msgSender(), revenueContract, msg.value, sold); } function sellItem() external payable { require(this.balanceOf(_msgSender(), 0) == 1); sold = true; fraktionalized = false; indexUsed[fraktionsIndex] = true; emit ItemSold(_msgSender(), fraktionsIndex); } function cleanUpHolders() internal { uint16 cur = 0; while(cur < holders.length()){ if (this.balanceOf(holders.at(cur), fraktionsIndex) < 1) { holders.remove(holders.at(cur)); cur=0; } cur++; } } // Overrided functions //////////////////////////////// function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory tokenId, uint256[] memory amount, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, tokenId, amount, data); if (from != address(0) && to != address(0)) { if (tokenId[0] == 0) { if (fraktionalized == true && sold == false) { require((lockedToTotal[fraktionsIndex][to] > 9999)); } } else { require(sold != true); require( (balanceOf(from, tokenId[0]) - lockedShares[fraktionsIndex][from] >= amount[0]) ); } holders.add(to); } } // Getters /////////////////////////// // function getRevenue(uint256 index) external view returns (address) { // return revenues.get(index); // } // function getFraktions(address who) external view returns (uint256) { // return this.balanceOf(who, fraktionsIndex); // } // function getLockedShares(uint256 index, address who) // external // view // returns (uint256) // { // return lockedShares[index][who]; // } // function getLockedToTotal(uint256 index, address who) // external // view // returns (uint256) // { // return lockedToTotal[index][who]; // } /** *@notice transfer contained ERC721 to the Fraktal owner with given address and index *@param contractAddress address of ERC721 contained *@param index index of the ERC721 */ //todo: Should block if collateral is being claimed function claimContainedERC721(address contractAddress, uint256 index) external{ if(msg.sender != factory){ require(contractAddress != collateral); } require((this.balanceOf(msg.sender, 0) == 1) && !fraktionalized && (IERC721(contractAddress).ownerOf(index) == address(this))); // require(fraktionalized==false); // require(IERC721(contractAddress).ownerOf(index) == address(this)); IERC721(contractAddress).safeTransferFrom(address(this), msg.sender, index); } /** *@notice transfer contained ERC1155 to the Fraktal owner with given address and index *@param contractAddress address of ERC1155 contained *@param index index of the ERC1155 */ //todo: Should block if collateral is being claimed function claimContainedERC1155(address contractAddress, uint256 index, uint256 amount) external{ if(msg.sender != factory){ require(contractAddress != collateral); } require((this.balanceOf(msg.sender, 0) == 1) && !fraktionalized); IERC1155(contractAddress).safeTransferFrom(address(this), msg.sender, index, amount,""); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155Upgradeable, ERC1155ReceiverUpgradeable) returns (bool) { return ERC1155Upgradeable.supportsInterface(interfaceId) || ERC1155ReceiverUpgradeable.supportsInterface(interfaceId); } function setCollateral(address _collateral ) external{ require(msg.sender == factory); collateral = _collateral; } // function getStatus() external view returns (bool) { // return sold; // } // function getFraktionsIndex() external view returns (uint256) { // return fraktionsIndex; // } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "./extensions/IERC1155MetadataURIUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using AddressUpgradeable for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155Upgradeable).interfaceId || interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } uint256[47] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol) pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library ClonesUpgradeable { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, ptr, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create2(0, ptr, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000) mstore(add(ptr, 0x38), shl(0x60, deployer)) mstore(add(ptr, 0x4c), salt) mstore(add(ptr, 0x6c), keccak256(ptr, 0x37)) predicted := keccak256(add(ptr, 0x37), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC1155Receiver.sol"; /** * @dev _Available since v3.1._ */ contract ERC1155Holder is ERC1155Receiver { function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library 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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; 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 a proxied contract can't have 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. * * 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 initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IFraktalNFT.sol"; import "./FraktalNFT.sol"; import "./FraktalMarket.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. */ contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; address tokenParent; uint256 fraktionsIndex; bool public buyout; address marketContract; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ function init(address[] memory payees, uint256[] memory shares_, address _marketContract) external initializer { __PaymentSplitter_init(payees, shares_); tokenParent = _msgSender(); fraktionsIndex = FraktalNFT(_msgSender()).fraktionsIndex(); buyout = FraktalNFT(_msgSender()).sold(); marketContract = _marketContract; } function __PaymentSplitter_init( address[] memory payees, uint256[] memory shares_ ) internal { __Context_init_unchained(); __PaymentSplitter_init_unchained(payees, shares_); } function __PaymentSplitter_init_unchained( address[] memory payees, uint256[] memory shares_ ) internal { require( payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch" ); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() external view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() external view returns (uint256) { return _totalReleased; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) external view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) external view returns (uint256) { return _released[account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) external view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release() external virtual { address payable operator = payable(_msgSender()); require(_shares[operator] > 0, "PaymentSplitter: account has no shares"); if (buyout) { // uint256 bal = IFraktalNFT(tokenParent).getFraktions(_msgSender()); uint256 bal = FraktalNFT(tokenParent).balanceOf(_msgSender(),FraktalNFT(tokenParent).fraktionsIndex()); IFraktalNFT(tokenParent).soldBurn(_msgSender(), fraktionsIndex, bal); } uint256 totalReceived = address(this).balance + _totalReleased; uint256 payment = (totalReceived * _shares[operator]) / _totalShares - _released[operator]; require(payment != 0, "PaymentSplitter: operator is not due payment"); _released[operator] = _released[operator] + payment; _totalReleased = _totalReleased + payment; address payable marketPayable = payable(marketContract); uint16 marketFee = FraktalMarket(marketPayable).fee(); uint256 forMarket = (payment * marketFee )/ 10000; uint256 forOperator = payment - forMarket; AddressUpgradeable.sendValue(operator, forOperator); AddressUpgradeable.sendValue(marketPayable, forMarket); emit PaymentReleased(operator, payment); } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require( account != address(0), "PaymentSplitter: account is the zero address" ); require(shares_ > 0, "PaymentSplitter: shares are 0"); require( _shares[account] == 0, "PaymentSplitter: account already has shares" ); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } uint256[45] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./EnumerableSet.sol"; /** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are * supported. */ library EnumerableMap { using EnumerableSet for EnumerableSet.Bytes32Set; // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct Map { // Storage of keys EnumerableSet.Bytes32Set _keys; mapping(bytes32 => bytes32) _values; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function _set( Map storage map, bytes32 key, bytes32 value ) private returns (bool) { map._values[key] = value; return map._keys.add(key); } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function _remove(Map storage map, bytes32 key) private returns (bool) { delete map._values[key]; return map._keys.remove(key); } /** * @dev Returns true if the key is in the map. O(1). */ function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._keys.contains(key); } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function _length(Map storage map) private view returns (uint256) { return map._keys.length(); } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { bytes32 key = map._keys.at(index); return (key, map._values[key]); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { bytes32 value = map._values[key]; if (value == bytes32(0)) { return (_contains(map, key), bytes32(0)); } else { return (true, value); } } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function _get(Map storage map, bytes32 key) private view returns (bytes32) { bytes32 value = map._values[key]; require(value != 0 || _contains(map, key), "EnumerableMap: nonexistent key"); return value; } /** * @dev Same as {_get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {_tryGet}. */ function _get( Map storage map, bytes32 key, string memory errorMessage ) private view returns (bytes32) { bytes32 value = map._values[key]; require(value != 0 || _contains(map, key), errorMessage); return value; } // UintToAddressMap struct UintToAddressMap { Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set( UintToAddressMap storage map, uint256 key, address value ) internal returns (bool) { return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return _remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return _contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return _length(map._inner); } /** * @dev Returns the element stored at position `index` in the set. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = _at(map._inner, index); return (uint256(key), address(uint160(uint256(value)))); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. * * _Available since v3.4._ */ function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key)); return (success, address(uint160(uint256(value)))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint160(uint256(_get(map._inner, bytes32(key))))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get( UintToAddressMap storage map, uint256 key, string memory errorMessage ) internal view returns (address) { return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage)))); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Holder.sol) pragma solidity ^0.8.0; import "./ERC1155ReceiverUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev _Available since v3.1._ */ contract ERC1155HolderUpgradeable is Initializable, ERC1155ReceiverUpgradeable { function __ERC1155Holder_init() internal onlyInitializing { __ERC165_init_unchained(); __ERC1155Receiver_init_unchained(); __ERC1155Holder_init_unchained(); } function __ERC1155Holder_init_unchained() internal onlyInitializing { } function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721ReceiverUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721HolderUpgradeable is Initializable, IERC721ReceiverUpgradeable { function __ERC721Holder_init() internal onlyInitializing { __ERC721Holder_init_unchained(); } function __ERC721Holder_init_unchained() internal onlyInitializing { } /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// 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 { __Context_init_unchained(); } 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; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IFraktalNFT { function fraktionalize(address _to, uint _tokenId) external; function setMajority(uint16 newValue) external; function defraktionalize() external; function soldBurn(address owner, uint256 _tokenId, uint256 bal) external; function lockSharesTransfer(address from, uint numShares, address _to) external; function unlockSharesTransfer(address from, address _to) external; function createRevenuePayment() external returns (address _clone); function sellItem() external; function cleanUpHolders() external; function getRevenue(uint256 index) external view returns(address); function getFraktions(address who) external view returns(uint); function getLockedShares(uint256 index, address who) external view returns(uint); function getLockedToTotal(uint256 index, address who) external view returns(uint); function getStatus() external view returns (bool); function getFraktionsIndex() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) pragma solidity ^0.8.0; import "../IERC1155ReceiverUpgradeable.sol"; import "../../../utils/introspection/ERC165Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev _Available since v3.1._ */ abstract contract ERC1155ReceiverUpgradeable is Initializable, ERC165Upgradeable, IERC1155ReceiverUpgradeable { function __ERC1155Receiver_init() internal onlyInitializing { __ERC165_init_unchained(); __ERC1155Receiver_init_unchained(); } function __ERC1155Receiver_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC1155Receiver.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feesAccrued","type":"uint256"}],"name":"AdminWithdrawFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"participant","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"sellerNonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"AuctionContribute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"reservePrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOfShares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"AuctionItemListed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"numberOfShares","type":"uint256"}],"name":"Bought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"newFee","type":"uint16"}],"name":"FeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"}],"name":"FraktalClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOfShares","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"ItemListed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"ListingFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"offerer","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"OfferMade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"address","name":"offerer","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"bool","name":"sold","type":"bool"}],"name":"OfferVoted","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":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"SellerPaymentPull","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"volume","type":"uint256"}],"name":"Volume","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctionListings","outputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"reservePrice","type":"uint256"},{"internalType":"uint256","name":"numberOfShares","type":"uint256"},{"internalType":"uint256","name":"auctionEndTime","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"auctionNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctionReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctionSellerRedeemed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"_numberOfShares","type":"uint256"}],"name":"buyFraktions","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"claimFraktal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"exportFraktal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_listOwner","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getListingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_listOwner","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getListingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getOffer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_who","type":"address"}],"name":"getSellerBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"fraktionsIndex","type":"uint256"}],"name":"importFraktal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_numberOfShares","type":"uint256"},{"internalType":"string","name":"_name","type":"string"}],"name":"listItem","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_reservePrice","type":"uint256"},{"internalType":"uint256","name":"_numberOfShares","type":"uint256"},{"internalType":"string","name":"_name","type":"string"}],"name":"listItemAuction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"listingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"makeOffer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxPriceRegistered","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"offers","outputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bool","name":"winner","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"participantContribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"sellerNonce","type":"uint256"}],"name":"participateAuction","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_seller","type":"address"},{"internalType":"uint256","name":"_sellerNonce","type":"uint256"}],"name":"redeemAuctionParticipant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_seller","type":"address"},{"internalType":"uint256","name":"_sellerNonce","type":"uint256"}],"name":"redeemAuctionSeller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"rejectOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"sellersBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_newFee","type":"uint16"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newListingFee","type":"uint256"}],"name":"setListingFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"sellerNonce","type":"uint256"}],"name":"unlistAuctionItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"unlistItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"voteOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAccruedFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50613eea806100206000396000f3fe6080604052600436106102bf5760003560e01c8063967b82cf1161016e578063ced72f87116100cb578063e8fe92861161007f578063f2fde38b11610064578063f2fde38b146108ff578063fa0e1d1c1461091f578063ff45a3cb1461093f576102dd565b8063e8fe9286146108a7578063f23a6e61146108ba576102dd565b8063d75f6002116100b0578063d75f600214610821578063ddca3f4314610859578063e1fb455b14610887576102dd565b8063ced72f87146107e8578063d2bee02e14610801576102dd565b8063aeaf646b11610122578063bc197c8111610107578063bc197c8114610748578063c9c61cc9146107a6578063ce31a06b146107d3576102dd565b8063aeaf646b14610715578063b2a4706e14610735576102dd565b8063a2d8e90a11610153578063a2d8e90a1461067c578063a4b48828146106ba578063ada82c7d14610700576102dd565b8063967b82cf14610605578063a25700a21461065c576102dd565b8063715018a61161021c57806386275a83116101d05780638da5cb5b116101b55780638da5cb5b146105825780638e005553146105aa57806392066b68146105ca576102dd565b806386275a83146105355780638b38f3d214610555576102dd565b80637a641528116102015780637a641528146104ed5780637f8681e31461050d5780638129fc1c14610520576102dd565b8063715018a61461048e57806373758fef146104a3576102dd565b8063415e2841116102735780635095709e116102585780635095709e146104385780636a1b7ecc1461044b57806370df84b414610461576102dd565b8063415e2841146103f45780634e9ceecb14610407576102dd565b8063131dbd09116102a4578063131dbd09146103465780632148893f146103665780633af3eff1146103aa576102dd565b806301ffc9a7146102ef578063077c841314610324576102dd565b366102dd5734609960008282546102d69190613d9f565b9091555050005b34609960008282546102d69190613d9f565b3480156102fb57600080fd5b5061030f61030a366004613bcb565b61095f565b60405190151581526020015b60405180910390f35b34801561033057600080fd5b5061034461033f3660046138cb565b6109c8565b005b34801561035257600080fd5b50610344610361366004613c2b565b610dd7565b34801561037257600080fd5b5061039c6103813660046138cb565b6001600160a01b0316600090815260a1602052604090205490565b60405190815260200161031b565b3480156103b657600080fd5b5061039c6103c5366004613903565b6001600160a01b038082166000908152609a602090815260408083209386168352929052206002015492915050565b610344610402366004613a2f565b610e7b565b34801561041357600080fd5b50610427610422366004613a2f565b6112f7565b60405161031b959493929190613d3a565b61030f610446366004613b37565b6113cb565b34801561045757600080fd5b5061039c60985481565b34801561046d57600080fd5b5061039c61047c3660046138cb565b609c6020526000908152604090205481565b34801561049a57600080fd5b506103446117d1565b3480156104af57600080fd5b5061039c6104be366004613903565b6001600160a01b038082166000908152609a602090815260408083209386168352929052206001015492915050565b3480156104f957600080fd5b50610344610508366004613ad6565b611837565b61039c61051b366004613b37565b611a37565b34801561052c57600080fd5b50610344611e2f565b34801561054157600080fd5b506103446105503660046138cb565b611f0e565b34801561056157600080fd5b5061039c6105703660046138cb565b60a16020526000908152604090205481565b34801561058e57600080fd5b506033546040516001600160a01b03909116815260200161031b565b3480156105b657600080fd5b506103446105c5366004613bf3565b6120d0565b3480156105d657600080fd5b5061030f6105e5366004613ad6565b609e60209081526000928352604080842090915290825290205460ff1681565b34801561061157600080fd5b50610647610620366004613903565b60a06020908152600092835260408084209091529082529020805460019091015460ff1682565b6040805192835290151560208301520161031b565b34801561066857600080fd5b50610344610677366004613903565b612180565b34801561068857600080fd5b5061039c610697366004613b01565b609f60209081526000938452604080852082529284528284209052825290205481565b3480156106c657600080fd5b5061039c6106d5366004613903565b6001600160a01b03918216600090815260a06020908152604080832093909416825291909152205490565b34801561070c57600080fd5b5061030f612595565b34801561072157600080fd5b50610344610730366004613a2f565b6126a0565b610344610743366004613ad6565b612a05565b34801561075457600080fd5b5061078d610763366004613985565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b6040516001600160e01b0319909116815260200161031b565b3480156107b257600080fd5b5061039c6107c13660046138cb565b60a26020526000908152604090205481565b3480156107df57600080fd5b50610344612b7a565b3480156107f457600080fd5b5060975461ffff1661039c565b34801561080d57600080fd5b5061034461081c36600461393b565b612c98565b34801561082d57600080fd5b5061039c61083c366004613ad6565b609d60209081526000928352604080842090915290825290205481565b34801561086557600080fd5b506097546108749061ffff1681565b60405161ffff909116815260200161031b565b34801561089357600080fd5b506103446108a2366004613ad6565b612d19565b6103446108b5366004613a2f565b612dce565b3480156108c657600080fd5b5061078d6108d5366004613a6f565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b34801561090b57600080fd5b5061034461091a3660046138cb565b612f5a565b34801561092b57600080fd5b5061034461093a3660046138cb565b613039565b34801561094b57600080fd5b5061034461095a366004613a2f565b6130f9565b60006001600160e01b031982167f4e2312e00000000000000000000000000000000000000000000000000000000014806109c257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6000816001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0357600080fd5b505afa158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190613c43565b9050816001600160a01b03166302c7e7af6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7657600080fd5b505afa158015610a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aae9190613bab565b15610d0a5733600090815260a0602090815260408083206001600160a01b03861680855290835292819020815180830183528154815260019091015460ff1615158184015281517fb6e54bdf000000000000000000000000000000000000000000000000000000008152915190939263b6e54bdf9260048082019391829003018186803b158015610b3e57600080fd5b505afa158015610b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b769190613c0f565b61ffff166001600160a01b03841663eeb0a4af84336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b158015610bd057600080fd5b505afa158015610be4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c089190613c43565b11610c5a5760405162461bcd60e51b815260206004820152600960248201527f6e6f74206275796572000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b80516040517f347e6f210000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0385169163347e6f21916024016020604051808303818588803b158015610cb557600080fd5b505af1158015610cc9573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cee91906138e7565b50506001600160a01b038216600090815260a260205260408120555b60408051637921219560e11b81523060048201523360248201526000604482018190526001606483015260a0608483015260a4820181905291516001600160a01b0385169263f242432a9260c4808201939182900301818387803b158015610d7157600080fd5b505af1158015610d85573d6000803e3d6000fd5b505050507fb73e3428dd7e5858fa36c55a8bdaba9c60cd953ae72c4d2dc48eeaa1e224d52a610db13390565b604080516001600160a01b03928316815291851660208301520160405180910390a15050565b6033546001600160a01b03163314610e315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b6127108110610e3f57600080fd5b60988190556040518181527f5fb4654f1efe30c6141eaa6855ffcb27e0b361d899b05e21b1a4d0b3e71e14db906020015b60405180910390a150565b60026065541415610ece5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b60026065556001600160a01b038083166000818152609a6020908152604080832094881683529381529083902083517f02c7e7af000000000000000000000000000000000000000000000000000000008152935190936302c7e7af926004808301939192829003018186803b158015610f4657600080fd5b505afa158015610f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7e9190613bab565b15610fcb5760405162461bcd60e51b815260206004820152600960248201527f6974656d20736f6c6400000000000000000000000000000000000000000000006044820152606401610c51565b8181600201541015610fdc57600080fd5b6000670de0b6b3a7640000838360010154610ff79190613dd7565b6110019190613db7565b90508061100d57600080fd5b609754600090612710906110259061ffff1684613dd7565b61102f9190613db7565b9050600061103d8284613df6565b90506000866001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b15801561107a57600080fd5b505afa15801561108e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b29190613c43565b9050833410156110c157600080fd5b8585600201546110d19190613df6565b60028601556001600160a01b038716600090815260a26020526040902054600186015461110090612710613dd7565b111561113157600185015461111790612710613dd7565b6001600160a01b038816600090815260a260205260409020555b61113b8234613df6565b6099600082825461114c9190613d9f565b90915550506001600160a01b038816600090815260a1602052604081208054849290611179908490613d9f565b90915550506001600160a01b03871663f242432a89336040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604481018490526064810189905260a06084820152600060a482015260c401600060405180830381600087803b1580156111f357600080fd5b505af1158015611207573d6000803e3d6000fd5b505050507ffa945eefd5c2ddf8beb4fb7e15e2b5f2f295ba939c584a8a849e199aa767860c6112333390565b604080516001600160a01b039283168152828c166020820152918a16908201526060810188905260800160405180910390a17f0677ea0223468afb4510a24ad47598c50e8442e976f82103b9207dd5b043877333604080516001600160a01b0390921682523460208301520160405180910390a1604080516001600160a01b038a1681523460208201527f0677ea0223468afb4510a24ad47598c50e8442e976f82103b9207dd5b0438773910160405180910390a150506001606555505050505050565b609b602090815260009384526040808520825292845282842090528252902080546001820154600283015460038401546004850180546001600160a01b039095169593949293919261134890613e0d565b80601f016020809104026020016040519081016040528092919081815260200182805461137490613e0d565b80156113c15780601f10611396576101008083540402835291602001916113c1565b820191906000526020600020905b8154815290600101906020018083116113a457829003601f168201915b5050505050905085565b60006098543410156113dc57600080fd5b600084116113e957600080fd5b6000856001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145c9190613c43565b604051627eeac760e11b8152306004820152600060248201529091506001600160a01b0387169062fdd58e9060440160206040518083038186803b1580156114a357600080fd5b505afa1580156114b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114db9190613c43565b6001146114e757600080fd5b856001600160a01b03166302c7e7af6040518163ffffffff1660e01b815260040160206040518083038186803b15801561152057600080fd5b505afa158015611534573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115589190613bab565b1561156257600080fd5b836001600160a01b03871662fdd58e336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b1580156115b857600080fd5b505afa1580156115cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f09190613c43565b10156115fb57600080fd5b6001600160a01b038681166000908152609a60209081526040808320338452825280832081516080810183528154909516855260018101549285019290925260028201549084015260038101805492939260608401919061165b90613e0d565b80601f016020809104026020016040519081016040528092919081815260200182805461168790613e0d565b80156116d45780601f106116a9576101008083540402835291602001916116d4565b820191906000526020600020905b8154815290600101906020018083116116b757829003601f168201915b505050505081525050905080604001516000146116f057600080fd5b604080516080810182526001600160a01b0389811680835260208084018b81528486018b8152606086018b81526000948552609a84528785203386528452969093208551815473ffffffffffffffffffffffffffffffffffffffff1916951694909417845551600184015590516002830155925180519293849361177a92600385019201906136fb565b509050507fa24d7f57961a475163f4ded9857498db096cdedf2e504991e3abc49ba85800a36117a63390565b898989896040516117bb959493929190613ca6565b60405180910390a1506001979650505050505050565b6033546001600160a01b0316331461182b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b6118356000613424565b565b6001600160a01b03821663f242432a336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201523060248201526000604482018190526001606483015260a0608483015260a482015260c401600060405180830381600087803b1580156118aa57600080fd5b505af11580156118be573d6000803e3d6000fd5b50505050816001600160a01b0316638b4ae68c6118d83390565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561192057600080fd5b505af1158015611934573d6000803e3d6000fd5b50505050816001600160a01b031663811ce76061194e3390565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015269021e19e0c9bab24000006024820152306044820152606401600060405180830381600087803b1580156119a557600080fd5b505af11580156119b9573d6000803e3d6000fd5b50505050816001600160a01b031663066f39bf6119d33390565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201523060248201526044015b600060405180830381600087803b158015611a1b57600080fd5b505af1158015611a2f573d6000803e3d6000fd5b505050505050565b6000609854341015611a4857600080fd5b6000856001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b158015611a8357600080fd5b505afa158015611a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abb9190613c43565b604051627eeac760e11b8152306004820152600060248201529091506001600160a01b0387169062fdd58e9060440160206040518083038186803b158015611b0257600080fd5b505afa158015611b16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3a9190613c43565b600114611b4657600080fd5b856001600160a01b03166302c7e7af6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7f57600080fd5b505afa158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb79190613bab565b15611bc157600080fd5b836001600160a01b03871662fdd58e336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b158015611c1757600080fd5b505afa158015611c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4f9190613c43565b1015611c5a57600080fd5b60008511611c6757600080fd5b336000908152609c6020526040812080549082611c8383613e48565b9091555090506000611c9842620d2f00613d9f565b6040805160a0810182526001600160a01b038b811680835260208084018d81528486018d815260608601888152608087018e81526000958652609b855288862033875285528886208c87528552979094208651815473ffffffffffffffffffffffffffffffffffffffff1916961695909517855590516001850155516002840155905160038301559251805194955091939092611d3c9260048501929101906136fb565b5050506001600160a01b03881663f242432a336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018690526064810189905260a06084820152600060a482015260c401600060405180830381600087803b158015611db257600080fd5b505af1158015611dc6573d6000803e3d6000fd5b505050507f1902e667061966e4e6e014ed89d2fd582bfd81cc0ab01609a7f5761067a46617611df23390565b89898985878b604051611e0b9796959493929190613ce9565b60405180910390a15050336000908152609c60205260409020549695505050505050565b600054610100900460ff16611e4a5760005460ff1615611e4e565b303b155b611ec05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c51565b600054610100900460ff16158015611ee2576000805461ffff19166101011790555b611eea613483565b6097805461ffff19166101f41790558015611f0b576000805461ff00191690555b50565b6000816001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4957600080fd5b505afa158015611f5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f819190613c43565b90506001600160a01b03821663f242432a336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201523060248201526044810184905269021e19e0c9bab2400000606482015260a06084820152600060a482015260c401600060405180830381600087803b158015611fff57600080fd5b505af1158015612013573d6000803e3d6000fd5b50505050816001600160a01b0316639f37c5dc6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561205257600080fd5b505af1158015612066573d6000803e3d6000fd5b50505050816001600160a01b031663f242432a306120813390565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526000604482018190526001606483015260a0608483015260a482015260c401611a01565b6033546001600160a01b0316331461212a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b6127108161ffff161061213c57600080fd5b6097805461ffff191661ffff83169081179091556040519081527fc8fcf8ee1425e7e60b8af83735e1eb516d5b9ef05bfd6eece552ebaeb7c75b4890602001610e70565b6000816001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b1580156121bb57600080fd5b505afa1580156121cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f39190613c43565b6001600160a01b03848116600090815260a0602090815260408083209387168084529390915281209293509063acb1e95284336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b15801561226b57600080fd5b505afa15801561227f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a39190613c43565b90506000816001600160a01b03861662fdd58e336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810188905260440160206040518083038186803b1580156122fd57600080fd5b505afa158015612311573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123359190613c43565b61233f9190613df6565b90506001600160a01b03851663811ce760336040516001600160e01b031960e084901b1681526001600160a01b039182166004820152602481018590529089166044820152606401600060405180830381600087803b1580156123a157600080fd5b505af11580156123b5573d6000803e3d6000fd5b50506040517feeb0a4af000000000000000000000000000000000000000000000000000000008152600481018790526001600160a01b038981166024830152600093508816915063eeb0a4af9060440160206040518083038186803b15801561241d57600080fd5b505afa158015612431573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124559190613c43565b90506000866001600160a01b031663b6e54bdf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561249257600080fd5b505afa1580156124a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ca9190613c0f565b61ffff1682111561253a57866001600160a01b031663fd0c060d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561251057600080fd5b505af1158015612524573d6000803e3d6000fd5b505050506001858101805460ff19168217905590505b604080513381526001600160a01b038a81166020830152891681830152821515606082015290517f3822dc6e5715e20a82ae701ef02d9f5d60b50a2e9c7e36bacd4bf4f31bd93e2f9181900360800190a15050505050505050565b6033546000906001600160a01b031633146125f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b600260655414156126455760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b6002606555609980546000909155339061265f82826134fe565b6040518181527f47044c5eb61cda68097ee96190b2eb1ef7ae3ef989d4b2491baffd8f7799f8639060200160405180910390a1600192505050600160655590565b600260655414156126f35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b60026065556001600160a01b038216331461270d57600080fd5b6001600160a01b0382166000908152609e6020908152604080832084845290915290205460ff161561273e57600080fd5b6001600160a01b0383166000908152609b6020908152604080832033845282528083208484529091529020600381015442101561277a57600080fd5b6001600160a01b0383166000908152609d60209081526040808320858452909152902054600182015481106128ca57609754600090612710906127c19061ffff1684613dd7565b6127cb9190613db7565b6127d59083613df6565b90506127e18183613df6565b609960008282546127f29190613d9f565b9091555050604051600090339083908381818185875af1925050503d8060008114612839576040519150601f19603f3d011682016040523d82523d6000602084013e61283e565b606091505b50506001600160a01b0387166000908152609e602090815260408083208984529091529020805460ff1916600117905590507f0677ea0223468afb4510a24ad47598c50e8442e976f82103b9207dd5b04387736128983390565b604080516001600160a01b039092168252602082018590520160405180910390a1806128c357600080fd5b50506129f9565b6001600160a01b038085166000908152609e602090815260408083208784529091529020805460ff19166001179055851663f242432a306129083390565b886001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b15801561294157600080fd5b505afa158015612955573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129799190613c43565b60028701546040516001600160e01b031960e087901b1681526001600160a01b0394851660048201529390921660248401526044830152606482015260a06084820152600060a482015260c401600060405180830381600087803b1580156129e057600080fd5b505af11580156129f4573d6000803e3d6000fd5b505050505b50506001606555505050565b80341015612a1257600080fd5b33600081815260a0602090815260408083206001600160a01b03871684529091529020600181015490919060ff1615612a4a57600080fd5b81548310612ad7576001600160a01b038416600090815260a26020526040902054831015612aba5760405162461bcd60e51b815260206004820152600960248201527f4d696e206f6666657200000000000000000000000000000000000000000000006044820152606401610c51565b8154612ac69084613df6565b341015612ad257600080fd5b612ae9565b815460008355612ae782826134fe565b505b604080518082018252848152600060208083018281523380845260a083528584206001600160a01b038b16808652908452938690209451855590516001909401805460ff191694151594909417909355835192835282015280820185905290517fba7256c19ec578f17e4fb0a5c7728cbb7ec23e09e6fb1fa84fae19a46d9e7f2a916060908290030190a150505050565b60026065541415612bcd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b600260655533600090815260a16020526040902054612c2e5760405162461bcd60e51b815260206004820152600e60248201527f4e6f20636c61696d6564204554480000000000000000000000000000000000006044820152606401610c51565b33600081815260a1602052604081208054919055612c4c82826134fe565b7f4a9428d8b62f07c6d93da0a20fa45c49487489d49fb929783ae3771d9cf65cbf33604080516001600160a01b039092168252602082018490520160405180910390a150506001606555565b6040517f066f39bf0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152838116602483015282169063066f39bf90604401600060405180830381600087803b158015612cfc57600080fd5b505af1158015612d10573d6000803e3d6000fd5b50505050505050565b6001600160a01b0382166000908152609b60209081526040808320338452825280832084845290915290206003810154612d5257600080fd5b4260038201819055604080513381526001600160a01b0386166020820152600081830181905260608201819052608082019390935260a0810185905260e060c08201819052810192909252517f1902e667061966e4e6e014ed89d2fd582bfd81cc0ab01609a7f5761067a46617918190036101000190a1505050565b60026065541415612e215760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b60026065556001600160a01b038084166000908152609b60209081526040808320938616835292815282822084835290522060038101544210612e6357600080fd5b6000816003015411612e7457600080fd5b3480612e7f57600080fd5b6001600160a01b0384166000908152609d6020908152604080832086845290915281208054349290612eb2908490613d9f565b90915550506001600160a01b0384166000908152609f60209081526040808320868452825280832033845290915281208054839290612ef2908490613d9f565b9091555050604080513381526001600160a01b038781166020830152861681830152606081018590526080810183905290517fcfb7fe28b7c46ec03659c5d6b9f1fa70b0bfe94559ea3b3abb9f99e591def6b99181900360a00190a150506001606555505050565b6033546001600160a01b03163314612fb45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b6001600160a01b0381166130305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c51565b611f0b81613424565b6001600160a01b0381166000908152609a602090815260408083203384529091528120805473ffffffffffffffffffffffffffffffffffffffff19168155600181018290556002810182905590613093600383018261377f565b50507fa24d7f57961a475163f4ded9857498db096cdedf2e504991e3abc49ba85800a36130bd3390565b604080516001600160a01b039283168152918416602083015260009082018190526060820181905260a06080830181905282015260c001610e70565b6002606554141561314c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b60026065556001600160a01b038084166000908152609b602090815260408083209386168352928152828220848352905220600381015442101561318f57600080fd5b60008160030154116131a057600080fd5b6001600160a01b038084166000908152609d6020908152604080832086845282528083205481517f68e98409000000000000000000000000000000000000000000000000000000008152915190948916926368e984099260048082019391829003018186803b15801561321257600080fd5b505afa158015613226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324a9190613c43565b90508260010154821061338f5760028301546001600160a01b0386166000908152609f60209081526040808320888452825280832033845290915281205490846132948484613dd7565b61329e9190613db7565b6001600160a01b0389166000908152609f602090815260408083208b845282528083203380855290835281842093909355805192835290820185905280519293507f0677ea0223468afb4510a24ad47598c50e8442e976f82103b9207dd5b043877392918290030190a160408051637921219560e11b8152306004820152336024820152604481018690526064810183905260a06084820152600060a4820181905291516001600160a01b038c169263f242432a9260c4808201939182900301818387803b15801561336f57600080fd5b505af1158015613383573d6000803e3d6000fd5b50505050505050613417565b6001600160a01b0385166000908152609f60209081526040808320878452825280832033808552925280832080549084905590519092919083908381818185875af1925050503d8060008114613401576040519150601f19603f3d011682016040523d82523d6000602084013e613406565b606091505b505090508061341457600080fd5b50505b5050600160655550505050565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166134ee5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c51565b6134f661361c565b611835613687565b8047101561354e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610c51565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461359b576040519150601f19603f3d011682016040523d82523d6000602084013e6135a0565b606091505b50509050806136175760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610c51565b505050565b600054610100900460ff166118355760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c51565b600054610100900460ff166136f25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c51565b61183533613424565b82805461370790613e0d565b90600052602060002090601f016020900481019282613729576000855561376f565b82601f1061374257805160ff191683800117855561376f565b8280016001018555821561376f579182015b8281111561376f578251825591602001919060010190613754565b5061377b9291506137b5565b5090565b50805461378b90613e0d565b6000825580601f1061379b575050565b601f016020900490600052602060002090810190611f0b91905b5b8082111561377b57600081556001016137b6565b600067ffffffffffffffff8311156137e4576137e4613e79565b6137f7601f8401601f1916602001613d6e565b905082815283838301111561380b57600080fd5b828260208301376000602084830101529392505050565b600082601f830112613832578081fd5b8135602067ffffffffffffffff82111561384e5761384e613e79565b8160051b61385d828201613d6e565b838152828101908684018388018501891015613877578687fd5b8693505b8584101561389957803583526001939093019291840191840161387b565b50979650505050505050565b600082601f8301126138b5578081fd5b6138c4838335602085016137ca565b9392505050565b6000602082840312156138dc578081fd5b81356138c481613e8f565b6000602082840312156138f8578081fd5b81516138c481613e8f565b60008060408385031215613915578081fd5b823561392081613e8f565b9150602083013561393081613e8f565b809150509250929050565b60008060006060848603121561394f578081fd5b833561395a81613e8f565b9250602084013561396a81613e8f565b9150604084013561397a81613e8f565b809150509250925092565b600080600080600060a0868803121561399c578081fd5b85356139a781613e8f565b945060208601356139b781613e8f565b9350604086013567ffffffffffffffff808211156139d3578283fd5b6139df89838a01613822565b945060608801359150808211156139f4578283fd5b613a0089838a01613822565b93506080880135915080821115613a15578283fd5b50613a22888289016138a5565b9150509295509295909350565b600080600060608486031215613a43578283fd5b8335613a4e81613e8f565b92506020840135613a5e81613e8f565b929592945050506040919091013590565b600080600080600060a08688031215613a86578081fd5b8535613a9181613e8f565b94506020860135613aa181613e8f565b93506040860135925060608601359150608086013567ffffffffffffffff811115613aca578182fd5b613a22888289016138a5565b60008060408385031215613ae8578182fd5b8235613af381613e8f565b946020939093013593505050565b600080600060608486031215613b15578081fd5b8335613b2081613e8f565b925060208401359150604084013561397a81613e8f565b60008060008060808587031215613b4c578182fd5b8435613b5781613e8f565b93506020850135925060408501359150606085013567ffffffffffffffff811115613b80578182fd5b8501601f81018713613b90578182fd5b613b9f878235602084016137ca565b91505092959194509250565b600060208284031215613bbc578081fd5b815180151581146138c4578182fd5b600060208284031215613bdc578081fd5b81356001600160e01b0319811681146138c4578182fd5b600060208284031215613c04578081fd5b81356138c481613ea4565b600060208284031215613c20578081fd5b81516138c481613ea4565b600060208284031215613c3c578081fd5b5035919050565b600060208284031215613c54578081fd5b5051919050565b60008151808452815b81811015613c8057602081850181015186830182015201613c64565b81811115613c915782602083870101525b50601f01601f19169290920160200192915050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152613cde60a0830184613c5b565b979650505050505050565b60006001600160a01b03808a1683528089166020840152508660408301528560608301528460808301528360a083015260e060c0830152613d2d60e0830184613c5b565b9998505050505050505050565b6001600160a01b038616815284602082015283604082015282606082015260a060808201526000613cde60a0830184613c5b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613d9757613d97613e79565b604052919050565b60008219821115613db257613db2613e63565b500190565b600082613dd257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613df157613df1613e63565b500290565b600082821015613e0857613e08613e63565b500390565b600181811c90821680613e2157607f821691505b60208210811415613e4257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613e5c57613e5c613e63565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611f0b57600080fd5b61ffff81168114611f0b57600080fdfea2646970667358221220851aa4db55b7864c65e30b1e51dac97b5a543b053ad99e3da4270d6fcf066d1364736f6c63430008040033
Deployed Bytecode
0x6080604052600436106102bf5760003560e01c8063967b82cf1161016e578063ced72f87116100cb578063e8fe92861161007f578063f2fde38b11610064578063f2fde38b146108ff578063fa0e1d1c1461091f578063ff45a3cb1461093f576102dd565b8063e8fe9286146108a7578063f23a6e61146108ba576102dd565b8063d75f6002116100b0578063d75f600214610821578063ddca3f4314610859578063e1fb455b14610887576102dd565b8063ced72f87146107e8578063d2bee02e14610801576102dd565b8063aeaf646b11610122578063bc197c8111610107578063bc197c8114610748578063c9c61cc9146107a6578063ce31a06b146107d3576102dd565b8063aeaf646b14610715578063b2a4706e14610735576102dd565b8063a2d8e90a11610153578063a2d8e90a1461067c578063a4b48828146106ba578063ada82c7d14610700576102dd565b8063967b82cf14610605578063a25700a21461065c576102dd565b8063715018a61161021c57806386275a83116101d05780638da5cb5b116101b55780638da5cb5b146105825780638e005553146105aa57806392066b68146105ca576102dd565b806386275a83146105355780638b38f3d214610555576102dd565b80637a641528116102015780637a641528146104ed5780637f8681e31461050d5780638129fc1c14610520576102dd565b8063715018a61461048e57806373758fef146104a3576102dd565b8063415e2841116102735780635095709e116102585780635095709e146104385780636a1b7ecc1461044b57806370df84b414610461576102dd565b8063415e2841146103f45780634e9ceecb14610407576102dd565b8063131dbd09116102a4578063131dbd09146103465780632148893f146103665780633af3eff1146103aa576102dd565b806301ffc9a7146102ef578063077c841314610324576102dd565b366102dd5734609960008282546102d69190613d9f565b9091555050005b34609960008282546102d69190613d9f565b3480156102fb57600080fd5b5061030f61030a366004613bcb565b61095f565b60405190151581526020015b60405180910390f35b34801561033057600080fd5b5061034461033f3660046138cb565b6109c8565b005b34801561035257600080fd5b50610344610361366004613c2b565b610dd7565b34801561037257600080fd5b5061039c6103813660046138cb565b6001600160a01b0316600090815260a1602052604090205490565b60405190815260200161031b565b3480156103b657600080fd5b5061039c6103c5366004613903565b6001600160a01b038082166000908152609a602090815260408083209386168352929052206002015492915050565b610344610402366004613a2f565b610e7b565b34801561041357600080fd5b50610427610422366004613a2f565b6112f7565b60405161031b959493929190613d3a565b61030f610446366004613b37565b6113cb565b34801561045757600080fd5b5061039c60985481565b34801561046d57600080fd5b5061039c61047c3660046138cb565b609c6020526000908152604090205481565b34801561049a57600080fd5b506103446117d1565b3480156104af57600080fd5b5061039c6104be366004613903565b6001600160a01b038082166000908152609a602090815260408083209386168352929052206001015492915050565b3480156104f957600080fd5b50610344610508366004613ad6565b611837565b61039c61051b366004613b37565b611a37565b34801561052c57600080fd5b50610344611e2f565b34801561054157600080fd5b506103446105503660046138cb565b611f0e565b34801561056157600080fd5b5061039c6105703660046138cb565b60a16020526000908152604090205481565b34801561058e57600080fd5b506033546040516001600160a01b03909116815260200161031b565b3480156105b657600080fd5b506103446105c5366004613bf3565b6120d0565b3480156105d657600080fd5b5061030f6105e5366004613ad6565b609e60209081526000928352604080842090915290825290205460ff1681565b34801561061157600080fd5b50610647610620366004613903565b60a06020908152600092835260408084209091529082529020805460019091015460ff1682565b6040805192835290151560208301520161031b565b34801561066857600080fd5b50610344610677366004613903565b612180565b34801561068857600080fd5b5061039c610697366004613b01565b609f60209081526000938452604080852082529284528284209052825290205481565b3480156106c657600080fd5b5061039c6106d5366004613903565b6001600160a01b03918216600090815260a06020908152604080832093909416825291909152205490565b34801561070c57600080fd5b5061030f612595565b34801561072157600080fd5b50610344610730366004613a2f565b6126a0565b610344610743366004613ad6565b612a05565b34801561075457600080fd5b5061078d610763366004613985565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b6040516001600160e01b0319909116815260200161031b565b3480156107b257600080fd5b5061039c6107c13660046138cb565b60a26020526000908152604090205481565b3480156107df57600080fd5b50610344612b7a565b3480156107f457600080fd5b5060975461ffff1661039c565b34801561080d57600080fd5b5061034461081c36600461393b565b612c98565b34801561082d57600080fd5b5061039c61083c366004613ad6565b609d60209081526000928352604080842090915290825290205481565b34801561086557600080fd5b506097546108749061ffff1681565b60405161ffff909116815260200161031b565b34801561089357600080fd5b506103446108a2366004613ad6565b612d19565b6103446108b5366004613a2f565b612dce565b3480156108c657600080fd5b5061078d6108d5366004613a6f565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b34801561090b57600080fd5b5061034461091a3660046138cb565b612f5a565b34801561092b57600080fd5b5061034461093a3660046138cb565b613039565b34801561094b57600080fd5b5061034461095a366004613a2f565b6130f9565b60006001600160e01b031982167f4e2312e00000000000000000000000000000000000000000000000000000000014806109c257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6000816001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0357600080fd5b505afa158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190613c43565b9050816001600160a01b03166302c7e7af6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7657600080fd5b505afa158015610a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aae9190613bab565b15610d0a5733600090815260a0602090815260408083206001600160a01b03861680855290835292819020815180830183528154815260019091015460ff1615158184015281517fb6e54bdf000000000000000000000000000000000000000000000000000000008152915190939263b6e54bdf9260048082019391829003018186803b158015610b3e57600080fd5b505afa158015610b52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b769190613c0f565b61ffff166001600160a01b03841663eeb0a4af84336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b158015610bd057600080fd5b505afa158015610be4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c089190613c43565b11610c5a5760405162461bcd60e51b815260206004820152600960248201527f6e6f74206275796572000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b80516040517f347e6f210000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0385169163347e6f21916024016020604051808303818588803b158015610cb557600080fd5b505af1158015610cc9573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cee91906138e7565b50506001600160a01b038216600090815260a260205260408120555b60408051637921219560e11b81523060048201523360248201526000604482018190526001606483015260a0608483015260a4820181905291516001600160a01b0385169263f242432a9260c4808201939182900301818387803b158015610d7157600080fd5b505af1158015610d85573d6000803e3d6000fd5b505050507fb73e3428dd7e5858fa36c55a8bdaba9c60cd953ae72c4d2dc48eeaa1e224d52a610db13390565b604080516001600160a01b03928316815291851660208301520160405180910390a15050565b6033546001600160a01b03163314610e315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b6127108110610e3f57600080fd5b60988190556040518181527f5fb4654f1efe30c6141eaa6855ffcb27e0b361d899b05e21b1a4d0b3e71e14db906020015b60405180910390a150565b60026065541415610ece5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b60026065556001600160a01b038083166000818152609a6020908152604080832094881683529381529083902083517f02c7e7af000000000000000000000000000000000000000000000000000000008152935190936302c7e7af926004808301939192829003018186803b158015610f4657600080fd5b505afa158015610f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7e9190613bab565b15610fcb5760405162461bcd60e51b815260206004820152600960248201527f6974656d20736f6c6400000000000000000000000000000000000000000000006044820152606401610c51565b8181600201541015610fdc57600080fd5b6000670de0b6b3a7640000838360010154610ff79190613dd7565b6110019190613db7565b90508061100d57600080fd5b609754600090612710906110259061ffff1684613dd7565b61102f9190613db7565b9050600061103d8284613df6565b90506000866001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b15801561107a57600080fd5b505afa15801561108e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b29190613c43565b9050833410156110c157600080fd5b8585600201546110d19190613df6565b60028601556001600160a01b038716600090815260a26020526040902054600186015461110090612710613dd7565b111561113157600185015461111790612710613dd7565b6001600160a01b038816600090815260a260205260409020555b61113b8234613df6565b6099600082825461114c9190613d9f565b90915550506001600160a01b038816600090815260a1602052604081208054849290611179908490613d9f565b90915550506001600160a01b03871663f242432a89336040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604481018490526064810189905260a06084820152600060a482015260c401600060405180830381600087803b1580156111f357600080fd5b505af1158015611207573d6000803e3d6000fd5b505050507ffa945eefd5c2ddf8beb4fb7e15e2b5f2f295ba939c584a8a849e199aa767860c6112333390565b604080516001600160a01b039283168152828c166020820152918a16908201526060810188905260800160405180910390a17f0677ea0223468afb4510a24ad47598c50e8442e976f82103b9207dd5b043877333604080516001600160a01b0390921682523460208301520160405180910390a1604080516001600160a01b038a1681523460208201527f0677ea0223468afb4510a24ad47598c50e8442e976f82103b9207dd5b0438773910160405180910390a150506001606555505050505050565b609b602090815260009384526040808520825292845282842090528252902080546001820154600283015460038401546004850180546001600160a01b039095169593949293919261134890613e0d565b80601f016020809104026020016040519081016040528092919081815260200182805461137490613e0d565b80156113c15780601f10611396576101008083540402835291602001916113c1565b820191906000526020600020905b8154815290600101906020018083116113a457829003601f168201915b5050505050905085565b60006098543410156113dc57600080fd5b600084116113e957600080fd5b6000856001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145c9190613c43565b604051627eeac760e11b8152306004820152600060248201529091506001600160a01b0387169062fdd58e9060440160206040518083038186803b1580156114a357600080fd5b505afa1580156114b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114db9190613c43565b6001146114e757600080fd5b856001600160a01b03166302c7e7af6040518163ffffffff1660e01b815260040160206040518083038186803b15801561152057600080fd5b505afa158015611534573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115589190613bab565b1561156257600080fd5b836001600160a01b03871662fdd58e336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b1580156115b857600080fd5b505afa1580156115cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f09190613c43565b10156115fb57600080fd5b6001600160a01b038681166000908152609a60209081526040808320338452825280832081516080810183528154909516855260018101549285019290925260028201549084015260038101805492939260608401919061165b90613e0d565b80601f016020809104026020016040519081016040528092919081815260200182805461168790613e0d565b80156116d45780601f106116a9576101008083540402835291602001916116d4565b820191906000526020600020905b8154815290600101906020018083116116b757829003601f168201915b505050505081525050905080604001516000146116f057600080fd5b604080516080810182526001600160a01b0389811680835260208084018b81528486018b8152606086018b81526000948552609a84528785203386528452969093208551815473ffffffffffffffffffffffffffffffffffffffff1916951694909417845551600184015590516002830155925180519293849361177a92600385019201906136fb565b509050507fa24d7f57961a475163f4ded9857498db096cdedf2e504991e3abc49ba85800a36117a63390565b898989896040516117bb959493929190613ca6565b60405180910390a1506001979650505050505050565b6033546001600160a01b0316331461182b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b6118356000613424565b565b6001600160a01b03821663f242432a336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201523060248201526000604482018190526001606483015260a0608483015260a482015260c401600060405180830381600087803b1580156118aa57600080fd5b505af11580156118be573d6000803e3d6000fd5b50505050816001600160a01b0316638b4ae68c6118d83390565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561192057600080fd5b505af1158015611934573d6000803e3d6000fd5b50505050816001600160a01b031663811ce76061194e3390565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015269021e19e0c9bab24000006024820152306044820152606401600060405180830381600087803b1580156119a557600080fd5b505af11580156119b9573d6000803e3d6000fd5b50505050816001600160a01b031663066f39bf6119d33390565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201523060248201526044015b600060405180830381600087803b158015611a1b57600080fd5b505af1158015611a2f573d6000803e3d6000fd5b505050505050565b6000609854341015611a4857600080fd5b6000856001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b158015611a8357600080fd5b505afa158015611a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abb9190613c43565b604051627eeac760e11b8152306004820152600060248201529091506001600160a01b0387169062fdd58e9060440160206040518083038186803b158015611b0257600080fd5b505afa158015611b16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3a9190613c43565b600114611b4657600080fd5b856001600160a01b03166302c7e7af6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b7f57600080fd5b505afa158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb79190613bab565b15611bc157600080fd5b836001600160a01b03871662fdd58e336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810185905260440160206040518083038186803b158015611c1757600080fd5b505afa158015611c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4f9190613c43565b1015611c5a57600080fd5b60008511611c6757600080fd5b336000908152609c6020526040812080549082611c8383613e48565b9091555090506000611c9842620d2f00613d9f565b6040805160a0810182526001600160a01b038b811680835260208084018d81528486018d815260608601888152608087018e81526000958652609b855288862033875285528886208c87528552979094208651815473ffffffffffffffffffffffffffffffffffffffff1916961695909517855590516001850155516002840155905160038301559251805194955091939092611d3c9260048501929101906136fb565b5050506001600160a01b03881663f242432a336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018690526064810189905260a06084820152600060a482015260c401600060405180830381600087803b158015611db257600080fd5b505af1158015611dc6573d6000803e3d6000fd5b505050507f1902e667061966e4e6e014ed89d2fd582bfd81cc0ab01609a7f5761067a46617611df23390565b89898985878b604051611e0b9796959493929190613ce9565b60405180910390a15050336000908152609c60205260409020549695505050505050565b600054610100900460ff16611e4a5760005460ff1615611e4e565b303b155b611ec05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c51565b600054610100900460ff16158015611ee2576000805461ffff19166101011790555b611eea613483565b6097805461ffff19166101f41790558015611f0b576000805461ff00191690555b50565b6000816001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4957600080fd5b505afa158015611f5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f819190613c43565b90506001600160a01b03821663f242432a336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201523060248201526044810184905269021e19e0c9bab2400000606482015260a06084820152600060a482015260c401600060405180830381600087803b158015611fff57600080fd5b505af1158015612013573d6000803e3d6000fd5b50505050816001600160a01b0316639f37c5dc6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561205257600080fd5b505af1158015612066573d6000803e3d6000fd5b50505050816001600160a01b031663f242432a306120813390565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526000604482018190526001606483015260a0608483015260a482015260c401611a01565b6033546001600160a01b0316331461212a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b6127108161ffff161061213c57600080fd5b6097805461ffff191661ffff83169081179091556040519081527fc8fcf8ee1425e7e60b8af83735e1eb516d5b9ef05bfd6eece552ebaeb7c75b4890602001610e70565b6000816001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b1580156121bb57600080fd5b505afa1580156121cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f39190613c43565b6001600160a01b03848116600090815260a0602090815260408083209387168084529390915281209293509063acb1e95284336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b15801561226b57600080fd5b505afa15801561227f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a39190613c43565b90506000816001600160a01b03861662fdd58e336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024810188905260440160206040518083038186803b1580156122fd57600080fd5b505afa158015612311573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123359190613c43565b61233f9190613df6565b90506001600160a01b03851663811ce760336040516001600160e01b031960e084901b1681526001600160a01b039182166004820152602481018590529089166044820152606401600060405180830381600087803b1580156123a157600080fd5b505af11580156123b5573d6000803e3d6000fd5b50506040517feeb0a4af000000000000000000000000000000000000000000000000000000008152600481018790526001600160a01b038981166024830152600093508816915063eeb0a4af9060440160206040518083038186803b15801561241d57600080fd5b505afa158015612431573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124559190613c43565b90506000866001600160a01b031663b6e54bdf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561249257600080fd5b505afa1580156124a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ca9190613c0f565b61ffff1682111561253a57866001600160a01b031663fd0c060d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561251057600080fd5b505af1158015612524573d6000803e3d6000fd5b505050506001858101805460ff19168217905590505b604080513381526001600160a01b038a81166020830152891681830152821515606082015290517f3822dc6e5715e20a82ae701ef02d9f5d60b50a2e9c7e36bacd4bf4f31bd93e2f9181900360800190a15050505050505050565b6033546000906001600160a01b031633146125f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b600260655414156126455760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b6002606555609980546000909155339061265f82826134fe565b6040518181527f47044c5eb61cda68097ee96190b2eb1ef7ae3ef989d4b2491baffd8f7799f8639060200160405180910390a1600192505050600160655590565b600260655414156126f35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b60026065556001600160a01b038216331461270d57600080fd5b6001600160a01b0382166000908152609e6020908152604080832084845290915290205460ff161561273e57600080fd5b6001600160a01b0383166000908152609b6020908152604080832033845282528083208484529091529020600381015442101561277a57600080fd5b6001600160a01b0383166000908152609d60209081526040808320858452909152902054600182015481106128ca57609754600090612710906127c19061ffff1684613dd7565b6127cb9190613db7565b6127d59083613df6565b90506127e18183613df6565b609960008282546127f29190613d9f565b9091555050604051600090339083908381818185875af1925050503d8060008114612839576040519150601f19603f3d011682016040523d82523d6000602084013e61283e565b606091505b50506001600160a01b0387166000908152609e602090815260408083208984529091529020805460ff1916600117905590507f0677ea0223468afb4510a24ad47598c50e8442e976f82103b9207dd5b04387736128983390565b604080516001600160a01b039092168252602082018590520160405180910390a1806128c357600080fd5b50506129f9565b6001600160a01b038085166000908152609e602090815260408083208784529091529020805460ff19166001179055851663f242432a306129083390565b886001600160a01b03166368e984096040518163ffffffff1660e01b815260040160206040518083038186803b15801561294157600080fd5b505afa158015612955573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129799190613c43565b60028701546040516001600160e01b031960e087901b1681526001600160a01b0394851660048201529390921660248401526044830152606482015260a06084820152600060a482015260c401600060405180830381600087803b1580156129e057600080fd5b505af11580156129f4573d6000803e3d6000fd5b505050505b50506001606555505050565b80341015612a1257600080fd5b33600081815260a0602090815260408083206001600160a01b03871684529091529020600181015490919060ff1615612a4a57600080fd5b81548310612ad7576001600160a01b038416600090815260a26020526040902054831015612aba5760405162461bcd60e51b815260206004820152600960248201527f4d696e206f6666657200000000000000000000000000000000000000000000006044820152606401610c51565b8154612ac69084613df6565b341015612ad257600080fd5b612ae9565b815460008355612ae782826134fe565b505b604080518082018252848152600060208083018281523380845260a083528584206001600160a01b038b16808652908452938690209451855590516001909401805460ff191694151594909417909355835192835282015280820185905290517fba7256c19ec578f17e4fb0a5c7728cbb7ec23e09e6fb1fa84fae19a46d9e7f2a916060908290030190a150505050565b60026065541415612bcd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b600260655533600090815260a16020526040902054612c2e5760405162461bcd60e51b815260206004820152600e60248201527f4e6f20636c61696d6564204554480000000000000000000000000000000000006044820152606401610c51565b33600081815260a1602052604081208054919055612c4c82826134fe565b7f4a9428d8b62f07c6d93da0a20fa45c49487489d49fb929783ae3771d9cf65cbf33604080516001600160a01b039092168252602082018490520160405180910390a150506001606555565b6040517f066f39bf0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152838116602483015282169063066f39bf90604401600060405180830381600087803b158015612cfc57600080fd5b505af1158015612d10573d6000803e3d6000fd5b50505050505050565b6001600160a01b0382166000908152609b60209081526040808320338452825280832084845290915290206003810154612d5257600080fd5b4260038201819055604080513381526001600160a01b0386166020820152600081830181905260608201819052608082019390935260a0810185905260e060c08201819052810192909252517f1902e667061966e4e6e014ed89d2fd582bfd81cc0ab01609a7f5761067a46617918190036101000190a1505050565b60026065541415612e215760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b60026065556001600160a01b038084166000908152609b60209081526040808320938616835292815282822084835290522060038101544210612e6357600080fd5b6000816003015411612e7457600080fd5b3480612e7f57600080fd5b6001600160a01b0384166000908152609d6020908152604080832086845290915281208054349290612eb2908490613d9f565b90915550506001600160a01b0384166000908152609f60209081526040808320868452825280832033845290915281208054839290612ef2908490613d9f565b9091555050604080513381526001600160a01b038781166020830152861681830152606081018590526080810183905290517fcfb7fe28b7c46ec03659c5d6b9f1fa70b0bfe94559ea3b3abb9f99e591def6b99181900360a00190a150506001606555505050565b6033546001600160a01b03163314612fb45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c51565b6001600160a01b0381166130305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c51565b611f0b81613424565b6001600160a01b0381166000908152609a602090815260408083203384529091528120805473ffffffffffffffffffffffffffffffffffffffff19168155600181018290556002810182905590613093600383018261377f565b50507fa24d7f57961a475163f4ded9857498db096cdedf2e504991e3abc49ba85800a36130bd3390565b604080516001600160a01b039283168152918416602083015260009082018190526060820181905260a06080830181905282015260c001610e70565b6002606554141561314c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c51565b60026065556001600160a01b038084166000908152609b602090815260408083209386168352928152828220848352905220600381015442101561318f57600080fd5b60008160030154116131a057600080fd5b6001600160a01b038084166000908152609d6020908152604080832086845282528083205481517f68e98409000000000000000000000000000000000000000000000000000000008152915190948916926368e984099260048082019391829003018186803b15801561321257600080fd5b505afa158015613226573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324a9190613c43565b90508260010154821061338f5760028301546001600160a01b0386166000908152609f60209081526040808320888452825280832033845290915281205490846132948484613dd7565b61329e9190613db7565b6001600160a01b0389166000908152609f602090815260408083208b845282528083203380855290835281842093909355805192835290820185905280519293507f0677ea0223468afb4510a24ad47598c50e8442e976f82103b9207dd5b043877392918290030190a160408051637921219560e11b8152306004820152336024820152604481018690526064810183905260a06084820152600060a4820181905291516001600160a01b038c169263f242432a9260c4808201939182900301818387803b15801561336f57600080fd5b505af1158015613383573d6000803e3d6000fd5b50505050505050613417565b6001600160a01b0385166000908152609f60209081526040808320878452825280832033808552925280832080549084905590519092919083908381818185875af1925050503d8060008114613401576040519150601f19603f3d011682016040523d82523d6000602084013e613406565b606091505b505090508061341457600080fd5b50505b5050600160655550505050565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166134ee5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c51565b6134f661361c565b611835613687565b8047101561354e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610c51565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461359b576040519150601f19603f3d011682016040523d82523d6000602084013e6135a0565b606091505b50509050806136175760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610c51565b505050565b600054610100900460ff166118355760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c51565b600054610100900460ff166136f25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c51565b61183533613424565b82805461370790613e0d565b90600052602060002090601f016020900481019282613729576000855561376f565b82601f1061374257805160ff191683800117855561376f565b8280016001018555821561376f579182015b8281111561376f578251825591602001919060010190613754565b5061377b9291506137b5565b5090565b50805461378b90613e0d565b6000825580601f1061379b575050565b601f016020900490600052602060002090810190611f0b91905b5b8082111561377b57600081556001016137b6565b600067ffffffffffffffff8311156137e4576137e4613e79565b6137f7601f8401601f1916602001613d6e565b905082815283838301111561380b57600080fd5b828260208301376000602084830101529392505050565b600082601f830112613832578081fd5b8135602067ffffffffffffffff82111561384e5761384e613e79565b8160051b61385d828201613d6e565b838152828101908684018388018501891015613877578687fd5b8693505b8584101561389957803583526001939093019291840191840161387b565b50979650505050505050565b600082601f8301126138b5578081fd5b6138c4838335602085016137ca565b9392505050565b6000602082840312156138dc578081fd5b81356138c481613e8f565b6000602082840312156138f8578081fd5b81516138c481613e8f565b60008060408385031215613915578081fd5b823561392081613e8f565b9150602083013561393081613e8f565b809150509250929050565b60008060006060848603121561394f578081fd5b833561395a81613e8f565b9250602084013561396a81613e8f565b9150604084013561397a81613e8f565b809150509250925092565b600080600080600060a0868803121561399c578081fd5b85356139a781613e8f565b945060208601356139b781613e8f565b9350604086013567ffffffffffffffff808211156139d3578283fd5b6139df89838a01613822565b945060608801359150808211156139f4578283fd5b613a0089838a01613822565b93506080880135915080821115613a15578283fd5b50613a22888289016138a5565b9150509295509295909350565b600080600060608486031215613a43578283fd5b8335613a4e81613e8f565b92506020840135613a5e81613e8f565b929592945050506040919091013590565b600080600080600060a08688031215613a86578081fd5b8535613a9181613e8f565b94506020860135613aa181613e8f565b93506040860135925060608601359150608086013567ffffffffffffffff811115613aca578182fd5b613a22888289016138a5565b60008060408385031215613ae8578182fd5b8235613af381613e8f565b946020939093013593505050565b600080600060608486031215613b15578081fd5b8335613b2081613e8f565b925060208401359150604084013561397a81613e8f565b60008060008060808587031215613b4c578182fd5b8435613b5781613e8f565b93506020850135925060408501359150606085013567ffffffffffffffff811115613b80578182fd5b8501601f81018713613b90578182fd5b613b9f878235602084016137ca565b91505092959194509250565b600060208284031215613bbc578081fd5b815180151581146138c4578182fd5b600060208284031215613bdc578081fd5b81356001600160e01b0319811681146138c4578182fd5b600060208284031215613c04578081fd5b81356138c481613ea4565b600060208284031215613c20578081fd5b81516138c481613ea4565b600060208284031215613c3c578081fd5b5035919050565b600060208284031215613c54578081fd5b5051919050565b60008151808452815b81811015613c8057602081850181015186830182015201613c64565b81811115613c915782602083870101525b50601f01601f19169290920160200192915050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152613cde60a0830184613c5b565b979650505050505050565b60006001600160a01b03808a1683528089166020840152508660408301528560608301528460808301528360a083015260e060c0830152613d2d60e0830184613c5b565b9998505050505050505050565b6001600160a01b038616815284602082015283604082015282606082015260a060808201526000613cde60a0830184613c5b565b604051601f8201601f1916810167ffffffffffffffff81118282101715613d9757613d97613e79565b604052919050565b60008219821115613db257613db2613e63565b500190565b600082613dd257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613df157613df1613e63565b500290565b600082821015613e0857613e08613e63565b500390565b600181811c90821680613e2157607f821691505b60208210811415613e4257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613e5c57613e5c613e63565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611f0b57600080fd5b61ffff81168114611f0b57600080fdfea2646970667358221220851aa4db55b7864c65e30b1e51dac97b5a543b053ad99e3da4270d6fcf066d1364736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 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.