More Info
Private Name Tags
ContractCreator
TokenTracker
Sponsored
Latest 25 from a total of 575 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 90954700 | 30 hrs ago | IN | 0 FTM | 0.00015502 | ||||
Set Approval For... | 90498023 | 6 days ago | IN | 0 FTM | 0.0002067 | ||||
Set Approval For... | 89979164 | 12 days ago | IN | 0 FTM | 0.00023254 | ||||
Set Approval For... | 88479968 | 28 days ago | IN | 0 FTM | 0.00118854 | ||||
Set Approval For... | 84095040 | 69 days ago | IN | 0 FTM | 0.0001207 | ||||
Set Approval For... | 81038787 | 114 days ago | IN | 0 FTM | 0.0007493 | ||||
Set Approval For... | 81038750 | 114 days ago | IN | 0 FTM | 0.0007493 | ||||
Set Approval For... | 81038262 | 114 days ago | IN | 0 FTM | 0.00080097 | ||||
Set Approval For... | 81038255 | 114 days ago | IN | 0 FTM | 0.00080097 | ||||
Set Approval For... | 81015900 | 115 days ago | IN | 0 FTM | 0.00193785 | ||||
Set Approval For... | 81015760 | 115 days ago | IN | 0 FTM | 0.00175698 | ||||
Set Approval For... | 78828928 | 155 days ago | IN | 0 FTM | 0.00568436 | ||||
Set Approval For... | 78800924 | 155 days ago | IN | 0 FTM | 0.00296673 | ||||
Approve | 73650695 | 248 days ago | IN | 0 FTM | 0.00559801 | ||||
Approve | 73634962 | 248 days ago | IN | 0 FTM | 0.00108566 | ||||
Transfer From | 72979669 | 261 days ago | IN | 0 FTM | 0.00195261 | ||||
Approve | 72516197 | 268 days ago | IN | 0 FTM | 0.00306651 | ||||
Set Approval For... | 72415466 | 271 days ago | IN | 0 FTM | 0.00126938 | ||||
Set Approval For... | 72415456 | 271 days ago | IN | 0 FTM | 0.00126526 | ||||
Set Approval For... | 72415444 | 271 days ago | IN | 0 FTM | 0.00126459 | ||||
Set Approval For... | 72308358 | 273 days ago | IN | 0 FTM | 0.0048317 | ||||
Approve | 67176637 | 385 days ago | IN | 0 FTM | 0.00234463 | ||||
Transfer From | 67163833 | 385 days ago | IN | 0 FTM | 0.03517514 | ||||
Set Approval For... | 66304342 | 410 days ago | IN | 0 FTM | 0.00384333 | ||||
Transfer From | 66260589 | 411 days ago | IN | 0 FTM | 0.00718642 |
Loading...
Loading
Contract Name:
WaveDaemons
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: WaveDaemons NFT Minter * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: ERC-721/1412/2981 compliant contract set with burn() */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./eip/1412/ERC1412.sol"; import "./eip/2981/ERC2981Collection.sol"; import "./eip/721/IERC721Burnable.sol"; import "./modules/timecop/TimeCop.sol"; import "./modules/splitter/PaymentSplitterV2.sol"; import "./modules/llamas/Llamas.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract WaveDaemons is TimeCop , ERC2981 , PaymentSplitterV2 , Llamas , ERC1412 , ReentrancyGuard { using Strings for uint256; string base; address Tinys = address(0x8bb765AE3e2320fd9447889D10b9DC7CE4970DA5); event UpdatedBaseURI(string _old, string _new); event ThankYou(address user, uint amount); constructor() ERC1412("WaveDaemons", "WAVEDMN") {} function burnToMint( uint256[] memory ids ) external notPaused() onlySale() nonReentrant() { // now to get the five per uint256 quant = ids.length / 5; if (quant == 0) { revert MaxSplaining({ reason: "Main:B1" }); } else if (this.minterMinted() + quant > this.minterCapacity()) { revert MaxSplaining ({ reason: "Main:B2" }); } else { for (uint x = 0; x < quant;) { _safeMint(msg.sender, _nextUp()); _oneRegularMint(); unchecked { ++x; } } // must call Approve for all first for (uint y = 0; y < quant * 5;) { IERC721Burnable(Tinys).burn(ids[y]); unchecked { ++y; } } } } function publicMint( uint quant ) external payable notPaused() onlySale() paidMint(quant) nonReentrant() { if (this.minterMinted() + quant > this.minterCapacity()) { revert MaxSplaining ({ reason: "Main:S1" }); } for (uint x = 0; x < quant;) { _safeMint(msg.sender, _nextUp()); _oneRegularMint(); unchecked { ++x; } } } function teamMint( uint256 quant ) external onlyOwner() { if (this.minterMinted() + quant > this.minterCapacity() || this.minterTeamMintsMinted() + quant > this.minterTeamMintsCapacity()) { revert MaxSplaining ({ reason: "Main:TM1" }); } for (uint x = 0; x < quant;) { // mint it _mint(this.owner(), _nextUp()); _oneTeamMint(); unchecked { ++x; } } } function setTinys( address CA ) external onlyDev() { Tinys = CA; } function donate() external payable { // thank you emit ThankYou(msg.sender, msg.value); } // @notice: Function to receive ether, msg.data must be empty receive() external payable { emit PaymentReceived(msg.sender, msg.value); } // @notice: Function to receive ether, msg.data is not empty fallback() external payable { emit PaymentReceived(msg.sender, msg.value); } // @notice this is a public getter for ETH blance on contract function getBalance() external view returns (uint) { return address(this).balance; } // @notice will update _baseURI() by onlyDeveloper() role // @param _base: Base for NFT's function setBaseURI( string memory _base ) public onlyDev() { string memory old = base; base = _base; emit UpdatedBaseURI(old, base); } // @notice: This override sets _base as the string for tokenURI(tokenId) function _baseURI() internal view override returns (string memory) { return base; } // @notice: This override is for making string/number now string/number.json // @param tokenId: tokenId to pull URI for function tokenURI( uint256 tokenId ) public view virtual override (ERC721) returns (string memory) { if (!_exists(tokenId)) { revert Unauthorized(); } string memory baseURI = _baseURI(); string memory json = ".json"; return bytes(baseURI).length > 0 ? string( abi.encodePacked( baseURI , tokenId.toString() , json) ) : ""; } // @notice: This override is to correct totalSupply() // @param tokenId: tokenId to burn function burn( uint256 tokenId ) public virtual override(ERC721Burnable) { //solhint-disable-next-line max-line-length if (!_isApprovedOrOwner(_msgSender(), tokenId)) { revert MaxSplaining({ reason: "Main:B1" }); } _burn(tokenId); // fixes totalSupply() _subOne(); } // @notice: Standard override for ERC165 // @param interfaceId: interfaceId to check for compliance // @return: bool if interfaceId is supported function supportsInterface( bytes4 interfaceId ) public view virtual override ( ERC721 , IERC165 ) returns (bool) { return ( interfaceId == type(IERC2981).interfaceId || interfaceId == type(EIP1412).interfaceId || super.supportsInterface(interfaceId) ); } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: TimeCop.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Time based mechanism for Solidity * @custom:error-code TC:E1 State not set * @custom:change-log added custom error code */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./ITimeCop.sol"; import "../../access/MaxAccess.sol"; abstract contract TimeCop is MaxAccess { uint internal startSale; event SaleSet(uint start); function setStartTime( uint time ) external onlyDev() { startSale = time; emit SaleSet(time); } function showStart() external view virtual returns (uint) { return startSale; } modifier onlySale() { if (block.timestamp < startSale) { revert TooSoonJunior({ yourTime: block.timestamp , hitTime: startSale }); } if (startSale == 0) { revert MaxSplaining({ reason: "TC:E1" }); } _; } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: ITimeCop.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Time based interface for Solidity */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface ITimeCop is IERC165 { function setPresale( uint time , uint duration ) external; function showPresaleStart() external view returns (uint); function showStart() external view returns (uint); }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: PaymentSplitterV2.sol * @author: rewritten by Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: was once an OZ payment splitter now, a maxflow payment splitter * @custom:OG-Source github.com/OpenZeppelin/openzeppelin-contracts/blob/0a87a4e75b02b95ca019d4894dc6e02e69e586f1/contracts/finance/PaymentSplitter.sol * @custom:error-code PSV2:E1 No Shares for address * @custom:error-code PSV2:E2 No payment due for address * @custom:error-code PSV2:E3 Can not use address(0) * @custom:error-code PSV2:E4 Shares can not be 0 * @custom:error-code PSV2:E5 User has shares already * @custom:change-log added claim (msg.sender) for payment * @custom:change-log removed constructor, release, and ERC20 support * @custom:change-log added addPayee(address, uint) * @custom:change-log added removePayee(address, uint) * @custom:change-log added ERC165 with Interfaces IPaymentSplitter & IPaymentSplitterV2 * @custom:change-log added custom error-codes above */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./IPaymentSplitterV2.sol"; import "../../access/MaxAccess.sol"; import "@openzeppelin/contracts/utils/Address.sol"; /** * @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. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `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. */ abstract contract PaymentSplitterV2 is MaxAccess , IPaymentSplitterV2 { uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; event PayeeAdded(address account, uint256 shares); event PayeeRemoved(address account, uint256 shares); event PayeesReset(); event PaymentReleased(address to, uint256 amount); event PaymentReceived(address from, uint256 amount); /** * @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(msg.sender, msg.value); * } * * // Fallback function is called when msg.data is not empty * // Added to PaymentSplitter.sol * fallback() external payable { * emit PaymentReceived(msg.sender, msg.value); * } * * receive() and fallback() to be handled at final contract */ // Internals of this contract // @dev: returns uint of payment for account in wei // @param account: account to lookup // @return: eth in wei function _pendingPayment( address account ) internal view returns (uint256) { uint totalReceived = address(this).balance + _totalReleased; return (totalReceived * _shares[account]) / _totalShares - _released[account]; } // @dev: claims "eth" for user // @param user: address of user function _claimETH( address user ) internal { if (_shares[user] == 0) { revert MaxSplaining({ reason: "PSV2:E1" }); } uint256 payment = _pendingPayment(user); if (payment == 0) { revert MaxSplaining({ reason: "PSV2:E2" }); } // _totalReleased is the sum of all values in _released. // If "_totalReleased += payment" does not overflow, // then "_released[account] += payment" cannot overflow. _totalReleased += payment; unchecked { _released[user] += payment; } Address.sendValue(payable(user), payment); emit PaymentReleased(user, payment); } // @dev: this claims "eth" and ERC20 for all _payees[] function _payAll() internal { uint len = _payees.length; for (uint x = 0; x < len;) { _claimETH(_payees[x]); unchecked { ++x; } } } // @dev: this will add a payee to PaymentSplitterV3 // @param account: address of account to add // @param shares: uint256 of shares to add to account function _addPayee( address account , uint256 addShares ) internal { if (account == address(0)) { revert MaxSplaining({ reason: "PSV2:E3" }); } else if (addShares == 0) { revert MaxSplaining({ reason: "PSV2:E4" }); } else if (_shares[account] > 0) { revert MaxSplaining({ reason: "PSV2:E5" }); } _payees.push(account); _shares[account] = addShares; _totalShares = _totalShares + addShares; emit PayeeAdded(account, addShares); } // @dev: finds index of an account in _payees // @param account: address of account to find // @return index: position of account in address[] _payees function _findIndex( address account ) internal view returns (uint index) { uint len = _payees.length; for (uint x = 0; x < len;) { if (_payees[x] == account) { index = x; } unchecked { ++x; } } } // @dev: removes an account in _payees // @param account: address of account to remove // @notice: will keep payment data in there function _removePayee( address account ) internal { if (account == address(0)) { revert MaxSplaining({ reason: "PSV2:E3" }); } // This finds the payee in the array _payees and removes it uint remove = _findIndex(account); address last = _payees[_payees.length - 1]; _payees[remove] = last; _payees.pop(); uint removeTwo = _shares[account]; _shares[account] = 0; _totalShares = _totalShares - removeTwo; emit PayeeRemoved(account, removeTwo); } // @dev: this clears all shares/users from PaymentSplitterV3 // this WILL leave the payments already claimed on contract function _clearPayees() internal { uint len = _payees.length; for (uint x = 0; x < len;) { address account = _payees[x]; _shares[account] = 0; unchecked { ++x; } } delete _totalShares; delete _payees; emit PayeesReset(); } // Now the externals, listed by use // @dev: this claims all "eth" on contract for msg.sender function claim() external virtual override { _claimETH(msg.sender); } // @dev: This adds a payment split to PaymentSplitterV3.sol // @param newSplit: Address of payee // @param newShares: Shares to send user function addSplit ( address newSplit , uint256 newShares ) external virtual override onlyDev() { _addPayee(newSplit, newShares); } // @dev: This pays all payment splits on PaymentSplitterV3.sol function paySplits() external virtual override onlyDev() { _payAll(); } // @dev: This removes a payment split on PaymentSplitterV3.sol // @param remove: Address of payee to remove // @notice: use paySplits() prior to use if anything is on the contract function removeSplit ( address remove ) external virtual override onlyDev() { _removePayee(remove); } // @dev: This removes all payment splits on PaymentSplitterV3.sol // @notice: use paySplits() prior to use if anything is on the contract function clearSplits() external virtual override onlyDev() { _clearPayees(); } // @dev: returns total shares // @return: uint256 of all shares on contract function totalShares() external view virtual override returns (uint256) { return _totalShares; } // @dev: returns total releases in "eth" // @return: uint256 of all "eth" released in wei function totalReleased() external view virtual override returns (uint256) { return _totalReleased; } // @dev: returns shares of an address // @param account: address of account to return // @return: mapping(address => uint) of _shares function shares( address account ) external view virtual override returns (uint256) { return _shares[account]; } // @dev: returns released "eth" of an account // @param account: address of account to look up // @return: mapping(address => uint) of _released function released( address account ) external view virtual override returns (uint256) { return _released[account]; } // @dev: returns index number of payee // @param index: number of index // @return: address at _payees[index] function payee( uint256 index ) external view virtual override returns (address) { return _payees[index]; } // @dev: returns amount of "eth" that can be released to account // @param account: address of account to look up // @return: uint in wei of "eth" to release function releasable( address account ) external view virtual override returns (uint256) { return _pendingPayment(account); } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: IPaymentSplitter.sol * @author: OG was OZ, rewritten by Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Interface for PaymentSplitter.sol */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface IPaymentSplitterV2 is IERC165 { // @dev: this claims all "eth" on contract for msg.sender function claim() external; // @dev: This adds a payment split to PaymentSplitterV3.sol // @param newSplit: Address of payee // @param newShares: Shares to send user function addSplit ( address newSplit , uint256 newShares ) external; // @dev: This pays all payment splits on PaymentSplitterV3.sol function paySplits() external; // @dev: This removes a payment split on PaymentSplitterV3.sol // @param remove: Address of payee to remove // @notice: use paySplits() prior to use if anything is on the contract function removeSplit ( address remove ) external; // @dev: This removes all payment splits on PaymentSplitterV3.sol // @notice: use paySplits() prior to use if anything is on the contract function clearSplits() external; // @dev: returns total shares // @return: uint256 of all shares on contract function totalShares() external view returns (uint256); // @dev: returns total releases in "eth" // @return: uint256 of all "eth" released in wei function totalReleased() external view returns (uint256); // @dev: returns shares of an address // @param account: address of account to return // @return: mapping(address => uint) of _shares function shares( address account ) external view returns (uint256); // @dev: returns released "eth" of an account // @param account: address of account to look up // @return: mapping(address => uint) of _released function released( address account ) external view returns (uint256); // @dev: returns index number of payee // @param index: number of index // @return: address at _payees[index] function payee( uint256 index ) external view returns (address); // @dev: returns amount of "eth" that can be released to account // @param account: address of account to look up // @return: uint in wei of "eth" to release function releasable( address account ) external view returns (uint256); }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: Llamas.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Solidity from the BAYC Mint engine, does Provenance for Images * @custom:OG-Source: https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code * @custom:error-code Llamas:E1 msg.value is under quant * fees * @custom:error-code Llamas:E2 minter is paused * @custom:error-code Llamas:E3 states not loaded * @custom:error-code Llamas:E4 provenance is locked * @custom:error-code Llamas:E5 can not change provenance while minting * @custom:change-log added provenance to metadata * @custom:change-log used the modulo division to wrap from start -> last ID -> first ID -> start * @custom:change-log bug found, line 61 corrected >= to < */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./ILlamas.sol"; import "../../lib/PsuedoRand.sol"; import "../../lib/CountersV2.sol"; import "../../access/MaxAccess.sol"; abstract contract Llamas is MaxAccess , ILlamas { using PsuedoRand for PsuedoRand.Engine; using CountersV2 for CountersV2.Counter; PsuedoRand.Engine private llamas; CountersV2.Counter private tokensBurned; event SetStartNumbers(uint numberToMint, uint teamMints); modifier paidMint(uint quant) { if (msg.value < quant * llamas.mintFee) { revert MaxSplaining({ reason: "Llamas:E1" }); } _; } modifier notPaused() { if (!llamas.status) { revert MaxSplaining({ reason: "Llamas:E2" }); } _; } modifier numbersSet() { if (llamas.maxCapacity == 0) { revert MaxSplaining({ reason: "Llamas:E3" }); } _; } modifier provenanceLocked() { if (llamas.provSet) { revert MaxSplaining({ reason: "Llamas:E4:" }); } if (llamas.showMinted() > 0) { revert MaxSplaining({ reason: "Llamas:E5" }); } _; } // @dev this is to substract one to on chain minted function _subOne() internal { tokensBurned.increment(); } // @dev this is for any team mint that happens, must be included in mint... function _oneTeamMint() internal { llamas.battersUp(); llamas.battersUpTeam(); } // @dev this is for any mint outside of a team mint, must be included in mint... function _oneRegularMint() internal { llamas.battersUp(); } // @dev this will set the boolean for minter status // @param toggle: bool for enabled or not function _setStatus( bool toggle ) internal { llamas.setStatus(toggle); } // @dev this will set the minter fees // @param number: uint for fees in wei. function _setMintFees( uint number ) internal { llamas.setFees(number); } // @dev this will set the mint engine // @param _mintingCap: uint for publicMint() capacity of this chain // @param _teamMints: uint for maximum teamMints() capacity on this chain function _setLlamasEngine( uint _mintingCap , uint _teamMints ) internal { llamas.setMaxCap(_mintingCap); llamas.setMaxTeam(_teamMints); emit SetStartNumbers( _mintingCap , _teamMints ); } // @dev this will set the Provenance Hashes // @param string memory img - Provenance Hash of images in sequence // @param string memory json - Provenance Hash of metadata in sequence // @notice: This will set the start number as well, make sure to set MaxCap // also can be a hyperlink... sha3... ipfs.. whatever. function _setProvenance( string memory img , string memory json ) internal { llamas.setProvJSON(json); llamas.setProvIMG(img); llamas.setStartNumber(); llamas.provLock(); } // @dev this will be valuable on the mint engine logic contract function _nextUp() internal view returns (uint) { return llamas.mintID(); } // @dev this will set the boolean for minter status // @param toggle: bool for enabled or not function setStatus( bool toggle ) external virtual override onlyDev() { _setStatus(toggle); } // @dev this will set the minter fees // @param number: uint for fees in wei. function setMintFees( uint number ) external virtual override onlyDev() { _setMintFees(number); } // @dev this will set the mint engine // @param mintingCap: uint for publicMint() capacity of this chain // @param teamMints: uint for maximum teamMints() capacity on this chain function setLlamasEngine( uint mintingCap , uint teamMints ) external virtual override onlyDev() { _setLlamasEngine( mintingCap , teamMints ); } // @dev this will set the Provenance Hashes // @param string memory img - Provenance Hash of images in sequence // @param string memory json - Provenance Hash of metadata in sequence // @notice: This will set the start number as well, make sure to set MaxCap // also can be a hyperlink... sha3... ipfs.. whatever. function setProvenance( string memory img , string memory json ) external virtual override numbersSet() provenanceLocked() onlyDev() { _setProvenance( img , json ); } // @dev will return status of Minter // @return - bool of active or not function minterStatus() external view virtual override returns (bool) { return llamas.status; } // @dev will return minting fees // @return - uint of mint costs in wei function minterFees() external view virtual override returns (uint) { return llamas.mintFee; } // @dev will return maximum mint capacity // @return - uint of maximum mints allowed function minterCapacity() external view virtual override returns (uint) { return llamas.maxCapacity; } // @dev will return maximum mint capacity // @return - uint of maximum mints allowed function minterMinted() external view virtual override returns (uint) { return llamas.showMinted(); } // @dev will return maximum "team minting" capacity // @return - uint of maximum airdrops or team mints allowed function minterTeamMintsCapacity() external view virtual override returns (uint) { return llamas.maxTeamMints; } // @dev will return "team mints" count // @return - uint of airdrops or team mints done function minterTeamMintsMinted() external view virtual override returns (uint) { return llamas.showTeam(); } // @dev: will return total supply for mint // @return: uint for this mint function totalSupply() external view virtual override returns (uint256) { return llamas.showMinted() - tokensBurned.current(); } // @dev: will return Provenance hash of images // @return: string memory of the Images Hash (sha256) function RevealProvenanceImages() external view virtual override returns (string memory) { return llamas.ProvenanceIMG; } // @dev: will return Provenance hash of metadata // @return: string memory of the Metadata Hash (sha256) function RevealProvenanceJSON() external view virtual override returns (string memory) { return llamas.ProvenanceJSON; } // @dev: will return starting number for mint // @return: uint of the start number function RevealStartID() external view virtual override returns (uint256) { return llamas.startNumber; } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: IMAX721.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Interface for UX/UI */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface IMAX721 is IERC165 { // @dev will return status of Minter // @return - bool of active or not function minterStatus() external view returns (bool); // @dev will return minting fees // @return - uint of mint costs in wei function minterFees() external view returns (uint); // @dev will return maximum mint capacity // @return - uint of maximum mints allowed function minterCapacity() external view returns (uint); // @dev will return maximum mint capacity // @return - uint of maximum mints allowed function minterMinted() external view returns (uint); // @dev will return maximum "team minting" capacity // @return - uint of maximum airdrops or team mints allowed function minterTeamMintsCapacity() external view returns (uint); // @dev will return "team mints" count // @return - uint of airdrops or team mints done function minterTeamMintsMinted() external view returns (uint); // @dev: will return total supply for mint // @return: uint for this mint function totalSupply() external view returns (uint256); }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: ILlamas.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Interface for Llama/BAYC Mint engine, does Provenance for Metadata/Images * Source: https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#code */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./IMAX721.sol"; interface ILlamas is IMAX721{ // @dev: will return Provenance hash of images // @return: string memory of the Images Hash (sha256) function RevealProvenanceImages() external view returns (string memory); // @dev: will return Provenance hash of metadata // @return: string memory of the Metadata Hash (sha256) function RevealProvenanceJSON() external view returns (string memory); // @dev: will return starting number for mint // @return: uint of the start number function RevealStartID() external view returns (uint256); // @dev this will set the boolean for minter status // @param toggle: bool for enabled or not function setStatus( bool toggle ) external; // @dev this will set the minter fees // @param number: uint for fees in wei. function setMintFees( uint number ) external; // @dev this will set the Provenance Hashes // @param string memory img - Provenance Hash of images in sequence // @param string memory json - Provenance Hash of metadata in sequence // @notice: This will set the start number as well, make sure to set MaxCap // also can be a hyperlink... sha3... ipfs.. whatever. function setProvenance( string memory img , string memory json ) external; // @dev this will set the mint engine // @param mintingCap: uint for publicMint() capacity of this chain // @param teamMints: uint for maximum teamMints() capacity on this chain function setLlamasEngine( uint mintingCap , uint teamMints ) external; }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: Roles.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Library for MaxAcess.sol * @custom:error-code Lib-Roles:E1 User has role already * @custom:error-code Lib-Roles:E2 User does not have role to revoke * @custom:change-log Custom errors added above * * Include with 'using Roles for Roles.Role;' */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; library Roles { // @dev: this is Unauthorized(), basically a catch all, zero description // @notice: 0x82b42900 bytes4 of this error Unauthorized(); // @dev: this is MaxSplaining(), giving you a reason, aka require(param, "reason") // @param reason: Use the "Contract name: error" // @notice: 0x0661b792 bytes4 of this error MaxSplaining( string reason ); event RoleChanged(bytes4 _type, address _user, bool _status); // 0x0baaa7ab struct Role { mapping(address => mapping(bytes4 => bool)) bearer; } function add(Role storage role, bytes4 _type, address account) internal { if (account == address(0)) { revert Unauthorized(); } else if (has(role, _type, account)) { revert MaxSplaining({ reason: "Roles:1" }); } role.bearer[account][_type] = true; emit RoleChanged(_type, account, true); } function remove(Role storage role, bytes4 _type, address account) internal { if (account == address(0)) { revert Unauthorized(); } else if (!has(role, _type, account)) { revert MaxSplaining({ reason: "Roles:2" }); } role.bearer[account][_type] = false; emit RoleChanged(_type, account, false); } function has(Role storage role, bytes4 _type, address account) internal view returns (bool) { if (account == address(0)) { revert Unauthorized(); } return role.bearer[account][_type]; } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: PsuedoRand.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Library for Llama/BAYC Mint engine... * basically a random start point and a bookends mint to start * i.e. 0-2999 start at 500 -> 2999, then 0 -> 499. * * Covers IMAX721.sol and Illamas.sol * * Include with 'using PsuedoRand for PsuedoRand.Engine;' */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./CountersV2.sol"; library PsuedoRand { using CountersV2 for CountersV2.Counter; event SetProvenanceIMG(string _new, string _old); event SetProvenanceJSON(string _new, string _old); event SetStartNumber(uint _new); event SetMaxCapacity(uint _new, uint _old); event SetMaxTeamMint(uint _new, uint _old); event SetMintFees(uint _new, uint _old); event SetStatus(bool _new); event ProvenanceLocked(bool _status); // @dev: this is MaxSplaining(), giving you a reason, aka require(param, "reason") // @param reason: Use the "Contract name: error" // @notice: 0x0661b792 bytes4 of this error MaxSplaining( string reason ); struct Engine { uint256 mintFee; uint256 startNumber; uint256 maxCapacity; uint256 maxTeamMints; string ProvenanceIMG; string ProvenanceJSON; CountersV2.Counter currentMinted; CountersV2.Counter currentTeam; bool status; bool provSet; } function setProvJSON( Engine storage engine , string memory provJSON ) internal { string memory old = engine.ProvenanceJSON; engine.ProvenanceJSON = provJSON; emit SetProvenanceJSON(provJSON, old); } function setProvIMG( Engine storage engine , string memory provIMG ) internal { string memory old = engine.ProvenanceIMG; engine.ProvenanceIMG = provIMG; emit SetProvenanceIMG(provIMG, old); } function provLock( Engine storage engine ) internal { engine.provSet = true; emit ProvenanceLocked(engine.provSet); } function setStartNumber( Engine storage engine ) internal { if (engine.maxCapacity == 0) { revert MaxSplaining({ reason : "Lib-Llamas:E1" }); } engine.startNumber = uint( keccak256( abi.encodePacked( block.timestamp , msg.sender , engine.ProvenanceIMG , engine.ProvenanceJSON , block.difficulty))) % engine.maxCapacity; emit SetStartNumber(engine.startNumber); } function setMaxCap( Engine storage engine , uint256 max ) internal { uint old = engine.maxCapacity; engine.maxCapacity = max; emit SetMaxCapacity(max, old); } function setMaxTeam( Engine storage engine , uint256 max ) internal { uint old = engine.maxTeamMints; engine.maxTeamMints = max; emit SetMaxTeamMint(max, old); } function setFees( Engine storage engine , uint256 max ) internal { uint old = engine.mintFee; engine.mintFee = max; emit SetMintFees(max, old); } function setStatus( Engine storage engine , bool change ) internal { engine.status = change; emit SetStatus(change); } function mintID( Engine storage engine ) internal view returns (uint256) { return (engine.startNumber + engine.currentMinted.current()) % engine.maxCapacity; } function showTeam( Engine storage engine ) internal view returns (uint256) { return engine.currentTeam.current(); } function showMinted( Engine storage engine ) internal view returns (uint256) { return engine.currentMinted.current(); } function battersUpTeam( Engine storage engine ) internal { engine.currentTeam.increment(); } function battersUp( Engine storage engine ) internal { engine.currentMinted.increment(); } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: CountersV2.sol * @author Matt Condon (@shrugs) rewritten by Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @dev Provides counters that can only be incremented, decremented, reset or set. * This can be used e.g. to track the number of elements in a mapping, issuing ERC721 ids * or counting request ids. * * Edited by @MaxFlowO2 for more NFT functionality on 13 Jan 2022 * added .set(uint) so if projects need to start at say 1 or some random number they can * and an event log for numbers being reset or set. * * Include with `using CountersV2 for CountersV2.Counter;` */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; library CountersV2 { // @dev: this is MaxSplaining(), giving you a reason, aka require(param, "reason") // @param reason: Use the "Contract name: error" // @notice: 0x0661b792 bytes4 of this error MaxSplaining( string reason ); event CounterNumberChangedTo(uint _number); 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; } } function decrement( Counter storage counter ) internal { uint256 value = counter._value; if (value == 0) { revert MaxSplaining({ reason : "CV2:1" }); } unchecked { --counter._value; } } function reset( Counter storage counter ) internal { counter._value = 0; emit CounterNumberChangedTo(counter._value); } function set( Counter storage counter , uint number ) internal { counter._value = number; emit CounterNumberChangedTo(counter._value); } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: MaxErrors.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Custom errors for all contracts, minus libraries */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/Strings.sol"; abstract contract MaxErrors { // @dev: this is Unauthorized(), basically a catch all, zero description // @notice: 0x82b42900 bytes4 of this error Unauthorized(); // @dev: this is MaxSplaining(), giving you a reason, aka require(param, "reason") // @param reason: Use the "Contract name: error" // @notice: 0x0661b792 bytes4 of this error MaxSplaining( string reason ); // @dev: this is TooSoonJunior(), using times // @param yourTime: should almost always be block.timestamp // @param hitTime: the time you should have started // @notice: 0xf3f82ac5 bytes4 of this error TooSoonJunior( uint yourTime , uint hitTime ); // @dev: this is TooLateBoomer(), using times // @param yourTime: should almost always be block.timestamp // @param hitTime: the time you should have ended // @notice: 0x43c540ef bytes4 of this error TooLateBoomer( uint yourTime , uint hitTime ); }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: Interface for burnable tokens * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: ERC-721 burn() */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; interface IERC721Burnable { function burn( uint256 id ) external; }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: IMAX2981.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: IERC2981 Extension */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./IERC2981.sol"; interface IMAX2981 is IERC2981 { // @notice: This sets the contract as royalty reciever (useful with abstract PaymentSplitter) // @param permille: Percentage you want so 3.5% -> 35 function setRoyaltiesThis( uint16 permille ) external; // @notice: This sets royalties per EIP-2981 // @param newAddress: Sets the address for royalties // @param permille: Percentage you want so 3.5% -> 35 function setRoyalties( address newAddress , uint16 permille ) external; // @notice: This clears all EIP-2981 royalties (address(0) and 0%) function clearRoyalties() external; }
/*** * ███████╗██╗██████╗ ██████╗ █████╗ █████╗ ██╗ * ██╔════╝██║██╔══██╗ ╚════██╗██╔══██╗██╔══██╗███║ * █████╗ ██║██████╔╝█████╗ █████╔╝╚██████║╚█████╔╝╚██║ * ██╔══╝ ██║██╔═══╝ ╚════╝██╔═══╝ ╚═══██║██╔══██╗ ██║ * ███████╗██║██║ ███████╗ █████╔╝╚█████╔╝ ██║ * ╚══════╝╚═╝╚═╝ ╚══════╝ ╚════╝ ╚════╝ ╚═╝ * Zach Burks, James Morgan, Blaine Malone, James Seibel, * "EIP-2981: NFT Royalty Standard," * Ethereum Improvement Proposals, no. 2981, September 2020. [Online serial]. * Available: https://eips.ethereum.org/EIPS/eip-2981. */ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /// /// @dev Interface for the NFT Royalty Standard /// interface IERC2981 is IERC165 { // @notice Called with the sale price to determine how much royalty // is owed and to whom. // @param _tokenId - the NFT asset queried for royalty information // @param _salePrice - the sale price of the NFT asset specified by _tokenId // @return receiver - address of who should be sent the royalty payment // @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo( uint256 _tokenId , uint256 _salePrice ) external view returns ( address receiver , uint256 royaltyAmount ); }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: ERC2981Collection.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Use case for EIP 2981, steered more towards NFT Collections as a whole * @custom:error-code ERC2981:E1 permille out of bounds * @custom:change-log added custom error code */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./IMAX2981.sol"; import "../../access/MaxAccess.sol"; abstract contract ERC2981 is MaxAccess , IMAX2981 { address internal royaltyAddress; uint16 internal royaltyPermille; event royalatiesSet( uint16 value , address recipient ); // the internals to do logic flows later // @dev to set roaylties on contract via EIP 2981 // @param _receiver, address of recipient // @param _permille, permille xx.x -> xxx value function _setRoyalties( address _receiver , uint16 _permille ) internal { if (_permille >= 1000 || _permille == 0) { revert MaxSplaining({ reason: "ERC2981:E1" }); } royaltyAddress = _receiver; royaltyPermille = _permille; emit royalatiesSet(royaltyPermille, royaltyAddress); } // @dev to remove royalties from contract function _removeRoyalties() internal { delete royaltyAddress; delete royaltyPermille; emit royalatiesSet(royaltyPermille, royaltyAddress); } // Logic for this contract (abstract) // @notice: This sets the contract as royalty reciever (useful with abstract PaymentSplitter) // @param permille: Percentage you want so 3.5% -> 35 function setRoyaltiesThis( uint16 permille ) external virtual override onlyOwner() { _setRoyalties(address(this), permille); } // @notice: This sets royalties per EIP-2981 // @param newAddress: Sets the address for royalties // @param permille: Percentage you want so 3.5% -> 35 function setRoyalties( address newAddress , uint16 permille ) external virtual override onlyOwner() { _setRoyalties(newAddress, permille); } // @notice: Clears EIP2981 royalties function clearRoyalties() external virtual override onlyOwner() { _removeRoyalties(); } // @dev Override for royaltyInfo(uint256, uint256) // @param _tokenId, uint of token ID to be checked // @param _salePrice, uint of amount of sale // @return receiver, address of recipient // @return royaltyAmount, amount royalties recieved function royaltyInfo( uint256 _tokenId , uint256 _salePrice ) external view virtual override returns ( address receiver , uint256 royaltyAmount ) { receiver = royaltyAddress; royaltyAmount = _salePrice * royaltyPermille / 1000; } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: ERC721BatchTransfer.sol * @author: @MaxFlowO2 on bird app/GitHub * @notice: Provides a batch transfer capability that can be added to ERC 721 via EIP 1412 (V2). * @custom:error-code ERC721BT:E1 to.length tokenId.length mismatch * @custom:change-log added custom errors above */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./EIP1412.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; abstract contract ERC1412 is EIP1412 , ERC721 , ERC721Burnable { constructor( string memory _name , string memory _ticker ) ERC721(_name, _ticker) {} function safeBatchTransferFrom( address from, address to, uint256[] memory tokenIds ) public virtual override { safeBatchTransferFrom(from, to, tokenIds, ""); } function safeBatchTransferFrom( address from, address to, uint256[] memory tokenIds, bytes memory _data ) public virtual override { uint len = tokenIds.length; for(uint x = 0; x < len;) { _safeTransfer(from, to, tokenIds[x], _data); unchecked { ++x; } } emit TransferBatch(msg.sender, from, to, tokenIds); } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: Batch Transfers For Non-Fungible Tokens * @author: Nick Mudge [email protected] * @notice: Adds batch transfer functions for ERC721 non-fungible tokens. * @custom: Change log added ERC165 into this, added event TransferBatch and changed to Apache2.0 */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; /// Note: the ERC-165 identifier for this interface is 0x2b89bcaa import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface EIP1412 is IERC165 { // @notice this is the event emitted for batch transfer // @param operator - msg.sender // @param from - address from // @param to - addres sent to // @param ids - list/array of token id's that transferred event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids ); // @notice Transfers the ownership of multiple NFTs from one address to another address // @param _from The current owner of the NFT // @param _to The new owner // @param _tokenIds The NFTs to transfer // @param _data Additional data with no specified format, sent in call to `_to` function safeBatchTransferFrom( address _from , address _to , uint256[] memory _tokenIds , bytes memory _data ) external; // @notice Transfers the ownership of multiple NFTs from one address to another address // @param _from The current owner of the NFT // @param _to The new owner // @param _tokenIds The NFTs to transfer function safeBatchTransferFrom( address _from , address _to , uint256[] memory _tokenIds ) external; }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: MaxAccess.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Access control based off EIP 173/roles from OZ * @custom:error-code MA:E1 you are not admin or role * @custom:error-code MA:E2 pending developers can not use * @custom:error-code MA:E3 pending owners can not use * @custom:error-code MA:E4 you are not onlyDev() * @custom:error-code MA:E5 you are not onlyOwner() * @custom:change-log added custom errors above */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./IOwnerV2.sol"; import "./IDeveloperV2.sol"; import "./IRole.sol"; import "../lib/Roles.sol"; import "../errors/MaxErrors.sol"; abstract contract MaxAccess is MaxErrors , IRole , IOwnerV2 , IDeveloperV2 { using Roles for Roles.Role; Roles.Role private contractRoles; // bytes4 caluclated as follows // bytes4(keccak256(bytes(signature))) // developer() => 0xca4b208b // owner() => 0x8da5cb5b // admin() => 0xf851a440 // was using trailing () for caluclations bytes4 constant private DEVS = 0xca4b208b; bytes4 constant private PENDING_DEVS = 0xca4b208a; // DEVS - 1 bytes4 constant private OWNERS = 0x8da5cb5b; bytes4 constant private PENDING_OWNERS = 0x8da5cb5a; // OWNERS - 1 bytes4 constant private ADMIN = 0xf851a440; // @dev you can sub your own address here... this is MaxFlowO2.eth // these are for displays anyways, and init(). address private TheDev = address(0x4CE69fd760AD0c07490178f9a47863Dc0358cCCD); address private TheOwner = address(0x44f750eB065596c150B3479B1DF6957da300a332); constructor() { // supercedes all the logic below contractRoles.add(ADMIN, address(this)); _grantRole(ADMIN, TheDev); _grantRole(OWNERS, TheOwner); _grantRole(DEVS, TheDev); } // modifiers modifier onlyRole(bytes4 role) { if (_checkRole(role, msg.sender) || _checkRole(ADMIN, msg.sender)) { _; } else { revert Unauthorized(); } } modifier onlyDev() { if (!_checkRole(DEVS, msg.sender)) { revert Unauthorized(); } _; } modifier onlyOwner() { if (!_checkRole(OWNERS, msg.sender)) { revert Unauthorized(); } _; } // internal logic first // (sets the tone later, and for later contracts) // @dev: this is the bool for checking if the account has a role via lib roles.sol // @param role: bytes4 of the role to check for // @param account: address of account to check // @return: bool true/false function _checkRole( bytes4 role , address account ) internal view virtual returns (bool) { return contractRoles.has(role, account); } // @dev: this is the internal to grant roles // @param role: bytes4 of the role // @param account: address of account to add function _grantRole( bytes4 role , address account ) internal virtual { contractRoles.add(role, account); } // @dev: this is the internal to revoke roles // @param role: bytes4 of the role // @param account: address of account to remove function _revokeRole( bytes4 role , address account ) internal virtual { contractRoles.remove(role, account); } // @dev: Returns `true` if `account` has been granted `role`. // @param role: Bytes4 of a role // @param account: Address to check // @return: bool true/false if account has role function hasRole( bytes4 role , address account ) external view virtual override returns (bool) { return _checkRole(role, account); } // @dev: Returns the admin role that controls a role // @param role: Role to check // @return: admin role function getRoleAdmin( bytes4 role ) external view virtual override returns (bytes4) { return ADMIN; } // @dev: Grants `role` to `account` // @param role: Bytes4 of a role // @param account: account to give role to function grantRole( bytes4 role , address account ) external virtual override onlyRole(role) { if (role == PENDING_DEVS) { // locks out pending devs from mass swapping roles if (_checkRole(PENDING_DEVS, msg.sender)) { revert Unauthorized(); } } if (role == PENDING_OWNERS) { // locks out pending owners from mass swapping roles if (_checkRole(PENDING_OWNERS, msg.sender)) { revert Unauthorized(); } } _grantRole(role, account); } // @dev: Revokes `role` from `account` // @param role: Bytes4 of a role // @param account: account to revoke role from function revokeRole( bytes4 role , address account ) external virtual override onlyRole(role) { if (role == PENDING_DEVS) { // locks out pending devs from mass swapping roles if (account != msg.sender) { revert Unauthorized(); } } if (role == PENDING_OWNERS) { // locks out pending owners from mass swapping roles if (account != msg.sender) { revert Unauthorized(); } } _revokeRole(role, account); } // @dev: Renounces `role` from `account` // @param role: Bytes4 of a role // @param account: account to renounce role from function renounceRole( bytes4 role ) external virtual override onlyRole(role) { address user = msg.sender; _revokeRole(role, user); } // Now the classic onlyDev() + "V2" suggested by auditors // @dev: Classic "EIP-173" but for onlyDev() // @return: Developer of contract function developer() external view virtual override returns (address) { return TheDev; } // @dev: This renounces your role as onlyDev() function renounceDeveloper() external virtual override onlyRole(DEVS) { address user = msg.sender; _revokeRole(DEVS, user); } // @dev: Classic "EIP-173" but for onlyDev() // @param newDeveloper: addres of new pending Developer role function transferDeveloper( address newDeveloper ) external virtual override onlyRole(DEVS) { address user = msg.sender; _grantRole(DEVS, newDeveloper); _revokeRole(DEVS, user); } // @dev: This accepts the push-pull method of onlyDev() function acceptDeveloper() external virtual override onlyRole(PENDING_DEVS) { address user = msg.sender; _revokeRole(PENDING_DEVS, user); _grantRole(DEVS, user); } // @dev: This declines the push-pull method of onlyDev() function declineDeveloper() external virtual override onlyRole(PENDING_DEVS) { address user = msg.sender; _revokeRole(PENDING_DEVS, user); } // @dev: This starts the push-pull method of onlyDev() // @param newDeveloper: addres of new pending developer role function pushDeveloper( address newDeveloper ) external virtual override onlyRole(DEVS) { _grantRole(PENDING_DEVS, newDeveloper); } // @dev: This changes the display of developer() // @param newDisplay: new display addrss for developer() function setDeveloper( address newDisplay ) external onlyDev() { if (!_checkRole(DEVS, newDisplay)) { revert Unauthorized(); } TheDev = newDisplay; } // Now the classic onlyOwner() + "V2" suggested by auditors // @dev: Classic "EIP-173" getter for owner() // @return: owner of contract function owner() external view virtual override returns (address) { return TheOwner; } // @dev: This renounces your role as onlyOwner() function renounceOwnership() external virtual override onlyRole(OWNERS) { address user = msg.sender; _revokeRole(OWNERS, user); } // @dev: Classic "EIP-173" but for onlyOwner() // @param newOwner: addres of new pending Developer role function transferOwnership( address newOwner ) external virtual override onlyRole(OWNERS) { address user = msg.sender; _grantRole(OWNERS, newOwner); _revokeRole(OWNERS, user); } // @dev: This accepts the push-pull method of onlyOwner() function acceptOwnership() external virtual override onlyRole(PENDING_OWNERS) { address user = msg.sender; _revokeRole(PENDING_OWNERS, user); _grantRole(OWNERS, user); } // @dev: This declines the push-pull method of onlyOwner() function declineOwnership() external virtual override onlyRole(PENDING_OWNERS) { address user = msg.sender; _revokeRole(PENDING_OWNERS, user); } // @dev: This starts the push-pull method of onlyOwner() // @param newOwner: addres of new pending developer role function pushOwnership( address newOwner ) external virtual override onlyRole(OWNERS) { _grantRole(PENDING_OWNERS, newOwner); } // @dev: This changes the display of Ownership() // @param newDisplay: new display addrss for Ownership() function setOwner( address newDisplay ) external onlyOwner() { if (!_checkRole(OWNERS, newDisplay)) { revert Unauthorized(); } TheOwner = newDisplay; } }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: IRole.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Interface for MaxAccess version of roles */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface IRole is IERC165 { // @dev: Returns `true` if `account` has been granted `role`. // @param role: Bytes4 of a role // @param account: Address to check // @return: bool true/false if account has role function hasRole( bytes4 role , address account ) external view returns (bool); // @dev: Returns the admin role that controls a role // @param role: Role to check // @return: admin role function getRoleAdmin( bytes4 role ) external view returns (bytes4); // @dev: Grants `role` to `account` // @param role: Bytes4 of a role // @param account: account to give role to function grantRole( bytes4 role , address account ) external; // @dev: Revokes `role` from `account` // @param role: Bytes4 of a role // @param account: account to revoke role from function revokeRole( bytes4 role , address account ) external; // @dev: Renounces `role` from `account` // @param role: Bytes4 of a role // @param account: account to renounce role from function renounceRole( bytes4 role ) external; }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: IOwnerV2.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Interface V2 for onlyOwner() role, suggested by Auditors... */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./IOwner.sol"; interface IOwnerV2 is IOwner { // @dev: This accepts the push-pull method of onlyOwner() function acceptOwnership() external; // @dev: This declines the push-pull method of onlyOwner() function declineOwnership() external; // @dev: This starts the push-pull method of onlyOwner() // @param newOwner: addres of new pending owner role function pushOwnership( address newOwner ) external; }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: IOwner.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Interface for onlyOwner() role */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface IOwner is IERC165 { // @dev: Classic "EIP-173" getter for owner() // @return: owner of contract function owner() external view returns (address); // @dev: This is the classic "EIP-173" method of setting onlyOwner() function renounceOwnership() external; // @dev: This is the classic "EIP-173" method of setting onlyOwner() // @param newOwner: addres of new pending owner role function transferOwnership( address newOwner ) external; }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: IDeveloperV2.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Interface V2 for onlyDev() role, suggested by Auditors... */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "./IDeveloper.sol"; interface IDeveloperV2 is IDeveloper { // @dev: This accepts the push-pull method of onlyDev() function acceptDeveloper() external; // @dev: This declines the push-pull method of onlyDev() function declineDeveloper() external; // @dev: This starts the push-pull method of onlyDev() // @param newDeveloper: addres of new pending developer role function pushDeveloper( address newDeveloper ) external; }
/* +%%#- ##. =+. .+#%#+: *%%#: .**+- =+ * .%@@*#*: @@: *%- #%*= .*@@=. =%. .%@@*%* +@@=+=% .%## * .%@@- -=+ *@% :@@- #@=# -@@* +@- :@@@: ==* -%%. *** #@=* * %@@: -.* :. +@@-.#@# =@%#. :. -@* :@@@. -:# .%. *@# *@#* * *%@- +++ +@#.-- .*%*. .#@@*@# %@@%*#@@: .@@=-. -%- #%@: +*- =*@* -@%=: * @@% =## +@@#-..%%:%.-@@=-@@+ .. +@% #@#*+@: .*= @@% =#* -*. +#. %@#+*@ * @@# +@* #@# +@@. -+@@+#*@% =#: #@= :@@-.%# -=. : @@# .*@* =@= :*@:=@@-:@+ * -#%+@#- :@#@@+%++@*@*:=%+..%%#= *@ *@++##. =%@%@%%#- =#%+@#- :*+**+=: %%++%* * * @title: IDeveloper.sol * @author: Max Flow O2 -> @MaxFlowO2 on bird app/GitHub * @notice: Interface for onlyDev() role */ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** * Copyright 2022 Max Flow O2 * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * ******************************************************************************/ pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface IDeveloper is IERC165 { // @dev: Classic "EIP-173" but for onlyDev() // @return: Developer of contract function developer() external view returns (address); // @dev: This renounces your role as onlyDev() function renounceDeveloper() external; // @dev: Classic "EIP-173" but for onlyDev() // @param newDeveloper: addres of new pending Developer role function transferDeveloper( address newDeveloper ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface 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 // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) 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 // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://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 functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) 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 // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface 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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) 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`. * * 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; /** * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol) 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: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); 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) { _requireMinted(tokenId); 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 overridden 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 token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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 _ownerOf(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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @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 from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 10000 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"reason","type":"string"}],"name":"MaxSplaining","type":"error"},{"inputs":[{"internalType":"string","name":"reason","type":"string"}],"name":"MaxSplaining","type":"error"},{"inputs":[{"internalType":"string","name":"reason","type":"string"}],"name":"MaxSplaining","type":"error"},{"inputs":[{"internalType":"uint256","name":"yourTime","type":"uint256"},{"internalType":"uint256","name":"hitTime","type":"uint256"}],"name":"TooLateBoomer","type":"error"},{"inputs":[{"internalType":"uint256","name":"yourTime","type":"uint256"},{"internalType":"uint256","name":"hitTime","type":"uint256"}],"name":"TooSoonJunior","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeRemoved","type":"event"},{"anonymous":false,"inputs":[],"name":"PayeesReset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"}],"name":"SaleSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"numberToMint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"teamMints","type":"uint256"}],"name":"SetStartNumbers","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ThankYou","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_old","type":"string"},{"indexed":false,"internalType":"string","name":"_new","type":"string"}],"name":"UpdatedBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"value","type":"uint16"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"royalatiesSet","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"RevealProvenanceImages","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RevealProvenanceJSON","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RevealStartID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSplit","type":"address"},{"internalType":"uint256","name":"newShares","type":"uint256"}],"name":"addSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"burnToMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearSplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"declineDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"declineOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"developer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"donate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterCapacity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterTeamMintsCapacity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterTeamMintsMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paySplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quant","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newDeveloper","type":"address"}],"name":"pushDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"pushOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"remove","type":"address"}],"name":"removeSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_base","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newDisplay","type":"address"}],"name":"setDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintingCap","type":"uint256"},{"internalType":"uint256","name":"teamMints","type":"uint256"}],"name":"setLlamasEngine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"number","type":"uint256"}],"name":"setMintFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newDisplay","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"img","type":"string"},{"internalType":"string","name":"json","type":"string"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"},{"internalType":"uint16","name":"permille","type":"uint16"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"permille","type":"uint16"}],"name":"setRoyaltiesThis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"toggle","type":"bool"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"CA","type":"address"}],"name":"setTinys","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"showStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quant","type":"uint256"}],"name":"teamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newDeveloper","type":"address"}],"name":"transferDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600180546001600160a01b0319908116734ce69fd760ad0c07490178f9a47863dc0358cccd179091556002805482167344f750eb065596c150b3479b1df6957da300a332179055601c8054909116738bb765ae3e2320fd9447889d10b9dc7ce4970da51790553480156200007757600080fd5b506040518060400160405280600b81526020016a576176654461656d6f6e7360a81b815250604051806040016040528060078152602001662ba0ab22a226a760c91b8152508181620000e263f851a44060e01b3060006200017060201b62002b75179092919060201c565b60015462000102906303e1469160e61b906001600160a01b03166200025f565b6002546200012290638da5cb5b60e01b906001600160a01b03166200025f565b600154620001429063ca4b208b60e01b906001600160a01b03166200025f565b601462000150838262000383565b5060156200015f828262000383565b50506001601a55506200044f915050565b6001600160a01b03811662000197576040516282b42960e81b815260040160405180910390fd5b620001a483838362000280565b15620001e157604051630330dbc960e11b8152602060048201526007602482015266526f6c65733a3160c81b604482015260640160405180910390fd5b6001600160a01b0381166000818152602085815260408083206001600160e01b03198716808552908352928190208054600160ff1990911681179091558151938452918301939093528183015290517fc8bed56f8e046b5a3f2c2b2be85045ea5c972dc18ad669157957897b4d26e9f79181900360600190a1505050565b6200027c828260006200017060201b62002b75179092919060201c565b5050565b60006001600160a01b038216620002a9576040516282b42960e81b815260040160405180910390fd5b506001600160a01b03166000908152602092835260408082206001600160e01b03199390931682529190925290205460ff1690565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200030957607f821691505b6020821081036200032a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200037e57600081815260208120601f850160051c81016020861015620003595750805b601f850160051c820191505b818110156200037a5782815560010162000365565b5050505b505050565b81516001600160401b038111156200039f576200039f620002de565b620003b781620003b08454620002f4565b8462000330565b602080601f831160018114620003ef5760008415620003d65750858301515b600019600386901b1c1916600185901b1785556200037a565b600085815260208120601f198616915b828110156200042057888601518255948401946001909101908401620003ff565b50858210156200043f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b615549806200045f6000396000f3fe6080604052600436106104ba5760003560e01c806364cb4edb11610279578063a86ff9601161015e578063ce7c2ac2116100d6578063e33b7de31161008a578063ed88c68e1161006f578063ed88c68e14610db3578063f2fde38b14610dbb578063ff70fa4914610ddb576104fa565b8063e33b7de314610d55578063e985e9c514610d6a576104fa565b8063d792d2a0116100bb578063d792d2a014610d0b578063d95ae16214610d20578063de02cde714610d35576104fa565b8063ce7c2ac214610cb5578063d39ce77c14610ceb576104fa565b8063b91d9b8f1161012d578063c8314bc111610112578063c8314bc114610c62578063c87b56dd14610c77578063ca4b208b14610c97576104fa565b8063b91d9b8f14610c2d578063c64cc6b814610c42576104fa565b8063a86ff96014610bce578063ad6d9c1714610be3578063ae47b2da14610bf8578063b88d4fde14610c0d576104fa565b80638da5cb5b116101f1578063a16b3b6a116101c0578063a3f8eace116101a5578063a3f8eace14610b84578063a41c151214610ba4578063a61a496714610bb9576104fa565b8063a16b3b6a14610b4f578063a22cb46514610b64576104fa565b80638da5cb5b14610ad15780639435267614610aef57806395d89b4114610b045780639852595c14610b19576104fa565b80637357e3b81161024857806379ba50971161022d57806379ba509714610a7c57806379f0716e14610a915780638b83209b14610ab1576104fa565b80637357e3b814610a475780637544671614610a67576104fa565b806364cb4edb146109d257806366278a6c146109f257806370a0823114610a12578063715018a614610a32576104fa565b80632ecd28ab1161039f57806342966c68116103175780635ba5e9f0116102e65780635d06c715116102cb5780635d06c7151461097d5780636149d871146109925780636352211e146109b2576104fa565b80635ba5e9f0146109055780635c40f6f41461095d576104fa565b806342966c681461089057806344faded0146108b05780634e71d92d146108d057806355f804b3146108e5576104fa565b80633400ec631161036e5780633a98ef39116103535780633a98ef391461083b5780633e0a322d1461085057806342842e0e14610870576104fa565b80633400ec63146107fb57806338c410b51461081b576104fa565b80632ecd28ab1461078e5780632fbba115146107a657806331e26cfd146107c65780633386cc4e146107db576104fa565b806312065fe01161043257806323b872dd116104015780632a55205a116103e65780632a55205a146107275780632bfcf0f2146107665780632db115441461077b576104fa565b806323b872dd146106e757806328cfbd4614610707576104fa565b806312065fe01461068057806313af40351461069d57806318160ddd146106bd57806318a66a7e146106d2576104fa565b8063081812fc116104895780630c222ee51161046e5780630c222ee5146106205780630f0efdbc1461064057806310ab943214610660576104fa565b8063081812fc146105c8578063095ea7b314610600576104fa565b806301ffc9a71461052f578063034601ec1461056457806306b6f7e91461058657806306fdde03146105a6576104fa565b366104fa57604080513381523460208201527f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77091015b60405180910390a1005b604080513381523460208201527f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77091016104f0565b34801561053b57600080fd5b5061054f61054a3660046149a2565b610dfb565b60405190151581526020015b60405180910390f35b34801561057057600080fd5b5061058461057f366004614ad2565b610ea3565b005b34801561059257600080fd5b506105846105a1366004614b34565b610ec3565b3480156105b257600080fd5b506105bb610efc565b60405161055b9190614bbb565b3480156105d457600080fd5b506105e86105e3366004614b34565b610f8e565b6040516001600160a01b03909116815260200161055b565b34801561060c57600080fd5b5061058461061b366004614bce565b610fb5565b34801561062c57600080fd5b5061058461063b366004614c11565b6110e6565b34801561064c57600080fd5b5061058461065b366004614bce565b611121565b34801561066c57600080fd5b5061054f61067b366004614c3d565b611158565b34801561068c57600080fd5b50475b60405190815260200161055b565b3480156106a957600080fd5b506105846106b8366004614c76565b61116b565b3480156106c957600080fd5b5061068f6111ff565b3480156106de57600080fd5b50610584611223565b3480156106f357600080fd5b50610584610702366004614c93565b61125a565b34801561071357600080fd5b50610584610722366004614d62565b6112e2565b34801561073357600080fd5b50610747610742366004614deb565b611379565b604080516001600160a01b03909316835260208301919091520161055b565b34801561077257600080fd5b506105846113c7565b610584610789366004614b34565b611462565b34801561079a57600080fd5b5060125460ff1661054f565b3480156107b257600080fd5b506105846107c1366004614b34565b61170d565b3480156107d257600080fd5b506105846119bc565b3480156107e757600080fd5b506105846107f6366004614e0d565b611a2e565b34801561080757600080fd5b50610584610816366004614c76565b611d7b565b34801561082757600080fd5b50610584610836366004614e42565b611db1565b34801561084757600080fd5b5060055461068f565b34801561085c57600080fd5b5061058461086b366004614b34565b611eef565b34801561087c57600080fd5b5061058461088b366004614c93565b611f58565b34801561089c57600080fd5b506105846108ab366004614b34565b611f73565b3480156108bc57600080fd5b506105846108cb366004614c3d565b611fda565b3480156108dc57600080fd5b506105846120ed565b3480156108f157600080fd5b50610584610900366004614ea6565b6120f6565b34801561091157600080fd5b5061092c6109203660046149a2565b506303e1469160e61b90565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161055b565b34801561096957600080fd5b50610584610978366004614eeb565b612200565b34801561098957600080fd5b50600b5461068f565b34801561099e57600080fd5b506105846109ad366004614c76565b612236565b3480156109be57600080fd5b506105e86109cd366004614b34565b61228e565b3480156109de57600080fd5b506105846109ed366004614c76565b6122f3565b3480156109fe57600080fd5b50610584610a0d3660046149a2565b612344565b348015610a1e57600080fd5b5061068f610a2d366004614c76565b612376565b348015610a3e57600080fd5b50610584612410565b348015610a5357600080fd5b50610584610a62366004614deb565b612450565b348015610a7357600080fd5b5060035461068f565b348015610a8857600080fd5b50610584612487565b348015610a9d57600080fd5b50610584610aac366004614c76565b61250a565b348015610abd57600080fd5b506105e8610acc366004614b34565b612571565b348015610add57600080fd5b506002546001600160a01b03166105e8565b348015610afb57600080fd5b506105bb6125a1565b348015610b1057600080fd5b506105bb6125b3565b348015610b2557600080fd5b5061068f610b34366004614c76565b6001600160a01b031660009081526008602052604090205490565b348015610b5b57600080fd5b506105846125c2565b348015610b7057600080fd5b50610584610b7f366004614f06565b6125f7565b348015610b9057600080fd5b5061068f610b9f366004614c76565b612602565b348015610bb057600080fd5b50600d5461068f565b348015610bc557600080fd5b5061068f61260d565b348015610bda57600080fd5b50610584612619565b348015610bef57600080fd5b5061058461268b565b348015610c0457600080fd5b506105846126cb565b348015610c1957600080fd5b50610584610c28366004614f32565b612700565b348015610c3957600080fd5b5061068f61278e565b348015610c4e57600080fd5b50610584610c5d366004614f92565b61279a565b348015610c6e57600080fd5b50600c5461068f565b348015610c8357600080fd5b506105bb610c92366004614b34565b6127d1565b348015610ca357600080fd5b506001546001600160a01b03166105e8565b348015610cc157600080fd5b5061068f610cd0366004614c76565b6001600160a01b031660009081526007602052604090205490565b348015610cf757600080fd5b50610584610d06366004614c76565b61289a565b348015610d1757600080fd5b506105bb6128f2565b348015610d2c57600080fd5b50600a5461068f565b348015610d4157600080fd5b50610584610d50366004614c3d565b612904565b348015610d6157600080fd5b5060065461068f565b348015610d7657600080fd5b5061054f610d85366004614fad565b6001600160a01b03918216600090815260196020908152604080832093909416825291909152205460ff1690565b610584612a55565b348015610dc757600080fd5b50610584610dd6366004614c76565b612a90565b348015610de757600080fd5b50610584610df6366004614c76565b612ae1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610e8e57507fffffffff0000000000000000000000000000000000000000000000000000000082167f2b89bcaa00000000000000000000000000000000000000000000000000000000145b80610e9d5750610e9d82612c8e565b92915050565b610ebe838383604051806020016040528060008152506112e2565b505050565b610ed463ca4b208b60e01b33612d71565b610ef0576040516282b42960e81b815260040160405180910390fd5b610ef981612d7e565b50565b606060148054610f0b90614fcb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f3790614fcb565b8015610f845780601f10610f5957610100808354040283529160200191610f84565b820191906000526020600020905b815481529060010190602001808311610f6757829003601f168201915b5050505050905090565b6000610f9982612d89565b506000908152601860205260409020546001600160a01b031690565b6000610fc08261228e565b9050806001600160a01b0316836001600160a01b03160361104e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b038216148061106a575061106a8133610d85565b6110dc5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401611045565b610ebe8383612ded565b6110f7638da5cb5b60e01b33612d71565b611113576040516282b42960e81b815260040160405180910390fd5b61111d8282612e73565b5050565b61113263ca4b208b60e01b33612d71565b61114e576040516282b42960e81b815260040160405180910390fd5b61111d8282612f72565b60006111648383612d71565b9392505050565b61117c638da5cb5b60e01b33612d71565b611198576040516282b42960e81b815260040160405180910390fd5b6111a9638da5cb5b60e01b82612d71565b6111c5576040516282b42960e81b815260040160405180910390fd5b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600061120a60135490565b611214600a613143565b61121e919061504d565b905090565b61123463ca4b208b60e01b33612d71565b611250576040516282b42960e81b815260040160405180910390fd5b611258613150565b565b611265335b826131df565b6112d75760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401611045565b610ebe83838361325d565b815160005b8181101561131c57611314868686848151811061130657611306615060565b6020026020010151866134ab565b6001016112e7565b50836001600160a01b0316856001600160a01b0316336001600160a01b03167f2e75a6cf483a33fd7e40b01fc5b561361f6e9b2d5a492f866bd66ca430a8c5578660405161136a919061508f565b60405180910390a45050505050565b6004546001600160a01b038116906000906103e8906113b49074010000000000000000000000000000000000000000900461ffff16856150d3565b6113be9190615119565b90509250929050565b7fca4b208a000000000000000000000000000000000000000000000000000000006113f28133612d71565b8061140957506114096303e1469160e61b33612d71565b1561144a57336114397fca4b208a0000000000000000000000000000000000000000000000000000000082613534565b61111d63ca4b208b60e01b82613540565b6040516282b42960e81b815260040160405180910390fd5b60125460ff166114b557604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453200000000000000000000000000000000000000000000006044820152606401611045565b6003544210156114fe576003546040517ff3f82ac50000000000000000000000000000000000000000000000000000000081524260048201526024810191909152604401611045565b60035460000361155157604051630330dbc960e11b815260206004820152600560248201527f54433a45310000000000000000000000000000000000000000000000000000006044820152606401611045565b600a54819061156090826150d3565b3410156115b057604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453100000000000000000000000000000000000000000000006044820152606401611045565b6115b861354c565b306001600160a01b031663c8314bc16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a919061512d565b82306001600160a01b031663b91d9b8f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167d919061512d565b6116879190615146565b11156116d657604051630330dbc960e11b815260206004820152600760248201527f4d61696e3a5331000000000000000000000000000000000000000000000000006044820152606401611045565b60005b82811015611702576116f2336116ed6135a5565b6135b1565b6116fa6135cb565b6001016116d9565b5061111d6001601a55565b61171e638da5cb5b60e01b33612d71565b61173a576040516282b42960e81b815260040160405180910390fd5b306001600160a01b031663c8314bc16040518163ffffffff1660e01b8152600401602060405180830381865afa158015611778573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179c919061512d565b81306001600160a01b031663b91d9b8f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ff919061512d565b6118099190615146565b11806118e15750306001600160a01b031663a41c15126040518163ffffffff1660e01b8152600401602060405180830381865afa15801561184e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611872919061512d565b81306001600160a01b031663a61a49676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d5919061512d565b6118df9190615146565b115b1561192f57604051630330dbc960e11b815260206004820152600860248201527f4d61696e3a544d310000000000000000000000000000000000000000000000006044820152606401611045565b60005b8181101561111d576119ac306001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561197b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199f9190615159565b6119a76135a5565b6135d5565b6119b4613786565b600101611932565b7fca4b208a000000000000000000000000000000000000000000000000000000006119e78133612d71565b806119fe57506119fe6303e1469160e61b33612d71565b1561144a573361111d7fca4b208a0000000000000000000000000000000000000000000000000000000082613534565b60125460ff16611a8157604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453200000000000000000000000000000000000000000000006044820152606401611045565b600354421015611aca576003546040517ff3f82ac50000000000000000000000000000000000000000000000000000000081524260048201526024810191909152604401611045565b600354600003611b1d57604051630330dbc960e11b815260206004820152600560248201527f54433a45310000000000000000000000000000000000000000000000000000006044820152606401611045565b611b2561354c565b600060058251611b359190615119565b905080600003611b8857604051630330dbc960e11b815260206004820152600760248201527f4d61696e3a4231000000000000000000000000000000000000000000000000006044820152606401611045565b306001600160a01b031663c8314bc16040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bea919061512d565b81306001600160a01b031663b91d9b8f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4d919061512d565b611c579190615146565b1115611ca657604051630330dbc960e11b815260206004820152600760248201527f4d61696e3a4232000000000000000000000000000000000000000000000000006044820152606401611045565b60005b81811015611ccd57611cbd336116ed6135a5565b611cc56135cb565b600101611ca9565b5060005b611cdc8260056150d3565b811015611d6f57601c5483516001600160a01b03909116906342966c6890859084908110611d0c57611d0c615060565b60200260200101516040518263ffffffff1660e01b8152600401611d3291815260200190565b600060405180830381600087803b158015611d4c57600080fd5b505af1158015611d60573d6000803e3d6000fd5b50505050806001019050611cd1565b5050610ef96001601a55565b611d8c63ca4b208b60e01b33612d71565b611da8576040516282b42960e81b815260040160405180910390fd5b610ef98161379a565b600c54600003611e0457604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453300000000000000000000000000000000000000000000006044820152606401611045565b601254610100900460ff1615611e5d57604051630330dbc960e11b815260206004820152600a60248201527f4c6c616d61733a45343a000000000000000000000000000000000000000000006044820152606401611045565b6000611e69600a613143565b1115611eb857604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453500000000000000000000000000000000000000000000006044820152606401611045565b611ec963ca4b208b60e01b33612d71565b611ee5576040516282b42960e81b815260040160405180910390fd5b61111d8282613940565b611f0063ca4b208b60e01b33612d71565b611f1c576040516282b42960e81b815260040160405180910390fd5b60038190556040518181527fb424002df14aaa31dd51fda00262c997dbceb70dceaaa56cc5ea8f8b3ec1e40b906020015b60405180910390a150565b610ebe83838360405180602001604052806000815250612700565b611f7c3361125f565b611fc957604051630330dbc960e11b815260206004820152600760248201527f4d61696e3a4231000000000000000000000000000000000000000000000000006044820152606401611045565b611fd28161396a565b610ef9613a25565b81611fe58133612d71565b80611ffc5750611ffc6303e1469160e61b33612d71565b1561144a577f35b4df76000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000841601612072576001600160a01b0382163314612072576040516282b42960e81b815260040160405180910390fd5b7f725a34a6000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008416016120e3576001600160a01b03821633146120e3576040516282b42960e81b815260040160405180910390fd5b610ebe8383613534565b61125833613a33565b61210763ca4b208b60e01b33612d71565b612123576040516282b42960e81b815260040160405180910390fd5b6000601b805461213290614fcb565b80601f016020809104026020016040519081016040528092919081815260200182805461215e90614fcb565b80156121ab5780601f10612180576101008083540402835291602001916121ab565b820191906000526020600020905b81548152906001019060200180831161218e57829003601f168201915b5050505050905081601b90816121c191906151c4565b507fd2877107a884510f506ed0bd833e6601f4344691e32a0ce4bcdedb1d9d9d28e181601b6040516121f49291906152a2565b60405180910390a15050565b61221163ca4b208b60e01b33612d71565b61222d576040516282b42960e81b815260040160405180910390fd5b610ef981613b77565b63ca4b208b60e01b6122488133612d71565b8061225f575061225f6303e1469160e61b33612d71565b1561144a5761111d7fca4b208a0000000000000000000000000000000000000000000000000000000083613540565b6000818152601660205260408120546001600160a01b031680610e9d5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401611045565b63ca4b208b60e01b6123058133612d71565b8061231c575061231c6303e1469160e61b33612d71565b1561144a573361233363ca4b208b60e01b84613540565b610ebe63ca4b208b60e01b82613534565b8061234f8133612d71565b8061236657506123666303e1469160e61b33612d71565b1561144a5733610ebe8382613534565b60006001600160a01b0382166123f45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401611045565b506001600160a01b031660009081526017602052604090205490565b638da5cb5b60e01b6124228133612d71565b8061243957506124396303e1469160e61b33612d71565b1561144a573361111d638da5cb5b60e01b82613534565b61246163ca4b208b60e01b33612d71565b61247d576040516282b42960e81b815260040160405180910390fd5b61111d8282613b82565b7f8da5cb5a000000000000000000000000000000000000000000000000000000006124b28133612d71565b806124c957506124c96303e1469160e61b33612d71565b1561144a57336124f97f8da5cb5a0000000000000000000000000000000000000000000000000000000082613534565b61111d638da5cb5b60e01b82613540565b61251b63ca4b208b60e01b33612d71565b612537576040516282b42960e81b815260040160405180910390fd5b601c80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60006009828154811061258657612586615060565b6000918252602090912001546001600160a01b031692915050565b6060600a6005018054610f0b90614fcb565b606060158054610f0b90614fcb565b6125d363ca4b208b60e01b33612d71565b6125ef576040516282b42960e81b815260040160405180910390fd5b611258613bce565b61111d338383613c14565b6000610e9d82613ce2565b600061121e600a613d3d565b7f8da5cb5a000000000000000000000000000000000000000000000000000000006126448133612d71565b8061265b575061265b6303e1469160e61b33612d71565b1561144a573361111d7f8da5cb5a0000000000000000000000000000000000000000000000000000000082613534565b63ca4b208b60e01b61269d8133612d71565b806126b457506126b46303e1469160e61b33612d71565b1561144a573361111d63ca4b208b60e01b82613534565b6126dc638da5cb5b60e01b33612d71565b6126f8576040516282b42960e81b815260040160405180910390fd5b611258613d4a565b61270a33836131df565b61277c5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401611045565b612788848484846134ab565b50505050565b600061121e600a613143565b6127ab638da5cb5b60e01b33612d71565b6127c7576040516282b42960e81b815260040160405180910390fd5b610ef93082612e73565b6000818152601660205260409020546060906001600160a01b0316612808576040516282b42960e81b815260040160405180910390fd5b6000612812613dc6565b60408051808201909152600581527f2e6a736f6e00000000000000000000000000000000000000000000000000000060208201528151919250906128655760405180602001604052806000815250612892565b8161286f85613dd5565b826040516020016128829392919061533d565b6040516020818303038152906040525b949350505050565b638da5cb5b60e01b6128ac8133612d71565b806128c357506128c36303e1469160e61b33612d71565b1561144a5761111d7f8da5cb5a0000000000000000000000000000000000000000000000000000000083613540565b6060600a6004018054610f0b90614fcb565b8161290f8133612d71565b8061292657506129266303e1469160e61b33612d71565b1561144a577f35b4df76000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008416016129bb5761299e7fca4b208a0000000000000000000000000000000000000000000000000000000033612d71565b156129bb576040516282b42960e81b815260040160405180910390fd5b7f725a34a6000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000841601612a4b57612a2e7f8da5cb5a0000000000000000000000000000000000000000000000000000000033612d71565b15612a4b576040516282b42960e81b815260040160405180910390fd5b610ebe8383613540565b604080513381523460208201527f9a064d674ddc42ac41b38566457161f1ded37e65a59162da003dd25bcb057b6091015b60405180910390a1565b638da5cb5b60e01b612aa28133612d71565b80612ab95750612ab96303e1469160e61b33612d71565b1561144a5733612ad0638da5cb5b60e01b84613540565b610ebe638da5cb5b60e01b82613534565b612af263ca4b208b60e01b33612d71565b612b0e576040516282b42960e81b815260040160405180910390fd5b612b1f63ca4b208b60e01b82612d71565b612b3b576040516282b42960e81b815260040160405180910390fd5b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6001600160a01b038116612b9b576040516282b42960e81b815260040160405180910390fd5b612ba6838383613e75565b15612bf457604051630330dbc960e11b815260206004820152600760248201527f526f6c65733a31000000000000000000000000000000000000000000000000006044820152606401611045565b6001600160a01b0381166000818152602085815260408083207fffffffff00000000000000000000000000000000000000000000000000000000871680855290835292819020805460ff19166001908117909155815193845291830193909352918101919091527fc8bed56f8e046b5a3f2c2b2be85045ea5c972dc18ad669157957897b4d26e9f7906060015b60405180910390a1505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480612d2157507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610e9d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610e9d565b6000611164818484613e75565b610ef9600a82613eea565b6000818152601660205260409020546001600160a01b0316610ef95760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401611045565b600081815260186020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091558190612e3a8261228e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6103e88161ffff16101580612e8a575061ffff8116155b15612ed857604051630330dbc960e11b815260206004820152600a60248201527f455243323938313a4531000000000000000000000000000000000000000000006044820152606401611045565b600480546001600160a01b038481167fffffffffffffffffffff00000000000000000000000000000000000000000000909216919091177401000000000000000000000000000000000000000061ffff858116820292909217938490556040805191850490921681529290911660208301527f203bd2fc7b05c6618576f55822ce352bedf94489cdcaa29261b616c03676db8c91016121f4565b6001600160a01b038216612fc957604051630330dbc960e11b815260206004820152600760248201527f505356323a4533000000000000000000000000000000000000000000000000006044820152606401611045565b8060000361301a57604051630330dbc960e11b815260206004820152600760248201527f505356323a4534000000000000000000000000000000000000000000000000006044820152606401611045565b6001600160a01b0382166000908152600760205260409020541561308157604051630330dbc960e11b815260206004820152600760248201527f505356323a4535000000000000000000000000000000000000000000000000006044820152606401611045565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556000908152600760205260409020819055600554613101908290615146565b600555604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac91016121f4565b6000610e9d826006015490565b60095460005b8181101561319e5760006009828154811061317357613173615060565b60009182526020808320909101546001600160a01b0316825260079052604081205550600101613156565b50600560009055600960006131b39190614942565b6040517f3407fd525bf6581e0ae8e3a3636bd90d02112bea34d66802743c28ced73f910e90600090a150565b6000806131eb8361228e565b9050806001600160a01b0316846001600160a01b0316148061323257506001600160a01b0380821660009081526019602090815260408083209388168352929052205460ff165b806128925750836001600160a01b031661324b84610f8e565b6001600160a01b031614949350505050565b826001600160a01b03166132708261228e565b6001600160a01b0316146132ec5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401611045565b6001600160a01b0382166133675760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401611045565b6133748383836001613f25565b826001600160a01b03166133878261228e565b6001600160a01b0316146134035760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401611045565b600081815260186020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081169091556001600160a01b0387811680865260178552838620805460001901905590871680865283862080546001019055868652601690945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6134b684848461325d565b6134c284848484613fad565b6127885760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401611045565b61111d6000838361416c565b61111d60008383612b75565b6002601a540361359e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611045565b6002601a55565b600061121e600a614271565b61111d82826040518060200160405280600081525061429c565b611258600a614325565b6001600160a01b03821661362b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401611045565b6000818152601660205260409020546001600160a01b0316156136905760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401611045565b61369e600083836001613f25565b6000818152601660205260409020546001600160a01b0316156137035760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401611045565b6001600160a01b038216600081815260176020908152604080832080546001019055848352601690915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b613790600a614325565b611258600a614335565b6001600160a01b0381166137f157604051630330dbc960e11b815260206004820152600760248201527f505356323a4533000000000000000000000000000000000000000000000000006044820152606401611045565b60006137fc82614345565b600980549192506000916138129060019061504d565b8154811061382257613822615060565b600091825260209091200154600980546001600160a01b03909216925082918490811061385157613851615060565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600980548061389057613890615380565b60008281526020808220830160001990810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690559092019092556001600160a01b0385168252600790526040812080549190556005546138f590829061504d565b600555604080516001600160a01b0386168152602081018390527f104b8837ec12e86f303ac7ce5e3bf20c6790f843fabd7451943f3390fc8376cb910160405180910390a150505050565b61394b600a8261439f565b613956600a83614473565b613960600a614547565b61111d600a61461a565b60006139758261228e565b9050613985816000846001613f25565b61398e8261228e565b600083815260186020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081169091556001600160a01b0385168085526017845282852080546000190190558785526016909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b611258601380546001019055565b6001600160a01b0381166000908152600760205260408120549003613a9b57604051630330dbc960e11b815260206004820152600760248201527f505356323a4531000000000000000000000000000000000000000000000000006044820152606401611045565b6000613aa682613ce2565b905080600003613af957604051630330dbc960e11b815260206004820152600760248201527f505356323a4532000000000000000000000000000000000000000000000000006044820152606401611045565b8060066000828254613b0b9190615146565b90915550506001600160a01b0382166000908152600860205260409020805482019055613b388282614684565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05691016121f4565b610ef9600a8261479d565b613b8d600a836147e0565b613b98600a82614820565b60408051838152602081018390527fe045fb07ee42693019bf9ec7ad392907bc024ffc77ea53b2c8c14c92338521ef91016121f4565b60095460005b8181101561111d57613c0c60098281548110613bf257613bf2615060565b6000918252602090912001546001600160a01b0316613a33565b600101613bd4565b816001600160a01b0316836001600160a01b031603613c755760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401611045565b6001600160a01b03838116600081815260196020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008060065447613cf39190615146565b6001600160a01b03841660009081526008602090815260408083205460055460079093529220549293509091613d2990846150d3565b613d339190615119565b611164919061504d565b6000610e9d826007015490565b600480547fffffffffffffffffffff000000000000000000000000000000000000000000001690819055604080517401000000000000000000000000000000000000000090920461ffff168252600060208301527f203bd2fc7b05c6618576f55822ce352bedf94489cdcaa29261b616c03676db8c9101612a86565b6060601b8054610f0b90614fcb565b60606000613de283614860565b600101905060008167ffffffffffffffff811115613e0257613e026149d4565b6040519080825280601f01601f191660200182016040528015613e2c576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084613e3657509392505050565b60006001600160a01b038216613e9d576040516282b42960e81b815260040160405180910390fd5b506001600160a01b03166000908152602092835260408082207fffffffff000000000000000000000000000000000000000000000000000000009390931682529190925290205460ff1690565b815481835560408051838152602081018390527f388cba11a61d4b31467a533c88eef75abfb6097ff2ab4652d086560fffcc2f839101612c81565b6001811115612788576001600160a01b03841615613f6b576001600160a01b03841660009081526017602052604081208054839290613f6590849061504d565b90915550505b6001600160a01b03831615612788576001600160a01b03831660009081526017602052604081208054839290613fa2908490615146565b909155505050505050565b60006001600160a01b0384163b15614161576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061400a9033908990889088906004016153af565b6020604051808303816000875af1925050508015614063575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252614060918101906153eb565b60015b614116573d808015614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b50805160000361410e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401611045565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612892565b506001949350505050565b6001600160a01b038116614192576040516282b42960e81b815260040160405180910390fd5b61419d838383613e75565b6141ea57604051630330dbc960e11b815260206004820152600760248201527f526f6c65733a32000000000000000000000000000000000000000000000000006044820152606401611045565b6001600160a01b0381166000818152602085815260408083207fffffffff000000000000000000000000000000000000000000000000000000008716808552908352818420805460ff19169055815190815291820193909352918201527fc8bed56f8e046b5a3f2c2b2be85045ea5c972dc18ad669157957897b4d26e9f790606001612c81565b60008160020154614283836006015490565b83600101546142929190615146565b610e9d9190615408565b6142a683836135d5565b6142b36000848484613fad565b610ebe5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401611045565b610ef98160060180546001019055565b610ef98160070180546001019055565b600954600090815b8181101561439857836001600160a01b03166009828154811061437257614372615060565b6000918252602090912001546001600160a01b031603614390578092505b60010161434d565b5050919050565b60008260050180546143b090614fcb565b80601f01602080910402602001604051908101604052809291908181526020018280546143dc90614fcb565b80156144295780601f106143fe57610100808354040283529160200191614429565b820191906000526020600020905b81548152906001019060200180831161440c57829003601f168201915b505050505090508183600501908161444191906151c4565b507f5769620297eb5047703c0ba55dd28b8ea50ba49818a91a43217fedce8eb69a308282604051612c8192919061541c565b600082600401805461448490614fcb565b80601f01602080910402602001604051908101604052809291908181526020018280546144b090614fcb565b80156144fd5780601f106144d2576101008083540402835291602001916144fd565b820191906000526020600020905b8154815290600101906020018083116144e057829003601f168201915b505050505090508183600401908161451591906151c4565b507f7058c986a2931f38a70c3f70689d1f2bb75efb4d0082511082db4b2d40492b4f8282604051612c8192919061541c565b806002015460000361459c57604051630330dbc960e11b815260206004820152600d60248201527f4c69622d4c6c616d61733a4531000000000000000000000000000000000000006044820152606401611045565b806002015442338360040184600501446040516020016145c09594939291906154bd565b6040516020818303038152906040528051906020012060001c6145e39190615408565b600182018190556040519081527f74d17dde2d5b61215fe87f93cddcd2470527e8b0381734da7d0dfeb3fcf6f81790602001611f4d565b6008810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100908117918290556040517ff409b8c4404a114fa8f045dedf3c882a53c0ad3356d79cdfedcfb5337b72593592611f4d92900460ff161515815260200190565b804710156146d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401611045565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614721576040519150601f19603f3d011682016040523d82523d6000602084013e614726565b606091505b5050905080610ebe5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401611045565b60088201805460ff19168215159081179091556040519081527f285588ea10d23fc295b1451293aa04d9a4898041be76bb15f233fb6825153917906020016121f4565b6002820180549082905560408051838152602081018390527fe26aa1327aec5016c96875498202eebb896e3c2a79cd281ff17ed5bde4e545db9101612c81565b6003820180549082905560408051838152602081018390527fef40c7688f323b7ccad323bec82bfee336d16c0939c46bee1f3e5df296dadde39101612c81565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106148a9577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106148d5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106148f357662386f26fc10000830492506010015b6305f5e100831061490b576305f5e100830492506008015b612710831061491f57612710830492506004015b60648310614931576064830492506002015b600a8310610e9d5760010192915050565b5080546000825590600052602060002090810190610ef991905b80821115614970576000815560010161495c565b5090565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610ef957600080fd5b6000602082840312156149b457600080fd5b813561116481614974565b6001600160a01b0381168114610ef957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614a4a57614a4a6149d4565b604052919050565b600082601f830112614a6357600080fd5b8135602067ffffffffffffffff821115614a7f57614a7f6149d4565b8160051b614a8e828201614a03565b9283528481018201928281019087851115614aa857600080fd5b83870192505b84831015614ac757823582529183019190830190614aae565b979650505050505050565b600080600060608486031215614ae757600080fd5b8335614af2816149bf565b92506020840135614b02816149bf565b9150604084013567ffffffffffffffff811115614b1e57600080fd5b614b2a86828701614a52565b9150509250925092565b600060208284031215614b4657600080fd5b5035919050565b60005b83811015614b68578181015183820152602001614b50565b50506000910152565b60008151808452614b89816020860160208601614b4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006111646020830184614b71565b60008060408385031215614be157600080fd5b8235614bec816149bf565b946020939093013593505050565b803561ffff81168114614c0c57600080fd5b919050565b60008060408385031215614c2457600080fd5b8235614c2f816149bf565b91506113be60208401614bfa565b60008060408385031215614c5057600080fd5b8235614c5b81614974565b91506020830135614c6b816149bf565b809150509250929050565b600060208284031215614c8857600080fd5b8135611164816149bf565b600080600060608486031215614ca857600080fd5b8335614cb3816149bf565b92506020840135614cc3816149bf565b929592945050506040919091013590565b600082601f830112614ce557600080fd5b813567ffffffffffffffff811115614cff57614cff6149d4565b614d3060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614a03565b818152846020838601011115614d4557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215614d7857600080fd5b8435614d83816149bf565b93506020850135614d93816149bf565b9250604085013567ffffffffffffffff80821115614db057600080fd5b614dbc88838901614a52565b93506060870135915080821115614dd257600080fd5b50614ddf87828801614cd4565b91505092959194509250565b60008060408385031215614dfe57600080fd5b50508035926020909101359150565b600060208284031215614e1f57600080fd5b813567ffffffffffffffff811115614e3657600080fd5b61289284828501614a52565b60008060408385031215614e5557600080fd5b823567ffffffffffffffff80821115614e6d57600080fd5b614e7986838701614cd4565b93506020850135915080821115614e8f57600080fd5b50614e9c85828601614cd4565b9150509250929050565b600060208284031215614eb857600080fd5b813567ffffffffffffffff811115614ecf57600080fd5b61289284828501614cd4565b80358015158114614c0c57600080fd5b600060208284031215614efd57600080fd5b61116482614edb565b60008060408385031215614f1957600080fd5b8235614f24816149bf565b91506113be60208401614edb565b60008060008060808587031215614f4857600080fd5b8435614f53816149bf565b93506020850135614f63816149bf565b925060408501359150606085013567ffffffffffffffff811115614f8657600080fd5b614ddf87828801614cd4565b600060208284031215614fa457600080fd5b61116482614bfa565b60008060408385031215614fc057600080fd5b8235614c5b816149bf565b600181811c90821680614fdf57607f821691505b602082108103615018577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610e9d57610e9d61501e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b818110156150c7578351835292840192918401916001016150ab565b50909695505050505050565b8082028115828204841417610e9d57610e9d61501e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615128576151286150ea565b500490565b60006020828403121561513f57600080fd5b5051919050565b80820180821115610e9d57610e9d61501e565b60006020828403121561516b57600080fd5b8151611164816149bf565b601f821115610ebe57600081815260208120601f850160051c8101602086101561519d5750805b601f850160051c820191505b818110156151bc578281556001016151a9565b505050505050565b815167ffffffffffffffff8111156151de576151de6149d4565b6151f2816151ec8454614fcb565b84615176565b602080601f831160018114615227576000841561520f5750858301515b600019600386901b1c1916600185901b1785556151bc565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561527457888601518255948401946001909101908401615255565b50858210156152925787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6040815260006152b56040830185614b71565b602083820381850152600085546152cb81614fcb565b808552600182811680156152e657600181146153005761532e565b60ff198416868801528583151560051b880101945061532e565b896000528560002060005b8481101561532657815489820189015290830190870161530b565b880187019550505b50929998505050505050505050565b6000845161534f818460208901614b4d565b845190830190615363818360208901614b4d565b8451910190615376818360208801614b4d565b0195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006001600160a01b038087168352808616602084015250836040830152608060608301526153e16080830184614b71565b9695505050505050565b6000602082840312156153fd57600080fd5b815161116481614974565b600082615417576154176150ea565b500690565b60408152600061542f6040830185614b71565b82810360208401526154418185614b71565b95945050505050565b6000815461545781614fcb565b6001828116801561546f5760018114615484576154b3565b60ff19841687528215158302870194506154b3565b8560005260208060002060005b858110156154aa5781548a820152908401908201615491565b50505082870194505b5050505092915050565b8581527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008560601b16602082015260006155036154fd603484018761544a565b8561544a565b928352505060200194935050505056fea2646970667358221220ea8ba7a92fdbf2e691ec229b95f59703999bc266e39c2dde68669f416f366b1064736f6c63430008110033
Deployed Bytecode
0x6080604052600436106104ba5760003560e01c806364cb4edb11610279578063a86ff9601161015e578063ce7c2ac2116100d6578063e33b7de31161008a578063ed88c68e1161006f578063ed88c68e14610db3578063f2fde38b14610dbb578063ff70fa4914610ddb576104fa565b8063e33b7de314610d55578063e985e9c514610d6a576104fa565b8063d792d2a0116100bb578063d792d2a014610d0b578063d95ae16214610d20578063de02cde714610d35576104fa565b8063ce7c2ac214610cb5578063d39ce77c14610ceb576104fa565b8063b91d9b8f1161012d578063c8314bc111610112578063c8314bc114610c62578063c87b56dd14610c77578063ca4b208b14610c97576104fa565b8063b91d9b8f14610c2d578063c64cc6b814610c42576104fa565b8063a86ff96014610bce578063ad6d9c1714610be3578063ae47b2da14610bf8578063b88d4fde14610c0d576104fa565b80638da5cb5b116101f1578063a16b3b6a116101c0578063a3f8eace116101a5578063a3f8eace14610b84578063a41c151214610ba4578063a61a496714610bb9576104fa565b8063a16b3b6a14610b4f578063a22cb46514610b64576104fa565b80638da5cb5b14610ad15780639435267614610aef57806395d89b4114610b045780639852595c14610b19576104fa565b80637357e3b81161024857806379ba50971161022d57806379ba509714610a7c57806379f0716e14610a915780638b83209b14610ab1576104fa565b80637357e3b814610a475780637544671614610a67576104fa565b806364cb4edb146109d257806366278a6c146109f257806370a0823114610a12578063715018a614610a32576104fa565b80632ecd28ab1161039f57806342966c68116103175780635ba5e9f0116102e65780635d06c715116102cb5780635d06c7151461097d5780636149d871146109925780636352211e146109b2576104fa565b80635ba5e9f0146109055780635c40f6f41461095d576104fa565b806342966c681461089057806344faded0146108b05780634e71d92d146108d057806355f804b3146108e5576104fa565b80633400ec631161036e5780633a98ef39116103535780633a98ef391461083b5780633e0a322d1461085057806342842e0e14610870576104fa565b80633400ec63146107fb57806338c410b51461081b576104fa565b80632ecd28ab1461078e5780632fbba115146107a657806331e26cfd146107c65780633386cc4e146107db576104fa565b806312065fe01161043257806323b872dd116104015780632a55205a116103e65780632a55205a146107275780632bfcf0f2146107665780632db115441461077b576104fa565b806323b872dd146106e757806328cfbd4614610707576104fa565b806312065fe01461068057806313af40351461069d57806318160ddd146106bd57806318a66a7e146106d2576104fa565b8063081812fc116104895780630c222ee51161046e5780630c222ee5146106205780630f0efdbc1461064057806310ab943214610660576104fa565b8063081812fc146105c8578063095ea7b314610600576104fa565b806301ffc9a71461052f578063034601ec1461056457806306b6f7e91461058657806306fdde03146105a6576104fa565b366104fa57604080513381523460208201527f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77091015b60405180910390a1005b604080513381523460208201527f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77091016104f0565b34801561053b57600080fd5b5061054f61054a3660046149a2565b610dfb565b60405190151581526020015b60405180910390f35b34801561057057600080fd5b5061058461057f366004614ad2565b610ea3565b005b34801561059257600080fd5b506105846105a1366004614b34565b610ec3565b3480156105b257600080fd5b506105bb610efc565b60405161055b9190614bbb565b3480156105d457600080fd5b506105e86105e3366004614b34565b610f8e565b6040516001600160a01b03909116815260200161055b565b34801561060c57600080fd5b5061058461061b366004614bce565b610fb5565b34801561062c57600080fd5b5061058461063b366004614c11565b6110e6565b34801561064c57600080fd5b5061058461065b366004614bce565b611121565b34801561066c57600080fd5b5061054f61067b366004614c3d565b611158565b34801561068c57600080fd5b50475b60405190815260200161055b565b3480156106a957600080fd5b506105846106b8366004614c76565b61116b565b3480156106c957600080fd5b5061068f6111ff565b3480156106de57600080fd5b50610584611223565b3480156106f357600080fd5b50610584610702366004614c93565b61125a565b34801561071357600080fd5b50610584610722366004614d62565b6112e2565b34801561073357600080fd5b50610747610742366004614deb565b611379565b604080516001600160a01b03909316835260208301919091520161055b565b34801561077257600080fd5b506105846113c7565b610584610789366004614b34565b611462565b34801561079a57600080fd5b5060125460ff1661054f565b3480156107b257600080fd5b506105846107c1366004614b34565b61170d565b3480156107d257600080fd5b506105846119bc565b3480156107e757600080fd5b506105846107f6366004614e0d565b611a2e565b34801561080757600080fd5b50610584610816366004614c76565b611d7b565b34801561082757600080fd5b50610584610836366004614e42565b611db1565b34801561084757600080fd5b5060055461068f565b34801561085c57600080fd5b5061058461086b366004614b34565b611eef565b34801561087c57600080fd5b5061058461088b366004614c93565b611f58565b34801561089c57600080fd5b506105846108ab366004614b34565b611f73565b3480156108bc57600080fd5b506105846108cb366004614c3d565b611fda565b3480156108dc57600080fd5b506105846120ed565b3480156108f157600080fd5b50610584610900366004614ea6565b6120f6565b34801561091157600080fd5b5061092c6109203660046149a2565b506303e1469160e61b90565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161055b565b34801561096957600080fd5b50610584610978366004614eeb565b612200565b34801561098957600080fd5b50600b5461068f565b34801561099e57600080fd5b506105846109ad366004614c76565b612236565b3480156109be57600080fd5b506105e86109cd366004614b34565b61228e565b3480156109de57600080fd5b506105846109ed366004614c76565b6122f3565b3480156109fe57600080fd5b50610584610a0d3660046149a2565b612344565b348015610a1e57600080fd5b5061068f610a2d366004614c76565b612376565b348015610a3e57600080fd5b50610584612410565b348015610a5357600080fd5b50610584610a62366004614deb565b612450565b348015610a7357600080fd5b5060035461068f565b348015610a8857600080fd5b50610584612487565b348015610a9d57600080fd5b50610584610aac366004614c76565b61250a565b348015610abd57600080fd5b506105e8610acc366004614b34565b612571565b348015610add57600080fd5b506002546001600160a01b03166105e8565b348015610afb57600080fd5b506105bb6125a1565b348015610b1057600080fd5b506105bb6125b3565b348015610b2557600080fd5b5061068f610b34366004614c76565b6001600160a01b031660009081526008602052604090205490565b348015610b5b57600080fd5b506105846125c2565b348015610b7057600080fd5b50610584610b7f366004614f06565b6125f7565b348015610b9057600080fd5b5061068f610b9f366004614c76565b612602565b348015610bb057600080fd5b50600d5461068f565b348015610bc557600080fd5b5061068f61260d565b348015610bda57600080fd5b50610584612619565b348015610bef57600080fd5b5061058461268b565b348015610c0457600080fd5b506105846126cb565b348015610c1957600080fd5b50610584610c28366004614f32565b612700565b348015610c3957600080fd5b5061068f61278e565b348015610c4e57600080fd5b50610584610c5d366004614f92565b61279a565b348015610c6e57600080fd5b50600c5461068f565b348015610c8357600080fd5b506105bb610c92366004614b34565b6127d1565b348015610ca357600080fd5b506001546001600160a01b03166105e8565b348015610cc157600080fd5b5061068f610cd0366004614c76565b6001600160a01b031660009081526007602052604090205490565b348015610cf757600080fd5b50610584610d06366004614c76565b61289a565b348015610d1757600080fd5b506105bb6128f2565b348015610d2c57600080fd5b50600a5461068f565b348015610d4157600080fd5b50610584610d50366004614c3d565b612904565b348015610d6157600080fd5b5060065461068f565b348015610d7657600080fd5b5061054f610d85366004614fad565b6001600160a01b03918216600090815260196020908152604080832093909416825291909152205460ff1690565b610584612a55565b348015610dc757600080fd5b50610584610dd6366004614c76565b612a90565b348015610de757600080fd5b50610584610df6366004614c76565b612ae1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610e8e57507fffffffff0000000000000000000000000000000000000000000000000000000082167f2b89bcaa00000000000000000000000000000000000000000000000000000000145b80610e9d5750610e9d82612c8e565b92915050565b610ebe838383604051806020016040528060008152506112e2565b505050565b610ed463ca4b208b60e01b33612d71565b610ef0576040516282b42960e81b815260040160405180910390fd5b610ef981612d7e565b50565b606060148054610f0b90614fcb565b80601f0160208091040260200160405190810160405280929190818152602001828054610f3790614fcb565b8015610f845780601f10610f5957610100808354040283529160200191610f84565b820191906000526020600020905b815481529060010190602001808311610f6757829003601f168201915b5050505050905090565b6000610f9982612d89565b506000908152601860205260409020546001600160a01b031690565b6000610fc08261228e565b9050806001600160a01b0316836001600160a01b03160361104e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b038216148061106a575061106a8133610d85565b6110dc5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401611045565b610ebe8383612ded565b6110f7638da5cb5b60e01b33612d71565b611113576040516282b42960e81b815260040160405180910390fd5b61111d8282612e73565b5050565b61113263ca4b208b60e01b33612d71565b61114e576040516282b42960e81b815260040160405180910390fd5b61111d8282612f72565b60006111648383612d71565b9392505050565b61117c638da5cb5b60e01b33612d71565b611198576040516282b42960e81b815260040160405180910390fd5b6111a9638da5cb5b60e01b82612d71565b6111c5576040516282b42960e81b815260040160405180910390fd5b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600061120a60135490565b611214600a613143565b61121e919061504d565b905090565b61123463ca4b208b60e01b33612d71565b611250576040516282b42960e81b815260040160405180910390fd5b611258613150565b565b611265335b826131df565b6112d75760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401611045565b610ebe83838361325d565b815160005b8181101561131c57611314868686848151811061130657611306615060565b6020026020010151866134ab565b6001016112e7565b50836001600160a01b0316856001600160a01b0316336001600160a01b03167f2e75a6cf483a33fd7e40b01fc5b561361f6e9b2d5a492f866bd66ca430a8c5578660405161136a919061508f565b60405180910390a45050505050565b6004546001600160a01b038116906000906103e8906113b49074010000000000000000000000000000000000000000900461ffff16856150d3565b6113be9190615119565b90509250929050565b7fca4b208a000000000000000000000000000000000000000000000000000000006113f28133612d71565b8061140957506114096303e1469160e61b33612d71565b1561144a57336114397fca4b208a0000000000000000000000000000000000000000000000000000000082613534565b61111d63ca4b208b60e01b82613540565b6040516282b42960e81b815260040160405180910390fd5b60125460ff166114b557604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453200000000000000000000000000000000000000000000006044820152606401611045565b6003544210156114fe576003546040517ff3f82ac50000000000000000000000000000000000000000000000000000000081524260048201526024810191909152604401611045565b60035460000361155157604051630330dbc960e11b815260206004820152600560248201527f54433a45310000000000000000000000000000000000000000000000000000006044820152606401611045565b600a54819061156090826150d3565b3410156115b057604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453100000000000000000000000000000000000000000000006044820152606401611045565b6115b861354c565b306001600160a01b031663c8314bc16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a919061512d565b82306001600160a01b031663b91d9b8f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167d919061512d565b6116879190615146565b11156116d657604051630330dbc960e11b815260206004820152600760248201527f4d61696e3a5331000000000000000000000000000000000000000000000000006044820152606401611045565b60005b82811015611702576116f2336116ed6135a5565b6135b1565b6116fa6135cb565b6001016116d9565b5061111d6001601a55565b61171e638da5cb5b60e01b33612d71565b61173a576040516282b42960e81b815260040160405180910390fd5b306001600160a01b031663c8314bc16040518163ffffffff1660e01b8152600401602060405180830381865afa158015611778573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179c919061512d565b81306001600160a01b031663b91d9b8f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ff919061512d565b6118099190615146565b11806118e15750306001600160a01b031663a41c15126040518163ffffffff1660e01b8152600401602060405180830381865afa15801561184e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611872919061512d565b81306001600160a01b031663a61a49676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d5919061512d565b6118df9190615146565b115b1561192f57604051630330dbc960e11b815260206004820152600860248201527f4d61696e3a544d310000000000000000000000000000000000000000000000006044820152606401611045565b60005b8181101561111d576119ac306001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561197b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199f9190615159565b6119a76135a5565b6135d5565b6119b4613786565b600101611932565b7fca4b208a000000000000000000000000000000000000000000000000000000006119e78133612d71565b806119fe57506119fe6303e1469160e61b33612d71565b1561144a573361111d7fca4b208a0000000000000000000000000000000000000000000000000000000082613534565b60125460ff16611a8157604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453200000000000000000000000000000000000000000000006044820152606401611045565b600354421015611aca576003546040517ff3f82ac50000000000000000000000000000000000000000000000000000000081524260048201526024810191909152604401611045565b600354600003611b1d57604051630330dbc960e11b815260206004820152600560248201527f54433a45310000000000000000000000000000000000000000000000000000006044820152606401611045565b611b2561354c565b600060058251611b359190615119565b905080600003611b8857604051630330dbc960e11b815260206004820152600760248201527f4d61696e3a4231000000000000000000000000000000000000000000000000006044820152606401611045565b306001600160a01b031663c8314bc16040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bea919061512d565b81306001600160a01b031663b91d9b8f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4d919061512d565b611c579190615146565b1115611ca657604051630330dbc960e11b815260206004820152600760248201527f4d61696e3a4232000000000000000000000000000000000000000000000000006044820152606401611045565b60005b81811015611ccd57611cbd336116ed6135a5565b611cc56135cb565b600101611ca9565b5060005b611cdc8260056150d3565b811015611d6f57601c5483516001600160a01b03909116906342966c6890859084908110611d0c57611d0c615060565b60200260200101516040518263ffffffff1660e01b8152600401611d3291815260200190565b600060405180830381600087803b158015611d4c57600080fd5b505af1158015611d60573d6000803e3d6000fd5b50505050806001019050611cd1565b5050610ef96001601a55565b611d8c63ca4b208b60e01b33612d71565b611da8576040516282b42960e81b815260040160405180910390fd5b610ef98161379a565b600c54600003611e0457604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453300000000000000000000000000000000000000000000006044820152606401611045565b601254610100900460ff1615611e5d57604051630330dbc960e11b815260206004820152600a60248201527f4c6c616d61733a45343a000000000000000000000000000000000000000000006044820152606401611045565b6000611e69600a613143565b1115611eb857604051630330dbc960e11b815260206004820152600960248201527f4c6c616d61733a453500000000000000000000000000000000000000000000006044820152606401611045565b611ec963ca4b208b60e01b33612d71565b611ee5576040516282b42960e81b815260040160405180910390fd5b61111d8282613940565b611f0063ca4b208b60e01b33612d71565b611f1c576040516282b42960e81b815260040160405180910390fd5b60038190556040518181527fb424002df14aaa31dd51fda00262c997dbceb70dceaaa56cc5ea8f8b3ec1e40b906020015b60405180910390a150565b610ebe83838360405180602001604052806000815250612700565b611f7c3361125f565b611fc957604051630330dbc960e11b815260206004820152600760248201527f4d61696e3a4231000000000000000000000000000000000000000000000000006044820152606401611045565b611fd28161396a565b610ef9613a25565b81611fe58133612d71565b80611ffc5750611ffc6303e1469160e61b33612d71565b1561144a577f35b4df76000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000841601612072576001600160a01b0382163314612072576040516282b42960e81b815260040160405180910390fd5b7f725a34a6000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008416016120e3576001600160a01b03821633146120e3576040516282b42960e81b815260040160405180910390fd5b610ebe8383613534565b61125833613a33565b61210763ca4b208b60e01b33612d71565b612123576040516282b42960e81b815260040160405180910390fd5b6000601b805461213290614fcb565b80601f016020809104026020016040519081016040528092919081815260200182805461215e90614fcb565b80156121ab5780601f10612180576101008083540402835291602001916121ab565b820191906000526020600020905b81548152906001019060200180831161218e57829003601f168201915b5050505050905081601b90816121c191906151c4565b507fd2877107a884510f506ed0bd833e6601f4344691e32a0ce4bcdedb1d9d9d28e181601b6040516121f49291906152a2565b60405180910390a15050565b61221163ca4b208b60e01b33612d71565b61222d576040516282b42960e81b815260040160405180910390fd5b610ef981613b77565b63ca4b208b60e01b6122488133612d71565b8061225f575061225f6303e1469160e61b33612d71565b1561144a5761111d7fca4b208a0000000000000000000000000000000000000000000000000000000083613540565b6000818152601660205260408120546001600160a01b031680610e9d5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401611045565b63ca4b208b60e01b6123058133612d71565b8061231c575061231c6303e1469160e61b33612d71565b1561144a573361233363ca4b208b60e01b84613540565b610ebe63ca4b208b60e01b82613534565b8061234f8133612d71565b8061236657506123666303e1469160e61b33612d71565b1561144a5733610ebe8382613534565b60006001600160a01b0382166123f45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401611045565b506001600160a01b031660009081526017602052604090205490565b638da5cb5b60e01b6124228133612d71565b8061243957506124396303e1469160e61b33612d71565b1561144a573361111d638da5cb5b60e01b82613534565b61246163ca4b208b60e01b33612d71565b61247d576040516282b42960e81b815260040160405180910390fd5b61111d8282613b82565b7f8da5cb5a000000000000000000000000000000000000000000000000000000006124b28133612d71565b806124c957506124c96303e1469160e61b33612d71565b1561144a57336124f97f8da5cb5a0000000000000000000000000000000000000000000000000000000082613534565b61111d638da5cb5b60e01b82613540565b61251b63ca4b208b60e01b33612d71565b612537576040516282b42960e81b815260040160405180910390fd5b601c80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60006009828154811061258657612586615060565b6000918252602090912001546001600160a01b031692915050565b6060600a6005018054610f0b90614fcb565b606060158054610f0b90614fcb565b6125d363ca4b208b60e01b33612d71565b6125ef576040516282b42960e81b815260040160405180910390fd5b611258613bce565b61111d338383613c14565b6000610e9d82613ce2565b600061121e600a613d3d565b7f8da5cb5a000000000000000000000000000000000000000000000000000000006126448133612d71565b8061265b575061265b6303e1469160e61b33612d71565b1561144a573361111d7f8da5cb5a0000000000000000000000000000000000000000000000000000000082613534565b63ca4b208b60e01b61269d8133612d71565b806126b457506126b46303e1469160e61b33612d71565b1561144a573361111d63ca4b208b60e01b82613534565b6126dc638da5cb5b60e01b33612d71565b6126f8576040516282b42960e81b815260040160405180910390fd5b611258613d4a565b61270a33836131df565b61277c5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401611045565b612788848484846134ab565b50505050565b600061121e600a613143565b6127ab638da5cb5b60e01b33612d71565b6127c7576040516282b42960e81b815260040160405180910390fd5b610ef93082612e73565b6000818152601660205260409020546060906001600160a01b0316612808576040516282b42960e81b815260040160405180910390fd5b6000612812613dc6565b60408051808201909152600581527f2e6a736f6e00000000000000000000000000000000000000000000000000000060208201528151919250906128655760405180602001604052806000815250612892565b8161286f85613dd5565b826040516020016128829392919061533d565b6040516020818303038152906040525b949350505050565b638da5cb5b60e01b6128ac8133612d71565b806128c357506128c36303e1469160e61b33612d71565b1561144a5761111d7f8da5cb5a0000000000000000000000000000000000000000000000000000000083613540565b6060600a6004018054610f0b90614fcb565b8161290f8133612d71565b8061292657506129266303e1469160e61b33612d71565b1561144a577f35b4df76000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008416016129bb5761299e7fca4b208a0000000000000000000000000000000000000000000000000000000033612d71565b156129bb576040516282b42960e81b815260040160405180910390fd5b7f725a34a6000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000841601612a4b57612a2e7f8da5cb5a0000000000000000000000000000000000000000000000000000000033612d71565b15612a4b576040516282b42960e81b815260040160405180910390fd5b610ebe8383613540565b604080513381523460208201527f9a064d674ddc42ac41b38566457161f1ded37e65a59162da003dd25bcb057b6091015b60405180910390a1565b638da5cb5b60e01b612aa28133612d71565b80612ab95750612ab96303e1469160e61b33612d71565b1561144a5733612ad0638da5cb5b60e01b84613540565b610ebe638da5cb5b60e01b82613534565b612af263ca4b208b60e01b33612d71565b612b0e576040516282b42960e81b815260040160405180910390fd5b612b1f63ca4b208b60e01b82612d71565b612b3b576040516282b42960e81b815260040160405180910390fd5b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6001600160a01b038116612b9b576040516282b42960e81b815260040160405180910390fd5b612ba6838383613e75565b15612bf457604051630330dbc960e11b815260206004820152600760248201527f526f6c65733a31000000000000000000000000000000000000000000000000006044820152606401611045565b6001600160a01b0381166000818152602085815260408083207fffffffff00000000000000000000000000000000000000000000000000000000871680855290835292819020805460ff19166001908117909155815193845291830193909352918101919091527fc8bed56f8e046b5a3f2c2b2be85045ea5c972dc18ad669157957897b4d26e9f7906060015b60405180910390a1505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480612d2157507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610e9d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610e9d565b6000611164818484613e75565b610ef9600a82613eea565b6000818152601660205260409020546001600160a01b0316610ef95760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401611045565b600081815260186020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091558190612e3a8261228e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6103e88161ffff16101580612e8a575061ffff8116155b15612ed857604051630330dbc960e11b815260206004820152600a60248201527f455243323938313a4531000000000000000000000000000000000000000000006044820152606401611045565b600480546001600160a01b038481167fffffffffffffffffffff00000000000000000000000000000000000000000000909216919091177401000000000000000000000000000000000000000061ffff858116820292909217938490556040805191850490921681529290911660208301527f203bd2fc7b05c6618576f55822ce352bedf94489cdcaa29261b616c03676db8c91016121f4565b6001600160a01b038216612fc957604051630330dbc960e11b815260206004820152600760248201527f505356323a4533000000000000000000000000000000000000000000000000006044820152606401611045565b8060000361301a57604051630330dbc960e11b815260206004820152600760248201527f505356323a4534000000000000000000000000000000000000000000000000006044820152606401611045565b6001600160a01b0382166000908152600760205260409020541561308157604051630330dbc960e11b815260206004820152600760248201527f505356323a4535000000000000000000000000000000000000000000000000006044820152606401611045565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556000908152600760205260409020819055600554613101908290615146565b600555604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac91016121f4565b6000610e9d826006015490565b60095460005b8181101561319e5760006009828154811061317357613173615060565b60009182526020808320909101546001600160a01b0316825260079052604081205550600101613156565b50600560009055600960006131b39190614942565b6040517f3407fd525bf6581e0ae8e3a3636bd90d02112bea34d66802743c28ced73f910e90600090a150565b6000806131eb8361228e565b9050806001600160a01b0316846001600160a01b0316148061323257506001600160a01b0380821660009081526019602090815260408083209388168352929052205460ff165b806128925750836001600160a01b031661324b84610f8e565b6001600160a01b031614949350505050565b826001600160a01b03166132708261228e565b6001600160a01b0316146132ec5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401611045565b6001600160a01b0382166133675760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401611045565b6133748383836001613f25565b826001600160a01b03166133878261228e565b6001600160a01b0316146134035760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401611045565b600081815260186020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081169091556001600160a01b0387811680865260178552838620805460001901905590871680865283862080546001019055868652601690945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6134b684848461325d565b6134c284848484613fad565b6127885760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401611045565b61111d6000838361416c565b61111d60008383612b75565b6002601a540361359e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611045565b6002601a55565b600061121e600a614271565b61111d82826040518060200160405280600081525061429c565b611258600a614325565b6001600160a01b03821661362b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401611045565b6000818152601660205260409020546001600160a01b0316156136905760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401611045565b61369e600083836001613f25565b6000818152601660205260409020546001600160a01b0316156137035760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401611045565b6001600160a01b038216600081815260176020908152604080832080546001019055848352601690915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b613790600a614325565b611258600a614335565b6001600160a01b0381166137f157604051630330dbc960e11b815260206004820152600760248201527f505356323a4533000000000000000000000000000000000000000000000000006044820152606401611045565b60006137fc82614345565b600980549192506000916138129060019061504d565b8154811061382257613822615060565b600091825260209091200154600980546001600160a01b03909216925082918490811061385157613851615060565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600980548061389057613890615380565b60008281526020808220830160001990810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690559092019092556001600160a01b0385168252600790526040812080549190556005546138f590829061504d565b600555604080516001600160a01b0386168152602081018390527f104b8837ec12e86f303ac7ce5e3bf20c6790f843fabd7451943f3390fc8376cb910160405180910390a150505050565b61394b600a8261439f565b613956600a83614473565b613960600a614547565b61111d600a61461a565b60006139758261228e565b9050613985816000846001613f25565b61398e8261228e565b600083815260186020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081169091556001600160a01b0385168085526017845282852080546000190190558785526016909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b611258601380546001019055565b6001600160a01b0381166000908152600760205260408120549003613a9b57604051630330dbc960e11b815260206004820152600760248201527f505356323a4531000000000000000000000000000000000000000000000000006044820152606401611045565b6000613aa682613ce2565b905080600003613af957604051630330dbc960e11b815260206004820152600760248201527f505356323a4532000000000000000000000000000000000000000000000000006044820152606401611045565b8060066000828254613b0b9190615146565b90915550506001600160a01b0382166000908152600860205260409020805482019055613b388282614684565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05691016121f4565b610ef9600a8261479d565b613b8d600a836147e0565b613b98600a82614820565b60408051838152602081018390527fe045fb07ee42693019bf9ec7ad392907bc024ffc77ea53b2c8c14c92338521ef91016121f4565b60095460005b8181101561111d57613c0c60098281548110613bf257613bf2615060565b6000918252602090912001546001600160a01b0316613a33565b600101613bd4565b816001600160a01b0316836001600160a01b031603613c755760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401611045565b6001600160a01b03838116600081815260196020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008060065447613cf39190615146565b6001600160a01b03841660009081526008602090815260408083205460055460079093529220549293509091613d2990846150d3565b613d339190615119565b611164919061504d565b6000610e9d826007015490565b600480547fffffffffffffffffffff000000000000000000000000000000000000000000001690819055604080517401000000000000000000000000000000000000000090920461ffff168252600060208301527f203bd2fc7b05c6618576f55822ce352bedf94489cdcaa29261b616c03676db8c9101612a86565b6060601b8054610f0b90614fcb565b60606000613de283614860565b600101905060008167ffffffffffffffff811115613e0257613e026149d4565b6040519080825280601f01601f191660200182016040528015613e2c576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084613e3657509392505050565b60006001600160a01b038216613e9d576040516282b42960e81b815260040160405180910390fd5b506001600160a01b03166000908152602092835260408082207fffffffff000000000000000000000000000000000000000000000000000000009390931682529190925290205460ff1690565b815481835560408051838152602081018390527f388cba11a61d4b31467a533c88eef75abfb6097ff2ab4652d086560fffcc2f839101612c81565b6001811115612788576001600160a01b03841615613f6b576001600160a01b03841660009081526017602052604081208054839290613f6590849061504d565b90915550505b6001600160a01b03831615612788576001600160a01b03831660009081526017602052604081208054839290613fa2908490615146565b909155505050505050565b60006001600160a01b0384163b15614161576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061400a9033908990889088906004016153af565b6020604051808303816000875af1925050508015614063575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252614060918101906153eb565b60015b614116573d808015614091576040519150601f19603f3d011682016040523d82523d6000602084013e614096565b606091505b50805160000361410e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401611045565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612892565b506001949350505050565b6001600160a01b038116614192576040516282b42960e81b815260040160405180910390fd5b61419d838383613e75565b6141ea57604051630330dbc960e11b815260206004820152600760248201527f526f6c65733a32000000000000000000000000000000000000000000000000006044820152606401611045565b6001600160a01b0381166000818152602085815260408083207fffffffff000000000000000000000000000000000000000000000000000000008716808552908352818420805460ff19169055815190815291820193909352918201527fc8bed56f8e046b5a3f2c2b2be85045ea5c972dc18ad669157957897b4d26e9f790606001612c81565b60008160020154614283836006015490565b83600101546142929190615146565b610e9d9190615408565b6142a683836135d5565b6142b36000848484613fad565b610ebe5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401611045565b610ef98160060180546001019055565b610ef98160070180546001019055565b600954600090815b8181101561439857836001600160a01b03166009828154811061437257614372615060565b6000918252602090912001546001600160a01b031603614390578092505b60010161434d565b5050919050565b60008260050180546143b090614fcb565b80601f01602080910402602001604051908101604052809291908181526020018280546143dc90614fcb565b80156144295780601f106143fe57610100808354040283529160200191614429565b820191906000526020600020905b81548152906001019060200180831161440c57829003601f168201915b505050505090508183600501908161444191906151c4565b507f5769620297eb5047703c0ba55dd28b8ea50ba49818a91a43217fedce8eb69a308282604051612c8192919061541c565b600082600401805461448490614fcb565b80601f01602080910402602001604051908101604052809291908181526020018280546144b090614fcb565b80156144fd5780601f106144d2576101008083540402835291602001916144fd565b820191906000526020600020905b8154815290600101906020018083116144e057829003601f168201915b505050505090508183600401908161451591906151c4565b507f7058c986a2931f38a70c3f70689d1f2bb75efb4d0082511082db4b2d40492b4f8282604051612c8192919061541c565b806002015460000361459c57604051630330dbc960e11b815260206004820152600d60248201527f4c69622d4c6c616d61733a4531000000000000000000000000000000000000006044820152606401611045565b806002015442338360040184600501446040516020016145c09594939291906154bd565b6040516020818303038152906040528051906020012060001c6145e39190615408565b600182018190556040519081527f74d17dde2d5b61215fe87f93cddcd2470527e8b0381734da7d0dfeb3fcf6f81790602001611f4d565b6008810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100908117918290556040517ff409b8c4404a114fa8f045dedf3c882a53c0ad3356d79cdfedcfb5337b72593592611f4d92900460ff161515815260200190565b804710156146d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401611045565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614721576040519150601f19603f3d011682016040523d82523d6000602084013e614726565b606091505b5050905080610ebe5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401611045565b60088201805460ff19168215159081179091556040519081527f285588ea10d23fc295b1451293aa04d9a4898041be76bb15f233fb6825153917906020016121f4565b6002820180549082905560408051838152602081018390527fe26aa1327aec5016c96875498202eebb896e3c2a79cd281ff17ed5bde4e545db9101612c81565b6003820180549082905560408051838152602081018390527fef40c7688f323b7ccad323bec82bfee336d16c0939c46bee1f3e5df296dadde39101612c81565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106148a9577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106148d5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106148f357662386f26fc10000830492506010015b6305f5e100831061490b576305f5e100830492506008015b612710831061491f57612710830492506004015b60648310614931576064830492506002015b600a8310610e9d5760010192915050565b5080546000825590600052602060002090810190610ef991905b80821115614970576000815560010161495c565b5090565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610ef957600080fd5b6000602082840312156149b457600080fd5b813561116481614974565b6001600160a01b0381168114610ef957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614a4a57614a4a6149d4565b604052919050565b600082601f830112614a6357600080fd5b8135602067ffffffffffffffff821115614a7f57614a7f6149d4565b8160051b614a8e828201614a03565b9283528481018201928281019087851115614aa857600080fd5b83870192505b84831015614ac757823582529183019190830190614aae565b979650505050505050565b600080600060608486031215614ae757600080fd5b8335614af2816149bf565b92506020840135614b02816149bf565b9150604084013567ffffffffffffffff811115614b1e57600080fd5b614b2a86828701614a52565b9150509250925092565b600060208284031215614b4657600080fd5b5035919050565b60005b83811015614b68578181015183820152602001614b50565b50506000910152565b60008151808452614b89816020860160208601614b4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006111646020830184614b71565b60008060408385031215614be157600080fd5b8235614bec816149bf565b946020939093013593505050565b803561ffff81168114614c0c57600080fd5b919050565b60008060408385031215614c2457600080fd5b8235614c2f816149bf565b91506113be60208401614bfa565b60008060408385031215614c5057600080fd5b8235614c5b81614974565b91506020830135614c6b816149bf565b809150509250929050565b600060208284031215614c8857600080fd5b8135611164816149bf565b600080600060608486031215614ca857600080fd5b8335614cb3816149bf565b92506020840135614cc3816149bf565b929592945050506040919091013590565b600082601f830112614ce557600080fd5b813567ffffffffffffffff811115614cff57614cff6149d4565b614d3060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614a03565b818152846020838601011115614d4557600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215614d7857600080fd5b8435614d83816149bf565b93506020850135614d93816149bf565b9250604085013567ffffffffffffffff80821115614db057600080fd5b614dbc88838901614a52565b93506060870135915080821115614dd257600080fd5b50614ddf87828801614cd4565b91505092959194509250565b60008060408385031215614dfe57600080fd5b50508035926020909101359150565b600060208284031215614e1f57600080fd5b813567ffffffffffffffff811115614e3657600080fd5b61289284828501614a52565b60008060408385031215614e5557600080fd5b823567ffffffffffffffff80821115614e6d57600080fd5b614e7986838701614cd4565b93506020850135915080821115614e8f57600080fd5b50614e9c85828601614cd4565b9150509250929050565b600060208284031215614eb857600080fd5b813567ffffffffffffffff811115614ecf57600080fd5b61289284828501614cd4565b80358015158114614c0c57600080fd5b600060208284031215614efd57600080fd5b61116482614edb565b60008060408385031215614f1957600080fd5b8235614f24816149bf565b91506113be60208401614edb565b60008060008060808587031215614f4857600080fd5b8435614f53816149bf565b93506020850135614f63816149bf565b925060408501359150606085013567ffffffffffffffff811115614f8657600080fd5b614ddf87828801614cd4565b600060208284031215614fa457600080fd5b61116482614bfa565b60008060408385031215614fc057600080fd5b8235614c5b816149bf565b600181811c90821680614fdf57607f821691505b602082108103615018577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610e9d57610e9d61501e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b818110156150c7578351835292840192918401916001016150ab565b50909695505050505050565b8082028115828204841417610e9d57610e9d61501e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615128576151286150ea565b500490565b60006020828403121561513f57600080fd5b5051919050565b80820180821115610e9d57610e9d61501e565b60006020828403121561516b57600080fd5b8151611164816149bf565b601f821115610ebe57600081815260208120601f850160051c8101602086101561519d5750805b601f850160051c820191505b818110156151bc578281556001016151a9565b505050505050565b815167ffffffffffffffff8111156151de576151de6149d4565b6151f2816151ec8454614fcb565b84615176565b602080601f831160018114615227576000841561520f5750858301515b600019600386901b1c1916600185901b1785556151bc565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561527457888601518255948401946001909101908401615255565b50858210156152925787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6040815260006152b56040830185614b71565b602083820381850152600085546152cb81614fcb565b808552600182811680156152e657600181146153005761532e565b60ff198416868801528583151560051b880101945061532e565b896000528560002060005b8481101561532657815489820189015290830190870161530b565b880187019550505b50929998505050505050505050565b6000845161534f818460208901614b4d565b845190830190615363818360208901614b4d565b8451910190615376818360208801614b4d565b0195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006001600160a01b038087168352808616602084015250836040830152608060608301526153e16080830184614b71565b9695505050505050565b6000602082840312156153fd57600080fd5b815161116481614974565b600082615417576154176150ea565b500690565b60408152600061542f6040830185614b71565b82810360208401526154418185614b71565b95945050505050565b6000815461545781614fcb565b6001828116801561546f5760018114615484576154b3565b60ff19841687528215158302870194506154b3565b8560005260208060002060005b858110156154aa5781548a820152908401908201615491565b50505082870194505b5050505092915050565b8581527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008560601b16602082015260006155036154fd603484018761544a565b8561544a565b928352505060200194935050505056fea2646970667358221220ea8ba7a92fdbf2e691ec229b95f59703999bc266e39c2dde68669f416f366b1064736f6c63430008110033
Loading...
Loading
Loading...
Loading
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.