More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,069 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake NFT | 20549914 | 13 days ago | IN | 0 ETH | 0.00005518 | ||||
Unstake NFT | 20549907 | 13 days ago | IN | 0 ETH | 0.0003522 | ||||
Unstake NFT | 20408355 | 33 days ago | IN | 0 ETH | 0.00031115 | ||||
Unstake NFT | 20246172 | 56 days ago | IN | 0 ETH | 0.00048877 | ||||
Unstake NFT | 19154012 | 209 days ago | IN | 0 ETH | 0.00048138 | ||||
Unstake NFT | 19153961 | 209 days ago | IN | 0 ETH | 0.00372734 | ||||
Unstake NFT | 19058879 | 222 days ago | IN | 0 ETH | 0.00268353 | ||||
Unstake NFT | 19026353 | 227 days ago | IN | 0 ETH | 0.00664156 | ||||
Unstake NFT | 18874116 | 248 days ago | IN | 0 ETH | 0.00269496 | ||||
Unstake NFT | 18874112 | 248 days ago | IN | 0 ETH | 0.00273835 | ||||
Unstake NFT | 18874109 | 248 days ago | IN | 0 ETH | 0.00276789 | ||||
Unstake NFT | 18874104 | 248 days ago | IN | 0 ETH | 0.00271425 | ||||
Unstake NFT | 18874099 | 248 days ago | IN | 0 ETH | 0.00290724 | ||||
Unstake NFT | 18874085 | 248 days ago | IN | 0 ETH | 0.0027114 | ||||
Unstake NFT | 18874081 | 248 days ago | IN | 0 ETH | 0.00259956 | ||||
Unstake NFT | 18874078 | 248 days ago | IN | 0 ETH | 0.0028187 | ||||
Unstake NFT | 18874075 | 248 days ago | IN | 0 ETH | 0.00287013 | ||||
Unstake NFT | 18874055 | 248 days ago | IN | 0 ETH | 0.00262351 | ||||
Unstake NFT | 18719257 | 270 days ago | IN | 0 ETH | 0.00847836 | ||||
Unstake NFT | 18505151 | 300 days ago | IN | 0 ETH | 0.00235805 | ||||
Unstake NFT | 18505131 | 300 days ago | IN | 0 ETH | 0.00236322 | ||||
Unstake NFT | 18502989 | 300 days ago | IN | 0 ETH | 0.00196959 | ||||
Unstake NFT | 18502989 | 300 days ago | IN | 0 ETH | 0.00196959 | ||||
Unstake NFT | 18501421 | 300 days ago | IN | 0 ETH | 0.00196959 | ||||
Unstake NFT | 18501104 | 300 days ago | IN | 0 ETH | 0.00216655 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
14523119 | 879 days ago | 1.6 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Bank
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "./Pausable.sol"; import "./Billionaire.sol"; import "./Cyborg.sol"; contract Bank is IERC721Receiver, Pausable { struct Token { uint256 nft_party; uint256 nft_cybork; uint256 staking_time; } uint256 public totalPoints; uint256 public totalPartyApe; uint256 public totalCyborg; uint256 public totalReward; address payable addressParty; address public addressCybork; mapping(uint256 => uint256) public indexTokenParty; mapping(uint256 => uint256) public idTokenCybork; mapping(uint256 => address) public userTokenParty; mapping(address => uint256) public userReward; mapping(address => uint256) public userPoints; mapping(address => bool) public isUser; mapping(address => Token[]) public stakedToken; address[] public users; Billionaire partyContract; Cyborg cyborkContract; constructor(address payable _addressParty, address _addressCybork) { require( _addressParty != address(0), "Bank Billionaire Club: party contract address is Zero address" ); require( _addressCybork != address(0), "Bank Billionaire Club: cybork contract address is Zero address" ); addressParty = payable(_addressParty); partyContract = Billionaire(addressParty); addressCybork = _addressCybork; cyborkContract = Cyborg(addressCybork); } function getNFT(address _user) public view returns (Token[] memory) { return stakedToken[_user]; } function stakeNFT(uint256 _tokenParty, uint256 _tokenCybork) external whenNotPaused { require( (partyContract.ownerOf(_tokenParty) == msg.sender), "Billionaire Club: Caller is not the owner of the Party Ape token" ); require( (cyborkContract.ownerOf(_tokenCybork) == msg.sender), "Cyborgs Billionaire Club: Caller is not the owner of the Cybork token" ); require( (cyborkContract.isTokenMerged(_tokenParty) == true), "Cyborgs Billionaire Club: Party Ape token is not merged " ); stakedToken[msg.sender].push( Token(_tokenParty, _tokenCybork, block.timestamp) ); indexTokenParty[_tokenParty] = stakedToken[msg.sender].length -1; idTokenCybork[_tokenParty] = _tokenCybork; userTokenParty[_tokenParty] = msg.sender; totalPartyApe = totalPartyApe + 1; totalCyborg = totalCyborg + 1; partyContract.safeTransferFrom(msg.sender, address(this), _tokenParty); cyborkContract.safeTransferFrom( msg.sender, address(this), _tokenCybork ); if (isUser[msg.sender] == false) { users.push(msg.sender); isUser[msg.sender] = true; } } function calculatePoints() external onlyOwner { require(totalPoints == 0, "total points is zero"); address _user; for (uint256 i = 0; i < users.length; i++) { _user = users[i]; require( _user != address(0), "Bank Billionaire Club: user is Zero address" ); require( userPoints[_user] == 0, "Bank Billionaire Club: user points is not zero" ); for (uint256 j = 0; j < stakedToken[_user].length; j++) { if (stakedToken[_user][j].staking_time == 0) { continue; } userPoints[_user] = userPoints[_user] + (block.timestamp - stakedToken[_user][j].staking_time); } totalPoints = totalPoints + userPoints[_user]; } } function calculateRewards() external onlyOwner { require( address(this).balance > 0, "Bank Billionaire Club: contract balance is Zero" ); address _user; for (uint256 i = 0; i < users.length; i++) { _user = users[i]; userReward[_user] = userReward[_user] + (address(this).balance * userPoints[_user]) / totalPoints; userPoints[_user] = 0; totalReward = totalReward + userReward[_user]; } totalPoints = 0; } function claimRewards(uint256 _amount) external { require( msg.sender != address(0), "Bank Billionaire Club: caller is Zero address" ); require(_amount > 0, "Bank Billionaire Club: _amount is zero"); require( _amount <= userReward[msg.sender], "Bank Billionaire Club: _amount excedes the user rewards" ); userReward[msg.sender] = userReward[msg.sender] - _amount; totalReward = totalReward - _amount; payable(msg.sender).transfer(_amount); } function unstakeNFT(uint256 _tokenParty) external { require( partyContract.ownerOf(_tokenParty) == address(this), "Bank Billionaire Club: nft is not staked" ); address _user = userTokenParty[_tokenParty]; require( _user == msg.sender, "Bank Billionaire Club: caller is not the owner" ); totalPartyApe = totalPartyApe - 1; totalCyborg = totalCyborg - 1; partyContract.safeTransferFrom(address(this), msg.sender, _tokenParty); cyborkContract.safeTransferFrom( address(this), msg.sender, idTokenCybork[_tokenParty] ); uint256 _index = indexTokenParty[_tokenParty]; stakedToken[msg.sender][_index].nft_party = 0; stakedToken[msg.sender][_index].nft_cybork = 0; stakedToken[msg.sender][_index].staking_time = 0; } function receiveEher() external payable {} function withdraw(uint256 _amount) external onlyOwner { require(_amount > 0, "Bank Billionaire Club: amount is zero"); require( address(this).balance >= _amount, "Bank Billionaire Club: insufficient contract balance" ); payable(msg.sender).transfer(_amount); } function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused, "Transaction is not available"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused, "Transaction is available"); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "./Pausable.sol"; contract Billionaire is ERC721Enumerable, Pausable, PaymentSplitter { using Counters for Counters.Counter; struct PresaleConfig { uint256 startTime; uint256 duration; uint256 maxCount; } struct SaleConfig { uint256 startTime; uint256 maxCount; } uint256 public maxTotalSupply = 10333; uint256 public maxGiftSupply = 333; uint256 public giftCount; uint256 public presaleCount; uint256 public totalNFT; bool public isBurnEnabled; string public baseURI; PresaleConfig public presaleConfig; SaleConfig public saleConfig; Counters.Counter private _tokenIds; uint256[] private _teamShares = [25, 25, 25, 25]; address[] private _team = [ 0x8dD47E819c53138aA18F8651D797e7969f34d1F1, 0xF536390c3A0bAFF71289975e45e1f647fc8C7304, 0xFD6Ed83d8e47B1C808efE984cEF965B2CB3393De, 0x03bb7A8226301C1cC0e82BFf029989E22a76F597 ]; mapping(address => bool) private _presaleList; mapping(address => uint256) public _presaleClaimed; mapping(address => uint256) public _giftClaimed; mapping(address => uint256) public _saleClaimed; mapping(address => uint256) public _totalClaimed; enum WorkflowStatus { CheckOnPresale, Presale, Sale, SoldOut } WorkflowStatus public workflow; event ChangePresaleConfig( uint256 _startTime, uint256 _duration, uint256 _maxCount ); event ChangeSaleConfig(uint256 _startTime, uint256 _maxCount); event ChangeIsBurnEnabled(bool _isBurnEnabled); event ChangeBaseURI(string _baseURI); event GiftMint(address indexed _recipient, uint256 _amount); event PresaleMint(address indexed _minter, uint256 _amount, uint256 _price); event SaleMint(address indexed _minter, uint256 _amount, uint256 _price); event WorkflowStatusChange( WorkflowStatus previousStatus, WorkflowStatus newStatus ); constructor() ERC721("Billionaire Token", "BILlIONAIRE") PaymentSplitter(_team, _teamShares) {} function setBaseURI(string calldata _tokenBaseURI) external onlyOwner { baseURI = _tokenBaseURI; emit ChangeBaseURI(_tokenBaseURI); } function _baseURI() internal view override returns (string memory) { return baseURI; } function addToPresaleList(address[] calldata _addresses) external onlyOwner { for (uint256 ind = 0; ind < _addresses.length; ind++) { require( _addresses[ind] != address(0), "Billionaire: Can't add a zero address" ); if (_presaleList[_addresses[ind]] == false) { _presaleList[_addresses[ind]] = true; } } } function isOnPresaleList(address _address) external view returns (bool) { return _presaleList[_address]; } function removeFromPresaleList(address[] calldata _addresses) external onlyOwner { for (uint256 ind = 0; ind < _addresses.length; ind++) { require( _addresses[ind] != address(0), "Billionaire: Can't remove a zero address" ); if (_presaleList[_addresses[ind]] == true) { _presaleList[_addresses[ind]] = false; } } } function setUpPresale(uint256 _duration) external onlyOwner { require( workflow == WorkflowStatus.CheckOnPresale, "Bilionaire: Unauthorized Transaction" ); uint256 _startTime = block.timestamp; uint256 _maxCount = 2; presaleConfig = PresaleConfig(_startTime, _duration, _maxCount); emit ChangePresaleConfig(_startTime, _duration, _maxCount); workflow = WorkflowStatus.Presale; emit WorkflowStatusChange( WorkflowStatus.CheckOnPresale, WorkflowStatus.Presale ); } function setUpSale() external onlyOwner { require( workflow == WorkflowStatus.Presale, "Bilionaire: Unauthorized Transaction" ); PresaleConfig memory _presaleConfig = presaleConfig; uint256 _presaleEndTime = _presaleConfig.startTime + _presaleConfig.duration; require( block.timestamp > _presaleEndTime, "Bilionaire: Sale not started" ); uint256 _startTime = block.timestamp; uint256 _maxCount = 10; saleConfig = SaleConfig(_startTime, _maxCount); emit ChangeSaleConfig(_startTime, _maxCount); workflow = WorkflowStatus.Sale; emit WorkflowStatusChange(WorkflowStatus.Presale, WorkflowStatus.Sale); } function getPrice() public view returns (uint256) { uint256 _price; PresaleConfig memory _presaleConfig = presaleConfig; SaleConfig memory _saleConfig = saleConfig; if ( block.timestamp <= _presaleConfig.startTime + _presaleConfig.duration ) { _price = 1000; //0.1 ETH } else if (block.timestamp <= _saleConfig.startTime + 3 hours) { _price = 3000; //0.3 ETH } else if ( (block.timestamp > _saleConfig.startTime + 3 hours) && (block.timestamp <= _saleConfig.startTime + 6 hours) ) { _price = 2000; //0.2 ETH } else { _price = 100000; //0.1 ETH } return _price; } function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner { isBurnEnabled = _isBurnEnabled; emit ChangeIsBurnEnabled(_isBurnEnabled); } function giftMint(address[] calldata _addresses) external onlyOwner whenNotPaused { require( totalNFT + _addresses.length <= maxTotalSupply, "Billionaire: max total supply exceeded" ); require( giftCount + _addresses.length <= maxGiftSupply, "Bilionaire: max gift supply exceeded" ); uint256 _newItemId; for (uint256 ind = 0; ind < _addresses.length; ind++) { require( _addresses[ind] != address(0), "Bilionaire: recepient is the null address" ); _tokenIds.increment(); _newItemId = _tokenIds.current(); _safeMint(_addresses[ind], _newItemId); _giftClaimed[_addresses[ind]] = _giftClaimed[_addresses[ind]] + 1; _totalClaimed[_addresses[ind]] = _totalClaimed[_addresses[ind]] + 1; totalNFT = totalNFT + 1; giftCount = giftCount + 1; } } function presaleMint(uint256 _amount) internal { PresaleConfig memory _presaleConfig = presaleConfig; require( _presaleConfig.startTime > 0, "Bilionaire: Presale must be active to mint Ape" ); require( block.timestamp >= _presaleConfig.startTime, "Bilionaire: Presale not started" ); require( block.timestamp <= _presaleConfig.startTime + _presaleConfig.duration, "Bilionaire: Presale is ended" ); require( _presaleList[msg.sender] == true, " Caller is not on the presale list" ); require( _presaleClaimed[msg.sender] + _amount <= _presaleConfig.maxCount, "Bilionaire: Can only mint 2 tokens" ); require( totalNFT + _amount <= maxTotalSupply, "Bilionaire: max supply exceeded" ); uint256 _price = getPrice(); require( _price * _amount <= msg.value, "Bilionaire: Ether value sent is not correct" ); uint256 _newItemId; for (uint256 ind = 0; ind < _amount; ind++) { _tokenIds.increment(); _newItemId = _tokenIds.current(); _safeMint(msg.sender, _newItemId); _presaleClaimed[msg.sender] = _presaleClaimed[msg.sender] + 1; _totalClaimed[msg.sender] = _totalClaimed[msg.sender] + 1; totalNFT = totalNFT + 1; presaleCount = presaleCount + 1; } emit PresaleMint(msg.sender, _amount, _price); } function saleMint(uint256 _amount) internal { SaleConfig memory _saleConfig = saleConfig; require(_amount > 0, "Bilionaire: zero amount"); require(_saleConfig.startTime > 0, "Bilionaire: sale is not active"); require( block.timestamp >= _saleConfig.startTime, "Bilionaire: sale not started" ); require( _amount <= _saleConfig.maxCount, "Bilionaire: Can only mint 10 tokens at a time" ); require( totalNFT + _amount <= maxTotalSupply, "Bilionaire: max supply exceeded" ); uint256 _price = getPrice(); require( _price * _amount <= msg.value, "Bilionaire: Ether value sent is not correct" ); uint256 _newItemId; for (uint256 ind = 0; ind < _amount; ind++) { _tokenIds.increment(); _newItemId = _tokenIds.current(); _safeMint(msg.sender, _newItemId); _saleClaimed[msg.sender] = _saleClaimed[msg.sender] + 1; _totalClaimed[msg.sender] = _totalClaimed[msg.sender] + 1; totalNFT = totalNFT + 1; } emit SaleMint(msg.sender, _amount, _price); } function mainMint(uint256 _amount) external payable whenNotPaused { require( block.timestamp > presaleConfig.startTime, "Bilionaire: presale not started" ); if ( block.timestamp <= (presaleConfig.startTime + presaleConfig.duration) ) { presaleMint(_amount); } else { saleMint(_amount); } if (totalNFT + _amount == maxTotalSupply) { workflow = WorkflowStatus.SoldOut; emit WorkflowStatusChange( WorkflowStatus.Sale, WorkflowStatus.SoldOut ); } } function burn(uint256 tokenId) public { require(isBurnEnabled, "Bilionaire: burning disabled"); require( _isApprovedOrOwner(msg.sender, tokenId), "Bilionaire: burn caller is not owner nor approved" ); _burn(tokenId); totalNFT = totalNFT - 1; } function getWorkflowStatus() public view returns (uint256) { uint256 _status; if (workflow == WorkflowStatus.CheckOnPresale) { _status = 1; } if (workflow == WorkflowStatus.Presale) { _status = 2; } if (workflow == WorkflowStatus.Sale) { _status = 3; } if (workflow == WorkflowStatus.SoldOut) { _status = 4; } return _status; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./Pausable.sol"; import "./Billionaire.sol"; contract Cyborg is IERC721Receiver, ERC721Enumerable, Pausable { struct Trait { uint8 index_1; uint8 index_2; } bool public isBurnEnabled; string public baseURI; address payable public billionaireAddress; address[] public users; mapping(uint256 => Trait) public traitsPerToken; mapping(uint256 => uint256) public tokens; mapping(uint256 => bool) public ismerged; Billionaire billionaireContract; event LogMint(address indexed _caller, uint256 _token_1, uint256 _token_2, uint256 _trait_1, uint256 _trait_2); event ChangeIsBurnEnabled(bool _isBurnEnabled); event ChangeBaseURI(string _baseURI); constructor(address payable _addresssContract) ERC721("Cyborg Billionaire Club ", "CBC") { require( _addresssContract != address(0), "Cyborg Billionaire Club: address contract is Zero address" ); billionaireAddress = payable(_addresssContract); billionaireContract = Billionaire(billionaireAddress); } function getToken(uint256 _id) external view returns (uint256) { return tokens[_id]; } function getTraits(uint256 _id) external view returns (Trait memory) { return traitsPerToken[_id]; } function getusers(uint256 _id) external view returns (address) { return users[_id]; } function setBaseURI(string calldata _tokenBaseURI) external onlyOwner { baseURI = _tokenBaseURI; emit ChangeBaseURI(_tokenBaseURI); } function _baseURI() internal view override returns (string memory) { return baseURI; } function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner { isBurnEnabled = _isBurnEnabled; emit ChangeIsBurnEnabled(_isBurnEnabled); } function isTokenMerged(uint256 _token) external view returns (bool) { return ismerged[_token]; } function mergeNFT( uint256 _token_1, uint256 _token_2, uint8 _trait_1, uint8 _trait_2 ) external whenNotPaused { address _caller = msg.sender; require((_trait_1 >=1) && (_trait_1 <=7), "Cyborg Billionaire Club: invalid trait index"); require((_trait_2 >=1) && (_trait_2 <=7), "Cyborg Billionaire Club: invalid trait index"); require( (billionaireContract.ownerOf(_token_1) == msg.sender) && (billionaireContract.ownerOf(_token_2) == msg.sender), "Cyborg Billionaire Club: Caller is not the owner of tokens" ); require( ismerged[_token_1] == false, "Cyborg Billionaire Club: Token is already merged" ); require( billionaireContract.isApprovedForAll(_caller, address(this)), "Cyborg Billionaire Club: Cyborc contract is not approved for tokens"); Trait memory _trait = Trait(_trait_1, _trait_2); traitsPerToken[_token_1] = _trait; tokens[_token_1] = _token_2; users.push(msg.sender); _safeMint(msg.sender, _token_1); ismerged[_token_1] = true; billionaireContract.safeTransferFrom(msg.sender, address(this), _token_2); billionaireContract.burn(_token_2); emit LogMint(msg.sender, _token_1, _token_2, _trait_1, _trait_2); } function burn(uint256 _id) external { require(isBurnEnabled, "Cyborg Billionaire Club: burning disabled"); require( _isApprovedOrOwner(msg.sender, _id), "Cyborg Billionaire Club: burn caller is not owner nor approved" ); _burn(_id); } function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => 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; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @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 { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @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 = ERC721.balanceOf(from) - 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 delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @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 - 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 delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Address.sol"; import "../utils/Context.sol"; import "../utils/math/SafeMath.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + _totalReleased; uint256 payment = (totalReceived * _shares[account]) / _totalShares - _released[account]; require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] = _released[account] + payment; _totalReleased = _totalReleased + payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.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" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), 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. * * @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 ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"_addressParty","type":"address"},{"internalType":"address","name":"_addressCybork","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"inputs":[],"name":"addressCybork","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculatePoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"calculateRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getNFT","outputs":[{"components":[{"internalType":"uint256","name":"nft_party","type":"uint256"},{"internalType":"uint256","name":"nft_cybork","type":"uint256"},{"internalType":"uint256","name":"staking_time","type":"uint256"}],"internalType":"struct Bank.Token[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idTokenCybork","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"indexTokenParty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"receiveEher","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenParty","type":"uint256"},{"internalType":"uint256","name":"_tokenCybork","type":"uint256"}],"name":"stakeNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedToken","outputs":[{"internalType":"uint256","name":"nft_party","type":"uint256"},{"internalType":"uint256","name":"nft_cybork","type":"uint256"},{"internalType":"uint256","name":"staking_time","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalCyborg","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPartyApe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenParty","type":"uint256"}],"name":"unstakeNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"userTokenParty","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"users","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000805460ff60a01b191690553480156200001e57600080fd5b5060405162001eac38038062001eac8339810160408190526200004191620001e8565b6200004c3362000198565b6001600160a01b038216620000ce5760405162461bcd60e51b815260206004820152603e60248201527f42616e6b2042696c6c696f6e6169726520436c75623a2020706172747920636f60448201527f6e74726163742061646472657373206973205a65726f2061646472657373000060648201526084015b60405180910390fd5b6001600160a01b0381166200014c5760405162461bcd60e51b815260206004820152603f60248201527f42616e6b2042696c6c696f6e6169726520436c75623a20206379626f726b206360448201527f6f6e74726163742061646472657373206973205a65726f2061646472657373006064820152608401620000c5565b600580546001600160a01b039384166001600160a01b03199182168117909255600f8054821690921790915560068054929093169181168217909255601080549092161790556200023f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060408385031215620001fb578182fd5b8251620002088162000226565b60208401519092506200021b8162000226565b809150509250929050565b6001600160a01b03811681146200023c57600080fd5b50565b611c5d806200024f6000396000f3fe6080604052600436106101b65760003560e01c806351cecc80116100ec57806390b469bd1161008a578063def24a0e11610064578063def24a0e14610516578063ecbd72c91461021b578063f2fde38b14610551578063f50ddbc71461057157600080fd5b806390b469bd146104aa578063bbeffa53146104e0578063c1dfa0bb146104f657600080fd5b8063715018a6116100c6578063715018a61461044c578063750142e6146104615780638456cb59146104775780638da5cb5b1461048c57600080fd5b806351cecc80146103f5578063567142be146104155780635c975abb1461042b57600080fd5b80632e1a7d4d116101595780633f4ba83a116101335780633f4ba83a146103755780633f6a2c971461038a5780634209fff11461039f5780634bbc400e146103df57600080fd5b80632e1a7d4d14610320578063365b98b2146103405780633e50de301461036057600080fd5b80630f639ccd116101955780630f639ccd14610255578063150b7a0214610282578063161a6c1e146102c657806325897295146102f357600080fd5b80620a74be146101bb5780630962ef79146101fb5780630cca84861461021d575b600080fd5b3480156101c757600080fd5b506101e86101d636600461190f565b600a6020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a72565b61059e565b005b34801561022957600080fd5b5060065461023d906001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b34801561026157600080fd5b506101e8610270366004611a72565b60086020526000908152604090205481565b34801561028e57600080fd5b506102ad61029d36600461194e565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016101f2565b3480156102d257600080fd5b506102e66102e136600461190f565b610757565b6040516101f29190611acf565b3480156102ff57600080fd5b506101e861030e366004611a72565b60076020526000908152604090205481565b34801561032c57600080fd5b5061021b61033b366004611a72565b6107ea565b34801561034c57600080fd5b5061023d61035b366004611a72565b61090c565b34801561036c57600080fd5b5061021b610936565b34801561038157600080fd5b5061021b610ab2565b34801561039657600080fd5b5061021b610b6b565b3480156103ab57600080fd5b506103cf6103ba36600461190f565b600c6020526000908152604090205460ff1681565b60405190151581526020016101f2565b3480156103eb57600080fd5b506101e860025481565b34801561040157600080fd5b5061021b610410366004611a8a565b610e5c565b34801561042157600080fd5b506101e860015481565b34801561043757600080fd5b506000546103cf90600160a01b900460ff1681565b34801561045857600080fd5b5061021b6113ac565b34801561046d57600080fd5b506101e860045481565b34801561048357600080fd5b5061021b6113e2565b34801561049857600080fd5b506000546001600160a01b031661023d565b3480156104b657600080fd5b5061023d6104c5366004611a72565b6009602052600090815260409020546001600160a01b031681565b3480156104ec57600080fd5b506101e860035481565b34801561050257600080fd5b5061021b610511366004611a72565b6114a2565b34801561052257600080fd5b50610536610531366004611a27565b6117e2565b604080519384526020840192909252908201526060016101f2565b34801561055d57600080fd5b5061021b61056c36600461190f565b611824565b34801561057d57600080fd5b506101e861058c36600461190f565b600b6020526000908152604090205481565b336106065760405162461bcd60e51b815260206004820152602d60248201527f42616e6b2042696c6c696f6e6169726520436c75623a2063616c6c657220697360448201526c205a65726f206164647265737360981b60648201526084015b60405180910390fd5b600081116106655760405162461bcd60e51b815260206004820152602660248201527f42616e6b2042696c6c696f6e6169726520436c75623a205f616d6f756e74206960448201526573207a65726f60d01b60648201526084016105fd565b336000908152600a60205260409020548111156106ea5760405162461bcd60e51b815260206004820152603760248201527f42616e6b2042696c6c696f6e6169726520436c75623a205f616d6f756e74206560448201527f786365646573207468652075736572207265776172647300000000000000000060648201526084016105fd565b336000908152600a6020526040902054610705908290611bb4565b336000908152600a6020526040902055600454610723908290611bb4565b600455604051339082156108fc029083906000818181858888f19350505050158015610753573d6000803e3d6000fd5b5050565b6001600160a01b0381166000908152600d60209081526040808320805482518185028101850190935280835260609492939192909184015b828210156107df578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250508152602001906001019061078f565b505050509050919050565b6000546001600160a01b031633146108145760405162461bcd60e51b81526004016105fd90611b28565b600081116108725760405162461bcd60e51b815260206004820152602560248201527f42616e6b2042696c6c696f6e6169726520436c75623a20616d6f756e74206973604482015264207a65726f60d81b60648201526084016105fd565b804710156108df5760405162461bcd60e51b815260206004820152603460248201527f42616e6b2042696c6c696f6e6169726520436c75623a20696e73756666696369604482015273656e7420636f6e74726163742062616c616e636560601b60648201526084016105fd565b604051339082156108fc029083906000818181858888f19350505050158015610753573d6000803e3d6000fd5b600e818154811061091c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146109605760405162461bcd60e51b81526004016105fd90611b28565b600047116109c95760405162461bcd60e51b815260206004820152603060248201527f42616e6b2042696c6c696f6e6169726520436c75623a2020636f6e747261637460448201526f2062616c616e6365206973205a65726f60801b60648201526084016105fd565b6000805b600e54811015610aa957600e81815481106109f857634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001546001600160a01b03909116808452600b909252604090922054909350610a2f9047611b95565b610a399190611b75565b6001600160a01b0383166000908152600a6020526040902054610a5c9190611b5d565b6001600160a01b0383166000908152600a60208181526040808420948555600b8252832092909255905254600454610a949190611b5d565b60045580610aa181611bcb565b9150506109cd565b50506000600155565b6000546001600160a01b03163314610adc5760405162461bcd60e51b81526004016105fd90611b28565b600054600160a01b900460ff16610b355760405162461bcd60e51b815260206004820152601860248201527f5472616e73616374696f6e20697320617661696c61626c65000000000000000060448201526064016105fd565b6000805460ff60a01b191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b6000546001600160a01b03163314610b955760405162461bcd60e51b81526004016105fd90611b28565b60015415610bdc5760405162461bcd60e51b8152602060048201526014602482015273746f74616c20706f696e7473206973207a65726f60601b60448201526064016105fd565b6000805b600e5481101561075357600e8181548110610c0b57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316915081610c845760405162461bcd60e51b815260206004820152602c60248201527f42616e6b2042696c6c696f6e6169726520436c75623a2020757365722069732060448201526b5a65726f206164647265737360a01b60648201526084016105fd565b6001600160a01b0382166000908152600b602052604090205415610d025760405162461bcd60e51b815260206004820152602f60248201527f42616e6b2042696c6c696f6e6169726520436c75623a20207573657220706f6960448201526e6e7473206973206e6f74207a65726f60881b60648201526084016105fd565b60005b6001600160a01b0383166000908152600d6020526040902054811015610e20576001600160a01b0383166000908152600d60205260409020805482908110610d5d57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600302016002015460001415610d7c57610e0e565b6001600160a01b0383166000908152600d60205260409020805482908110610db457634e487b7160e01b600052603260045260246000fd5b90600052602060002090600302016002015442610dd19190611bb4565b6001600160a01b0384166000908152600b6020526040902054610df49190611b5d565b6001600160a01b0384166000908152600b60205260409020555b80610e1881611bcb565b915050610d05565b506001600160a01b0382166000908152600b6020526040902054600154610e479190611b5d565b60015580610e5481611bcb565b915050610be0565b600054600160a01b900460ff1615610eb65760405162461bcd60e51b815260206004820152601c60248201527f5472616e73616374696f6e206973206e6f7420617661696c61626c650000000060448201526064016105fd565b600f546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610efa57600080fd5b505afa158015610f0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f329190611932565b6001600160a01b031614610fb0576040805162461bcd60e51b81526020600482015260248101919091527f42696c6c696f6e6169726520436c75623a2043616c6c6572206973206e6f742060448201527f746865206f776e6572206f66207468652050617274792041706520746f6b656e60648201526084016105fd565b6010546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610ff457600080fd5b505afa158015611008573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102c9190611932565b6001600160a01b0316146110b65760405162461bcd60e51b815260206004820152604560248201527f4379626f7267732042696c6c696f6e6169726520436c75623a2043616c6c657260448201527f206973206e6f7420746865206f776e6572206f6620746865204379626f726b206064820152643a37b5b2b760d91b608482015260a4016105fd565b6010546040516339d6bd2360e21b8152600481018490526001600160a01b039091169063e75af48c9060240160206040518083038186803b1580156110fa57600080fd5b505afa15801561110e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111329190611a52565b15156001146111a95760405162461bcd60e51b815260206004820152603860248201527f4379626f7267732042696c6c696f6e6169726520436c75623a2050617274792060448201527f41706520746f6b656e206973206e6f74206d657267656420000000000000000060648201526084016105fd565b336000818152600d60208181526040808420815160608101835288815280840188815242938201938452825460018181018555848952868920935160039092029093019081559051818301559251600290930192909255949093525290546112119190611bb4565b60008381526007602090815260408083209390935560088152828220849055600990522080546001600160a01b03191633179055600254611253906001611b5d565b600255600354611264906001611b5d565b600355600f54604051632142170760e11b81526001600160a01b03909116906342842e0e9061129b90339030908790600401611aab565b600060405180830381600087803b1580156112b557600080fd5b505af11580156112c9573d6000803e3d6000fd5b5050601054604051632142170760e11b81526001600160a01b0390911692506342842e0e915061130190339030908690600401611aab565b600060405180830381600087803b15801561131b57600080fd5b505af115801561132f573d6000803e3d6000fd5b5050336000908152600c602052604090205460ff1615159150610753905057600e805460018181019092557fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b031916339081179091556000908152600c60205260409020805460ff191690911790555050565b6000546001600160a01b031633146113d65760405162461bcd60e51b81526004016105fd90611b28565b6113e060006118bf565b565b6000546001600160a01b0316331461140c5760405162461bcd60e51b81526004016105fd90611b28565b600054600160a01b900460ff16156114665760405162461bcd60e51b815260206004820152601c60248201527f5472616e73616374696f6e206973206e6f7420617661696c61626c650000000060448201526064016105fd565b6000805460ff60a01b1916600160a01b1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600f546040516331a9108f60e11b81526004810183905230916001600160a01b031690636352211e9060240160206040518083038186803b1580156114e657600080fd5b505afa1580156114fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151e9190611932565b6001600160a01b0316146115855760405162461bcd60e51b815260206004820152602860248201527f42616e6b2042696c6c696f6e6169726520436c75623a206e6674206973206e6f6044820152671d081cdd185ad95960c21b60648201526084016105fd565b6000818152600960205260409020546001600160a01b03163381146116035760405162461bcd60e51b815260206004820152602e60248201527f42616e6b2042696c6c696f6e6169726520436c75623a2063616c6c657220697360448201526d103737ba103a34329037bbb732b960911b60648201526084016105fd565b60016002546116129190611bb4565b60025560035461162490600190611bb4565b600355600f54604051632142170760e11b81526001600160a01b03909116906342842e0e9061165b90309033908790600401611aab565b600060405180830381600087803b15801561167557600080fd5b505af1158015611689573d6000803e3d6000fd5b505060105460008581526008602052604090819020549051632142170760e11b81526001600160a01b0390921693506342842e0e92506116cf9130913391600401611aab565b600060405180830381600087803b1580156116e957600080fd5b505af11580156116fd573d6000803e3d6000fd5b505050600083815260076020908152604080832054338452600d90925282208054919350908390811061174057634e487b7160e01b600052603260045260246000fd5b60009182526020808320600390920290910192909255338152600d9091526040812080548390811061178257634e487b7160e01b600052603260045260246000fd5b6000918252602080832060016003909302019190910192909255338152600d909152604081208054839081106117c857634e487b7160e01b600052603260045260246000fd5b906000526020600020906003020160020181905550505050565b600d60205281600052604060002081815481106117fe57600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b6000546001600160a01b0316331461184e5760405162461bcd60e51b81526004016105fd90611b28565b6001600160a01b0381166118b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105fd565b6118bc816118bf565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215611920578081fd5b813561192b81611c12565b9392505050565b600060208284031215611943578081fd5b815161192b81611c12565b60008060008060808587031215611963578283fd5b843561196e81611c12565b9350602085013561197e81611c12565b925060408501359150606085013567ffffffffffffffff808211156119a1578283fd5b818701915087601f8301126119b4578283fd5b8135818111156119c6576119c6611bfc565b604051601f8201601f19908116603f011681019083821181831017156119ee576119ee611bfc565b816040528281528a6020848701011115611a06578586fd5b82602086016020830137918201602001949094529598949750929550505050565b60008060408385031215611a39578182fd5b8235611a4481611c12565b946020939093013593505050565b600060208284031215611a63578081fd5b8151801515811461192b578182fd5b600060208284031215611a83578081fd5b5035919050565b60008060408385031215611a9c578182fd5b50508035926020909101359150565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825282518282018190526000919060409081850190868401855b82811015611b1b5781518051855286810151878601528501518585015260609093019290850190600101611aec565b5091979650505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611b7057611b70611be6565b500190565b600082611b9057634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611baf57611baf611be6565b500290565b600082821015611bc657611bc6611be6565b500390565b6000600019821415611bdf57611bdf611be6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146118bc57600080fdfea2646970667358221220e9e8a81655eb69fb34277dfa14212d3646f6aca7adbdcc95d61bbe0a04e5c9f264736f6c634300080400330000000000000000000000005df340b5d1618c543ac81837da1c2d2b17b3b5d800000000000000000000000004fb03a5bac8eac522891e8dcb003694d75827b3
Deployed Bytecode
0x6080604052600436106101b65760003560e01c806351cecc80116100ec57806390b469bd1161008a578063def24a0e11610064578063def24a0e14610516578063ecbd72c91461021b578063f2fde38b14610551578063f50ddbc71461057157600080fd5b806390b469bd146104aa578063bbeffa53146104e0578063c1dfa0bb146104f657600080fd5b8063715018a6116100c6578063715018a61461044c578063750142e6146104615780638456cb59146104775780638da5cb5b1461048c57600080fd5b806351cecc80146103f5578063567142be146104155780635c975abb1461042b57600080fd5b80632e1a7d4d116101595780633f4ba83a116101335780633f4ba83a146103755780633f6a2c971461038a5780634209fff11461039f5780634bbc400e146103df57600080fd5b80632e1a7d4d14610320578063365b98b2146103405780633e50de301461036057600080fd5b80630f639ccd116101955780630f639ccd14610255578063150b7a0214610282578063161a6c1e146102c657806325897295146102f357600080fd5b80620a74be146101bb5780630962ef79146101fb5780630cca84861461021d575b600080fd5b3480156101c757600080fd5b506101e86101d636600461190f565b600a6020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a72565b61059e565b005b34801561022957600080fd5b5060065461023d906001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b34801561026157600080fd5b506101e8610270366004611a72565b60086020526000908152604090205481565b34801561028e57600080fd5b506102ad61029d36600461194e565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016101f2565b3480156102d257600080fd5b506102e66102e136600461190f565b610757565b6040516101f29190611acf565b3480156102ff57600080fd5b506101e861030e366004611a72565b60076020526000908152604090205481565b34801561032c57600080fd5b5061021b61033b366004611a72565b6107ea565b34801561034c57600080fd5b5061023d61035b366004611a72565b61090c565b34801561036c57600080fd5b5061021b610936565b34801561038157600080fd5b5061021b610ab2565b34801561039657600080fd5b5061021b610b6b565b3480156103ab57600080fd5b506103cf6103ba36600461190f565b600c6020526000908152604090205460ff1681565b60405190151581526020016101f2565b3480156103eb57600080fd5b506101e860025481565b34801561040157600080fd5b5061021b610410366004611a8a565b610e5c565b34801561042157600080fd5b506101e860015481565b34801561043757600080fd5b506000546103cf90600160a01b900460ff1681565b34801561045857600080fd5b5061021b6113ac565b34801561046d57600080fd5b506101e860045481565b34801561048357600080fd5b5061021b6113e2565b34801561049857600080fd5b506000546001600160a01b031661023d565b3480156104b657600080fd5b5061023d6104c5366004611a72565b6009602052600090815260409020546001600160a01b031681565b3480156104ec57600080fd5b506101e860035481565b34801561050257600080fd5b5061021b610511366004611a72565b6114a2565b34801561052257600080fd5b50610536610531366004611a27565b6117e2565b604080519384526020840192909252908201526060016101f2565b34801561055d57600080fd5b5061021b61056c36600461190f565b611824565b34801561057d57600080fd5b506101e861058c36600461190f565b600b6020526000908152604090205481565b336106065760405162461bcd60e51b815260206004820152602d60248201527f42616e6b2042696c6c696f6e6169726520436c75623a2063616c6c657220697360448201526c205a65726f206164647265737360981b60648201526084015b60405180910390fd5b600081116106655760405162461bcd60e51b815260206004820152602660248201527f42616e6b2042696c6c696f6e6169726520436c75623a205f616d6f756e74206960448201526573207a65726f60d01b60648201526084016105fd565b336000908152600a60205260409020548111156106ea5760405162461bcd60e51b815260206004820152603760248201527f42616e6b2042696c6c696f6e6169726520436c75623a205f616d6f756e74206560448201527f786365646573207468652075736572207265776172647300000000000000000060648201526084016105fd565b336000908152600a6020526040902054610705908290611bb4565b336000908152600a6020526040902055600454610723908290611bb4565b600455604051339082156108fc029083906000818181858888f19350505050158015610753573d6000803e3d6000fd5b5050565b6001600160a01b0381166000908152600d60209081526040808320805482518185028101850190935280835260609492939192909184015b828210156107df578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250508152602001906001019061078f565b505050509050919050565b6000546001600160a01b031633146108145760405162461bcd60e51b81526004016105fd90611b28565b600081116108725760405162461bcd60e51b815260206004820152602560248201527f42616e6b2042696c6c696f6e6169726520436c75623a20616d6f756e74206973604482015264207a65726f60d81b60648201526084016105fd565b804710156108df5760405162461bcd60e51b815260206004820152603460248201527f42616e6b2042696c6c696f6e6169726520436c75623a20696e73756666696369604482015273656e7420636f6e74726163742062616c616e636560601b60648201526084016105fd565b604051339082156108fc029083906000818181858888f19350505050158015610753573d6000803e3d6000fd5b600e818154811061091c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146109605760405162461bcd60e51b81526004016105fd90611b28565b600047116109c95760405162461bcd60e51b815260206004820152603060248201527f42616e6b2042696c6c696f6e6169726520436c75623a2020636f6e747261637460448201526f2062616c616e6365206973205a65726f60801b60648201526084016105fd565b6000805b600e54811015610aa957600e81815481106109f857634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001546001600160a01b03909116808452600b909252604090922054909350610a2f9047611b95565b610a399190611b75565b6001600160a01b0383166000908152600a6020526040902054610a5c9190611b5d565b6001600160a01b0383166000908152600a60208181526040808420948555600b8252832092909255905254600454610a949190611b5d565b60045580610aa181611bcb565b9150506109cd565b50506000600155565b6000546001600160a01b03163314610adc5760405162461bcd60e51b81526004016105fd90611b28565b600054600160a01b900460ff16610b355760405162461bcd60e51b815260206004820152601860248201527f5472616e73616374696f6e20697320617661696c61626c65000000000000000060448201526064016105fd565b6000805460ff60a01b191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b6000546001600160a01b03163314610b955760405162461bcd60e51b81526004016105fd90611b28565b60015415610bdc5760405162461bcd60e51b8152602060048201526014602482015273746f74616c20706f696e7473206973207a65726f60601b60448201526064016105fd565b6000805b600e5481101561075357600e8181548110610c0b57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316915081610c845760405162461bcd60e51b815260206004820152602c60248201527f42616e6b2042696c6c696f6e6169726520436c75623a2020757365722069732060448201526b5a65726f206164647265737360a01b60648201526084016105fd565b6001600160a01b0382166000908152600b602052604090205415610d025760405162461bcd60e51b815260206004820152602f60248201527f42616e6b2042696c6c696f6e6169726520436c75623a20207573657220706f6960448201526e6e7473206973206e6f74207a65726f60881b60648201526084016105fd565b60005b6001600160a01b0383166000908152600d6020526040902054811015610e20576001600160a01b0383166000908152600d60205260409020805482908110610d5d57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600302016002015460001415610d7c57610e0e565b6001600160a01b0383166000908152600d60205260409020805482908110610db457634e487b7160e01b600052603260045260246000fd5b90600052602060002090600302016002015442610dd19190611bb4565b6001600160a01b0384166000908152600b6020526040902054610df49190611b5d565b6001600160a01b0384166000908152600b60205260409020555b80610e1881611bcb565b915050610d05565b506001600160a01b0382166000908152600b6020526040902054600154610e479190611b5d565b60015580610e5481611bcb565b915050610be0565b600054600160a01b900460ff1615610eb65760405162461bcd60e51b815260206004820152601c60248201527f5472616e73616374696f6e206973206e6f7420617661696c61626c650000000060448201526064016105fd565b600f546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610efa57600080fd5b505afa158015610f0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f329190611932565b6001600160a01b031614610fb0576040805162461bcd60e51b81526020600482015260248101919091527f42696c6c696f6e6169726520436c75623a2043616c6c6572206973206e6f742060448201527f746865206f776e6572206f66207468652050617274792041706520746f6b656e60648201526084016105fd565b6010546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610ff457600080fd5b505afa158015611008573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102c9190611932565b6001600160a01b0316146110b65760405162461bcd60e51b815260206004820152604560248201527f4379626f7267732042696c6c696f6e6169726520436c75623a2043616c6c657260448201527f206973206e6f7420746865206f776e6572206f6620746865204379626f726b206064820152643a37b5b2b760d91b608482015260a4016105fd565b6010546040516339d6bd2360e21b8152600481018490526001600160a01b039091169063e75af48c9060240160206040518083038186803b1580156110fa57600080fd5b505afa15801561110e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111329190611a52565b15156001146111a95760405162461bcd60e51b815260206004820152603860248201527f4379626f7267732042696c6c696f6e6169726520436c75623a2050617274792060448201527f41706520746f6b656e206973206e6f74206d657267656420000000000000000060648201526084016105fd565b336000818152600d60208181526040808420815160608101835288815280840188815242938201938452825460018181018555848952868920935160039092029093019081559051818301559251600290930192909255949093525290546112119190611bb4565b60008381526007602090815260408083209390935560088152828220849055600990522080546001600160a01b03191633179055600254611253906001611b5d565b600255600354611264906001611b5d565b600355600f54604051632142170760e11b81526001600160a01b03909116906342842e0e9061129b90339030908790600401611aab565b600060405180830381600087803b1580156112b557600080fd5b505af11580156112c9573d6000803e3d6000fd5b5050601054604051632142170760e11b81526001600160a01b0390911692506342842e0e915061130190339030908690600401611aab565b600060405180830381600087803b15801561131b57600080fd5b505af115801561132f573d6000803e3d6000fd5b5050336000908152600c602052604090205460ff1615159150610753905057600e805460018181019092557fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b031916339081179091556000908152600c60205260409020805460ff191690911790555050565b6000546001600160a01b031633146113d65760405162461bcd60e51b81526004016105fd90611b28565b6113e060006118bf565b565b6000546001600160a01b0316331461140c5760405162461bcd60e51b81526004016105fd90611b28565b600054600160a01b900460ff16156114665760405162461bcd60e51b815260206004820152601c60248201527f5472616e73616374696f6e206973206e6f7420617661696c61626c650000000060448201526064016105fd565b6000805460ff60a01b1916600160a01b1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600f546040516331a9108f60e11b81526004810183905230916001600160a01b031690636352211e9060240160206040518083038186803b1580156114e657600080fd5b505afa1580156114fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151e9190611932565b6001600160a01b0316146115855760405162461bcd60e51b815260206004820152602860248201527f42616e6b2042696c6c696f6e6169726520436c75623a206e6674206973206e6f6044820152671d081cdd185ad95960c21b60648201526084016105fd565b6000818152600960205260409020546001600160a01b03163381146116035760405162461bcd60e51b815260206004820152602e60248201527f42616e6b2042696c6c696f6e6169726520436c75623a2063616c6c657220697360448201526d103737ba103a34329037bbb732b960911b60648201526084016105fd565b60016002546116129190611bb4565b60025560035461162490600190611bb4565b600355600f54604051632142170760e11b81526001600160a01b03909116906342842e0e9061165b90309033908790600401611aab565b600060405180830381600087803b15801561167557600080fd5b505af1158015611689573d6000803e3d6000fd5b505060105460008581526008602052604090819020549051632142170760e11b81526001600160a01b0390921693506342842e0e92506116cf9130913391600401611aab565b600060405180830381600087803b1580156116e957600080fd5b505af11580156116fd573d6000803e3d6000fd5b505050600083815260076020908152604080832054338452600d90925282208054919350908390811061174057634e487b7160e01b600052603260045260246000fd5b60009182526020808320600390920290910192909255338152600d9091526040812080548390811061178257634e487b7160e01b600052603260045260246000fd5b6000918252602080832060016003909302019190910192909255338152600d909152604081208054839081106117c857634e487b7160e01b600052603260045260246000fd5b906000526020600020906003020160020181905550505050565b600d60205281600052604060002081815481106117fe57600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b6000546001600160a01b0316331461184e5760405162461bcd60e51b81526004016105fd90611b28565b6001600160a01b0381166118b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105fd565b6118bc816118bf565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215611920578081fd5b813561192b81611c12565b9392505050565b600060208284031215611943578081fd5b815161192b81611c12565b60008060008060808587031215611963578283fd5b843561196e81611c12565b9350602085013561197e81611c12565b925060408501359150606085013567ffffffffffffffff808211156119a1578283fd5b818701915087601f8301126119b4578283fd5b8135818111156119c6576119c6611bfc565b604051601f8201601f19908116603f011681019083821181831017156119ee576119ee611bfc565b816040528281528a6020848701011115611a06578586fd5b82602086016020830137918201602001949094529598949750929550505050565b60008060408385031215611a39578182fd5b8235611a4481611c12565b946020939093013593505050565b600060208284031215611a63578081fd5b8151801515811461192b578182fd5b600060208284031215611a83578081fd5b5035919050565b60008060408385031215611a9c578182fd5b50508035926020909101359150565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825282518282018190526000919060409081850190868401855b82811015611b1b5781518051855286810151878601528501518585015260609093019290850190600101611aec565b5091979650505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611b7057611b70611be6565b500190565b600082611b9057634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611baf57611baf611be6565b500290565b600082821015611bc657611bc6611be6565b500390565b6000600019821415611bdf57611bdf611be6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146118bc57600080fdfea2646970667358221220e9e8a81655eb69fb34277dfa14212d3646f6aca7adbdcc95d61bbe0a04e5c9f264736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005df340b5d1618c543ac81837da1c2d2b17b3b5d800000000000000000000000004fb03a5bac8eac522891e8dcb003694d75827b3
-----Decoded View---------------
Arg [0] : _addressParty (address): 0x5DF340b5D1618c543aC81837dA1C2d2B17b3B5d8
Arg [1] : _addressCybork (address): 0x04fB03a5BAc8eAC522891E8dCb003694d75827B3
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005df340b5d1618c543ac81837da1c2d2b17b3b5d8
Arg [1] : 00000000000000000000000004fb03a5bac8eac522891e8dcb003694d75827b3
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.99984 | 265 | $264.96 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.