Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 13053281 | 1065 days ago | IN | Create: DefiPassport | 0 ETH | 0.20649915 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
DefiPassport
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.5.16; pragma experimental ABIEncoderV2; import {ERC721Full} from "@openzeppelin/contracts/token/ERC721/ERC721Full.sol"; import {Counters} from "@openzeppelin/contracts/drafts/Counters.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {Adminable} from "../../lib/Adminable.sol"; import {Initializable} from "../../lib/Initializable.sol"; import {DefiPassportStorage} from "./DefiPassportStorage.sol"; import {ISapphireCreditScore} from "../../debt/sapphire/ISapphireCreditScore.sol"; contract DefiPassport is ERC721Full, Adminable, DefiPassportStorage, Initializable { /* ========== Libraries ========== */ using Counters for Counters.Counter; /* ========== Events ========== */ event BaseURISet(string _baseURI); event ApprovedSkinStatusChanged( address _skin, uint256 _skinTokenId, bool _status ); event ApprovedSkinsStatusesChanged( SkinAndTokenIdStatusRecord[] _skinsRecords ); event DefaultSkinStatusChanged( address _skin, bool _status ); event DefaultActiveSkinChanged( address _skin, uint256 _skinTokenId ); event ActiveSkinSet( uint256 _tokenId, SkinRecord _skinRecord ); event SkinManagerSet(address _skinManager); event CreditScoreContractSet(address _creditScoreContract); event WhitelistSkinSet(address _skin, bool _status); /* ========== Constructor ========== */ constructor() ERC721Full("", "") public {} /* ========== Modifier ========== */ modifier onlySkinManager () { require( msg.sender == skinManager, "DefiPassport: caller is not skin manager" ); _; } /* ========== Restricted Functions ========== */ function init( string calldata _name, string calldata _symbol, address _creditScoreAddress, address _skinManager ) external onlyAdmin initializer { name = _name; symbol = _symbol; skinManager = _skinManager; require( _creditScoreAddress.isContract(), "DefiPassport: credit score address is not a contract" ); creditScoreContract = ISapphireCreditScore(_creditScoreAddress); /* * register the supported interfaces to conform to ERC721 via ERC165 * bytes4(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ _registerInterface(0x5b5e139f); } /** * @dev Sets the base URI that is appended as a prefix to the * token URI. */ function setBaseURI( string calldata _baseURI ) external onlyAdmin { _setBaseURI(_baseURI); emit BaseURISet(_baseURI); } /** * @dev Sets the address of the skin manager role * * @param _skinManager The new skin manager */ function setSkinManager( address _skinManager ) external onlyAdmin { require ( _skinManager != skinManager, "DefiPassport: the same skin manager is already set" ); skinManager = _skinManager; emit SkinManagerSet(skinManager); } /** * @notice Registers/unregisters a default skin * * @param _skin Address of the skin NFT * @param _status Wether or not it should be considered as a default * skin or not */ function setDefaultSkin( address _skin, bool _status ) external onlySkinManager { if (!_status) { require( defaultActiveSkin.skin != _skin, "Defi Passport: cannot unregister the default active skin" ); } require( defaultSkins[_skin] != _status, "DefiPassport: skin already has the same status" ); require( _skin.isContract(), "DefiPassport: the given skin is not a contract" ); require ( IERC721(_skin).ownerOf(1) != address(0), "DefiPassport: default skin must at least have tokenId eq 1" ); if (defaultActiveSkin.skin == address(0)) { defaultActiveSkin = SkinRecord(address(0), _skin, 1); } defaultSkins[_skin] = _status; emit DefaultSkinStatusChanged(_skin, _status); } /** * @dev Set the default active skin, which will be used instead of * unavailable user's active one * @notice Skin should be used as default one (with setDefaultSkin function) * * @param _skin Address of the skin NFT * @param _skinTokenId The NFT token ID */ function setDefaultActiveSkin( address _skin, uint256 _skinTokenId ) external onlySkinManager { require( defaultSkins[_skin], "DefiPassport: the given skin is not registered as a default" ); require( defaultActiveSkin.skin != _skin || defaultActiveSkin.skinTokenId != _skinTokenId, "DefiPassport: the skin is already set as default active" ); defaultActiveSkin = SkinRecord(address(0), _skin, _skinTokenId); emit DefaultActiveSkinChanged(_skin, _skinTokenId); } /** * @notice Approves a passport skin. * Only callable by the skin manager */ function setApprovedSkin( address _skin, uint256 _skinTokenId, bool _status ) external onlySkinManager { approvedSkins[_skin][_skinTokenId] = _status; emit ApprovedSkinStatusChanged(_skin, _skinTokenId, _status); } /** * @notice Sets the approved status for all skin contracts and their * token IDs passed into this function. */ function setApprovedSkins( SkinAndTokenIdStatusRecord[] memory _skinsToApprove ) public onlySkinManager { for (uint256 i = 0; i < _skinsToApprove.length; i++) { TokenIdStatus[] memory tokensAndStatuses = _skinsToApprove[i].skinTokenIdStatuses; for (uint256 j = 0; j < tokensAndStatuses.length; j ++) { TokenIdStatus memory tokenStatusPair = tokensAndStatuses[j]; approvedSkins[_skinsToApprove[i].skin][tokenStatusPair.tokenId] = tokenStatusPair.status; } } emit ApprovedSkinsStatusesChanged(_skinsToApprove); } /** * @notice Adds or removes a skin contract to the whitelist. * The Defi Passport considers all skins minted by whitelisted contracts * to be valid skins for applying them on to the passport. * The user applying the skins must still be their owner though. */ function setWhitelistedSkin( address _skinContract, bool _status ) external onlySkinManager { require ( _skinContract.isContract(), "DefiPassport: address is not a contract" ); require ( whitelistedSkins[_skinContract] != _status, "DefiPassport: the skin already has the same whitelist status" ); whitelistedSkins[_skinContract] = _status; emit WhitelistSkinSet(_skinContract, _status); } function setCreditScoreContract( address _creditScoreAddress ) external onlyAdmin { require( address(creditScoreContract) != _creditScoreAddress, "DefiPassport: the same credit score address is already set" ); require( _creditScoreAddress.isContract(), "DefiPassport: the given address is not a contract" ); creditScoreContract = ISapphireCreditScore(_creditScoreAddress); emit CreditScoreContractSet(_creditScoreAddress); } /* ========== Public Functions ========== */ /** * @notice Mints a DeFi passport to the address specified by `_to`. Note: * - The `_passportSkin` must be an approved or default skin. * - The token URI will be composed by <baseURI> + `_to`, * without the "0x" in front * * @param _to The receiver of the defi passport * @param _passportSkin The address of the skin NFT to be applied to the passport * @param _skinTokenId The ID of the passport skin NFT, owned by the receiver */ function mint( address _to, address _passportSkin, uint256 _skinTokenId ) external returns (uint256) { (uint256 userCreditScore,,) = creditScoreContract.getLastScore(_to); require( userCreditScore > 0, "DefiPassport: the user has no credit score" ); require ( isSkinAvailable(_to, _passportSkin, _skinTokenId), "DefiPassport: invalid skin" ); // A user cannot have two passports require( balanceOf(_to) == 0, "DefiPassport: user already has a defi passport" ); _tokenIds.increment(); uint256 newTokenId = _tokenIds.current(); _mint(_to, newTokenId); _setTokenURI(newTokenId, _toAsciiString(_to)); _setActiveSkin(newTokenId, SkinRecord(_to, _passportSkin, _skinTokenId)); return newTokenId; } /** * @notice Changes the passport skin of the caller's passport * * @param _skin The contract address to the skin NFT * @param _skinTokenId The ID of the skin NFT */ function setActiveSkin( address _skin, uint256 _skinTokenId ) external { require( balanceOf(msg.sender) > 0, "DefiPassport: caller has no passport" ); require( isSkinAvailable(msg.sender, _skin, _skinTokenId), "DefiPassport: invalid skin" ); uint256 tokenId = tokenOfOwnerByIndex(msg.sender, 0); _setActiveSkin(tokenId, SkinRecord(msg.sender, _skin, _skinTokenId)); } function approve( address to, uint256 tokenId ) public { revert("DefiPassport: defi passports are not transferrable"); } function setApprovalForAll( address to, bool approved ) public { revert("DefiPassport: defi passports are not transferrable"); } function safeTransferFrom( address from, address to, uint256 tokenId ) public { revert("DefiPassport: defi passports are not transferrable"); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public { revert("DefiPassport: defi passports are not transferrable"); } function transferFrom( address from, address to, uint256 tokenId ) public { revert("DefiPassport: defi passports are not transferrable"); } /* ========== Public View Functions ========== */ /** * @notice Returns whether a certain skin can be applied to the specified * user's passport. * * @param _user The user for whom to check * @param _skinContract The address of the skin NFT * @param _skinTokenId The NFT token ID */ function isSkinAvailable( address _user, address _skinContract, uint256 _skinTokenId ) public view returns (bool) { // Ensure the token exists require ( IERC721(_skinContract).ownerOf(_skinTokenId) != address(0), "DefiPassport: the specified skin token id does not exist" ); if (defaultSkins[_skinContract]) { return true; } else if ( whitelistedSkins[_skinContract] || approvedSkins[_skinContract][_skinTokenId] ) { return _isSkinOwner(_user, _skinContract, _skinTokenId); } return false; } /** * @notice Returns the active skin of the given passport ID * * @param _tokenId Passport ID */ function getActiveSkin( uint256 _tokenId ) public view returns (SkinRecord memory) { SkinRecord memory _activeSkin = _activeSkins[_tokenId]; if (isSkinAvailable(_activeSkin.owner, _activeSkin.skin, _activeSkin.skinTokenId)) { return _activeSkin; } else { return defaultActiveSkin; } } /* ========== Private Functions ========== */ /** * @dev Converts the given address to string. Used when minting new * passports. */ function _toAsciiString( address _address ) private pure returns (string memory) { bytes memory s = new bytes(40); for (uint i = 0; i < 20; i++) { bytes1 b = bytes1(uint8(uint(uint160(_address)) / (2**(8*(19 - i))))); bytes1 hi = bytes1(uint8(b) / 16); bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi)); s[2*i] = _char(hi); s[2*i+1] = _char(lo); } return string(s); } function _char( bytes1 b ) private pure returns (bytes1 c) { if (uint8(b) < 10) return bytes1(uint8(b) + 0x30); else return bytes1(uint8(b) + 0x57); } /** * @dev Ensures that the user is the owner of the skin NFT */ function _isSkinOwner( address _user, address _skin, uint256 _tokenId ) internal view returns (bool) { return IERC721(_skin).ownerOf(_tokenId) == _user; } function _setActiveSkin( uint256 _tokenId, SkinRecord memory _skinRecord ) private { SkinRecord memory currentSkin = _activeSkins[_tokenId]; require( currentSkin.skin != _skinRecord.skin || currentSkin.skinTokenId != _skinRecord.skinTokenId, "DefiPassport: the same skin is already active" ); _activeSkins[_tokenId] = _skinRecord; emit ActiveSkinSet(_tokenId, _skinRecord); } }
pragma solidity ^0.5.0; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; import "./ERC721Metadata.sol"; /** * @title Full ERC721 Token * @dev This implementation includes all the required and some optional functionality of the ERC721 standard * Moreover, it includes approve all functionality using operator terminology. * * See https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721Full is ERC721, ERC721Enumerable, ERC721Metadata { constructor (string memory name, string memory symbol) public ERC721Metadata(name, symbol) { // solhint-disable-previous-line no-empty-blocks } }
pragma solidity ^0.5.0; import "../math/SafeMath.sol"; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. 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;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library Counters { using SafeMath for uint256; 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 { // The {SafeMath} overflow check can be skipped here, see the comment at the top counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } }
pragma solidity ^0.5.0; import "../../introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ contract IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of NFTs in `owner`'s account. */ function balanceOf(address owner) public view returns (uint256 balance); /** * @dev Returns the owner of the NFT specified by `tokenId`. */ function ownerOf(uint256 tokenId) public view returns (address owner); /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * * * Requirements: * - `from`, `to` cannot be zero. * - `tokenId` must be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this * NFT by either {approve} or {setApprovalForAll}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public; /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * Requirements: * - If the caller is not `from`, it must be approved to move this NFT by * either {approve} or {setApprovalForAll}. */ function transferFrom(address from, address to, uint256 tokenId) public; function approve(address to, uint256 tokenId) public; function getApproved(uint256 tokenId) public view returns (address operator); function setApprovalForAll(address operator, bool _approved) public; function isApprovedForAll(address owner, address operator) public view returns (bool); function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public; }
// SPDX-License-Identifier: MIT pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; import { Storage } from "./Storage.sol"; /** * @title Adminable * @author dYdX * * @dev EIP-1967 Proxy Admin contract. */ contract Adminable { /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will revert. */ modifier onlyAdmin() { require( msg.sender == getAdmin(), "Adminable: caller is not admin" ); _; } /** * @return The EIP-1967 proxy admin */ function getAdmin() public view returns (address) { return address(uint160(uint256(Storage.load(ADMIN_SLOT)))); } }
// SPDX-License-Identifier: MIT pragma solidity 0.5.16; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * Taken from OpenZeppelin */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity 0.5.16; pragma experimental ABIEncoderV2; import {Counters} from "@openzeppelin/contracts/drafts/Counters.sol"; import {ISapphireCreditScore} from "../../debt/sapphire/ISapphireCreditScore.sol"; contract DefiPassportStorage { /* ========== Structs ========== */ struct SkinRecord { address owner; address skin; uint256 skinTokenId; } struct TokenIdStatus { uint256 tokenId; bool status; } struct SkinAndTokenIdStatusRecord { address skin; TokenIdStatus[] skinTokenIdStatuses; } /* ========== Public Variables ========== */ string public name; string public symbol; /** * @notice The credit score contract used by the passport */ ISapphireCreditScore public creditScoreContract; /** * @notice Records the whitelisted skins. All tokens minted by these contracts * will be considered valid to apply on the passport, given they are * owned by the caller. */ mapping (address => bool) public whitelistedSkins; /** * @notice Records the approved skins of the passport */ mapping (address => mapping (uint256 => bool)) public approvedSkins; /** * @notice Records the default skins */ mapping (address => bool) public defaultSkins; /** * @notice Records the default skins */ SkinRecord public defaultActiveSkin; /** * @notice The skin manager appointed by the admin, who can * approve and revoke passport skins */ address public skinManager; /* ========== Internal Variables ========== */ /** * @notice Maps a passport (tokenId) to its active skin NFT */ mapping (uint256 => SkinRecord) internal _activeSkins; Counters.Counter internal _tokenIds; }
// SPDX-License-Identifier: MIT pragma solidity 0.5.16; pragma experimental ABIEncoderV2; import {SapphireTypes} from "./SapphireTypes.sol"; interface ISapphireCreditScore { function updateMerkleRoot(bytes32 newRoot) external; function setMerkleRootUpdater(address merkleRootUpdater) external; function verifyAndUpdate(SapphireTypes.ScoreProof calldata proof) external returns (uint256, uint16); function getLastScore(address user) external view returns (uint256, uint16, uint256); function setMerkleRootDelay(uint256 delay) external; function setPause(bool status) external; }
pragma solidity ^0.5.0; import "../../GSN/Context.sol"; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; import "../../drafts/Counters.sol"; import "../../introspection/ERC165.sol"; /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721 is Context, ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from token ID to owner mapping (uint256 => address) private _tokenOwner; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to number of owned token mapping (address => Counters.Counter) private _ownedTokensCount; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; constructor () public { // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); } /** * @dev Gets the balance of the specified address. * @param owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(address owner) public view returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _ownedTokensCount[owner].current(); } /** * @dev Gets the owner of the specified token ID. * @param tokenId uint256 ID of the token to query the owner of * @return address currently marked as the owner of the given token ID */ function ownerOf(uint256 tokenId) public view returns (address) { address owner = _tokenOwner[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev Approves another address to transfer the given token ID * The zero address indicates there is no approved address. * There can only be one approved address per token at a given time. * Can only be called by the token owner or an approved operator. * @param to address to be approved for the given token ID * @param tokenId uint256 ID of the token to be approved */ function approve(address to, uint256 tokenId) public { address owner = ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Gets the approved address for a token ID, or zero if no address set * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to query the approval of * @return address currently approved for the given token ID */ function getApproved(uint256 tokenId) public view returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev Sets or unsets the approval of a given operator * An operator is allowed to transfer all tokens of the sender on their behalf. * @param to operator address to set the approval * @param approved representing the status of the approval to be set */ function setApprovalForAll(address to, bool approved) public { require(to != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][to] = approved; emit ApprovalForAll(_msgSender(), to, approved); } /** * @dev Tells whether an operator is approved by a given owner. * @param owner owner address which you want to query the approval of * @param operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */ function isApprovedForAll(address owner, address operator) public view returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Transfers the ownership of a given token ID to another address. * Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * Requires the msg.sender to be the owner, approved, or operator. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function transferFrom(address from, address to, uint256 tokenId) public { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transferFrom(from, to, tokenId); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received}, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the msg.sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received}, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the _msgSender() to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred * @param _data bytes data to send along with a safe transfer check */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransferFrom(from, to, tokenId, _data); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the msg.sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred * @param _data bytes data to send along with a safe transfer check */ function _safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) internal { _transferFrom(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether the specified token exists. * @param tokenId uint256 ID of the token to query the existence of * @return bool whether the token exists */ function _exists(uint256 tokenId) internal view returns (bool) { address owner = _tokenOwner[tokenId]; return owner != address(0); } /** * @dev Returns whether the given spender can transfer a given token ID. * @param spender address of the spender to query * @param tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of the token */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Internal function to safely mint a new token. * Reverts if the given token ID already exists. * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * @param to The address that will own the minted token * @param tokenId uint256 ID of the token to be minted */ function _safeMint(address to, uint256 tokenId) internal { _safeMint(to, tokenId, ""); } /** * @dev Internal function to safely mint a new token. * Reverts if the given token ID already exists. * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * @param to The address that will own the minted token * @param tokenId uint256 ID of the token to be minted * @param _data bytes data to send along with a safe transfer check */ function _safeMint(address to, uint256 tokenId, bytes memory _data) internal { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Internal function to mint a new token. * Reverts if the given token ID already exists. * @param to The address that will own the minted token * @param tokenId uint256 ID of the token to be minted */ function _mint(address to, uint256 tokenId) internal { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _tokenOwner[tokenId] = to; _ownedTokensCount[to].increment(); emit Transfer(address(0), to, tokenId); } /** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use {_burn} instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned */ function _burn(address owner, uint256 tokenId) internal { require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own"); _clearApproval(tokenId); _ownedTokensCount[owner].decrement(); _tokenOwner[tokenId] = address(0); emit Transfer(owner, address(0), tokenId); } /** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * @param tokenId uint256 ID of the token being burned */ function _burn(uint256 tokenId) internal { _burn(ownerOf(tokenId), tokenId); } /** * @dev Internal function to transfer ownership of a given token ID to another address. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function _transferFrom(address from, address to, uint256 tokenId) internal { require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _clearApproval(tokenId); _ownedTokensCount[from].decrement(); _ownedTokensCount[to].increment(); _tokenOwner[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * This is an internal detail of the `ERC721` contract and its use is deprecated. * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) internal returns (bool) { if (!to.isContract()) { return true; } // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = to.call(abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, _msgSender(), from, tokenId, _data )); if (!success) { if (returndata.length > 0) { // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert("ERC721: transfer to non ERC721Receiver implementer"); } } else { bytes4 retval = abi.decode(returndata, (bytes4)); return (retval == _ERC721_RECEIVED); } } /** * @dev Private function to clear current approval of a given token ID. * @param tokenId uint256 ID of the token to be transferred */ function _clearApproval(uint256 tokenId) private { if (_tokenApprovals[tokenId] != address(0)) { _tokenApprovals[tokenId] = address(0); } } }
pragma solidity ^0.5.0; import "../../GSN/Context.sol"; import "./IERC721Enumerable.sol"; import "./ERC721.sol"; import "../../introspection/ERC165.sol"; /** * @title ERC-721 Non-Fungible Token with optional enumeration extension logic * @dev See https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => uint256[]) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /* * bytes4(keccak256('totalSupply()')) == 0x18160ddd * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 * * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 */ bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; /** * @dev Constructor function. */ constructor () public { // register the supported interface to conform to ERC721Enumerable via ERC165 _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); } /** * @dev Gets the token ID at a given index of the tokens list of the requested owner. * @param owner address owning the tokens list to be accessed * @param index uint256 representing the index to be accessed of the requested tokens list * @return uint256 token ID at the given index of the tokens list owned by the requested address */ function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) { require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev Gets the total amount of tokens stored by the contract. * @return uint256 representing the total amount of tokens */ function totalSupply() public view returns (uint256) { return _allTokens.length; } /** * @dev Gets the token ID at a given index of all the tokens in this contract * Reverts if the index is greater or equal to the total number of tokens. * @param index uint256 representing the index to be accessed of the tokens list * @return uint256 token ID at the given index of the tokens list */ function tokenByIndex(uint256 index) public view returns (uint256) { require(index < totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Internal function to transfer ownership of a given token ID to another address. * As opposed to transferFrom, this imposes no restrictions on msg.sender. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function _transferFrom(address from, address to, uint256 tokenId) internal { super._transferFrom(from, to, tokenId); _removeTokenFromOwnerEnumeration(from, tokenId); _addTokenToOwnerEnumeration(to, tokenId); } /** * @dev Internal function to mint a new token. * Reverts if the given token ID already exists. * @param to address the beneficiary that will own the minted token * @param tokenId uint256 ID of the token to be minted */ function _mint(address to, uint256 tokenId) internal { super._mint(to, tokenId); _addTokenToOwnerEnumeration(to, tokenId); _addTokenToAllTokensEnumeration(tokenId); } /** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use {ERC721-_burn} instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned */ function _burn(address owner, uint256 tokenId) internal { super._burn(owner, tokenId); _removeTokenFromOwnerEnumeration(owner, tokenId); // Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund _ownedTokensIndex[tokenId] = 0; _removeTokenFromAllTokensEnumeration(tokenId); } /** * @dev Gets the list of token IDs of the requested owner. * @param owner address owning the tokens * @return uint256[] List of token IDs owned by the requested address */ function _tokensOfOwner(address owner) internal view returns (uint256[] storage) { return _ownedTokens[owner]; } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { _ownedTokensIndex[tokenId] = _ownedTokens[to].length; _ownedTokens[to].push(tokenId); } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _ownedTokens[from].length.sub(1); uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array _ownedTokens[from].length--; // Note that _ownedTokensIndex[tokenId] hasn't been cleared: it still points to the old slot (now occupied by // lastTokenId, or just over the end of the array if the token was the last one). } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length.sub(1); uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array _allTokens.length--; _allTokensIndex[tokenId] = 0; } }
pragma solidity ^0.5.0; import "../../GSN/Context.sol"; import "./ERC721.sol"; import "./IERC721Metadata.sol"; import "../../introspection/ERC165.sol"; contract ERC721Metadata is Context, ERC165, ERC721, IERC721Metadata { // Token name string private _name; // Token symbol string private _symbol; // Base URI string private _baseURI; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /* * bytes4(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721_METADATA); } /** * @dev Gets the token name. * @return string representing the token name */ function name() external view returns (string memory) { return _name; } /** * @dev Gets the token symbol. * @return string representing the token symbol */ function symbol() external view returns (string memory) { return _symbol; } /** * @dev Returns the URI for a given token ID. May return an empty string. * * If the token's URI is non-empty and a base URI was set (via * {_setBaseURI}), it will be added to the token ID's URI as a prefix. * * Reverts if the token ID does not exist. */ function tokenURI(uint256 tokenId) external view returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; // Even if there is a base URI, it is only appended to non-empty token-specific URIs if (bytes(_tokenURI).length == 0) { return ""; } else { // abi.encodePacked is being used to concatenate strings return string(abi.encodePacked(_baseURI, _tokenURI)); } } /** * @dev Internal function to set the token URI for a given token. * * Reverts if the token ID does not exist. * * TIP: if all token IDs share a prefix (e.g. if your URIs look like * `http://api.myproject.com/token/<id>`), use {_setBaseURI} to store * it and save gas. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}. * * _Available since v2.5.0._ */ function _setBaseURI(string memory baseURI) internal { _baseURI = baseURI; } /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a preffix in {tokenURI} to each token's URI, when * they are non-empty. * * _Available since v2.5.0._ */ function baseURI() external view returns (string memory) { return _baseURI; } /** * @dev Internal function to burn a specific token. * Reverts if the token does not exist. * Deprecated, use _burn(uint256) instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned by the msg.sender */ function _burn(address owner, uint256 tokenId) internal { super._burn(owner, tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } }
pragma solidity ^0.5.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 GSN 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. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
pragma solidity ^0.5.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ contract IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a {IERC721-safeTransferFrom}. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned can be obtained as `this.onERC721Received.selector`. This * function MAY throw to revert and reject the transfer. * Note: the ERC721 contract address is always the message sender. * @param operator The address which called `safeTransferFrom` function * @param from The address which previously owned the token * @param tokenId The NFT identifier which is being transferred * @param data Additional data with no specified format * @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` */ function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4); }
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } }
pragma solidity ^0.5.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
pragma solidity ^0.5.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); }
pragma solidity ^0.5.0; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ contract IERC721Enumerable is IERC721 { function totalSupply() public view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256 tokenId); function tokenByIndex(uint256 index) public view returns (uint256); }
pragma solidity ^0.5.0; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ contract IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; library Storage { /** * @dev Performs an SLOAD and returns the data in the slot. */ function load( bytes32 slot ) internal view returns (bytes32) { bytes32 result; /* solium-disable-next-line security/no-inline-assembly */ assembly { result := sload(slot) } return result; } /** * @dev Performs an SSTORE to save the value to the slot. */ function store( bytes32 slot, bytes32 value ) internal { /* solium-disable-next-line security/no-inline-assembly */ assembly { sstore(slot, value) } } }
// SPDX-License-Identifier: MIT pragma solidity 0.5.16; pragma experimental ABIEncoderV2; library SapphireTypes { struct ScoreProof { address account; uint256 score; bytes32[] merkleProof; } struct CreditScore { uint256 score; uint256 lastUpdated; } struct Vault { uint256 collateralAmount; uint256 borrowedAmount; } enum Operation { Deposit, Withdraw, Borrow, Repay, Liquidate } struct Action { uint256 amount; Operation operation; address userToLiquidate; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"skin","type":"address"},{"internalType":"uint256","name":"skinTokenId","type":"uint256"}],"indexed":false,"internalType":"struct DefiPassportStorage.SkinRecord","name":"_skinRecord","type":"tuple"}],"name":"ActiveSkinSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_skin","type":"address"},{"indexed":false,"internalType":"uint256","name":"_skinTokenId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"ApprovedSkinStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"skin","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"status","type":"bool"}],"internalType":"struct DefiPassportStorage.TokenIdStatus[]","name":"skinTokenIdStatuses","type":"tuple[]"}],"indexed":false,"internalType":"struct DefiPassportStorage.SkinAndTokenIdStatusRecord[]","name":"_skinsRecords","type":"tuple[]"}],"name":"ApprovedSkinsStatusesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_baseURI","type":"string"}],"name":"BaseURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_creditScoreContract","type":"address"}],"name":"CreditScoreContractSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_skin","type":"address"},{"indexed":false,"internalType":"uint256","name":"_skinTokenId","type":"uint256"}],"name":"DefaultActiveSkinChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_skin","type":"address"},{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"DefaultSkinStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_skinManager","type":"address"}],"name":"SkinManagerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_skin","type":"address"},{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"WhitelistSkinSet","type":"event"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approvedSkins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"creditScoreContract","outputs":[{"internalType":"contract ISapphireCreditScore","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"defaultActiveSkin","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"skin","type":"address"},{"internalType":"uint256","name":"skinTokenId","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"defaultSkins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getActiveSkin","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"skin","type":"address"},{"internalType":"uint256","name":"skinTokenId","type":"uint256"}],"internalType":"struct DefiPassportStorage.SkinRecord","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_creditScoreAddress","type":"address"},{"internalType":"address","name":"_skinManager","type":"address"}],"name":"init","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_skinContract","type":"address"},{"internalType":"uint256","name":"_skinTokenId","type":"uint256"}],"name":"isSkinAvailable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_passportSkin","type":"address"},{"internalType":"uint256","name":"_skinTokenId","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_skin","type":"address"},{"internalType":"uint256","name":"_skinTokenId","type":"uint256"}],"name":"setActiveSkin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_skin","type":"address"},{"internalType":"uint256","name":"_skinTokenId","type":"uint256"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setApprovedSkin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"internalType":"address","name":"skin","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"status","type":"bool"}],"internalType":"struct DefiPassportStorage.TokenIdStatus[]","name":"skinTokenIdStatuses","type":"tuple[]"}],"internalType":"struct DefiPassportStorage.SkinAndTokenIdStatusRecord[]","name":"_skinsToApprove","type":"tuple[]"}],"name":"setApprovedSkins","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_creditScoreAddress","type":"address"}],"name":"setCreditScoreContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_skin","type":"address"},{"internalType":"uint256","name":"_skinTokenId","type":"uint256"}],"name":"setDefaultActiveSkin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_skin","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setDefaultSkin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_skinManager","type":"address"}],"name":"setSkinManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_skinContract","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setWhitelistedSkin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"skinManager","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedSkins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040805160208082018352600080835283519182019093529182529081816200004b6301ffc9a760e01b6001600160e01b03620000d216565b620000666380ac58cd60e01b6001600160e01b03620000d216565b6200008163780e9d6360e01b6001600160e01b03620000d216565b8151620000969060099060208501906200012d565b508051620000ac90600a9060208401906200012d565b50620000c8635b5e139f60e01b6001600160e01b03620000d216565b505050506200022e565b6001600160e01b03198082161415620001085760405162461bcd60e51b8152600401620000ff906200020d565b60405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200017057805160ff1916838001178555620001a0565b82800160010185558215620001a0579182015b82811115620001a057825182559160200191906001019062000183565b50620001ae929150620001b2565b5090565b620001cf91905b80821115620001ae5760008155600101620001b9565b90565b6000620001e1601c8362000225565b7f4552433136353a20696e76616c696420696e7465726661636520696400000000815260200192915050565b602080825281016200021f81620001d2565b92915050565b90815260200190565b6134ef806200023e6000396000f3fe608060405234801561001057600080fd5b50600436106102275760003560e01c80636ba93e6d11610130578063a22cb465116100b8578063d71271501161007c578063d712715014610481578063e1f7c2c914610494578063e838c334146104a7578063e985e9c5146104af578063ee007d2b146104c257610227565b8063a22cb4651461042c578063b0a3388b1461043a578063b88d4fde1461044d578063c6c3bbe61461045b578063c87b56dd1461046e57610227565b80638363f279116100ff5780638363f279146103d857806385bb1a0d146103eb5780638e3d5615146103fe57806395d89b411461041157806397c0c9dd1461041957610227565b80636ba93e6d146103a25780636c0360eb146103b55780636e9960c3146103bd57806370a08231146103c557610227565b806318160ddd116101b35780632f745c59116101825780632f745c591461035657806342842e0e146103485780634f6ccce71461036957806355f804b31461037c5780636352211e1461038f57610227565b806318160ddd1461030d5780631fe6a12a14610322578063205bb4fe1461033557806323b872dd1461034857610227565b806306fdde03116101fa57806306fdde031461029d578063081812fc146102b2578063095ea7b3146102d25780630e07f854146102e75780630e714f53146102fa57610227565b8063010744321461022c57806301ffc9a71461025557806303a42b6f146102685780630671d74e1461027d575b600080fd5b61023f61023a366004612091565b6104d9565b60405161024c91906130d6565b60405180910390f35b61023f61026336600461222f565b61061f565b610270610642565b60405161024c91906130e4565b61029061028b366004612327565b610651565b60405161024c9190613323565b6102a56106f1565b60405161024c9190613112565b6102c56102c0366004612327565b61077f565b60405161024c9190613031565b6102e56102e0366004612187565b6107c2565b005b6102e56102f536600461228f565b6107da565b6102e5610308366004612187565b610919565b6103156109b2565b60405161024c9190613331565b6102e5610330366004612187565b6109b9565b6102e561034336600461201b565b610adb565b6102e56102e0366004612091565b610315610364366004612187565b610b9d565b610315610377366004612327565b610bfe565b6102e561038a36600461224d565b610c45565b6102c561039d366004612327565b610ced565b6102e56103b03660046121b7565b610d22565b6102a5610dbc565b6102c5610e52565b6103156103d336600461201b565b610e82565b6102e56103e6366004612157565b610ecb565b6102e56103f93660046121fa565b6110ee565b61023f61040c36600461201b565b611207565b6102a561121c565b61023f61042736600461201b565b611277565b6102e56102e0366004612157565b6102e5610448366004612157565b61128c565b6102e56102e03660046120de565b610315610469366004612091565b611379565b6102a561047c366004612327565b6114e2565b61023f61048f366004612187565b6115f0565b6102e56104a236600461201b565b611610565b6102c56116ef565b61023f6104bd366004612057565b6116fe565b6104ca61172c565b60405161024c9392919061303f565b6040516331a9108f60e11b815260009081906001600160a01b03851690636352211e9061050a908690600401613331565b60206040518083038186803b15801561052257600080fd5b505afa158015610536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061055a9190810190612039565b6001600160a01b0316141561058a5760405162461bcd60e51b8152600401610581906132f3565b60405180910390fd5b6001600160a01b03831660009081526012602052604090205460ff16156105b357506001610618565b6001600160a01b03831660009081526010602052604090205460ff16806105fd57506001600160a01b038316600090815260116020908152604080832085845290915290205460ff165b156106145761060d848484611748565b9050610618565b5060005b9392505050565b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b600f546001600160a01b031681565b610659611c81565b610661611c81565b50600082815260176020908152604091829020825160608101845281546001600160a01b039081168083526001840154909116938201849052600290920154938101849052926106b192906104d9565b156106bd57905061063d565b5050604080516060810182526013546001600160a01b0390811682526014541660208201526015549181019190915261063d565b600d805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107775780601f1061074c57610100808354040283529160200191610777565b820191906000526020600020905b81548152906001019060200180831161075a57829003601f168201915b505050505081565b600061078a826117e2565b6107a65760405162461bcd60e51b815260040161058190613253565b506000908152600260205260409020546001600160a01b031690565b60405162461bcd60e51b815260040161058190613313565b6107e2610e52565b6001600160a01b0316336001600160a01b0316146108125760405162461bcd60e51b8152600401610581906131c3565b601954610100900460ff168061082b575060195460ff16155b6108475760405162461bcd60e51b815260040161058190613213565b601954610100900460ff16158015610872576019805460ff1961ff0019909116610100171660011790555b61087e600d8888611ca1565b5061088b600e8686611ca1565b50601680546001600160a01b0319166001600160a01b03848116919091179091556108b79084166117ff565b6108d35760405162461bcd60e51b815260040161058190613153565b600f80546001600160a01b0319166001600160a01b0385161790556108fe635b5e139f60e01b61183b565b8015610910576019805461ff00191690555b50505050505050565b600061092433610e82565b116109415760405162461bcd60e51b815260040161058190613223565b61094c3383836104d9565b6109685760405162461bcd60e51b8152600401610581906132a3565b6000610975336000610b9d565b90506109ad816040518060600160405280336001600160a01b03168152602001866001600160a01b031681526020018581525061188a565b505050565b6007545b90565b6016546001600160a01b031633146109e35760405162461bcd60e51b8152600401610581906131b3565b6001600160a01b03821660009081526012602052604090205460ff16610a1b5760405162461bcd60e51b815260040161058190613283565b6014546001600160a01b038381169116141580610a3a57506015548114155b610a565760405162461bcd60e51b8152600401610581906131e3565b60408051606081018252600081526001600160a01b03841660208201819052908201839052601380546001600160a01b03199081169091556014805490911690911790556015829055517fa63f42154dc5ace6ccba481b34896d5fbe1019e9a4c70292623f6beccf2d262990610acf9084908490613082565b60405180910390a15050565b610ae3610e52565b6001600160a01b0316336001600160a01b031614610b135760405162461bcd60e51b8152600401610581906131c3565b6016546001600160a01b0382811691161415610b415760405162461bcd60e51b815260040161058190613123565b601680546001600160a01b0319166001600160a01b0383811691909117918290556040517f425e1cdcac8926c92836942ab60da4237c8dd68f2d59eeb32cb4a825f34a323092610b92921690613031565b60405180910390a150565b6000610ba883610e82565b8210610bc65760405162461bcd60e51b815260040161058190613143565b6001600160a01b0383166000908152600560205260409020805483908110610bea57fe5b906000526020600020015490505b92915050565b6000610c086109b2565b8210610c265760405162461bcd60e51b8152600401610581906132e3565b60078281548110610c3357fe5b90600052602060002001549050919050565b610c4d610e52565b6001600160a01b0316336001600160a01b031614610c7d5760405162461bcd60e51b8152600401610581906131c3565b610cbc82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061198e92505050565b7ff9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f68282604051610acf929190613100565b6000818152600160205260408120546001600160a01b031680610bf85760405162461bcd60e51b815260040161058190613203565b6016546001600160a01b03163314610d4c5760405162461bcd60e51b8152600401610581906131b3565b6001600160a01b038316600090815260116020908152604080832085845290915290819020805460ff1916831515179055517fa730960cb692d4af6fd9cf5133a79b083d5a340e5536f161183e23a9b83849ef90610daf9085908590859061309d565b60405180910390a1505050565b600b8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b5050505050905090565b6000610e7d7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036119a5565b905090565b60006001600160a01b038216610eaa5760405162461bcd60e51b8152600401610581906131f3565b6001600160a01b0382166000908152600360205260409020610bf8906119a5565b6016546001600160a01b03163314610ef55760405162461bcd60e51b8152600401610581906131b3565b80610f28576014546001600160a01b0383811691161415610f285760405162461bcd60e51b815260040161058190613233565b6001600160a01b03821660009081526012602052604090205460ff1615158115151415610f675760405162461bcd60e51b815260040161058190613303565b610f79826001600160a01b03166117ff565b610f955760405162461bcd60e51b815260040161058190613133565b6040516331a9108f60e11b81526000906001600160a01b03841690636352211e90610fc5906001906004016130f2565b60206040518083038186803b158015610fdd57600080fd5b505afa158015610ff1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506110159190810190612039565b6001600160a01b0316141561103c5760405162461bcd60e51b8152600401610581906131d3565b6014546001600160a01b03166110985760408051606081018252600081526001600160a01b03841660208201819052600191909201819052601380546001600160a01b0319908116909155601480549091169092179091556015555b6001600160a01b03821660009081526012602052604090819020805460ff1916831515179055517f37d8505e706f2eca106610aefcf57279b05b69fc927602f57537751cf034822c90610acf9084908490613067565b6016546001600160a01b031633146111185760405162461bcd60e51b8152600401610581906131b3565b60005b81518110156111d757606082828151811061113257fe5b602002602001015160200151905060008090505b81518110156111cd57611157611d1f565b82828151811061116357fe5b6020026020010151905080602001516011600087878151811061118257fe5b602090810291909101810151516001600160a01b0316825281810192909252604090810160009081209451815293909152909120805460ff1916911515919091179055600101611146565b505060010161111b565b507fe63791a001c483f8951307e05573b5deff42a8687b392ace9a7e6a1be3e9f29681604051610b9291906130c5565b60106020526000908152604090205460ff1681565b600e805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107775780601f1061074c57610100808354040283529160200191610777565b60126020526000908152604090205460ff1681565b6016546001600160a01b031633146112b65760405162461bcd60e51b8152600401610581906131b3565b6112c8826001600160a01b03166117ff565b6112e45760405162461bcd60e51b815260040161058190613193565b6001600160a01b03821660009081526010602052604090205460ff16151581151514156113235760405162461bcd60e51b815260040161058190613273565b6001600160a01b03821660009081526010602052604090819020805460ff1916831515179055517fd2b1d5d82623f05f96ed997cb34108f63c27ccb75bd2f19ebea94b179d55644f90610acf9084908490613067565b600f54604051632081615760e01b815260009182916001600160a01b03909116906320816157906113ae908890600401613031565b60606040518083038186803b1580156113c657600080fd5b505afa1580156113da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506113fe9190810190612345565b50509050600081116114225760405162461bcd60e51b8152600401610581906132c3565b61142d8585856104d9565b6114495760405162461bcd60e51b8152600401610581906132a3565b61145285610e82565b1561146f5760405162461bcd60e51b815260040161058190613163565b61147960186119a9565b600061148560186119a5565b905061149186826119b2565b6114a38161149e886119cf565b611ac3565b6114d9816040518060600160405280896001600160a01b03168152602001886001600160a01b031681526020018781525061188a565b95945050505050565b60606114ed826117e2565b6115095760405162461bcd60e51b8152600401610581906132b3565b6000828152600c602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084526060939283018282801561159e5780601f106115735761010080835404028352916020019161159e565b820191906000526020600020905b81548152906001019060200180831161158157829003601f168201915b505050505090508051600014156115c557505060408051602081019091526000815261063d565b600b816040516020016115d9929190613019565b60405160208183030381529060405291505061063d565b601160209081526000928352604080842090915290825290205460ff1681565b611618610e52565b6001600160a01b0316336001600160a01b0316146116485760405162461bcd60e51b8152600401610581906131c3565b600f546001600160a01b03828116911614156116765760405162461bcd60e51b8152600401610581906131a3565b611688816001600160a01b03166117ff565b6116a45760405162461bcd60e51b8152600401610581906132d3565b600f80546001600160a01b0319166001600160a01b0383161790556040517ff5280746e16d30bc414b77f117a4fa3a918ce04d0d6789e62ddbb13a1bb03e3090610b92908390613031565b6016546001600160a01b031681565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6013546014546015546001600160a01b03928316929091169083565b6000836001600160a01b0316836001600160a01b0316636352211e846040518263ffffffff1660e01b81526004016117809190613331565b60206040518083038186803b15801561179857600080fd5b505afa1580156117ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117d09190810190612039565b6001600160a01b031614949350505050565b6000908152600160205260409020546001600160a01b0316151590565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061183357508115155b949350505050565b6001600160e01b031980821614156118655760405162461bcd60e51b815260040161058190613173565b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b611892611c81565b50600082815260176020908152604091829020825160608101845281546001600160a01b0390811682526001830154811682850181905260029093015494820194909452918401519192919091161415806118f557508160400151816040015114155b6119115760405162461bcd60e51b815260040161058190613293565b600083815260176020908152604091829020845181546001600160a01b03199081166001600160a01b039283161783559286015160018301805490941691161790915583820151600290910155517f538b4a14b85698026b973237beaf8e9c5ef9667dc8356bbddde6f4ef2d9be77690610daf908590859061333f565b80516119a190600b906020840190611d36565b5050565b5490565b80546001019055565b6119bc8282611b07565b6119c68282611bce565b6119a181611c0c565b604080516028808252606082810190935282919060208201818038833901905050905060005b6014811015611abc5760008160130360080260020a856001600160a01b031681611a1b57fe5b0460f81b9050600060108260f81c60ff1681611a3357fe5b0460f81b905060008160f81c6010028360f81c0360f81b9050611a5582611c50565b858560020281518110611a6457fe5b60200101906001600160f81b031916908160001a905350611a8481611c50565b858560020260010181518110611a9657fe5b60200101906001600160f81b031916908160001a90535050600190920191506119f59050565b5092915050565b611acc826117e2565b611ae85760405162461bcd60e51b815260040161058190613263565b6000828152600c6020908152604090912082516109ad92840190611d36565b6001600160a01b038216611b2d5760405162461bcd60e51b815260040161058190613243565b611b36816117e2565b15611b535760405162461bcd60e51b815260040161058190613183565b600081815260016020908152604080832080546001600160a01b0319166001600160a01b038716908117909155835260039091529020611b92906119a9565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0390911660009081526005602081815260408084208054868652600684529185208290559282526001810183559183529091200155565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880155565b6000600a60f883901c1015611c70578160f81c60300160f81b905061063d565b8160f81c60570160f81b905061063d565b604080516060810182526000808252602082018190529181019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ce25782800160ff19823516178555611d0f565b82800160010185558215611d0f579182015b82811115611d0f578235825591602001919060010190611cf4565b50611d1b929150611da4565b5090565b604080518082019091526000808252602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611d7757805160ff1916838001178555611d0f565b82800160010185558215611d0f579182015b82811115611d0f578251825591602001919060010190611d89565b6109b691905b80821115611d1b5760008155600101611daa565b8035610bf881613471565b8051610bf881613471565b600082601f830112611de557600080fd5b8135611df8611df382613381565b61335a565b81815260209384019390925082018360005b83811015611e365781358601611e208882611f60565b8452506020928301929190910190600101611e0a565b5050505092915050565b600082601f830112611e5157600080fd5b8135611e5f611df382613381565b91508181835260208401935060208101905083856040840282011115611e8457600080fd5b60005b83811015611e365781611e9a8882611fbf565b84525060209092019160409190910190600101611e87565b8035610bf881613488565b8035610bf881613491565b600082601f830112611ed957600080fd5b8135611ee7611df3826133a2565b91508082526020830160208301858383011115611f0357600080fd5b611f0e83828461342f565b50505092915050565b60008083601f840112611f2957600080fd5b50813567ffffffffffffffff811115611f4157600080fd5b602083019150836001820283011115611f5957600080fd5b9250929050565b600060408284031215611f7257600080fd5b611f7c604061335a565b90506000611f8a8484611dbe565b825250602082013567ffffffffffffffff811115611fa757600080fd5b611fb384828501611e40565b60208301525092915050565b600060408284031215611fd157600080fd5b611fdb604061335a565b90506000611fe98484612005565b8252506020611fb384848301611eb2565b8051610bf88161349a565b8035610bf8816134a3565b8051610bf8816134a3565b60006020828403121561202d57600080fd5b60006118338484611dbe565b60006020828403121561204b57600080fd5b60006118338484611dc9565b6000806040838503121561206a57600080fd5b60006120768585611dbe565b925050602061208785828601611dbe565b9150509250929050565b6000806000606084860312156120a657600080fd5b60006120b28686611dbe565b93505060206120c386828701611dbe565b92505060406120d486828701612005565b9150509250925092565b600080600080608085870312156120f457600080fd5b60006121008787611dbe565b945050602061211187828801611dbe565b935050604061212287828801612005565b925050606085013567ffffffffffffffff81111561213f57600080fd5b61214b87828801611ec8565b91505092959194509250565b6000806040838503121561216a57600080fd5b60006121768585611dbe565b925050602061208785828601611eb2565b6000806040838503121561219a57600080fd5b60006121a68585611dbe565b925050602061208785828601612005565b6000806000606084860312156121cc57600080fd5b60006121d88686611dbe565b93505060206121e986828701612005565b92505060406120d486828701611eb2565b60006020828403121561220c57600080fd5b813567ffffffffffffffff81111561222357600080fd5b61183384828501611dd4565b60006020828403121561224157600080fd5b60006118338484611ebd565b6000806020838503121561226057600080fd5b823567ffffffffffffffff81111561227757600080fd5b61228385828601611f17565b92509250509250929050565b600080600080600080608087890312156122a857600080fd5b863567ffffffffffffffff8111156122bf57600080fd5b6122cb89828a01611f17565b9650965050602087013567ffffffffffffffff8111156122ea57600080fd5b6122f689828a01611f17565b9450945050604061230989828a01611dbe565b925050606061231a89828a01611dbe565b9150509295509295509295565b60006020828403121561233957600080fd5b60006118338484612005565b60008060006060848603121561235a57600080fd5b60006123668686612010565b935050602061237786828701611ffa565b92505060406120d486828701612010565b60006106188383612f83565b60006123a08383612fec565b505060400190565b6123b1816133e9565b82525050565b60006123c2826133dc565b6123cc81856133e0565b9350836020820285016123de856133ca565b8060005b8581101561241857848403895281516123fb8582612388565b9450612406836133ca565b60209a909a01999250506001016123e2565b5091979650505050505050565b6000612430826133dc565b61243a81856133e0565b9350612445836133ca565b8060005b8381101561247357815161245d8882612394565b9750612468836133ca565b925050600101612449565b509495945050505050565b6123b1816133f4565b6123b181613419565b6123b181613424565b60006124a583856133e0565b93506124b283858461342f565b6124bb83613467565b9093019392505050565b60006124d0826133dc565b6124da81856133e0565b93506124ea81856020860161343b565b6124bb81613467565b60006124fe826133dc565b612508818561063d565b935061251881856020860161343b565b9290920192915050565b60008154600181166000811461253f5760018114612562576125a1565b607f6002830416612550818761063d565b60ff19841681529550850192506125a1565b60028204612570818761063d565b955061257b856133d0565b60005b8281101561259a5781548882015260019091019060200161257e565b5050850192505b505092915050565b60006125b66032836133e0565b7f4465666950617373706f72743a207468652073616d6520736b696e206d616e6181527119d95c881a5cc8185b1c9958591e481cd95d60721b602082015260400192915050565b600061260a602e836133e0565b7f4465666950617373706f72743a2074686520676976656e20736b696e2069732081526d1b9bdd08184818dbdb9d1c9858dd60921b602082015260400192915050565b600061265a602b836133e0565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b602082015260400192915050565b60006126a76034836133e0565b7f4465666950617373706f72743a206372656469742073636f72652061646472658152731cdcc81a5cc81b9bdd08184818dbdb9d1c9858dd60621b602082015260400192915050565b60006126fd602e836133e0565b7f4465666950617373706f72743a207573657220616c726561647920686173206181526d081919599a481c185cdcdc1bdc9d60921b602082015260400192915050565b600061274d601c836133e0565b7f4552433136353a20696e76616c696420696e7465726661636520696400000000815260200192915050565b6000612786601c836133e0565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000815260200192915050565b60006127bf6027836133e0565b7f4465666950617373706f72743a2061646472657373206973206e6f74206120638152661bdb9d1c9858dd60ca1b602082015260400192915050565b6000612808603a836133e0565b7f4465666950617373706f72743a207468652073616d652063726564697420736381527f6f7265206164647265737320697320616c726561647920736574000000000000602082015260400192915050565b60006128676028836133e0565b7f4465666950617373706f72743a2063616c6c6572206973206e6f7420736b696e8152671036b0b730b3b2b960c11b602082015260400192915050565b60006128b1601e836133e0565b7f41646d696e61626c653a2063616c6c6572206973206e6f742061646d696e0000815260200192915050565b60006128ea603a836133e0565b7f4465666950617373706f72743a2064656661756c7420736b696e206d7573742081527f6174206c65617374206861766520746f6b656e49642065712031000000000000602082015260400192915050565b60006129496037836133e0565b7f4465666950617373706f72743a2074686520736b696e20697320616c7265616481527f79207365742061732064656661756c7420616374697665000000000000000000602082015260400192915050565b60006129a8602a836133e0565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b602082015260400192915050565b60006129f46029836133e0565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b602082015260400192915050565b6000612a3f602e836133e0565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b602082015260400192915050565b6000612a8f6024836133e0565b7f4465666950617373706f72743a2063616c6c657220686173206e6f20706173738152631c1bdc9d60e21b602082015260400192915050565b6000612ad56038836133e0565b7f446566692050617373706f72743a2063616e6e6f7420756e726567697374657281527f207468652064656661756c742061637469766520736b696e0000000000000000602082015260400192915050565b6000612b346020836133e0565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373815260200192915050565b6000612b6d602c836133e0565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015260400192915050565b6000612bbb602c836133e0565b7f4552433732314d657461646174613a2055524920736574206f66206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015260400192915050565b6000612c09603c836133e0565b7f4465666950617373706f72743a2074686520736b696e20616c7265616479206881527f6173207468652073616d652077686974656c6973742073746174757300000000602082015260400192915050565b6000612c68603b836133e0565b7f4465666950617373706f72743a2074686520676976656e20736b696e2069732081527f6e6f74207265676973746572656420617320612064656661756c740000000000602082015260400192915050565b6000612cc7602d836133e0565b7f4465666950617373706f72743a207468652073616d6520736b696e206973206181526c6c72656164792061637469766560981b602082015260400192915050565b6000612d16601a836133e0565b7f4465666950617373706f72743a20696e76616c696420736b696e000000000000815260200192915050565b6000612d4f602f836133e0565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526e3732bc34b9ba32b73a103a37b5b2b760891b602082015260400192915050565b6000612da0602a836133e0565b7f4465666950617373706f72743a20746865207573657220686173206e6f206372815269656469742073636f726560b01b602082015260400192915050565b6000612dec6031836133e0565b7f4465666950617373706f72743a2074686520676976656e2061646472657373208152701a5cc81b9bdd08184818dbdb9d1c9858dd607a1b602082015260400192915050565b6000612e3f602c836133e0565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b602082015260400192915050565b6000612e8d6038836133e0565b7f4465666950617373706f72743a207468652073706563696669656420736b696e81527f20746f6b656e20696420646f6573206e6f742065786973740000000000000000602082015260400192915050565b6000612eec602e836133e0565b7f4465666950617373706f72743a20736b696e20616c726561647920686173207481526d68652073616d652073746174757360901b602082015260400192915050565b6000612f3c6032836133e0565b7f4465666950617373706f72743a20646566692070617373706f72747320617265815271206e6f74207472616e736665727261626c6560701b602082015260400192915050565b80516000906040840190612f9785826123a8565b50602083015184820360208601526114d98282612425565b80516060830190612fc084826123a8565b506020820151612fd360208501826123a8565b506040820151612fe66040850182613010565b50505050565b80516040830190612ffd8482613010565b506020820151612fe6602085018261247e565b6123b1816109b6565b60006130258285612522565b915061183382846124f3565b60208101610bf882846123a8565b6060810161304d82866123a8565b61305a60208301856123a8565b6118336040830184613010565b6040810161307582856123a8565b610618602083018461247e565b6040810161309082856123a8565b6106186020830184613010565b606081016130ab82866123a8565b6130b86020830185613010565b611833604083018461247e565b6020808252810161061881846123b7565b60208101610bf8828461247e565b60208101610bf88284612487565b60208101610bf88284612490565b60208082528101611833818486612499565b6020808252810161061881846124c5565b60208082528101610bf8816125a9565b60208082528101610bf8816125fd565b60208082528101610bf88161264d565b60208082528101610bf88161269a565b60208082528101610bf8816126f0565b60208082528101610bf881612740565b60208082528101610bf881612779565b60208082528101610bf8816127b2565b60208082528101610bf8816127fb565b60208082528101610bf88161285a565b60208082528101610bf8816128a4565b60208082528101610bf8816128dd565b60208082528101610bf88161293c565b60208082528101610bf88161299b565b60208082528101610bf8816129e7565b60208082528101610bf881612a32565b60208082528101610bf881612a82565b60208082528101610bf881612ac8565b60208082528101610bf881612b27565b60208082528101610bf881612b60565b60208082528101610bf881612bae565b60208082528101610bf881612bfc565b60208082528101610bf881612c5b565b60208082528101610bf881612cba565b60208082528101610bf881612d09565b60208082528101610bf881612d42565b60208082528101610bf881612d93565b60208082528101610bf881612ddf565b60208082528101610bf881612e32565b60208082528101610bf881612e80565b60208082528101610bf881612edf565b60208082528101610bf881612f2f565b60608101610bf88284612faf565b60208101610bf88284613010565b6080810161334d8285613010565b6106186020830184612faf565b60405181810167ffffffffffffffff8111828210171561337957600080fd5b604052919050565b600067ffffffffffffffff82111561339857600080fd5b5060209081020190565b600067ffffffffffffffff8211156133b957600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b90815260200190565b6000610bf88261340d565b151590565b6001600160e01b03191690565b61ffff1690565b6001600160a01b031690565b6000610bf8826133e9565b6000610bf8826109b6565b82818337506000910152565b60005b8381101561345657818101518382015260200161343e565b83811115612fe65750506000910152565b601f01601f191690565b61347a816133e9565b811461348557600080fd5b50565b61347a816133f4565b61347a816133f9565b61347a81613406565b61347a816109b656fea365627a7a72315820df7978d8e651d5aaaad36294e6051122ff174d06261130dbc00d40ba020b71ac6c6578706572696d656e74616cf564736f6c63430005100040
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102275760003560e01c80636ba93e6d11610130578063a22cb465116100b8578063d71271501161007c578063d712715014610481578063e1f7c2c914610494578063e838c334146104a7578063e985e9c5146104af578063ee007d2b146104c257610227565b8063a22cb4651461042c578063b0a3388b1461043a578063b88d4fde1461044d578063c6c3bbe61461045b578063c87b56dd1461046e57610227565b80638363f279116100ff5780638363f279146103d857806385bb1a0d146103eb5780638e3d5615146103fe57806395d89b411461041157806397c0c9dd1461041957610227565b80636ba93e6d146103a25780636c0360eb146103b55780636e9960c3146103bd57806370a08231146103c557610227565b806318160ddd116101b35780632f745c59116101825780632f745c591461035657806342842e0e146103485780634f6ccce71461036957806355f804b31461037c5780636352211e1461038f57610227565b806318160ddd1461030d5780631fe6a12a14610322578063205bb4fe1461033557806323b872dd1461034857610227565b806306fdde03116101fa57806306fdde031461029d578063081812fc146102b2578063095ea7b3146102d25780630e07f854146102e75780630e714f53146102fa57610227565b8063010744321461022c57806301ffc9a71461025557806303a42b6f146102685780630671d74e1461027d575b600080fd5b61023f61023a366004612091565b6104d9565b60405161024c91906130d6565b60405180910390f35b61023f61026336600461222f565b61061f565b610270610642565b60405161024c91906130e4565b61029061028b366004612327565b610651565b60405161024c9190613323565b6102a56106f1565b60405161024c9190613112565b6102c56102c0366004612327565b61077f565b60405161024c9190613031565b6102e56102e0366004612187565b6107c2565b005b6102e56102f536600461228f565b6107da565b6102e5610308366004612187565b610919565b6103156109b2565b60405161024c9190613331565b6102e5610330366004612187565b6109b9565b6102e561034336600461201b565b610adb565b6102e56102e0366004612091565b610315610364366004612187565b610b9d565b610315610377366004612327565b610bfe565b6102e561038a36600461224d565b610c45565b6102c561039d366004612327565b610ced565b6102e56103b03660046121b7565b610d22565b6102a5610dbc565b6102c5610e52565b6103156103d336600461201b565b610e82565b6102e56103e6366004612157565b610ecb565b6102e56103f93660046121fa565b6110ee565b61023f61040c36600461201b565b611207565b6102a561121c565b61023f61042736600461201b565b611277565b6102e56102e0366004612157565b6102e5610448366004612157565b61128c565b6102e56102e03660046120de565b610315610469366004612091565b611379565b6102a561047c366004612327565b6114e2565b61023f61048f366004612187565b6115f0565b6102e56104a236600461201b565b611610565b6102c56116ef565b61023f6104bd366004612057565b6116fe565b6104ca61172c565b60405161024c9392919061303f565b6040516331a9108f60e11b815260009081906001600160a01b03851690636352211e9061050a908690600401613331565b60206040518083038186803b15801561052257600080fd5b505afa158015610536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061055a9190810190612039565b6001600160a01b0316141561058a5760405162461bcd60e51b8152600401610581906132f3565b60405180910390fd5b6001600160a01b03831660009081526012602052604090205460ff16156105b357506001610618565b6001600160a01b03831660009081526010602052604090205460ff16806105fd57506001600160a01b038316600090815260116020908152604080832085845290915290205460ff165b156106145761060d848484611748565b9050610618565b5060005b9392505050565b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b600f546001600160a01b031681565b610659611c81565b610661611c81565b50600082815260176020908152604091829020825160608101845281546001600160a01b039081168083526001840154909116938201849052600290920154938101849052926106b192906104d9565b156106bd57905061063d565b5050604080516060810182526013546001600160a01b0390811682526014541660208201526015549181019190915261063d565b600d805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107775780601f1061074c57610100808354040283529160200191610777565b820191906000526020600020905b81548152906001019060200180831161075a57829003601f168201915b505050505081565b600061078a826117e2565b6107a65760405162461bcd60e51b815260040161058190613253565b506000908152600260205260409020546001600160a01b031690565b60405162461bcd60e51b815260040161058190613313565b6107e2610e52565b6001600160a01b0316336001600160a01b0316146108125760405162461bcd60e51b8152600401610581906131c3565b601954610100900460ff168061082b575060195460ff16155b6108475760405162461bcd60e51b815260040161058190613213565b601954610100900460ff16158015610872576019805460ff1961ff0019909116610100171660011790555b61087e600d8888611ca1565b5061088b600e8686611ca1565b50601680546001600160a01b0319166001600160a01b03848116919091179091556108b79084166117ff565b6108d35760405162461bcd60e51b815260040161058190613153565b600f80546001600160a01b0319166001600160a01b0385161790556108fe635b5e139f60e01b61183b565b8015610910576019805461ff00191690555b50505050505050565b600061092433610e82565b116109415760405162461bcd60e51b815260040161058190613223565b61094c3383836104d9565b6109685760405162461bcd60e51b8152600401610581906132a3565b6000610975336000610b9d565b90506109ad816040518060600160405280336001600160a01b03168152602001866001600160a01b031681526020018581525061188a565b505050565b6007545b90565b6016546001600160a01b031633146109e35760405162461bcd60e51b8152600401610581906131b3565b6001600160a01b03821660009081526012602052604090205460ff16610a1b5760405162461bcd60e51b815260040161058190613283565b6014546001600160a01b038381169116141580610a3a57506015548114155b610a565760405162461bcd60e51b8152600401610581906131e3565b60408051606081018252600081526001600160a01b03841660208201819052908201839052601380546001600160a01b03199081169091556014805490911690911790556015829055517fa63f42154dc5ace6ccba481b34896d5fbe1019e9a4c70292623f6beccf2d262990610acf9084908490613082565b60405180910390a15050565b610ae3610e52565b6001600160a01b0316336001600160a01b031614610b135760405162461bcd60e51b8152600401610581906131c3565b6016546001600160a01b0382811691161415610b415760405162461bcd60e51b815260040161058190613123565b601680546001600160a01b0319166001600160a01b0383811691909117918290556040517f425e1cdcac8926c92836942ab60da4237c8dd68f2d59eeb32cb4a825f34a323092610b92921690613031565b60405180910390a150565b6000610ba883610e82565b8210610bc65760405162461bcd60e51b815260040161058190613143565b6001600160a01b0383166000908152600560205260409020805483908110610bea57fe5b906000526020600020015490505b92915050565b6000610c086109b2565b8210610c265760405162461bcd60e51b8152600401610581906132e3565b60078281548110610c3357fe5b90600052602060002001549050919050565b610c4d610e52565b6001600160a01b0316336001600160a01b031614610c7d5760405162461bcd60e51b8152600401610581906131c3565b610cbc82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061198e92505050565b7ff9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f68282604051610acf929190613100565b6000818152600160205260408120546001600160a01b031680610bf85760405162461bcd60e51b815260040161058190613203565b6016546001600160a01b03163314610d4c5760405162461bcd60e51b8152600401610581906131b3565b6001600160a01b038316600090815260116020908152604080832085845290915290819020805460ff1916831515179055517fa730960cb692d4af6fd9cf5133a79b083d5a340e5536f161183e23a9b83849ef90610daf9085908590859061309d565b60405180910390a1505050565b600b8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e485780601f10610e1d57610100808354040283529160200191610e48565b820191906000526020600020905b815481529060010190602001808311610e2b57829003601f168201915b5050505050905090565b6000610e7d7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036119a5565b905090565b60006001600160a01b038216610eaa5760405162461bcd60e51b8152600401610581906131f3565b6001600160a01b0382166000908152600360205260409020610bf8906119a5565b6016546001600160a01b03163314610ef55760405162461bcd60e51b8152600401610581906131b3565b80610f28576014546001600160a01b0383811691161415610f285760405162461bcd60e51b815260040161058190613233565b6001600160a01b03821660009081526012602052604090205460ff1615158115151415610f675760405162461bcd60e51b815260040161058190613303565b610f79826001600160a01b03166117ff565b610f955760405162461bcd60e51b815260040161058190613133565b6040516331a9108f60e11b81526000906001600160a01b03841690636352211e90610fc5906001906004016130f2565b60206040518083038186803b158015610fdd57600080fd5b505afa158015610ff1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506110159190810190612039565b6001600160a01b0316141561103c5760405162461bcd60e51b8152600401610581906131d3565b6014546001600160a01b03166110985760408051606081018252600081526001600160a01b03841660208201819052600191909201819052601380546001600160a01b0319908116909155601480549091169092179091556015555b6001600160a01b03821660009081526012602052604090819020805460ff1916831515179055517f37d8505e706f2eca106610aefcf57279b05b69fc927602f57537751cf034822c90610acf9084908490613067565b6016546001600160a01b031633146111185760405162461bcd60e51b8152600401610581906131b3565b60005b81518110156111d757606082828151811061113257fe5b602002602001015160200151905060008090505b81518110156111cd57611157611d1f565b82828151811061116357fe5b6020026020010151905080602001516011600087878151811061118257fe5b602090810291909101810151516001600160a01b0316825281810192909252604090810160009081209451815293909152909120805460ff1916911515919091179055600101611146565b505060010161111b565b507fe63791a001c483f8951307e05573b5deff42a8687b392ace9a7e6a1be3e9f29681604051610b9291906130c5565b60106020526000908152604090205460ff1681565b600e805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156107775780601f1061074c57610100808354040283529160200191610777565b60126020526000908152604090205460ff1681565b6016546001600160a01b031633146112b65760405162461bcd60e51b8152600401610581906131b3565b6112c8826001600160a01b03166117ff565b6112e45760405162461bcd60e51b815260040161058190613193565b6001600160a01b03821660009081526010602052604090205460ff16151581151514156113235760405162461bcd60e51b815260040161058190613273565b6001600160a01b03821660009081526010602052604090819020805460ff1916831515179055517fd2b1d5d82623f05f96ed997cb34108f63c27ccb75bd2f19ebea94b179d55644f90610acf9084908490613067565b600f54604051632081615760e01b815260009182916001600160a01b03909116906320816157906113ae908890600401613031565b60606040518083038186803b1580156113c657600080fd5b505afa1580156113da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506113fe9190810190612345565b50509050600081116114225760405162461bcd60e51b8152600401610581906132c3565b61142d8585856104d9565b6114495760405162461bcd60e51b8152600401610581906132a3565b61145285610e82565b1561146f5760405162461bcd60e51b815260040161058190613163565b61147960186119a9565b600061148560186119a5565b905061149186826119b2565b6114a38161149e886119cf565b611ac3565b6114d9816040518060600160405280896001600160a01b03168152602001886001600160a01b031681526020018781525061188a565b95945050505050565b60606114ed826117e2565b6115095760405162461bcd60e51b8152600401610581906132b3565b6000828152600c602090815260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084526060939283018282801561159e5780601f106115735761010080835404028352916020019161159e565b820191906000526020600020905b81548152906001019060200180831161158157829003601f168201915b505050505090508051600014156115c557505060408051602081019091526000815261063d565b600b816040516020016115d9929190613019565b60405160208183030381529060405291505061063d565b601160209081526000928352604080842090915290825290205460ff1681565b611618610e52565b6001600160a01b0316336001600160a01b0316146116485760405162461bcd60e51b8152600401610581906131c3565b600f546001600160a01b03828116911614156116765760405162461bcd60e51b8152600401610581906131a3565b611688816001600160a01b03166117ff565b6116a45760405162461bcd60e51b8152600401610581906132d3565b600f80546001600160a01b0319166001600160a01b0383161790556040517ff5280746e16d30bc414b77f117a4fa3a918ce04d0d6789e62ddbb13a1bb03e3090610b92908390613031565b6016546001600160a01b031681565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6013546014546015546001600160a01b03928316929091169083565b6000836001600160a01b0316836001600160a01b0316636352211e846040518263ffffffff1660e01b81526004016117809190613331565b60206040518083038186803b15801561179857600080fd5b505afa1580156117ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506117d09190810190612039565b6001600160a01b031614949350505050565b6000908152600160205260409020546001600160a01b0316151590565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061183357508115155b949350505050565b6001600160e01b031980821614156118655760405162461bcd60e51b815260040161058190613173565b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b611892611c81565b50600082815260176020908152604091829020825160608101845281546001600160a01b0390811682526001830154811682850181905260029093015494820194909452918401519192919091161415806118f557508160400151816040015114155b6119115760405162461bcd60e51b815260040161058190613293565b600083815260176020908152604091829020845181546001600160a01b03199081166001600160a01b039283161783559286015160018301805490941691161790915583820151600290910155517f538b4a14b85698026b973237beaf8e9c5ef9667dc8356bbddde6f4ef2d9be77690610daf908590859061333f565b80516119a190600b906020840190611d36565b5050565b5490565b80546001019055565b6119bc8282611b07565b6119c68282611bce565b6119a181611c0c565b604080516028808252606082810190935282919060208201818038833901905050905060005b6014811015611abc5760008160130360080260020a856001600160a01b031681611a1b57fe5b0460f81b9050600060108260f81c60ff1681611a3357fe5b0460f81b905060008160f81c6010028360f81c0360f81b9050611a5582611c50565b858560020281518110611a6457fe5b60200101906001600160f81b031916908160001a905350611a8481611c50565b858560020260010181518110611a9657fe5b60200101906001600160f81b031916908160001a90535050600190920191506119f59050565b5092915050565b611acc826117e2565b611ae85760405162461bcd60e51b815260040161058190613263565b6000828152600c6020908152604090912082516109ad92840190611d36565b6001600160a01b038216611b2d5760405162461bcd60e51b815260040161058190613243565b611b36816117e2565b15611b535760405162461bcd60e51b815260040161058190613183565b600081815260016020908152604080832080546001600160a01b0319166001600160a01b038716908117909155835260039091529020611b92906119a9565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0390911660009081526005602081815260408084208054868652600684529185208290559282526001810183559183529091200155565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880155565b6000600a60f883901c1015611c70578160f81c60300160f81b905061063d565b8160f81c60570160f81b905061063d565b604080516060810182526000808252602082018190529181019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ce25782800160ff19823516178555611d0f565b82800160010185558215611d0f579182015b82811115611d0f578235825591602001919060010190611cf4565b50611d1b929150611da4565b5090565b604080518082019091526000808252602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611d7757805160ff1916838001178555611d0f565b82800160010185558215611d0f579182015b82811115611d0f578251825591602001919060010190611d89565b6109b691905b80821115611d1b5760008155600101611daa565b8035610bf881613471565b8051610bf881613471565b600082601f830112611de557600080fd5b8135611df8611df382613381565b61335a565b81815260209384019390925082018360005b83811015611e365781358601611e208882611f60565b8452506020928301929190910190600101611e0a565b5050505092915050565b600082601f830112611e5157600080fd5b8135611e5f611df382613381565b91508181835260208401935060208101905083856040840282011115611e8457600080fd5b60005b83811015611e365781611e9a8882611fbf565b84525060209092019160409190910190600101611e87565b8035610bf881613488565b8035610bf881613491565b600082601f830112611ed957600080fd5b8135611ee7611df3826133a2565b91508082526020830160208301858383011115611f0357600080fd5b611f0e83828461342f565b50505092915050565b60008083601f840112611f2957600080fd5b50813567ffffffffffffffff811115611f4157600080fd5b602083019150836001820283011115611f5957600080fd5b9250929050565b600060408284031215611f7257600080fd5b611f7c604061335a565b90506000611f8a8484611dbe565b825250602082013567ffffffffffffffff811115611fa757600080fd5b611fb384828501611e40565b60208301525092915050565b600060408284031215611fd157600080fd5b611fdb604061335a565b90506000611fe98484612005565b8252506020611fb384848301611eb2565b8051610bf88161349a565b8035610bf8816134a3565b8051610bf8816134a3565b60006020828403121561202d57600080fd5b60006118338484611dbe565b60006020828403121561204b57600080fd5b60006118338484611dc9565b6000806040838503121561206a57600080fd5b60006120768585611dbe565b925050602061208785828601611dbe565b9150509250929050565b6000806000606084860312156120a657600080fd5b60006120b28686611dbe565b93505060206120c386828701611dbe565b92505060406120d486828701612005565b9150509250925092565b600080600080608085870312156120f457600080fd5b60006121008787611dbe565b945050602061211187828801611dbe565b935050604061212287828801612005565b925050606085013567ffffffffffffffff81111561213f57600080fd5b61214b87828801611ec8565b91505092959194509250565b6000806040838503121561216a57600080fd5b60006121768585611dbe565b925050602061208785828601611eb2565b6000806040838503121561219a57600080fd5b60006121a68585611dbe565b925050602061208785828601612005565b6000806000606084860312156121cc57600080fd5b60006121d88686611dbe565b93505060206121e986828701612005565b92505060406120d486828701611eb2565b60006020828403121561220c57600080fd5b813567ffffffffffffffff81111561222357600080fd5b61183384828501611dd4565b60006020828403121561224157600080fd5b60006118338484611ebd565b6000806020838503121561226057600080fd5b823567ffffffffffffffff81111561227757600080fd5b61228385828601611f17565b92509250509250929050565b600080600080600080608087890312156122a857600080fd5b863567ffffffffffffffff8111156122bf57600080fd5b6122cb89828a01611f17565b9650965050602087013567ffffffffffffffff8111156122ea57600080fd5b6122f689828a01611f17565b9450945050604061230989828a01611dbe565b925050606061231a89828a01611dbe565b9150509295509295509295565b60006020828403121561233957600080fd5b60006118338484612005565b60008060006060848603121561235a57600080fd5b60006123668686612010565b935050602061237786828701611ffa565b92505060406120d486828701612010565b60006106188383612f83565b60006123a08383612fec565b505060400190565b6123b1816133e9565b82525050565b60006123c2826133dc565b6123cc81856133e0565b9350836020820285016123de856133ca565b8060005b8581101561241857848403895281516123fb8582612388565b9450612406836133ca565b60209a909a01999250506001016123e2565b5091979650505050505050565b6000612430826133dc565b61243a81856133e0565b9350612445836133ca565b8060005b8381101561247357815161245d8882612394565b9750612468836133ca565b925050600101612449565b509495945050505050565b6123b1816133f4565b6123b181613419565b6123b181613424565b60006124a583856133e0565b93506124b283858461342f565b6124bb83613467565b9093019392505050565b60006124d0826133dc565b6124da81856133e0565b93506124ea81856020860161343b565b6124bb81613467565b60006124fe826133dc565b612508818561063d565b935061251881856020860161343b565b9290920192915050565b60008154600181166000811461253f5760018114612562576125a1565b607f6002830416612550818761063d565b60ff19841681529550850192506125a1565b60028204612570818761063d565b955061257b856133d0565b60005b8281101561259a5781548882015260019091019060200161257e565b5050850192505b505092915050565b60006125b66032836133e0565b7f4465666950617373706f72743a207468652073616d6520736b696e206d616e6181527119d95c881a5cc8185b1c9958591e481cd95d60721b602082015260400192915050565b600061260a602e836133e0565b7f4465666950617373706f72743a2074686520676976656e20736b696e2069732081526d1b9bdd08184818dbdb9d1c9858dd60921b602082015260400192915050565b600061265a602b836133e0565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b602082015260400192915050565b60006126a76034836133e0565b7f4465666950617373706f72743a206372656469742073636f72652061646472658152731cdcc81a5cc81b9bdd08184818dbdb9d1c9858dd60621b602082015260400192915050565b60006126fd602e836133e0565b7f4465666950617373706f72743a207573657220616c726561647920686173206181526d081919599a481c185cdcdc1bdc9d60921b602082015260400192915050565b600061274d601c836133e0565b7f4552433136353a20696e76616c696420696e7465726661636520696400000000815260200192915050565b6000612786601c836133e0565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000815260200192915050565b60006127bf6027836133e0565b7f4465666950617373706f72743a2061646472657373206973206e6f74206120638152661bdb9d1c9858dd60ca1b602082015260400192915050565b6000612808603a836133e0565b7f4465666950617373706f72743a207468652073616d652063726564697420736381527f6f7265206164647265737320697320616c726561647920736574000000000000602082015260400192915050565b60006128676028836133e0565b7f4465666950617373706f72743a2063616c6c6572206973206e6f7420736b696e8152671036b0b730b3b2b960c11b602082015260400192915050565b60006128b1601e836133e0565b7f41646d696e61626c653a2063616c6c6572206973206e6f742061646d696e0000815260200192915050565b60006128ea603a836133e0565b7f4465666950617373706f72743a2064656661756c7420736b696e206d7573742081527f6174206c65617374206861766520746f6b656e49642065712031000000000000602082015260400192915050565b60006129496037836133e0565b7f4465666950617373706f72743a2074686520736b696e20697320616c7265616481527f79207365742061732064656661756c7420616374697665000000000000000000602082015260400192915050565b60006129a8602a836133e0565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b602082015260400192915050565b60006129f46029836133e0565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b602082015260400192915050565b6000612a3f602e836133e0565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b602082015260400192915050565b6000612a8f6024836133e0565b7f4465666950617373706f72743a2063616c6c657220686173206e6f20706173738152631c1bdc9d60e21b602082015260400192915050565b6000612ad56038836133e0565b7f446566692050617373706f72743a2063616e6e6f7420756e726567697374657281527f207468652064656661756c742061637469766520736b696e0000000000000000602082015260400192915050565b6000612b346020836133e0565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373815260200192915050565b6000612b6d602c836133e0565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015260400192915050565b6000612bbb602c836133e0565b7f4552433732314d657461646174613a2055524920736574206f66206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015260400192915050565b6000612c09603c836133e0565b7f4465666950617373706f72743a2074686520736b696e20616c7265616479206881527f6173207468652073616d652077686974656c6973742073746174757300000000602082015260400192915050565b6000612c68603b836133e0565b7f4465666950617373706f72743a2074686520676976656e20736b696e2069732081527f6e6f74207265676973746572656420617320612064656661756c740000000000602082015260400192915050565b6000612cc7602d836133e0565b7f4465666950617373706f72743a207468652073616d6520736b696e206973206181526c6c72656164792061637469766560981b602082015260400192915050565b6000612d16601a836133e0565b7f4465666950617373706f72743a20696e76616c696420736b696e000000000000815260200192915050565b6000612d4f602f836133e0565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526e3732bc34b9ba32b73a103a37b5b2b760891b602082015260400192915050565b6000612da0602a836133e0565b7f4465666950617373706f72743a20746865207573657220686173206e6f206372815269656469742073636f726560b01b602082015260400192915050565b6000612dec6031836133e0565b7f4465666950617373706f72743a2074686520676976656e2061646472657373208152701a5cc81b9bdd08184818dbdb9d1c9858dd607a1b602082015260400192915050565b6000612e3f602c836133e0565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b602082015260400192915050565b6000612e8d6038836133e0565b7f4465666950617373706f72743a207468652073706563696669656420736b696e81527f20746f6b656e20696420646f6573206e6f742065786973740000000000000000602082015260400192915050565b6000612eec602e836133e0565b7f4465666950617373706f72743a20736b696e20616c726561647920686173207481526d68652073616d652073746174757360901b602082015260400192915050565b6000612f3c6032836133e0565b7f4465666950617373706f72743a20646566692070617373706f72747320617265815271206e6f74207472616e736665727261626c6560701b602082015260400192915050565b80516000906040840190612f9785826123a8565b50602083015184820360208601526114d98282612425565b80516060830190612fc084826123a8565b506020820151612fd360208501826123a8565b506040820151612fe66040850182613010565b50505050565b80516040830190612ffd8482613010565b506020820151612fe6602085018261247e565b6123b1816109b6565b60006130258285612522565b915061183382846124f3565b60208101610bf882846123a8565b6060810161304d82866123a8565b61305a60208301856123a8565b6118336040830184613010565b6040810161307582856123a8565b610618602083018461247e565b6040810161309082856123a8565b6106186020830184613010565b606081016130ab82866123a8565b6130b86020830185613010565b611833604083018461247e565b6020808252810161061881846123b7565b60208101610bf8828461247e565b60208101610bf88284612487565b60208101610bf88284612490565b60208082528101611833818486612499565b6020808252810161061881846124c5565b60208082528101610bf8816125a9565b60208082528101610bf8816125fd565b60208082528101610bf88161264d565b60208082528101610bf88161269a565b60208082528101610bf8816126f0565b60208082528101610bf881612740565b60208082528101610bf881612779565b60208082528101610bf8816127b2565b60208082528101610bf8816127fb565b60208082528101610bf88161285a565b60208082528101610bf8816128a4565b60208082528101610bf8816128dd565b60208082528101610bf88161293c565b60208082528101610bf88161299b565b60208082528101610bf8816129e7565b60208082528101610bf881612a32565b60208082528101610bf881612a82565b60208082528101610bf881612ac8565b60208082528101610bf881612b27565b60208082528101610bf881612b60565b60208082528101610bf881612bae565b60208082528101610bf881612bfc565b60208082528101610bf881612c5b565b60208082528101610bf881612cba565b60208082528101610bf881612d09565b60208082528101610bf881612d42565b60208082528101610bf881612d93565b60208082528101610bf881612ddf565b60208082528101610bf881612e32565b60208082528101610bf881612e80565b60208082528101610bf881612edf565b60208082528101610bf881612f2f565b60608101610bf88284612faf565b60208101610bf88284613010565b6080810161334d8285613010565b6106186020830184612faf565b60405181810167ffffffffffffffff8111828210171561337957600080fd5b604052919050565b600067ffffffffffffffff82111561339857600080fd5b5060209081020190565b600067ffffffffffffffff8211156133b957600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b90815260200190565b6000610bf88261340d565b151590565b6001600160e01b03191690565b61ffff1690565b6001600160a01b031690565b6000610bf8826133e9565b6000610bf8826109b6565b82818337506000910152565b60005b8381101561345657818101518382015260200161343e565b83811115612fe65750506000910152565b601f01601f191690565b61347a816133e9565b811461348557600080fd5b50565b61347a816133f4565b61347a816133f9565b61347a81613406565b61347a816109b656fea365627a7a72315820df7978d8e651d5aaaad36294e6051122ff174d06261130dbc00d40ba020b71ac6c6578706572696d656e74616cf564736f6c63430005100040
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.