Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
BulletLoans
Compiler Version
v0.8.10+commit.fc410830
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import {ERC721} from "ERC721.sol"; import {IERC20} from "IERC20.sol"; import {InitializableManageable} from "InitializableManageable.sol"; import {IBulletLoans, BulletLoanStatus} from "IBulletLoans.sol"; import {IBorrowerSignatureVerifier} from "IBorrowerSignatureVerifier.sol"; contract BulletLoans is ERC721, InitializableManageable, IBulletLoans { struct LoanMetadata { IERC20 underlyingToken; BulletLoanStatus status; uint256 principal; uint256 totalDebt; uint256 amountRepaid; uint256 duration; uint256 repaymentDate; address recipient; } uint256 nextId; mapping(uint256 => LoanMetadata) public override loans; IBorrowerSignatureVerifier public borrowerSignatureVerifier; event LoanCreated(uint256 instrumentId); event LoanRepaid(uint256 instrumentId, uint256 amount); event LoanStatusChanged(uint256 instrumentId, BulletLoanStatus newStatus); event LoanParametersChanged(uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate); constructor() ERC721("BulletLoans", "BulletLoans") InitializableManageable(msg.sender) {} function initialize(IBorrowerSignatureVerifier _borrowerSignatureVerifier) external initializer { InitializableManageable.initialize(msg.sender); borrowerSignatureVerifier = _borrowerSignatureVerifier; } function createLoan( IERC20 _underlyingToken, uint256 _principal, uint256 _totalDebt, uint256 _duration, address _recipient ) public override returns (uint256) { uint256 instrumentId = nextId++; loans[instrumentId] = LoanMetadata( _underlyingToken, BulletLoanStatus.Issued, _principal, _totalDebt, 0, _duration, _duration + block.timestamp, _recipient ); _safeMint(msg.sender, instrumentId); emit LoanCreated(instrumentId); return instrumentId; } function repay(uint256 instrumentId, uint256 amount) public override { require(_exists(instrumentId), "BulletLoans: Cannot repay non-existent loan"); require(getStatus(instrumentId) == BulletLoanStatus.Issued, "BulletLoans: Can only repay issued loan"); LoanMetadata storage loan = loans[instrumentId]; loan.amountRepaid += amount; if (loan.amountRepaid >= loan.totalDebt) { loan.status = BulletLoanStatus.FullyRepaid; } loan.underlyingToken.transferFrom(msg.sender, ownerOf(instrumentId), amount); emit LoanRepaid(instrumentId, amount); } function markLoanAsDefaulted(uint256 instrumentId) public override { require(ownerOf(instrumentId) == msg.sender, "BulletLoans: Caller is not the owner of the loan"); require(loans[instrumentId].status != BulletLoanStatus.Defaulted, "BulletLoans: Loan is already defaulted"); _changeLoanStatus(instrumentId, BulletLoanStatus.Defaulted); } function markLoanAsResolved(uint256 instrumentId) public { require(ownerOf(instrumentId) == msg.sender, "BulletLoans: Caller is not the owner of the loan"); require(loans[instrumentId].status == BulletLoanStatus.Defaulted, "BulletLoans: Cannot resolve not defaulted loan"); _changeLoanStatus(instrumentId, BulletLoanStatus.Resolved); } function name() public pure override returns (string memory) { return "BulletLoans"; } function symbol() public pure override returns (string memory) { return "BulletLoans"; } function principal(uint256 instrumentId) public view override returns (uint256) { return loans[instrumentId].principal; } function underlyingToken(uint256 instrumentId) public view override returns (IERC20) { return loans[instrumentId].underlyingToken; } function recipient(uint256 instrumentId) public view override returns (address) { return loans[instrumentId].recipient; } function endDate(uint256 instrumentId) public view override returns (uint256) { return loans[instrumentId].repaymentDate; } function unpaidDebt(uint256 instrumentId) public view returns (uint256) { LoanMetadata memory loan = loans[instrumentId]; return saturatingSub(loan.totalDebt, loan.amountRepaid); } function getStatus(uint256 instrumentId) public view returns (BulletLoanStatus) { require(_exists(instrumentId), "BulletLoans: Cannot get status of non-existent loan"); return loans[instrumentId].status; } function _changeLoanStatus(uint256 instrumentId, BulletLoanStatus status) private { loans[instrumentId].status = status; emit LoanStatusChanged(instrumentId, status); } function saturatingSub(uint256 a, uint256 b) private pure returns (uint256) { return a > b ? a - b : 0; } function updateLoanParameters( uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate ) external { require(ownerOf(instrumentId) == msg.sender, "BulletLoans: Caller is not the owner of the loan"); LoanMetadata storage loan = loans[instrumentId]; require(newTotalDebt <= loan.totalDebt, "BulletLoans: Loan total debt cannot be increased without borrower consent"); require(newRepaymentDate >= loan.repaymentDate, "BulletLoans: Loan end date cannot be decreased without borrower consent"); loan.totalDebt = newTotalDebt; loan.repaymentDate = newRepaymentDate; if (loan.amountRepaid >= loan.totalDebt && loan.status == BulletLoanStatus.Issued) { loan.status = BulletLoanStatus.FullyRepaid; } emit LoanParametersChanged(instrumentId, newTotalDebt, newRepaymentDate); } function updateLoanParameters( uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate, bytes memory borrowerSignature ) external { require(ownerOf(instrumentId) == msg.sender, "BulletLoans: Caller is not the owner of the loan"); LoanMetadata storage loan = loans[instrumentId]; require( borrowerSignatureVerifier.verify(loan.recipient, instrumentId, newTotalDebt, newRepaymentDate, borrowerSignature), "BulletLoans: Signature is invalid" ); loan.totalDebt = newTotalDebt; loan.repaymentDate = newRepaymentDate; emit LoanParametersChanged(instrumentId, newTotalDebt, newRepaymentDate); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "IERC721.sol"; import "IERC721Receiver.sol"; import "IERC721Metadata.sol"; import "Address.sol"; import "Context.sol"; import "Strings.sol"; import "ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "IBeacon.sol"; import "Address.sol"; import "StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967Upgrade { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure( address newImplementation, bytes memory data, bool forceCall ) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; Address.functionDelegateCall( newImplementation, abi.encodeWithSignature("upgradeTo(address)", oldImplementation) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _upgradeTo(newImplementation); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "ERC1967Upgrade.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is ERC1967Upgrade { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; contract Manageable { address public manager; address public pendingManager; event ManagementTransferred(address indexed oldManager, address indexed newManager); modifier onlyManager() { require(manager == msg.sender, "Manageable: Caller is not the manager"); _; } constructor(address _manager) { _setManager(_manager); } function transferManagement(address newManager) public onlyManager { pendingManager = newManager; } function claimManagement() public { require(pendingManager == msg.sender, "Manageable: Caller is not the pending manager"); _setManager(pendingManager); pendingManager = address(0); } function _setManager(address newManager) internal { address oldManager = manager; manager = newManager; emit ManagementTransferred(oldManager, newManager); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import {Initializable} from "Initializable.sol"; import {UUPSUpgradeable} from "UUPSUpgradeable.sol"; import {Address} from "Address.sol"; import {Manageable} from "Manageable.sol"; abstract contract InitializableManageable is UUPSUpgradeable, Manageable, Initializable { constructor(address manager) Manageable(manager) {} function initialize(address _manager) internal initializer { _setManager(_manager); } function _authorizeUpgrade(address) internal override onlyManager {} }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import {IERC20} from "IERC20.sol"; import {IERC721} from "IERC721.sol"; interface IFinancialInstrument is IERC721 { function principal(uint256 instrumentId) external view returns (uint256); function underlyingToken(uint256 instrumentId) external view returns (IERC20); function recipient(uint256 instrumentId) external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import {IFinancialInstrument} from "IFinancialInstrument.sol"; interface IDebtInstrument is IFinancialInstrument { function endDate(uint256 instrumentId) external view returns (uint256); function repay(uint256 instrumentId, uint256 amount) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import {IERC20} from "IERC20.sol"; import {IDebtInstrument} from "IDebtInstrument.sol"; enum BulletLoanStatus { Issued, FullyRepaid, Defaulted, Resolved } interface IBulletLoans is IDebtInstrument { function loans(uint256 id) external view returns ( IERC20, BulletLoanStatus, uint256, uint256, uint256, uint256, uint256, address ); function createLoan( IERC20 _underlyingToken, uint256 principal, uint256 totalDebt, uint256 duration, address recipient ) external returns (uint256); function markLoanAsDefaulted(uint256 instrumentId) external; function markLoanAsResolved(uint256 instrumentId) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; interface IBorrowerSignatureVerifier { function verify( address borrower, uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate, bytes memory signature ) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 20000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"LoanCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"instrumentId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalDebt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRepaymentDate","type":"uint256"}],"name":"LoanParametersChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"instrumentId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LoanRepaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"instrumentId","type":"uint256"},{"indexed":false,"internalType":"enum BulletLoanStatus","name":"newStatus","type":"uint8"}],"name":"LoanStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldManager","type":"address"},{"indexed":true,"internalType":"address","name":"newManager","type":"address"}],"name":"ManagementTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowerSignatureVerifier","outputs":[{"internalType":"contract IBorrowerSignatureVerifier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_underlyingToken","type":"address"},{"internalType":"uint256","name":"_principal","type":"uint256"},{"internalType":"uint256","name":"_totalDebt","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"createLoan","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"endDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"getStatus","outputs":[{"internalType":"enum BulletLoanStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBorrowerSignatureVerifier","name":"_borrowerSignatureVerifier","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"loans","outputs":[{"internalType":"contract IERC20","name":"underlyingToken","type":"address"},{"internalType":"enum BulletLoanStatus","name":"status","type":"uint8"},{"internalType":"uint256","name":"principal","type":"uint256"},{"internalType":"uint256","name":"totalDebt","type":"uint256"},{"internalType":"uint256","name":"amountRepaid","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"repaymentDate","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"markLoanAsDefaulted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"markLoanAsResolved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"principal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"repay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newManager","type":"address"}],"name":"transferManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"underlyingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"}],"name":"unpaidDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"},{"internalType":"uint256","name":"newTotalDebt","type":"uint256"},{"internalType":"uint256","name":"newRepaymentDate","type":"uint256"},{"internalType":"bytes","name":"borrowerSignature","type":"bytes"}],"name":"updateLoanParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentId","type":"uint256"},{"internalType":"uint256","name":"newTotalDebt","type":"uint256"},{"internalType":"uint256","name":"newRepaymentDate","type":"uint256"}],"name":"updateLoanParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b50604080518082018252600b8082526a42756c6c65744c6f616e7360a81b602080840182815285518087019096529285528401528151339384939290916200006091600091620000e4565b50805162000076906001906020840190620000e4565b5050506200008a816200009260201b60201c565b5050620001c7565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f80f15e9dbc60884fdb59fb8ed4fc48a9a689e028f055e893ed45ca5be67c5c8590600090a35050565b828054620000f2906200018a565b90600052602060002090601f01602090048101928262000116576000855562000161565b82601f106200013157805160ff191683800117855562000161565b8280016001018555821562000161579182015b828111156200016157825182559160200191906001019062000144565b506200016f92915062000173565b5090565b5b808211156200016f576000815560010162000174565b600181811c908216806200019f57607f821691505b60208210811415620001c157634e487b7160e01b600052602260045260246000fd5b50919050565b608051613e36620001f860003960008181610c9101528181610d2701528181610fcd01526110630152613e366000f3fe6080604052600436106102195760003560e01c806370a082311161011d578063b88d4fde116100b0578063c87b56dd1161007f578063e1ec3c6811610064578063e1ec3c68146106dc578063e4edf85214610775578063e985e9c51461079557600080fd5b8063c87b56dd1461069c578063d8aed145146106bc57600080fd5b8063b88d4fde146105f6578063be5e5c1b14610616578063bede45391461065c578063c4d66de81461067c57600080fd5b80639b365a41116100ec5780639b365a4114610569578063a00fff6f14610589578063a22cb465146105b6578063b4f99d90146105d657600080fd5b806370a08231146104e65780637b1a76ee1461050657806394ac6f9e1461052657806395d89b411461025357600080fd5b806341b88111116101b05780634f1ef2861161017f578063631d943011610164578063631d9430146104795780636352211e146104995780636a0f8bb4146104b957600080fd5b80634f1ef286146104395780635c622a0e1461044c57600080fd5b806341b881111461039c57806342842e0e146103bc578063481c6a75146103dc5780634cac5b4b1461040957600080fd5b8063147983d3116101ec578063147983d31461030957806314f294931461031e57806323b872dd1461035c5780633659cfe61461037c57600080fd5b806301ffc9a71461021e57806306fdde0314610253578063081812fc146102a2578063095ea7b3146102e7575b600080fd5b34801561022a57600080fd5b5061023e610239366004613663565b6107eb565b60405190151581526020015b60405180910390f35b34801561025f57600080fd5b5060408051808201909152600b81527f42756c6c65744c6f616e7300000000000000000000000000000000000000000060208201525b60405161024a91906136f6565b3480156102ae57600080fd5b506102c26102bd366004613709565b6108d0565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161024a565b3480156102f357600080fd5b50610307610302366004613744565b610995565b005b34801561031557600080fd5b50610307610b19565b34801561032a57600080fd5b5061034e610339366004613709565b60009081526009602052604090206001015490565b60405190815260200161024a565b34801561036857600080fd5b50610307610377366004613770565b610bf2565b34801561038857600080fd5b506103076103973660046137b1565b610c79565b3480156103a857600080fd5b506103076103b7366004613709565b610e4b565b3480156103c857600080fd5b506103076103d7366004613770565b610f9a565b3480156103e857600080fd5b506006546102c29073ffffffffffffffffffffffffffffffffffffffff1681565b34801561041557600080fd5b5061034e610424366004613709565b60009081526009602052604090206005015490565b6103076104473660046138a8565b610fb5565b34801561045857600080fd5b5061046c610467366004613709565b611178565b60405161024a9190613962565b34801561048557600080fd5b5061034e610494366004613970565b61123d565b3480156104a557600080fd5b506102c26104b4366004613709565b611429565b3480156104c557600080fd5b50600a546102c29073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104f257600080fd5b5061034e6105013660046137b1565b6114c1565b34801561051257600080fd5b506103076105213660046139c6565b611575565b34801561053257600080fd5b506102c2610541366004613709565b60009081526009602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b34801561057557600080fd5b5061034e610584366004613709565b611785565b34801561059557600080fd5b506007546102c29073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105c257600080fd5b506103076105d1366004613a2e565b6118a4565b3480156105e257600080fd5b506103076105f1366004613709565b6118af565b34801561060257600080fd5b50610307610611366004613a67565b6119fd565b34801561062257600080fd5b506102c2610631366004613709565b60009081526009602052604090206006015473ffffffffffffffffffffffffffffffffffffffff1690565b34801561066857600080fd5b50610307610677366004613abb565b611a8b565b34801561068857600080fd5b506103076106973660046137b1565b611d45565b3480156106a857600080fd5b506102956106b7366004613709565b611ee4565b3480156106c857600080fd5b506103076106d7366004613ae7565b611fe6565b3480156106e857600080fd5b506107616106f7366004613709565b600960205260009081526040902080546001820154600283015460038401546004850154600586015460069096015473ffffffffffffffffffffffffffffffffffffffff808716977401000000000000000000000000000000000000000090970460ff1696911688565b60405161024a989796959493929190613b09565b34801561078157600080fd5b506103076107903660046137b1565b612284565b3480156107a157600080fd5b5061023e6107b0366004613b6a565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061087e57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806108ca57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1661096c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006109a082611429565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a445760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610963565b3373ffffffffffffffffffffffffffffffffffffffff82161480610a98575073ffffffffffffffffffffffffffffffffffffffff8116600090815260056020908152604080832033845290915290205460ff165b610b0a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610963565b610b148383612358565b505050565b60075473ffffffffffffffffffffffffffffffffffffffff163314610ba65760405162461bcd60e51b815260206004820152602d60248201527f4d616e61676561626c653a2043616c6c6572206973206e6f742074686520706560448201527f6e64696e67206d616e61676572000000000000000000000000000000000000006064820152608401610963565b600754610bc89073ffffffffffffffffffffffffffffffffffffffff166123f8565b600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b610bfc338261246f565b610c6e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610963565b610b148383836125c5565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610d255760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610963565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610d9a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610e235760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610963565b610e2c816127f8565b60408051600080825260208201909252610e4891839190612885565b50565b33610e5582611429565b73ffffffffffffffffffffffffffffffffffffffff1614610ede5760405162461bcd60e51b815260206004820152603060248201527f42756c6c65744c6f616e733a2043616c6c6572206973206e6f7420746865206f60448201527f776e6572206f6620746865206c6f616e000000000000000000000000000000006064820152608401610963565b600260008281526009602052604090205474010000000000000000000000000000000000000000900460ff166003811115610f1b57610f1b6138f8565b1415610f8f5760405162461bcd60e51b815260206004820152602660248201527f42756c6c65744c6f616e733a204c6f616e20697320616c72656164792064656660448201527f61756c74656400000000000000000000000000000000000000000000000000006064820152608401610963565b610e48816002612aca565b610b14838383604051806020016040528060008152506119fd565b3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156110615760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610963565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166110d67f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161461115f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610963565b611168826127f8565b61117482826001612885565b5050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1661120f5760405162461bcd60e51b815260206004820152603360248201527f42756c6c65744c6f616e733a2043616e6e6f742067657420737461747573206f60448201527f66206e6f6e2d6578697374656e74206c6f616e000000000000000000000000006064820152608401610963565b5060009081526009602052604090205474010000000000000000000000000000000000000000900460ff1690565b600880546000918291908261125183613bc7565b9091555060408051610100810190915273ffffffffffffffffffffffffffffffffffffffff8916815290915060208101600081526020018781526020018681526020016000815260200185815260200142866112ad9190613c00565b815273ffffffffffffffffffffffffffffffffffffffff808616602092830152600084815260098352604090208351815492167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178255928401519092909183917fffffffffffffffffffffff000000000000000000000000000000000000000000909116177401000000000000000000000000000000000000000083600381111561135e5761135e6138f8565b021790555060408201516001820155606082015160028201556080820151600382015560a0820151600482015560c0820151600582015560e090910151600690910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556113ec3382612b69565b6040518181527f2abd59ed776138fb6191e8e3313cd669b51d5a2cab430c2ba0bf2f0cf0c0c4259060200160405180910390a19695505050505050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806108ca5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610963565b600073ffffffffffffffffffffffffffffffffffffffff821661154c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610963565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b3361157f85611429565b73ffffffffffffffffffffffffffffffffffffffff16146116085760405162461bcd60e51b815260206004820152603060248201527f42756c6c65744c6f616e733a2043616c6c6572206973206e6f7420746865206f60448201527f776e6572206f6620746865206c6f616e000000000000000000000000000000006064820152608401610963565b60008481526009602052604090819020600a54600682015492517f26b28edf000000000000000000000000000000000000000000000000000000008152919273ffffffffffffffffffffffffffffffffffffffff918216926326b28edf9261167c9216908990899089908990600401613c18565b602060405180830381865afa158015611699573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bd9190613c64565b61172f5760405162461bcd60e51b815260206004820152602160248201527f42756c6c65744c6f616e733a205369676e617475726520697320696e76616c6960448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610963565b600281018490556005810183905560408051868152602081018690529081018490527f744c480c345d73fed539c73c80c6ea46c302a3f03961b95c11acd7309f73f8fb9060600160405180910390a15050505050565b600081815260096020908152604080832081516101008101909252805473ffffffffffffffffffffffffffffffffffffffff81168352849383019074010000000000000000000000000000000000000000900460ff1660038111156117ec576117ec6138f8565b60038111156117fd576117fd6138f8565b815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905061189d81606001518260800151612b83565b9392505050565b611174338383612b9d565b336118b982611429565b73ffffffffffffffffffffffffffffffffffffffff16146119425760405162461bcd60e51b815260206004820152603060248201527f42756c6c65744c6f616e733a2043616c6c6572206973206e6f7420746865206f60448201527f776e6572206f6620746865206c6f616e000000000000000000000000000000006064820152608401610963565b600260008281526009602052604090205474010000000000000000000000000000000000000000900460ff16600381111561197f5761197f6138f8565b146119f25760405162461bcd60e51b815260206004820152602e60248201527f42756c6c65744c6f616e733a2043616e6e6f74207265736f6c7665206e6f742060448201527f64656661756c746564206c6f616e0000000000000000000000000000000000006064820152608401610963565b610e48816003612aca565b611a07338361246f565b611a795760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610963565b611a8584848484612cb1565b50505050565b33611a9584611429565b73ffffffffffffffffffffffffffffffffffffffff1614611b1e5760405162461bcd60e51b815260206004820152603060248201527f42756c6c65744c6f616e733a2043616c6c6572206973206e6f7420746865206f60448201527f776e6572206f6620746865206c6f616e000000000000000000000000000000006064820152608401610963565b60008381526009602052604090206002810154831115611bcc5760405162461bcd60e51b815260206004820152604960248201527f42756c6c65744c6f616e733a204c6f616e20746f74616c20646562742063616e60448201527f6e6f7420626520696e6372656173656420776974686f757420626f72726f776560648201527f7220636f6e73656e740000000000000000000000000000000000000000000000608482015260a401610963565b8060050154821015611c6c5760405162461bcd60e51b815260206004820152604760248201527f42756c6c65744c6f616e733a204c6f616e20656e6420646174652063616e6e6f60448201527f742062652064656372656173656420776974686f757420626f72726f7765722060648201527f636f6e73656e7400000000000000000000000000000000000000000000000000608482015260a401610963565b600281018390556005810182905560038101548311801590611cbb57506000815474010000000000000000000000000000000000000000900460ff166003811115611cb957611cb96138f8565b145b15611cfe5780547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001781555b60408051858152602081018590529081018390527f744c480c345d73fed539c73c80c6ea46c302a3f03961b95c11acd7309f73f8fb9060600160405180910390a150505050565b6007547501000000000000000000000000000000000000000000900460ff16611d8c5760075474010000000000000000000000000000000000000000900460ff1615611d90565b303b155b611e025760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610963565b6007547501000000000000000000000000000000000000000000900460ff16158015611e6957600780547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff1675010100000000000000000000000000000000000000001790555b611e7233612d3a565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416179055801561117457600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690555050565b60008181526002602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16611f7e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610963565b6000611f9560408051602081019091526000815290565b90506000815111611fb5576040518060200160405280600081525061189d565b80611fbf84612e99565b604051602001611fd0929190613c81565b6040516020818303038152906040529392505050565b60008281526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1661207d5760405162461bcd60e51b815260206004820152602b60248201527f42756c6c65744c6f616e733a2043616e6e6f74207265706179206e6f6e2d657860448201527f697374656e74206c6f616e0000000000000000000000000000000000000000006064820152608401610963565b600061208883611178565b6003811115612099576120996138f8565b1461210c5760405162461bcd60e51b815260206004820152602760248201527f42756c6c65744c6f616e733a2043616e206f6e6c79207265706179206973737560448201527f6564206c6f616e000000000000000000000000000000000000000000000000006064820152608401610963565b60008281526009602052604081206003810180549192849261212f908490613c00565b909155505060028101546003820154106121815780547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001781555b805473ffffffffffffffffffffffffffffffffffffffff166323b872dd336121a886611429565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604481018590526064016020604051808303816000875af1158015612221573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122459190613c64565b5060408051848152602081018490527f040cee90ee4799897c30ca04e5feb6fa43dbba9b6d084b4b257cdafd84ba013e910160405180910390a1505050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146123115760405162461bcd60e51b815260206004820152602560248201527f4d616e61676561626c653a2043616c6c6572206973206e6f7420746865206d6160448201527f6e616765720000000000000000000000000000000000000000000000000000006064820152608401610963565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906123b282611429565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f80f15e9dbc60884fdb59fb8ed4fc48a9a689e028f055e893ed45ca5be67c5c8590600090a35050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff166125065760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610963565b600061251183611429565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061258057508373ffffffffffffffffffffffffffffffffffffffff16612568846108d0565b73ffffffffffffffffffffffffffffffffffffffff16145b806125bd575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166125e582611429565b73ffffffffffffffffffffffffffffffffffffffff161461266e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610963565b73ffffffffffffffffffffffffffffffffffffffff82166126f65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610963565b612701600082612358565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120805460019290612737908490613cb0565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290612772908490613c00565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610e485760405162461bcd60e51b815260206004820152602560248201527f4d616e61676561626c653a2043616c6c6572206973206e6f7420746865206d6160448201527f6e616765720000000000000000000000000000000000000000000000000000006064820152608401610963565b60006128c57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b90506128d084612fcb565b6000835111806128dd5750815b156128ee576128ec84846130a5565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16612ac35780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815560405173ffffffffffffffffffffffffffffffffffffffff831660248201526129e4908690604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f3659cfe6000000000000000000000000000000000000000000000000000000001790526130a5565b5080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff838116911614612aba5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201527f75727468657220757067726164657300000000000000000000000000000000006064820152608401610963565b612ac3856130ca565b5050505050565b600082815260096020526040902080548291907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000836003811115612b2757612b276138f8565b02179055507f9d0b8f6161220422fcfcf3cbe3b12d5148060bea52d7d74395488cae75d2e46f8282604051612b5d929190613cc7565b60405180910390a15050565b611174828260405180602001604052806000815250613117565b6000818311612b9357600061189d565b61189d8284613cb0565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612c195760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610963565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612cbc8484846125c5565b612cc8848484846131a0565b611a855760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610963565b6007547501000000000000000000000000000000000000000000900460ff16612d815760075474010000000000000000000000000000000000000000900460ff1615612d85565b303b155b612df75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610963565b6007547501000000000000000000000000000000000000000000900460ff16158015612e5e57600780547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff1675010100000000000000000000000000000000000000001790555b612e67826123f8565b801561117457600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690555050565b606081612ed957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612f035780612eed81613bc7565b9150612efc9050600a83613d0a565b9150612edd565b60008167ffffffffffffffff811115612f1e57612f1e6137ce565b6040519080825280601f01601f191660200182016040528015612f48576020820181803683370190505b5090505b84156125bd57612f5d600183613cb0565b9150612f6a600a86613d1e565b612f75906030613c00565b60f81b818381518110612f8a57612f8a613d32565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612fc4600a86613d0a565b9450612f4c565b803b61303f5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610963565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606061189d8383604051806060016040528060278152602001613dda60279139613376565b6130d381612fcb565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b613121838361346e565b61312e60008484846131a0565b610b145760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610963565b600073ffffffffffffffffffffffffffffffffffffffff84163b1561336b576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613217903390899088908890600401613d61565b6020604051808303816000875af1925050508015613270575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261326d91810190613da0565b60015b613320573d80801561329e576040519150601f19603f3d011682016040523d82523d6000602084013e6132a3565b606091505b5080516133185760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610963565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506125bd565b506001949350505050565b6060833b6133ec5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610963565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516134149190613dbd565b600060405180830381855af49150503d806000811461344f576040519150601f19603f3d011682016040523d82523d6000602084013e613454565b606091505b50915091506134648282866135fc565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff82166134d15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610963565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156135435760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610963565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290613579908490613c00565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060831561360b57508161189d565b82511561361b5782518084602001fd5b8160405162461bcd60e51b815260040161096391906136f6565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e4857600080fd5b60006020828403121561367557600080fd5b813561189d81613635565b60005b8381101561369b578181015183820152602001613683565b83811115611a855750506000910152565b600081518084526136c4816020860160208601613680565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061189d60208301846136ac565b60006020828403121561371b57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610e4857600080fd5b6000806040838503121561375757600080fd5b823561376281613722565b946020939093013593505050565b60008060006060848603121561378557600080fd5b833561379081613722565b925060208401356137a081613722565b929592945050506040919091013590565b6000602082840312156137c357600080fd5b813561189d81613722565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261380e57600080fd5b813567ffffffffffffffff80821115613829576138296137ce565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561386f5761386f6137ce565b8160405283815286602085880101111561388857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156138bb57600080fd5b82356138c681613722565b9150602083013567ffffffffffffffff8111156138e257600080fd5b6138ee858286016137fd565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6004811061395e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b602081016108ca8284613927565b600080600080600060a0868803121561398857600080fd5b853561399381613722565b945060208601359350604086013592506060860135915060808601356139b881613722565b809150509295509295909350565b600080600080608085870312156139dc57600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff811115613a0857600080fd5b613a14878288016137fd565b91505092959194509250565b8015158114610e4857600080fd5b60008060408385031215613a4157600080fd5b8235613a4c81613722565b91506020830135613a5c81613a20565b809150509250929050565b60008060008060808587031215613a7d57600080fd5b8435613a8881613722565b93506020850135613a9881613722565b925060408501359150606085013567ffffffffffffffff811115613a0857600080fd5b600080600060608486031215613ad057600080fd5b505081359360208301359350604090920135919050565b60008060408385031215613afa57600080fd5b50508035926020909101359150565b73ffffffffffffffffffffffffffffffffffffffff8981168252610100820190613b36602084018b613927565b8860408401528760608401528660808401528560a08401528460c084015280841660e0840152509998505050505050505050565b60008060408385031215613b7d57600080fd5b8235613b8881613722565b91506020830135613a5c81613722565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613bf957613bf9613b98565b5060010190565b60008219821115613c1357613c13613b98565b500190565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015283604082015282606082015260a060808201526000613c5960a08301846136ac565b979650505050505050565b600060208284031215613c7657600080fd5b815161189d81613a20565b60008351613c93818460208801613680565b835190830190613ca7818360208801613680565b01949350505050565b600082821015613cc257613cc2613b98565b500390565b8281526040810161189d6020830184613927565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613d1957613d19613cdb565b500490565b600082613d2d57613d2d613cdb565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261346460808301846136ac565b600060208284031215613db257600080fd5b815161189d81613635565b60008251613dcf818460208701613680565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205b69326f39499b7008f876e801ff40d7f3649d96e0c1a6ee7806920929bca6ae64736f6c634300080a0033
Deployed Bytecode
0x6080604052600436106102195760003560e01c806370a082311161011d578063b88d4fde116100b0578063c87b56dd1161007f578063e1ec3c6811610064578063e1ec3c68146106dc578063e4edf85214610775578063e985e9c51461079557600080fd5b8063c87b56dd1461069c578063d8aed145146106bc57600080fd5b8063b88d4fde146105f6578063be5e5c1b14610616578063bede45391461065c578063c4d66de81461067c57600080fd5b80639b365a41116100ec5780639b365a4114610569578063a00fff6f14610589578063a22cb465146105b6578063b4f99d90146105d657600080fd5b806370a08231146104e65780637b1a76ee1461050657806394ac6f9e1461052657806395d89b411461025357600080fd5b806341b88111116101b05780634f1ef2861161017f578063631d943011610164578063631d9430146104795780636352211e146104995780636a0f8bb4146104b957600080fd5b80634f1ef286146104395780635c622a0e1461044c57600080fd5b806341b881111461039c57806342842e0e146103bc578063481c6a75146103dc5780634cac5b4b1461040957600080fd5b8063147983d3116101ec578063147983d31461030957806314f294931461031e57806323b872dd1461035c5780633659cfe61461037c57600080fd5b806301ffc9a71461021e57806306fdde0314610253578063081812fc146102a2578063095ea7b3146102e7575b600080fd5b34801561022a57600080fd5b5061023e610239366004613663565b6107eb565b60405190151581526020015b60405180910390f35b34801561025f57600080fd5b5060408051808201909152600b81527f42756c6c65744c6f616e7300000000000000000000000000000000000000000060208201525b60405161024a91906136f6565b3480156102ae57600080fd5b506102c26102bd366004613709565b6108d0565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161024a565b3480156102f357600080fd5b50610307610302366004613744565b610995565b005b34801561031557600080fd5b50610307610b19565b34801561032a57600080fd5b5061034e610339366004613709565b60009081526009602052604090206001015490565b60405190815260200161024a565b34801561036857600080fd5b50610307610377366004613770565b610bf2565b34801561038857600080fd5b506103076103973660046137b1565b610c79565b3480156103a857600080fd5b506103076103b7366004613709565b610e4b565b3480156103c857600080fd5b506103076103d7366004613770565b610f9a565b3480156103e857600080fd5b506006546102c29073ffffffffffffffffffffffffffffffffffffffff1681565b34801561041557600080fd5b5061034e610424366004613709565b60009081526009602052604090206005015490565b6103076104473660046138a8565b610fb5565b34801561045857600080fd5b5061046c610467366004613709565b611178565b60405161024a9190613962565b34801561048557600080fd5b5061034e610494366004613970565b61123d565b3480156104a557600080fd5b506102c26104b4366004613709565b611429565b3480156104c557600080fd5b50600a546102c29073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104f257600080fd5b5061034e6105013660046137b1565b6114c1565b34801561051257600080fd5b506103076105213660046139c6565b611575565b34801561053257600080fd5b506102c2610541366004613709565b60009081526009602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b34801561057557600080fd5b5061034e610584366004613709565b611785565b34801561059557600080fd5b506007546102c29073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105c257600080fd5b506103076105d1366004613a2e565b6118a4565b3480156105e257600080fd5b506103076105f1366004613709565b6118af565b34801561060257600080fd5b50610307610611366004613a67565b6119fd565b34801561062257600080fd5b506102c2610631366004613709565b60009081526009602052604090206006015473ffffffffffffffffffffffffffffffffffffffff1690565b34801561066857600080fd5b50610307610677366004613abb565b611a8b565b34801561068857600080fd5b506103076106973660046137b1565b611d45565b3480156106a857600080fd5b506102956106b7366004613709565b611ee4565b3480156106c857600080fd5b506103076106d7366004613ae7565b611fe6565b3480156106e857600080fd5b506107616106f7366004613709565b600960205260009081526040902080546001820154600283015460038401546004850154600586015460069096015473ffffffffffffffffffffffffffffffffffffffff808716977401000000000000000000000000000000000000000090970460ff1696911688565b60405161024a989796959493929190613b09565b34801561078157600080fd5b506103076107903660046137b1565b612284565b3480156107a157600080fd5b5061023e6107b0366004613b6a565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061087e57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806108ca57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1661096c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006109a082611429565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a445760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610963565b3373ffffffffffffffffffffffffffffffffffffffff82161480610a98575073ffffffffffffffffffffffffffffffffffffffff8116600090815260056020908152604080832033845290915290205460ff165b610b0a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610963565b610b148383612358565b505050565b60075473ffffffffffffffffffffffffffffffffffffffff163314610ba65760405162461bcd60e51b815260206004820152602d60248201527f4d616e61676561626c653a2043616c6c6572206973206e6f742074686520706560448201527f6e64696e67206d616e61676572000000000000000000000000000000000000006064820152608401610963565b600754610bc89073ffffffffffffffffffffffffffffffffffffffff166123f8565b600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b610bfc338261246f565b610c6e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610963565b610b148383836125c5565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008ddf7021fea12a277f75414a1bac32f1586cb5e6161415610d255760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610963565b7f0000000000000000000000008ddf7021fea12a277f75414a1bac32f1586cb5e673ffffffffffffffffffffffffffffffffffffffff16610d9a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610e235760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610963565b610e2c816127f8565b60408051600080825260208201909252610e4891839190612885565b50565b33610e5582611429565b73ffffffffffffffffffffffffffffffffffffffff1614610ede5760405162461bcd60e51b815260206004820152603060248201527f42756c6c65744c6f616e733a2043616c6c6572206973206e6f7420746865206f60448201527f776e6572206f6620746865206c6f616e000000000000000000000000000000006064820152608401610963565b600260008281526009602052604090205474010000000000000000000000000000000000000000900460ff166003811115610f1b57610f1b6138f8565b1415610f8f5760405162461bcd60e51b815260206004820152602660248201527f42756c6c65744c6f616e733a204c6f616e20697320616c72656164792064656660448201527f61756c74656400000000000000000000000000000000000000000000000000006064820152608401610963565b610e48816002612aca565b610b14838383604051806020016040528060008152506119fd565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008ddf7021fea12a277f75414a1bac32f1586cb5e61614156110615760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c00000000000000000000000000000000000000006064820152608401610963565b7f0000000000000000000000008ddf7021fea12a277f75414a1bac32f1586cb5e673ffffffffffffffffffffffffffffffffffffffff166110d67f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff161461115f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f787900000000000000000000000000000000000000006064820152608401610963565b611168826127f8565b61117482826001612885565b5050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1661120f5760405162461bcd60e51b815260206004820152603360248201527f42756c6c65744c6f616e733a2043616e6e6f742067657420737461747573206f60448201527f66206e6f6e2d6578697374656e74206c6f616e000000000000000000000000006064820152608401610963565b5060009081526009602052604090205474010000000000000000000000000000000000000000900460ff1690565b600880546000918291908261125183613bc7565b9091555060408051610100810190915273ffffffffffffffffffffffffffffffffffffffff8916815290915060208101600081526020018781526020018681526020016000815260200185815260200142866112ad9190613c00565b815273ffffffffffffffffffffffffffffffffffffffff808616602092830152600084815260098352604090208351815492167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178255928401519092909183917fffffffffffffffffffffff000000000000000000000000000000000000000000909116177401000000000000000000000000000000000000000083600381111561135e5761135e6138f8565b021790555060408201516001820155606082015160028201556080820151600382015560a0820151600482015560c0820151600582015560e090910151600690910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556113ec3382612b69565b6040518181527f2abd59ed776138fb6191e8e3313cd669b51d5a2cab430c2ba0bf2f0cf0c0c4259060200160405180910390a19695505050505050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806108ca5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610963565b600073ffffffffffffffffffffffffffffffffffffffff821661154c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610963565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b3361157f85611429565b73ffffffffffffffffffffffffffffffffffffffff16146116085760405162461bcd60e51b815260206004820152603060248201527f42756c6c65744c6f616e733a2043616c6c6572206973206e6f7420746865206f60448201527f776e6572206f6620746865206c6f616e000000000000000000000000000000006064820152608401610963565b60008481526009602052604090819020600a54600682015492517f26b28edf000000000000000000000000000000000000000000000000000000008152919273ffffffffffffffffffffffffffffffffffffffff918216926326b28edf9261167c9216908990899089908990600401613c18565b602060405180830381865afa158015611699573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bd9190613c64565b61172f5760405162461bcd60e51b815260206004820152602160248201527f42756c6c65744c6f616e733a205369676e617475726520697320696e76616c6960448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610963565b600281018490556005810183905560408051868152602081018690529081018490527f744c480c345d73fed539c73c80c6ea46c302a3f03961b95c11acd7309f73f8fb9060600160405180910390a15050505050565b600081815260096020908152604080832081516101008101909252805473ffffffffffffffffffffffffffffffffffffffff81168352849383019074010000000000000000000000000000000000000000900460ff1660038111156117ec576117ec6138f8565b60038111156117fd576117fd6138f8565b815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905061189d81606001518260800151612b83565b9392505050565b611174338383612b9d565b336118b982611429565b73ffffffffffffffffffffffffffffffffffffffff16146119425760405162461bcd60e51b815260206004820152603060248201527f42756c6c65744c6f616e733a2043616c6c6572206973206e6f7420746865206f60448201527f776e6572206f6620746865206c6f616e000000000000000000000000000000006064820152608401610963565b600260008281526009602052604090205474010000000000000000000000000000000000000000900460ff16600381111561197f5761197f6138f8565b146119f25760405162461bcd60e51b815260206004820152602e60248201527f42756c6c65744c6f616e733a2043616e6e6f74207265736f6c7665206e6f742060448201527f64656661756c746564206c6f616e0000000000000000000000000000000000006064820152608401610963565b610e48816003612aca565b611a07338361246f565b611a795760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610963565b611a8584848484612cb1565b50505050565b33611a9584611429565b73ffffffffffffffffffffffffffffffffffffffff1614611b1e5760405162461bcd60e51b815260206004820152603060248201527f42756c6c65744c6f616e733a2043616c6c6572206973206e6f7420746865206f60448201527f776e6572206f6620746865206c6f616e000000000000000000000000000000006064820152608401610963565b60008381526009602052604090206002810154831115611bcc5760405162461bcd60e51b815260206004820152604960248201527f42756c6c65744c6f616e733a204c6f616e20746f74616c20646562742063616e60448201527f6e6f7420626520696e6372656173656420776974686f757420626f72726f776560648201527f7220636f6e73656e740000000000000000000000000000000000000000000000608482015260a401610963565b8060050154821015611c6c5760405162461bcd60e51b815260206004820152604760248201527f42756c6c65744c6f616e733a204c6f616e20656e6420646174652063616e6e6f60448201527f742062652064656372656173656420776974686f757420626f72726f7765722060648201527f636f6e73656e7400000000000000000000000000000000000000000000000000608482015260a401610963565b600281018390556005810182905560038101548311801590611cbb57506000815474010000000000000000000000000000000000000000900460ff166003811115611cb957611cb96138f8565b145b15611cfe5780547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001781555b60408051858152602081018590529081018390527f744c480c345d73fed539c73c80c6ea46c302a3f03961b95c11acd7309f73f8fb9060600160405180910390a150505050565b6007547501000000000000000000000000000000000000000000900460ff16611d8c5760075474010000000000000000000000000000000000000000900460ff1615611d90565b303b155b611e025760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610963565b6007547501000000000000000000000000000000000000000000900460ff16158015611e6957600780547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff1675010100000000000000000000000000000000000000001790555b611e7233612d3a565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8416179055801561117457600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690555050565b60008181526002602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16611f7e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610963565b6000611f9560408051602081019091526000815290565b90506000815111611fb5576040518060200160405280600081525061189d565b80611fbf84612e99565b604051602001611fd0929190613c81565b6040516020818303038152906040529392505050565b60008281526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1661207d5760405162461bcd60e51b815260206004820152602b60248201527f42756c6c65744c6f616e733a2043616e6e6f74207265706179206e6f6e2d657860448201527f697374656e74206c6f616e0000000000000000000000000000000000000000006064820152608401610963565b600061208883611178565b6003811115612099576120996138f8565b1461210c5760405162461bcd60e51b815260206004820152602760248201527f42756c6c65744c6f616e733a2043616e206f6e6c79207265706179206973737560448201527f6564206c6f616e000000000000000000000000000000000000000000000000006064820152608401610963565b60008281526009602052604081206003810180549192849261212f908490613c00565b909155505060028101546003820154106121815780547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001781555b805473ffffffffffffffffffffffffffffffffffffffff166323b872dd336121a886611429565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604481018590526064016020604051808303816000875af1158015612221573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122459190613c64565b5060408051848152602081018490527f040cee90ee4799897c30ca04e5feb6fa43dbba9b6d084b4b257cdafd84ba013e910160405180910390a1505050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146123115760405162461bcd60e51b815260206004820152602560248201527f4d616e61676561626c653a2043616c6c6572206973206e6f7420746865206d6160448201527f6e616765720000000000000000000000000000000000000000000000000000006064820152608401610963565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906123b282611429565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f80f15e9dbc60884fdb59fb8ed4fc48a9a689e028f055e893ed45ca5be67c5c8590600090a35050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff166125065760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610963565b600061251183611429565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061258057508373ffffffffffffffffffffffffffffffffffffffff16612568846108d0565b73ffffffffffffffffffffffffffffffffffffffff16145b806125bd575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166125e582611429565b73ffffffffffffffffffffffffffffffffffffffff161461266e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610963565b73ffffffffffffffffffffffffffffffffffffffff82166126f65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610963565b612701600082612358565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120805460019290612737908490613cb0565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290612772908490613c00565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610e485760405162461bcd60e51b815260206004820152602560248201527f4d616e61676561626c653a2043616c6c6572206973206e6f7420746865206d6160448201527f6e616765720000000000000000000000000000000000000000000000000000006064820152608401610963565b60006128c57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b90506128d084612fcb565b6000835111806128dd5750815b156128ee576128ec84846130a5565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16612ac35780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815560405173ffffffffffffffffffffffffffffffffffffffff831660248201526129e4908690604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f3659cfe6000000000000000000000000000000000000000000000000000000001790526130a5565b5080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff838116911614612aba5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201527f75727468657220757067726164657300000000000000000000000000000000006064820152608401610963565b612ac3856130ca565b5050505050565b600082815260096020526040902080548291907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000836003811115612b2757612b276138f8565b02179055507f9d0b8f6161220422fcfcf3cbe3b12d5148060bea52d7d74395488cae75d2e46f8282604051612b5d929190613cc7565b60405180910390a15050565b611174828260405180602001604052806000815250613117565b6000818311612b9357600061189d565b61189d8284613cb0565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612c195760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610963565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612cbc8484846125c5565b612cc8848484846131a0565b611a855760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610963565b6007547501000000000000000000000000000000000000000000900460ff16612d815760075474010000000000000000000000000000000000000000900460ff1615612d85565b303b155b612df75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610963565b6007547501000000000000000000000000000000000000000000900460ff16158015612e5e57600780547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff1675010100000000000000000000000000000000000000001790555b612e67826123f8565b801561117457600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690555050565b606081612ed957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612f035780612eed81613bc7565b9150612efc9050600a83613d0a565b9150612edd565b60008167ffffffffffffffff811115612f1e57612f1e6137ce565b6040519080825280601f01601f191660200182016040528015612f48576020820181803683370190505b5090505b84156125bd57612f5d600183613cb0565b9150612f6a600a86613d1e565b612f75906030613c00565b60f81b818381518110612f8a57612f8a613d32565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612fc4600a86613d0a565b9450612f4c565b803b61303f5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610963565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606061189d8383604051806060016040528060278152602001613dda60279139613376565b6130d381612fcb565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b613121838361346e565b61312e60008484846131a0565b610b145760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610963565b600073ffffffffffffffffffffffffffffffffffffffff84163b1561336b576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613217903390899088908890600401613d61565b6020604051808303816000875af1925050508015613270575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261326d91810190613da0565b60015b613320573d80801561329e576040519150601f19603f3d011682016040523d82523d6000602084013e6132a3565b606091505b5080516133185760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610963565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506125bd565b506001949350505050565b6060833b6133ec5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610963565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516134149190613dbd565b600060405180830381855af49150503d806000811461344f576040519150601f19603f3d011682016040523d82523d6000602084013e613454565b606091505b50915091506134648282866135fc565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff82166134d15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610963565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156135435760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610963565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290613579908490613c00565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060831561360b57508161189d565b82511561361b5782518084602001fd5b8160405162461bcd60e51b815260040161096391906136f6565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e4857600080fd5b60006020828403121561367557600080fd5b813561189d81613635565b60005b8381101561369b578181015183820152602001613683565b83811115611a855750506000910152565b600081518084526136c4816020860160208601613680565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061189d60208301846136ac565b60006020828403121561371b57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610e4857600080fd5b6000806040838503121561375757600080fd5b823561376281613722565b946020939093013593505050565b60008060006060848603121561378557600080fd5b833561379081613722565b925060208401356137a081613722565b929592945050506040919091013590565b6000602082840312156137c357600080fd5b813561189d81613722565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261380e57600080fd5b813567ffffffffffffffff80821115613829576138296137ce565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561386f5761386f6137ce565b8160405283815286602085880101111561388857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156138bb57600080fd5b82356138c681613722565b9150602083013567ffffffffffffffff8111156138e257600080fd5b6138ee858286016137fd565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6004811061395e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b602081016108ca8284613927565b600080600080600060a0868803121561398857600080fd5b853561399381613722565b945060208601359350604086013592506060860135915060808601356139b881613722565b809150509295509295909350565b600080600080608085870312156139dc57600080fd5b843593506020850135925060408501359150606085013567ffffffffffffffff811115613a0857600080fd5b613a14878288016137fd565b91505092959194509250565b8015158114610e4857600080fd5b60008060408385031215613a4157600080fd5b8235613a4c81613722565b91506020830135613a5c81613a20565b809150509250929050565b60008060008060808587031215613a7d57600080fd5b8435613a8881613722565b93506020850135613a9881613722565b925060408501359150606085013567ffffffffffffffff811115613a0857600080fd5b600080600060608486031215613ad057600080fd5b505081359360208301359350604090920135919050565b60008060408385031215613afa57600080fd5b50508035926020909101359150565b73ffffffffffffffffffffffffffffffffffffffff8981168252610100820190613b36602084018b613927565b8860408401528760608401528660808401528560a08401528460c084015280841660e0840152509998505050505050505050565b60008060408385031215613b7d57600080fd5b8235613b8881613722565b91506020830135613a5c81613722565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613bf957613bf9613b98565b5060010190565b60008219821115613c1357613c13613b98565b500190565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015283604082015282606082015260a060808201526000613c5960a08301846136ac565b979650505050505050565b600060208284031215613c7657600080fd5b815161189d81613a20565b60008351613c93818460208801613680565b835190830190613ca7818360208801613680565b01949350505050565b600082821015613cc257613cc2613b98565b500390565b8281526040810161189d6020830184613927565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613d1957613d19613cdb565b500490565b600082613d2d57613d2d613cdb565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261346460808301846136ac565b600060208284031215613db257600080fd5b815161189d81613635565b60008251613dcf818460208701613680565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205b69326f39499b7008f876e801ff40d7f3649d96e0c1a6ee7806920929bca6ae64736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.