Source Code
Overview
POL Balance
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 3,729 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Book Rooms | 18140635 | 10 hrs ago | IN | 0 POL | 0.03686572 | ||||
Book Rooms | 18128037 | 18 hrs ago | IN | 0 POL | 0.01466218 | ||||
Book Rooms | 18120964 | 22 hrs ago | IN | 0 POL | 0.01244002 | ||||
Book Rooms | 18120904 | 22 hrs ago | IN | 0 POL | 0.01244002 | ||||
Book Rooms | 18114513 | 26 hrs ago | IN | 0 POL | 0.01709376 | ||||
Book Rooms | 18086783 | 43 hrs ago | IN | 0 POL | 0.01426877 | ||||
Book Rooms | 18085182 | 44 hrs ago | IN | 0 POL | 0.01145263 | ||||
Book Rooms | 18079751 | 47 hrs ago | IN | 0 POL | 0.01201936 | ||||
Book Rooms | 18071297 | 2 days ago | IN | 0 POL | 0.01140141 | ||||
Book Rooms | 18069712 | 2 days ago | IN | 0 POL | 0.01696986 | ||||
Book Rooms | 18053425 | 2 days ago | IN | 0 POL | 0.02008672 | ||||
Book Rooms | 18035484 | 3 days ago | IN | 0 POL | 0.0164067 | ||||
Book Rooms | 18027109 | 3 days ago | IN | 0 POL | 0.01320622 | ||||
Book Rooms | 18012497 | 3 days ago | IN | 0 POL | 0.01271297 | ||||
Book Rooms | 17998639 | 4 days ago | IN | 0 POL | 0.01599139 | ||||
Book Rooms | 17995857 | 4 days ago | IN | 0 POL | 0.01918967 | ||||
Book Rooms | 17991911 | 4 days ago | IN | 0 POL | 0.01750722 | ||||
Book Rooms | 17980040 | 4 days ago | IN | 0 POL | 0.01313867 | ||||
Book Rooms | 17979298 | 4 days ago | IN | 0 POL | 0.01227386 | ||||
Book Rooms | 17969992 | 4 days ago | IN | 0 POL | 0.01201936 | ||||
Book Rooms | 17959965 | 5 days ago | IN | 0 POL | 0.01862289 | ||||
Book Rooms | 17958298 | 5 days ago | IN | 0 POL | 0.01862289 | ||||
Book Rooms | 17928798 | 5 days ago | IN | 0 POL | 0.02280354 | ||||
Book Rooms | 17922917 | 5 days ago | IN | 0 POL | 0.01900295 | ||||
Book Rooms | 17921980 | 5 days ago | IN | 0 POL | 0.02280282 |
Loading...
Loading
Contract Name:
BukProtocol
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity =0.8.19; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import { IBukPOSNFTs } from "../BukPOSNFTs/IBukPOSNFTs.sol"; import { IBukNFTs } from "../BukNFTs/IBukNFTs.sol"; import { IBukTreasury } from "../BukTreasury/IBukTreasury.sol"; import { ISignatureVerifier } from "../SignatureVerifier/ISignatureVerifier.sol"; import { IBukRoyalties } from "../BukRoyalties/IBukRoyalties.sol"; import { IBukProtocol } from "../BukProtocol/IBukProtocol.sol"; /** * @title BUK Protocol Contract * @author BUK Technology Inc * @dev Contract to manage operations of the BUK protocol to manage BukNFTs tokens and underlying sub-contracts. */ contract BukProtocol is ReentrancyGuard, IBukProtocol, Pausable { // Using safeERC20 using SafeERC20 for IERC20; /** * @dev address _bukWallet Address of the Buk wallet. * @dev address _stableToken Address of the stable token. * @dev address _bukTreasury Address of the Buk treasury contract. * @dev address nftContract Address of the Buk NFT contract. * @dev address nftPOSContract Address of the Buk NFT POS Contract. * @dev address royaltiesContract Address of the Buk Royalties Contract. */ address private _admin; address private _bukWallet; IERC20 private _stableToken; IBukTreasury private _bukTreasury; ISignatureVerifier private _signatureVerifier; IBukNFTs private _nftContract; IBukPOSNFTs private _nftPOSContract; IBukRoyalties private _royaltiesContract; /// @dev Commission charged on bookings. uint256 public commission = 5; /// @dev Counters.Counter bookingIds Counter for booking IDs. uint256 private _bookingIds; /// @dev Max booking limit per transaction. uint256 public constant MAX_BOOKING_LIMIT = 11; /** * @dev mapping(uint256 => Booking) _bookingDetails Mapping of booking IDs to booking details. */ mapping(uint256 => Booking) private _bookingDetails; //bookingID -> Booking Details /** * @dev Modifier onlyAdmin * Ensures that the function can only be accessed by the admin. * Throws an exception with a custom error message if the calling address is not the admin. */ modifier onlyAdmin() { require( (msg.sender == _admin), "Only admin has access to this function" ); _; } /** * @dev Constructor to initialize the contract * @param _bukTreasuryContract Address of the treasury. * @param _stableTokenAddr Address of the stable token. * @param _bukWalletAddr Address of the Buk wallet. * @param _signVerifierContract Address of the signature verifier contract. * @param _royaltiesContractAddr Address of the Buk royalties contract. */ constructor( address _bukTreasuryContract, address _stableTokenAddr, address _bukWalletAddr, address _signVerifierContract, address _royaltiesContractAddr ) { _setRoyaltiesContract(_royaltiesContractAddr); _setAdmin(msg.sender); _setBukTreasury(_bukTreasuryContract); _setStableToken(_stableTokenAddr); _setBukWallet(_bukWalletAddr); _setSignatureVerifier(_signVerifierContract); } /// @dev See {IBukProtocol-setAdmin}. function setAdmin(address _adminAddr) external onlyAdmin { _setAdmin(_adminAddr); } /// @dev See {IBukProtocol-setSignatureVerifier}. function setSignatureVerifier( address __signatureVerifier ) external onlyAdmin { _setSignatureVerifier(__signatureVerifier); } /// @dev See {IBukProtocol-setBukTreasury}. function setBukTreasury(address _bukTreasuryContract) external onlyAdmin { _setBukTreasury(_bukTreasuryContract); } /// @dev See {IBukProtocol-setBukWallet}. function setBukWallet(address _bukWalletAddr) external onlyAdmin { _setBukWallet(_bukWalletAddr); } /// @dev See {IBukProtocol-setStableToken}. function setStableToken(address _stableTokenAddress) external onlyAdmin { _setStableToken(_stableTokenAddress); } /// @dev See {IBukProtocol-setBukNFTs}. function setBukNFTs(address _nftContractAddr) external onlyAdmin { _nftContract = IBukNFTs(_nftContractAddr); emit SetBukNFTs(_nftContractAddr); } /// @dev See {IBukProtocol-setBukPosNFTs}. function setBukPOSNFTs(address _nftPOSContractAddr) external onlyAdmin { _nftPOSContract = IBukPOSNFTs(_nftPOSContractAddr); emit SetBukPOSNFTs(_nftPOSContractAddr); } /// @dev See {IBukProtocol-setRoyalties}. function setRoyaltiesContract( address _royaltiesContractAddr ) external onlyAdmin { _setRoyaltiesContract(_royaltiesContractAddr); } /// @dev See {IBukProtocol-setCommission}. function setCommission( uint256 _newCommission ) external onlyAdmin whenNotPaused { require(_newCommission <= 100, "Commission is more than 100"); commission = _newCommission; emit SetCommission(_newCommission); } /// @dev See {IBukProtocol-toggleTradeability}. function toggleTradeability(uint256 _tokenId) external onlyAdmin { require( _bookingDetails[_tokenId].status != BookingStatus.nil, "Check the Booking status" ); _bookingDetails[_tokenId].tradeable = !_bookingDetails[_tokenId] .tradeable; emit ToggleTradeability(_tokenId, _bookingDetails[_tokenId].tradeable); } /// @dev See {IBukProtocol-pause}. function pause() external onlyAdmin { _pause(); } /// @dev See {IBukProtocol-unpause}. function unpause() external onlyAdmin { _unpause(); } /// @dev See {IBukProtocol-bookRooms}. function bookRooms( uint256[] memory _total, uint256[] memory _baseRate, uint256[] memory _minSalePrice, uint256[] memory _adult, uint256[] memory _child, bytes32 _propertyId, uint256 _checkin, uint256 _checkout, uint256 _tradeTimeLimit, bool _tradeable ) external nonReentrant whenNotPaused returns (bool) { BookingList memory _params = BookingList( _total, _baseRate, _minSalePrice, _adult, _child, _propertyId, _checkin, _checkout, _tradeTimeLimit, _tradeable, msg.sender ); (uint commissionTotal, uint256 total) = _booking(_params); return _bookingPayment(commissionTotal, total); } /// @dev See {IBukProtocol-bookRoomsOwner}. function bookRoomsOwner( uint256[] memory _total, uint256[] memory _baseRate, uint256[] memory _minSalePrice, uint256[] memory _adult, uint256[] memory _child, bytes32 _propertyId, uint256 _checkin, uint256 _checkout, uint256 _tradeTimeLimit, bool _tradeable, address _user ) external onlyAdmin nonReentrant whenNotPaused returns (bool) { BookingList memory _params = BookingList( _total, _baseRate, _minSalePrice, _adult, _child, _propertyId, _checkin, _checkout, _tradeTimeLimit, _tradeable, _user ); _booking(_params); return true; } /// @dev See {IBukProtocol-bookingRefund}. function bookingRefund( uint256[] memory _ids, address _owner ) external whenNotPaused onlyAdmin nonReentrant { uint256 len = _ids.length; require((len > 0), "Array is empty"); for (uint256 i = 0; i < len; ++i) { require( _bookingDetails[_ids[i]].firstOwner == _owner, "Check the booking owner" ); require( _bookingDetails[_ids[i]].status == BookingStatus.booked, "Check the Booking status" ); } uint total; for (uint256 i = 0; i < len; ++i) { _bookingDetails[_ids[i]].status = BookingStatus.cancelled; total += _bookingDetails[_ids[i]].total + _bookingDetails[_ids[i]].commission; } _bukTreasury.stableRefund(total, _owner); (total, _owner); emit BookingRefund(total, _owner); } /// @dev See {IBukProtocol-mintBukNFTOwner}. function mintBukNFTOwner( uint256[] memory _ids, string[] memory _uri, address _user ) external whenNotPaused nonReentrant onlyAdmin { _mintBukNFT(_ids, _uri, _user); } /// @dev See {IBukProtocol-checkin}. function checkin(uint256[] memory _ids) external { uint256 len = _ids.length; for (uint256 i = 0; i < len; ++i) { require( (_admin == msg.sender) || (_nftContract.balanceOf(msg.sender, _ids[i]) > 0), "Admin or NFT owner can access booking" ); require( _bookingDetails[_ids[i]].status == BookingStatus.confirmed, "Check the Booking status" ); } require( ((len > 0) && (len < MAX_BOOKING_LIMIT)), "Not in max-min booking limit" ); for (uint256 i = 0; i < len; ++i) { _bookingDetails[_ids[i]].status = BookingStatus.checkedin; _bookingDetails[_ids[i]].tradeable = false; } emit CheckinRooms(_ids, true); } /// @dev See {IBukProtocol-checkout}. function checkout( uint256[] memory _ids, address[] memory _recipients ) external onlyAdmin whenNotPaused { uint256 len = _ids.length; require( ((len > 0 && _recipients.length > 0) && (len == _recipients.length) && (len < MAX_BOOKING_LIMIT)), "Not in max-min booking limit" ); for (uint256 i = 0; i < len; ++i) { require( _bookingDetails[_ids[i]].status == BookingStatus.checkedin, "Check the Booking status" ); require( (_bookingDetails[_ids[i]].checkout < block.timestamp), "Checkout date must be before today" ); require( (_nftContract.balanceOf(_recipients[i], _ids[i]) > 0), "Check NFT owner balance" ); } for (uint256 i = 0; i < len; ++i) { _bookingDetails[_ids[i]].status = BookingStatus.checkedout; _bookingDetails[_ids[i]].tradeable = false; _nftContract.burn(_recipients[i], _ids[i], 1, true); } emit CheckoutRooms(_ids, true); } /// @dev See {IBukProtocol-cancelRooms}. function cancelRooms( uint256[] memory _ids, uint256[] memory _penalties, uint256[] memory _refunds, uint256[] memory _charges, address _bookingOwner, bytes memory _signature ) external whenNotPaused onlyAdmin nonReentrant { uint256 len = _ids.length; require( (len == _penalties.length) && (len == _refunds.length), "Validate IDs and amounts" ); uint totalPenalty; uint totalRefund; uint totalCharges; for (uint256 i = 0; i < len; ++i) { require( ((_bookingDetails[_ids[i]].status == BookingStatus.confirmed) || (_bookingDetails[_ids[i]].status == BookingStatus.checkedin)), "Not a confirmed or checkedin Booking" ); require( (_bookingDetails[_ids[i]].checkin > block.timestamp), "Checkin date must be in the future" ); require( _nftContract.balanceOf(_bookingOwner, _ids[i]) > 0, "Check the booking owner balance" ); require( ((_penalties[i] + _refunds[i] + _charges[i]) < (_bookingDetails[_ids[i]].total + 1)), "Transfer amount exceeds total" ); totalPenalty += _penalties[i]; totalRefund += _refunds[i]; totalCharges += _charges[i]; } // Verify the signature using the generateAndVerify function address signer = _signatureVerifier.generateAndVerify( totalPenalty, totalRefund, totalCharges, _signature ); require(signer == _bookingOwner, "Invalid owner signature"); for (uint256 i = 0; i < len; ++i) { _bookingDetails[_ids[i]].status = BookingStatus.cancelled; _nftContract.burn(_bookingOwner, _ids[i], 1, false); } if (totalPenalty > 0) _bukTreasury.stableRefund(totalPenalty, _bukWallet); if (totalRefund > 0) _bukTreasury.stableRefund(totalRefund, _bookingOwner); if (totalCharges > 0) _bukTreasury.stableRefund(totalCharges, _bukWallet); emit CancelRoom(_ids, totalRefund, true); } /// @dev See {IBukProtocol-emergencyCancellation}. function emergencyCancellation( uint256 _id, uint256 _refund, uint256 _charges, address _bookingOwner ) external whenNotPaused onlyAdmin nonReentrant { require( ((_bookingDetails[_id].status == BookingStatus.confirmed) || (_bookingDetails[_id].status == BookingStatus.checkedin)), "Not a confirmed or checkedin Booking" ); require( (_bookingDetails[_id].checkin > block.timestamp), "Checkin date must be in the future" ); require( _nftContract.balanceOf(_bookingOwner, _id) > 0, "Check the booking owner" ); require( ((_refund + _charges) < (_bookingDetails[_id].total + _bookingDetails[_id].commission + 1)), "Transfer amount exceeds total" ); _bookingDetails[_id].status = BookingStatus.cancelled; _bukTreasury.stableRefund(_refund, _bookingOwner); _bukTreasury.stableRefund(_charges, _bukWallet); _nftContract.burn(_bookingOwner, _id, 1, false); emit EmergencyCancellation(_id, true); } /// @dev See {IBukProtocol-getBookingDetails}. function getBookingDetails( uint256 _tokenId ) external view returns (Booking memory) { return _bookingDetails[_tokenId]; } /// @dev See {IBukProtocol-getRoyaltyInfo}. function getRoyaltyInfo( uint256 _tokenId ) external view returns (IBukRoyalties.Royalty[] memory) { IBukRoyalties.Royalty[] memory royalties = _royaltiesContract .getRoyaltyInfo(_tokenId); return royalties; } /// @dev See {IBukProtocol-getWallets}. function getWallets() external view returns ( address nftContract, address nftPOSContract, address royaltiesContract, address signatureVerifier, address bukTreasury, address stableToken, address bukWallet, address admin ) { return ( address(_nftContract), address(_nftPOSContract), address(_royaltiesContract), address(_signatureVerifier), address(_bukTreasury), address(_stableToken), address(_bukWallet), address(_admin) ); } /** * Private function to set the Admin Wallet address * @param _adminAddr The address of the Admin Wallet */ function _setAdmin(address _adminAddr) private { require(_adminAddr != address(0), "Invalid address"); _admin = _adminAddr; emit SetAdminWallet(_adminAddr); } /** * Private function to set the Signature Verifier contract address * @param _signatureVerifierContract The address of the Signature Verifier contract */ function _setSignatureVerifier(address _signatureVerifierContract) private { _signatureVerifier = ISignatureVerifier(_signatureVerifierContract); emit SetSignerVerifier(_signatureVerifierContract); } /** * Private function to set the Royalty contract address * @param _royaltiesContractAddr The address of the Royalties contract */ function _setRoyaltiesContract(address _royaltiesContractAddr) private { _royaltiesContract = IBukRoyalties(_royaltiesContractAddr); emit SetRoyaltiesContract(_royaltiesContractAddr); } /** * Private function to set the BukTreasury contract address * @param _bukTreasuryContract The address of the BukTreasury contract */ function _setBukTreasury(address _bukTreasuryContract) private { require(_bukTreasuryContract != address(0), "Invalid address"); _bukTreasury = IBukTreasury(_bukTreasuryContract); emit SetBukTreasury(_bukTreasuryContract); } /** * Private function to set the BukWallet contract address * @param _bukWalletAddr The address of the BukWallet contract */ function _setBukWallet(address _bukWalletAddr) private { require(_bukWalletAddr != address(0), "Invalid address"); _bukWallet = _bukWalletAddr; emit SetBukWallet(_bukWalletAddr); } /** * Private function to set the stable token contract address * @param _stableTokenAddress The address of the stable token contract */ function _setStableToken(address _stableTokenAddress) private { require(_stableTokenAddress != address(0), "Invalid address"); _stableToken = IERC20(_stableTokenAddress); emit SetStableToken(_stableTokenAddress); } /** * @dev Function to do the booking payment. * @param _commission Total BUK commission. * @param _total Total Booking Charge Excluding BUK commission. */ function _bookingPayment( uint256 _commission, uint256 _total ) private returns (bool) { require( _stableToken.balanceOf(msg.sender) >= _total + _commission, "Insufficient balance for booking" ); _stableToken.safeTransferFrom(msg.sender, _bukWallet, _commission); _stableToken.safeTransferFrom( msg.sender, address(_bukTreasury), _total ); return true; } /** * Function to capture booking details. * @param _bookingData It contains the booking details. * @return commissionTotal Total BUK commission. */ function _booking( BookingList memory _bookingData ) private returns (uint, uint256) { require( ((_bookingData.total.length == _bookingData.baseRate.length) && (_bookingData.total.length == _bookingData.minSalePrice.length) && (_bookingData.total.length > 0)), "Array sizes mismatch" ); require( _bookingData.total.length <= MAX_BOOKING_LIMIT, "Exceeded max rooms per booking" ); require( (_bookingData.checkIn > block.timestamp), "Checkin date must be in the future" ); require( (_bookingData.checkOut > _bookingData.checkIn), "Checkout date must be after checkin" ); uint256 totalAmount; uint commissionTotal; for (uint256 i = 0; i < _bookingData.total.length; ++i) { ++_bookingIds; uint256 bukCommission = (_bookingData.baseRate[i] * commission) / 100; _bookingDetails[_bookingIds] = Booking( _bookingIds, 0, _bookingData.propertyId, BookingStatus.booked, _bookingData.adult[i], _bookingData.child[i], _bookingData.user, _bookingData.checkIn, _bookingData.checkOut, _bookingData.total[i], _bookingData.baseRate[i], bukCommission, _bookingData.minSalePrice[i], _bookingData.tradeTimeLimit, _bookingData.tradeable ); totalAmount += _bookingData.total[i]; commissionTotal += bukCommission; emit BookRoom( _bookingIds, _bookingData.propertyId, _bookingData.checkIn, _bookingData.checkOut, _bookingData.adult[i], _bookingData.child[i] ); } return (commissionTotal, totalAmount); } /// @dev See {IBukProtocol-mintBukNFT}. function _mintBukNFT( uint256[] memory _ids, string[] memory _uri, address _user ) private { uint256 len = _ids.length; require((len == _uri.length), "Check Ids and URIs size"); require(((len > 0) && (len < 11)), "Not in max - min booking limit"); for (uint256 i = 0; i < len; ++i) { require( _bookingDetails[_ids[i]].status == BookingStatus.booked, "Check the Booking status" ); require( _bookingDetails[_ids[i]].firstOwner == _user, "Only booking owner can mint" ); } for (uint256 i = 0; i < len; ++i) { _bookingDetails[_ids[i]].status = BookingStatus.confirmed; _nftContract.mint( _ids[i], _bookingDetails[_ids[i]].firstOwner, 1, "", _uri[i] ); _bookingDetails[_ids[i]].tokenId = _ids[i]; } emit MintedBookingNFT(_ids, true); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 (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 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 pragma solidity =0.8.19; import { IERC1155 } from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /** * @title Interface to define the BUK NFTs * @author BUK Technology Inc * @dev Collection of all procedures related to the BUK NFTs. */ interface IBukNFTs is IERC1155 { /// @dev Emitted when Buk Protocol Address is updated. event SetBukProtocol( address oldBukProtocolContract, address newBukProtocolContract ); /// @dev Emitted when treasury is updated. event SetBukTreasury( address oldTreasuryContract, address newTreasuryContract ); /// @dev Emitted when marketplace role is granted. event SetMarketplace(address marketplaceContract); /// @dev Event to set NFT contract role event SetNFTPOSContractRole( address oldNFTPOSContractAddr, address newNFTPOSContractAddr ); /// @dev Event to set token URI event SetURI(uint256 id, string oldUri, string newUri); /** * @dev Function to set the Buk Protocol Contract address. * @param _bukProtocolContract Address of the Buk Protocol Contract. * @notice This function can only be called by addresses with `ADMIN_ROLE` */ function setBukProtocol(address _bukProtocolContract) external; /** * @dev Function to set the treasury address. * @param _bukTreasuryContract Address of the treasury. * @notice This function can only be called by addresses with `ADMIN_ROLE` */ function setBukTreasury(address _bukTreasuryContract) external; /** * @dev Function to set the marketplace address. * @param _marketplaceContract Address of the marketplace. * @notice This function can only be called by addresses with `ADMIN_ROLE` */ function setMarketplaceRole(address _marketplaceContract) external; /** * @dev Function to set the BukPOSNFT to the contract * @param _nftPOSContract address: The address of the NFT contract * @notice This function can only be called by a contract with `ADMIN_ROLE` */ function setBukPOSNFTRole(address _nftPOSContract) external; /** * @dev Sets the URI for a specific token ID. * @param _id - The ID of the token. * @param _newuri - The new URI for the token. * @notice This function can only be called by a contract with `ADMIN_ROLE` */ function setURI(uint256 _id, string memory _newuri) external; /** * @dev Mint a new NFT with a specific token ID, account, amount, and data. * @param _id - The token ID to mint the NFT with. * @param _account - The account to mint the NFT to. * @param _amount - The amount of NFTs to mint. * @param _data - The data to store with the NFT. * @param _uri - The URI to associate with the NFT. * @return uint256 - The token ID of the newly minted NFT. * @notice This function can only be called by a contract with `BUK_PROTOCOL_ROLE` */ function mint( uint256 _id, address _account, uint256 _amount, bytes calldata _data, string calldata _uri ) external returns (uint256); /** * @dev Burn a specific NFT. * @param _account - The account to burn the NFT from. * @param _id - The token ID of the NFT to burn. * @param _amount - The amount of NFTs to burn. * @param _mintPOS - Whether or not to call the Buk POS NFTs contract to burn the NFT. * @notice This function can only be called by a contract with `BUK_PROTOCOL_ROLE` */ function burn( address _account, uint256 _id, uint256 _amount, bool _mintPOS ) external; /** * @dev Transfers ownership of an NFT token from one address to another. * @param _from - The current owner of the NFT. * @param _to - The address to transfer the ownership to. * @param _id - The ID of the NFT token. * @param _amount - Count of ERC1155 token of token ID. * @param _data - Additional data to include in the transfer. * @notice This function checks if the NFT is tranferable or not. * @notice This function can only be called by a contract with `MARKETPLACE_CONTRACT_ROLE` */ function safeTransferFrom( address _from, address _to, uint256 _id, uint256 _amount, bytes memory _data ) external; /** * @dev Transfers ownership of multiple NFT tokens from one address to another. * @param _from - The current owner of the NFTs. * @param _to - The address to transfer the ownership to. * @param _ids - The IDs of the NFT tokens. * @param _amounts - Count of ERC1155 tokens of the respective token IDs. * @param _data - Additional data to include in the transfer. * @notice This function checks if the NFTs are tranferable or not. * @notice This function can only be called by a contract with `MARKETPLACE_CONTRACT_ROLE` */ function safeBatchTransferFrom( address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data ) external; /** * @dev To retrieve information about the royalties associated with a specific token. * @param _tokenId - The token ID of the NFT. * @param _salePrice - The price at which the token is being sold. * @return receiver - The address of the royalty receiver. * @return royaltyAmount - The amount of royalty to be paid. */ function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view returns (address receiver, uint256 royaltyAmount); /** * @dev Returns the URI associated with the token ID. * @param _id - The token ID to retrieve the URI for. * @return string - The URI associated with the token ID. */ function uri(uint256 _id) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity =0.8.19; import { IERC1155 } from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /** * @title Interface to define the BUK POS NFTs * @author BUK Technology Inc * @dev Collection of all procedures related to the BUK Proof of Stay NFTs. */ interface IBukPOSNFTs is IERC1155 { /// @dev Emitted when Buk Protocol Address is updated. event SetBukProtocol( address oldBukProtocolContract, address newBukProtocolContract ); /// @dev Emitted when treasury is updated. event SetBukTreasury( address oldTreasuryContract, address newTreasuryContract ); /// @dev Event to update the contract name event SetNFTContractName(string oldContractName, string newContractName); /// @dev Event to set NFT contract role event SetNFTContractRole( address oldNFTContractAddr, address newNFTContractAddr ); /// @dev Event to set token URI event SetURI(uint id, string oldUri, string newUri); /** * @dev Function to update the Buk Protocol Contract address. * @param _bukProtocolContract Address of the Buk Protocol Contract. * @notice This function can only be called by addresses with `ADMIN_ROLE` */ function setBukProtocol(address _bukProtocolContract) external; /** * @dev Function to update the treasury address. * @param _bukTreasuryContract Address of the treasury. * @notice This function can only be called by addresses with `ADMIN_ROLE` */ function setBukTreasury(address _bukTreasuryContract) external; /** * @dev Function to set the BukNFT role to a given contract * @param _nftContract address: The address of the NFT contract * @notice This function can only be called by a contract with `ADMIN_ROLE` */ function setBukNFTRole(address _nftContract) external; /** * @dev Function to set the contract name * @notice This function can only be called by a contract with `BUK_NFT_CONTRACT_ROLE` */ function setNFTContractName(string memory _contractName) external; /** * @dev Function to set the URI for a given ID * @param _id uint256: The ID of the token * @param _newuri string: The new URI of the token * @notice This function can only be called by a contract with `BUK_NFT_CONTRACT_ROLE` */ function setURI(uint256 _id, string memory _newuri) external; /** * @dev Function to mint tokens * @param _account address: The address to which the tokens will be minted * @param _id uint256: The ID of the token * @param _amount uint256: The amount of tokens to be minted * @param _newuri string: The URI of the token * @param _data bytes: Additional data associated with the token * @notice This function can only be called by a contract with `BUK_NFT_CONTRACT_ROLE` */ function mint( address _account, uint256 _id, uint256 _amount, string calldata _newuri, bytes calldata _data ) external; /** * @dev Transfers ownership of an NFT token from one address to another. * @param _from - The current owner of the NFT. * @param _to - The address to transfer the ownership to. * @param _id - The ID of the NFT token. * @param _amount - The amount of NFTs to mint. * @param _data - Additional data to include in the transfer. * @notice This function checks if the NFT is tranferable or not. * @notice This function can only be called by a contract with `ADMIN_ROLE` */ function safeTransferFrom( address _from, address _to, uint256 _id, uint256 _amount, bytes memory _data ) external; /** * @dev Transfers ownership of multiple NFT tokens from one address to another. * @param _from - The current owner of the NFTs. * @param _to - The address to transfer the ownership to. * @param _ids - The IDs of the NFT tokens. * @param _amounts - Count of ERC1155 tokens of the respective token IDs. * @param _data - Additional data to include in the transfer. * @notice This function checks if the NFTs are tranferable or not. * @notice This function can only be called by a contract with `ADMIN_ROLE` */ function safeBatchTransferFrom( address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data ) external; /** * @dev Function to get the URI for a given ID * @param _id uint256: The ID of the token */ function uri(uint256 _id) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity =0.8.19; import { IBukRoyalties } from "../BukRoyalties/IBukRoyalties.sol"; /** * @title Interface to define the BUK protocol * @author BUK Technology Inc * @dev Collection of all procedures related to the BUK protocol * @dev This interface is used by the other child contract to interact with the BukProtocol contract. */ interface IBukProtocol { /** * @dev Enum for booking statuses. * @var BookingStatus.nil Booking has not yet been initiated. * @var BookingStatus.booked Booking has been initiated but not yet confirmed. * @var BookingStatus.confirmed Booking has been confirmed. * @var BookingStatus.cancelled Booking has been cancelled. * @var BookingStatus.checkedin Booking has been checked-in. * @var BookingStatus.checkedout Booking has been checked-out. */ enum BookingStatus { nil, booked, confirmed, cancelled, checkedin, checkedout } /** * @dev Struct for booking details. * @param uint256 id Booking ID. * @param uint256 tokenId Token ID. * @param bytes32 propertyId Property ID. * @param BookingStatus status Booking status. * @param uint256 adult[] Number of adults. * @param uint256 child[] Number of children. * @param address owner Address of the booking owner. * @param uint256 checkin Check-in date. * @param uint256 checkout Check-out date. * @param uint256 total Total price. * @param uint256 baseRate Base rate. * @param uint256 commission Buk commission. * @param uint256 minSalePrice Min Sale Price. * @param uint256 tradeTimeLimit Buy will excecute if tradeLimitTime is not crossed (in hours) * @param bool tradeable Is the NFT Tradeable. */ struct Booking { uint256 id; uint256 tokenId; bytes32 propertyId; BookingStatus status; uint256 adult; uint256 child; address firstOwner; uint256 checkin; uint256 checkout; uint256 total; uint256 baseRate; uint256 commission; uint256 minSalePrice; uint256 tradeTimeLimit; bool tradeable; } /** * @dev Struct for booking details. * @param uint256 total Total price. * @param uint256 baseRate Base rate. * @param uint256 minSalePrice Min Sale Price. * @param uint256 adult[] Number of adults. * @param uint256 child[] Number of children. * @param bytes32 propertyId Property ID. * @param uint256 checkin Check-in date. * @param uint256 checkout Check-out date. * @param uint256 tradeTimeLimit Buy will excecute if tradeLimitTime is not crossed (in hours) * @param bool tradeable Is the NFT Tradeable. * @param address user Address of the booking owner. */ struct BookingList { uint256[] total; uint256[] baseRate; uint256[] minSalePrice; uint256[] adult; uint256[] child; bytes32 propertyId; uint256 checkIn; uint256 checkOut; uint256 tradeTimeLimit; bool tradeable; address user; } /// @dev Emitted when the admin wallet is set. event SetAdminWallet(address newAdminWallet); /// @dev Emitted when the commission is set. event SetCommission(uint256 newCommission); /// @dev Emitted when BukNFTs contract address is updated. event SetBukNFTs(address newNFTContract); /// @dev Emitted when BukPOSNFTs contract address is updated. event SetBukPOSNFTs(address newNFTPOSContract); /// @dev Emitted when BukRoyalties contract address is updated. event SetRoyaltiesContract(address newRoyaltiesContract); /// @dev Emitted when signer verifier is updated. event SetSignerVerifier(address newSignerVerifier); /// @dev Emitted when Buk treasury is updated. event SetBukTreasury(address newTreasuryContract); /// @dev Emitted when Buk Wallet is updated. event SetBukWallet(address newBukWalletContract); /// @dev Emitted when stable token is updated. event SetStableToken(address newStableToken); /** * @dev Emitted when the tradeability of a Buk NFT is toggled. * @param tokenId Token Id whose tradeability is being toggled. * @param tradeable Is the NFT tradeable. */ event ToggleTradeability(uint256 indexed tokenId, bool indexed tradeable); /// @dev Emitted when single room is booked. event BookRoom( uint256 indexed booking, bytes32 indexed propertyId, uint256 checkin, uint256 checkout, uint256 adult, uint256 child ); /// @dev Emitted when booking refund is done. event BookingRefund(uint256 total, address owner); /// @dev Emitted when room bookings are confirmed. event MintedBookingNFT(uint256[] bookings, bool status); /// @dev Emitted when room bookings are checked in. event CheckinRooms(uint256[] bookings, bool status); /// @dev Emitted when room bookings are checked out. event CheckoutRooms(uint256[] bookings, bool status); /// @dev Emitted when room bookings are cancelled. event CancelRoom( uint256[] bookingIds, uint256 indexed total, bool indexed status ); /// @dev Emitted when room bookings are cancelled. event EmergencyCancellation(uint256 indexed bookingId, bool indexed status); /** * @dev Sets the admin wallet address. * @param _adminAddr The new admin wallet address to be set. * @notice This function can only be called by admin */ function setAdmin(address _adminAddr) external; /** * @dev This function is used to set the address of the signature verifier contract. * @param _signatureVerifier The address of the signature verifier contract. * @notice This function can only be called by admin */ function setSignatureVerifier(address _signatureVerifier) external; /** * @dev Function to update the treasury address. * @param _bukTreasuryContract Address of the treasury. * @notice This function can only be called by admin */ function setBukTreasury(address _bukTreasuryContract) external; /** * @dev Function to update the Buk Wallet address to collect commission. * @param _bukWalletContract Address of the Buk Wallet. * @notice This function can only be called by admin */ function setBukWallet(address _bukWalletContract) external; /** * @dev Function to update the stable token address. * @param _stableToken Address of the stable token contract. * @notice This function can only be called by admin */ function setStableToken(address _stableToken) external; /** * @dev Function to update the BukNFTs contract address. * @param _nftContractAddr Address of the BukNFTs contract. * @notice This function can only be called by admin */ function setBukNFTs(address _nftContractAddr) external; /** * @dev Function to update the BukPOSNFTs contract address. * @param _nftPOSContractAddr Address of the BukPOSNFTs contract. * @notice This function can only be called by admin */ function setBukPOSNFTs(address _nftPOSContractAddr) external; /** * @dev Sets the Buk royalties contract address. * Can only be called by accounts with the ADMIN_ROLE. * @param _royaltiesContract The new royaltiesContract address to set. * @notice This function updates the royaltiesContract address and emits an event. * @dev If {_royaltiesContract} is the zero address, the function will revert. * @dev Emits a {SetRoyaltiesContract} event with the previous royaltiesContract address and the new address. */ function setRoyaltiesContract(address _royaltiesContract) external; /** * @dev Function to set the Buk commission percentage. * @param _commission Commission percentage. * @notice This function can only be called by admin */ function setCommission(uint256 _commission) external; /** * @dev Function to toggle the tradeability of an asset. * @param _tokenId Token Id whose tradeability is being toggled. * @notice This function can only be called by admin */ function toggleTradeability(uint256 _tokenId) external; /** * @dev Function to pause the contract. * @notice This function can only be called by admin */ function pause() external; /** * @dev Function to unpause the contract. * @notice This function can only be called by admin */ function unpause() external; /** * @dev Function to book rooms. * @param _total Total amount to be paid. * @param _baseRate Base rate of the room. * @param _minSalePrice Minimum sale price for the booking. * @param _adult Number of adults. * @param _child Number of children. * @param _propertyId Property ID. * @param _checkin Checkin date. * @param _checkout Checkout date. * @param _tradeTimeLimit Trade Limit of NFT based on Checkin time. * @param _tradeable Is the booking NFT tradeable. * @return ids IDs of the bookings. */ function bookRooms( uint256[] memory _total, uint256[] memory _baseRate, uint256[] memory _minSalePrice, uint256[] memory _adult, uint256[] memory _child, bytes32 _propertyId, uint256 _checkin, uint256 _checkout, uint256 _tradeTimeLimit, bool _tradeable ) external returns (bool); /** * @dev Function to book rooms. * @param _total Total amount to be paid. * @param _baseRate Base rate of the room. * @param _minSalePrice Minimum sale price for the booking. * @param _adult Number of adults. * @param _child Number of children. * @param _propertyId Property ID. * @param _checkin Checkin date. * @param _checkout Checkout date. * @param _tradeTimeLimit Trade Limit of NFT based on Checkin time. * @param _tradeable Is the booking NFT tradeable. * @param _user Address of user which we are booking. * @return ids IDs of the bookings. * @notice This function can only be called by admin * @notice This function is used to book rooms on behalf of the user. */ function bookRoomsOwner( uint256[] memory _total, uint256[] memory _baseRate, uint256[] memory _minSalePrice, uint256[] memory _adult, uint256[] memory _child, bytes32 _propertyId, uint256 _checkin, uint256 _checkout, uint256 _tradeTimeLimit, bool _tradeable, address _user ) external returns (bool); /** * @dev Allows the admin to refund a booking by canceling it and transferring the amount to the owner. * @param _ids An array of booking IDs that need to be refunded. * @param _owner The address of the owner of the bookings. * @notice This function is usually executed when the booking is unsuccessful from the hotel's end. * @notice This function can only be called by admin */ function bookingRefund(uint256[] memory _ids, address _owner) external; /** * @dev Function to mint new BukNFT tokens based on the provided booking IDs and URIs. * @param _ids An array of booking IDs representing the unique identifier for each BukNFT token. * @param _uri An array of URIs corresponding to each booking ID, which will be associated with the Buk NFTs. * @param _user Address of user which we are minting. * @notice Only the owner of the booking can book the NFTs and confirm the rooms. * @notice The number of bookings and URIs should be same. * @notice The booking status should be booked to confirm it. * @notice The NFTs are minted to the owner of the booking. * @notice This function can only be called by admin */ function mintBukNFTOwner( uint256[] memory _ids, string[] memory _uri, address _user ) external; /** * @dev Function to checkin the rooms. * @param _ids An array of booking IDs representing the unique identifier for each BukNFT token. * @notice The booking status should be confirmed to checkin it. * @notice Once checkedin the NFT becomes non-tradeable. * @notice This function can only be called by admin or the owner of the booking NFT */ function checkin(uint256[] memory _ids) external; /** * @dev Function to checkout the rooms. * @param _ids IDs of the bookings. * @param _recipients Owner address of tokens of the bookings. * @notice Only the admin can checkout the rooms. * @notice The booking status should be checkedin to checkout it. * @notice The Active Booking NFTs are burnt from the owner's account. * @notice The Utility NFTs are minted to the owner of the booking. * @notice This function can only be called by admin * @notice POSR NFT will be minted to recipients address. */ function checkout( uint256[] memory _ids, address[] memory _recipients ) external; /** * @dev Function to cancel the room bookings. * @param _ids Array of booking. * @param _penalties Array of penalty amount to be refunded. * @param _refunds Array of refund amount to be refunded. * @param _charges Array of charges amount to be deducted. * @param _bookingOwner Owner of the booking. * @notice Only the admin can cancel the rooms. * @notice The booking status should be confirmed to cancel it. * @notice The Active Booking NFTs are burnt from the owner's account. * @notice Buk commission is non-refundable. * @notice This function can only be called by admin */ function cancelRooms( uint256[] memory _ids, uint256[] memory _penalties, uint256[] memory _refunds, uint256[] memory _charges, address _bookingOwner, bytes memory _signature ) external; /** * @dev Function to perform an emergency cancellation of a booking. * @param _id The ID of the booking to be cancelled. * @param _refund The amount to be refunded to the booking owner. * @param _charges The charges associated with the cancellation(if any). * @param _bookingOwner The address of the booking owner. * @notice This function can only be called by admin * @notice Total refund amount and charges should be less than or equal to the total amount (Total = total booking amount + buk commission). */ function emergencyCancellation( uint256 _id, uint256 _refund, uint256 _charges, address _bookingOwner ) external; /** * Function to get wallet addresses * @return nftContract The address of the nft contract * @return nftPOSContract The address of the nftPOS contract * @return royaltiesContract The address of the royalties contract * @return signatureVerifier The address of the signature verifier contract * @return bukTreasury The address of the bukTreasury contract * @return stableToken The address of the stable token contract * @return bukWallet The address of the bukWallet contract * @return admin The address of the stable token contract */ function getWallets() external view returns ( address nftContract, address nftPOSContract, address royaltiesContract, address signatureVerifier, address bukTreasury, address stableToken, address bukWallet, address admin ); /** * @dev To get the booking details * @param _tokenId ID of the booking. */ function getBookingDetails( uint256 _tokenId ) external view returns (Booking memory); /** * @dev Function to retrieve royalty information. * @param _tokenId ID of the token * @notice Token ID and Booking ID are same. */ function getRoyaltyInfo( uint256 _tokenId ) external view returns (IBukRoyalties.Royalty[] memory); }
// SPDX-License-Identifier: MIT pragma solidity =0.8.19; /** * @title Interface to define the BUK royalties. * @author BUK Technology Inc * @dev Collection of all functions related to the BUK Royalties. */ interface IBukRoyalties { /** * @dev Struct named Royalty to store royalty information. * @param address receiver The address of the receiver who will receive the royalty * @param uint96 royaltyFraction The fraction of the royalty to be paid, expressed as an unsigned 96-bit integer */ struct Royalty { address receiver; uint96 royaltyFraction; } /** * @dev Emitted when new buk protocol address has been updated * @param oldBukProtocol, old buk protocol address * @param newBukProtocol, new buk protocol address */ event SetBukProtocol( address oldBukProtocol, address newBukProtocol ); /** * @dev Emitted when new Buk royalty has been updated * @param oldRoyalty, old buk royalty * @param newRoyalty, new buk royalty * @notice This event is used when Buk royalty is updated */ event SetBukRoyalty(uint96 oldRoyalty, uint96 newRoyalty); /** * @dev Emitted when Hotel royalty has been updated * @param oldRoyalty, old buk royalty * @param newRoyalty, new buk royalty * @notice This event is used when Hotel royalty is updated */ event SetHotelRoyalty(uint96 oldRoyalty, uint96 newRoyalty); /** * @dev Emitted when First Owner royalty has been updated * @param oldRoyalty, old buk royalty * @param newRoyalty, new buk royalty * @notice This event is used when First Owner royalty is updated */ event SetFirstOwnerRoyalty(uint96 oldRoyalty, uint96 newRoyalty); /** * @dev Emitted when other royalties are updated * @param oldRoyalty, array of old royalties * @param newRoyalty, array od new royalties */ event SetOtherRoyalties(uint96[] oldRoyalty, uint96[] newRoyalty); /** * @dev Sets the Buk Protocol address. * Can only be called by accounts with the ADMIN_ROLE. * @param _bukProtocolContract The new Buk Protocol address to set. * @dev If {_bukProtocolContract} is the zero address, the function will revert. * @dev Emits a {SetBukProtocol} event with the previous Buk Protocol address and the new address. * @notice This function updates the Buk Protocol address and emits an event. * @notice This function can only be called by `ADMIN_ROLE` */ function setBukProtocolContract(address _bukProtocolContract) external; /** * @dev Function to define the royalty Fraction for Buk. * @param _recipient Recipient address. * @param _royaltyFraction Royalty Fraction. * @notice This function can only be called by `ADMIN_ROLE` */ function setBukRoyaltyInfo( address _recipient, uint96 _royaltyFraction ) external; /** * @dev Function to define the royalty Fraction for Hotel. * @param _recipient Recipient address. * @param _royaltyFraction Royalty Fraction. * @notice This function can only be called by `ADMIN_ROLE` */ function setHotelRoyaltyInfo( address _recipient, uint96 _royaltyFraction ) external; /** * @dev Function to define the royalty Fraction for the First Owners. * @param _royaltyFraction Royalty Fraction. * @notice This function can only be called by `ADMIN_ROLE` */ function setFirstOwnerRoyaltyInfo(uint96 _royaltyFraction) external; /** * @dev Function to define the royalties. * @param _recipients Array of recipients of royalties * @param _royaltyFractions Array of percentages for each recipients in the _recipients[] order. * @notice This function can only be called by `ADMIN_ROLE` */ function setOtherRoyaltyInfo( address[] memory _recipients, uint96[] memory _royaltyFractions ) external; /** * @dev Function to retrieve royalty information. * @param _tokenId ID of the token * @notice Token ID and Booking ID are same. */ function getRoyaltyInfo( uint256 _tokenId ) external view returns (Royalty[] memory); }
// SPDX-License-Identifier: MIT pragma solidity =0.8.19; /** * @title IBukTreasury * @dev Interface for the BukTreasury contract. */ interface IBukTreasury { /** * @dev Emitted when new Stable token address has been updated * @param oldAddress, Address of the old address * @param newAddress, Address of the new address */ event SetStableToken( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when new Buk Protocol address has been updated * @param oldAddress, Address of the old address * @param newAddress, Address of the new address */ event BukProtocolSet( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when amount is withdrawn * @param account, Address of the amount sent * @param amount, Total amount withdrawn * @param token, Address of the token */ event WithdrawnToken( address indexed account, uint256 indexed amount, address token ); /** * @dev Emitted when the amount Refunds. * @param account, Address of the amount sent * @param amount, Total amount withdrawn * @param token, Address of the token */ event Refund( address indexed account, uint256 indexed amount, address token ); /** * Transfer stable tokens to the specified account. * @param _amount, Total funds to transfer * @param _account, Address of the account, funds transferred * @dev To transfer the amount in stable to the account. * @notice This function can only be called by Buk Protocol contract */ function stableRefund(uint256 _amount, address _account) external; /** * Transfer other tokens * @param _amount, Total funds to transfer * @param _account, Address of the account, funds transferred * @dev To transfer the amount in specified currency to the account. * @notice This function can only be called by the Buk Protocol contract */ function otherRefund( uint256 _amount, address _account, address _token ) external; /** * @dev Gets stable token address * @return address, Address of the stable token contract */ function getStableToken() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; /** * @title Interface to define the signature verifier contract * @author BUK Technology Inc * @notice Collection of all functions related to the signature verifier. */ interface ISignatureVerifier { /** * @dev Function verify * Verifies the signature of a hashed message using ECDSA. * @param _hash The original message hash that was signed. * @param _signature The signature of the message. * @return The address of the signer who generated the given signature. */ function verify( bytes memory _hash, bytes memory _signature ) external view returns (address); /** * @dev Function generateAndVerify * Generates a hash from the given parameters and verifies the signature of the hash using ECDSA. * @param _totalPenalty The total penalty amount. * @param _totalRefund The total refund amount. * @param _totalCharges The total charges amount. * @param _signature The signature of the message. * @return The address of the signer who generated the given signature. */ function generateAndVerify( uint256 _totalPenalty, uint256 _totalRefund, uint256 _totalCharges, bytes memory _signature ) external view returns (address); }
{ "optimizer": { "enabled": true, "runs": 10000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"_bukTreasuryContract","type":"address"},{"internalType":"address","name":"_stableTokenAddr","type":"address"},{"internalType":"address","name":"_bukWalletAddr","type":"address"},{"internalType":"address","name":"_signVerifierContract","type":"address"},{"internalType":"address","name":"_royaltiesContractAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"booking","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"propertyId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"checkin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"checkout","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"adult","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"child","type":"uint256"}],"name":"BookRoom","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"BookingRefund","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"bookingIds","type":"uint256[]"},{"indexed":true,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"CancelRoom","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"bookings","type":"uint256[]"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"CheckinRooms","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"bookings","type":"uint256[]"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"CheckoutRooms","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"bookingId","type":"uint256"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"EmergencyCancellation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"bookings","type":"uint256[]"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"MintedBookingNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAdminWallet","type":"address"}],"name":"SetAdminWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newNFTContract","type":"address"}],"name":"SetBukNFTs","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newNFTPOSContract","type":"address"}],"name":"SetBukPOSNFTs","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTreasuryContract","type":"address"}],"name":"SetBukTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newBukWalletContract","type":"address"}],"name":"SetBukWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newCommission","type":"uint256"}],"name":"SetCommission","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRoyaltiesContract","type":"address"}],"name":"SetRoyaltiesContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newSignerVerifier","type":"address"}],"name":"SetSignerVerifier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStableToken","type":"address"}],"name":"SetStableToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bool","name":"tradeable","type":"bool"}],"name":"ToggleTradeability","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_BOOKING_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_total","type":"uint256[]"},{"internalType":"uint256[]","name":"_baseRate","type":"uint256[]"},{"internalType":"uint256[]","name":"_minSalePrice","type":"uint256[]"},{"internalType":"uint256[]","name":"_adult","type":"uint256[]"},{"internalType":"uint256[]","name":"_child","type":"uint256[]"},{"internalType":"bytes32","name":"_propertyId","type":"bytes32"},{"internalType":"uint256","name":"_checkin","type":"uint256"},{"internalType":"uint256","name":"_checkout","type":"uint256"},{"internalType":"uint256","name":"_tradeTimeLimit","type":"uint256"},{"internalType":"bool","name":"_tradeable","type":"bool"}],"name":"bookRooms","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_total","type":"uint256[]"},{"internalType":"uint256[]","name":"_baseRate","type":"uint256[]"},{"internalType":"uint256[]","name":"_minSalePrice","type":"uint256[]"},{"internalType":"uint256[]","name":"_adult","type":"uint256[]"},{"internalType":"uint256[]","name":"_child","type":"uint256[]"},{"internalType":"bytes32","name":"_propertyId","type":"bytes32"},{"internalType":"uint256","name":"_checkin","type":"uint256"},{"internalType":"uint256","name":"_checkout","type":"uint256"},{"internalType":"uint256","name":"_tradeTimeLimit","type":"uint256"},{"internalType":"bool","name":"_tradeable","type":"bool"},{"internalType":"address","name":"_user","type":"address"}],"name":"bookRoomsOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"address","name":"_owner","type":"address"}],"name":"bookingRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_penalties","type":"uint256[]"},{"internalType":"uint256[]","name":"_refunds","type":"uint256[]"},{"internalType":"uint256[]","name":"_charges","type":"uint256[]"},{"internalType":"address","name":"_bookingOwner","type":"address"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"cancelRooms","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"checkin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"address[]","name":"_recipients","type":"address[]"}],"name":"checkout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"commission","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_refund","type":"uint256"},{"internalType":"uint256","name":"_charges","type":"uint256"},{"internalType":"address","name":"_bookingOwner","type":"address"}],"name":"emergencyCancellation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getBookingDetails","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"propertyId","type":"bytes32"},{"internalType":"enum IBukProtocol.BookingStatus","name":"status","type":"uint8"},{"internalType":"uint256","name":"adult","type":"uint256"},{"internalType":"uint256","name":"child","type":"uint256"},{"internalType":"address","name":"firstOwner","type":"address"},{"internalType":"uint256","name":"checkin","type":"uint256"},{"internalType":"uint256","name":"checkout","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"baseRate","type":"uint256"},{"internalType":"uint256","name":"commission","type":"uint256"},{"internalType":"uint256","name":"minSalePrice","type":"uint256"},{"internalType":"uint256","name":"tradeTimeLimit","type":"uint256"},{"internalType":"bool","name":"tradeable","type":"bool"}],"internalType":"struct IBukProtocol.Booking","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRoyaltyInfo","outputs":[{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"royaltyFraction","type":"uint96"}],"internalType":"struct IBukRoyalties.Royalty[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWallets","outputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"address","name":"nftPOSContract","type":"address"},{"internalType":"address","name":"royaltiesContract","type":"address"},{"internalType":"address","name":"signatureVerifier","type":"address"},{"internalType":"address","name":"bukTreasury","type":"address"},{"internalType":"address","name":"stableToken","type":"address"},{"internalType":"address","name":"bukWallet","type":"address"},{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"string[]","name":"_uri","type":"string[]"},{"internalType":"address","name":"_user","type":"address"}],"name":"mintBukNFTOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddr","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftContractAddr","type":"address"}],"name":"setBukNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftPOSContractAddr","type":"address"}],"name":"setBukPOSNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bukTreasuryContract","type":"address"}],"name":"setBukTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bukWalletAddr","type":"address"}],"name":"setBukWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCommission","type":"uint256"}],"name":"setCommission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltiesContractAddr","type":"address"}],"name":"setRoyaltiesContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"__signatureVerifier","type":"address"}],"name":"setSignatureVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stableTokenAddress","type":"address"}],"name":"setStableToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"toggleTradeability","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260056009553480156200001657600080fd5b5060405162004e9f38038062004e9f8339810160408190526200003991620003c6565b60016000819055805460ff19169055620000538162000095565b6200005e33620000ea565b62000069856200018f565b620000748462000228565b6200007f83620002c1565b6200008a826200035a565b505050505062000436565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f663aab470a3d4de7151c3b635bf05f9b424e7bfe3c7c1e1c532c4b8eed08334c906020015b60405180910390a150565b6001600160a01b038116620001385760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064015b60405180910390fd5b60018054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f1b651cfd0a3f185590087e7e632381434dfada46f037b9081264f9f5bdbfcd9b90602001620000df565b6001600160a01b038116620001d95760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016200012f565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f1cc11464818e3125e670e011d30fb41f808dfb08e16fcb8c636cc71debbe9f5c90602001620000df565b6001600160a01b038116620002725760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016200012f565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fd54957d43bfccc59e985b6fadd7662791d33a46b2a0a565ae92e48f8c398c51d90602001620000df565b6001600160a01b0381166200030b5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016200012f565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f4fc5f17cec405934cce5eb341ac46bcd1116481cd94fabcfd6170e0e39775df090602001620000df565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527fa8879519d095f1f0b9e63ae95eab9e07ae191825e24758baa912b0b22105ce7c90602001620000df565b80516001600160a01b0381168114620003c157600080fd5b919050565b600080600080600060a08688031215620003df57600080fd5b620003ea86620003a9565b9450620003fa60208701620003a9565b93506200040a60408701620003a9565b92506200041a60608701620003a9565b91506200042a60808701620003a9565b90509295509295909350565b614a5980620004466000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c8063a51ec36e116100ee578063db1bc87b11610097578063de9f7f9411610071578063de9f7f94146103c6578063e08a6605146103d9578063e1489191146103ec578063eb8c41b0146103f557600080fd5b8063db1bc87b14610332578063db7a460514610345578063dbe5351f146103b357600080fd5b8063b76c632b116100c8578063b76c632b146102ec578063bbfbe4511461030c578063d5a6e1951461031f57600080fd5b8063a51ec36e146102b3578063b166da42146102c6578063b6fe531a146102d957600080fd5b80635e909ef21161015b5780638456cb59116101355780638456cb59146102625780638b3545341461026a5780638db3ed601461027d578063a1714c691461029d57600080fd5b80635e909ef2146102295780636e2466a11461023c578063704b6c021461024f57600080fd5b80633f4ba83a1161018c5780633f4ba83a146102035780634415949d1461020b5780635c975abb1461021e57600080fd5b80630f707af9146101b3578063302ab6a0146101db578063355e6b43146101f0575b600080fd5b6101c66101c1366004613e7a565b610408565b60405190151581526020015b60405180910390f35b6101ee6101e9366004613fa5565b6104ac565b005b6101ee6101fe366004613fc2565b61058c565b6101ee610688565b6101ee610219366004613fc2565b610700565b60015460ff166101c6565b6101ee610237366004613fa5565b610836565b6101ee61024a366004613fdb565b61090a565b6101ee61025d366004613fa5565b610c47565b6101ee610cc1565b6101ee610278366004613fa5565b610d37565b61029061028b366004613fc2565b610dae565b6040516101d2919061407a565b6102a5600b81565b6040519081526020016101d2565b6101ee6102c136600461413d565b610f2e565b6101ee6102d4366004613fa5565b611444565b6101ee6102e7366004614201565b6114bb565b6102ff6102fa366004613fc2565b6119d3565b6040516101d29190614242565b6101ee61031a36600461431e565b611a88565b6101ee61032d366004614438565b611b20565b6101ee610340366004613fa5565b612426565b600654600754600854600554600454600354600254600154604080516001600160a01b03998a16815297891660208901529588169587019590955292861660608601529085166080850152841660a0840152831660c08301526101009081900490921660e0820152016101d2565b6101c66103c1366004614519565b61249d565b6101ee6103d4366004614639565b6125a2565b6101ee6103e7366004613fa5565b61296f565b6102a560095481565b6101ee610403366004613fa5565b6129e6565b6000610412612a5d565b61041a612ab6565b60006040518061016001604052808d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018415158152602001336001600160a01b0316815250905060008061048183612b09565b9150915061048f828261305d565b935050505061049e6001600055565b9a9950505050505050505050565b60015461010090046001600160a01b0316331461051f5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b60648201526084015b60405180910390fd5b600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f800196fd3c77c0c447a3fdcc71aa8f425a668352c5773203bb34bd0b3a1b461e906020015b60405180910390a150565b60015461010090046001600160a01b031633146105fa5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610602612ab6565b60648111156106535760405162461bcd60e51b815260206004820152601b60248201527f436f6d6d697373696f6e206973206d6f7265207468616e2031303000000000006044820152606401610516565b60098190556040518181527f6ea5803136ce7e26c33880483825cef41fb8393d74a746766d695daf98592f9490602001610581565b60015461010090046001600160a01b031633146106f65760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b6106fe613184565b565b60015461010090046001600160a01b0316331461076e5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b6000818152600b602052604081206003015460ff16600581111561079457610794614010565b036107e15760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b6000818152600b6020526040808220600e01805460ff19811660ff918216159081179092559151911615159183917f20cc8a1ce650f5020a551c89051e695cc9f73f3c9744504df1092323306f501f9190a350565b60015461010090046001600160a01b031633146108a45760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fe50fa938e83754b3b8c4fecb0966c174be972c84f855f0ef9126ba0b38c0fac890602001610581565b805160005b81811015610af05760015461010090046001600160a01b03163314806109d7575060065483516000916001600160a01b03169062fdd58e90339087908690811061095b5761095b61468b565b60200260200101516040518363ffffffff1660e01b81526004016109949291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa1580156109b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d591906146ba565b115b610a495760405162461bcd60e51b815260206004820152602560248201527f41646d696e206f72204e4654206f776e65722063616e2061636365737320626f60448201527f6f6b696e670000000000000000000000000000000000000000000000000000006064820152608401610516565b6002600b6000858481518110610a6157610a6161468b565b60209081029190910181015182528101919091526040016000206003015460ff166005811115610a9357610a93614010565b14610ae05760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b610ae981614702565b905061090f565b50600081118015610b015750600b81105b610b4d5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420696e206d61782d6d696e20626f6f6b696e67206c696d6974000000006044820152606401610516565b60005b81811015610c08576004600b6000858481518110610b7057610b7061468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff02191690836005811115610baa57610baa614010565b02179055506000600b6000858481518110610bc757610bc761468b565b60200260200101518152602001908152602001600020600e0160006101000a81548160ff02191690831515021790555080610c0190614702565b9050610b50565b507f49cb8f7c6e3b91b8f7e29b7f2635794eb0c7fe9119e19b523989d5aed8763b7a826001604051610c3b929190614775565b60405180910390a15050565b60015461010090046001600160a01b03163314610cb55760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe816131d6565b50565b60015461010090046001600160a01b03163314610d2f5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b6106fe613299565b60015461010090046001600160a01b03163314610da55760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe816132d4565b610e32604080516101e0810182526000808252602082018190529181018290529060608201908152602001600081526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b600b6000838152602001908152602001600020604051806101e00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900460ff166005811115610e9357610e93614010565b6005811115610ea457610ea4614010565b8152600482015460208201526005820154604082015260068201546001600160a01b0316606082015260078201546080820152600882015460a0820152600982015460c0820152600a82015460e0820152600b820154610100820152600c820154610120820152600d820154610140820152600e9091015460ff1615156101609091015292915050565b60015461010090046001600160a01b03163314610f9c5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610fa4612ab6565b81518015801590610fb6575060008251115b8015610fc25750815181145b8015610fce5750600b81105b61101a5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420696e206d61782d6d696e20626f6f6b696e67206c696d6974000000006044820152606401610516565b60005b8181101561127a576004600b600086848151811061103d5761103d61468b565b60209081029190910181015182528101919091526040016000206003015460ff16600581111561106f5761106f614010565b146110bc5760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b42600b60008684815181106110d3576110d361468b565b6020026020010151815260200190815260200160002060080154106111605760405162461bcd60e51b815260206004820152602260248201527f436865636b6f75742064617465206d757374206265206265666f726520746f6460448201527f61790000000000000000000000000000000000000000000000000000000000006064820152608401610516565b60065483516000916001600160a01b03169062fdd58e908690859081106111895761118961468b565b60200260200101518785815181106111a3576111a361468b565b60200260200101516040518363ffffffff1660e01b81526004016111dc9291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa1580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d91906146ba565b1161126a5760405162461bcd60e51b815260206004820152601760248201527f436865636b204e4654206f776e65722062616c616e63650000000000000000006044820152606401610516565b61127381614702565b905061101d565b5060005b81811015611404576005600b600086848151811061129e5761129e61468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff021916908360058111156112d8576112d8614010565b02179055506000600b60008684815181106112f5576112f561468b565b6020908102919091018101518252810191909152604001600020600e01805460ff191691151591909117905560065483516001600160a01b03909116906331126dd19085908490811061134a5761134a61468b565b60200260200101518684815181106113645761136461468b565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526001604482018190526064820152608401600060405180830381600087803b1580156113db57600080fd5b505af11580156113ef573d6000803e3d6000fd5b50505050806113fd90614702565b905061127e565b507f7f0a1d00121a107c9ffadb135bbca22d20c8c7fd0dc74a39fe1e7864bce14b4f836001604051611437929190614775565b60405180910390a1505050565b60015461010090046001600160a01b031633146114b25760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe81613390565b6114c3612ab6565b60015461010090046001600160a01b031633146115315760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b611539612a5d565b60026000858152600b602052604090206003015460ff16600581111561156157611561614010565b1480611592575060046000858152600b602052604090206003015460ff16600581111561159057611590614010565b145b6116035760405162461bcd60e51b8152602060048201526024808201527f4e6f74206120636f6e6669726d6564206f7220636865636b6564696e20426f6f60448201527f6b696e67000000000000000000000000000000000000000000000000000000006064820152608401610516565b6000848152600b602052604090206007015442106116895760405162461bcd60e51b815260206004820152602260248201527f436865636b696e2064617465206d75737420626520696e20746865206675747560448201527f72650000000000000000000000000000000000000000000000000000000000006064820152608401610516565b6006546040517efdd58e0000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260248201879052600092169062fdd58e90604401602060405180830381865afa1580156116f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171691906146ba565b116117635760405162461bcd60e51b815260206004820152601760248201527f436865636b2074686520626f6f6b696e67206f776e65720000000000000000006044820152606401610516565b6000848152600b60208190526040909120908101546009909101546117889190614799565b611793906001614799565b61179d8385614799565b106117ea5760405162461bcd60e51b815260206004820152601d60248201527f5472616e7366657220616d6f756e74206578636565647320746f74616c0000006044820152606401610516565b6000848152600b602052604090206003908101805460ff19166001830217905550600480546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529182018590526001600160a01b038381166024840152169063c7c5ce3290604401600060405180830381600087803b15801561187057600080fd5b505af1158015611884573d6000803e3d6000fd5b5050600480546002546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529283018790526001600160a01b03908116602484015216925063c7c5ce329150604401600060405180830381600087803b1580156118f057600080fd5b505af1158015611904573d6000803e3d6000fd5b50506006546040517f31126dd10000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260248201899052600160448301526000606483015290911692506331126dd19150608401600060405180830381600087803b15801561197d57600080fd5b505af1158015611991573d6000803e3d6000fd5b5050604051600192508691507fe16e1da3f9457948c49dd131d2235e52b9f0b26b7b5945afe1d1901f2544ad3290600090a36119cd6001600055565b50505050565b6008546040517fb76c632b000000000000000000000000000000000000000000000000000000008152600481018390526060916000916001600160a01b039091169063b76c632b90602401600060405180830381865afa158015611a3b573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611a8191908101906147ac565b9392505050565b611a90612ab6565b611a98612a5d565b60015461010090046001600160a01b03163314611b065760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b611b118383836133f6565b611b1b6001600055565b505050565b611b28612ab6565b60015461010090046001600160a01b03163314611b965760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b611b9e612a5d565b8551855181148015611bb05750845181145b611bfc5760405162461bcd60e51b815260206004820152601860248201527f56616c69646174652049447320616e6420616d6f756e747300000000000000006044820152606401610516565b60008080805b8481101561201e576002600b60008d8481518110611c2257611c2261468b565b60209081029190910181015182528101919091526040016000206003015460ff166005811115611c5457611c54614010565b1480611ca757506004600b60008d8481518110611c7357611c7361468b565b60209081029190910181015182528101919091526040016000206003015460ff166005811115611ca557611ca5614010565b145b611d185760405162461bcd60e51b8152602060048201526024808201527f4e6f74206120636f6e6669726d6564206f7220636865636b6564696e20426f6f60448201527f6b696e67000000000000000000000000000000000000000000000000000000006064820152608401610516565b42600b60008d8481518110611d2f57611d2f61468b565b602002602001015181526020019081526020016000206007015411611dbc5760405162461bcd60e51b815260206004820152602260248201527f436865636b696e2064617465206d75737420626520696e20746865206675747560448201527f72650000000000000000000000000000000000000000000000000000000000006064820152608401610516565b6006548b516000916001600160a01b03169062fdd58e908a908f9086908110611de757611de761468b565b60200260200101516040518363ffffffff1660e01b8152600401611e209291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa158015611e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6191906146ba565b11611eae5760405162461bcd60e51b815260206004820152601f60248201527f436865636b2074686520626f6f6b696e67206f776e65722062616c616e6365006044820152606401610516565b600b60008c8381518110611ec457611ec461468b565b60200260200101518152602001908152602001600020600901546001611eea9190614799565b888281518110611efc57611efc61468b565b60200260200101518a8381518110611f1657611f1661468b565b60200260200101518c8481518110611f3057611f3061468b565b6020026020010151611f429190614799565b611f4c9190614799565b10611f995760405162461bcd60e51b815260206004820152601d60248201527f5472616e7366657220616d6f756e74206578636565647320746f74616c0000006044820152606401610516565b898181518110611fab57611fab61468b565b602002602001015184611fbe9190614799565b9350888181518110611fd257611fd261468b565b602002602001015183611fe59190614799565b9250878181518110611ff957611ff961468b565b60200260200101518261200c9190614799565b915061201781614702565b9050611c02565b506005546040517fd5d11ce30000000000000000000000000000000000000000000000000000000081526000916001600160a01b03169063d5d11ce39061206f908790879087908c906004016148ea565b602060405180830381865afa15801561208c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b09190614919565b9050866001600160a01b0316816001600160a01b0316146121135760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206f776e6572207369676e61747572650000000000000000006044820152606401610516565b60005b85811015612240576003600b60008e84815181106121365761213661468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff0219169083600581111561217057612170614010565b02179055506006548c516001600160a01b03909116906331126dd1908a908f90859081106121a0576121a061468b565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526001604482015260006064820152608401600060405180830381600087803b15801561221757600080fd5b505af115801561222b573d6000803e3d6000fd5b505050508061223990614702565b9050612116565b5083156122c857600480546002546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529283018790526001600160a01b039081166024840152169063c7c5ce3290604401600060405180830381600087803b1580156122af57600080fd5b505af11580156122c3573d6000803e3d6000fd5b505050505b821561234c57600480546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529182018590526001600160a01b038981166024840152169063c7c5ce3290604401600060405180830381600087803b15801561233357600080fd5b505af1158015612347573d6000803e3d6000fd5b505050505b81156123d357600480546002546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529283018590526001600160a01b039081166024840152169063c7c5ce3290604401600060405180830381600087803b1580156123ba57600080fd5b505af11580156123ce573d6000803e3d6000fd5b505050505b60011515837f382562eb275421e384de8040f7d8f33baea914d0f0bf2942f121f674fa1fe7fa8d6040516124079190614936565b60405180910390a3505050505061241e6001600055565b505050505050565b60015461010090046001600160a01b031633146124945760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe816137df565b60015460009061010090046001600160a01b0316331461250e5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b612516612a5d565b61251e612ab6565b60006040518061016001604052808e81526020018d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018515158152602001846001600160a01b0316815250905061258281612b09565b505060019150506125936001600055565b9b9a5050505050505050505050565b6125aa612ab6565b60015461010090046001600160a01b031633146126185760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b612620612a5d565b81518061266f5760405162461bcd60e51b815260206004820152600e60248201527f417272617920697320656d7074790000000000000000000000000000000000006044820152606401610516565b60005b818110156127b557826001600160a01b0316600b600086848151811061269a5761269a61468b565b6020908102919091018101518252810191909152604001600020600601546001600160a01b03161461270e5760405162461bcd60e51b815260206004820152601760248201527f436865636b2074686520626f6f6b696e67206f776e65720000000000000000006044820152606401610516565b6001600b60008684815181106127265761272661468b565b60209081029190910181015182528101919091526040016000206003015460ff16600581111561275857612758614010565b146127a55760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b6127ae81614702565b9050612672565b506000805b8281101561289f576003600b60008784815181106127da576127da61468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff0219169083600581111561281457612814614010565b0217905550600b600086838151811061282f5761282f61468b565b60200260200101518152602001908152602001600020600b0154600b600087848151811061285f5761285f61468b565b60200260200101518152602001908152602001600020600901546128839190614799565b61288d9083614799565b915061289881614702565b90506127ba565b50600480546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529182018390526001600160a01b038581166024840152169063c7c5ce3290604401600060405180830381600087803b15801561290557600080fd5b505af1158015612919573d6000803e3d6000fd5b5050604080518481526001600160a01b03871660208201527f70ad042c4446f366ed6a795d6f223c08f3d8594569088a5bc012d22fb2584305935001905060405180910390a1505061296b6001600055565b5050565b60015461010090046001600160a01b031633146129dd5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe8161389b565b60015461010090046001600160a01b03163314612a545760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe81613901565b600260005403612aaf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610516565b6002600055565b60015460ff16156106fe5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610516565b600080826020015151836000015151148015612b2b5750604083015151835151145b8015612b38575082515115155b612b845760405162461bcd60e51b815260206004820152601460248201527f41727261792073697a6573206d69736d617463680000000000000000000000006044820152606401610516565b825151600b1015612bd75760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564206d617820726f6f6d732070657220626f6f6b696e6700006044820152606401610516565b428360c0015111612c505760405162461bcd60e51b815260206004820152602260248201527f436865636b696e2064617465206d75737420626520696e20746865206675747560448201527f72650000000000000000000000000000000000000000000000000000000000006064820152608401610516565b8260c001518360e0015111612ccd5760405162461bcd60e51b815260206004820152602360248201527f436865636b6f75742064617465206d757374206265206166746572206368656360448201527f6b696e00000000000000000000000000000000000000000000000000000000006064820152608401610516565b60008060005b85515181101561305357600a60008154612cec90614702565b919050819055506000606460095488602001518481518110612d1057612d1061468b565b6020026020010151612d229190614949565b612d2c9190614960565b9050604051806101e00160405280600a548152602001600081526020018860a00151815260200160016005811115612d6657612d66614010565b815260200188606001518481518110612d8157612d8161468b565b6020026020010151815260200188608001518481518110612da457612da461468b565b602002602001015181526020018861014001516001600160a01b031681526020018860c0015181526020018860e00151815260200188600001518481518110612def57612def61468b565b6020026020010151815260200188602001518481518110612e1257612e1261468b565b6020026020010151815260200182815260200188604001518481518110612e3b57612e3b61468b565b6020026020010151815260200188610100015181526020018861012001511515815250600b6000600a54815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff02191690836005811115612ebb57612ebb614010565b02179055506080820151600482015560a0820151600582015560c08201516006820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0390921691909117905560e0820151600782015561010082015160088201556101208201516009820155610140820151600a820155610160820151600b820155610180820151600c8201556101a0820151600d8201556101c090910151600e909101805460ff19169115159190911790558651805183908110612f8d57612f8d61468b565b602002602001015184612fa09190614799565b9350612fac8184614799565b92508660a00151600a547fdadfdb06bb542df5e76b2eaa8ddb3f6e0573594c3ac29b03524b194bcff3415e8960c001518a60e001518b606001518781518110612ff757612ff761468b565b60200260200101518c6080015188815181106130155761301561468b565b6020908102919091018101516040805195865291850193909352830152606082015260800160405180910390a35061304c81614702565b9050612cd3565b5094909350915050565b60006130698383614799565b6003546040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156130ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130ee91906146ba565b101561313c5760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e742062616c616e636520666f7220626f6f6b696e676044820152606401610516565b60025460035461315b916001600160a01b0391821691339116866139bd565b60045460035461317a916001600160a01b0391821691339116856139bd565b5060015b92915050565b61318c613a45565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b03811661322c5760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610516565b600180547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038416908102919091179091556040519081527f1b651cfd0a3f185590087e7e632381434dfada46f037b9081264f9f5bdbfcd9b90602001610581565b6132a1612ab6565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336131b9565b6001600160a01b03811661332a5760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610516565b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f1cc11464818e3125e670e011d30fb41f808dfb08e16fcb8c636cc71debbe9f5c90602001610581565b600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f663aab470a3d4de7151c3b635bf05f9b424e7bfe3c7c1e1c532c4b8eed08334c90602001610581565b8251825181146134485760405162461bcd60e51b815260206004820152601760248201527f436865636b2049647320616e6420555249732073697a650000000000000000006044820152606401610516565b6000811180156134585750600b81105b6134a45760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420696e206d6178202d206d696e20626f6f6b696e67206c696d697400006044820152606401610516565b60005b818110156135ea576001600b60008784815181106134c7576134c761468b565b60209081029190910181015182528101919091526040016000206003015460ff1660058111156134f9576134f9614010565b146135465760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b826001600160a01b0316600b60008784815181106135665761356661468b565b6020908102919091018101518252810191909152604001600020600601546001600160a01b0316146135da5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920626f6f6b696e67206f776e65722063616e206d696e7400000000006044820152606401610516565b6135e381614702565b90506134a7565b5060005b8181101561379e576002600b600087848151811061360e5761360e61468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff0219169083600581111561364857613648614010565b021790555060065485516001600160a01b03909116906327481874908790849081106136765761367661468b565b6020026020010151600b60008986815181106136945761369461468b565b6020026020010151815260200190815260200160002060060160009054906101000a90046001600160a01b031660018886815181106136d5576136d561468b565b60200260200101516040518563ffffffff1660e01b81526004016136fc949392919061499b565b6020604051808303816000875af115801561371b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061373f91906146ba565b508481815181106137525761375261468b565b6020026020010151600b60008784815181106137705761377061468b565b60200260200101518152602001908152602001600020600101819055508061379790614702565b90506135ee565b507fc0c4e6551b8572e81680217d24788c2b0547caa8662bcb318c24fd222c47d9ce8460016040516137d1929190614775565b60405180910390a150505050565b6001600160a01b0381166138355760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610516565b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fd54957d43bfccc59e985b6fadd7662791d33a46b2a0a565ae92e48f8c398c51d90602001610581565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fa8879519d095f1f0b9e63ae95eab9e07ae191825e24758baa912b0b22105ce7c90602001610581565b6001600160a01b0381166139575760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610516565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f4fc5f17cec405934cce5eb341ac46bcd1116481cd94fabcfd6170e0e39775df090602001610581565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526119cd908590613a97565b60015460ff166106fe5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610516565b6000613aec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613b7f9092919063ffffffff16565b9050805160001480613b0d575080806020019051810190613b0d91906149d7565b611b1b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610516565b6060613b8e8484600085613b96565b949350505050565b606082471015613c0e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610516565b600080866001600160a01b03168587604051613c2a91906149f4565b60006040518083038185875af1925050503d8060008114613c67576040519150601f19603f3d011682016040523d82523d6000602084013e613c6c565b606091505b5091509150613c7d87838387613c88565b979650505050505050565b60608315613cf7578251600003613cf0576001600160a01b0385163b613cf05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610516565b5081613b8e565b613b8e8383815115613d0c5781518083602001fd5b8060405162461bcd60e51b81526004016105169190614a10565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613d7857613d78613d26565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613dc557613dc5613d26565b604052919050565b600067ffffffffffffffff821115613de757613de7613d26565b5060051b60200190565b600082601f830112613e0257600080fd5b81356020613e17613e1283613dcd565b613d7e565b82815260059290921b84018101918181019086841115613e3657600080fd5b8286015b84811015613e515780358352918301918301613e3a565b509695505050505050565b8015158114610cbe57600080fd5b8035613e7581613e5c565b919050565b6000806000806000806000806000806101408b8d031215613e9a57600080fd5b8a3567ffffffffffffffff80821115613eb257600080fd5b613ebe8e838f01613df1565b9b5060208d0135915080821115613ed457600080fd5b613ee08e838f01613df1565b9a5060408d0135915080821115613ef657600080fd5b613f028e838f01613df1565b995060608d0135915080821115613f1857600080fd5b613f248e838f01613df1565b985060808d0135915080821115613f3a57600080fd5b50613f478d828e01613df1565b96505060a08b0135945060c08b0135935060e08b013592506101008b01359150613f746101208c01613e6a565b90509295989b9194979a5092959850565b6001600160a01b0381168114610cbe57600080fd5b8035613e7581613f85565b600060208284031215613fb757600080fd5b8135611a8181613f85565b600060208284031215613fd457600080fd5b5035919050565b600060208284031215613fed57600080fd5b813567ffffffffffffffff81111561400457600080fd5b613b8e84828501613df1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60068110614076577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b60006101e08201905082518252602083015160208301526040830151604083015260608301516140ad606084018261403f565b506080830151608083015260a083015160a083015260c08301516140dc60c08401826001600160a01b03169052565b5060e08381015190830152610100808401519083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a080840151908301526101c0928301511515929091019190915290565b6000806040838503121561415057600080fd5b823567ffffffffffffffff8082111561416857600080fd5b61417486838701613df1565b935060209150818501358181111561418b57600080fd5b85019050601f8101861361419e57600080fd5b80356141ac613e1282613dcd565b81815260059190911b820183019083810190888311156141cb57600080fd5b928401925b828410156141f25783356141e381613f85565b825292840192908401906141d0565b80955050505050509250929050565b6000806000806080858703121561421757600080fd5b843593506020850135925060408501359150606085013561423781613f85565b939692955090935050565b602080825282518282018190526000919060409081850190868401855b8281101561429b57815180516001600160a01b031685528601516bffffffffffffffffffffffff1686850152928401929085019060010161425f565b5091979650505050505050565b600067ffffffffffffffff8311156142c2576142c2613d26565b6142f360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601613d7e565b905082815283838301111561430757600080fd5b828260208301376000602084830101529392505050565b60008060006060848603121561433357600080fd5b833567ffffffffffffffff8082111561434b57600080fd5b61435787838801613df1565b945060209150818601358181111561436e57600080fd5b8601601f8101881361437f57600080fd5b803561438d613e1282613dcd565b81815260059190911b8201840190848101908a8311156143ac57600080fd5b8584015b838110156143f9578035868111156143c85760008081fd5b8501603f81018d136143da5760008081fd5b6143eb8d89830135604084016142a8565b8452509186019186016143b0565b5080975050505050505061440f60408501613f9a565b90509250925092565b600082601f83011261442957600080fd5b611a81838335602085016142a8565b60008060008060008060c0878903121561445157600080fd5b863567ffffffffffffffff8082111561446957600080fd5b6144758a838b01613df1565b9750602089013591508082111561448b57600080fd5b6144978a838b01613df1565b965060408901359150808211156144ad57600080fd5b6144b98a838b01613df1565b955060608901359150808211156144cf57600080fd5b6144db8a838b01613df1565b94506144e960808a01613f9a565b935060a08901359150808211156144ff57600080fd5b5061450c89828a01614418565b9150509295509295509295565b60008060008060008060008060008060006101608c8e03121561453b57600080fd5b67ffffffffffffffff808d35111561455257600080fd5b61455f8e8e358f01613df1565b9b508060208e0135111561457257600080fd5b6145828e60208f01358f01613df1565b9a508060408e0135111561459557600080fd5b6145a58e60408f01358f01613df1565b99508060608e013511156145b857600080fd5b6145c88e60608f01358f01613df1565b98508060808e013511156145db57600080fd5b506145ec8d60808e01358e01613df1565b965060a08c0135955060c08c0135945060e08c013593506101008c013592506146186101208d01613e6a565b91506146276101408d01613f9a565b90509295989b509295989b9093969950565b6000806040838503121561464c57600080fd5b823567ffffffffffffffff81111561466357600080fd5b61466f85828601613df1565b925050602083013561468081613f85565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156146cc57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614733576147336146d3565b5060010190565b600081518084526020808501945080840160005b8381101561476a5781518752958201959082019060010161474e565b509495945050505050565b604081526000614788604083018561473a565b905082151560208301529392505050565b8082018082111561317e5761317e6146d3565b600060208083850312156147bf57600080fd5b825167ffffffffffffffff8111156147d657600080fd5b8301601f810185136147e757600080fd5b80516147f5613e1282613dcd565b81815260069190911b8201830190838101908783111561481457600080fd5b928401925b82841015613c7d57604084890312156148325760008081fd5b61483a613d55565b845161484581613f85565b8152848601516bffffffffffffffffffffffff811681146148665760008081fd5b8187015282526040939093019290840190614819565b60005b8381101561489757818101518382015260200161487f565b50506000910152565b600081518084526148b881602086016020860161487c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b84815283602082015282604082015260806060820152600061490f60808301846148a0565b9695505050505050565b60006020828403121561492b57600080fd5b8151611a8181613f85565b602081526000611a81602083018461473a565b808202811582820484141761317e5761317e6146d3565b600082614996577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8481526001600160a01b038416602082015282604082015260a06060820152600060a082015260c06080820152600061490f60c08301846148a0565b6000602082840312156149e957600080fd5b8151611a8181613e5c565b60008251614a0681846020870161487c565b9190910192915050565b602081526000611a8160208301846148a056fea26469706673582212201fe83ad6a09c1fc13d5e3484324b6aacb2c6f941641f114786afd90f074ecf9c64736f6c634300081300330000000000000000000000002ef5818f8ae510e286540ac56b8be5910d1070d300000000000000000000000090a38d725cdc8b8622795bc0776ab72396868c2f00000000000000000000000095360c8c6af86311d4f3783970264b2a21edb6b90000000000000000000000000c6747fbf64d8dee29461941667ec3387a636d92000000000000000000000000282deae948155e761dee55d742633401ea8baa10
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101ae5760003560e01c8063a51ec36e116100ee578063db1bc87b11610097578063de9f7f9411610071578063de9f7f94146103c6578063e08a6605146103d9578063e1489191146103ec578063eb8c41b0146103f557600080fd5b8063db1bc87b14610332578063db7a460514610345578063dbe5351f146103b357600080fd5b8063b76c632b116100c8578063b76c632b146102ec578063bbfbe4511461030c578063d5a6e1951461031f57600080fd5b8063a51ec36e146102b3578063b166da42146102c6578063b6fe531a146102d957600080fd5b80635e909ef21161015b5780638456cb59116101355780638456cb59146102625780638b3545341461026a5780638db3ed601461027d578063a1714c691461029d57600080fd5b80635e909ef2146102295780636e2466a11461023c578063704b6c021461024f57600080fd5b80633f4ba83a1161018c5780633f4ba83a146102035780634415949d1461020b5780635c975abb1461021e57600080fd5b80630f707af9146101b3578063302ab6a0146101db578063355e6b43146101f0575b600080fd5b6101c66101c1366004613e7a565b610408565b60405190151581526020015b60405180910390f35b6101ee6101e9366004613fa5565b6104ac565b005b6101ee6101fe366004613fc2565b61058c565b6101ee610688565b6101ee610219366004613fc2565b610700565b60015460ff166101c6565b6101ee610237366004613fa5565b610836565b6101ee61024a366004613fdb565b61090a565b6101ee61025d366004613fa5565b610c47565b6101ee610cc1565b6101ee610278366004613fa5565b610d37565b61029061028b366004613fc2565b610dae565b6040516101d2919061407a565b6102a5600b81565b6040519081526020016101d2565b6101ee6102c136600461413d565b610f2e565b6101ee6102d4366004613fa5565b611444565b6101ee6102e7366004614201565b6114bb565b6102ff6102fa366004613fc2565b6119d3565b6040516101d29190614242565b6101ee61031a36600461431e565b611a88565b6101ee61032d366004614438565b611b20565b6101ee610340366004613fa5565b612426565b600654600754600854600554600454600354600254600154604080516001600160a01b03998a16815297891660208901529588169587019590955292861660608601529085166080850152841660a0840152831660c08301526101009081900490921660e0820152016101d2565b6101c66103c1366004614519565b61249d565b6101ee6103d4366004614639565b6125a2565b6101ee6103e7366004613fa5565b61296f565b6102a560095481565b6101ee610403366004613fa5565b6129e6565b6000610412612a5d565b61041a612ab6565b60006040518061016001604052808d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018415158152602001336001600160a01b0316815250905060008061048183612b09565b9150915061048f828261305d565b935050505061049e6001600055565b9a9950505050505050505050565b60015461010090046001600160a01b0316331461051f5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b60648201526084015b60405180910390fd5b600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f800196fd3c77c0c447a3fdcc71aa8f425a668352c5773203bb34bd0b3a1b461e906020015b60405180910390a150565b60015461010090046001600160a01b031633146105fa5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610602612ab6565b60648111156106535760405162461bcd60e51b815260206004820152601b60248201527f436f6d6d697373696f6e206973206d6f7265207468616e2031303000000000006044820152606401610516565b60098190556040518181527f6ea5803136ce7e26c33880483825cef41fb8393d74a746766d695daf98592f9490602001610581565b60015461010090046001600160a01b031633146106f65760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b6106fe613184565b565b60015461010090046001600160a01b0316331461076e5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b6000818152600b602052604081206003015460ff16600581111561079457610794614010565b036107e15760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b6000818152600b6020526040808220600e01805460ff19811660ff918216159081179092559151911615159183917f20cc8a1ce650f5020a551c89051e695cc9f73f3c9744504df1092323306f501f9190a350565b60015461010090046001600160a01b031633146108a45760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fe50fa938e83754b3b8c4fecb0966c174be972c84f855f0ef9126ba0b38c0fac890602001610581565b805160005b81811015610af05760015461010090046001600160a01b03163314806109d7575060065483516000916001600160a01b03169062fdd58e90339087908690811061095b5761095b61468b565b60200260200101516040518363ffffffff1660e01b81526004016109949291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa1580156109b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d591906146ba565b115b610a495760405162461bcd60e51b815260206004820152602560248201527f41646d696e206f72204e4654206f776e65722063616e2061636365737320626f60448201527f6f6b696e670000000000000000000000000000000000000000000000000000006064820152608401610516565b6002600b6000858481518110610a6157610a6161468b565b60209081029190910181015182528101919091526040016000206003015460ff166005811115610a9357610a93614010565b14610ae05760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b610ae981614702565b905061090f565b50600081118015610b015750600b81105b610b4d5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420696e206d61782d6d696e20626f6f6b696e67206c696d6974000000006044820152606401610516565b60005b81811015610c08576004600b6000858481518110610b7057610b7061468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff02191690836005811115610baa57610baa614010565b02179055506000600b6000858481518110610bc757610bc761468b565b60200260200101518152602001908152602001600020600e0160006101000a81548160ff02191690831515021790555080610c0190614702565b9050610b50565b507f49cb8f7c6e3b91b8f7e29b7f2635794eb0c7fe9119e19b523989d5aed8763b7a826001604051610c3b929190614775565b60405180910390a15050565b60015461010090046001600160a01b03163314610cb55760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe816131d6565b50565b60015461010090046001600160a01b03163314610d2f5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b6106fe613299565b60015461010090046001600160a01b03163314610da55760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe816132d4565b610e32604080516101e0810182526000808252602082018190529181018290529060608201908152602001600081526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b600b6000838152602001908152602001600020604051806101e00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900460ff166005811115610e9357610e93614010565b6005811115610ea457610ea4614010565b8152600482015460208201526005820154604082015260068201546001600160a01b0316606082015260078201546080820152600882015460a0820152600982015460c0820152600a82015460e0820152600b820154610100820152600c820154610120820152600d820154610140820152600e9091015460ff1615156101609091015292915050565b60015461010090046001600160a01b03163314610f9c5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610fa4612ab6565b81518015801590610fb6575060008251115b8015610fc25750815181145b8015610fce5750600b81105b61101a5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420696e206d61782d6d696e20626f6f6b696e67206c696d6974000000006044820152606401610516565b60005b8181101561127a576004600b600086848151811061103d5761103d61468b565b60209081029190910181015182528101919091526040016000206003015460ff16600581111561106f5761106f614010565b146110bc5760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b42600b60008684815181106110d3576110d361468b565b6020026020010151815260200190815260200160002060080154106111605760405162461bcd60e51b815260206004820152602260248201527f436865636b6f75742064617465206d757374206265206265666f726520746f6460448201527f61790000000000000000000000000000000000000000000000000000000000006064820152608401610516565b60065483516000916001600160a01b03169062fdd58e908690859081106111895761118961468b565b60200260200101518785815181106111a3576111a361468b565b60200260200101516040518363ffffffff1660e01b81526004016111dc9291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa1580156111f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121d91906146ba565b1161126a5760405162461bcd60e51b815260206004820152601760248201527f436865636b204e4654206f776e65722062616c616e63650000000000000000006044820152606401610516565b61127381614702565b905061101d565b5060005b81811015611404576005600b600086848151811061129e5761129e61468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff021916908360058111156112d8576112d8614010565b02179055506000600b60008684815181106112f5576112f561468b565b6020908102919091018101518252810191909152604001600020600e01805460ff191691151591909117905560065483516001600160a01b03909116906331126dd19085908490811061134a5761134a61468b565b60200260200101518684815181106113645761136461468b565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526001604482018190526064820152608401600060405180830381600087803b1580156113db57600080fd5b505af11580156113ef573d6000803e3d6000fd5b50505050806113fd90614702565b905061127e565b507f7f0a1d00121a107c9ffadb135bbca22d20c8c7fd0dc74a39fe1e7864bce14b4f836001604051611437929190614775565b60405180910390a1505050565b60015461010090046001600160a01b031633146114b25760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe81613390565b6114c3612ab6565b60015461010090046001600160a01b031633146115315760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b611539612a5d565b60026000858152600b602052604090206003015460ff16600581111561156157611561614010565b1480611592575060046000858152600b602052604090206003015460ff16600581111561159057611590614010565b145b6116035760405162461bcd60e51b8152602060048201526024808201527f4e6f74206120636f6e6669726d6564206f7220636865636b6564696e20426f6f60448201527f6b696e67000000000000000000000000000000000000000000000000000000006064820152608401610516565b6000848152600b602052604090206007015442106116895760405162461bcd60e51b815260206004820152602260248201527f436865636b696e2064617465206d75737420626520696e20746865206675747560448201527f72650000000000000000000000000000000000000000000000000000000000006064820152608401610516565b6006546040517efdd58e0000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015260248201879052600092169062fdd58e90604401602060405180830381865afa1580156116f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171691906146ba565b116117635760405162461bcd60e51b815260206004820152601760248201527f436865636b2074686520626f6f6b696e67206f776e65720000000000000000006044820152606401610516565b6000848152600b60208190526040909120908101546009909101546117889190614799565b611793906001614799565b61179d8385614799565b106117ea5760405162461bcd60e51b815260206004820152601d60248201527f5472616e7366657220616d6f756e74206578636565647320746f74616c0000006044820152606401610516565b6000848152600b602052604090206003908101805460ff19166001830217905550600480546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529182018590526001600160a01b038381166024840152169063c7c5ce3290604401600060405180830381600087803b15801561187057600080fd5b505af1158015611884573d6000803e3d6000fd5b5050600480546002546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529283018790526001600160a01b03908116602484015216925063c7c5ce329150604401600060405180830381600087803b1580156118f057600080fd5b505af1158015611904573d6000803e3d6000fd5b50506006546040517f31126dd10000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260248201899052600160448301526000606483015290911692506331126dd19150608401600060405180830381600087803b15801561197d57600080fd5b505af1158015611991573d6000803e3d6000fd5b5050604051600192508691507fe16e1da3f9457948c49dd131d2235e52b9f0b26b7b5945afe1d1901f2544ad3290600090a36119cd6001600055565b50505050565b6008546040517fb76c632b000000000000000000000000000000000000000000000000000000008152600481018390526060916000916001600160a01b039091169063b76c632b90602401600060405180830381865afa158015611a3b573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611a8191908101906147ac565b9392505050565b611a90612ab6565b611a98612a5d565b60015461010090046001600160a01b03163314611b065760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b611b118383836133f6565b611b1b6001600055565b505050565b611b28612ab6565b60015461010090046001600160a01b03163314611b965760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b611b9e612a5d565b8551855181148015611bb05750845181145b611bfc5760405162461bcd60e51b815260206004820152601860248201527f56616c69646174652049447320616e6420616d6f756e747300000000000000006044820152606401610516565b60008080805b8481101561201e576002600b60008d8481518110611c2257611c2261468b565b60209081029190910181015182528101919091526040016000206003015460ff166005811115611c5457611c54614010565b1480611ca757506004600b60008d8481518110611c7357611c7361468b565b60209081029190910181015182528101919091526040016000206003015460ff166005811115611ca557611ca5614010565b145b611d185760405162461bcd60e51b8152602060048201526024808201527f4e6f74206120636f6e6669726d6564206f7220636865636b6564696e20426f6f60448201527f6b696e67000000000000000000000000000000000000000000000000000000006064820152608401610516565b42600b60008d8481518110611d2f57611d2f61468b565b602002602001015181526020019081526020016000206007015411611dbc5760405162461bcd60e51b815260206004820152602260248201527f436865636b696e2064617465206d75737420626520696e20746865206675747560448201527f72650000000000000000000000000000000000000000000000000000000000006064820152608401610516565b6006548b516000916001600160a01b03169062fdd58e908a908f9086908110611de757611de761468b565b60200260200101516040518363ffffffff1660e01b8152600401611e209291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa158015611e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6191906146ba565b11611eae5760405162461bcd60e51b815260206004820152601f60248201527f436865636b2074686520626f6f6b696e67206f776e65722062616c616e6365006044820152606401610516565b600b60008c8381518110611ec457611ec461468b565b60200260200101518152602001908152602001600020600901546001611eea9190614799565b888281518110611efc57611efc61468b565b60200260200101518a8381518110611f1657611f1661468b565b60200260200101518c8481518110611f3057611f3061468b565b6020026020010151611f429190614799565b611f4c9190614799565b10611f995760405162461bcd60e51b815260206004820152601d60248201527f5472616e7366657220616d6f756e74206578636565647320746f74616c0000006044820152606401610516565b898181518110611fab57611fab61468b565b602002602001015184611fbe9190614799565b9350888181518110611fd257611fd261468b565b602002602001015183611fe59190614799565b9250878181518110611ff957611ff961468b565b60200260200101518261200c9190614799565b915061201781614702565b9050611c02565b506005546040517fd5d11ce30000000000000000000000000000000000000000000000000000000081526000916001600160a01b03169063d5d11ce39061206f908790879087908c906004016148ea565b602060405180830381865afa15801561208c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b09190614919565b9050866001600160a01b0316816001600160a01b0316146121135760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206f776e6572207369676e61747572650000000000000000006044820152606401610516565b60005b85811015612240576003600b60008e84815181106121365761213661468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff0219169083600581111561217057612170614010565b02179055506006548c516001600160a01b03909116906331126dd1908a908f90859081106121a0576121a061468b565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526001604482015260006064820152608401600060405180830381600087803b15801561221757600080fd5b505af115801561222b573d6000803e3d6000fd5b505050508061223990614702565b9050612116565b5083156122c857600480546002546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529283018790526001600160a01b039081166024840152169063c7c5ce3290604401600060405180830381600087803b1580156122af57600080fd5b505af11580156122c3573d6000803e3d6000fd5b505050505b821561234c57600480546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529182018590526001600160a01b038981166024840152169063c7c5ce3290604401600060405180830381600087803b15801561233357600080fd5b505af1158015612347573d6000803e3d6000fd5b505050505b81156123d357600480546002546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529283018590526001600160a01b039081166024840152169063c7c5ce3290604401600060405180830381600087803b1580156123ba57600080fd5b505af11580156123ce573d6000803e3d6000fd5b505050505b60011515837f382562eb275421e384de8040f7d8f33baea914d0f0bf2942f121f674fa1fe7fa8d6040516124079190614936565b60405180910390a3505050505061241e6001600055565b505050505050565b60015461010090046001600160a01b031633146124945760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe816137df565b60015460009061010090046001600160a01b0316331461250e5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b612516612a5d565b61251e612ab6565b60006040518061016001604052808e81526020018d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018515158152602001846001600160a01b0316815250905061258281612b09565b505060019150506125936001600055565b9b9a5050505050505050505050565b6125aa612ab6565b60015461010090046001600160a01b031633146126185760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b612620612a5d565b81518061266f5760405162461bcd60e51b815260206004820152600e60248201527f417272617920697320656d7074790000000000000000000000000000000000006044820152606401610516565b60005b818110156127b557826001600160a01b0316600b600086848151811061269a5761269a61468b565b6020908102919091018101518252810191909152604001600020600601546001600160a01b03161461270e5760405162461bcd60e51b815260206004820152601760248201527f436865636b2074686520626f6f6b696e67206f776e65720000000000000000006044820152606401610516565b6001600b60008684815181106127265761272661468b565b60209081029190910181015182528101919091526040016000206003015460ff16600581111561275857612758614010565b146127a55760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b6127ae81614702565b9050612672565b506000805b8281101561289f576003600b60008784815181106127da576127da61468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff0219169083600581111561281457612814614010565b0217905550600b600086838151811061282f5761282f61468b565b60200260200101518152602001908152602001600020600b0154600b600087848151811061285f5761285f61468b565b60200260200101518152602001908152602001600020600901546128839190614799565b61288d9083614799565b915061289881614702565b90506127ba565b50600480546040517fc7c5ce320000000000000000000000000000000000000000000000000000000081529182018390526001600160a01b038581166024840152169063c7c5ce3290604401600060405180830381600087803b15801561290557600080fd5b505af1158015612919573d6000803e3d6000fd5b5050604080518481526001600160a01b03871660208201527f70ad042c4446f366ed6a795d6f223c08f3d8594569088a5bc012d22fb2584305935001905060405180910390a1505061296b6001600055565b5050565b60015461010090046001600160a01b031633146129dd5760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe8161389b565b60015461010090046001600160a01b03163314612a545760405162461bcd60e51b815260206004820152602660248201527f4f6e6c792061646d696e206861732061636365737320746f20746869732066756044820152653731ba34b7b760d11b6064820152608401610516565b610cbe81613901565b600260005403612aaf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610516565b6002600055565b60015460ff16156106fe5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610516565b600080826020015151836000015151148015612b2b5750604083015151835151145b8015612b38575082515115155b612b845760405162461bcd60e51b815260206004820152601460248201527f41727261792073697a6573206d69736d617463680000000000000000000000006044820152606401610516565b825151600b1015612bd75760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564206d617820726f6f6d732070657220626f6f6b696e6700006044820152606401610516565b428360c0015111612c505760405162461bcd60e51b815260206004820152602260248201527f436865636b696e2064617465206d75737420626520696e20746865206675747560448201527f72650000000000000000000000000000000000000000000000000000000000006064820152608401610516565b8260c001518360e0015111612ccd5760405162461bcd60e51b815260206004820152602360248201527f436865636b6f75742064617465206d757374206265206166746572206368656360448201527f6b696e00000000000000000000000000000000000000000000000000000000006064820152608401610516565b60008060005b85515181101561305357600a60008154612cec90614702565b919050819055506000606460095488602001518481518110612d1057612d1061468b565b6020026020010151612d229190614949565b612d2c9190614960565b9050604051806101e00160405280600a548152602001600081526020018860a00151815260200160016005811115612d6657612d66614010565b815260200188606001518481518110612d8157612d8161468b565b6020026020010151815260200188608001518481518110612da457612da461468b565b602002602001015181526020018861014001516001600160a01b031681526020018860c0015181526020018860e00151815260200188600001518481518110612def57612def61468b565b6020026020010151815260200188602001518481518110612e1257612e1261468b565b6020026020010151815260200182815260200188604001518481518110612e3b57612e3b61468b565b6020026020010151815260200188610100015181526020018861012001511515815250600b6000600a54815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff02191690836005811115612ebb57612ebb614010565b02179055506080820151600482015560a0820151600582015560c08201516006820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0390921691909117905560e0820151600782015561010082015160088201556101208201516009820155610140820151600a820155610160820151600b820155610180820151600c8201556101a0820151600d8201556101c090910151600e909101805460ff19169115159190911790558651805183908110612f8d57612f8d61468b565b602002602001015184612fa09190614799565b9350612fac8184614799565b92508660a00151600a547fdadfdb06bb542df5e76b2eaa8ddb3f6e0573594c3ac29b03524b194bcff3415e8960c001518a60e001518b606001518781518110612ff757612ff761468b565b60200260200101518c6080015188815181106130155761301561468b565b6020908102919091018101516040805195865291850193909352830152606082015260800160405180910390a35061304c81614702565b9050612cd3565b5094909350915050565b60006130698383614799565b6003546040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156130ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130ee91906146ba565b101561313c5760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e742062616c616e636520666f7220626f6f6b696e676044820152606401610516565b60025460035461315b916001600160a01b0391821691339116866139bd565b60045460035461317a916001600160a01b0391821691339116856139bd565b5060015b92915050565b61318c613a45565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b03811661322c5760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610516565b600180547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038416908102919091179091556040519081527f1b651cfd0a3f185590087e7e632381434dfada46f037b9081264f9f5bdbfcd9b90602001610581565b6132a1612ab6565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336131b9565b6001600160a01b03811661332a5760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610516565b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f1cc11464818e3125e670e011d30fb41f808dfb08e16fcb8c636cc71debbe9f5c90602001610581565b600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f663aab470a3d4de7151c3b635bf05f9b424e7bfe3c7c1e1c532c4b8eed08334c90602001610581565b8251825181146134485760405162461bcd60e51b815260206004820152601760248201527f436865636b2049647320616e6420555249732073697a650000000000000000006044820152606401610516565b6000811180156134585750600b81105b6134a45760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420696e206d6178202d206d696e20626f6f6b696e67206c696d697400006044820152606401610516565b60005b818110156135ea576001600b60008784815181106134c7576134c761468b565b60209081029190910181015182528101919091526040016000206003015460ff1660058111156134f9576134f9614010565b146135465760405162461bcd60e51b815260206004820152601860248201527f436865636b2074686520426f6f6b696e672073746174757300000000000000006044820152606401610516565b826001600160a01b0316600b60008784815181106135665761356661468b565b6020908102919091018101518252810191909152604001600020600601546001600160a01b0316146135da5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920626f6f6b696e67206f776e65722063616e206d696e7400000000006044820152606401610516565b6135e381614702565b90506134a7565b5060005b8181101561379e576002600b600087848151811061360e5761360e61468b565b6020026020010151815260200190815260200160002060030160006101000a81548160ff0219169083600581111561364857613648614010565b021790555060065485516001600160a01b03909116906327481874908790849081106136765761367661468b565b6020026020010151600b60008986815181106136945761369461468b565b6020026020010151815260200190815260200160002060060160009054906101000a90046001600160a01b031660018886815181106136d5576136d561468b565b60200260200101516040518563ffffffff1660e01b81526004016136fc949392919061499b565b6020604051808303816000875af115801561371b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061373f91906146ba565b508481815181106137525761375261468b565b6020026020010151600b60008784815181106137705761377061468b565b60200260200101518152602001908152602001600020600101819055508061379790614702565b90506135ee565b507fc0c4e6551b8572e81680217d24788c2b0547caa8662bcb318c24fd222c47d9ce8460016040516137d1929190614775565b60405180910390a150505050565b6001600160a01b0381166138355760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610516565b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fd54957d43bfccc59e985b6fadd7662791d33a46b2a0a565ae92e48f8c398c51d90602001610581565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fa8879519d095f1f0b9e63ae95eab9e07ae191825e24758baa912b0b22105ce7c90602001610581565b6001600160a01b0381166139575760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610516565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f4fc5f17cec405934cce5eb341ac46bcd1116481cd94fabcfd6170e0e39775df090602001610581565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526119cd908590613a97565b60015460ff166106fe5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610516565b6000613aec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613b7f9092919063ffffffff16565b9050805160001480613b0d575080806020019051810190613b0d91906149d7565b611b1b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610516565b6060613b8e8484600085613b96565b949350505050565b606082471015613c0e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610516565b600080866001600160a01b03168587604051613c2a91906149f4565b60006040518083038185875af1925050503d8060008114613c67576040519150601f19603f3d011682016040523d82523d6000602084013e613c6c565b606091505b5091509150613c7d87838387613c88565b979650505050505050565b60608315613cf7578251600003613cf0576001600160a01b0385163b613cf05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610516565b5081613b8e565b613b8e8383815115613d0c5781518083602001fd5b8060405162461bcd60e51b81526004016105169190614a10565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613d7857613d78613d26565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613dc557613dc5613d26565b604052919050565b600067ffffffffffffffff821115613de757613de7613d26565b5060051b60200190565b600082601f830112613e0257600080fd5b81356020613e17613e1283613dcd565b613d7e565b82815260059290921b84018101918181019086841115613e3657600080fd5b8286015b84811015613e515780358352918301918301613e3a565b509695505050505050565b8015158114610cbe57600080fd5b8035613e7581613e5c565b919050565b6000806000806000806000806000806101408b8d031215613e9a57600080fd5b8a3567ffffffffffffffff80821115613eb257600080fd5b613ebe8e838f01613df1565b9b5060208d0135915080821115613ed457600080fd5b613ee08e838f01613df1565b9a5060408d0135915080821115613ef657600080fd5b613f028e838f01613df1565b995060608d0135915080821115613f1857600080fd5b613f248e838f01613df1565b985060808d0135915080821115613f3a57600080fd5b50613f478d828e01613df1565b96505060a08b0135945060c08b0135935060e08b013592506101008b01359150613f746101208c01613e6a565b90509295989b9194979a5092959850565b6001600160a01b0381168114610cbe57600080fd5b8035613e7581613f85565b600060208284031215613fb757600080fd5b8135611a8181613f85565b600060208284031215613fd457600080fd5b5035919050565b600060208284031215613fed57600080fd5b813567ffffffffffffffff81111561400457600080fd5b613b8e84828501613df1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60068110614076577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b60006101e08201905082518252602083015160208301526040830151604083015260608301516140ad606084018261403f565b506080830151608083015260a083015160a083015260c08301516140dc60c08401826001600160a01b03169052565b5060e08381015190830152610100808401519083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a080840151908301526101c0928301511515929091019190915290565b6000806040838503121561415057600080fd5b823567ffffffffffffffff8082111561416857600080fd5b61417486838701613df1565b935060209150818501358181111561418b57600080fd5b85019050601f8101861361419e57600080fd5b80356141ac613e1282613dcd565b81815260059190911b820183019083810190888311156141cb57600080fd5b928401925b828410156141f25783356141e381613f85565b825292840192908401906141d0565b80955050505050509250929050565b6000806000806080858703121561421757600080fd5b843593506020850135925060408501359150606085013561423781613f85565b939692955090935050565b602080825282518282018190526000919060409081850190868401855b8281101561429b57815180516001600160a01b031685528601516bffffffffffffffffffffffff1686850152928401929085019060010161425f565b5091979650505050505050565b600067ffffffffffffffff8311156142c2576142c2613d26565b6142f360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601613d7e565b905082815283838301111561430757600080fd5b828260208301376000602084830101529392505050565b60008060006060848603121561433357600080fd5b833567ffffffffffffffff8082111561434b57600080fd5b61435787838801613df1565b945060209150818601358181111561436e57600080fd5b8601601f8101881361437f57600080fd5b803561438d613e1282613dcd565b81815260059190911b8201840190848101908a8311156143ac57600080fd5b8584015b838110156143f9578035868111156143c85760008081fd5b8501603f81018d136143da5760008081fd5b6143eb8d89830135604084016142a8565b8452509186019186016143b0565b5080975050505050505061440f60408501613f9a565b90509250925092565b600082601f83011261442957600080fd5b611a81838335602085016142a8565b60008060008060008060c0878903121561445157600080fd5b863567ffffffffffffffff8082111561446957600080fd5b6144758a838b01613df1565b9750602089013591508082111561448b57600080fd5b6144978a838b01613df1565b965060408901359150808211156144ad57600080fd5b6144b98a838b01613df1565b955060608901359150808211156144cf57600080fd5b6144db8a838b01613df1565b94506144e960808a01613f9a565b935060a08901359150808211156144ff57600080fd5b5061450c89828a01614418565b9150509295509295509295565b60008060008060008060008060008060006101608c8e03121561453b57600080fd5b67ffffffffffffffff808d35111561455257600080fd5b61455f8e8e358f01613df1565b9b508060208e0135111561457257600080fd5b6145828e60208f01358f01613df1565b9a508060408e0135111561459557600080fd5b6145a58e60408f01358f01613df1565b99508060608e013511156145b857600080fd5b6145c88e60608f01358f01613df1565b98508060808e013511156145db57600080fd5b506145ec8d60808e01358e01613df1565b965060a08c0135955060c08c0135945060e08c013593506101008c013592506146186101208d01613e6a565b91506146276101408d01613f9a565b90509295989b509295989b9093969950565b6000806040838503121561464c57600080fd5b823567ffffffffffffffff81111561466357600080fd5b61466f85828601613df1565b925050602083013561468081613f85565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156146cc57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614733576147336146d3565b5060010190565b600081518084526020808501945080840160005b8381101561476a5781518752958201959082019060010161474e565b509495945050505050565b604081526000614788604083018561473a565b905082151560208301529392505050565b8082018082111561317e5761317e6146d3565b600060208083850312156147bf57600080fd5b825167ffffffffffffffff8111156147d657600080fd5b8301601f810185136147e757600080fd5b80516147f5613e1282613dcd565b81815260069190911b8201830190838101908783111561481457600080fd5b928401925b82841015613c7d57604084890312156148325760008081fd5b61483a613d55565b845161484581613f85565b8152848601516bffffffffffffffffffffffff811681146148665760008081fd5b8187015282526040939093019290840190614819565b60005b8381101561489757818101518382015260200161487f565b50506000910152565b600081518084526148b881602086016020860161487c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b84815283602082015282604082015260806060820152600061490f60808301846148a0565b9695505050505050565b60006020828403121561492b57600080fd5b8151611a8181613f85565b602081526000611a81602083018461473a565b808202811582820484141761317e5761317e6146d3565b600082614996577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8481526001600160a01b038416602082015282604082015260a06060820152600060a082015260c06080820152600061490f60c08301846148a0565b6000602082840312156149e957600080fd5b8151611a8181613e5c565b60008251614a0681846020870161487c565b9190910192915050565b602081526000611a8160208301846148a056fea26469706673582212201fe83ad6a09c1fc13d5e3484324b6aacb2c6f941641f114786afd90f074ecf9c64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002ef5818f8ae510e286540ac56b8be5910d1070d300000000000000000000000090a38d725cdc8b8622795bc0776ab72396868c2f00000000000000000000000095360c8c6af86311d4f3783970264b2a21edb6b90000000000000000000000000c6747fbf64d8dee29461941667ec3387a636d92000000000000000000000000282deae948155e761dee55d742633401ea8baa10
-----Decoded View---------------
Arg [0] : _bukTreasuryContract (address): 0x2eF5818F8Ae510E286540aC56B8Be5910d1070d3
Arg [1] : _stableTokenAddr (address): 0x90A38d725Cdc8B8622795bc0776aB72396868C2f
Arg [2] : _bukWalletAddr (address): 0x95360c8c6af86311d4f3783970264B2A21edB6b9
Arg [3] : _signVerifierContract (address): 0x0C6747fBf64d8dEe29461941667eC3387A636D92
Arg [4] : _royaltiesContractAddr (address): 0x282DEae948155E761dEe55d742633401EA8BaA10
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000002ef5818f8ae510e286540ac56b8be5910d1070d3
Arg [1] : 00000000000000000000000090a38d725cdc8b8622795bc0776ab72396868c2f
Arg [2] : 00000000000000000000000095360c8c6af86311d4f3783970264b2a21edb6b9
Arg [3] : 0000000000000000000000000c6747fbf64d8dee29461941667ec3387a636d92
Arg [4] : 000000000000000000000000282deae948155e761dee55d742633401ea8baa10
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.