Overview
ETH Balance
33.48621 ETH
Eth Value
$117,523.26 (@ $3,509.60/ETH)Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 8,320 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Close Swap Inten... | 16482516 | 522 days ago | IN | 0.005 ETH | 0.00425606 | ||||
Create Swap Inte... | 16482503 | 522 days ago | IN | 0.455 ETH | 0.00605274 | ||||
Create Swap Inte... | 16482313 | 522 days ago | IN | 0.005 ETH | 0.00626304 | ||||
Close Swap Inten... | 16482220 | 522 days ago | IN | 0.005 ETH | 0.00460785 | ||||
Create Swap Inte... | 16482199 | 522 days ago | IN | 0.005 ETH | 0.00997321 | ||||
Close Swap Inten... | 16482199 | 522 days ago | IN | 0.155 ETH | 0.00691974 | ||||
Create Swap Inte... | 16482159 | 522 days ago | IN | 0.005 ETH | 0.00886021 | ||||
Create Swap Inte... | 16482045 | 522 days ago | IN | 0.005 ETH | 0.00464247 | ||||
Close Swap Inten... | 16481474 | 522 days ago | IN | 2.055 ETH | 0.0041312 | ||||
Create Swap Inte... | 16481460 | 522 days ago | IN | 0.005 ETH | 0.0043672 | ||||
Close Swap Inten... | 16481436 | 522 days ago | IN | 0.005 ETH | 0.00952108 | ||||
Create Swap Inte... | 16481408 | 522 days ago | IN | 12.005 ETH | 0.01309887 | ||||
Close Swap Inten... | 16481135 | 522 days ago | IN | 12.255 ETH | 0.00409511 | ||||
Close Swap Inten... | 16480988 | 522 days ago | IN | 1.455 ETH | 0.00395566 | ||||
Create Swap Inte... | 16480968 | 522 days ago | IN | 0.005 ETH | 0.00657946 | ||||
Close Swap Inten... | 16480878 | 522 days ago | IN | 2.205 ETH | 0.00460126 | ||||
Create Swap Inte... | 16480860 | 522 days ago | IN | 0.005 ETH | 0.00627018 | ||||
Create Swap Inte... | 16480532 | 523 days ago | IN | 0.005 ETH | 0.00662323 | ||||
Close Swap Inten... | 16480403 | 523 days ago | IN | 1.755 ETH | 0.00415916 | ||||
Create Swap Inte... | 16480386 | 523 days ago | IN | 0.005 ETH | 0.00519153 | ||||
Create Swap Inte... | 16480277 | 523 days ago | IN | 0.005 ETH | 0.00716549 | ||||
Create Swap Inte... | 16480261 | 523 days ago | IN | 0.005 ETH | 0.00694573 | ||||
Close Swap Inten... | 16480248 | 523 days ago | IN | 1.135 ETH | 0.01730828 | ||||
Close Swap Inten... | 16480234 | 523 days ago | IN | 2.005 ETH | 0.00443276 | ||||
Close Swap Inten... | 16480188 | 523 days ago | IN | 0.005 ETH | 0.0083577 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
16482516 | 522 days ago | 0.01225 ETH | ||||
16482516 | 522 days ago | 0.44775 ETH | ||||
16482220 | 522 days ago | 0.01 ETH | ||||
16482199 | 522 days ago | 0.01075 ETH | ||||
16482199 | 522 days ago | 0.14925 ETH | ||||
16481474 | 522 days ago | 0.02025 ETH | ||||
16481474 | 522 days ago | 2.03975 ETH | ||||
16481436 | 522 days ago | 0.07 ETH | ||||
16481436 | 522 days ago | 11.94 ETH | ||||
16481135 | 522 days ago | 0.07125 ETH | ||||
16481135 | 522 days ago | 12.18875 ETH | ||||
16480988 | 522 days ago | 0.01725 ETH | ||||
16480988 | 522 days ago | 1.44275 ETH | ||||
16480878 | 522 days ago | 0.021 ETH | ||||
16480878 | 522 days ago | 2.189 ETH | ||||
16480403 | 523 days ago | 0.01875 ETH | ||||
16480403 | 523 days ago | 1.74125 ETH | ||||
16480248 | 523 days ago | 0.01565 ETH | ||||
16480248 | 523 days ago | 1.12435 ETH | ||||
16480234 | 523 days ago | 0.02 ETH | ||||
16480234 | 523 days ago | 1.99 ETH | ||||
16480188 | 523 days ago | 0.01 ETH | ||||
16479765 | 523 days ago | 0.012 ETH | ||||
16479765 | 523 days ago | 0.398 ETH | ||||
16479499 | 523 days ago | 0.03345 ETH |
Loading...
Loading
Contract Name:
NFTTraderSwapRoyaltiesV1
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@manifoldxyz/royalty-registry-solidity/contracts/IRoyaltyEngineV1.sol"; /// @title NFTTraderSwap /// @author Salad Labs Inc. contract NFTTraderSwapRoyaltiesV1 is Ownable, Pausable, ReentrancyGuard { using Counters for Counters.Counter; using SafeMath for uint256; /* swapStruct is the swap order structure of a counterparty the swapStruct contains all the data needed for setup a trade with ERC20/ERC721/ERC11555 */ struct swapStruct { address dapp; // dapp address typeStd typeStd; // identify the standard related to the DAPP uint256[] tokenId; // tokenID if is an ERC721/ERC1155 uint256[] blc; // balance if is an ERC20/ERC1155 uint256[] roy; // royalties that have been paid bytes data; } /* swapIntent is the master structure of a swap the swapIntent contains the address of the Maker and the Taker and the native token involved. Would also be used to check if the counterparty involved will have access to a discount. The Taker address could be the address(0) if the swap is open. It contains also the swap status (if opened or closed) */ struct swapIntent { address payable addressMaker; // maker address of the swap bool discountMaker; // if the maker of the swap have a TRADESQUAD or a PARTNERSQUAD he'll get a discount uint256 valueMaker; // native token value of the Maker uint256 flatFeeMaker; // Protocol flat fee address payable addressTaker; // taker address of the swap bool discountTaker; // if the taker of the swap have a TRADESQUAD or a PARTNERSQUAD he'll get a discount uint256 valueTaker; // native token value of the Taker uint256 flatFeeTaker; // Protocol flat fee uint256 swapStart; // creation date uint256 swapEnd; // closing / expiring date bool flagFlatFee; // flag used for check if the flat fees are enabled bool flagRoyalties; // flag used for check if the royalties are enabled swapStatus status; // status of the deal. Could be Opened, Closed or Cancelled uint256 royaltiesMaker; // Royalties in native token paid by the Maker uint256 royaltiesTaker; // Royalties in native token paid by the Taker } /* Royalties struct is used for check if the maker/taker is a buyer The royaltiesStruct is used to define if is possible to apply the royalties payment on the interested counterparty. */ struct royaltiesStruct { bool hasRoyalties; // flag used to check if has royalties to pay. It means that is a buyer bool hasNTV; // flag used to check if NTV (native token) are involved in this side of the deal bool hasERC20; // flag used to check if ERC20 are involved in this side of the deal bool hasERC721; // flag used to check if ERC721 are involved in this side of the deal bool hasERC1155; // flag used to check if ERC1155 are involved in this side of the deal } /* Royalties support structure used as a support for pay native token/ERC20 royalties to creators the royaltiesSupport struct is used for store the results that will come from the royalty registry. More infos here: https://royaltyregistry.xyz/ */ struct royaltiesSupport { address payable[] royaltiesAddress; // recipients that should receive the royalties uint256[] royalties; // amount of royalties } /* Reference for main addresses used by this smart contract the referenceAddressStruct is used for store and recover all the address needed for run the application, from the manifold engine address to the vault in which our fees are sent. TRADESQUAD and PARTNERSQUAD address could be used for handle the platform discounts */ struct referenceAddressStruct { address ROYALTYENGINEADDRESS; // manifold engine address address TRADESQUAD; // NFTTrader TRADESQUAD (ERC721) address that remove trading fee address PARTNERSQUAD; // ERC721 address that could be used as a partner to get the same benefits of the TRADESQUAD address payable VAULT; // VAULT address for send the protocol fee } /* Struct used as a reference for handle the payments/fee/royalties The paymentStruct is used */ struct paymentStruct { bool flagFlatFee; // Check if there are FLAT FEE or FLAT FEE + % FEE bool flagRoyalties; // Check if the royalties are enabled uint256 flatFee; // Flat fee amount uint256 bps; // Basis points uint256 scalePercent; // Scale Percent } /* closeStruct is used in _close function This structure is used for a better handling of the details of a deal */ struct closeStruct { address from; // From side address to; // To side bool discount; // Flag to check if there is a discount uint256 feeValue; // Support property uint256 dealValue; // Original deal value. Used for ERC20 uint256 vaultFee; // Fee sent to the vault uint256 fee; // Fee sent to the counterparty uint256 nativeDealValue; // Original value uint256 flatFeeValue; // Flat fee value uint256 royalties; // Royalties amount } uint256 constant secs = 86400; Counters.Counter private _swapIds; // Counter of the swaps referenceAddressStruct public referenceAddress; paymentStruct public payment; /// mapping address => bool used for handle ERC721/ERC20 blacklist/whitelist mapping (address => bool) ERC20whiteList; mapping (address => bool) NFTblackList; /// mapping address => bool for handle the ban of an address mapping (address => bool) public bannedAddress; /// swapStruct mapping for the details of makers and takers. The uint256 identify the swapId mapping(uint256 => swapStruct[]) nftsMaker; mapping(uint256 => swapStruct[]) nftsTaker; /// Mapping key/value for get the swap infos mapping (uint256 => swapIntent) swapMapping; /// Enum used for handle the status of a deal enum swapStatus { Opened, Closed, Cancelled } /// Enum used for define which kind of standards are used during the deal enum typeStd { ERC20, ERC721, ERC1155 } /// @dev This event used for query the blockchain for check the situation of the swap /// @param _creator is the address that identify the creator of the deal /// @param _time is used to identify the date in which the swap happened /// @param _status is used to identify the status of the deal (open/closed) /// @param _swapId is the id of the swap /// @param _counterpart is the address that identify the counterpart of the deal /// @param _referral is the address that could be used in future for pay a referral event swapEvent(address indexed _creator, uint256 indexed _time, swapStatus indexed _status, uint256 _swapId, address _counterpart, address _referral); /// @dev This event is used for query the blockchain for recover the new counterpart of the specified swap /// @param _swapId is the id of the swap /// @param _counterpart is the address that identify the counterpart of the deal event counterpartEvent(uint256 indexed _swapId, address indexed _counterpart); /// @dev This event is used for track the changes in the setReferenceAddresses function /// @param _engineAddress is the address of the Royalty Registry engine /// @param _tradeSquad is the address of the TradeSquad ERC721 /// @param _partnerSquad is the address of the PartnerSquad ERC721 /// @param _vault is the address of the vault in which we're going to send the fees event referenceAddressEvent(address _engineAddress, address _tradeSquad, address _partnerSquad, address _vault); /// @dev This event is used for track the changes in the setPaymentStruct function /// @param _flagFlatFee bool used to enable or disable the flat fee. If true flat, if false flat + % /// @param _flatFee uint256 used to specify the flatfee in WEI /// @param _flagRoyalties bool used to enable or disable the royalties payment /// @param _bps uint256 used for the internal bps related to the platform fee /// @param _scalePercent uint256 used for the scale percent event paymentStructEvent(bool _flagFlatFee, uint256 _flatFee, bool _flagRoyalties, uint256 _bps, uint256 _scalePercent); /// @dev This event emitted when some native token are sent on the smart contract /// @param _payer sender of the native token received /// @param _value amount of native token received event paymentReceived(address indexed _payer, uint256 _value); /// @notice Emit an event each time someone send native token here /// @dev Emit an event each time someone send native token here receive() external payable { emit paymentReceived(msg.sender, msg.value); } /// @notice This function is used for create a swap /// @dev This function is used for create a swap. The order is stored on the blockchain and will emit a swapEvent once executed /// @param _swapIntent master content of the order /// @param _nftsMaker swap structure that contains the detail content of swap creator /// @param _nftsTaker swap structure that contains the detail content of swap counterparty /// @param _referral address that could be used for a referral in future function createSwapIntent(swapIntent memory _swapIntent, swapStruct[] memory _nftsMaker, swapStruct[] memory _nftsTaker, address _referral) payable public whenNotPaused checkAssets(_swapIntent, _nftsMaker, _nftsTaker) { require(bannedAddress[msg.sender] == false, "Banned"); // check the fee/value used by the creator of the swap _swapIntent.flagFlatFee = payment.flagFlatFee; _swapIntent.flagRoyalties = payment.flagRoyalties; // check if he've a discount (_swapIntent.discountMaker, _swapIntent.flatFeeMaker) = _checkDiscount(); // Check if the amount needed is fine for accomplish the deal creation require(msg.value >= _swapIntent.valueMaker.add(_swapIntent.flatFeeMaker), "More wei needed"); _swapIntent.addressMaker = payable(msg.sender); // Check if the counterparty is not the creator of the deal require(_swapIntent.addressMaker != _swapIntent.addressTaker, "maker=taker"); _swapIntent.swapStart = block.timestamp; if(_swapIntent.swapEnd == 0) _swapIntent.swapEnd = block.timestamp.add(7 days); else { _swapIntent.swapEnd = _swapIntent.swapEnd.mul(1 days); _swapIntent.swapEnd = _swapIntent.swapEnd.add(block.timestamp); } _swapIntent.status = swapStatus.Opened; _swapIntent.royaltiesMaker = 0; _swapIntent.royaltiesTaker = 0; swapMapping[_swapIds.current()] = _swapIntent; _create(_swapIds.current(), _nftsMaker, true); _create(_swapIds.current(), _nftsTaker, false); emit swapEvent(msg.sender, (block.timestamp-(block.timestamp%secs)), _swapIntent.status, _swapIds.current(), _swapIntent.addressTaker, _referral); _swapIds.increment(); } /// @notice This is used for close a swap. /// @dev This function close an order that is stored on the blockchain and it will emit a swapEvent once executed /// @param _swapId identifier of the order /// @param _referral address that in future could be used for payouts function closeSwapIntent(uint256 _swapId, address _referral) payable public whenNotPaused nonReentrant { swapIntent memory swap = swapMapping[_swapId]; uint256 vaultFee = 0; // Banned address require(bannedAddress[msg.sender] == false, "Banned"); // Status require(swap.status == swapStatus.Opened, "!Open"); // Counterpart require(swap.addressTaker == msg.sender || swap.addressTaker == address(0), "You're not the interested counterpart"); // Check if the counterparty is not the creator of the deal require(swap.addressMaker != swap.addressTaker, "maker=taker"); // Deal Swap expired require(swap.swapEnd >= block.timestamp, "Expired"); // SwapId must be lower or equal to the current one require(_swapId < _swapIds.current(), "id KO"); swapMapping[_swapId].addressTaker = payable(msg.sender); swapMapping[_swapId].status = swapStatus.Closed; swapMapping[_swapId].swapEnd = block.timestamp; // check if he've a discount (swapMapping[_swapId].discountTaker, swapMapping[_swapId].flatFeeTaker) = _checkDiscount(); // Control if is enabled the flat fee or flat fee + % require(msg.value >= swapMapping[_swapId].valueTaker.add(swapMapping[_swapId].flatFeeTaker), "Not enough WEI"); // Pay Royalties if enabled if(swapMapping[_swapId].flagRoyalties) _sendRoyalties(_swapId); // From Owner 1 to Owner 2 vaultFee = _close(_swapId, true); // From Owner 2 to Owner 1 vaultFee = vaultFee.add(_close(_swapId, false)); require(transferFees(referenceAddress.VAULT, vaultFee), "Fee"); emit swapEvent(swapMapping[_swapId].addressTaker, (block.timestamp-(block.timestamp%secs)), swapStatus.Closed, _swapId, msg.sender, _referral); } /// @notice This is used for cancel a swap. /// @dev This function cancel an order that is stored on the blockchain and will emit a swapEvent once executed /// @param _swapId identifier of the order function cancelSwapIntent(uint256 _swapId) public nonReentrant { swapIntent memory swap = swapMapping[_swapId]; // Check if is the owner require(swap.addressMaker == msg.sender, "!Owner"); // Check swap status require(swap.status == swapStatus.Opened, "!Open"); // Save how much value should be refunded to the initiator of the deal uint256 refund = swap.valueMaker.add(swap.flatFeeMaker) ; swapMapping[_swapId].swapEnd = block.timestamp; swapMapping[_swapId].status = swapStatus.Cancelled; emit swapEvent(msg.sender, (block.timestamp-(block.timestamp%secs)), swapStatus.Cancelled, _swapId, address(0), address(0)); // Refund the fee/value used by the creator of the swap if(refund > 0) { require(transferFees(msg.sender, refund), "Fee"); } } /// @notice This function is used for populate the main address used by the procol /// @dev This function is used for populate the main address used by the procol. From the ryoalties registry to the vault /// @param _engineAddress address that must be used for the royalties engine reference /// @param _tradeSquad address used for apply a discount on the protocol for a TradeSquad owner /// @param _partnerSquad address used for apply a discount on the protocol for a partner /// @param _vault payable address used for send the fees generated by the protocol function setReferenceAddresses(address _engineAddress, address _tradeSquad, address _partnerSquad, address payable _vault) public onlyOwner { referenceAddress.ROYALTYENGINEADDRESS = _engineAddress; referenceAddress.TRADESQUAD = _tradeSquad; referenceAddress.PARTNERSQUAD = _partnerSquad; referenceAddress.VAULT = _vault; emit referenceAddressEvent(_engineAddress, _tradeSquad, _partnerSquad, _vault); } /// @notice This ERC721 address applies a discount if owned by a counterpart /// @dev This address is used to handle the ERC721 that will remove the fee from the smart contract /// @param _flagFlatFee bool used to enable or disable the flat fee. If true flat, if false flat + % /// @param _flatFee uint256 used to specify the flatfee in WEI /// @param _flagRoyalties bool used to enable or disable the royalties payment /// @param _bps uint256 used for the internal bps related to the platform fee /// @param _scalePercent uint256 used for the scale percent function setPaymentStruct(bool _flagFlatFee, uint256 _flatFee, bool _flagRoyalties, uint256 _bps, uint256 _scalePercent) public onlyOwner { require(_scalePercent >= 10000, 'Must be >= 10000'); payment.flagFlatFee = _flagFlatFee; payment.flatFee = _flatFee; payment.flagRoyalties = _flagRoyalties; payment.bps = _bps; payment.scalePercent = _scalePercent; emit paymentStructEvent(_flagFlatFee, _flatFee, _flagRoyalties, _bps, _scalePercent); } /// @dev This function is used for enable or disable the trading of ERC20. By default ALL ERC20 are disabled /// @param _dapp address of an ERC20 /// @param _status bool that is used for enable or disable the trading of the current asset function setERC20Whitelist(address _dapp, bool _status) public onlyOwner { ERC20whiteList[_dapp] = _status; } /// @dev This function is used for enable or disable the trading of ERC721 or ERC1155. By default ALL ERC721/ERC1155 are enabled /// @param _dapp address of an ERC721/ERC1155 /// @param _status bool that is used for enable or disable the trading of the current asset function setNFTBlacklist(address _dapp, bool _status) public onlyOwner { NFTblackList[_dapp] = _status; } /// @notice This function is used for change the counterparty of a deal /// @dev This function is used for change the counterparty of a specified deal. Only the creator of the deal could change the counterparty /// @param _swapId identifier of the order /// @param _counterPart address that is used for change the counterparty of the specified deal function editCounterPart(uint256 _swapId, address payable _counterPart) public { swapIntent memory swap = swapMapping[_swapId]; require(msg.sender == swap.addressMaker && msg.sender != _counterPart, "!Owner"); swapMapping[_swapId].addressTaker = _counterPart; emit counterpartEvent(_swapId, _counterPart); } /// @notice This function is used for enable/disable onchain royalties /// @dev This function is used for enable/disable onchain royalties. Only the smart contract owner could flip the state function flipRoyaltiesState() public onlyOwner { payment.flagRoyalties = !payment.flagRoyalties; } /// @notice This function is used for ban/unban an address for the platform usage /// @dev This function is used for ban/unban an address for the platform usage. Only the smart contract owner could ban an address function flipBannedAddressState(address _address) public onlyOwner { bannedAddress[_address] = !bannedAddress[_address]; } /// @notice This function is used internally to check if an user is eligible to a discount /// @dev This function is used internally to check if an user is eligible to a discount. The account must own a TRADESQUAD or a PARTNERSQUAD to be eligible. It should be an ERC721 function _checkDiscount() private view returns(bool, uint256) { if(IERC721(referenceAddress.TRADESQUAD).balanceOf(msg.sender) > 0 || IERC721(referenceAddress.PARTNERSQUAD).balanceOf(msg.sender) > 0) { return (true, 0); } else { return (false, payment.flatFee); } } /// @notice This function is used interally for create a deal /// @dev This function is used interally for create a deal. It will check if everything is setup properly /// @param _nfts swap structure is the content of a swap /// @param _maker identify is is the maker or the taker function _create(uint256 _swapId, swapStruct[] memory _nfts, bool _maker) private { uint256 i; uint256 j; for(i=0; i<_nfts.length; i++) { if(_nfts[i].typeStd == typeStd.ERC20) { require(ERC20whiteList[_nfts[i].dapp] && _nfts[i].roy.length==1 && _nfts[i].blc.length==1 && _nfts[i].blc[0]>0, "ERC20 - Check values"); _nfts[i].roy[0] = 0; } else { require(!NFTblackList[_nfts[i].dapp], "ERC721 - Blacklisted"); if(_nfts[i].typeStd == typeStd.ERC721) require(_nfts[i].tokenId.length==1, "ERC721 - Missing tokenId"); if(_nfts[i].typeStd == typeStd.ERC1155) { require(_nfts[i].tokenId.length>0 && _nfts[i].blc.length>0 && _nfts[i].tokenId.length==_nfts[i].blc.length, "ERC1155 - Missing tokenId"); j=0; while(j<_nfts[i].blc.length) { require(_nfts[i].blc[j]>0, "ERC1155 - Balance must be > 0"); j++; } } } if(_maker) nftsMaker[_swapId].push(_nfts[i]); else nftsTaker[_swapId].push(_nfts[i]); } } /// @notice This function is used interally for pay the royalties /// @dev This function is used interally for pay the royalties and would be called if flagRoyalties is true. It will be called in the last phase of a swap /// @param _swapId is the swap identifier function _sendRoyalties(uint256 _swapId) private { swapIntent memory swap = swapMapping[_swapId]; // Royalties Management royaltiesStruct memory maker; royaltiesStruct memory taker; maker.hasRoyalties = true; taker.hasRoyalties = true; if(swap.valueMaker>0) maker.hasNTV = true; if(swap.valueTaker>0) taker.hasNTV = true; // Maker (maker, taker.hasRoyalties) = _setRoyaltiesStatus(maker, nftsMaker[_swapId]); // Taker (taker, maker.hasRoyalties) = _setRoyaltiesStatus(taker, nftsTaker[_swapId]); // Check if the parts involved are doing a sale // Maker - Check if is a buyer if(maker.hasRoyalties) { if(!((maker.hasNTV || maker.hasERC20) && (taker.hasERC721 || taker.hasERC1155))) maker.hasRoyalties = false; else { // Maker is a buyer, must pay royalties _checkBuyer(maker, taker, true, _swapId); } } // Taker - Check if is a buyer if(taker.hasRoyalties) { if(!((taker.hasNTV || taker.hasERC20) && (maker.hasERC721 || maker.hasERC1155))) taker.hasRoyalties = false; else { // Taker is a buyer, must pay royalties _checkBuyer(taker, maker, false, _swapId); } } } /// @notice This function is used interally for setup the status of the Royalties struct /// @dev This function is used interally for setup the status of the Royalties struct /// @param _part royalties structure on the interested party /// @param _nfts swap structure is the detail content of the interested party /// @return the royalties structure of the interested party function _setRoyaltiesStatus(royaltiesStruct memory _part, swapStruct[] memory _nfts) private pure returns(royaltiesStruct memory, bool) { uint256 i; bool royalty; address address721; address address1155; i=0; royalty = true ; while(i<_nfts.length) { if(_nfts[i].typeStd == typeStd.ERC20) { _part.hasERC20 = true; } else { if(_nfts[i].typeStd == typeStd.ERC721) { if(_part.hasERC721 == false) { _part.hasERC721 = true; address721 = _nfts[i].dapp; } else { if(address721 != _nfts[i].dapp) royalty = false; } } if(_nfts[i].typeStd == typeStd.ERC1155) { if(_part.hasERC1155 == false) { _part.hasERC1155 = true; address1155 = _nfts[i].dapp; } else { if(address1155 != _nfts[i].dapp) royalty = false; } } } i++; } // Part has different collections if(_part.hasERC721 && _part.hasERC1155) royalty = false; return(_part, royalty); } /// @notice This function is used interally for check if the part is a buyer and have to pay royalties /// @dev This function is used interally for check if the part is a buyer and have to pay royalties. It will transfer the royalties if needed /// @param _part royalties structure on the interested party /// @param _counterpart royalties structure on the interested party /// @param _maker identifies the maker or the taker /// @param _swapId swap identifier function _checkBuyer(royaltiesStruct memory _part, royaltiesStruct memory _counterpart, bool _maker, uint256 _swapId) private { swapIntent memory swap = swapMapping[_swapId]; uint256 i; uint256 j; bool flag; uint256 royBlc; swapStruct[] memory nfts; swapStruct[] memory ausNfts; royaltiesSupport memory support; // native token if(_part.hasNTV && (_counterpart.hasERC721 || _counterpart.hasERC1155)) { nfts = _maker?nftsTaker[_swapId]:nftsMaker[_swapId]; i=0; flag=false; while(i<nfts.length && flag==false) { if(nfts[i].typeStd == typeStd.ERC721 || nfts[i].typeStd == typeStd.ERC1155) { if(_maker) { (support.royaltiesAddress, support.royalties) = IRoyaltyEngineV1(referenceAddress.ROYALTYENGINEADDRESS).getRoyaltyView(nfts[i].dapp, nfts[i].tokenId[0], swapMapping[_swapId].valueMaker) ; } else { (support.royaltiesAddress, support.royalties) = IRoyaltyEngineV1(referenceAddress.ROYALTYENGINEADDRESS).getRoyaltyView(nfts[i].dapp, nfts[i].tokenId[0], swapMapping[_swapId].valueTaker) ; } flag = true; } i++; } // update native token balance in swapIntent and sendRoyalties for(i=0; i<support.royalties.length; i++) { if(_maker) swapMapping[_swapId].royaltiesMaker = swap.royaltiesMaker.add(support.royalties[i]); else swapMapping[_swapId].royaltiesTaker = swap.royaltiesTaker.add(support.royalties[i]); require(transferFees(support.royaltiesAddress[i], support.royalties[i]), "Fee"); } } //ERC20 if(_part.hasERC20 && (_counterpart.hasERC721 || _counterpart.hasERC1155)) { nfts = _maker?nftsMaker[_swapId]:nftsTaker[_swapId]; ausNfts = _maker?nftsTaker[_swapId]:nftsMaker[_swapId]; for(i=0; i<nfts.length; i++) { if(nfts[i].typeStd == typeStd.ERC20) { j=0; flag=false; while(j<ausNfts.length && flag==false) { if(ausNfts[j].typeStd == typeStd.ERC721 || ausNfts[j].typeStd == typeStd.ERC1155) { (support.royaltiesAddress, support.royalties) = IRoyaltyEngineV1(referenceAddress.ROYALTYENGINEADDRESS).getRoyaltyView(ausNfts[j].dapp, ausNfts[j].tokenId[0], nfts[i].blc[0]) ; flag = true; } } royBlc = 0; for(j=0; j<support.royalties.length; j++) { if(_maker) { IERC20(nfts[i].dapp).transferFrom(swap.addressMaker, support.royaltiesAddress[j], support.royalties[j]); } else { IERC20(nfts[i].dapp).transferFrom(swap.addressTaker, support.royaltiesAddress[j], support.royalties[j]); } royBlc = royBlc.add(support.royalties[j]); } // Store Balance if(_maker) nftsMaker[_swapId][i].roy[0] = royBlc; else nftsTaker[_swapId][i].roy[0] = royBlc; } } } } /// @notice This function is used interally for close a deal /// @dev This function is used interally for close a deal. /// @param _swapId swap identifier /// @param _maker identifies the maker or the taker function _close(uint256 _swapId, bool _maker) private returns(uint256) { swapIntent memory swap = swapMapping[_swapId]; closeStruct memory closeDetail; swapStruct[] memory nfts; uint256 i; if(_maker) { nfts = nftsMaker[_swapId]; closeDetail.from = swap.addressMaker; closeDetail.to = swap.addressTaker; closeDetail.discount = swap.discountMaker; closeDetail.nativeDealValue = swap.valueMaker; closeDetail.flatFeeValue = swap.flatFeeMaker; closeDetail.royalties = swap.royaltiesMaker; } else { nfts = nftsTaker[_swapId]; closeDetail.from = swap.addressTaker; closeDetail.to = swap.addressMaker; closeDetail.discount = swap.discountTaker; closeDetail.nativeDealValue = swap.valueTaker; closeDetail.flatFeeValue = swap.flatFeeTaker; closeDetail.royalties = swap.royaltiesTaker; } // SPLIT ERC20 closeDetail.dealValue = 0; for(i=0; i<nfts.length; i++) { closeDetail.feeValue = 0; if(nfts[i].typeStd == typeStd.ERC20) { require(ERC20whiteList[nfts[i].dapp], "ERC20 - KO"); closeDetail.dealValue = nfts[i].blc[0]; // Check if exist a % fee if(swap.flagFlatFee == false) { if(!closeDetail.discount) { // If there is no discount, % fee on ERC20 is applied closeDetail.feeValue = calculateFees(closeDetail.dealValue); closeDetail.dealValue = closeDetail.dealValue.sub(closeDetail.feeValue); IERC20(nfts[i].dapp).transferFrom(closeDetail.from, referenceAddress.VAULT, closeDetail.feeValue); } } if(nfts[i].roy.length>0 && payment.flagRoyalties) closeDetail.dealValue = closeDetail.dealValue.sub(nfts[i].roy[0]); IERC20(nfts[i].dapp).transferFrom(closeDetail.from, closeDetail.to, closeDetail.dealValue); } else { require(!NFTblackList[nfts[i].dapp], "ERC721 - Blacklisted"); if(nfts[i].typeStd == typeStd.ERC721) { IERC721(nfts[i].dapp).safeTransferFrom(closeDetail.from, closeDetail.to, nfts[i].tokenId[0], nfts[i].data); } else if(nfts[i].typeStd == typeStd.ERC1155) { IERC1155(nfts[i].dapp).safeBatchTransferFrom(closeDetail.from, closeDetail.to, nfts[i].tokenId, nfts[i].blc, nfts[i].data); } } } // Split native token closeDetail.feeValue = 0; // Check if there is a % fee in the order. If was created without the %, is flat if(swap.flagFlatFee == false) { if(closeDetail.discount) { if(closeDetail.nativeDealValue>0) closeDetail.fee = closeDetail.fee.add(closeDetail.nativeDealValue).sub(closeDetail.royalties); } else { closeDetail.feeValue = calculateFees(closeDetail.nativeDealValue); closeDetail.nativeDealValue = closeDetail.nativeDealValue.sub(closeDetail.feeValue).sub(closeDetail.royalties); closeDetail.vaultFee = closeDetail.feeValue.add(closeDetail.flatFeeValue); if(closeDetail.nativeDealValue>0) closeDetail.fee = closeDetail.fee.add(closeDetail.nativeDealValue); } } else { // Flat fee if(!closeDetail.discount) { closeDetail.vaultFee = closeDetail.feeValue.add(closeDetail.flatFeeValue); } if(closeDetail.nativeDealValue>0) closeDetail.fee = closeDetail.fee.add(closeDetail.nativeDealValue).sub(closeDetail.royalties); } require(transferFees(closeDetail.to, closeDetail.fee), "Fee"); return closeDetail.vaultFee; } /// @notice This function is used for pause/unpause the smart contract /// @dev This function is used for pause the smart contract /// @param _paused true or false for enable/disable the pause function pauseContract(bool _paused) public onlyOwner { _paused?_pause():_unpause(); } /// @notice Check if an ERC20 is enabled or disabled on the platform /// @dev Check if an ERC20 is enabled or disabled on the platform. By default all ERC20 are disabled /// @param _address address of an ERC20 /// @return true or false if the asset is whitelisted or not function getERC20WhiteList(address _address) public view returns(bool) { return ERC20whiteList[_address]; } /// @notice Check if an ERC721/ERC1155 is enabled or disabled on the platform /// @dev Check if an ERC721/ERC1155 is enabled or disabled on the platform. By default all ERC721/ERC1155 are enabled /// @param _address address of an ERC721/ERC1155 /// @return this function return true if the asset is not blacklisted, false if is blacklisted function getNFTBlacklist(address _address) public view returns(bool) { return !NFTblackList[_address]; } /// @notice This function is used internally for calculate the platform fee /// @dev This function is used internally for calculate the platform fee /// @param _amount uint256 value involved in the deal /// @return the fee that should be paid to the protocol if the % fee are enabled function calculateFees(uint256 _amount) private view returns(uint256) { return ((_amount * payment.bps) / (payment.scalePercent)); } /// @notice This function is used internally for send the native tokens to other accounts /// @dev This function is used internally for send the the native tokens to other accounts /// @param _to address is the address that will receive the _amount /// @param _amount uint256 value involved in the deal /// @return true or false if the transfer worked out function transferFees(address _to, uint256 _amount) private returns(bool) { bool success = true; if(_amount>0) (success, ) = payable(_to).call{value: _amount}(""); return success; } /// @notice This function is used to get the master infos about a swap /// @dev This function is used to get infos about a swap. /// @param _swapId identifier of the order /// @return swapIntent that is master order of the interested swap function getSwapIntentById(uint256 _swapId) public view returns(swapIntent memory) { return swapMapping[_swapId]; } /// @notice This function is used how many assets assets are involved in the swap. /// @dev This function is used how many assets assets are involved in the swap. It will be used to call later the getSwapStruct /// @param _swapId identifier of the order /// @param _nfts bool used to check the assets on creator(true) or counterparty(false) side /// @return the size of the deal. It's used on frontend for recover the whole party deal function getSwapStructSize(uint256 _swapId, bool _nfts) public view returns(uint256) { if(_nfts) return nftsMaker[_swapId].length; else return nftsTaker[_swapId].length; } /// @notice This function is used to get the details of the assets involved in a swap /// @dev This function is used to get the details of the assets involved in a swap, from tokenID for ERC721/ERC1155 to the balances for ERC1155/ERC20 /// @param _swapId identifier of the order /// @param _nfts bool used to check the assets on creator(true) or counterparty(false) side /// @param _index uint256 inded used to get the detail of an asset /// @return the detail of the interested struct function getSwapStruct(uint256 _swapId, bool _nfts, uint256 _index) public view returns(swapStruct memory) { if(_nfts) return nftsMaker[_swapId][_index]; else return nftsTaker[_swapId][_index]; } /// @dev This modifier avoid to create swaps in which a party involved is without assets modifier checkAssets(swapIntent memory _swapIntent, swapStruct[] memory _nftsMaker, swapStruct[] memory _nftsTaker) { require(((_swapIntent.valueMaker > 0 || _nftsMaker.length > 0)&&(_swapIntent.valueTaker > 0 || _nftsTaker.length > 0)), "No assets"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// 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; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT 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; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Lookup engine interface */ interface IRoyaltyEngineV1 is IERC165 { /** * Get the royalty for a given token (address, id) and value amount. Does not cache the bps/amounts. Caches the spec for a given token address * * @param tokenAddress - The address of the token * @param tokenId - The id of the token * @param value - The value you wish to get the royalty of * * returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get */ function getRoyalty(address tokenAddress, uint256 tokenId, uint256 value) external returns(address payable[] memory recipients, uint256[] memory amounts); /** * View only version of getRoyalty * * @param tokenAddress - The address of the token * @param tokenId - The id of the token * @param value - The value you wish to get the royalty of * * returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get */ function getRoyaltyView(address tokenAddress, uint256 tokenId, uint256 value) external view returns(address payable[] memory recipients, uint256[] memory amounts); }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_swapId","type":"uint256"},{"indexed":true,"internalType":"address","name":"_counterpart","type":"address"}],"name":"counterpartEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_payer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"paymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_flagFlatFee","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_flatFee","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_flagRoyalties","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_bps","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_scalePercent","type":"uint256"}],"name":"paymentStructEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_engineAddress","type":"address"},{"indexed":false,"internalType":"address","name":"_tradeSquad","type":"address"},{"indexed":false,"internalType":"address","name":"_partnerSquad","type":"address"},{"indexed":false,"internalType":"address","name":"_vault","type":"address"}],"name":"referenceAddressEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_creator","type":"address"},{"indexed":true,"internalType":"uint256","name":"_time","type":"uint256"},{"indexed":true,"internalType":"enum NFTTraderSwapRoyaltiesV1.swapStatus","name":"_status","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"_swapId","type":"uint256"},{"indexed":false,"internalType":"address","name":"_counterpart","type":"address"},{"indexed":false,"internalType":"address","name":"_referral","type":"address"}],"name":"swapEvent","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bannedAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"}],"name":"cancelSwapIntent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"},{"internalType":"address","name":"_referral","type":"address"}],"name":"closeSwapIntent","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address payable","name":"addressMaker","type":"address"},{"internalType":"bool","name":"discountMaker","type":"bool"},{"internalType":"uint256","name":"valueMaker","type":"uint256"},{"internalType":"uint256","name":"flatFeeMaker","type":"uint256"},{"internalType":"address payable","name":"addressTaker","type":"address"},{"internalType":"bool","name":"discountTaker","type":"bool"},{"internalType":"uint256","name":"valueTaker","type":"uint256"},{"internalType":"uint256","name":"flatFeeTaker","type":"uint256"},{"internalType":"uint256","name":"swapStart","type":"uint256"},{"internalType":"uint256","name":"swapEnd","type":"uint256"},{"internalType":"bool","name":"flagFlatFee","type":"bool"},{"internalType":"bool","name":"flagRoyalties","type":"bool"},{"internalType":"enum NFTTraderSwapRoyaltiesV1.swapStatus","name":"status","type":"uint8"},{"internalType":"uint256","name":"royaltiesMaker","type":"uint256"},{"internalType":"uint256","name":"royaltiesTaker","type":"uint256"}],"internalType":"struct NFTTraderSwapRoyaltiesV1.swapIntent","name":"_swapIntent","type":"tuple"},{"components":[{"internalType":"address","name":"dapp","type":"address"},{"internalType":"enum NFTTraderSwapRoyaltiesV1.typeStd","name":"typeStd","type":"uint8"},{"internalType":"uint256[]","name":"tokenId","type":"uint256[]"},{"internalType":"uint256[]","name":"blc","type":"uint256[]"},{"internalType":"uint256[]","name":"roy","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NFTTraderSwapRoyaltiesV1.swapStruct[]","name":"_nftsMaker","type":"tuple[]"},{"components":[{"internalType":"address","name":"dapp","type":"address"},{"internalType":"enum NFTTraderSwapRoyaltiesV1.typeStd","name":"typeStd","type":"uint8"},{"internalType":"uint256[]","name":"tokenId","type":"uint256[]"},{"internalType":"uint256[]","name":"blc","type":"uint256[]"},{"internalType":"uint256[]","name":"roy","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NFTTraderSwapRoyaltiesV1.swapStruct[]","name":"_nftsTaker","type":"tuple[]"},{"internalType":"address","name":"_referral","type":"address"}],"name":"createSwapIntent","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"},{"internalType":"address payable","name":"_counterPart","type":"address"}],"name":"editCounterPart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"flipBannedAddressState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipRoyaltiesState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getERC20WhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getNFTBlacklist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"}],"name":"getSwapIntentById","outputs":[{"components":[{"internalType":"address payable","name":"addressMaker","type":"address"},{"internalType":"bool","name":"discountMaker","type":"bool"},{"internalType":"uint256","name":"valueMaker","type":"uint256"},{"internalType":"uint256","name":"flatFeeMaker","type":"uint256"},{"internalType":"address payable","name":"addressTaker","type":"address"},{"internalType":"bool","name":"discountTaker","type":"bool"},{"internalType":"uint256","name":"valueTaker","type":"uint256"},{"internalType":"uint256","name":"flatFeeTaker","type":"uint256"},{"internalType":"uint256","name":"swapStart","type":"uint256"},{"internalType":"uint256","name":"swapEnd","type":"uint256"},{"internalType":"bool","name":"flagFlatFee","type":"bool"},{"internalType":"bool","name":"flagRoyalties","type":"bool"},{"internalType":"enum NFTTraderSwapRoyaltiesV1.swapStatus","name":"status","type":"uint8"},{"internalType":"uint256","name":"royaltiesMaker","type":"uint256"},{"internalType":"uint256","name":"royaltiesTaker","type":"uint256"}],"internalType":"struct NFTTraderSwapRoyaltiesV1.swapIntent","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"},{"internalType":"bool","name":"_nfts","type":"bool"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getSwapStruct","outputs":[{"components":[{"internalType":"address","name":"dapp","type":"address"},{"internalType":"enum NFTTraderSwapRoyaltiesV1.typeStd","name":"typeStd","type":"uint8"},{"internalType":"uint256[]","name":"tokenId","type":"uint256[]"},{"internalType":"uint256[]","name":"blc","type":"uint256[]"},{"internalType":"uint256[]","name":"roy","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct NFTTraderSwapRoyaltiesV1.swapStruct","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapId","type":"uint256"},{"internalType":"bool","name":"_nfts","type":"bool"}],"name":"getSwapStructSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"pauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payment","outputs":[{"internalType":"bool","name":"flagFlatFee","type":"bool"},{"internalType":"bool","name":"flagRoyalties","type":"bool"},{"internalType":"uint256","name":"flatFee","type":"uint256"},{"internalType":"uint256","name":"bps","type":"uint256"},{"internalType":"uint256","name":"scalePercent","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referenceAddress","outputs":[{"internalType":"address","name":"ROYALTYENGINEADDRESS","type":"address"},{"internalType":"address","name":"TRADESQUAD","type":"address"},{"internalType":"address","name":"PARTNERSQUAD","type":"address"},{"internalType":"address payable","name":"VAULT","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dapp","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setERC20Whitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dapp","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setNFTBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_flagFlatFee","type":"bool"},{"internalType":"uint256","name":"_flatFee","type":"uint256"},{"internalType":"bool","name":"_flagRoyalties","type":"bool"},{"internalType":"uint256","name":"_bps","type":"uint256"},{"internalType":"uint256","name":"_scalePercent","type":"uint256"}],"name":"setPaymentStruct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_engineAddress","type":"address"},{"internalType":"address","name":"_tradeSquad","type":"address"},{"internalType":"address","name":"_partnerSquad","type":"address"},{"internalType":"address payable","name":"_vault","type":"address"}],"name":"setReferenceAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b506200001d3362000034565b6000805460ff60a01b191690556001805562000084565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b615a6080620000946000396000f3fe6080604052600436106101445760003560e01c8063715018a6116100b6578063c688407d1161006f578063c688407d1461048d578063cf14e557146104a2578063dc788a24146104c2578063e272b892146104e2578063e388272014610502578063f2fde38b1461052257600080fd5b8063715018a6146103875780638cb729001461039c5780638da5cb5b14610402578063933e9a831461042a57806398aac2161461044a578063bfeabea01461045d57600080fd5b806337295c5e1161010857806337295c5e1461028d57806342a22917146102a057806342f6487a146102ce57806352cfba86146103285780635c975abb14610348578063692b67af1461036757600080fd5b806307ce9888146101855780630e2f3afb146101bb5780631da8f01c146101dd57806323e0aa4c146102275780632afa70a51461025457600080fd5b366101805760405134815233907f0de0271e0148b63e6b759917905b6ae5d995f6081392a30b9fa9e23bb4fb98719060200160405180910390a2005b600080fd5b34801561019157600080fd5b506101a56101a0366004614dea565b610542565b6040516101b29190614e44565b60405180910390f35b3480156101c757600080fd5b506101db6101d6366004614f48565b6106cb565b005b3480156101e957600080fd5b506102176101f8366004614fa4565b6001600160a01b03166000908152600c602052604090205460ff161590565b60405190151581526020016101b2565b34801561023357600080fd5b50610247610242366004614fda565b610799565b6040516101b2919061509a565b34801561026057600080fd5b5061021761026f366004614fa4565b6001600160a01b03166000908152600b602052604090205460ff1690565b6101db61029b36600461513f565b610a24565b3480156102ac57600080fd5b506102c06102bb36600461516f565b610f77565b6040519081526020016101b2565b3480156102da57600080fd5b50600754600854600954600a546102fe9360ff808216946101009092041692909185565b6040805195151586529315156020860152928401919091526060830152608082015260a0016101b2565b34801561033457600080fd5b506101db610343366004615194565b610fab565b34801561035457600080fd5b50600054600160a01b900460ff16610217565b34801561037357600080fd5b506101db6103823660046151c2565b611000565b34801561039357600080fd5b506101db6110f9565b3480156103a857600080fd5b506003546004546005546006546103cf936001600160a01b03908116938116928116911684565b604080516001600160a01b03958616815293851660208501529184169183019190915290911660608201526080016101b2565b34801561040e57600080fd5b506000546040516001600160a01b0390911681526020016101b2565b34801561043657600080fd5b506101db610445366004614fa4565b61112f565b6101db61045836600461550b565b611182565b34801561046957600080fd5b50610217610478366004614fa4565b600d6020526000908152604090205460ff1681565b34801561049957600080fd5b506101db611580565b3480156104ae57600080fd5b506101db6104bd36600461513f565b6115c7565b3480156104ce57600080fd5b506101db6104dd366004614dea565b611784565b3480156104ee57600080fd5b506101db6104fd36600461566e565b611a52565b34801561050e57600080fd5b506101db61051d366004615194565b611a94565b34801561052e57600080fd5b506101db61053d366004614fa4565b611ae9565b6105c0604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905290610180820190815260200160008152602001600081525090565b60008281526010602090815260409182902082516101e08101845281546001600160a01b03808216835260ff600160a01b92839004811615159584019590955260018401549583019590955260028084015460608401526003840154958616608084015294048316151560a0820152600482015460c0820152600582015460e0820152600682015461010080830191909152600783015461012083015260088301548085161515610140840152908104841615156101608301529093919261018085019262010000909204169081111561069c5761069c614e03565b60028111156106ad576106ad614e03565b815260098201546020820152600a9091015460409091015292915050565b6000546001600160a01b031633146106fe5760405162461bcd60e51b81526004016106f59061568b565b60405180910390fd5b600380546001600160a01b038681166001600160a01b031992831681179093556004805487831690841681179091556005805487841690851681179091556006805493871693909416831790935560408051948552602085019190915283019190915260608201527fc5cb77844c2821bc73301c138b37ba68eac05d5ce3db478bb17e2efe818d38069060800160405180910390a150505050565b6107d36040805160c08101909152600080825260208201908152602001606081526020016060815260200160608152602001606081525090565b82156109fd576000848152600e602052604090208054839081106107f9576107f96156c0565b60009182526020918290206040805160c0810190915260059092020180546001600160a01b0381168352919290919083019060ff600160a01b90910416600281111561084757610847614e03565b600281111561085857610858614e03565b8152602001600182018054806020026020016040519081016040528092919081815260200182805480156108ab57602002820191906000526020600020905b815481526020019060010190808311610897575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561090357602002820191906000526020600020905b8154815260200190600101908083116108ef575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561095b57602002820191906000526020600020905b815481526020019060010190808311610947575b50505050508152602001600482018054610974906156d6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a0906156d6565b80156109ed5780601f106109c2576101008083540402835291602001916109ed565b820191906000526020600020905b8154815290600101906020018083116109d057829003601f168201915b5050505050815250509050610a1d565b6000848152600f602052604090208054839081106107f9576107f96156c0565b9392505050565b600054600160a01b900460ff1615610a4e5760405162461bcd60e51b81526004016106f590615711565b60026001541415610aa15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106f5565b60026001818155600084815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b928390048116151596840196909652968301549382019390935281870154606082015260038201549586166080820152919094048216151560a0820152600484015460c0820152600584015460e0820152600684015461010080830191909152600785015461012083015260088501548084161515610140840152908104831615156101608301529294909392610180850192620100009091041690811115610b8357610b83614e03565b6002811115610b9457610b94614e03565b81526009820154602080830191909152600a90920154604091820152336000908152600d9092528120549192509060ff1615610bfb5760405162461bcd60e51b815260206004820152600660248201526510985b9b995960d21b60448201526064016106f5565b60008261018001516002811115610c1457610c14614e03565b14610c495760405162461bcd60e51b815260206004820152600560248201526410a7b832b760d91b60448201526064016106f5565b60808201516001600160a01b0316331480610c6f575060808201516001600160a01b0316155b610cc95760405162461bcd60e51b815260206004820152602560248201527f596f75277265206e6f742074686520696e746572657374656420636f756e74656044820152641c9c185c9d60da1b60648201526084016106f5565b81608001516001600160a01b031682600001516001600160a01b03161415610d215760405162461bcd60e51b815260206004820152600b60248201526a36b0b5b2b91eba30b5b2b960a91b60448201526064016106f5565b428261012001511015610d605760405162461bcd60e51b8152602060048201526007602482015266115e1c1a5c995960ca1b60448201526064016106f5565b6002548410610d995760405162461bcd60e51b81526020600482015260056024820152646964204b4f60d81b60448201526064016106f5565b60008481526010602052604090206003810180546001600160a01b0319163317905560088101805462ff000019166201000017905542600790910155610ddd611b81565b600086815260106020526040902060058101829055600381018054931515600160a01b0260ff60a01b1990941693909317909255600490910154610e2091611c86565b341015610e605760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420656e6f7567682057454960901b60448201526064016106f5565b600084815260106020526040902060080154610100900460ff1615610e8857610e8884611c92565b610e9384600161234d565b9050610eaa610ea385600061234d565b8290611c86565b600654909150610ec3906001600160a01b031682613117565b610edf5760405162461bcd60e51b81526004016106f59061573b565b6001610eee620151804261576e565b610ef89042615798565b600086815260106020526040908190206003015490516001600160a01b03909116907f8873f53f40d4865bac9c1e8998aef3351bb1ef3db1a6923ab09621cf1a6659a990610f6590899033908a909283526001600160a01b03918216602084015216604082015260600190565b60405180910390a45050600180555050565b60008115610f9457506000828152600e6020526040902054610fa5565b506000828152600f60205260409020545b92915050565b6000546001600160a01b03163314610fd55760405162461bcd60e51b81526004016106f59061568b565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000546001600160a01b0316331461102a5760405162461bcd60e51b81526004016106f59061568b565b61271081101561106f5760405162461bcd60e51b815260206004820152601060248201526f04d757374206265203e3d2031303030360841b60448201526064016106f5565b600780546008869055841515610100810261ff001989151590811661ffff1990941693909317179092556009849055600a839055604080519182526020820187905281019190915260608101839052608081018290527f55571d671d5bf0796b89825316f71d9e49f112498c6426cc82c004f105a0b7e59060a00160405180910390a15050505050565b6000546001600160a01b031633146111235760405162461bcd60e51b81526004016106f59061568b565b61112d600061317a565b565b6000546001600160a01b031633146111595760405162461bcd60e51b81526004016106f59061568b565b6001600160a01b03166000908152600d60205260409020805460ff19811660ff90911615179055565b600054600160a01b900460ff16156111ac5760405162461bcd60e51b81526004016106f590615711565b8383836000836040015111806111c3575060008251115b80156111de575060008360c0015111806111de575060008151115b6112165760405162461bcd60e51b81526020600482015260096024820152684e6f2061737365747360b81b60448201526064016106f5565b336000908152600d602052604090205460ff161561125f5760405162461bcd60e51b815260206004820152600660248201526510985b9b995960d21b60448201526064016106f5565b60075460ff80821615156101408a0152610100909104161515610160880152611286611b81565b60608901819052901515602089015260408801516112a391611c86565b3410156112e45760405162461bcd60e51b815260206004820152600f60248201526e135bdc99481dd95a481b9959591959608a1b60448201526064016106f5565b3380885260808801516001600160a01b031614156113325760405162461bcd60e51b815260206004820152600b60248201526a36b0b5b2b91eba30b5b2b960a91b60448201526064016106f5565b4261010088015261012087015161135b576113504262093a80611c86565b610120880152611387565b61012087015161136e90620151806131ca565b61012088018190526113809042611c86565b6101208801525b600061018088018190525060006101a088018190526101c08801819052600280548252601060209081526040928390208a518154928c01511515600160a01b9081026001600160a81b03199485166001600160a01b0393841617178355948c0151600183015560608c01518285015560808c015160038301805460a08f015115159097029690941691161793909317905560c0890151600483015560e08901516005830155610100808a015160068401556101208a015160078401556101408a01516008840180546101608d0151151590930261ff00199215159290921661ffff1990931692909217178082556101808b01518b949390929162ff00001916906201000090849081111561149d5761149d614e03565b02179055506101a082015160098201556101c090910151600a909101556114ce6114c660025490565b8760016131d6565b6114e26114da60025490565b8660006131d6565b86610180015160028111156114f9576114f9614e03565b611506620151804261576e565b6115109042615798565b337f8873f53f40d4865bac9c1e8998aef3351bb1ef3db1a6923ab09621cf1a6659a961153b60025490565b60808c0151604080519283526001600160a01b039182166020840152908a169082015260600160405180910390a4611577600280546001019055565b50505050505050565b6000546001600160a01b031633146115aa5760405162461bcd60e51b81526004016106f59061568b565b6007805461ff001981166101009182900460ff1615909102179055565b600082815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b92839004811615159684019690965260018401549483019490945260028084015460608401526003840154948516608084015293048416151560a0820152600482015460c0820152600582015460e0820152600682015461010080830191909152600783015461012083015260088301548086161515610140840152908104851615156101608301529093919261018085019262010000909204909116908111156116a4576116a4614e03565b60028111156116b5576116b5614e03565b815260098201546020820152600a9091015460409091015280519091506001600160a01b0316331480156116f25750336001600160a01b03831614155b6117275760405162461bcd60e51b815260206004820152600660248201526510a7bbb732b960d11b60448201526064016106f5565b60008381526010602052604080822060030180546001600160a01b0319166001600160a01b0386169081179091559051909185917f6ab84ca265343a9acd1372475058656eed302fede45a9ae2ed2c6254dee8e1689190a3505050565b600260015414156117d75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106f5565b60026001818155600083815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b928390048116151596840196909652968301549382019390935281870154606082015260038201549586166080820152919094048216151560a0820152600484015460c0820152600584015460e08201526006840154610100808301919091526007850154610120830152600885015480841615156101408401529081048316151561016083015292949093926101808501926201000090910416908111156118b9576118b9614e03565b60028111156118ca576118ca614e03565b815260098201546020820152600a9091015460409091015280519091506001600160a01b031633146119275760405162461bcd60e51b815260206004820152600660248201526510a7bbb732b960d11b60448201526064016106f5565b6000816101800151600281111561194057611940614e03565b146119755760405162461bcd60e51b815260206004820152600560248201526410a7b832b760d91b60448201526064016106f5565b600061199282606001518360400151611c8690919063ffffffff16565b6000848152601060205260409020426007820155600801805491925060029162ff000019166201000083021790555060026119d0620151804261576e565b6119da9042615798565b6040805186815260006020820181905281830152905133917f8873f53f40d4865bac9c1e8998aef3351bb1ef3db1a6923ab09621cf1a6659a9919081900360600190a48015611a4957611a2d3382613117565b611a495760405162461bcd60e51b81526004016106f59061573b565b50506001805550565b6000546001600160a01b03163314611a7c5760405162461bcd60e51b81526004016106f59061568b565b80611a8c57611a896138a5565b50565b611a89613942565b6000546001600160a01b03163314611abe5760405162461bcd60e51b81526004016106f59061568b565b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314611b135760405162461bcd60e51b81526004016106f59061568b565b6001600160a01b038116611b785760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f5565b611a898161317a565b600480546040516370a0823160e01b81523392810192909252600091829182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611bd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf791906157af565b1180611c6d57506005546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6b91906157af565b115b15611c7c575060019160009150565b5050600854600091565b6000610a1d82846157c8565b600081815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b92839004811615159684019690965260018401549483019490945260028084015460608401526003840154948516608084015293048416151560a0820152600482015460c0820152600582015460e082015260068201546101008083019190915260078301546101208301526008830154808616151561014084015290810485161515610160830152909391926101808501926201000090920490911690811115611d6f57611d6f614e03565b6002811115611d8057611d80614e03565b815260200160098201548152602001600a820154815250509050611dcb6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b6040805160a081018252600060208201819052818301819052606082018190526080820152600180845281529083015115611e0857600160208301525b60c083015115611e1a57600160208201525b6000848152600e60209081526040808320805482518185028101850190935280835261206294879484015b828210156120595760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff166002811115611e9b57611e9b614e03565b6002811115611eac57611eac614e03565b815260200160018201805480602002602001604051908101604052809291908181526020018280548015611eff57602002820191906000526020600020905b815481526020019060010190808311611eeb575b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015611f5757602002820191906000526020600020905b815481526020019060010190808311611f43575b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015611faf57602002820191906000526020600020905b815481526020019060010190808311611f9b575b50505050508152602001600482018054611fc8906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611ff4906156d6565b80156120415780601f1061201657610100808354040283529160200191612041565b820191906000526020600020905b81548152906001019060200180831161202457829003601f168201915b50505050508152505081526020019060010190611e45565b505050506139a7565b151582526000858152600f6020908152604080832080548251818502810185019093528083529496506122ae94869492939192909184015b828210156120595760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff1660028111156120f0576120f0614e03565b600281111561210157612101614e03565b81526020016001820180548060200260200160405190810160405280929190818152602001828054801561215457602002820191906000526020600020905b815481526020019060010190808311612140575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156121ac57602002820191906000526020600020905b815481526020019060010190808311612198575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561220457602002820191906000526020600020905b8154815260200190600101908083116121f0575b5050505050815260200160048201805461221d906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054612249906156d6565b80156122965780601f1061226b57610100808354040283529160200191612296565b820191906000526020600020905b81548152906001019060200180831161227957829003601f168201915b5050505050815250508152602001906001019061209a565b15801584529091506122fd578160200151806122cb575081604001515b80156122e357508060600151806122e3575080608001515b6122f057600082526122fd565b6122fd8282600187613bb1565b80511561234757806020015180612315575080604001515b801561232d575081606001518061232d575081608001515b61233a5760008152612347565b6123478183600087613bb1565b50505050565b600082815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b92839004811615159684019690965260018401549483019490945260028084015460608401526003840154948516608084015293048416151560a0820152600482015460c0820152600582015460e08201526006820154610100808301919091526007830154610120830152600883015480861615156101408401529081048516151561016083015285949193610180850192620100009092049091169081111561242a5761242a614e03565b600281111561243b5761243b614e03565b815260200160098201548152602001600a8201548152505090506124bf60405180610140016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600015158152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60606000851561275c576000878152600e6020908152604080832080548251818502810185019093528083529193909284015b828210156127065760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff16600281111561254857612548614e03565b600281111561255957612559614e03565b8152602001600182018054806020026020016040519081016040528092919081815260200182805480156125ac57602002820191906000526020600020905b815481526020019060010190808311612598575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561260457602002820191906000526020600020905b8154815260200190600101908083116125f0575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561265c57602002820191906000526020600020905b815481526020019060010190808311612648575b50505050508152602001600482018054612675906156d6565b80601f01602080910402602001604051908101604052809291908181526020018280546126a1906156d6565b80156126ee5780601f106126c3576101008083540402835291602001916126ee565b820191906000526020600020905b8154815290600101906020018083116126d157829003601f168201915b505050505081525050815260200190600101906124f2565b505086516001600160a01b039081168752608088015116602080880191909152870151151560408088019190915287015160e0870152505060608501516101008501526101a085015161012085015291506129e9565b6000878152600f6020908152604080832080548251818502810185019093528083529193909284015b828210156129995760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff1660028111156127db576127db614e03565b60028111156127ec576127ec614e03565b81526020016001820180548060200260200160405190810160405280929190818152602001828054801561283f57602002820191906000526020600020905b81548152602001906001019080831161282b575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561289757602002820191906000526020600020905b815481526020019060010190808311612883575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156128ef57602002820191906000526020600020905b8154815260200190600101908083116128db575b50505050508152602001600482018054612908906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054612934906156d6565b80156129815780601f1061295657610100808354040283529160200191612981565b820191906000526020600020905b81548152906001019060200180831161296457829003601f168201915b50505050508152505081526020019060010190612785565b50505060808601516001600160a01b03908116865286511660208601525060a08501511515604085015260c085015160e0808601919091528501516101008501526101c085015161012085015291505b506000608083018190525b8151811015612fc257600060608401819052828281518110612a1857612a186156c0565b6020026020010151602001516002811115612a3557612a35614e03565b1415612cfb57600b6000838381518110612a5157612a516156c0565b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff16612ab25760405162461bcd60e51b815260206004820152600a6024820152694552433230202d204b4f60b01b60448201526064016106f5565b818181518110612ac457612ac46156c0565b602002602001015160600151600081518110612ae257612ae26156c0565b60209081029190910101516080840152610140840151612bcb578260400151612bcb57612b128360800151614ced565b606084018190526080840151612b2791614d0b565b60808401528151829082908110612b4057612b406156c0565b602090810291909101015151835160065460608601516040516323b872dd60e01b81526001600160a01b03948516946323b872dd94612b869490939116916004016157e0565b6020604051808303816000875af1158015612ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bc99190615804565b505b6000828281518110612bdf57612bdf6156c0565b60200260200101516080015151118015612c005750600754610100900460ff165b15612c5957612c53828281518110612c1a57612c1a6156c0565b602002602001015160800151600081518110612c3857612c386156c0565b60200260200101518460800151614d0b90919063ffffffff16565b60808401525b818181518110612c6b57612c6b6156c0565b6020026020010151600001516001600160a01b03166323b872dd8460000151856020015186608001516040518463ffffffff1660e01b8152600401612cb2939291906157e0565b6020604051808303816000875af1158015612cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cf59190615804565b50612fb0565b600c6000838381518110612d1157612d116156c0565b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff1615612d7d5760405162461bcd60e51b8152602060048201526014602482015273115490cdcc8c480b48109b1858dadb1a5cdd195960621b60448201526064016106f5565b6001828281518110612d9157612d916156c0565b6020026020010151602001516002811115612dae57612dae614e03565b1415612e9657818181518110612dc657612dc66156c0565b6020026020010151600001516001600160a01b031663b88d4fde84600001518560200151858581518110612dfc57612dfc6156c0565b602002602001015160400151600081518110612e1a57612e1a6156c0565b6020026020010151868681518110612e3457612e346156c0565b602002602001015160a001516040518563ffffffff1660e01b8152600401612e5f9493929190615821565b600060405180830381600087803b158015612e7957600080fd5b505af1158015612e8d573d6000803e3d6000fd5b50505050612fb0565b6002828281518110612eaa57612eaa6156c0565b6020026020010151602001516002811115612ec757612ec7614e03565b1415612fb057818181518110612edf57612edf6156c0565b6020026020010151600001516001600160a01b0316632eb2c2d684600001518560200151858581518110612f1557612f156156c0565b602002602001015160400151868681518110612f3357612f336156c0565b602002602001015160600151878781518110612f5157612f516156c0565b602002602001015160a001516040518663ffffffff1660e01b8152600401612f7d95949392919061585e565b600060405180830381600087803b158015612f9757600080fd5b505af1158015612fab573d6000803e3d6000fd5b505050505b80612fba816158bc565b9150506129f4565b600060608401526101408401516130845782604001511561301c5760e0830151156130175761301183610120015161300b8560e001518660c00151611c8690919063ffffffff16565b90614d0b565b60c08401525b6130db565b6130298360e00151614ced565b6060840181905261012084015160e08501516130499261300b9190614d0b565b60e0840152610100830151606084015161306291611c86565b60a084015260e0830151156130175760e083015160c084015161301191611c86565b82604001516130a75761010083015160608401516130a191611c86565b60a08401525b60e0830151156130db576130d583610120015161300b8560e001518660c00151611c8690919063ffffffff16565b60c08401525b6130ed83602001518460c00151613117565b6131095760405162461bcd60e51b81526004016106f59061573b565b505060a00151949350505050565b600060018215610a1d576040516001600160a01b038516908490600081818185875af1925050503d806000811461316a576040519150601f19603f3d011682016040523d82523d6000602084013e61316f565b606091505b509095945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610a1d82846158d7565b6000805b835182101561389e5760008483815181106131f7576131f76156c0565b602002602001015160200151600281111561321457613214614e03565b141561337557600b6000858481518110613230576132306156c0565b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff1680156132825750838281518110613271576132716156c0565b602002602001015160800151516001145b80156132ac575083828151811061329b5761329b6156c0565b602002602001015160600151516001145b80156132ef575060008483815181106132c7576132c76156c0565b6020026020010151606001516000815181106132e5576132e56156c0565b6020026020010151115b6133325760405162461bcd60e51b81526020600482015260146024820152734552433230202d20436865636b2076616c75657360601b60448201526064016106f5565b6000848381518110613346576133466156c0565b602002602001015160800151600081518110613364576133646156c0565b602002602001018181525050613674565b600c600085848151811061338b5761338b6156c0565b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff16156133f75760405162461bcd60e51b8152602060048201526014602482015273115490cdcc8c480b48109b1858dadb1a5cdd195960621b60448201526064016106f5565b600184838151811061340b5761340b6156c0565b602002602001015160200151600281111561342857613428614e03565b141561349c57838281518110613440576134406156c0565b6020026020010151604001515160011461349c5760405162461bcd60e51b815260206004820152601860248201527f455243373231202d204d697373696e6720746f6b656e4964000000000000000060448201526064016106f5565b60028483815181106134b0576134b06156c0565b60200260200101516020015160028111156134cd576134cd614e03565b14156136745760008483815181106134e7576134e76156c0565b6020026020010151604001515111801561351f57506000848381518110613510576135106156c0565b60200260200101516060015151115b80156135665750838281518110613538576135386156c0565b60200260200101516060015151848381518110613557576135576156c0565b60200260200101516040015151145b6135b25760405162461bcd60e51b815260206004820152601960248201527f45524331313535202d204d697373696e6720746f6b656e49640000000000000060448201526064016106f5565b5060005b8382815181106135c8576135c86156c0565b602002602001015160600151518110156136745760008483815181106135f0576135f06156c0565b602002602001015160600151828151811061360d5761360d6156c0565b6020026020010151116136625760405162461bcd60e51b815260206004820152601d60248201527f45524331313535202d2042616c616e6365206d757374206265203e203000000060448201526064016106f5565b8061366c816158bc565b9150506135b6565b8215613785576000858152600e60205260409020845185908490811061369c5761369c6156c0565b6020908102919091018101518254600181018455600093845292829020815160059094020180546001600160a01b039094166001600160a01b0319851681178255928201519193909283916001600160a81b03191617600160a01b83600281111561370957613709614e03565b021790555060408201518051613729916001840191602090910190614d17565b5060608201518051613745916002840191602090910190614d17565b5060808201518051613761916003840191602090910190614d17565b5060a0820151805161377d916004840191602090910190614d62565b50505061388c565b6000858152600f6020526040902084518590849081106137a7576137a76156c0565b6020908102919091018101518254600181018455600093845292829020815160059094020180546001600160a01b039094166001600160a01b0319851681178255928201519193909283916001600160a81b03191617600160a01b83600281111561381457613814614e03565b021790555060408201518051613834916001840191602090910190614d17565b5060608201518051613850916002840191602090910190614d17565b506080820151805161386c916003840191602090910190614d17565b5060a08201518051613888916004840191602090910190614d62565b5050505b81613896816158bc565b9250506131da565b5050505050565b600054600160a01b900460ff166138f55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106f5565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff161561396c5760405162461bcd60e51b81526004016106f590615711565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586139253390565b6040805160a08101825260008082526020820181905291810182905260608101829052608081018290529080600181805b8651841015613b885760008785815181106139f5576139f56156c0565b6020026020010151602001516002811115613a1257613a12614e03565b1415613a245760016040890152613b76565b6001878581518110613a3857613a386156c0565b6020026020010151602001516002811115613a5557613a55614e03565b1415613acd576060880151613a9257600160608901528651879085908110613a7f57613a7f6156c0565b6020026020010151600001519150613acd565b868481518110613aa457613aa46156c0565b6020026020010151600001516001600160a01b0316826001600160a01b031614613acd57600092505b6002878581518110613ae157613ae16156c0565b6020026020010151602001516002811115613afe57613afe614e03565b1415613b76576080880151613b3b57600160808901528651879085908110613b2857613b286156c0565b6020026020010151600001519050613b76565b868481518110613b4d57613b4d6156c0565b6020026020010151600001516001600160a01b0316816001600160a01b031614613b7657600092505b83613b80816158bc565b9450506139d8565b87606001518015613b9a575087608001515b15613ba457600092505b5095969095509350505050565b600081815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b92839004811615159684019690965260018401549483019490945260028084015460608401526003840154948516608084015293048416151560a0820152600482015460c0820152600582015460e082015260068201546101008083019190915260078301546101208301526008830154808616151561014084015290810485161515610160830152909391926101808501926201000090920490911690811115613c8e57613c8e614e03565b6002811115613c9f57613c9f614e03565b815260200160098201548152602001600a820154815250509050600080600080606080613cdf604051806040016040528060608152602001606081525090565b8b602001518015613cfc57508a6060015180613cfc57508a608001515b156143325789613d19576000898152600e60205260409020613d28565b6000898152600f602052604090205b805480602002602001604051908101604052809291908181526020016000905b82821015613f5c5760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff166002811115613d9e57613d9e614e03565b6002811115613daf57613daf614e03565b815260200160018201805480602002602001604051908101604052809291908181526020018280548015613e0257602002820191906000526020600020905b815481526020019060010190808311613dee575b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015613e5a57602002820191906000526020600020905b815481526020019060010190808311613e46575b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015613eb257602002820191906000526020600020905b815481526020019060010190808311613e9e575b50505050508152602001600482018054613ecb906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054613ef7906156d6565b8015613f445780601f10613f1957610100808354040283529160200191613f44565b820191906000526020600020905b815481529060010190602001808311613f2757829003601f168201915b50505050508152505081526020019060010190613d48565b50505050925060009650600094505b825187108015613f79575084155b15614214576001838881518110613f9257613f926156c0565b6020026020010151602001516002811115613faf57613faf614e03565b1480613fe957506002838881518110613fca57613fca6156c0565b6020026020010151602001516002811115613fe757613fe7614e03565b145b156142025789156140fa5760035483516001600160a01b0390911690633e1040149085908a90811061401d5761401d6156c0565b602002602001015160000151858a8151811061403b5761403b6156c0565b602002602001015160400151600081518110614059576140596156c0565b60209081029190910181015160008e815260109092526040918290206001015491516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301526044820152606401600060405180830381865afa1580156140c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526140ee9190810190615951565b602083015281526141fd565b60035483516001600160a01b0390911690633e1040149085908a908110614123576141236156c0565b602002602001015160000151858a81518110614141576141416156c0565b60200260200101516040015160008151811061415f5761415f6156c0565b60209081029190910181015160008e8152601090925260409182902060049081015492516001600160e01b031960e087901b1681526001600160a01b039094169084015260248301526044820152606401600060405180830381865afa1580156141cd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526141f59190810190615951565b602083015281525b600194505b8661420c816158bc565b975050613f6b565b600096505b8060200151518710156143325789156142785761426181602001518881518110614245576142456156c0565b6020026020010151896101a00151611c8690919063ffffffff16565b60008a8152601060205260409020600901556142c0565b6142ad81602001518881518110614291576142916156c0565b6020026020010151896101c00151611c8690919063ffffffff16565b60008a8152601060205260409020600a01555b614304816000015188815181106142d9576142d96156c0565b6020026020010151826020015189815181106142f7576142f76156c0565b6020026020010151613117565b6143205760405162461bcd60e51b81526004016106f59061573b565b8661432a816158bc565b975050614219565b8b60400151801561434f57508a606001518061434f57508a608001515b15614cdf578961436c576000898152600f6020526040902061437b565b6000898152600e602052604090205b805480602002602001604051908101604052809291908181526020016000905b828210156145af5760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff1660028111156143f1576143f1614e03565b600281111561440257614402614e03565b81526020016001820180548060200260200160405190810160405280929190818152602001828054801561445557602002820191906000526020600020905b815481526020019060010190808311614441575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156144ad57602002820191906000526020600020905b815481526020019060010190808311614499575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561450557602002820191906000526020600020905b8154815260200190600101908083116144f1575b5050505050815260200160048201805461451e906156d6565b80601f016020809104026020016040519081016040528092919081815260200182805461454a906156d6565b80156145975780601f1061456c57610100808354040283529160200191614597565b820191906000526020600020905b81548152906001019060200180831161457a57829003601f168201915b5050505050815250508152602001906001019061439b565b505050509250896145cd576000898152600e602052604090206145dc565b6000898152600f602052604090205b805480602002602001604051908101604052809291908181526020016000905b828210156148105760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff16600281111561465257614652614e03565b600281111561466357614663614e03565b8152602001600182018054806020026020016040519081016040528092919081815260200182805480156146b657602002820191906000526020600020905b8154815260200190600101908083116146a2575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561470e57602002820191906000526020600020905b8154815260200190600101908083116146fa575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561476657602002820191906000526020600020905b815481526020019060010190808311614752575b5050505050815260200160048201805461477f906156d6565b80601f01602080910402602001604051908101604052809291908181526020018280546147ab906156d6565b80156147f85780601f106147cd576101008083540402835291602001916147f8565b820191906000526020600020905b8154815290600101906020018083116147db57829003601f168201915b505050505081525050815260200190600101906145fc565b505050509150600096505b8251871015614cdf576000838881518110614838576148386156c0565b602002602001015160200151600281111561485557614855614e03565b1415614ccd5760009550600094505b815186108015614872575084155b15614a1957600182878151811061488b5761488b6156c0565b60200260200101516020015160028111156148a8576148a8614e03565b14806148e2575060028287815181106148c3576148c36156c0565b60200260200101516020015160028111156148e0576148e0614e03565b145b15614a145760035482516001600160a01b0390911690633e10401490849089908110614910576149106156c0565b60200260200101516000015184898151811061492e5761492e6156c0565b60200260200101516040015160008151811061494c5761494c6156c0565b6020026020010151868b81518110614966576149666156c0565b602002602001015160600151600081518110614984576149846156c0565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381865afa1580156149e0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614a089190810190615951565b60208301528152600194505b614864565b60009350600095505b806020015151861015614c1d578915614b0957828781518110614a4757614a476156c0565b6020026020010151600001516001600160a01b03166323b872dd896000015183600001518981518110614a7c57614a7c6156c0565b602002602001015184602001518a81518110614a9a57614a9a6156c0565b60200260200101516040518463ffffffff1660e01b8152600401614ac0939291906157e0565b6020604051808303816000875af1158015614adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b039190615804565b50614bd9565b828781518110614b1b57614b1b6156c0565b6020026020010151600001516001600160a01b03166323b872dd896080015183600001518981518110614b5057614b506156c0565b602002602001015184602001518a81518110614b6e57614b6e6156c0565b60200260200101516040518463ffffffff1660e01b8152600401614b94939291906157e0565b6020604051808303816000875af1158015614bb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614bd79190615804565b505b614c0981602001518781518110614bf257614bf26156c0565b602002602001015185611c8690919063ffffffff16565b935085614c15816158bc565b965050614a22565b8915614c7a576000898152600e60205260409020805485919089908110614c4657614c466156c0565b9060005260206000209060050201600301600081548110614c6957614c696156c0565b600091825260209091200155614ccd565b6000898152600f60205260409020805485919089908110614c9d57614c9d6156c0565b9060005260206000209060050201600301600081548110614cc057614cc06156c0565b6000918252602090912001555b86614cd7816158bc565b97505061481b565b505050505050505050505050565b600a5460095460009190614d0190846158d7565b610fa59190615a16565b6000610a1d8284615798565b828054828255906000526020600020908101928215614d52579160200282015b82811115614d52578251825591602001919060010190614d37565b50614d5e929150614dd5565b5090565b828054614d6e906156d6565b90600052602060002090601f016020900481019282614d905760008555614d52565b82601f10614da957805160ff1916838001178555614d52565b82800160010185558215614d525791820182811115614d52578251825591602001919060010190614d37565b5b80821115614d5e5760008155600101614dd6565b600060208284031215614dfc57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60038110611a8957634e487b7160e01b600052602160045260246000fd5b614e4081614e19565b9052565b81516001600160a01b031681526101e081016020830151614e69602084018215159052565b5060408301516040830152606083015160608301526080830151614e9860808401826001600160a01b03169052565b5060a0830151614eac60a084018215159052565b5060c0838101519083015260e0808401519083015261010080840151908301526101208084015190830152610140808401511515908301526101608084015115159083015261018080840151614f0482850182614e37565b50506101a083810151908301526101c092830151929091019190915290565b6001600160a01b0381168114611a8957600080fd5b8035614f4381614f23565b919050565b60008060008060808587031215614f5e57600080fd5b8435614f6981614f23565b93506020850135614f7981614f23565b92506040850135614f8981614f23565b91506060850135614f9981614f23565b939692955090935050565b600060208284031215614fb657600080fd5b8135610a1d81614f23565b8015158114611a8957600080fd5b8035614f4381614fc1565b600080600060608486031215614fef57600080fd5b83359250602084013561500181614fc1565b929592945050506040919091013590565b600081518084526020808501945080840160005b8381101561504257815187529582019590820190600101615026565b509495945050505050565b6000815180845260005b8181101561507357602081850181015186830182015201615057565b81811115615085576000602083870101525b50601f01601f19169290920160200192915050565b602080825282516001600160a01b0316828201528201516000906150bd81614e19565b80604084015250604083015160c060608401526150dd60e0840182615012565b90506060840151601f19808584030160808601526150fb8383615012565b925060808601519150808584030160a08601526151188383615012565b925060a08601519150808584030160c086015250615136828261504d565b95945050505050565b6000806040838503121561515257600080fd5b82359150602083013561516481614f23565b809150509250929050565b6000806040838503121561518257600080fd5b82359150602083013561516481614fc1565b600080604083850312156151a757600080fd5b82356151b281614f23565b9150602083013561516481614fc1565b600080600080600060a086880312156151da57600080fd5b85356151e581614fc1565b94506020860135935060408601356151fc81614fc1565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561524d5761524d615214565b60405290565b6040516101e0810167ffffffffffffffff8111828210171561524d5761524d615214565b604051601f8201601f1916810167ffffffffffffffff811182821017156152a0576152a0615214565b604052919050565b803560038110614f4357600080fd5b600067ffffffffffffffff8211156152d1576152d1615214565b5060051b60200190565b600082601f8301126152ec57600080fd5b813560206153016152fc836152b7565b615277565b82815260059290921b8401810191818101908684111561532057600080fd5b8286015b8481101561533b5780358352918301918301615324565b509695505050505050565b600082601f83011261535757600080fd5b813567ffffffffffffffff81111561537157615371615214565b615384601f8201601f1916602001615277565b81815284602083860101111561539957600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126153c757600080fd5b813560206153d76152fc836152b7565b82815260059290921b840181019181810190868411156153f657600080fd5b8286015b8481101561533b57803567ffffffffffffffff8082111561541b5760008081fd5b9088019060c0828b03601f19018113156154355760008081fd5b61543d61522a565b615448888501614f38565b815260406154578186016152a8565b898301526060808601358581111561546f5760008081fd5b61547d8f8c838a01016152db565b83850152506080915081860135858111156154985760008081fd5b6154a68f8c838a01016152db565b82850152505060a080860135858111156154c05760008081fd5b6154ce8f8c838a01016152db565b84840152509285013592848411156154e857600091508182fd5b6154f68e8b86890101615346565b908301525086525050509183019183016153fa565b60008060008084860361024081121561552357600080fd5b6101e08082121561553357600080fd5b61553b615253565b915061554687614f38565b825261555460208801614fcf565b6020830152604087013560408301526060870135606083015261557960808801614f38565b608083015261558a60a08801614fcf565b60a083015260c087013560c083015260e087013560e08301526101008088013581840152506101208088013581840152506101406155c9818901614fcf565b908301526101606155db888201614fcf565b908301526101806155ed8882016152a8565b908301526101a087810135908301526101c0808801359083015290945085013567ffffffffffffffff8082111561562357600080fd5b61562f888389016153b6565b945061020087013591508082111561564657600080fd5b50615653878288016153b6565b9250506156636102208601614f38565b905092959194509250565b60006020828403121561568057600080fd5b8135610a1d81614fc1565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806156ea57607f821691505b6020821081141561570b57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526003908201526246656560e81b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60008261577d5761577d615758565b500690565b634e487b7160e01b600052601160045260246000fd5b6000828210156157aa576157aa615782565b500390565b6000602082840312156157c157600080fd5b5051919050565b600082198211156157db576157db615782565b500190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561581657600080fd5b8151610a1d81614fc1565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906158549083018461504d565b9695505050505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061588a90830186615012565b828103606084015261589c8186615012565b905082810360808401526158b0818561504d565b98975050505050505050565b60006000198214156158d0576158d0615782565b5060010190565b60008160001904831182151516156158f1576158f1615782565b500290565b600082601f83011261590757600080fd5b815160206159176152fc836152b7565b82815260059290921b8401810191818101908684111561593657600080fd5b8286015b8481101561533b578051835291830191830161593a565b6000806040838503121561596457600080fd5b825167ffffffffffffffff8082111561597c57600080fd5b818501915085601f83011261599057600080fd5b815160206159a06152fc836152b7565b82815260059290921b840181019181810190898411156159bf57600080fd5b948201945b838610156159e65785516159d781614f23565b825294820194908201906159c4565b918801519196509093505050808211156159ff57600080fd5b50615a0c858286016158f6565b9150509250929050565b600082615a2557615a25615758565b50049056fea26469706673582212202b3c696ae9cf494cee8e9e5d0032c74e34804bbdf195ac5b83f972677961f3de64736f6c634300080a0033
Deployed Bytecode
0x6080604052600436106101445760003560e01c8063715018a6116100b6578063c688407d1161006f578063c688407d1461048d578063cf14e557146104a2578063dc788a24146104c2578063e272b892146104e2578063e388272014610502578063f2fde38b1461052257600080fd5b8063715018a6146103875780638cb729001461039c5780638da5cb5b14610402578063933e9a831461042a57806398aac2161461044a578063bfeabea01461045d57600080fd5b806337295c5e1161010857806337295c5e1461028d57806342a22917146102a057806342f6487a146102ce57806352cfba86146103285780635c975abb14610348578063692b67af1461036757600080fd5b806307ce9888146101855780630e2f3afb146101bb5780631da8f01c146101dd57806323e0aa4c146102275780632afa70a51461025457600080fd5b366101805760405134815233907f0de0271e0148b63e6b759917905b6ae5d995f6081392a30b9fa9e23bb4fb98719060200160405180910390a2005b600080fd5b34801561019157600080fd5b506101a56101a0366004614dea565b610542565b6040516101b29190614e44565b60405180910390f35b3480156101c757600080fd5b506101db6101d6366004614f48565b6106cb565b005b3480156101e957600080fd5b506102176101f8366004614fa4565b6001600160a01b03166000908152600c602052604090205460ff161590565b60405190151581526020016101b2565b34801561023357600080fd5b50610247610242366004614fda565b610799565b6040516101b2919061509a565b34801561026057600080fd5b5061021761026f366004614fa4565b6001600160a01b03166000908152600b602052604090205460ff1690565b6101db61029b36600461513f565b610a24565b3480156102ac57600080fd5b506102c06102bb36600461516f565b610f77565b6040519081526020016101b2565b3480156102da57600080fd5b50600754600854600954600a546102fe9360ff808216946101009092041692909185565b6040805195151586529315156020860152928401919091526060830152608082015260a0016101b2565b34801561033457600080fd5b506101db610343366004615194565b610fab565b34801561035457600080fd5b50600054600160a01b900460ff16610217565b34801561037357600080fd5b506101db6103823660046151c2565b611000565b34801561039357600080fd5b506101db6110f9565b3480156103a857600080fd5b506003546004546005546006546103cf936001600160a01b03908116938116928116911684565b604080516001600160a01b03958616815293851660208501529184169183019190915290911660608201526080016101b2565b34801561040e57600080fd5b506000546040516001600160a01b0390911681526020016101b2565b34801561043657600080fd5b506101db610445366004614fa4565b61112f565b6101db61045836600461550b565b611182565b34801561046957600080fd5b50610217610478366004614fa4565b600d6020526000908152604090205460ff1681565b34801561049957600080fd5b506101db611580565b3480156104ae57600080fd5b506101db6104bd36600461513f565b6115c7565b3480156104ce57600080fd5b506101db6104dd366004614dea565b611784565b3480156104ee57600080fd5b506101db6104fd36600461566e565b611a52565b34801561050e57600080fd5b506101db61051d366004615194565b611a94565b34801561052e57600080fd5b506101db61053d366004614fa4565b611ae9565b6105c0604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905290610180820190815260200160008152602001600081525090565b60008281526010602090815260409182902082516101e08101845281546001600160a01b03808216835260ff600160a01b92839004811615159584019590955260018401549583019590955260028084015460608401526003840154958616608084015294048316151560a0820152600482015460c0820152600582015460e0820152600682015461010080830191909152600783015461012083015260088301548085161515610140840152908104841615156101608301529093919261018085019262010000909204169081111561069c5761069c614e03565b60028111156106ad576106ad614e03565b815260098201546020820152600a9091015460409091015292915050565b6000546001600160a01b031633146106fe5760405162461bcd60e51b81526004016106f59061568b565b60405180910390fd5b600380546001600160a01b038681166001600160a01b031992831681179093556004805487831690841681179091556005805487841690851681179091556006805493871693909416831790935560408051948552602085019190915283019190915260608201527fc5cb77844c2821bc73301c138b37ba68eac05d5ce3db478bb17e2efe818d38069060800160405180910390a150505050565b6107d36040805160c08101909152600080825260208201908152602001606081526020016060815260200160608152602001606081525090565b82156109fd576000848152600e602052604090208054839081106107f9576107f96156c0565b60009182526020918290206040805160c0810190915260059092020180546001600160a01b0381168352919290919083019060ff600160a01b90910416600281111561084757610847614e03565b600281111561085857610858614e03565b8152602001600182018054806020026020016040519081016040528092919081815260200182805480156108ab57602002820191906000526020600020905b815481526020019060010190808311610897575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561090357602002820191906000526020600020905b8154815260200190600101908083116108ef575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561095b57602002820191906000526020600020905b815481526020019060010190808311610947575b50505050508152602001600482018054610974906156d6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a0906156d6565b80156109ed5780601f106109c2576101008083540402835291602001916109ed565b820191906000526020600020905b8154815290600101906020018083116109d057829003601f168201915b5050505050815250509050610a1d565b6000848152600f602052604090208054839081106107f9576107f96156c0565b9392505050565b600054600160a01b900460ff1615610a4e5760405162461bcd60e51b81526004016106f590615711565b60026001541415610aa15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106f5565b60026001818155600084815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b928390048116151596840196909652968301549382019390935281870154606082015260038201549586166080820152919094048216151560a0820152600484015460c0820152600584015460e0820152600684015461010080830191909152600785015461012083015260088501548084161515610140840152908104831615156101608301529294909392610180850192620100009091041690811115610b8357610b83614e03565b6002811115610b9457610b94614e03565b81526009820154602080830191909152600a90920154604091820152336000908152600d9092528120549192509060ff1615610bfb5760405162461bcd60e51b815260206004820152600660248201526510985b9b995960d21b60448201526064016106f5565b60008261018001516002811115610c1457610c14614e03565b14610c495760405162461bcd60e51b815260206004820152600560248201526410a7b832b760d91b60448201526064016106f5565b60808201516001600160a01b0316331480610c6f575060808201516001600160a01b0316155b610cc95760405162461bcd60e51b815260206004820152602560248201527f596f75277265206e6f742074686520696e746572657374656420636f756e74656044820152641c9c185c9d60da1b60648201526084016106f5565b81608001516001600160a01b031682600001516001600160a01b03161415610d215760405162461bcd60e51b815260206004820152600b60248201526a36b0b5b2b91eba30b5b2b960a91b60448201526064016106f5565b428261012001511015610d605760405162461bcd60e51b8152602060048201526007602482015266115e1c1a5c995960ca1b60448201526064016106f5565b6002548410610d995760405162461bcd60e51b81526020600482015260056024820152646964204b4f60d81b60448201526064016106f5565b60008481526010602052604090206003810180546001600160a01b0319163317905560088101805462ff000019166201000017905542600790910155610ddd611b81565b600086815260106020526040902060058101829055600381018054931515600160a01b0260ff60a01b1990941693909317909255600490910154610e2091611c86565b341015610e605760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420656e6f7567682057454960901b60448201526064016106f5565b600084815260106020526040902060080154610100900460ff1615610e8857610e8884611c92565b610e9384600161234d565b9050610eaa610ea385600061234d565b8290611c86565b600654909150610ec3906001600160a01b031682613117565b610edf5760405162461bcd60e51b81526004016106f59061573b565b6001610eee620151804261576e565b610ef89042615798565b600086815260106020526040908190206003015490516001600160a01b03909116907f8873f53f40d4865bac9c1e8998aef3351bb1ef3db1a6923ab09621cf1a6659a990610f6590899033908a909283526001600160a01b03918216602084015216604082015260600190565b60405180910390a45050600180555050565b60008115610f9457506000828152600e6020526040902054610fa5565b506000828152600f60205260409020545b92915050565b6000546001600160a01b03163314610fd55760405162461bcd60e51b81526004016106f59061568b565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000546001600160a01b0316331461102a5760405162461bcd60e51b81526004016106f59061568b565b61271081101561106f5760405162461bcd60e51b815260206004820152601060248201526f04d757374206265203e3d2031303030360841b60448201526064016106f5565b600780546008869055841515610100810261ff001989151590811661ffff1990941693909317179092556009849055600a839055604080519182526020820187905281019190915260608101839052608081018290527f55571d671d5bf0796b89825316f71d9e49f112498c6426cc82c004f105a0b7e59060a00160405180910390a15050505050565b6000546001600160a01b031633146111235760405162461bcd60e51b81526004016106f59061568b565b61112d600061317a565b565b6000546001600160a01b031633146111595760405162461bcd60e51b81526004016106f59061568b565b6001600160a01b03166000908152600d60205260409020805460ff19811660ff90911615179055565b600054600160a01b900460ff16156111ac5760405162461bcd60e51b81526004016106f590615711565b8383836000836040015111806111c3575060008251115b80156111de575060008360c0015111806111de575060008151115b6112165760405162461bcd60e51b81526020600482015260096024820152684e6f2061737365747360b81b60448201526064016106f5565b336000908152600d602052604090205460ff161561125f5760405162461bcd60e51b815260206004820152600660248201526510985b9b995960d21b60448201526064016106f5565b60075460ff80821615156101408a0152610100909104161515610160880152611286611b81565b60608901819052901515602089015260408801516112a391611c86565b3410156112e45760405162461bcd60e51b815260206004820152600f60248201526e135bdc99481dd95a481b9959591959608a1b60448201526064016106f5565b3380885260808801516001600160a01b031614156113325760405162461bcd60e51b815260206004820152600b60248201526a36b0b5b2b91eba30b5b2b960a91b60448201526064016106f5565b4261010088015261012087015161135b576113504262093a80611c86565b610120880152611387565b61012087015161136e90620151806131ca565b61012088018190526113809042611c86565b6101208801525b600061018088018190525060006101a088018190526101c08801819052600280548252601060209081526040928390208a518154928c01511515600160a01b9081026001600160a81b03199485166001600160a01b0393841617178355948c0151600183015560608c01518285015560808c015160038301805460a08f015115159097029690941691161793909317905560c0890151600483015560e08901516005830155610100808a015160068401556101208a015160078401556101408a01516008840180546101608d0151151590930261ff00199215159290921661ffff1990931692909217178082556101808b01518b949390929162ff00001916906201000090849081111561149d5761149d614e03565b02179055506101a082015160098201556101c090910151600a909101556114ce6114c660025490565b8760016131d6565b6114e26114da60025490565b8660006131d6565b86610180015160028111156114f9576114f9614e03565b611506620151804261576e565b6115109042615798565b337f8873f53f40d4865bac9c1e8998aef3351bb1ef3db1a6923ab09621cf1a6659a961153b60025490565b60808c0151604080519283526001600160a01b039182166020840152908a169082015260600160405180910390a4611577600280546001019055565b50505050505050565b6000546001600160a01b031633146115aa5760405162461bcd60e51b81526004016106f59061568b565b6007805461ff001981166101009182900460ff1615909102179055565b600082815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b92839004811615159684019690965260018401549483019490945260028084015460608401526003840154948516608084015293048416151560a0820152600482015460c0820152600582015460e0820152600682015461010080830191909152600783015461012083015260088301548086161515610140840152908104851615156101608301529093919261018085019262010000909204909116908111156116a4576116a4614e03565b60028111156116b5576116b5614e03565b815260098201546020820152600a9091015460409091015280519091506001600160a01b0316331480156116f25750336001600160a01b03831614155b6117275760405162461bcd60e51b815260206004820152600660248201526510a7bbb732b960d11b60448201526064016106f5565b60008381526010602052604080822060030180546001600160a01b0319166001600160a01b0386169081179091559051909185917f6ab84ca265343a9acd1372475058656eed302fede45a9ae2ed2c6254dee8e1689190a3505050565b600260015414156117d75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106f5565b60026001818155600083815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b928390048116151596840196909652968301549382019390935281870154606082015260038201549586166080820152919094048216151560a0820152600484015460c0820152600584015460e08201526006840154610100808301919091526007850154610120830152600885015480841615156101408401529081048316151561016083015292949093926101808501926201000090910416908111156118b9576118b9614e03565b60028111156118ca576118ca614e03565b815260098201546020820152600a9091015460409091015280519091506001600160a01b031633146119275760405162461bcd60e51b815260206004820152600660248201526510a7bbb732b960d11b60448201526064016106f5565b6000816101800151600281111561194057611940614e03565b146119755760405162461bcd60e51b815260206004820152600560248201526410a7b832b760d91b60448201526064016106f5565b600061199282606001518360400151611c8690919063ffffffff16565b6000848152601060205260409020426007820155600801805491925060029162ff000019166201000083021790555060026119d0620151804261576e565b6119da9042615798565b6040805186815260006020820181905281830152905133917f8873f53f40d4865bac9c1e8998aef3351bb1ef3db1a6923ab09621cf1a6659a9919081900360600190a48015611a4957611a2d3382613117565b611a495760405162461bcd60e51b81526004016106f59061573b565b50506001805550565b6000546001600160a01b03163314611a7c5760405162461bcd60e51b81526004016106f59061568b565b80611a8c57611a896138a5565b50565b611a89613942565b6000546001600160a01b03163314611abe5760405162461bcd60e51b81526004016106f59061568b565b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314611b135760405162461bcd60e51b81526004016106f59061568b565b6001600160a01b038116611b785760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f5565b611a898161317a565b600480546040516370a0823160e01b81523392810192909252600091829182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611bd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf791906157af565b1180611c6d57506005546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6b91906157af565b115b15611c7c575060019160009150565b5050600854600091565b6000610a1d82846157c8565b600081815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b92839004811615159684019690965260018401549483019490945260028084015460608401526003840154948516608084015293048416151560a0820152600482015460c0820152600582015460e082015260068201546101008083019190915260078301546101208301526008830154808616151561014084015290810485161515610160830152909391926101808501926201000090920490911690811115611d6f57611d6f614e03565b6002811115611d8057611d80614e03565b815260200160098201548152602001600a820154815250509050611dcb6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b6040805160a081018252600060208201819052818301819052606082018190526080820152600180845281529083015115611e0857600160208301525b60c083015115611e1a57600160208201525b6000848152600e60209081526040808320805482518185028101850190935280835261206294879484015b828210156120595760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff166002811115611e9b57611e9b614e03565b6002811115611eac57611eac614e03565b815260200160018201805480602002602001604051908101604052809291908181526020018280548015611eff57602002820191906000526020600020905b815481526020019060010190808311611eeb575b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015611f5757602002820191906000526020600020905b815481526020019060010190808311611f43575b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015611faf57602002820191906000526020600020905b815481526020019060010190808311611f9b575b50505050508152602001600482018054611fc8906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611ff4906156d6565b80156120415780601f1061201657610100808354040283529160200191612041565b820191906000526020600020905b81548152906001019060200180831161202457829003601f168201915b50505050508152505081526020019060010190611e45565b505050506139a7565b151582526000858152600f6020908152604080832080548251818502810185019093528083529496506122ae94869492939192909184015b828210156120595760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff1660028111156120f0576120f0614e03565b600281111561210157612101614e03565b81526020016001820180548060200260200160405190810160405280929190818152602001828054801561215457602002820191906000526020600020905b815481526020019060010190808311612140575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156121ac57602002820191906000526020600020905b815481526020019060010190808311612198575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561220457602002820191906000526020600020905b8154815260200190600101908083116121f0575b5050505050815260200160048201805461221d906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054612249906156d6565b80156122965780601f1061226b57610100808354040283529160200191612296565b820191906000526020600020905b81548152906001019060200180831161227957829003601f168201915b5050505050815250508152602001906001019061209a565b15801584529091506122fd578160200151806122cb575081604001515b80156122e357508060600151806122e3575080608001515b6122f057600082526122fd565b6122fd8282600187613bb1565b80511561234757806020015180612315575080604001515b801561232d575081606001518061232d575081608001515b61233a5760008152612347565b6123478183600087613bb1565b50505050565b600082815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b92839004811615159684019690965260018401549483019490945260028084015460608401526003840154948516608084015293048416151560a0820152600482015460c0820152600582015460e08201526006820154610100808301919091526007830154610120830152600883015480861615156101408401529081048516151561016083015285949193610180850192620100009092049091169081111561242a5761242a614e03565b600281111561243b5761243b614e03565b815260200160098201548152602001600a8201548152505090506124bf60405180610140016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600015158152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60606000851561275c576000878152600e6020908152604080832080548251818502810185019093528083529193909284015b828210156127065760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff16600281111561254857612548614e03565b600281111561255957612559614e03565b8152602001600182018054806020026020016040519081016040528092919081815260200182805480156125ac57602002820191906000526020600020905b815481526020019060010190808311612598575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561260457602002820191906000526020600020905b8154815260200190600101908083116125f0575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561265c57602002820191906000526020600020905b815481526020019060010190808311612648575b50505050508152602001600482018054612675906156d6565b80601f01602080910402602001604051908101604052809291908181526020018280546126a1906156d6565b80156126ee5780601f106126c3576101008083540402835291602001916126ee565b820191906000526020600020905b8154815290600101906020018083116126d157829003601f168201915b505050505081525050815260200190600101906124f2565b505086516001600160a01b039081168752608088015116602080880191909152870151151560408088019190915287015160e0870152505060608501516101008501526101a085015161012085015291506129e9565b6000878152600f6020908152604080832080548251818502810185019093528083529193909284015b828210156129995760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff1660028111156127db576127db614e03565b60028111156127ec576127ec614e03565b81526020016001820180548060200260200160405190810160405280929190818152602001828054801561283f57602002820191906000526020600020905b81548152602001906001019080831161282b575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561289757602002820191906000526020600020905b815481526020019060010190808311612883575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156128ef57602002820191906000526020600020905b8154815260200190600101908083116128db575b50505050508152602001600482018054612908906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054612934906156d6565b80156129815780601f1061295657610100808354040283529160200191612981565b820191906000526020600020905b81548152906001019060200180831161296457829003601f168201915b50505050508152505081526020019060010190612785565b50505060808601516001600160a01b03908116865286511660208601525060a08501511515604085015260c085015160e0808601919091528501516101008501526101c085015161012085015291505b506000608083018190525b8151811015612fc257600060608401819052828281518110612a1857612a186156c0565b6020026020010151602001516002811115612a3557612a35614e03565b1415612cfb57600b6000838381518110612a5157612a516156c0565b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff16612ab25760405162461bcd60e51b815260206004820152600a6024820152694552433230202d204b4f60b01b60448201526064016106f5565b818181518110612ac457612ac46156c0565b602002602001015160600151600081518110612ae257612ae26156c0565b60209081029190910101516080840152610140840151612bcb578260400151612bcb57612b128360800151614ced565b606084018190526080840151612b2791614d0b565b60808401528151829082908110612b4057612b406156c0565b602090810291909101015151835160065460608601516040516323b872dd60e01b81526001600160a01b03948516946323b872dd94612b869490939116916004016157e0565b6020604051808303816000875af1158015612ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bc99190615804565b505b6000828281518110612bdf57612bdf6156c0565b60200260200101516080015151118015612c005750600754610100900460ff165b15612c5957612c53828281518110612c1a57612c1a6156c0565b602002602001015160800151600081518110612c3857612c386156c0565b60200260200101518460800151614d0b90919063ffffffff16565b60808401525b818181518110612c6b57612c6b6156c0565b6020026020010151600001516001600160a01b03166323b872dd8460000151856020015186608001516040518463ffffffff1660e01b8152600401612cb2939291906157e0565b6020604051808303816000875af1158015612cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cf59190615804565b50612fb0565b600c6000838381518110612d1157612d116156c0565b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff1615612d7d5760405162461bcd60e51b8152602060048201526014602482015273115490cdcc8c480b48109b1858dadb1a5cdd195960621b60448201526064016106f5565b6001828281518110612d9157612d916156c0565b6020026020010151602001516002811115612dae57612dae614e03565b1415612e9657818181518110612dc657612dc66156c0565b6020026020010151600001516001600160a01b031663b88d4fde84600001518560200151858581518110612dfc57612dfc6156c0565b602002602001015160400151600081518110612e1a57612e1a6156c0565b6020026020010151868681518110612e3457612e346156c0565b602002602001015160a001516040518563ffffffff1660e01b8152600401612e5f9493929190615821565b600060405180830381600087803b158015612e7957600080fd5b505af1158015612e8d573d6000803e3d6000fd5b50505050612fb0565b6002828281518110612eaa57612eaa6156c0565b6020026020010151602001516002811115612ec757612ec7614e03565b1415612fb057818181518110612edf57612edf6156c0565b6020026020010151600001516001600160a01b0316632eb2c2d684600001518560200151858581518110612f1557612f156156c0565b602002602001015160400151868681518110612f3357612f336156c0565b602002602001015160600151878781518110612f5157612f516156c0565b602002602001015160a001516040518663ffffffff1660e01b8152600401612f7d95949392919061585e565b600060405180830381600087803b158015612f9757600080fd5b505af1158015612fab573d6000803e3d6000fd5b505050505b80612fba816158bc565b9150506129f4565b600060608401526101408401516130845782604001511561301c5760e0830151156130175761301183610120015161300b8560e001518660c00151611c8690919063ffffffff16565b90614d0b565b60c08401525b6130db565b6130298360e00151614ced565b6060840181905261012084015160e08501516130499261300b9190614d0b565b60e0840152610100830151606084015161306291611c86565b60a084015260e0830151156130175760e083015160c084015161301191611c86565b82604001516130a75761010083015160608401516130a191611c86565b60a08401525b60e0830151156130db576130d583610120015161300b8560e001518660c00151611c8690919063ffffffff16565b60c08401525b6130ed83602001518460c00151613117565b6131095760405162461bcd60e51b81526004016106f59061573b565b505060a00151949350505050565b600060018215610a1d576040516001600160a01b038516908490600081818185875af1925050503d806000811461316a576040519150601f19603f3d011682016040523d82523d6000602084013e61316f565b606091505b509095945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610a1d82846158d7565b6000805b835182101561389e5760008483815181106131f7576131f76156c0565b602002602001015160200151600281111561321457613214614e03565b141561337557600b6000858481518110613230576132306156c0565b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff1680156132825750838281518110613271576132716156c0565b602002602001015160800151516001145b80156132ac575083828151811061329b5761329b6156c0565b602002602001015160600151516001145b80156132ef575060008483815181106132c7576132c76156c0565b6020026020010151606001516000815181106132e5576132e56156c0565b6020026020010151115b6133325760405162461bcd60e51b81526020600482015260146024820152734552433230202d20436865636b2076616c75657360601b60448201526064016106f5565b6000848381518110613346576133466156c0565b602002602001015160800151600081518110613364576133646156c0565b602002602001018181525050613674565b600c600085848151811061338b5761338b6156c0565b602090810291909101810151516001600160a01b031682528101919091526040016000205460ff16156133f75760405162461bcd60e51b8152602060048201526014602482015273115490cdcc8c480b48109b1858dadb1a5cdd195960621b60448201526064016106f5565b600184838151811061340b5761340b6156c0565b602002602001015160200151600281111561342857613428614e03565b141561349c57838281518110613440576134406156c0565b6020026020010151604001515160011461349c5760405162461bcd60e51b815260206004820152601860248201527f455243373231202d204d697373696e6720746f6b656e4964000000000000000060448201526064016106f5565b60028483815181106134b0576134b06156c0565b60200260200101516020015160028111156134cd576134cd614e03565b14156136745760008483815181106134e7576134e76156c0565b6020026020010151604001515111801561351f57506000848381518110613510576135106156c0565b60200260200101516060015151115b80156135665750838281518110613538576135386156c0565b60200260200101516060015151848381518110613557576135576156c0565b60200260200101516040015151145b6135b25760405162461bcd60e51b815260206004820152601960248201527f45524331313535202d204d697373696e6720746f6b656e49640000000000000060448201526064016106f5565b5060005b8382815181106135c8576135c86156c0565b602002602001015160600151518110156136745760008483815181106135f0576135f06156c0565b602002602001015160600151828151811061360d5761360d6156c0565b6020026020010151116136625760405162461bcd60e51b815260206004820152601d60248201527f45524331313535202d2042616c616e6365206d757374206265203e203000000060448201526064016106f5565b8061366c816158bc565b9150506135b6565b8215613785576000858152600e60205260409020845185908490811061369c5761369c6156c0565b6020908102919091018101518254600181018455600093845292829020815160059094020180546001600160a01b039094166001600160a01b0319851681178255928201519193909283916001600160a81b03191617600160a01b83600281111561370957613709614e03565b021790555060408201518051613729916001840191602090910190614d17565b5060608201518051613745916002840191602090910190614d17565b5060808201518051613761916003840191602090910190614d17565b5060a0820151805161377d916004840191602090910190614d62565b50505061388c565b6000858152600f6020526040902084518590849081106137a7576137a76156c0565b6020908102919091018101518254600181018455600093845292829020815160059094020180546001600160a01b039094166001600160a01b0319851681178255928201519193909283916001600160a81b03191617600160a01b83600281111561381457613814614e03565b021790555060408201518051613834916001840191602090910190614d17565b5060608201518051613850916002840191602090910190614d17565b506080820151805161386c916003840191602090910190614d17565b5060a08201518051613888916004840191602090910190614d62565b5050505b81613896816158bc565b9250506131da565b5050505050565b600054600160a01b900460ff166138f55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106f5565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff161561396c5760405162461bcd60e51b81526004016106f590615711565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586139253390565b6040805160a08101825260008082526020820181905291810182905260608101829052608081018290529080600181805b8651841015613b885760008785815181106139f5576139f56156c0565b6020026020010151602001516002811115613a1257613a12614e03565b1415613a245760016040890152613b76565b6001878581518110613a3857613a386156c0565b6020026020010151602001516002811115613a5557613a55614e03565b1415613acd576060880151613a9257600160608901528651879085908110613a7f57613a7f6156c0565b6020026020010151600001519150613acd565b868481518110613aa457613aa46156c0565b6020026020010151600001516001600160a01b0316826001600160a01b031614613acd57600092505b6002878581518110613ae157613ae16156c0565b6020026020010151602001516002811115613afe57613afe614e03565b1415613b76576080880151613b3b57600160808901528651879085908110613b2857613b286156c0565b6020026020010151600001519050613b76565b868481518110613b4d57613b4d6156c0565b6020026020010151600001516001600160a01b0316816001600160a01b031614613b7657600092505b83613b80816158bc565b9450506139d8565b87606001518015613b9a575087608001515b15613ba457600092505b5095969095509350505050565b600081815260106020908152604080832081516101e08101835281546001600160a01b03808216835260ff600160a01b92839004811615159684019690965260018401549483019490945260028084015460608401526003840154948516608084015293048416151560a0820152600482015460c0820152600582015460e082015260068201546101008083019190915260078301546101208301526008830154808616151561014084015290810485161515610160830152909391926101808501926201000090920490911690811115613c8e57613c8e614e03565b6002811115613c9f57613c9f614e03565b815260200160098201548152602001600a820154815250509050600080600080606080613cdf604051806040016040528060608152602001606081525090565b8b602001518015613cfc57508a6060015180613cfc57508a608001515b156143325789613d19576000898152600e60205260409020613d28565b6000898152600f602052604090205b805480602002602001604051908101604052809291908181526020016000905b82821015613f5c5760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff166002811115613d9e57613d9e614e03565b6002811115613daf57613daf614e03565b815260200160018201805480602002602001604051908101604052809291908181526020018280548015613e0257602002820191906000526020600020905b815481526020019060010190808311613dee575b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015613e5a57602002820191906000526020600020905b815481526020019060010190808311613e46575b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015613eb257602002820191906000526020600020905b815481526020019060010190808311613e9e575b50505050508152602001600482018054613ecb906156d6565b80601f0160208091040260200160405190810160405280929190818152602001828054613ef7906156d6565b8015613f445780601f10613f1957610100808354040283529160200191613f44565b820191906000526020600020905b815481529060010190602001808311613f2757829003601f168201915b50505050508152505081526020019060010190613d48565b50505050925060009650600094505b825187108015613f79575084155b15614214576001838881518110613f9257613f926156c0565b6020026020010151602001516002811115613faf57613faf614e03565b1480613fe957506002838881518110613fca57613fca6156c0565b6020026020010151602001516002811115613fe757613fe7614e03565b145b156142025789156140fa5760035483516001600160a01b0390911690633e1040149085908a90811061401d5761401d6156c0565b602002602001015160000151858a8151811061403b5761403b6156c0565b602002602001015160400151600081518110614059576140596156c0565b60209081029190910181015160008e815260109092526040918290206001015491516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301526044820152606401600060405180830381865afa1580156140c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526140ee9190810190615951565b602083015281526141fd565b60035483516001600160a01b0390911690633e1040149085908a908110614123576141236156c0565b602002602001015160000151858a81518110614141576141416156c0565b60200260200101516040015160008151811061415f5761415f6156c0565b60209081029190910181015160008e8152601090925260409182902060049081015492516001600160e01b031960e087901b1681526001600160a01b039094169084015260248301526044820152606401600060405180830381865afa1580156141cd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526141f59190810190615951565b602083015281525b600194505b8661420c816158bc565b975050613f6b565b600096505b8060200151518710156143325789156142785761426181602001518881518110614245576142456156c0565b6020026020010151896101a00151611c8690919063ffffffff16565b60008a8152601060205260409020600901556142c0565b6142ad81602001518881518110614291576142916156c0565b6020026020010151896101c00151611c8690919063ffffffff16565b60008a8152601060205260409020600a01555b614304816000015188815181106142d9576142d96156c0565b6020026020010151826020015189815181106142f7576142f76156c0565b6020026020010151613117565b6143205760405162461bcd60e51b81526004016106f59061573b565b8661432a816158bc565b975050614219565b8b60400151801561434f57508a606001518061434f57508a608001515b15614cdf578961436c576000898152600f6020526040902061437b565b6000898152600e602052604090205b805480602002602001604051908101604052809291908181526020016000905b828210156145af5760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff1660028111156143f1576143f1614e03565b600281111561440257614402614e03565b81526020016001820180548060200260200160405190810160405280929190818152602001828054801561445557602002820191906000526020600020905b815481526020019060010190808311614441575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156144ad57602002820191906000526020600020905b815481526020019060010190808311614499575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561450557602002820191906000526020600020905b8154815260200190600101908083116144f1575b5050505050815260200160048201805461451e906156d6565b80601f016020809104026020016040519081016040528092919081815260200182805461454a906156d6565b80156145975780601f1061456c57610100808354040283529160200191614597565b820191906000526020600020905b81548152906001019060200180831161457a57829003601f168201915b5050505050815250508152602001906001019061439b565b505050509250896145cd576000898152600e602052604090206145dc565b6000898152600f602052604090205b805480602002602001604051908101604052809291908181526020016000905b828210156148105760008481526020908190206040805160c081019091526005850290910180546001600160a01b03811683529192909190830190600160a01b900460ff16600281111561465257614652614e03565b600281111561466357614663614e03565b8152602001600182018054806020026020016040519081016040528092919081815260200182805480156146b657602002820191906000526020600020905b8154815260200190600101908083116146a2575b505050505081526020016002820180548060200260200160405190810160405280929190818152602001828054801561470e57602002820191906000526020600020905b8154815260200190600101908083116146fa575b505050505081526020016003820180548060200260200160405190810160405280929190818152602001828054801561476657602002820191906000526020600020905b815481526020019060010190808311614752575b5050505050815260200160048201805461477f906156d6565b80601f01602080910402602001604051908101604052809291908181526020018280546147ab906156d6565b80156147f85780601f106147cd576101008083540402835291602001916147f8565b820191906000526020600020905b8154815290600101906020018083116147db57829003601f168201915b505050505081525050815260200190600101906145fc565b505050509150600096505b8251871015614cdf576000838881518110614838576148386156c0565b602002602001015160200151600281111561485557614855614e03565b1415614ccd5760009550600094505b815186108015614872575084155b15614a1957600182878151811061488b5761488b6156c0565b60200260200101516020015160028111156148a8576148a8614e03565b14806148e2575060028287815181106148c3576148c36156c0565b60200260200101516020015160028111156148e0576148e0614e03565b145b15614a145760035482516001600160a01b0390911690633e10401490849089908110614910576149106156c0565b60200260200101516000015184898151811061492e5761492e6156c0565b60200260200101516040015160008151811061494c5761494c6156c0565b6020026020010151868b81518110614966576149666156c0565b602002602001015160600151600081518110614984576149846156c0565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381865afa1580156149e0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614a089190810190615951565b60208301528152600194505b614864565b60009350600095505b806020015151861015614c1d578915614b0957828781518110614a4757614a476156c0565b6020026020010151600001516001600160a01b03166323b872dd896000015183600001518981518110614a7c57614a7c6156c0565b602002602001015184602001518a81518110614a9a57614a9a6156c0565b60200260200101516040518463ffffffff1660e01b8152600401614ac0939291906157e0565b6020604051808303816000875af1158015614adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614b039190615804565b50614bd9565b828781518110614b1b57614b1b6156c0565b6020026020010151600001516001600160a01b03166323b872dd896080015183600001518981518110614b5057614b506156c0565b602002602001015184602001518a81518110614b6e57614b6e6156c0565b60200260200101516040518463ffffffff1660e01b8152600401614b94939291906157e0565b6020604051808303816000875af1158015614bb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614bd79190615804565b505b614c0981602001518781518110614bf257614bf26156c0565b602002602001015185611c8690919063ffffffff16565b935085614c15816158bc565b965050614a22565b8915614c7a576000898152600e60205260409020805485919089908110614c4657614c466156c0565b9060005260206000209060050201600301600081548110614c6957614c696156c0565b600091825260209091200155614ccd565b6000898152600f60205260409020805485919089908110614c9d57614c9d6156c0565b9060005260206000209060050201600301600081548110614cc057614cc06156c0565b6000918252602090912001555b86614cd7816158bc565b97505061481b565b505050505050505050505050565b600a5460095460009190614d0190846158d7565b610fa59190615a16565b6000610a1d8284615798565b828054828255906000526020600020908101928215614d52579160200282015b82811115614d52578251825591602001919060010190614d37565b50614d5e929150614dd5565b5090565b828054614d6e906156d6565b90600052602060002090601f016020900481019282614d905760008555614d52565b82601f10614da957805160ff1916838001178555614d52565b82800160010185558215614d525791820182811115614d52578251825591602001919060010190614d37565b5b80821115614d5e5760008155600101614dd6565b600060208284031215614dfc57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60038110611a8957634e487b7160e01b600052602160045260246000fd5b614e4081614e19565b9052565b81516001600160a01b031681526101e081016020830151614e69602084018215159052565b5060408301516040830152606083015160608301526080830151614e9860808401826001600160a01b03169052565b5060a0830151614eac60a084018215159052565b5060c0838101519083015260e0808401519083015261010080840151908301526101208084015190830152610140808401511515908301526101608084015115159083015261018080840151614f0482850182614e37565b50506101a083810151908301526101c092830151929091019190915290565b6001600160a01b0381168114611a8957600080fd5b8035614f4381614f23565b919050565b60008060008060808587031215614f5e57600080fd5b8435614f6981614f23565b93506020850135614f7981614f23565b92506040850135614f8981614f23565b91506060850135614f9981614f23565b939692955090935050565b600060208284031215614fb657600080fd5b8135610a1d81614f23565b8015158114611a8957600080fd5b8035614f4381614fc1565b600080600060608486031215614fef57600080fd5b83359250602084013561500181614fc1565b929592945050506040919091013590565b600081518084526020808501945080840160005b8381101561504257815187529582019590820190600101615026565b509495945050505050565b6000815180845260005b8181101561507357602081850181015186830182015201615057565b81811115615085576000602083870101525b50601f01601f19169290920160200192915050565b602080825282516001600160a01b0316828201528201516000906150bd81614e19565b80604084015250604083015160c060608401526150dd60e0840182615012565b90506060840151601f19808584030160808601526150fb8383615012565b925060808601519150808584030160a08601526151188383615012565b925060a08601519150808584030160c086015250615136828261504d565b95945050505050565b6000806040838503121561515257600080fd5b82359150602083013561516481614f23565b809150509250929050565b6000806040838503121561518257600080fd5b82359150602083013561516481614fc1565b600080604083850312156151a757600080fd5b82356151b281614f23565b9150602083013561516481614fc1565b600080600080600060a086880312156151da57600080fd5b85356151e581614fc1565b94506020860135935060408601356151fc81614fc1565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561524d5761524d615214565b60405290565b6040516101e0810167ffffffffffffffff8111828210171561524d5761524d615214565b604051601f8201601f1916810167ffffffffffffffff811182821017156152a0576152a0615214565b604052919050565b803560038110614f4357600080fd5b600067ffffffffffffffff8211156152d1576152d1615214565b5060051b60200190565b600082601f8301126152ec57600080fd5b813560206153016152fc836152b7565b615277565b82815260059290921b8401810191818101908684111561532057600080fd5b8286015b8481101561533b5780358352918301918301615324565b509695505050505050565b600082601f83011261535757600080fd5b813567ffffffffffffffff81111561537157615371615214565b615384601f8201601f1916602001615277565b81815284602083860101111561539957600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126153c757600080fd5b813560206153d76152fc836152b7565b82815260059290921b840181019181810190868411156153f657600080fd5b8286015b8481101561533b57803567ffffffffffffffff8082111561541b5760008081fd5b9088019060c0828b03601f19018113156154355760008081fd5b61543d61522a565b615448888501614f38565b815260406154578186016152a8565b898301526060808601358581111561546f5760008081fd5b61547d8f8c838a01016152db565b83850152506080915081860135858111156154985760008081fd5b6154a68f8c838a01016152db565b82850152505060a080860135858111156154c05760008081fd5b6154ce8f8c838a01016152db565b84840152509285013592848411156154e857600091508182fd5b6154f68e8b86890101615346565b908301525086525050509183019183016153fa565b60008060008084860361024081121561552357600080fd5b6101e08082121561553357600080fd5b61553b615253565b915061554687614f38565b825261555460208801614fcf565b6020830152604087013560408301526060870135606083015261557960808801614f38565b608083015261558a60a08801614fcf565b60a083015260c087013560c083015260e087013560e08301526101008088013581840152506101208088013581840152506101406155c9818901614fcf565b908301526101606155db888201614fcf565b908301526101806155ed8882016152a8565b908301526101a087810135908301526101c0808801359083015290945085013567ffffffffffffffff8082111561562357600080fd5b61562f888389016153b6565b945061020087013591508082111561564657600080fd5b50615653878288016153b6565b9250506156636102208601614f38565b905092959194509250565b60006020828403121561568057600080fd5b8135610a1d81614fc1565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806156ea57607f821691505b6020821081141561570b57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526003908201526246656560e81b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60008261577d5761577d615758565b500690565b634e487b7160e01b600052601160045260246000fd5b6000828210156157aa576157aa615782565b500390565b6000602082840312156157c157600080fd5b5051919050565b600082198211156157db576157db615782565b500190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561581657600080fd5b8151610a1d81614fc1565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906158549083018461504d565b9695505050505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061588a90830186615012565b828103606084015261589c8186615012565b905082810360808401526158b0818561504d565b98975050505050505050565b60006000198214156158d0576158d0615782565b5060010190565b60008160001904831182151516156158f1576158f1615782565b500290565b600082601f83011261590757600080fd5b815160206159176152fc836152b7565b82815260059290921b8401810191818101908684111561593657600080fd5b8286015b8481101561533b578051835291830191830161593a565b6000806040838503121561596457600080fd5b825167ffffffffffffffff8082111561597c57600080fd5b818501915085601f83011261599057600080fd5b815160206159a06152fc836152b7565b82815260059290921b840181019181810190898411156159bf57600080fd5b948201945b838610156159e65785516159d781614f23565b825294820194908201906159c4565b918801519196509093505050808211156159ff57600080fd5b50615a0c858286016158f6565b9150509250929050565b600082615a2557615a25615758565b50049056fea26469706673582212202b3c696ae9cf494cee8e9e5d0032c74e34804bbdf195ac5b83f972677961f3de64736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $3,509.6 | 33.4862 | $117,523.26 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.