Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 10 internal transactions
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 Source Code Verified (Exact Match)
Contract Name:
TestContract
Compiler Version
v0.8.28+commit.7893614a
ZkSolc Version
v1.5.7
Optimization Enabled:
Yes with Mode 3
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.22; import { ONFT721 } from "@layerzerolabs/onft-evm/contracts/onft721/ONFT721.sol"; contract TestContract is ONFT721{ uint256 public maxToken = 10; constructor( ) ONFT721("Test", "Test", 0x16c693A3924B947298F7227792953Cd6BBb21Ac8, msg.sender){ } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import { ONFT721Core } from "./ONFT721Core.sol"; /** * @title ONFT721 Contract * @dev ONFT721 is an ERC-721 token that extends the functionality of the ONFT721Core contract. */ abstract contract ONFT721 is ONFT721Core, ERC721 { string internal baseTokenURI; event BaseURISet(string baseURI); /** * @dev Constructor for the ONFT721 contract. * @param _name The name of the ONFT. * @param _symbol The symbol of the ONFT. * @param _lzEndpoint The LayerZero endpoint address. * @param _delegate The delegate capable of making OApp configurations inside of the endpoint. */ constructor( string memory _name, string memory _symbol, address _lzEndpoint, address _delegate ) ERC721(_name, _symbol) ONFT721Core(_lzEndpoint, _delegate) {} /** * @notice Retrieves the address of the underlying ERC721 implementation (ie. this contract). */ function token() external view returns (address) { return address(this); } function setBaseURI(string calldata _baseTokenURI) external onlyOwner { baseTokenURI = _baseTokenURI; emit BaseURISet(baseTokenURI); } function _baseURI() internal view override returns (string memory) { return baseTokenURI; } /** * @notice Indicates whether the ONFT721 contract requires approval of the 'token()' to send. * @dev In the case of ONFT where the contract IS the token, approval is NOT required. * @return requiresApproval Needs approval of the underlying token implementation. */ function approvalRequired() external pure virtual returns (bool) { return false; } function _debit(address _from, uint256 _tokenId, uint32 /*_dstEid*/) internal virtual override { if (_from != ERC721.ownerOf(_tokenId)) revert OnlyNFTOwner(_from, ERC721.ownerOf(_tokenId)); _burn(_tokenId); } function _credit(address _to, uint256 _tokenId, uint32 /*_srcEid*/) internal virtual override { _mint(_to, _tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.20; import {IERC721} from "./IERC721.sol"; import {IERC721Metadata} from "./extensions/IERC721Metadata.sol"; import {ERC721Utils} from "./utils/ERC721Utils.sol"; import {Context} from "../../utils/Context.sol"; import {Strings} from "../../utils/Strings.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; mapping(uint256 tokenId => address) private _owners; mapping(address owner => uint256) private _balances; mapping(uint256 tokenId => address) private _tokenApprovals; mapping(address owner => mapping(address operator => 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 returns (uint256) { if (owner == address(0)) { revert ERC721InvalidOwner(address(0)); } return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual returns (address) { return _requireOwned(tokenId); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual returns (string memory) { _requireOwned(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual { _approve(to, tokenId, _msgSender()); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual returns (address) { _requireOwned(tokenId); return _getApproved(tokenId); } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. address previousOwner = _update(to, tokenId, _msgSender()); if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { transferFrom(from, to, tokenId); ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist * * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the * core ERC-721 logic MUST be matched with the use of {_increaseBalance} to keep balances * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. */ function _getApproved(uint256 tokenId) internal view virtual returns (address) { return _tokenApprovals[tokenId]; } /** * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in * particular (ignoring whether it is owned by `owner`). * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { return spender != address(0) && (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); } /** * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. * Reverts if: * - `spender` does not have approval from `owner` for `tokenId`. * - `spender` does not have approval to manage all of `owner`'s assets. * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { if (!_isAuthorized(owner, spender, tokenId)) { if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } else { revert ERC721InsufficientApproval(spender, tokenId); } } } /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. * * WARNING: Increasing an account's balance using this function tends to be paired with an override of the * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership * remain consistent with one another. */ function _increaseBalance(address account, uint128 value) internal virtual { unchecked { _balances[account] += value; } } /** * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. * * The `auth` argument is optional. If the value passed is non 0, then this function will check that * `auth` is either the owner of the token, or approved to operate on the token (by the owner). * * Emits a {Transfer} event. * * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. */ function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { address from = _ownerOf(tokenId); // Perform (optional) operator check if (auth != address(0)) { _checkAuthorized(from, auth, tokenId); } // Execute the update if (from != address(0)) { // Clear approval. No need to re-authorize or emit the Approval event _approve(address(0), tokenId, address(0), false); unchecked { _balances[from] -= 1; } } if (to != address(0)) { unchecked { _balances[to] += 1; } } _owners[tokenId] = to; emit Transfer(from, to, tokenId); return from; } /** * @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 { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner != address(0)) { revert ERC721InvalidSender(address(0)); } } /** * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. * * 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 { _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); ERC721Utils.checkOnERC721Received(_msgSender(), address(0), to, tokenId, data); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal { address previousOwner = _update(address(0), tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(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 { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } else if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients * are aware of the ERC-721 standard 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 like {safeTransferFrom} in the sense that it invokes * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `tokenId` token must exist and be owned by `from`. * - `to` cannot be the zero address. * - `from` cannot be the zero address. * - 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) internal { _safeTransfer(from, to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); } /** * @dev Approve `to` to operate on `tokenId` * * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is * either the owner of the token, or approved to operate on all tokens held by this owner. * * Emits an {Approval} event. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address to, uint256 tokenId, address auth) internal { _approve(to, tokenId, auth, true); } /** * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not * emitted in the context of transfers. */ function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { // Avoid reading the owner unless necessary if (emitEvent || auth != address(0)) { address owner = _requireOwned(tokenId); // We do not use _isAuthorized because single-token approvals should not be able to call approve if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { revert ERC721InvalidApprover(auth); } if (emitEvent) { emit Approval(owner, to, tokenId); } } _tokenApprovals[tokenId] = to; } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Requirements: * - operator can't be the address zero. * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC721InvalidOperator(operator); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). * Returns the owner. * * Overrides to ownership logic should be done to {_ownerOf}. */ function _requireOwned(uint256 tokenId) internal view returns (address) { address owner = _ownerOf(tokenId); if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } return owner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { OApp, Origin } from "@layerzerolabs/oapp-evm/contracts/oapp/OApp.sol"; import { OAppOptionsType3 } from "@layerzerolabs/oapp-evm/contracts/oapp/libs/OAppOptionsType3.sol"; import { IOAppMsgInspector } from "@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppMsgInspector.sol"; import { OAppPreCrimeSimulator } from "@layerzerolabs/oapp-evm/contracts/precrime/OAppPreCrimeSimulator.sol"; import { IONFT721, MessagingFee, MessagingReceipt, SendParam } from "./interfaces/IONFT721.sol"; import { ONFT721MsgCodec } from "./libs/ONFT721MsgCodec.sol"; import { ONFTComposeMsgCodec } from "../libs/ONFTComposeMsgCodec.sol"; /** * @title ONFT721Core * @dev Abstract contract for an ONFT721 token. */ abstract contract ONFT721Core is IONFT721, OApp, OAppPreCrimeSimulator, OAppOptionsType3 { using ONFT721MsgCodec for bytes; using ONFT721MsgCodec for bytes32; // @notice Msg types that are used to identify the various OFT operations. // @dev This can be extended in child contracts for non-default oft operations // @dev These values are used in things like combineOptions() in OAppOptionsType3.sol. uint16 public constant SEND = 1; uint16 public constant SEND_AND_COMPOSE = 2; // Address of an optional contract to inspect both 'message' and 'options' address public msgInspector; event MsgInspectorSet(address inspector); /** * @dev Constructor. * @param _lzEndpoint The address of the LayerZero endpoint. * @param _delegate The delegate capable of making OApp configurations inside of the endpoint. */ constructor(address _lzEndpoint, address _delegate) Ownable(_delegate) OApp(_lzEndpoint, _delegate) {} /** * @notice Retrieves interfaceID and the version of the ONFT. * @return interfaceId The interface ID (0x23e18da6). * @return version The version. * @dev version: Indicates a cross-chain compatible msg encoding with other ONFTs. * @dev If a new feature is added to the ONFT cross-chain msg encoding, the version will be incremented. * @dev ie. localONFT version(x,1) CAN send messages to remoteONFT version(x,1) */ function onftVersion() external pure virtual returns (bytes4 interfaceId, uint64 version) { return (type(IONFT721).interfaceId, 1); } /** * @notice Sets the message inspector address for the OFT. * @param _msgInspector The address of the message inspector. * @dev This is an optional contract that can be used to inspect both 'message' and 'options'. * @dev Set it to address(0) to disable it, or set it to a contract address to enable it. */ function setMsgInspector(address _msgInspector) public virtual onlyOwner { msgInspector = _msgInspector; emit MsgInspectorSet(_msgInspector); } function quoteSend( SendParam calldata _sendParam, bool _payInLzToken ) external view virtual returns (MessagingFee memory msgFee) { (bytes memory message, bytes memory options) = _buildMsgAndOptions(_sendParam); return _quote(_sendParam.dstEid, message, options, _payInLzToken); } function send( SendParam calldata _sendParam, MessagingFee calldata _fee, address _refundAddress ) external payable virtual returns (MessagingReceipt memory msgReceipt) { _debit(msg.sender, _sendParam.tokenId, _sendParam.dstEid); (bytes memory message, bytes memory options) = _buildMsgAndOptions(_sendParam); // @dev Sends the message to the LayerZero Endpoint, returning the MessagingReceipt. msgReceipt = _lzSend(_sendParam.dstEid, message, options, _fee, _refundAddress); emit ONFTSent(msgReceipt.guid, _sendParam.dstEid, msg.sender, _sendParam.tokenId); } /** * @dev Internal function to build the message and options. * @param _sendParam The parameters for the send() operation. * @return message The encoded message. * @return options The encoded options. */ function _buildMsgAndOptions( SendParam calldata _sendParam ) internal view virtual returns (bytes memory message, bytes memory options) { if (_sendParam.to == bytes32(0)) revert InvalidReceiver(); bool hasCompose; (message, hasCompose) = ONFT721MsgCodec.encode(_sendParam.to, _sendParam.tokenId, _sendParam.composeMsg); uint16 msgType = hasCompose ? SEND_AND_COMPOSE : SEND; options = combineOptions(_sendParam.dstEid, msgType, _sendParam.extraOptions); // @dev Optionally inspect the message and options depending if the OApp owner has set a msg inspector. // @dev If it fails inspection, needs to revert in the implementation. ie. does not rely on return boolean address inspector = msgInspector; // caches the msgInspector to avoid potential double storage read if (inspector != address(0)) IOAppMsgInspector(inspector).inspect(message, options); } /** * @dev Internal function to handle the receive on the LayerZero endpoint. * @param _origin The origin information. * - srcEid: The source chain endpoint ID. * - sender: The sender address from the src chain. * - nonce: The nonce of the LayerZero message. * @param _guid The unique identifier for the received LayerZero message. * @param _message The encoded message. * @dev _executor The address of the executor. * @dev _extraData Additional data. */ function _lzReceive( Origin calldata _origin, bytes32 _guid, bytes calldata _message, address /*_executor*/, // @dev unused in the default implementation. bytes calldata /*_extraData*/ // @dev unused in the default implementation. ) internal virtual override { address toAddress = _message.sendTo().bytes32ToAddress(); uint256 tokenId = _message.tokenId(); _credit(toAddress, tokenId, _origin.srcEid); if (_message.isComposed()) { bytes memory composeMsg = ONFTComposeMsgCodec.encode(_origin.nonce, _origin.srcEid, _message.composeMsg()); // @dev As batching is not implemented, the compose index is always 0. // @dev If batching is added, the index will need to be tracked. endpoint.sendCompose(toAddress, _guid, 0 /* the index of composed message*/, composeMsg); } emit ONFTReceived(_guid, _origin.srcEid, toAddress, tokenId); } /* * @dev Internal function to handle the OAppPreCrimeSimulator simulated receive. * @param _origin The origin information. * - srcEid: The source chain endpoint ID. * - sender: The sender address from the src chain. * - nonce: The nonce of the LayerZero message. * @param _guid The unique identifier for the received LayerZero message. * @param _message The LayerZero message. * @param _executor The address of the off-chain executor. * @param _extraData Arbitrary data passed by the msg executor. * @dev Enables the preCrime simulator to mock sending lzReceive() messages, * routes the msg down from the OAppPreCrimeSimulator, and back up to the OAppReceiver. */ function _lzReceiveSimulate( Origin calldata _origin, bytes32 _guid, bytes calldata _message, address _executor, bytes calldata _extraData ) internal virtual override { _lzReceive(_origin, _guid, _message, _executor, _extraData); } /** * @dev Check if the peer is considered 'trusted' by the OApp. * @param _eid The endpoint ID to check. * @param _peer The peer to check. * @return Whether the peer passed is considered 'trusted' by the OApp. * @dev Enables OAppPreCrimeSimulator to check whether a potential Inbound Packet is from a trusted source. */ function isPeer(uint32 _eid, bytes32 _peer) public view virtual override returns (bool) { return peers[_eid] == _peer; } function _debit(address /*_from*/, uint256 /*_tokenId*/, uint32 /*_dstEid*/) internal virtual; function _credit(address /*_to*/, uint256 /*_tokenId*/, uint32 /*_srcEid*/) internal virtual; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC-721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC-721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/utils/ERC721Utils.sol) pragma solidity ^0.8.20; import {IERC721Receiver} from "../IERC721Receiver.sol"; import {IERC721Errors} from "../../../interfaces/draft-IERC6093.sol"; /** * @dev Library that provide common ERC-721 utility functions. * * See https://eips.ethereum.org/EIPS/eip-721[ERC-721]. * * _Available since v5.1._ */ library ERC721Utils { /** * @dev Performs an acceptance check for the provided `operator` by calling {IERC721-onERC721Received} * on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`). * * The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA). * Otherwise, the recipient must implement {IERC721Receiver-onERC721Received} and return the acceptance magic value to accept * the transfer. */ function checkOnERC721Received( address operator, address from, address to, uint256 tokenId, bytes memory data ) internal { if (to.code.length > 0) { try IERC721Receiver(to).onERC721Received(operator, from, tokenId, data) returns (bytes4 retval) { if (retval != IERC721Receiver.onERC721Received.selector) { // Token rejected revert IERC721Errors.ERC721InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-IERC721Receiver implementer revert IERC721Errors.ERC721InvalidReceiver(to); } else { assembly ("memory-safe") { revert(add(32, reason), mload(reason)) } } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SafeCast} from "./math/SafeCast.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { using SafeCast for *; bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev The string being parsed contains characters that are not in scope of the given base. */ error StringsInvalidChar(); /** * @dev The string being parsed is not a properly formatted address. */ error StringsInvalidAddressFormat(); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; assembly ("memory-safe") { ptr := add(buffer, add(32, length)) } while (true) { ptr--; assembly ("memory-safe") { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; 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_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal * representation, according to EIP-55. */ function toChecksumHexString(address addr) internal pure returns (string memory) { bytes memory buffer = bytes(toHexString(addr)); // hash the hex part of buffer (skip length + 2 bytes, length 40) uint256 hashValue; assembly ("memory-safe") { hashValue := shr(96, keccak256(add(buffer, 0x22), 40)) } for (uint256 i = 41; i > 1; --i) { // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f) if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) { // case shift by xoring with 0x20 buffer[i] ^= 0x20; } hashValue >>= 4; } return string(buffer); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } /** * @dev Parse a decimal string and returns the value as a `uint256`. * * Requirements: * - The string must be formatted as `[0-9]*` * - The result must fit into an `uint256` type */ function parseUint(string memory input) internal pure returns (uint256) { return parseUint(input, 0, bytes(input).length); } /** * @dev Variant of {parseUint} that parses a substring of `input` located between position `begin` (included) and * `end` (excluded). * * Requirements: * - The substring must be formatted as `[0-9]*` * - The result must fit into an `uint256` type */ function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) { (bool success, uint256 value) = tryParseUint(input, begin, end); if (!success) revert StringsInvalidChar(); return value; } /** * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character. * * NOTE: This function will revert if the result does not fit in a `uint256`. */ function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) { return _tryParseUintUncheckedBounds(input, 0, bytes(input).length); } /** * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid * character. * * NOTE: This function will revert if the result does not fit in a `uint256`. */ function tryParseUint( string memory input, uint256 begin, uint256 end ) internal pure returns (bool success, uint256 value) { if (end > bytes(input).length || begin > end) return (false, 0); return _tryParseUintUncheckedBounds(input, begin, end); } /** * @dev Implementation of {tryParseUint} that does not check bounds. Caller should make sure that * `begin <= end <= input.length`. Other inputs would result in undefined behavior. */ function _tryParseUintUncheckedBounds( string memory input, uint256 begin, uint256 end ) private pure returns (bool success, uint256 value) { bytes memory buffer = bytes(input); uint256 result = 0; for (uint256 i = begin; i < end; ++i) { uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i))); if (chr > 9) return (false, 0); result *= 10; result += chr; } return (true, result); } /** * @dev Parse a decimal string and returns the value as a `int256`. * * Requirements: * - The string must be formatted as `[-+]?[0-9]*` * - The result must fit in an `int256` type. */ function parseInt(string memory input) internal pure returns (int256) { return parseInt(input, 0, bytes(input).length); } /** * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and * `end` (excluded). * * Requirements: * - The substring must be formatted as `[-+]?[0-9]*` * - The result must fit in an `int256` type. */ function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) { (bool success, int256 value) = tryParseInt(input, begin, end); if (!success) revert StringsInvalidChar(); return value; } /** * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if * the result does not fit in a `int256`. * * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`. */ function tryParseInt(string memory input) internal pure returns (bool success, int256 value) { return _tryParseIntUncheckedBounds(input, 0, bytes(input).length); } uint256 private constant ABS_MIN_INT256 = 2 ** 255; /** * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid * character or if the result does not fit in a `int256`. * * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`. */ function tryParseInt( string memory input, uint256 begin, uint256 end ) internal pure returns (bool success, int256 value) { if (end > bytes(input).length || begin > end) return (false, 0); return _tryParseIntUncheckedBounds(input, begin, end); } /** * @dev Implementation of {tryParseInt} that does not check bounds. Caller should make sure that * `begin <= end <= input.length`. Other inputs would result in undefined behavior. */ function _tryParseIntUncheckedBounds( string memory input, uint256 begin, uint256 end ) private pure returns (bool success, int256 value) { bytes memory buffer = bytes(input); // Check presence of a negative sign. bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty bool positiveSign = sign == bytes1("+"); bool negativeSign = sign == bytes1("-"); uint256 offset = (positiveSign || negativeSign).toUint(); (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end); if (absSuccess && absValue < ABS_MIN_INT256) { return (true, negativeSign ? -int256(absValue) : int256(absValue)); } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) { return (true, type(int256).min); } else return (false, 0); } /** * @dev Parse a hexadecimal string (with or without "0x" prefix), and returns the value as a `uint256`. * * Requirements: * - The string must be formatted as `(0x)?[0-9a-fA-F]*` * - The result must fit in an `uint256` type. */ function parseHexUint(string memory input) internal pure returns (uint256) { return parseHexUint(input, 0, bytes(input).length); } /** * @dev Variant of {parseHexUint} that parses a substring of `input` located between position `begin` (included) and * `end` (excluded). * * Requirements: * - The substring must be formatted as `(0x)?[0-9a-fA-F]*` * - The result must fit in an `uint256` type. */ function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) { (bool success, uint256 value) = tryParseHexUint(input, begin, end); if (!success) revert StringsInvalidChar(); return value; } /** * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character. * * NOTE: This function will revert if the result does not fit in a `uint256`. */ function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) { return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length); } /** * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an * invalid character. * * NOTE: This function will revert if the result does not fit in a `uint256`. */ function tryParseHexUint( string memory input, uint256 begin, uint256 end ) internal pure returns (bool success, uint256 value) { if (end > bytes(input).length || begin > end) return (false, 0); return _tryParseHexUintUncheckedBounds(input, begin, end); } /** * @dev Implementation of {tryParseHexUint} that does not check bounds. Caller should make sure that * `begin <= end <= input.length`. Other inputs would result in undefined behavior. */ function _tryParseHexUintUncheckedBounds( string memory input, uint256 begin, uint256 end ) private pure returns (bool success, uint256 value) { bytes memory buffer = bytes(input); // skip 0x prefix if present bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2("0x"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty uint256 offset = hasPrefix.toUint() * 2; uint256 result = 0; for (uint256 i = begin + offset; i < end; ++i) { uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i))); if (chr > 15) return (false, 0); result *= 16; unchecked { // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check). // This guaratees that adding a value < 16 will not cause an overflow, hence the unchecked. result += chr; } } return (true, result); } /** * @dev Parse a hexadecimal string (with or without "0x" prefix), and returns the value as an `address`. * * Requirements: * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}` */ function parseAddress(string memory input) internal pure returns (address) { return parseAddress(input, 0, bytes(input).length); } /** * @dev Variant of {parseAddress} that parses a substring of `input` located between position `begin` (included) and * `end` (excluded). * * Requirements: * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}` */ function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) { (bool success, address value) = tryParseAddress(input, begin, end); if (!success) revert StringsInvalidAddressFormat(); return value; } /** * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly * formatted address. See {parseAddress} requirements. */ function tryParseAddress(string memory input) internal pure returns (bool success, address value) { return tryParseAddress(input, 0, bytes(input).length); } /** * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly * formatted address. See {parseAddress} requirements. */ function tryParseAddress( string memory input, uint256 begin, uint256 end ) internal pure returns (bool success, address value) { if (end > bytes(input).length || begin > end) return (false, address(0)); bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2("0x"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty uint256 expectedLength = 40 + hasPrefix.toUint() * 2; // check that input is the correct length if (end - begin == expectedLength) { // length guarantees that this does not overflow, and value is at most type(uint160).max (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end); return (s, address(uint160(v))); } else { return (false, address(0)); } } function _tryParseChr(bytes1 chr) private pure returns (uint8) { uint8 value = uint8(chr); // Try to parse `chr`: // - Case 1: [0-9] // - Case 2: [a-f] // - Case 3: [A-F] // - otherwise not supported unchecked { if (value > 47 && value < 58) value -= 48; else if (value > 96 && value < 103) value -= 87; else if (value > 64 && value < 71) value -= 55; else return type(uint8).max; } return value; } /** * @dev Reads a bytes32 from a bytes array without bounds checking. * * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the * assembly block as such would prevent some optimizations. */ function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) { // This is not memory safe in the general case, but all calls to this private function are within bounds. assembly ("memory-safe") { value := mload(add(buffer, add(0x20, offset))) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC-165 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); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // @dev Import the 'MessagingFee' and 'MessagingReceipt' so it's exposed to OApp implementers // solhint-disable-next-line no-unused-import import { OAppSender, MessagingFee, MessagingReceipt } from "./OAppSender.sol"; // @dev Import the 'Origin' so it's exposed to OApp implementers // solhint-disable-next-line no-unused-import import { OAppReceiver, Origin } from "./OAppReceiver.sol"; import { OAppCore } from "./OAppCore.sol"; /** * @title OApp * @dev Abstract contract serving as the base for OApp implementation, combining OAppSender and OAppReceiver functionality. */ abstract contract OApp is OAppSender, OAppReceiver { /** * @dev Constructor to initialize the OApp with the provided endpoint and owner. * @param _endpoint The address of the LOCAL LayerZero endpoint. * @param _delegate The delegate capable of making OApp configurations inside of the endpoint. */ constructor(address _endpoint, address _delegate) OAppCore(_endpoint, _delegate) {} /** * @notice Retrieves the OApp version information. * @return senderVersion The version of the OAppSender.sol implementation. * @return receiverVersion The version of the OAppReceiver.sol implementation. */ function oAppVersion() public pure virtual override(OAppSender, OAppReceiver) returns (uint64 senderVersion, uint64 receiverVersion) { return (SENDER_VERSION, RECEIVER_VERSION); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IOAppOptionsType3, EnforcedOptionParam } from "../interfaces/IOAppOptionsType3.sol"; /** * @title OAppOptionsType3 * @dev Abstract contract implementing the IOAppOptionsType3 interface with type 3 options. */ abstract contract OAppOptionsType3 is IOAppOptionsType3, Ownable { uint16 internal constant OPTION_TYPE_3 = 3; // @dev The "msgType" should be defined in the child contract. mapping(uint32 eid => mapping(uint16 msgType => bytes enforcedOption)) public enforcedOptions; /** * @dev Sets the enforced options for specific endpoint and message type combinations. * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options. * * @dev Only the owner/admin of the OApp can call this function. * @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc. * @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType. * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose(). */ function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) public virtual onlyOwner { _setEnforcedOptions(_enforcedOptions); } /** * @dev Sets the enforced options for specific endpoint and message type combinations. * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options. * * @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc. * @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType. * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose(). */ function _setEnforcedOptions(EnforcedOptionParam[] memory _enforcedOptions) internal virtual { for (uint256 i = 0; i < _enforcedOptions.length; i++) { // @dev Enforced options are only available for optionType 3, as type 1 and 2 dont support combining. _assertOptionsType3(_enforcedOptions[i].options); enforcedOptions[_enforcedOptions[i].eid][_enforcedOptions[i].msgType] = _enforcedOptions[i].options; } emit EnforcedOptionSet(_enforcedOptions); } /** * @notice Combines options for a given endpoint and message type. * @param _eid The endpoint ID. * @param _msgType The OAPP message type. * @param _extraOptions Additional options passed by the caller. * @return options The combination of caller specified options AND enforced options. * * @dev If there is an enforced lzReceive option: * - {gasLimit: 200k, msg.value: 1 ether} AND a caller supplies a lzReceive option: {gasLimit: 100k, msg.value: 0.5 ether} * - The resulting options will be {gasLimit: 300k, msg.value: 1.5 ether} when the message is executed on the remote lzReceive() function. * @dev This presence of duplicated options is handled off-chain in the verifier/executor. */ function combineOptions( uint32 _eid, uint16 _msgType, bytes calldata _extraOptions ) public view virtual returns (bytes memory) { bytes memory enforced = enforcedOptions[_eid][_msgType]; // No enforced options, pass whatever the caller supplied, even if it's empty or legacy type 1/2 options. if (enforced.length == 0) return _extraOptions; // No caller options, return enforced if (_extraOptions.length == 0) return enforced; // @dev If caller provided _extraOptions, must be type 3 as its the ONLY type that can be combined. if (_extraOptions.length >= 2) { _assertOptionsType3(_extraOptions); // @dev Remove the first 2 bytes containing the type from the _extraOptions and combine with enforced. return bytes.concat(enforced, _extraOptions[2:]); } // No valid set of options was found. revert InvalidOptions(_extraOptions); } /** * @dev Internal function to assert that options are of type 3. * @param _options The options to be checked. */ function _assertOptionsType3(bytes memory _options) internal pure virtual { uint16 optionsType; assembly { optionsType := mload(add(_options, 2)) } if (optionsType != OPTION_TYPE_3) revert InvalidOptions(_options); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @title IOAppMsgInspector * @dev Interface for the OApp Message Inspector, allowing examination of message and options contents. */ interface IOAppMsgInspector { // Custom error message for inspection failure error InspectionFailed(bytes message, bytes options); /** * @notice Allows the inspector to examine LayerZero message contents and optionally throw a revert if invalid. * @param _message The message payload to be inspected. * @param _options Additional options or parameters for inspection. * @return valid A boolean indicating whether the inspection passed (true) or failed (false). * * @dev Optionally done as a revert, OR use the boolean provided to handle the failure. */ function inspect(bytes calldata _message, bytes calldata _options) external view returns (bool valid); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IPreCrime } from "./interfaces/IPreCrime.sol"; import { IOAppPreCrimeSimulator, InboundPacket, Origin } from "./interfaces/IOAppPreCrimeSimulator.sol"; /** * @title OAppPreCrimeSimulator * @dev Abstract contract serving as the base for preCrime simulation functionality in an OApp. */ abstract contract OAppPreCrimeSimulator is IOAppPreCrimeSimulator, Ownable { // The address of the preCrime implementation. address public preCrime; /** * @dev Retrieves the address of the OApp contract. * @return The address of the OApp contract. * * @dev The simulator contract is the base contract for the OApp by default. * @dev If the simulator is a separate contract, override this function. */ function oApp() external view virtual returns (address) { return address(this); } /** * @dev Sets the preCrime contract address. * @param _preCrime The address of the preCrime contract. */ function setPreCrime(address _preCrime) public virtual onlyOwner { preCrime = _preCrime; emit PreCrimeSet(_preCrime); } /** * @dev Interface for pre-crime simulations. Always reverts at the end with the simulation results. * @param _packets An array of InboundPacket objects representing received packets to be delivered. * * @dev WARNING: MUST revert at the end with the simulation results. * @dev Gives the preCrime implementation the ability to mock sending packets to the lzReceive function, * WITHOUT actually executing them. */ function lzReceiveAndRevert(InboundPacket[] calldata _packets) public payable virtual { for (uint256 i = 0; i < _packets.length; i++) { InboundPacket calldata packet = _packets[i]; // Ignore packets that are not from trusted peers. if (!isPeer(packet.origin.srcEid, packet.origin.sender)) continue; // @dev Because a verifier is calling this function, it doesnt have access to executor params: // - address _executor // - bytes calldata _extraData // preCrime will NOT work for OApps that rely on these two parameters inside of their _lzReceive(). // They are instead stubbed to default values, address(0) and bytes("") // @dev Calling this.lzReceiveSimulate removes ability for assembly return 0 callstack exit, // which would cause the revert to be ignored. this.lzReceiveSimulate{ value: packet.value }( packet.origin, packet.guid, packet.message, packet.executor, packet.extraData ); } // @dev Revert with the simulation results. msg.sender must implement IPreCrime.buildSimulationResult(). revert SimulationResult(IPreCrime(msg.sender).buildSimulationResult()); } /** * @dev Is effectively an internal function because msg.sender must be address(this). * Allows resetting the call stack for 'internal' calls. * @param _origin The origin information containing the source endpoint and sender address. * - srcEid: The source chain endpoint ID. * - sender: The sender address on the src chain. * - nonce: The nonce of the message. * @param _guid The unique identifier of the packet. * @param _message The message payload of the packet. * @param _executor The executor address for the packet. * @param _extraData Additional data for the packet. */ function lzReceiveSimulate( Origin calldata _origin, bytes32 _guid, bytes calldata _message, address _executor, bytes calldata _extraData ) external payable virtual { // @dev Ensure ONLY can be called 'internally'. if (msg.sender != address(this)) revert OnlySelf(); _lzReceiveSimulate(_origin, _guid, _message, _executor, _extraData); } /** * @dev Internal function to handle the OAppPreCrimeSimulator simulated receive. * @param _origin The origin information. * - srcEid: The source chain endpoint ID. * - sender: The sender address from the src chain. * - nonce: The nonce of the LayerZero message. * @param _guid The GUID of the LayerZero message. * @param _message The LayerZero message. * @param _executor The address of the off-chain executor. * @param _extraData Arbitrary data passed by the msg executor. * * @dev Enables the preCrime simulator to mock sending lzReceive() messages, * routes the msg down from the OAppPreCrimeSimulator, and back up to the OAppReceiver. */ function _lzReceiveSimulate( Origin calldata _origin, bytes32 _guid, bytes calldata _message, address _executor, bytes calldata _extraData ) internal virtual; /** * @dev checks if the specified peer is considered 'trusted' by the OApp. * @param _eid The endpoint Id to check. * @param _peer The peer to check. * @return Whether the peer passed is considered 'trusted' by the OApp. */ function isPeer(uint32 _eid, bytes32 _peer) public view virtual returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import { MessagingFee, MessagingReceipt } from "@layerzerolabs/oapp-evm/contracts/oapp/OAppSender.sol"; /** * @dev Struct representing token parameters for the ONFT send() operation. */ struct SendParam { uint32 dstEid; // Destination LayerZero EndpointV2 ID. bytes32 to; // Recipient address. uint256 tokenId; bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message. bytes composeMsg; // The composed message for the send() operation. bytes onftCmd; // The ONFT command to be executed, unused in default ONFT implementations. } /** * @title IONFT * @dev Interface for the ONFT721 token. * @dev Does not inherit ERC721 to accommodate usage by OFT721Adapter. */ interface IONFT721 { // Custom error messages error InvalidReceiver(); error OnlyNFTOwner(address caller, address owner); // Events event ONFTSent( bytes32 indexed guid, // GUID of the ONFT message. uint32 dstEid, // Destination Endpoint ID. address indexed fromAddress, // Address of the sender on the src chain. uint256 tokenId // ONFT ID sent. ); event ONFTReceived( bytes32 indexed guid, // GUID of the ONFT message. uint32 srcEid, // Source Endpoint ID. address indexed toAddress, // Address of the recipient on the dst chain. uint256 tokenId // ONFT ID received. ); /** * @notice Retrieves interfaceID and the version of the ONFT. * @return interfaceId The interface ID. * @return version The version. * @dev interfaceId: This specific interface ID is '0x94642228'. * @dev version: Indicates a cross-chain compatible msg encoding with other ONFTs. * @dev If a new feature is added to the ONFT cross-chain msg encoding, the version will be incremented. * ie. localONFT version(x,1) CAN send messages to remoteONFT version(x,1) */ function onftVersion() external view returns (bytes4 interfaceId, uint64 version); /** * @notice Retrieves the address of the token associated with the ONFT. * @return token The address of the ERC721 token implementation. */ function token() external view returns (address); /** * @notice Indicates whether the ONFT contract requires approval of the 'token()' to send. * @return requiresApproval Needs approval of the underlying token implementation. * @dev Allows things like wallet implementers to determine integration requirements, * without understanding the underlying token implementation. */ function approvalRequired() external view returns (bool); /** * @notice Provides a quote for the send() operation. * @param _sendParam The parameters for the send() operation. * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token. * @return fee The calculated LayerZero messaging fee from the send() operation. * @dev MessagingFee: LayerZero msg fee * - nativeFee: The native fee. * - lzTokenFee: The lzToken fee. */ function quoteSend(SendParam calldata _sendParam, bool _payInLzToken) external view returns (MessagingFee memory); /** * @notice Executes the send() operation. * @param _sendParam The parameters for the send operation. * @param _fee The fee information supplied by the caller. * - nativeFee: The native fee. * - lzTokenFee: The lzToken fee. * @param _refundAddress The address to receive any excess funds from fees etc. on the src. * @return receipt The LayerZero messaging receipt from the send() operation. * @dev MessagingReceipt: LayerZero msg receipt * - guid: The unique identifier for the sent message. * - nonce: The nonce of the sent message. * - fee: The LayerZero fee incurred for the message. */ function send( SendParam calldata _sendParam, MessagingFee calldata _fee, address _refundAddress ) external payable returns (MessagingReceipt memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /** * @title ONFT721MsgCodec * @notice Library for encoding and decoding ONFT721 LayerZero messages. */ library ONFT721MsgCodec { uint8 private constant SEND_TO_OFFSET = 32; uint8 private constant TOKEN_ID_OFFSET = 64; /** * @dev Encodes an ONFT721 LayerZero message payload. * @param _sendTo The recipient address. * @param _tokenId The ID of the token to transfer. * @param _composeMsg The composed payload. * @return payload The encoded message payload. * @return hasCompose A boolean indicating whether the message payload contains a composed payload. */ function encode( bytes32 _sendTo, uint256 _tokenId, bytes memory _composeMsg ) internal view returns (bytes memory payload, bool hasCompose) { hasCompose = _composeMsg.length > 0; payload = hasCompose ? abi.encodePacked(_sendTo, _tokenId, addressToBytes32(msg.sender), _composeMsg) : abi.encodePacked(_sendTo, _tokenId); } /** * @dev Decodes sendTo from the ONFT LayerZero message. * @param _msg The message. * @return The recipient address in bytes32 format. */ function sendTo(bytes calldata _msg) internal pure returns (bytes32) { return bytes32(_msg[:SEND_TO_OFFSET]); } /** * @dev Decodes tokenId from the ONFT LayerZero message. * @param _msg The message. * @return The ID of the tokens to transfer. */ function tokenId(bytes calldata _msg) internal pure returns (uint256) { return uint256(bytes32(_msg[SEND_TO_OFFSET:TOKEN_ID_OFFSET])); } /** * @dev Decodes whether there is a composed payload. * @param _msg The message. * @return A boolean indicating whether the message has a composed payload. */ function isComposed(bytes calldata _msg) internal pure returns (bool) { return _msg.length > TOKEN_ID_OFFSET; } /** * @dev Decodes the composed message. * @param _msg The message. * @return The composed message. */ function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) { return _msg[TOKEN_ID_OFFSET:]; } /** * @dev Converts an address to bytes32. * @param _addr The address to convert. * @return The bytes32 representation of the address. */ function addressToBytes32(address _addr) internal pure returns (bytes32) { return bytes32(uint256(uint160(_addr))); } /** * @dev Converts bytes32 to an address. * @param _b The bytes32 value to convert. * @return The address representation of bytes32. */ function bytes32ToAddress(bytes32 _b) internal pure returns (address) { return address(uint160(uint256(_b))); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /** * @title ONFT Composed Message Codec * @notice Library for encoding and decoding ONFT composed messages. */ library ONFTComposeMsgCodec { // Offset constants for decoding composed messages uint8 private constant NONCE_OFFSET = 8; uint8 private constant SRC_EID_OFFSET = 12; uint8 private constant COMPOSE_FROM_OFFSET = 44; /** * @dev Encodes a ONFT721 composed message. * @param _nonce The nonce value. * @param _srcEid The source LayerZero endpoint ID. * @param _composeMsg The composed message. * @return The encoded payload, including the composed message. */ function encode( uint64 _nonce, uint32 _srcEid, bytes memory _composeMsg // 0x[composeFrom][composeMsg] ) internal pure returns (bytes memory) { return abi.encodePacked(_nonce, _srcEid, _composeMsg); } /** * @dev Retrieves the nonce for the composed message. * @param _msg The message. * @return The nonce value. */ function nonce(bytes calldata _msg) internal pure returns (uint64) { return uint64(bytes8(_msg[:NONCE_OFFSET])); } /** * @dev Retrieves the source LayerZero endpoint ID for the composed message. * @param _msg The message. * @return The source LayerZero endpoint ID. */ function srcEid(bytes calldata _msg) internal pure returns (uint32) { return uint32(bytes4(_msg[NONCE_OFFSET:SRC_EID_OFFSET])); } /** * @dev Retrieves the composeFrom value from the composed message. * @param _msg The message. * @return The composeFrom value as bytes32. */ function composeFrom(bytes calldata _msg) internal pure returns (bytes32) { return bytes32(_msg[SRC_EID_OFFSET:COMPOSE_FROM_OFFSET]); } /** * @dev Retrieves the composed message. * @param _msg The message. * @return The composed message. */ function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) { return _msg[COMPOSE_FROM_OFFSET:]; } /** * @dev Converts an address to bytes32. * @param _addr The address to convert. * @return The bytes32 representation of the address. */ function addressToBytes32(address _addr) internal pure returns (bytes32) { return bytes32(uint256(uint160(_addr))); } /** * @dev Converts bytes32 to an address. * @param _b The bytes32 value to convert. * @return The address representation of bytes32. */ function bytes32ToAddress(bytes32 _b) internal pure returns (address) { return address(uint160(uint256(_b))); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * 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[ERC 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 (last updated v5.1.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @title ERC-721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC-721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/Math.sol) pragma solidity ^0.8.20; import {Panic} from "../Panic.sol"; import {SafeCast} from "./SafeCast.sol"; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an success flag (no overflow). */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a success flag (no division by zero). */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * SafeCast.toUint(condition)); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. Panic.panic(Panic.DIVISION_BY_ZERO); } // The following calculation ensures accurate ceiling division without overflow. // Since a is non-zero, (a - 1) / b will not overflow. // The largest possible result occurs when (a - 1) / b is type(uint256).max, // but the largest value we can obtain is type(uint256).max - 1, which happens // when a = type(uint256).max and b = 1. unchecked { return SafeCast.toUint(a > 0) * ((a - 1) / b + 1); } } /** * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2²⁵⁶ + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0. if (denominator <= prod1) { Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW)); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv ≡ 1 mod 2⁴. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2⁸ inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶ inverse *= 2 - denominator * inverse; // inverse mod 2³² inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴ inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸ inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶ // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @dev Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0); } /** * @dev Calculate the modular multiplicative inverse of a number in Z/nZ. * * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0. * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible. * * If the input value is not inversible, 0 is returned. * * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}. */ function invMod(uint256 a, uint256 n) internal pure returns (uint256) { unchecked { if (n == 0) return 0; // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version) // Used to compute integers x and y such that: ax + ny = gcd(a, n). // When the gcd is 1, then the inverse of a modulo n exists and it's x. // ax + ny = 1 // ax = 1 + (-y)n // ax ≡ 1 (mod n) # x is the inverse of a modulo n // If the remainder is 0 the gcd is n right away. uint256 remainder = a % n; uint256 gcd = n; // Therefore the initial coefficients are: // ax + ny = gcd(a, n) = n // 0a + 1n = n int256 x = 0; int256 y = 1; while (remainder != 0) { uint256 quotient = gcd / remainder; (gcd, remainder) = ( // The old remainder is the next gcd to try. remainder, // Compute the next remainder. // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd // where gcd is at most n (capped to type(uint256).max) gcd - remainder * quotient ); (x, y) = ( // Increment the coefficient of a. y, // Decrement the coefficient of n. // Can overflow, but the result is casted to uint256 so that the // next value of y is "wrapped around" to a value between 0 and n - 1. x - y * int256(quotient) ); } if (gcd != 1) return 0; // No inverse exists. return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative. } } /** * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`. * * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that * `a**(p-2)` is the modular multiplicative inverse of a in Fp. * * NOTE: this function does NOT check that `p` is a prime greater than `2`. */ function invModPrime(uint256 a, uint256 p) internal view returns (uint256) { unchecked { return Math.modExp(a, p - 2, p); } } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m) * * Requirements: * - modulus can't be zero * - underlying staticcall to precompile must succeed * * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make * sure the chain you're using it on supports the precompiled contract for modular exponentiation * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, * the underlying function will succeed given the lack of a revert, but the result may be incorrectly * interpreted as 0. */ function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) { (bool success, uint256 result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m). * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying * to operate modulo 0 or if the underlying precompile reverted. * * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack * of a revert, but the result may be incorrectly interpreted as 0. */ function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) { if (m == 0) return (false, 0); assembly ("memory-safe") { let ptr := mload(0x40) // | Offset | Content | Content (Hex) | // |-----------|------------|--------------------------------------------------------------------| // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 | // | 0x60:0x7f | value of b | 0x<.............................................................b> | // | 0x80:0x9f | value of e | 0x<.............................................................e> | // | 0xa0:0xbf | value of m | 0x<.............................................................m> | mstore(ptr, 0x20) mstore(add(ptr, 0x20), 0x20) mstore(add(ptr, 0x40), 0x20) mstore(add(ptr, 0x60), b) mstore(add(ptr, 0x80), e) mstore(add(ptr, 0xa0), m) // Given the result < m, it's guaranteed to fit in 32 bytes, // so we can use the memory scratch space located at offset 0. success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20) result := mload(0x00) } } /** * @dev Variant of {modExp} that supports inputs of arbitrary length. */ function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) { (bool success, bytes memory result) = tryModExp(b, e, m); if (!success) { Panic.panic(Panic.DIVISION_BY_ZERO); } return result; } /** * @dev Variant of {tryModExp} that supports inputs of arbitrary length. */ function tryModExp( bytes memory b, bytes memory e, bytes memory m ) internal view returns (bool success, bytes memory result) { if (_zeroBytes(m)) return (false, new bytes(0)); uint256 mLen = m.length; // Encode call args in result and move the free memory pointer result = abi.encodePacked(b.length, e.length, mLen, b, e, m); assembly ("memory-safe") { let dataPtr := add(result, 0x20) // Write result on top of args to avoid allocating extra memory. success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen) // Overwrite the length. // result.length > returndatasize() is guaranteed because returndatasize() == m.length mstore(result, mLen) // Set the memory pointer after the returned data. mstore(0x40, add(dataPtr, mLen)) } } /** * @dev Returns whether the provided byte array is zero. */ function _zeroBytes(bytes memory byteArray) private pure returns (bool) { for (uint256 i = 0; i < byteArray.length; ++i) { if (byteArray[i] != 0) { return false; } } return true; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * This method is based on Newton's method for computing square roots; the algorithm is restricted to only * using integer operations. */ function sqrt(uint256 a) internal pure returns (uint256) { unchecked { // Take care of easy edge cases when a == 0 or a == 1 if (a <= 1) { return a; } // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between // the current value as `ε_n = | x_n - sqrt(a) |`. // // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is // bigger than any uint256. // // By noticing that // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)` // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar // to the msb function. uint256 aa = a; uint256 xn = 1; if (aa >= (1 << 128)) { aa >>= 128; xn <<= 64; } if (aa >= (1 << 64)) { aa >>= 64; xn <<= 32; } if (aa >= (1 << 32)) { aa >>= 32; xn <<= 16; } if (aa >= (1 << 16)) { aa >>= 16; xn <<= 8; } if (aa >= (1 << 8)) { aa >>= 8; xn <<= 4; } if (aa >= (1 << 4)) { aa >>= 4; xn <<= 2; } if (aa >= (1 << 2)) { xn <<= 1; } // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1). // // We can refine our estimation by noticing that the middle of that interval minimizes the error. // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2). // This is going to be our x_0 (and ε_0) xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2) // From here, Newton's method give us: // x_{n+1} = (x_n + a / x_n) / 2 // // One should note that: // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a // = ((x_n² + a) / (2 * x_n))² - a // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²) // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²) // = (x_n² - a)² / (2 * x_n)² // = ((x_n² - a) / (2 * x_n))² // ≥ 0 // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n // // This gives us the proof of quadratic convergence of the sequence: // ε_{n+1} = | x_{n+1} - sqrt(a) | // = | (x_n + a / x_n) / 2 - sqrt(a) | // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) | // = | (x_n - sqrt(a))² / (2 * x_n) | // = | ε_n² / (2 * x_n) | // = ε_n² / | (2 * x_n) | // // For the first iteration, we have a special case where x_0 is known: // ε_1 = ε_0² / | (2 * x_0) | // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2))) // ≤ 2**(2*e-4) / (3 * 2**(e-1)) // ≤ 2**(e-3) / 3 // ≤ 2**(e-3-log2(3)) // ≤ 2**(e-4.5) // // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n: // ε_{n+1} = ε_n² / | (2 * x_n) | // ≤ (2**(e-k))² / (2 * 2**(e-1)) // ≤ 2**(2*e-2*k) / 2**e // ≤ 2**(e-2*k) xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5 xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9 xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18 xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36 xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72 // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either // sqrt(a) or sqrt(a) + 1. return xn - SafeCast.toUint(xn > a / xn); } } /** * @dev Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 exp; unchecked { exp = 128 * SafeCast.toUint(value > (1 << 128) - 1); value >>= exp; result += exp; exp = 64 * SafeCast.toUint(value > (1 << 64) - 1); value >>= exp; result += exp; exp = 32 * SafeCast.toUint(value > (1 << 32) - 1); value >>= exp; result += exp; exp = 16 * SafeCast.toUint(value > (1 << 16) - 1); value >>= exp; result += exp; exp = 8 * SafeCast.toUint(value > (1 << 8) - 1); value >>= exp; result += exp; exp = 4 * SafeCast.toUint(value > (1 << 4) - 1); value >>= exp; result += exp; exp = 2 * SafeCast.toUint(value > (1 << 2) - 1); value >>= exp; result += exp; result += SafeCast.toUint(value > 1); } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; uint256 isGt; unchecked { isGt = SafeCast.toUint(value > (1 << 128) - 1); value >>= isGt * 128; result += isGt * 16; isGt = SafeCast.toUint(value > (1 << 64) - 1); value >>= isGt * 64; result += isGt * 8; isGt = SafeCast.toUint(value > (1 << 32) - 1); value >>= isGt * 32; result += isGt * 4; isGt = SafeCast.toUint(value > (1 << 16) - 1); value >>= isGt * 16; result += isGt * 2; result += SafeCast.toUint(value > (1 << 8) - 1); } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } /** * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump. */ function toUint(bool b) internal pure returns (uint256 u) { assembly ("memory-safe") { u := iszero(iszero(b)) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; import {SafeCast} from "./SafeCast.sol"; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. * * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute * one branch when needed, making this function more expensive. */ function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) { unchecked { // branchless ternary works because: // b ^ (a ^ b) == a // b ^ 0 == b return b ^ ((a ^ b) * int256(SafeCast.toUint(condition))); } } /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return ternary(a > b, a, b); } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return ternary(a < b, a, b); } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // Formula from the "Bit Twiddling Hacks" by Sean Eron Anderson. // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift, // taking advantage of the most significant (or "sign" bit) in two's complement representation. // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result, // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative). int256 mask = n >> 255; // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it. return uint256((n + mask) ^ mask); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { MessagingParams, MessagingFee, MessagingReceipt } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import { OAppCore } from "./OAppCore.sol"; /** * @title OAppSender * @dev Abstract contract implementing the OAppSender functionality for sending messages to a LayerZero endpoint. */ abstract contract OAppSender is OAppCore { using SafeERC20 for IERC20; // Custom error messages error NotEnoughNative(uint256 msgValue); error LzTokenUnavailable(); // @dev The version of the OAppSender implementation. // @dev Version is bumped when changes are made to this contract. uint64 internal constant SENDER_VERSION = 1; /** * @notice Retrieves the OApp version information. * @return senderVersion The version of the OAppSender.sol contract. * @return receiverVersion The version of the OAppReceiver.sol contract. * * @dev Providing 0 as the default for OAppReceiver version. Indicates that the OAppReceiver is not implemented. * ie. this is a SEND only OApp. * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions */ function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) { return (SENDER_VERSION, 0); } /** * @dev Internal function to interact with the LayerZero EndpointV2.quote() for fee calculation. * @param _dstEid The destination endpoint ID. * @param _message The message payload. * @param _options Additional options for the message. * @param _payInLzToken Flag indicating whether to pay the fee in LZ tokens. * @return fee The calculated MessagingFee for the message. * - nativeFee: The native fee for the message. * - lzTokenFee: The LZ token fee for the message. */ function _quote( uint32 _dstEid, bytes memory _message, bytes memory _options, bool _payInLzToken ) internal view virtual returns (MessagingFee memory fee) { return endpoint.quote( MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _payInLzToken), address(this) ); } /** * @dev Internal function to interact with the LayerZero EndpointV2.send() for sending a message. * @param _dstEid The destination endpoint ID. * @param _message The message payload. * @param _options Additional options for the message. * @param _fee The calculated LayerZero fee for the message. * - nativeFee: The native fee. * - lzTokenFee: The lzToken fee. * @param _refundAddress The address to receive any excess fee values sent to the endpoint. * @return receipt The receipt for the sent message. * - guid: The unique identifier for the sent message. * - nonce: The nonce of the sent message. * - fee: The LayerZero fee incurred for the message. */ function _lzSend( uint32 _dstEid, bytes memory _message, bytes memory _options, MessagingFee memory _fee, address _refundAddress ) internal virtual returns (MessagingReceipt memory receipt) { // @dev Push corresponding fees to the endpoint, any excess is sent back to the _refundAddress from the endpoint. uint256 messageValue = _payNative(_fee.nativeFee); if (_fee.lzTokenFee > 0) _payLzToken(_fee.lzTokenFee); return // solhint-disable-next-line check-send-result endpoint.send{ value: messageValue }( MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _fee.lzTokenFee > 0), _refundAddress ); } /** * @dev Internal function to pay the native fee associated with the message. * @param _nativeFee The native fee to be paid. * @return nativeFee The amount of native currency paid. * * @dev If the OApp needs to initiate MULTIPLE LayerZero messages in a single transaction, * this will need to be overridden because msg.value would contain multiple lzFees. * @dev Should be overridden in the event the LayerZero endpoint requires a different native currency. * @dev Some EVMs use an ERC20 as a method for paying transactions/gasFees. * @dev The endpoint is EITHER/OR, ie. it will NOT support both types of native payment at a time. */ function _payNative(uint256 _nativeFee) internal virtual returns (uint256 nativeFee) { if (msg.value != _nativeFee) revert NotEnoughNative(msg.value); return _nativeFee; } /** * @dev Internal function to pay the LZ token fee associated with the message. * @param _lzTokenFee The LZ token fee to be paid. * * @dev If the caller is trying to pay in the specified lzToken, then the lzTokenFee is passed to the endpoint. * @dev Any excess sent, is passed back to the specified _refundAddress in the _lzSend(). */ function _payLzToken(uint256 _lzTokenFee) internal virtual { // @dev Cannot cache the token because it is not immutable in the endpoint. address lzToken = endpoint.lzToken(); if (lzToken == address(0)) revert LzTokenUnavailable(); // Pay LZ token fee by sending tokens to the endpoint. IERC20(lzToken).safeTransferFrom(msg.sender, address(endpoint), _lzTokenFee); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { IOAppReceiver, Origin } from "./interfaces/IOAppReceiver.sol"; import { OAppCore } from "./OAppCore.sol"; /** * @title OAppReceiver * @dev Abstract contract implementing the ILayerZeroReceiver interface and extending OAppCore for OApp receivers. */ abstract contract OAppReceiver is IOAppReceiver, OAppCore { // Custom error message for when the caller is not the registered endpoint/ error OnlyEndpoint(address addr); // @dev The version of the OAppReceiver implementation. // @dev Version is bumped when changes are made to this contract. uint64 internal constant RECEIVER_VERSION = 2; /** * @notice Retrieves the OApp version information. * @return senderVersion The version of the OAppSender.sol contract. * @return receiverVersion The version of the OAppReceiver.sol contract. * * @dev Providing 0 as the default for OAppSender version. Indicates that the OAppSender is not implemented. * ie. this is a RECEIVE only OApp. * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions. */ function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) { return (0, RECEIVER_VERSION); } /** * @notice Indicates whether an address is an approved composeMsg sender to the Endpoint. * @dev _origin The origin information containing the source endpoint and sender address. * - srcEid: The source chain endpoint ID. * - sender: The sender address on the src chain. * - nonce: The nonce of the message. * @dev _message The lzReceive payload. * @param _sender The sender address. * @return isSender Is a valid sender. * * @dev Applications can optionally choose to implement separate composeMsg senders that are NOT the bridging layer. * @dev The default sender IS the OAppReceiver implementer. */ function isComposeMsgSender( Origin calldata /*_origin*/, bytes calldata /*_message*/, address _sender ) public view virtual returns (bool) { return _sender == address(this); } /** * @notice Checks if the path initialization is allowed based on the provided origin. * @param origin The origin information containing the source endpoint and sender address. * @return Whether the path has been initialized. * * @dev This indicates to the endpoint that the OApp has enabled msgs for this particular path to be received. * @dev This defaults to assuming if a peer has been set, its initialized. * Can be overridden by the OApp if there is other logic to determine this. */ function allowInitializePath(Origin calldata origin) public view virtual returns (bool) { return peers[origin.srcEid] == origin.sender; } /** * @notice Retrieves the next nonce for a given source endpoint and sender address. * @dev _srcEid The source endpoint ID. * @dev _sender The sender address. * @return nonce The next nonce. * * @dev The path nonce starts from 1. If 0 is returned it means that there is NO nonce ordered enforcement. * @dev Is required by the off-chain executor to determine the OApp expects msg execution is ordered. * @dev This is also enforced by the OApp. * @dev By default this is NOT enabled. ie. nextNonce is hardcoded to return 0. */ function nextNonce(uint32 /*_srcEid*/, bytes32 /*_sender*/) public view virtual returns (uint64 nonce) { return 0; } /** * @dev Entry point for receiving messages or packets from the endpoint. * @param _origin The origin information containing the source endpoint and sender address. * - srcEid: The source chain endpoint ID. * - sender: The sender address on the src chain. * - nonce: The nonce of the message. * @param _guid The unique identifier for the received LayerZero message. * @param _message The payload of the received message. * @param _executor The address of the executor for the received message. * @param _extraData Additional arbitrary data provided by the corresponding executor. * * @dev Entry point for receiving msg/packet from the LayerZero endpoint. */ function lzReceive( Origin calldata _origin, bytes32 _guid, bytes calldata _message, address _executor, bytes calldata _extraData ) public payable virtual { // Ensures that only the endpoint can attempt to lzReceive() messages to this OApp. if (address(endpoint) != msg.sender) revert OnlyEndpoint(msg.sender); // Ensure that the sender matches the expected peer for the source endpoint. if (_getPeerOrRevert(_origin.srcEid) != _origin.sender) revert OnlyPeer(_origin.srcEid, _origin.sender); // Call the internal OApp implementation of lzReceive. _lzReceive(_origin, _guid, _message, _executor, _extraData); } /** * @dev Internal function to implement lzReceive logic without needing to copy the basic parameter validation. */ function _lzReceive( Origin calldata _origin, bytes32 _guid, bytes calldata _message, address _executor, bytes calldata _extraData ) internal virtual; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IOAppCore, ILayerZeroEndpointV2 } from "./interfaces/IOAppCore.sol"; /** * @title OAppCore * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations. */ abstract contract OAppCore is IOAppCore, Ownable { // The LayerZero endpoint associated with the given OApp ILayerZeroEndpointV2 public immutable endpoint; // Mapping to store peers associated with corresponding endpoints mapping(uint32 eid => bytes32 peer) public peers; /** * @dev Constructor to initialize the OAppCore with the provided endpoint and delegate. * @param _endpoint The address of the LOCAL Layer Zero endpoint. * @param _delegate The delegate capable of making OApp configurations inside of the endpoint. * * @dev The delegate typically should be set as the owner of the contract. */ constructor(address _endpoint, address _delegate) { endpoint = ILayerZeroEndpointV2(_endpoint); if (_delegate == address(0)) revert InvalidDelegate(); endpoint.setDelegate(_delegate); } /** * @notice Sets the peer address (OApp instance) for a corresponding endpoint. * @param _eid The endpoint ID. * @param _peer The address of the peer to be associated with the corresponding endpoint. * * @dev Only the owner/admin of the OApp can call this function. * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp. * @dev Set this to bytes32(0) to remove the peer address. * @dev Peer is a bytes32 to accommodate non-evm chains. */ function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner { _setPeer(_eid, _peer); } /** * @notice Sets the peer address (OApp instance) for a corresponding endpoint. * @param _eid The endpoint ID. * @param _peer The address of the peer to be associated with the corresponding endpoint. * * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp. * @dev Set this to bytes32(0) to remove the peer address. * @dev Peer is a bytes32 to accommodate non-evm chains. */ function _setPeer(uint32 _eid, bytes32 _peer) internal virtual { peers[_eid] = _peer; emit PeerSet(_eid, _peer); } /** * @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set. * ie. the peer is set to bytes32(0). * @param _eid The endpoint ID. * @return peer The address of the peer associated with the specified endpoint. */ function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) { bytes32 peer = peers[_eid]; if (peer == bytes32(0)) revert NoPeer(_eid); return peer; } /** * @notice Sets the delegate address for the OApp. * @param _delegate The address of the delegate to be set. * * @dev Only the owner/admin of the OApp can call this function. * @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract. */ function setDelegate(address _delegate) public onlyOwner { endpoint.setDelegate(_delegate); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @dev Struct representing enforced option parameters. */ struct EnforcedOptionParam { uint32 eid; // Endpoint ID uint16 msgType; // Message Type bytes options; // Additional options } /** * @title IOAppOptionsType3 * @dev Interface for the OApp with Type 3 Options, allowing the setting and combining of enforced options. */ interface IOAppOptionsType3 { // Custom error message for invalid options error InvalidOptions(bytes options); // Event emitted when enforced options are set event EnforcedOptionSet(EnforcedOptionParam[] _enforcedOptions); /** * @notice Sets enforced options for specific endpoint and message type combinations. * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options. */ function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) external; /** * @notice Combines options for a given endpoint and message type. * @param _eid The endpoint ID. * @param _msgType The OApp message type. * @param _extraOptions Additional options passed by the caller. * @return options The combination of caller specified options AND enforced options. */ function combineOptions( uint32 _eid, uint16 _msgType, bytes calldata _extraOptions ) external view returns (bytes memory options); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; struct PreCrimePeer { uint32 eid; bytes32 preCrime; bytes32 oApp; } // TODO not done yet interface IPreCrime { error OnlyOffChain(); // for simulate() error PacketOversize(uint256 max, uint256 actual); error PacketUnsorted(); error SimulationFailed(bytes reason); // for preCrime() error SimulationResultNotFound(uint32 eid); error InvalidSimulationResult(uint32 eid, bytes reason); error CrimeFound(bytes crime); function getConfig(bytes[] calldata _packets, uint256[] calldata _packetMsgValues) external returns (bytes memory); function simulate( bytes[] calldata _packets, uint256[] calldata _packetMsgValues ) external payable returns (bytes memory); function buildSimulationResult() external view returns (bytes memory); function preCrime( bytes[] calldata _packets, uint256[] calldata _packetMsgValues, bytes[] calldata _simulations ) external; function version() external view returns (uint64 major, uint8 minor); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; // @dev Import the Origin so it's exposed to OAppPreCrimeSimulator implementers. // solhint-disable-next-line no-unused-import import { InboundPacket, Origin } from "../libs/Packet.sol"; /** * @title IOAppPreCrimeSimulator Interface * @dev Interface for the preCrime simulation functionality in an OApp. */ interface IOAppPreCrimeSimulator { // @dev simulation result used in PreCrime implementation error SimulationResult(bytes result); error OnlySelf(); /** * @dev Emitted when the preCrime contract address is set. * @param preCrimeAddress The address of the preCrime contract. */ event PreCrimeSet(address preCrimeAddress); /** * @dev Retrieves the address of the preCrime contract implementation. * @return The address of the preCrime contract. */ function preCrime() external view returns (address); /** * @dev Retrieves the address of the OApp contract. * @return The address of the OApp contract. */ function oApp() external view returns (address); /** * @dev Sets the preCrime contract address. * @param _preCrime The address of the preCrime contract. */ function setPreCrime(address _preCrime) external; /** * @dev Mocks receiving a packet, then reverts with a series of data to infer the state/result. * @param _packets An array of LayerZero InboundPacket objects representing received packets. */ function lzReceiveAndRevert(InboundPacket[] calldata _packets) external payable; /** * @dev checks if the specified peer is considered 'trusted' by the OApp. * @param _eid The endpoint Id to check. * @param _peer The peer to check. * @return Whether the peer passed is considered 'trusted' by the OApp. */ function isPeer(uint32 _eid, bytes32 _peer) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol) pragma solidity ^0.8.20; /** * @dev Helper library for emitting standardized panic codes. * * ```solidity * contract Example { * using Panic for uint256; * * // Use any of the declared internal constants * function foo() { Panic.GENERIC.panic(); } * * // Alternatively * function foo() { Panic.panic(Panic.GENERIC); } * } * ``` * * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. * * _Available since v5.1._ */ // slither-disable-next-line unused-state library Panic { /// @dev generic / unspecified error uint256 internal constant GENERIC = 0x00; /// @dev used by the assert() builtin uint256 internal constant ASSERT = 0x01; /// @dev arithmetic underflow or overflow uint256 internal constant UNDER_OVERFLOW = 0x11; /// @dev division or modulo by zero uint256 internal constant DIVISION_BY_ZERO = 0x12; /// @dev enum conversion error uint256 internal constant ENUM_CONVERSION_ERROR = 0x21; /// @dev invalid encoding in storage uint256 internal constant STORAGE_ENCODING_ERROR = 0x22; /// @dev empty array pop uint256 internal constant EMPTY_ARRAY_POP = 0x31; /// @dev array out of bounds access uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32; /// @dev resource error (too large allocation or too large array) uint256 internal constant RESOURCE_ERROR = 0x41; /// @dev calling invalid internal function uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51; /// @dev Reverts with a panic code. Recommended to use with /// the internal constants with predefined codes. function panic(uint256 code) internal pure { assembly ("memory-safe") { mstore(0x00, 0x4e487b71) mstore(0x20, code) revert(0x1c, 0x24) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC-20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { /** * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import { IMessageLibManager } from "./IMessageLibManager.sol"; import { IMessagingComposer } from "./IMessagingComposer.sol"; import { IMessagingChannel } from "./IMessagingChannel.sol"; import { IMessagingContext } from "./IMessagingContext.sol"; struct MessagingParams { uint32 dstEid; bytes32 receiver; bytes message; bytes options; bool payInLzToken; } struct MessagingReceipt { bytes32 guid; uint64 nonce; MessagingFee fee; } struct MessagingFee { uint256 nativeFee; uint256 lzTokenFee; } struct Origin { uint32 srcEid; bytes32 sender; uint64 nonce; } interface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext { event PacketSent(bytes encodedPayload, bytes options, address sendLibrary); event PacketVerified(Origin origin, address receiver, bytes32 payloadHash); event PacketDelivered(Origin origin, address receiver); event LzReceiveAlert( address indexed receiver, address indexed executor, Origin origin, bytes32 guid, uint256 gas, uint256 value, bytes message, bytes extraData, bytes reason ); event LzTokenSet(address token); event DelegateSet(address sender, address delegate); function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory); function send( MessagingParams calldata _params, address _refundAddress ) external payable returns (MessagingReceipt memory); function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external; function verifiable(Origin calldata _origin, address _receiver) external view returns (bool); function initializable(Origin calldata _origin, address _receiver) external view returns (bool); function lzReceive( Origin calldata _origin, address _receiver, bytes32 _guid, bytes calldata _message, bytes calldata _extraData ) external payable; // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external; function setLzToken(address _lzToken) external; function lzToken() external view returns (address); function nativeToken() external view returns (address); function setDelegate(address _delegate) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { ILayerZeroReceiver, Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol"; interface IOAppReceiver is ILayerZeroReceiver { /** * @notice Indicates whether an address is an approved composeMsg sender to the Endpoint. * @param _origin The origin information containing the source endpoint and sender address. * - srcEid: The source chain endpoint ID. * - sender: The sender address on the src chain. * - nonce: The nonce of the message. * @param _message The lzReceive payload. * @param _sender The sender address. * @return isSender Is a valid sender. * * @dev Applications can optionally choose to implement a separate composeMsg sender that is NOT the bridging layer. * @dev The default sender IS the OAppReceiver implementer. */ function isComposeMsgSender( Origin calldata _origin, bytes calldata _message, address _sender ) external view returns (bool isSender); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; /** * @title IOAppCore */ interface IOAppCore { // Custom error messages error OnlyPeer(uint32 eid, bytes32 sender); error NoPeer(uint32 eid); error InvalidEndpointCall(); error InvalidDelegate(); // Event emitted when a peer (OApp) is set for a corresponding endpoint event PeerSet(uint32 eid, bytes32 peer); /** * @notice Retrieves the OApp version information. * @return senderVersion The version of the OAppSender.sol contract. * @return receiverVersion The version of the OAppReceiver.sol contract. */ function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion); /** * @notice Retrieves the LayerZero endpoint associated with the OApp. * @return iEndpoint The LayerZero endpoint as an interface. */ function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint); /** * @notice Retrieves the peer (OApp) associated with a corresponding endpoint. * @param _eid The endpoint ID. * @return peer The peer address (OApp instance) associated with the corresponding endpoint. */ function peers(uint32 _eid) external view returns (bytes32 peer); /** * @notice Sets the peer address (OApp instance) for a corresponding endpoint. * @param _eid The endpoint ID. * @param _peer The address of the peer to be associated with the corresponding endpoint. */ function setPeer(uint32 _eid, bytes32 _peer) external; /** * @notice Sets the delegate address for the OApp Core. * @param _delegate The address of the delegate to be set. */ function setDelegate(address _delegate) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; /** * @title InboundPacket * @dev Structure representing an inbound packet received by the contract. */ struct InboundPacket { Origin origin; // Origin information of the packet. uint32 dstEid; // Destination endpointId of the packet. address receiver; // Receiver address for the packet. bytes32 guid; // Unique identifier of the packet. uint256 value; // msg.value of the packet. address executor; // Executor address for the packet. bytes message; // Message payload of the packet. bytes extraData; // Additional arbitrary data for the packet. } /** * @title PacketDecoder * @dev Library for decoding LayerZero packets. */ library PacketDecoder { using PacketV1Codec for bytes; /** * @dev Decode an inbound packet from the given packet data. * @param _packet The packet data to decode. * @return packet An InboundPacket struct representing the decoded packet. */ function decode(bytes calldata _packet) internal pure returns (InboundPacket memory packet) { packet.origin = Origin(_packet.srcEid(), _packet.sender(), _packet.nonce()); packet.dstEid = _packet.dstEid(); packet.receiver = _packet.receiverB20(); packet.guid = _packet.guid(); packet.message = _packet.message(); } /** * @dev Decode multiple inbound packets from the given packet data and associated message values. * @param _packets An array of packet data to decode. * @param _packetMsgValues An array of associated message values for each packet. * @return packets An array of InboundPacket structs representing the decoded packets. */ function decode( bytes[] calldata _packets, uint256[] memory _packetMsgValues ) internal pure returns (InboundPacket[] memory packets) { packets = new InboundPacket[](_packets.length); for (uint256 i = 0; i < _packets.length; i++) { bytes calldata packet = _packets[i]; packets[i] = PacketDecoder.decode(packet); // @dev Allows the verifier to specify the msg.value that gets passed in lzReceive. packets[i].value = _packetMsgValues[i]; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; struct SetConfigParam { uint32 eid; uint32 configType; bytes config; } interface IMessageLibManager { struct Timeout { address lib; uint256 expiry; } event LibraryRegistered(address newLib); event DefaultSendLibrarySet(uint32 eid, address newLib); event DefaultReceiveLibrarySet(uint32 eid, address newLib); event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry); event SendLibrarySet(address sender, uint32 eid, address newLib); event ReceiveLibrarySet(address receiver, uint32 eid, address newLib); event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout); function registerLibrary(address _lib) external; function isRegisteredLibrary(address _lib) external view returns (bool); function getRegisteredLibraries() external view returns (address[] memory); function setDefaultSendLibrary(uint32 _eid, address _newLib) external; function defaultSendLibrary(uint32 _eid) external view returns (address); function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _timeout) external; function defaultReceiveLibrary(uint32 _eid) external view returns (address); function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external; function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry); function isSupportedEid(uint32 _eid) external view returns (bool); function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool); /// ------------------- OApp interfaces ------------------- function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external; function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib); function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool); function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external; function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault); function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _gracePeriod) external; function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry); function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external; function getConfig( address _oapp, address _lib, uint32 _eid, uint32 _configType ) external view returns (bytes memory config); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface IMessagingComposer { event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message); event ComposeDelivered(address from, address to, bytes32 guid, uint16 index); event LzComposeAlert( address indexed from, address indexed to, address indexed executor, bytes32 guid, uint16 index, uint256 gas, uint256 value, bytes message, bytes extraData, bytes reason ); function composeQueue( address _from, address _to, bytes32 _guid, uint16 _index ) external view returns (bytes32 messageHash); function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external; function lzCompose( address _from, address _to, bytes32 _guid, uint16 _index, bytes calldata _message, bytes calldata _extraData ) external payable; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface IMessagingChannel { event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce); event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash); event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash); function eid() external view returns (uint32); // this is an emergency function if a message cannot be verified for some reasons // required to provide _nextNonce to avoid race condition function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external; function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external; function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external; function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32); function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64); function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64); function inboundPayloadHash( address _receiver, uint32 _srcEid, bytes32 _sender, uint64 _nonce ) external view returns (bytes32); function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface IMessagingContext { function isSendingMessage() external view returns (bool); function getSendContext() external view returns (uint32 dstEid, address sender); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import { Origin } from "./ILayerZeroEndpointV2.sol"; interface ILayerZeroReceiver { function allowInitializePath(Origin calldata _origin) external view returns (bool); function nextNonce(uint32 _eid, bytes32 _sender) external view returns (uint64); function lzReceive( Origin calldata _origin, bytes32 _guid, bytes calldata _message, address _executor, bytes calldata _extraData ) external payable; }
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; import { Packet } from "../../interfaces/ISendLib.sol"; import { AddressCast } from "../../libs/AddressCast.sol"; library PacketV1Codec { using AddressCast for address; using AddressCast for bytes32; uint8 internal constant PACKET_VERSION = 1; // header (version + nonce + path) // version uint256 private constant PACKET_VERSION_OFFSET = 0; // nonce uint256 private constant NONCE_OFFSET = 1; // path uint256 private constant SRC_EID_OFFSET = 9; uint256 private constant SENDER_OFFSET = 13; uint256 private constant DST_EID_OFFSET = 45; uint256 private constant RECEIVER_OFFSET = 49; // payload (guid + message) uint256 private constant GUID_OFFSET = 81; // keccak256(nonce + path) uint256 private constant MESSAGE_OFFSET = 113; function encode(Packet memory _packet) internal pure returns (bytes memory encodedPacket) { encodedPacket = abi.encodePacked( PACKET_VERSION, _packet.nonce, _packet.srcEid, _packet.sender.toBytes32(), _packet.dstEid, _packet.receiver, _packet.guid, _packet.message ); } function encodePacketHeader(Packet memory _packet) internal pure returns (bytes memory) { return abi.encodePacked( PACKET_VERSION, _packet.nonce, _packet.srcEid, _packet.sender.toBytes32(), _packet.dstEid, _packet.receiver ); } function encodePayload(Packet memory _packet) internal pure returns (bytes memory) { return abi.encodePacked(_packet.guid, _packet.message); } function header(bytes calldata _packet) internal pure returns (bytes calldata) { return _packet[0:GUID_OFFSET]; } function version(bytes calldata _packet) internal pure returns (uint8) { return uint8(bytes1(_packet[PACKET_VERSION_OFFSET:NONCE_OFFSET])); } function nonce(bytes calldata _packet) internal pure returns (uint64) { return uint64(bytes8(_packet[NONCE_OFFSET:SRC_EID_OFFSET])); } function srcEid(bytes calldata _packet) internal pure returns (uint32) { return uint32(bytes4(_packet[SRC_EID_OFFSET:SENDER_OFFSET])); } function sender(bytes calldata _packet) internal pure returns (bytes32) { return bytes32(_packet[SENDER_OFFSET:DST_EID_OFFSET]); } function senderAddressB20(bytes calldata _packet) internal pure returns (address) { return sender(_packet).toAddress(); } function dstEid(bytes calldata _packet) internal pure returns (uint32) { return uint32(bytes4(_packet[DST_EID_OFFSET:RECEIVER_OFFSET])); } function receiver(bytes calldata _packet) internal pure returns (bytes32) { return bytes32(_packet[RECEIVER_OFFSET:GUID_OFFSET]); } function receiverB20(bytes calldata _packet) internal pure returns (address) { return receiver(_packet).toAddress(); } function guid(bytes calldata _packet) internal pure returns (bytes32) { return bytes32(_packet[GUID_OFFSET:MESSAGE_OFFSET]); } function message(bytes calldata _packet) internal pure returns (bytes calldata) { return bytes(_packet[MESSAGE_OFFSET:]); } function payload(bytes calldata _packet) internal pure returns (bytes calldata) { return bytes(_packet[GUID_OFFSET:]); } function payloadHash(bytes calldata _packet) internal pure returns (bytes32) { return keccak256(payload(_packet)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import { MessagingFee } from "./ILayerZeroEndpointV2.sol"; import { IMessageLib } from "./IMessageLib.sol"; struct Packet { uint64 nonce; uint32 srcEid; address sender; uint32 dstEid; bytes32 receiver; bytes32 guid; bytes message; } interface ISendLib is IMessageLib { function send( Packet calldata _packet, bytes calldata _options, bool _payInLzToken ) external returns (MessagingFee memory, bytes memory encodedPacket); function quote( Packet calldata _packet, bytes calldata _options, bool _payInLzToken ) external view returns (MessagingFee memory); function setTreasury(address _treasury) external; function withdrawFee(address _to, uint256 _amount) external; function withdrawLzTokenFee(address _lzToken, address _to, uint256 _amount) external; }
// SPDX-License-Identifier: LZBL-1.2 pragma solidity ^0.8.20; library AddressCast { error AddressCast_InvalidSizeForAddress(); error AddressCast_InvalidAddress(); function toBytes32(bytes calldata _addressBytes) internal pure returns (bytes32 result) { if (_addressBytes.length > 32) revert AddressCast_InvalidAddress(); result = bytes32(_addressBytes); unchecked { uint256 offset = 32 - _addressBytes.length; result = result >> (offset * 8); } } function toBytes32(address _address) internal pure returns (bytes32 result) { result = bytes32(uint256(uint160(_address))); } function toBytes(bytes32 _addressBytes32, uint256 _size) internal pure returns (bytes memory result) { if (_size == 0 || _size > 32) revert AddressCast_InvalidSizeForAddress(); result = new bytes(_size); unchecked { uint256 offset = 256 - _size * 8; assembly { mstore(add(result, 32), shl(offset, _addressBytes32)) } } } function toAddress(bytes32 _addressBytes32) internal pure returns (address result) { result = address(uint160(uint256(_addressBytes32))); } function toAddress(bytes calldata _addressBytes) internal pure returns (address result) { if (_addressBytes.length != 20) revert AddressCast_InvalidAddress(); result = address(bytes20(_addressBytes)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import { SetConfigParam } from "./IMessageLibManager.sol"; enum MessageLibType { Send, Receive, SendAndReceive } interface IMessageLib is IERC165 { function setConfig(address _oapp, SetConfigParam[] calldata _config) external; function getConfig(uint32 _eid, address _oapp, uint32 _configType) external view returns (bytes memory config); function isSupportedEid(uint32 _eid) external view returns (bool); // message libs of same major version are compatible function version() external view returns (uint64 major, uint8 minor, uint8 endpointVersion); function messageLibType() external view returns (MessageLibType); }
{ "viaIR": false, "codegen": "yul", "remappings": [ "@layerzerolabs/onft-evm/=lib/devtools/packages/onft-evm/", "@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/", "@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "devtools/=lib/devtools/packages/toolbox-foundry/src/", "ds-test/=lib/layerzero-v2/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/", "layerzero-v2/=lib/layerzero-v2/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "evmVersion": "cancun", "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "optimizer": { "enabled": true, "mode": "3", "fallback_to_optimizing_for_size": false, "disable_system_request_memoization": true }, "metadata": {}, "libraries": {}, "detectMissingLibraries": false, "enableEraVMExtensions": false, "forceEVMLA": false }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"InvalidDelegate","type":"error"},{"inputs":[],"name":"InvalidEndpointCall","type":"error"},{"inputs":[{"internalType":"bytes","name":"options","type":"bytes"}],"name":"InvalidOptions","type":"error"},{"inputs":[],"name":"InvalidReceiver","type":"error"},{"inputs":[],"name":"LzTokenUnavailable","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"NoPeer","type":"error"},{"inputs":[{"internalType":"uint256","name":"msgValue","type":"uint256"}],"name":"NotEnoughNative","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"OnlyEndpoint","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"OnlyNFTOwner","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"OnlyPeer","type":"error"},{"inputs":[],"name":"OnlySelf","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"name":"SimulationResult","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURISet","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"indexed":false,"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"EnforcedOptionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"inspector","type":"address"}],"name":"MsgInspectorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ONFTReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"dstEid","type":"uint32"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ONFTSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"peer","type":"bytes32"}],"name":"PeerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"preCrimeAddress","type":"address"}],"name":"PreCrimeSet","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"},{"inputs":[],"name":"SEND","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND_AND_COMPOSE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"}],"name":"allowInitializePath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approvalRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"uint16","name":"_msgType","type":"uint16"},{"internalType":"bytes","name":"_extraOptions","type":"bytes"}],"name":"combineOptions","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpointV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"}],"name":"enforcedOptions","outputs":[{"internalType":"bytes","name":"enforcedOption","type":"bytes"}],"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":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"","type":"tuple"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"address","name":"_sender","type":"address"}],"name":"isComposeMsgSender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"isPeer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct InboundPacket[]","name":"_packets","type":"tuple[]"}],"name":"lzReceiveAndRevert","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceiveSimulate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"maxToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"msgInspector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nextNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oApp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oAppVersion","outputs":[{"internalType":"uint64","name":"senderVersion","type":"uint64"},{"internalType":"uint64","name":"receiverVersion","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"onftVersion","outputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"},{"internalType":"uint64","name":"version","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"peers","outputs":[{"internalType":"bytes32","name":"peer","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preCrime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"onftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"quoteSend","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"msgFee","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"onftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"_fee","type":"tuple"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"send","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"msgReceipt","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseTokenURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"setEnforcedOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_msgInspector","type":"address"}],"name":"setMsgInspector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"setPeer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_preCrime","type":"address"}],"name":"setPreCrime","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":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
9c4d535b00000000000000000000000000000000000000000000000000000000000000000100085787a69ca6a59767f1b5888c6f15539dfbf5fc3e7bc0bdc0dba1e5a2cc00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x0004000000000002000f000000000002000000000e01034f0000006001100270000007b00f1001970003000000fe035500020000000e0355000007b00010019d0000000100200190000000420000c13d000000800a0000390000004000a0043f0000000400f0008c00000dd50000413d00000000010e043b000000e001100270000007c00010009c000000930000a13d000007c10010009c000000a60000a13d000007c20010009c000000dc0000213d000007ca0010009c000001410000213d000007ce0010009c000002210000613d000007cf0010009c0000032d0000613d000007d00010009c00000dd50000c13d0000004400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000401043b000007be0040009c00000dd50000213d000000040140003900000000021f0049000008170020009c00000dd50000213d000000c00020008c00000dd50000413d0000002405e00370000000000305043b000000000003004b0000000005000039000000010500c039000c00000003001d000000000053004b00000dd50000c13d000000c005000039000000400050043f000000240740003900000000047e034f000000800000043f000000a00000043f000000000604043b000000000006004b0000071a0000c13d0000082401000041000000000010043f000008040100004100001ebf00010430000000a001000039000000400010043f0000000001000416000000000001004b00000dd50000c13d0000000401000039000000a00010043f000007b102000041000000c00020043f0000012003000039000000400030043f000000e00010043f000001000020043f0000000006000411000000000006004b000000570000c13d000007ff01000041000000000010043f000000040000043f000007fe0100004100001ebf00010430000000000100041a000007b202100197000000000262019f000000000020041b0000000002000414000007b305100197000007b00020009c000007b002008041000000c001200210000007b4011001c70000800d020000390000000303000039000007b5040000411ebd1eb30000040f000000010020019000000dd50000613d000007b601000041000000800010043f000007b702000041000000000020044300000004001004430000000001000414000007b00010009c000007b001008041000000c001100210000007b8011001c700008002020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000000000001004b00000dd50000613d000007b901000041000001200010043f0000000001000411000001240010043f0000000001000414000007b00010009c000007b001008041000000c001100210000007ba011001c7000007b6020000411ebd1eb30000040f0000006003100270000107b00030019d00030000000103550000000100200190000002020000613d0000012001000039000000400010043f000000a00400043d000007bc0040009c000005960000413d0000082a01000041000000000010043f0000004101000039000000040010043f000007fe0100004100001ebf00010430000007df0010009c000000b50000213d000007ee0010009c0000011b0000a13d000007ef0010009c000001810000213d000007f30010009c000003bd0000613d000007f40010009c0000055e0000613d000007f50010009c00000dd50000c13d0000000001000416000000000001004b00000dd50000c13d0000000101000039000000800010043f000007fc0100004100001ebe0001042e000007d10010009c000000fd0000a13d000007d20010009c0000016f0000213d000007d60010009c000003090000613d000007d70010009c000005170000613d000007d80010009c00000dd50000c13d0000000001000416000000000001004b00000dd50000c13d0000000201000039000001270000013d000007e00010009c000001290000a13d000007e10010009c000001bb0000213d000007e50010009c000004170000613d000007e60010009c000005670000613d000007e70010009c00000dd50000c13d0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b30010009c00000dd50000213d000000000200041a000007b3032001970000000002000411000000000023004b000005fa0000c13d0000000402000039000000000302041a000007b203300197000000000313019f000000000032041b000000800010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000801011001c70000800d02000039000000010300003900000832040000410000036d0000013d000007c30010009c0000014f0000213d000007c70010009c0000023d0000613d000007c80010009c000003510000613d000007c90010009c00000dd50000c13d0000004400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b30010009c00000dd50000213d0000002402e00370000000000202043b000d00000002001d000007b30020009c00000dd50000213d000000000010043f0000000a01000039000000200010043f000000400200003900000000010000191ebd1e850000040f0000000d020000291ebd181e0000040f000000000101041a000000ff001001900000013e0000013d000007d90010009c000001cb0000a13d000007da0010009c000002ba0000613d000007db0010009c000004880000613d000007dc0010009c00000dd50000c13d0000004400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000d00000001001d000007b30010009c00000dd50000213d0000002401e00370000000000201043b000000000002004b0000000001000039000000010100c039000c00000002001d000000000012004b00000dd50000c13d0000000d0000006b000006310000c13d0000082f01000041000000530000013d000007f60010009c000001d40000a13d000007f70010009c000002d90000613d000007f80010009c000004b60000613d000007f90010009c00000dd50000c13d0000000001000416000000000001004b00000dd50000c13d0000000401000039000000000101041a000004240000013d000007e80010009c000001f70000a13d000007e90010009c000002ec0000613d000007ea0010009c000004d90000613d000007eb0010009c00000dd50000c13d0000004400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b00010009c00000dd50000213d0000002402e00370000000000202043b1ebd18070000040f000000000001004b0000000001000039000000010100c0390000056f0000013d000007cb0010009c000002800000613d000007cc0010009c0000036e0000613d000007cd0010009c00000dd50000c13d0000000001000416000000000001004b00000dd50000c13d0000000c01000039000000000101041a000000800010043f000007fc0100004100001ebe0001042e000007c40010009c0000029e0000613d000007c50010009c000001fb0000613d000007c60010009c00000dd50000c13d0000006400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b00010009c00000dd50000213d000000000010043f0000000101000039000000200010043f00000040020000390000000001000019000d0000000e03531ebd1e850000040f0000000d0200035f0000002402200370000000000202043b000000000101041a000000000021004b00000000010000390000000101006039000000800010043f000007fc0100004100001ebe0001042e000007d30010009c000003120000613d000007d40010009c0000051e0000613d000007d50010009c00000dd50000c13d0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b00010009c00000dd50000213d000000000010043f0000000101000039000006290000013d000007f00010009c000004280000613d000007f10010009c000005760000613d000007f20010009c00000dd50000c13d0000004400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000d00000001001d000007b00010009c00000dd50000213d0000002401e00370000000000301043b000000000100041a000007b3021001970000000001000411000000000012004b000005df0000c13d000c00000003001d0000000d01000029000000000010043f0000000101000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b0000000c03000029000000000031041b000000400100043d000000200210003900000000003204350000000d020000290000000000210435000007b00010009c000007b00100804100000040011002100000000002000414000007b00020009c000007b002008041000000c002200210000000000112019f00000805011001c70000800d02000039000000010300003900000836040000410000036d0000013d000007e20010009c000004600000613d000007e30010009c0000057e0000613d000007e40010009c00000dd50000c13d0000004400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b00010009c0000048b0000a13d00000dd50000013d000007dd0010009c0000046d0000613d000007de0010009c00000dd50000c13d0000000001000416000000000001004b00000dd50000c13d000000000100041a000004240000013d000007fa0010009c0000048e0000613d000007fb0010009c00000dd50000c13d0000000001000416000000000001004b00000dd50000c13d0000000503000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f0000000100500190000005a00000c13d000000800010043f000000000004004b000005e40000613d000000000030043f000000000001004b0000000002000019000005e90000613d00000847030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000012004b000001ef0000413d000005e90000013d000007ec0010009c000004a20000613d000007ed0010009c00000dd50000c13d0000000001000416000000000001004b00000dd50000c13d0000000001000410000000800010043f000007fc0100004100001ebe0001042e000007b0033001970000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000020a0000c13d000000000005004b0000021b0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000007b00020009c000007b0020080410000004002200210000000000112019f00001ebf000104300000006400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000d00000001001d000007b00010009c00000dd50000213d0000002401e00370000000000101043b000c00000001001d0000ffff0010008c00000dd50000213d0000004401e00370000000000101043b000007be0010009c00000dd50000213d000000040110003900000000020f00191ebd16580000040f000000000301001900000000040200190000000d010000290000000c020000291ebd19e40000040f000003030000013d000000e400f0008c00000dd50000413d0000006401e00370000000000101043b000d00000001001d0000008401e00370000000000201043b000007be0020009c00000dd50000213d00000023012000390000000000f1004b00000dd50000813d000000040120003900000000041e034f000000000304043b000c00000003001d000007be0030009c00000dd50000213d0000000c02200029000b00240020003d0000000b00f0006b00000dd50000213d000000a402e00370000000000202043b000007b30020009c00000dd50000213d000000c402e00370000000000202043b000007be0020009c00000dd50000213d00000023042000390000000000f4004b00000dd50000813d000000040420003900000000044e034f000000000404043b000007be0040009c00000dd50000213d000000000242001900000024022000390000000000f2004b00000dd50000213d00000000020004100000000003000411000000000023004b00000bcc0000c13d0000000c02000029000000200020008c00000dd50000413d000000200210003900000000012e034f000000000101043b0000000c04000029000000400040008c00000dd50000413d000900200020003d0000000902e00360000000000202043b000a00000002001d0000000402e00370000000000202043b000007b00020009c00000dd50000213d000807b30010019c00000d3c0000c13d0000084401000041000000530000013d0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000d00000001001d000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000101041a000007b3001001980000060a0000c13d0000081601000041000000000010043f0000000d01000029000000040010043f000007fe0100004100001ebf000104300000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000601043b000007b30060009c00000dd50000213d000000000100041a000007b3021001970000000005000411000000000052004b000005a60000c13d000000000006004b000000520000613d000007b201100197000000000161019f000000000010041b0000000001000414000007b00010009c000007b001008041000000c001100210000007b4011001c70000800d020000390000000303000039000007b504000041000005910000013d0000000001000416000000000001004b00000dd50000c13d0000000603000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f0000000100500190000005a00000c13d000000800010043f000000000004004b000005e40000613d000000000030043f000000000001004b0000000002000019000005e90000613d00000830030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000012004b000002d10000413d000005e90000013d0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000d00000001001d1ebd1b3e0000040f0000000d01000029000000000010043f0000000901000039000000200010043f000000400200003900000000010000191ebd1e850000040f000000000101041a000007b3011001970000056f0000013d0000004400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b00010009c00000dd50000213d0000002402e00370000000000202043b000d00000002001d0000ffff0020008c00000dd50000213d000000000010043f0000000301000039000000200010043f000000400200003900000000010000191ebd1e850000040f0000000d020000291ebd16840000040f1ebd16a60000040f0000002002000039000000400300043d000d00000003001d00000000022304361ebd15f10000040f000005f00000013d0000000001000416000000000001004b00000dd50000c13d0000082c01000041000000800010043f0000000101000039000000a00010043f0000082d0100004100001ebe0001042e0000008400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000d00000001001d000007b30010009c00000dd50000213d0000002401e00370000000000101043b000c00000001001d000007b30010009c00000dd50000213d0000006401e00370000000000101043b000007be0010009c00000dd50000213d0000004402e00370000000000202043b000b00000002001d000000040110003900000000020f00191ebd16f30000040f0000000004010019000004b00000013d0000002400f0008c00000dd50000413d0000000401e00370000000000101043b000800000001001d000007be0010009c00000dd50000213d000000080100002900000023011000390000000000f1004b00000dd50000813d0000000801000029000000040110003900000000011e034f000000000101043b000700000001001d000007be0010009c00000dd50000213d0000000801000029000c00240010003d000000070100002900000005011002100000000c011000290000000000f1004b00000dd50000213d000000070000006b0000077d0000c13d000008260100004100000000001a043500000000010004140000000002000411000000040020008c000008b80000c13d00000003010003670000000103000031000008ca0000013d0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b30010009c00000dd50000213d000000000200041a000007b3032001970000000002000411000000000023004b000005fa0000c13d0000000202000039000000000302041a000007b203300197000000000313019f000000000032041b000000800010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000801011001c70000800d0200003900000001030000390000080204000041000005910000013d0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000d00000001001d000007b30010009c00000dd50000213d000000000100041a000007b3021001970000000001000411000000000012004b000005df0000c13d000008070100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000007b00010009c000007b001008041000000c00110021000000808011001c700008005020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000007b7020000410000000000200443000007b301100197000c00000001001d00000004001004430000000001000414000007b00010009c000007b001008041000000c001100210000007b8011001c700008002020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000000000001004b00000dd50000613d000000400400043d000007b901000041000000000014043500000004014000390000000d02000029000000000021043500000000010004140000000c02000029000000040020008c000003b80000613d000007b00040009c000007b00300004100000000030440190000004003300210000007b00010009c000007b001008041000000c001100210000000000131019f000007fe011001c7000d00000004001d1ebd1eb30000040f0000000d040000290000006003100270000107b00030019d0003000000010355000000010020019000000b6c0000613d000007be0040009c0000008d0000213d000000400040043f000000000100001900001ebe0001042e000000e400f0008c00000dd50000413d0000006401e00370000000000101043b000d00000001001d0000008401e00370000000000101043b000007be0010009c00000dd50000213d00000023021000390000000000f2004b00000dd50000813d000b00040010003d0000000b02e00360000000000202043b000c00000002001d000007be0020009c00000dd50000213d0000000c01100029000a00240010003d0000000a00f0006b00000dd50000213d000000a401e00370000000000101043b000007b30010009c00000dd50000213d000000c401e00370000000000101043b000007be0010009c00000dd50000213d00000023021000390000000000f2004b00000dd50000813d000000040210003900000000022e034f000000000202043b000007be0020009c00000dd50000213d000000000121001900000024011000390000000000f1004b00000dd50000213d000008070100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000007b00010009c000007b001008041000000c00110021000000808011001c700008005020000391ebd1eb80000040f0000000100200190000015910000613d0000000002000411000000000101043b000007b301100197000000000021004b00000bd00000c13d00000004010000390000000201100367000000000101043b000900000001001d000007b00010009c00000dd50000213d0000000901000029000000000010043f0000000101000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000000000002004b00000dbe0000c13d0000082301000041000000000010043f0000000901000029000000040010043f000007fe0100004100001ebf000104300000000001000416000000000001004b00000dd50000c13d0000000001000412000f00000001001d000e00000000003d0000800501000039000000440300003900000000040004150000000f0440008a000000050440021000000807020000411ebd1e9a0000040f000007b301100197000000800010043f000007fc0100004100001ebe0001042e0000008400f0008c00000dd50000413d0000000401e00370000000000101043b000007be0010009c00000dd50000213d000d00040010003d0000000d02f0006a000008170020009c00000dd50000213d000000c00020008c00000dd50000413d0000006402e00370000000000202043b000c00000002001d000007b30020009c00000dd50000213d000000800000043f000000a00000043f0000012002000039000000400020043f000000e00000043f000001000000043f000000e002000039000000c00020043f000000440110003900000000011e034f0000000d02e00360000000000101043b000b00000001001d000000000102043b000007b00010009c00000dd50000213d0000000b01000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000101041a000007b301100198000009890000c13d0000081601000041000000000010043f0000000b01000029000000040010043f000007fe0100004100001ebf000104300000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007b30010009c00000dd50000213d000000000001004b000006270000c13d0000083101000041000000530000013d000000a400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000006401e00370000000000101043b000007be0010009c00000dd50000213d00000023021000390000000000f2004b00000dd50000813d000000040210003900000000022e034f000000000202043b000007be0020009c00000dd50000213d000000000121001900000024011000390000000000f1004b00000dd50000213d0000008401e00370000000000101043b000007b30010009c00000dd50000213d0000000002000410000001690000013d0000000001000416000000000001004b00000dd50000c13d000000800000043f000007fc0100004100001ebe0001042e0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000201043b000008480020019800000dd50000c13d000000010100003900000849022001970000084a0020009c0000062e0000613d0000084b0020009c0000062e0000613d0000084c0020009c000000000100c019000000800010043f000007fc0100004100001ebe0001042e0000000001000416000000000001004b00000dd50000c13d00000000010f00191ebd16720000040f000d00000001001d000c00000002001d000b00000003001d000000400100043d000a00000001001d00000020020000391ebd16940000040f0000000a0400002900000000000404350000000d010000290000000c020000290000000b030000291ebd182e0000040f000000000100001900001ebe0001042e0000004400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000d00000001001d000007b30010009c00000dd50000213d0000002401e00370000000000101043b000c00000001001d000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000101041a000007b305100198000006620000c13d0000081601000041000000000010043f0000000c01000029000000040010043f000007fe0100004100001ebf000104300000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007be0010009c00000dd50000213d00000023021000390000000000f2004b00000dd50000813d000000040510003900000000025e034f000000000202043b000007be0020009c00000dd50000213d000000240410003900000000014200190000000000f1004b00000dd50000213d000000000100041a000007b3031001970000000001000411000000000013004b000005df0000c13d0000000b01000039000000000601041a000000010060019000000001036002700000007f0330618f0000001f0030008c00000000070000390000000107002039000000000676013f0000000100600190000005a00000c13d000000200030008c0000050f0000413d000000000010043f0000001f062000390000000506600270000008330660009a000000200020008c0000080b060040410000001f033000390000000503300270000008330330009a000000000036004b0000050f0000813d000000000006041b0000000106600039000000000036004b0000050b0000413d0000001f0020008c00000a290000a13d000000000010043f0000084d0520019800000b820000c13d0000080b03000041000000000600001900000b8d0000013d0000000001000416000000000001004b00000dd50000c13d0000000201000039000000800010043f000007fc0100004100001ebe0001042e0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b000007be0010009c00000dd50000213d00000023021000390000000000f2004b00000dd50000813d000000040210003900000000022e034f000000000402043b000007be0040009c00000dd50000213d000d00240010003d00000005054002100000000d015000290000000000f1004b00000dd50000213d000000000600041a000007b3076001970000000006000411000000000067004b000008a90000c13d0000003f055000390000082805500197000008290050009c0000008d0000213d0000008005500039000000400050043f000000800040043f000000000004004b00000a360000c13d000000400100043d00000020020000390000000003210436000000800200043d0000000000230435000000400310003900000005042002100000000009340019000000000002004b00000aca0000c13d0000000002190049000007b00020009c000007b0020080410000006002200210000007b00010009c000007b0010080410000004001100210000000000112019f0000000002000414000007b00020009c000007b002008041000000c002200210000000000121019f000007b4011001c70000800d0200003900000001030000390000082b040000410000036d0000013d0000000001000416000000000001004b00000dd50000c13d0000000101000039000000800010043f0000000201000039000000a00010043f0000082d0100004100001ebe0001042e0000002400f0008c00000dd50000413d0000000001000416000000000001004b00000dd50000c13d0000000401e00370000000000101043b1ebd1b3e0000040f000000400200043d0000000000120435000007b00020009c000007b002008041000000400120021000000800011001c700001ebe0001042e0000000001000416000000000001004b00000dd50000c13d00000000010f00191ebd16720000040f1ebd173d0000040f000000000100001900001ebe0001042e0000000001000416000000000001004b00000dd50000c13d000000000100041a000007b3021001970000000005000411000000000052004b000005a60000c13d000007b201100197000000000010041b0000000001000414000007b00010009c000007b001008041000000c001100210000007b4011001c70000800d020000390000000303000039000007b50400004100000000060000191ebd1eb30000040f000000010020019000000dd50000613d000000000100001900001ebe0001042e0000000506000039000000000106041a000000010210019000000001031002700000007f0330618f0000001f0030008c00000000010000390000000101002039000000000012004b000005ab0000613d0000082a01000041000000000010043f0000002201000039000000040010043f000007fe0100004100001ebf00010430000007fd01000041000000000010043f000000040050043f000007fe0100004100001ebf00010430000000200030008c000005cb0000413d000c00000003001d000d00000004001d000000000060043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d0000000d040000290000001f024000390000000502200270000000200040008c0000000002004019000000000301043b0000000c010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b0000000506000039000005cb0000813d000000000002041b0000000102200039000000000012004b000005c70000413d0000001f0040008c000005ff0000a13d000d00000004001d000000000060043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d0000000d070000290000084d02700198000000000101043b000006a30000c13d000000c0030000390000000506000039000006b20000013d000007fd02000041000000000020043f000000040010043f000007fe0100004100001ebf000104300000084e02200197000000a00020043f000000000001004b00000020020000390000000002006039000000200220003900000080010000391ebd16940000040f000000400100043d000d00000001001d00000080020000391ebd16230000040f0000000d020000290000000001210049000007b00010009c000007b0010080410000006001100210000007b00020009c000007b0020080410000004002200210000000000121019f00001ebe0001042e000007fd01000041000000000010043f000000040020043f000007fe0100004100001ebf00010430000000000004004b0000000001000019000006030000613d000000c00100043d00000003024002100000084f0220027f0000084f02200167000000000121016f0000000102400210000000000121019f000006bd0000013d0000000b04000039000000000204041a000000010620019000000001012002700000007f0110618f0000001f0010008c00000000030000390000000103002039000000000332013f0000000100300190000005a00000c13d000000400500043d0000000003150436000000000006004b000007000000613d000000000040043f000000000001004b0000000002000019000007050000613d0000080b0400004100000000020000190000000006320019000000000704041a000000000076043500000001044000390000002002200039000000000012004b0000061f0000413d000007050000013d000000000010043f0000000801000039000000200010043f000000400200003900000000010000191ebd1e850000040f000000000101041a000000800010043f000007fc0100004100001ebe0001042e0000000001000411000000000010043f0000000a01000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b0000000d02000029000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a0000084e022001970000000c03000029000000000232019f000000000021041b000000400100043d0000000000310435000007b00010009c000007b00100804100000040011002100000000002000414000007b00020009c000007b002008041000000c002200210000000000112019f000007bd011001c70000800d0200003900000003030000390000082e0400004100000000050004110000000d06000029000005910000013d0000000001000411000000000001004b0000068e0000613d000000000015004b0000068e0000613d000b00000005001d000000000050043f0000000a01000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b0000000002000411000007b302200197000a00000002001d000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000101041a000000ff001001900000000b050000290000068e0000c13d0000084501000041000000000010043f0000000a01000029000000040010043f000007fe0100004100001ebf000104300000000001000414000007b00010009c000007b001008041000000c001100210000007b4011001c70000800d02000039000000040300003900000846040000410000000d060000290000000c070000291ebd1eb30000040f000000010020019000000dd50000613d0000000c010000291ebd1b590000040f000000000201041a000007b2022001970000000d022001af000000000021041b000000000100001900001ebe0001042e000000010320008a000000050330027000000000033100190000002004000039000000010330003900000005060000390000000005040019000000a0044000390000000004040433000000000041041b00000020045000390000000101100039000000000031004b000006a90000c13d000000c003500039000000000072004b000006bb0000813d0000000302700210000000f80220018f0000084f0220027f0000084f022001670000000003030433000000000223016f000000000021041b000000010170021000000001011001bf000000000016041b000000e00500043d000007be0050009c0000008d0000213d0000000604000039000000000104041a000000010010019000000001031002700000007f0330618f0000001f0030008c00000000020000390000000102002039000000000121013f0000000100100190000005a00000c13d000000200030008c000006ec0000413d000c00000003001d000d00000005001d000000000040043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d0000000d050000290000001f025000390000000502200270000000200050008c0000000002004019000000000301043b0000000c010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b0000000604000039000006ec0000813d000000000002041b0000000102200039000000000012004b000006e80000413d0000001f0050008c0000000106000039000008ae0000a13d000d00000005001d000000000040043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000200200008a0000000d02200180000000000101043b00000aa10000c13d000001000300003900000aaf0000013d0000084e022001970000000000230435000000000001004b000000200200003900000000020060390000003f022000390000084d042001970000000002540019000000000042004b00000000040000390000000104004039000007be0020009c0000008d0000213d00000001004001900000008d0000c13d000000400020043f0000000004050433000000000004004b000009260000c13d000008150020009c0000008d0000213d0000002001200039000000400010043f0000000000020435000000400100043d00000b6a0000013d000000600570003900000000045e034f000000000804043b0000001f0220008a00000818098001970000081804200197000000000a49013f000000000049004b00000000090000190000081809004041000000000028004b000000000b000019000008180b0080410000081800a0009c00000000090bc019000000200770003900000000077e034f000000000707043b000000000009004b00000dd50000c13d000000000918001900000000089e034f000000000808043b000007be0080009c00000dd50000213d000000000a8f00490000002009900039000008180ba00197000008180c900197000000000dbc013f0000000000bc004b000000000b000019000008180b0040410000000000a9004b000000000a000019000008180a0020410000081800d0009c000000000b0ac01900000000000b004b00000dd50000c13d0000001f0a8000390000084d0aa001970000003f0aa000390000084d0aa001970000081900a0009c0000008d0000213d000000c00aa000390000004000a0043f000000c00080043f000000000a9800190000000000fa004b00000dd50000213d000a0000000f001d000d0000000e0353000000000a9e034f0000084d0b8001980000001f0c80018f000000e009b000390000075b0000613d000000e00d000039000000000e0a034f00000000ef0e043c000000000dfd043600000000009d004b000007570000c13d00000000000c004b000007680000613d000000000aba034f000000030bc00210000000000c090433000000000cbc01cf000000000cbc022f000000000a0a043b000001000bb00089000000000aba022f000000000aba01cf000000000aca019f0000000000a90435000000e0088000390000000000080435000000400300043d0000004008300039000000c00900043d0000000000780435000b00000003001d0000002003300039000900000003001d0000000000630435000000000009004b00000c880000c13d00000040060000390000000b0300002900000000006304350000081a0030009c0000008d0000213d000700010000003d0000000b03000029000000600630003900000cc90000013d0000000002000019000007910000013d000007b4011001c70000800902000039000000000400041000000000050000191ebd1eb30000040f00030000000103550000006003100270000107b00030019d00000001002001900000000d0a00002900000bd20000613d000007be00a0009c0000008d0000213d0000004000a0043f0000000a020000290000000102200039000000070020006c00000bca0000813d000a00000002001d00000005012002100000000c021000290000000201000367000000000221034f000000000202043b00000008030000290000000003300079000001630330008a00000818042001970000081805300197000000000654013f000000000054004b00000000040000190000081804004041000000000032004b00000000030000190000081803008041000008180060009c000000000403c019000000000004004b00000dd50000c13d0000000c04200029000000000241034f000000000202043b000007b00020009c00000dd50000213d000900200040003d0000000901100360000000000101043b000b00000001001d000000000020043f0000000101000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c70000801002000039000d00000004001d1ebd1eb80000040f0000000d0b000029000000010020019000000dd50000613d000000000101043b000000000101041a0000000b0010006c0000078d0000c13d000000090a000029000000e005a000390000000202000367000000000152034f000000000601043b00000000010000310000000003b100490000001f0330008a00000818043001970000081807600197000000000847013f000000000047004b00000000070000190000081807004041000000000036004b00000000090000190000081809008041000008180080009c000000000709c0190000008008a00039000000a009a00039000000000992034f000000000882034f000000000c08043b000000000809043b000100000008001d000000000007004b00000dd50000c13d0000000006b60019000000000762034f000000000a07043b000007be00a0009c00000dd50000213d0000000007a10049000000200d60003900000818067001970000081808d00197000000000968013f000000000068004b0000000006000019000008180600404100000000007d004b00000000070000190000081807002041000008180090009c000000000607c019000000000006004b00000dd50000c13d000000200550008a000000000652034f000000000806043b000007b30080009c00000dd50000213d0000004005500039000000000552034f000000000505043b0000081806500197000000000746013f000000000046004b00000000040000190000081804004041000000000035004b00000000030000190000081803008041000008180070009c000000000403c019000000000004004b00000dd50000c13d0000000003b50019000000000232034f000000000502043b000007be0050009c00000dd50000213d0000000001510049000000200630003900000818021001970000081803600197000000000423013f000000000023004b00000000020000190000081802004041000200000006001d000000000016004b00000000010000190000081801002041000008180040009c000000000201c019000000000002004b00000dd50000c13d00030000000d001d00040000000c001d000500000008001d00060000000a001d000b00000005001d000007b7010000410000000000100443000000000100041000000004001004430000000001000414000007b00010009c000007b001008041000000c001100210000007b8011001c700008002020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000000000001004b0000000b0b000029000000060c0000290000000d02000029000000050d0000290000000406000029000000030700002900000dd50000613d000000400a00043d000008250100004100000000001a04350000000201000367000000000221034f000000000302043b000007b00030009c00000dd50000213d0000000402a0003900000000003204350000000905000029000000000351034f000000000303043b0000002404a0003900000000003404350000002003500039000000000331034f000000000303043b000007be0030009c00000dd50000213d0000008404a00039000000e00500003900000000005404350000006404a0003900000000006404350000004404a000390000000000340435000000e403a000390000000000c30435000000000571034f0000084d06c001980000010403a0003900000000046300190000085e0000613d000000000705034f0000000008030019000000007907043c0000000008980436000000000048004b0000085a0000c13d0000001f07c001900000086b0000613d000000000565034f0000000306700210000000000704043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f00000000005404350000000004c300190000000000040435000000a404a000390000000000d404350000001f04c000390000084d0440019700000000044300190000000002240049000000c403a00039000000000023043500000002031003600000000001b404360000084d04b001980000000002410019000008800000613d000000000503034f0000000006010019000000005705043c0000000006760436000000000026004b0000087c0000c13d0000001f05b001900000088d0000613d000000000343034f0000000304500210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f00000000003204350000000002b10019000000000002043500000000020004140000000003000410000000040030008c0000078a0000613d0000001f03b000390000084d033001970000000003a300490000000001130019000007b00010009c000007b0010080410000006001100210000007b000a0009c000d0000000a001d000007b00300004100000000030a40190000004003300210000000000131019f000007b00020009c000007b002008041000000c002200210000000000112019f0000000103000029000000000003004b0000077f0000c13d0000000002000410000007830000013d000007fd01000041000000000010043f000000040060043f000007fe0100004100001ebf00010430000000000005004b0000000001000019000008b20000613d000001000100043d00000003025002100000084f0220027f0000084f02200167000000000121016f000000010250021000000abd0000013d000007b000a0009c000d0000000a001d000007b00300004100000000030a40190000004003300210000007b00010009c000007b001008041000000c001100210000000000131019f00000804011001c71ebd1eb80000040f0000006003100270000107b00030019d000007b003300197000300000001035500000001002001900000092c0000613d0000000d0a0000290000084d053001980000001f0630018f00000000025a0019000008d40000613d000000000701034f00000000080a0019000000007907043c0000000008980436000000000028004b000008d00000c13d000000000006004b000008e10000613d000000000151034f0000000305600210000000000602043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001204350000001f013000390000084d011001970000000002a10019000000000012004b00000000010000390000000101004039000007be0020009c0000008d0000213d00000001001001900000008d0000c13d000000400020043f000008170030009c00000dd50000213d000000200030008c00000dd50000413d00000000010a0433000007be0010009c00000dd50000213d0000000006a300190000000001a100190000001f03100039000000000063004b0000000005000019000008180500804100000818033001970000081807600197000000000873013f000000000073004b00000000030000190000081803004041000008180080009c000000000305c019000000000003004b00000dd50000c13d0000000031010434000007be0010009c0000008d0000213d0000001f051000390000084d055001970000003f055000390000084d055001970000000005250019000007be0050009c0000008d0000213d000000400050043f00000000051204360000000007310019000000000067004b00000dd50000213d0000084d061001970000001f0410018f000000000053004b00000dd70000813d000000000006004b000009220000613d00000000084300190000000007450019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c0000091c0000c13d000000000004004b00000ded0000613d000000000705001900000de30000013d0000000d040000290000080c0040009c000009380000413d00000040060000390000080c0440012a000009400000013d0000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000009330000c13d0000020e0000013d0000080e0040009c0000080d0440212a000000000600003900000020060020390000080f0040009c00000010066081bf00000810044081970000080f0440812a000008110040009c0000000806608039000007be04408197000008110440812a000027100040008c0000000406608039000007b004408197000027100440811a000000640040008c00000002066080390000ffff0440818f000000640440811a000000090040008c00000001066020390000084d076001970000005f047000390000084d044001970000000004240019000007be0040009c0000008d0000213d000000400040043f0000000104600039000000000442043600000020077000390000084d087001980000001f0770018f000009630000613d000000000884001900000000090000310000000209900367000000000a040019000000009b09043c000000000aba043600000000008a004b0000095f0000c13d000000000007004b000000000662001900000021066000390000000d09000029000000090090008c0000000a7990011a0000000307700210000000010660008a00000000080604330000081208800197000008130770021f0000081407700197000000000787019f0000000000760435000009670000213d00000000060504330000084d096001970000001f0860018f000000400500043d0000002007500039000000000073004b00000b140000813d000000000009004b000009850000613d000000000b830019000000000a870019000000200aa0008a000000200bb0008a000000000c9a0019000000000d9b0019000000000d0d04330000000000dc0435000000200990008c0000097f0000c13d000000000008004b00000b2a0000613d000000000a07001900000b200000013d0000000002000411000000000012004b00000b790000c13d0000000b01000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000101041a000a07b30010019c000009bf0000613d0000000b01000029000000000010043f0000000901000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000007b202200197000000000021041b0000000a01000029000000000010043f0000000801000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000000010220008a000000000021041b0000000b01000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000007b202200197000000000021041b0000000001000414000007b00010009c000007b001008041000000c001100210000007b4011001c70000800d02000039000000040300003900000806040000410000000a0500002900000000060000190000000b070000291ebd1eb30000040f000000010020019000000dd50000613d0000000a0000006b0000045a0000613d0000000d010000291ebd1b690000040f000000000400003100000002030003670000000d05300360000900000001001d000800000002001d000000000105043b000a00000001001d000007b00010009c00000dd50000213d000008170040009c00000dd50000213d000000640040008c00000dd50000413d000000400100043d0000081f0010009c0000008d0000213d0000004002100039000000400020043f0000002402300370000000000202043b00000000042104360000004402300370000000000202043b000700000004001d0000000000240435000000400200043d0000081a0020009c0000008d0000213d0000006003200039000000400030043f000000200320003900000000000304350000000000020435000000400300043d0000081f0030009c0000008d0000213d0000004004300039000000400040043f0000002004300039000000000004043500000000000304350000004002200039000000000032043500000000010104330000000002000416000000000012004b00000e780000c13d00000007010000290000000001010433000600000001001d000000000001004b00000e800000c13d0000000a01000029000000000010043f0000000101000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000401041a000000000004004b00000f790000c13d0000082301000041000006890000013d000000000002004b000000000300001900000a2f0000613d000000200350003900000000033e034f000000000303043b00000003042002100000084f0440027f0000084f04400167000000000343016f0000000102200210000000000323019f00000b9a0000013d0000000002010019000000a0040000390000000d0500002900000a440000013d000000000779001900000000000704350000004007600039000000000087043500000000046404360000002005500039000000000025004b000000000e03034f000000000f01001900000bdf0000813d00000000065e034f000000000606043b000007be0060009c00000dd50000213d0000000d0760002900000000067f0049000008170060009c00000dd50000213d000000600060008c00000dd50000413d000000400600043d0000081a0060009c0000008d0000213d0000006008600039000000400080043f00000000087e034f000000000808043b000007b00080009c00000dd50000213d00000000098604360000002008700039000000000a8e034f000000000a0a043b0000ffff00a0008c00000dd50000213d0000000000a90435000000200880003900000000088e034f000000000808043b000007be0080009c00000dd50000213d00000000097800190000001f079000390000000000f7004b000000000800001900000818080080410000081807700197000000000007004b000000000a000019000008180a004041000008180070009c000000000a08c01900000000000a004b00000dd50000c13d00000000079e034f000000000707043b000007be0070009c0000008d0000213d0000001f087000390000084d088001970000003f088000390000084d0a800197000000400800043d000000000aa8001900000000008a004b000000000b000039000000010b004039000007be00a0009c0000008d0000213d0000000100b001900000008d0000c13d000000200b9000390000004000a0043f0000000009780436000000000ab700190000000000fa004b00000dd50000213d00000000010f001900000000030e034f000000000bbe034f0000084d0c700198000000000ac9001900000a930000613d000000000d0b034f000000000e09001900000000df0d043c000000000efe04360000000000ae004b00000a8f0000c13d0000001f0d70019000000a3a0000613d000000000bcb034f000000030cd00210000000000d0a0433000000000dcd01cf000000000dcd022f000000000b0b043b000001000cc00089000000000bcb022f000000000bcb01cf000000000bdb019f0000000000ba043500000a3a0000013d000000010320008a00000005033002700000000003310019000000200400003900000001033000390000000005040019000000e0044000390000000004040433000000000041041b00000020045000390000000101100039000000000031004b00000aa60000c13d00000100035000390000000d05000029000000000052004b00000ab90000813d0000000302500210000000f80220018f0000084f0220027f0000084f022001670000000003030433000000000223016f000000000021041b0000000101500210000000010600003900000000020600190000000604000039000000000121019f000000000014041b0000000a010000390000000c02000039000000000012041b000000800100043d00000140000004430000016000100443000000200100003900000100001004430000012000600443000007bf0100004100001ebe0001042e0000008004000039000000000700001900000ae00000013d000000000aca00190000000305b00210000000000b0d0433000000000b5b01cf000000000b5b022f000000000a0a04330000010005500089000000000a5a022f00000000055a01cf0000000005b5019f00000000005d04350000001f058000390000084d055001970000000008980019000000000008043500000000099500190000000107700039000000000027004b0000054c0000813d0000000008190049000000400880008a00000000038304360000002004400039000000000804043300000000ba080434000007b00aa00197000000000aa90436000000000b0b04330000ffff0bb0018f0000000000ba043500000040088000390000000008080433000000400a900039000000600500003900000000005a0435000000600b90003900000000a808043400000000008b04350000084d0c8001970000001f0b80018f000000800990003900000000009a004b00000b080000813d00000000000c004b00000b040000613d000000000eba0019000000000db90019000000200dd0008a000000200ee0008a000000000fcd00190000000005ce0019000000000505043300000000005f0435000000200cc0008c00000afe0000c13d00000000000b004b00000ad80000613d000000000d09001900000ace0000013d000000000dc9001900000000000c004b00000b110000613d000000000e0a0019000000000f09001900000000e50e0434000000000f5f04360000000000df004b00000b0d0000c13d00000000000b004b00000acd0000c13d00000ad80000013d000000000a970019000000000009004b00000b1d0000613d000000000b030019000000000c07001900000000bd0b0434000000000cdc04360000000000ac004b00000b190000c13d000000000008004b00000b2a0000613d0000000003930019000000030880021000000000090a043300000000098901cf000000000989022f00000000030304330000010008800089000000000383022f00000000038301cf000000000393019f00000000003a04350000000003760019000000000003043500000000020204330000084d072001970000001f0620018f000000000034004b00000b410000813d000000000007004b00000b3d0000613d00000000096400190000000008630019000000200880008a000000200990008a000000000a780019000000000b790019000000000b0b04330000000000ba0435000000200770008c00000b370000c13d000000000006004b00000b570000613d000000000803001900000b4d0000013d0000000008730019000000000007004b00000b4a0000613d0000000009040019000000000a030019000000009b090434000000000aba043600000000008a004b00000b460000c13d000000000006004b00000b570000613d00000000047400190000000306600210000000000708043300000000076701cf000000000767022f00000000040404330000010006600089000000000464022f00000000046401cf000000000474019f0000000000480435000000000232001900000000000204350000000002520049000000200320008a00000000003504350000001f022000390000084d012001970000000003510019000000000013004b00000000010000390000000101004039000007be0030009c0000008d0000213d00000001001001900000008d0000c13d00000000020300190000000001030019000000400020043f0000000002050019000d00000001001d000005ef0000013d000007b0033001970000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b00000b740000c13d0000020e0000013d0000000b010000291ebd1b3e0000040f0000083702000041000000000020043f0000000002000411000000040020043f000000240010043f000008380100004100001ebf000104300000080b03000041000000000600001900000000080e034f0000000007460019000000000778034f000000000707043b000000000073041b00000001033000390000002006600039000000000056004b00000b850000413d000000000025004b00000b980000813d0000000305200210000000f80550018f0000084f0550027f0000084f05500167000000000446001900000000044e034f000000000404043b000000000454016f000000000043041b000000010220021000000001032001bf000000000031041b0000002002000039000000800020043f000000010430019000000001023002700000007f0220618f0000001f0020008c00000000050000390000000105002039000000000553013f0000000100500190000005a00000c13d000000a00020043f000000000004004b00000bb70000613d000000000010043f000000000002004b000000000100001900000bbc0000613d0000080b030000410000000001000019000000000403041a000000c005100039000000000045043500000001033000390000002001100039000000000021004b00000baf0000413d00000bbc0000013d0000084e01300197000000c00010043f000000000002004b000000200100003900000000010060390000000002000414000007b00020009c000007b002008041000000c0022002100000004001100039000007b00010009c000007b0010080410000006001100210000000000121019f00000834011001c70000800d02000039000000010300003900000835040000410000036d0000013d000000400a00043d000003480000013d0000080301000041000000000010043f000008040100004100001ebf000104300000084101000041000005fb0000013d000007b0033001970000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b00000bda0000c13d0000020e0000013d000000800100043d000000000001004b000005420000613d000000000200001900000bed0000013d000000010170021000000001011001bf0000000d020000290000000b03000029000000000013041b0000000102200039000000800100043d000000000012004b000005420000813d000d00000002001d0000000501200210000000a001100039000b00000001001d000000000101043300000040021000390000000002020433000c00000002001d000000020220003900000000020204330000ffff0220018f000000030020008c00000e060000c13d0000000001010433000007b001100197000000000010043f0000000301000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000800200043d0000000d0020006c00000e1a0000a13d000000000101043b0000000b020000290000000002020433000000200220003900000000020204330000ffff0220018f000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000301043b0000000c010000290000000054010434000007be0040009c0000008d0000213d000000000103041a000000010010019000000001061002700000007f0660618f0000001f0060008c00000000020000390000000102002039000000000121013f0000000100100190000005a00000c13d000000200060008c000b00000003001d000a00000004001d00000c4e0000413d000800000006001d000900000005001d000000000030043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d0000000a040000290000001f024000390000000502200270000000200040008c0000000002004019000000000301043b00000008010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b0000000b03000029000000090500002900000c4e0000813d000000000002041b0000000102200039000000000012004b00000c4a0000413d000000200040008c00000c6e0000413d000000000030043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d0000000a070000290000084d02700198000000000101043b00000c7b0000613d000000010320008a00000005033002700000000003310019000000010430003900000020030000390000000c0600002900000000056300190000000005050433000000000051041b00000020033000390000000101100039000000000041004b00000c640000c13d000000000072004b00000be40000813d00000c7f0000013d000000000004004b00000c780000613d00000003014002100000084f0110027f0000084f011001670000000002050433000000000112016f0000000102400210000000000121019f00000c790000013d00000000010000190000000d0200002900000be80000013d00000020030000390000000c06000029000000000072004b00000be40000813d0000000302700210000000f80220018f0000084f0220027f0000084f0220016700000000036300190000000003030433000000000223016f000000000021041b00000be40000013d0000000b0a0000290000006006a0003900000000070004110000000000760435000000c00600043d0000084d096001970000001f0860018f0000008007a00039000000e10070008c00000ca20000413d000000000009004b00000c9d0000613d000000000b870019000000c00a8001bf000000200bb0008a000000000c9b0019000000000d9a0019000000000d0d04330000000000dc0435000000200990008c00000c970000c13d000000000008004b00000cb80000613d000000e009000039000000000a07001900000cae0000013d000000000a970019000000000009004b00000cab0000613d000000e00b000039000000000c07001900000000bd0b0434000000000cdc04360000000000ac004b00000ca70000c13d000000000008004b00000cb80000613d000000e0099000390000000308800210000000000b0a0433000000000b8b01cf000000000b8b022f00000000090904330000010008800089000000000989022f00000000088901cf0000000008b8019f00000000008a0435000000000676001900000000000604350000000b080000290000000006860049000000200760008a00000000007804350000001f066000390000084d076001970000000006870019000000000076004b00000000070000390000000107004039000007be0060009c0000008d0000213d00000001007001900000008d0000c13d000700020000003d000000400060043f00080080005000920000000d0300035f0000000805300360000000000505043b000007b00050009c0000000a0900002900000dd50000213d00000008060000290000006006600039000000000663034f000000000606043b0000081807600197000000000847013f000000000047004b00000000040000190000081804004041000000000026004b00000000020000190000081802008041000008180080009c000000000402c019000000000004004b00000dd50000c13d0000000001160019000000000213034f000000000202043b000d00000002001d000007be0020009c00000dd50000213d0000000d0290006a000000200610003900000818012001970000081803600197000000000413013f000000000013004b00000000010000190000081801004041000a00000006001d000000000026004b00000000020000190000081802002041000008180040009c000000000102c019000000000001004b00000dd50000c13d000000000050043f0000000301000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b0000000702000029000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000000010320019000000001042002700000007f0440618f000700000004001d0000001f0040008c00000000040000390000000104002039000000000442013f0000000100400190000005a00000c13d000000400400043d000600000004001d00000007050000290000000004540436000500000004001d000000000003004b00000e9d0000613d000000000010043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d0000000706000029000000000006004b0000000002000019000000050500002900000ea30000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000062004b00000d340000413d00000ea30000013d0000000a01000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000101041a000707b30010019c00000d6f0000613d0000000a01000029000000000010043f0000000901000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000007b202200197000000000021041b0000000701000029000000000010043f0000000801000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000000010220008a000000000021041b0000000801000029000000000010043f0000000801000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a0000000102200039000000000021041b0000000a01000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000007b2022001970000000806000029000000000262019f000000000021041b0000000001000414000007b00010009c000007b001008041000000c001100210000007b4011001c70000800d020000390000000403000039000008060400004100000007050000290000000a070000291ebd1eb30000040f000000010020019000000dd50000613d000000070000006b00000e7e0000c13d0000000c01000029000000400510008c00000ee00000213d00000004010000390000000201100367000000000101043b000007b00010009c00000dd50000213d000000400200043d00000020032000390000000a0400002900000000004304350000000000120435000007b00020009c000007b00200804100000040012002100000000002000414000007b00020009c000007b002008041000000c002200210000000000112019f00000805011001c70000800d0200003900000003030000390000080a040000410000000d050000290000000806000029000005910000013d00000002010003670000002403100370000000000303043b000000000032004b00000dff0000c13d0000000c02000029000000200020008c00000dd50000413d0000000b020000290000002003200039000000000231034f000000000202043b0000000c04000029000000400040008c00000dd50000413d000900200030003d0000000903100360000000000303043b000b00000003001d0000000401100370000000000101043b000007b00010009c00000e200000a13d000000000100001900001ebf000104300000000007650019000000000006004b00000de00000613d00000000080300190000000009050019000000008a0804340000000009a90436000000000079004b00000ddc0000c13d000000000004004b00000ded0000613d00000000036300190000000304400210000000000607043300000000064601cf000000000646022f00000000030304330000010004400089000000000343022f00000000034301cf000000000363019f0000000000370435000000000151001900000000000104350000082701000041000000400300043d000d00000003001d000000000013043500000004013000391ebd16230000040f0000000d020000290000000001210049000007b00010009c000007b0010080410000006001100210000007b00020009c000007b0020080410000004002200210000000000121019f00001ebf000104300000084201000041000000000010043f0000000901000029000000040010043f000000240030043f000008380100004100001ebf00010430000000400300043d000d00000003001d0000081b01000041000000000013043500000004013000390000002002000039000000000021043500000024023000390000000c010000291ebd15f10000040f0000000d020000290000000001210049000007b00010009c000007b001008041000007b00020009c000007b00200804100000060011002100000004002200210000000000121019f00001ebf000104300000082a01000041000000000010043f0000003201000039000000040010043f000007fe0100004100001ebf00010430000807b30020019c0000027e0000613d0000000b01000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000101041a000707b30010019c00000f380000c13d0000000801000029000000000010043f0000000801000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a0000000102200039000000000021041b0000000b01000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000007b2022001970000000806000029000000000262019f000000000021041b0000000001000414000007b00010009c000007b001008041000000c001100210000007b4011001c70000800d020000390000000403000039000008060400004100000007050000290000000b070000291ebd1eb30000040f000000010020019000000dd50000613d000000070000006b00000e7e0000c13d0000000c01000029000000400510008c000012820000213d00000004010000390000000201100367000000000101043b000007b00010009c00000dd50000213d000000400200043d00000020032000390000000b0400002900000000004304350000000000120435000007b00020009c000007b0020080410000004001200210000000000200041400000db30000013d0000083901000041000000000010043f0000000001000416000000040010043f000007fe0100004100001ebf000104300000084301000041000000530000013d000008070100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000007b00010009c000007b001008041000000c00110021000000808011001c700008005020000391ebd1eb80000040f0000000100200190000015910000613d000000000201043b000000400300043d0000083a01000041000500000003001d00000000001304350000000001000414000007b302200197000400000002001d000000040020008c00000fba0000c13d0000000103000031000000200030008c0000002004000039000000000403401900000fe50000013d0000084e0120019700000005020000290000000000120435000000070000006b000000200200003900000000020060390000003f012000390000084d011001970000000602100029000000000012004b00000000010000390000000101004039000700000002001d000007be0020009c0000008d0000213d00000001001001900000008d0000c13d0000000701000029000000400010043f00000006010000290000000001010433000000000001004b00000f5b0000c13d0000000d010000290000001f011000390000084d011001970000003f011000390000084d011001970000000701100029000007be0010009c0000008d0000213d000000400010043f00000007010000290000000d0400002900000000014104360000000a03400029000000000030007c00000dd50000213d0000000d040000290000084d034001980000001f0440018f0000000a020000290000000205200367000000000231001900000ed00000613d000000000605034f0000000007010019000000006806043c0000000007870436000000000027004b00000ecc0000c13d000000000004004b00000edd0000613d000000000335034f0000000304400210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f00000000003204350000000d0110002900000000000104350000100a0000013d00000002060003670000004401600370000000000201043b000007be0020009c00000dd50000213d0000000401600370000000000301043b000007b00030009c00000dd50000213d0000000c01000029000000210110008a0000084d011001970000003f011000390000084d01100197000000400400043d0000000001140019000000000041004b00000000070000390000000107004039000007be0010009c0000008d0000213d00000001007001900000008d0000c13d000000400010043f00000000015404360000000b08000029000000000080007c00000dd50000213d00000009070000290000002007700039000000000676034f0000084d075001980000001f0850018f000000000571001900000f090000613d000000000906034f000000000a010019000000009b09043c000000000aba043600000000005a004b00000f050000c13d000000000008004b00000f160000613d000000000676034f0000000307800210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f00000000006504350000000c05400029000000200550008a0000000000050435000000c002200210000000400600043d0000002005600039000b00000005001d0000000000250435000000e0023002100000002803600039000000000023043500000000020404330000084d052001970000001f0420018f000c00000006001d0000002c03600039000000000031004b000012da0000813d000000000005004b00000f340000613d00000000074100190000000006430019000000200660008a000000200770008a0000000008560019000000000957001900000000090904330000000000980435000000200550008c00000f2e0000c13d000000000004004b000012f00000613d0000000006030019000012e60000013d0000000b01000029000000000010043f0000000901000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000007b202200197000000000021041b0000000701000029000000000010043f0000000801000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000201041a000000010220008a000000000021041b00000e330000013d0000000d0000006b000010090000613d0000000d01000029000000010010008c0000102f0000c13d00000007040000290000002401400039000000010200003900000000002104350000081b0100004100000000001404350000000401400039000000200200003900000000002104350000004401400039000000000201043300000812022001970000000a030000290000000203300367000000000303043b0000081c03300197000000000223019f000000000021043500000045014000390000000000010435000007b00040009c000007b00400804100000040014002100000081d011001c700001ebf00010430000000400300043d000008200030009c0000008d0000213d00000007010000290000000001010433000000a002300039000000400020043f000000000001004b0000000002000039000000010200c03900000080013000390000000000210435000000600230003900000008050000290000000000520435000000400530003900000009060000290000000000650435000000200630003900000000004604350000000a0400002900000000004304350000083e04000041000000400800043d0000000004480436000700000004001d0000000404800039000000400700003900000000007404350000000003030433000007b0033001970000004404800039000000000034043500000000030604330000006404800039000000000034043500000000030504330000008404800039000000a0050000390000000000540435000000e406800039000000005403043400000000004604350000084d074001970000001f0640018f000a00000008001d0000010403800039000000000035004b0000109a0000813d000000000007004b00000fb60000613d00000000096500190000000008630019000000200880008a000000200990008a000000000a780019000000000b790019000000000b0b04330000000000ba0435000000200770008c00000fb00000c13d000000000006004b000010b00000613d0000000008030019000010a60000013d0000000502000029000007b00020009c000007b0020080410000004002200210000007b00010009c000007b001008041000000c001100210000000000121019f00000804011001c700000004020000291ebd1eb80000040f0000006003100270000007b003300197000000200030008c000000200400003900000000040340190000001f0640018f0000002007400190000000050570002900000fd40000613d000000000801034f0000000509000029000000008a08043c0000000009a90436000000000059004b00000fd00000c13d000000000006004b00000fe10000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f0003000000010355000000010020019000000ffd0000613d0000001f01400039000000600210018f0000000501200029000000000021004b00000000020000390000000102004039000007be0010009c0000008d0000213d00000001002001900000008d0000c13d000000400010043f000000200030008c00000dd50000413d00000005020000290000000002020433000500000002001d000007b30020009c00000dd50000213d000000050000006b000011c20000c13d0000083d01000041000000000010043f000008040100004100001ebf000104300000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000010040000c13d0000020e0000013d000700060000002d0000000401000039000000000101041a000007b3021001980000107a0000c13d00000008010000290000000201100367000000000101043b000d00000001001d000007b00010009c00000dd50000213d000000400100043d0000081f0010009c0000008d0000213d0000004002100039000000400020043f0000002002100039000000000002043500000000000104350000000d01000029000000000010043f0000000101000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000000dd50000613d000000000101043b000000000401041a000000000004004b000013990000c13d0000082301000041000002990000013d0000000d010000290000001f011000390000084d011001970000003f011000390000084d011001970000000701100029000007be0010009c0000008d0000213d000000400010043f00000007010000290000000d0400002900000000024104360000000a01400029000000000010007c00000dd50000213d00000002010003670000000a041003600000000d060000290000084d056001980000001f0660018f00000000035200190000104b0000613d000000000704034f0000000008020019000000007907043c0000000008980436000000000038004b000010470000c13d000000000006004b000010580000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004304350000000d022000290000000000020435000000400b00043d0000000702000029000000020220003900000000020204330000ffff0220018f000000030020008c000013490000c13d0000000d02000029000000020220008a000000060300002900000000030304330000084d063001970000001f0530018f0000002004b00039000000050040006b000013540000813d000000000006004b000010760000613d00000005085000290000000007540019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c000010700000c13d000000000005004b0000136b0000613d0000000007040019000013600000013d000000400700043d0000081e0100004100000000001704350000000401700039000000400300003900000000003104350000000b030000290000000003030433000000440470003900000000003404350000084d063001970000001f0530018f000d00000007001d0000006404700039000000090040006b0000110d0000813d000000000006004b000010960000613d00000009085000290000000007540019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c000010900000c13d000000000005004b000011240000613d0000000007040019000011190000013d0000000008730019000000000007004b000010a30000613d0000000009050019000000000a030019000000009b090434000000000aba043600000000008a004b0000109f0000c13d000000000006004b000010b00000613d00000000057500190000000306600210000000000708043300000000076701cf000000000767022f00000000050504330000010006600089000000000565022f00000000056501cf000000000575019f0000000000580435000000000534001900000000000504350000001f044000390000084d0440019700000000020204330000000a05000029000000a405500039000000c00640003900000000006504350000000003340019000000002502043400000000065304360000084d04500197000800000005001d0000001f0350018f000900000006001d000000000062004b000010d20000813d000000000004004b000010ce0000613d00000000063200190000000905300029000000200550008a000000200660008a0000000007450019000000000846001900000000080804330000000000870435000000200440008c000010c80000c13d000000000003004b000010e80000613d0000000905000029000010de0000013d0000000905400029000000000004004b000010db0000613d0000000006020019000000090700002900000000680604340000000007870436000000000057004b000010d70000c13d000000000003004b000010e80000613d00000000024200190000000303300210000000000405043300000000043401cf000000000434022f00000000020204330000010003300089000000000232022f00000000023201cf000000000242019f000000000025043500000009030000290000000802300029000000000002043500000000010104330000000a0400002900000024024000390000000c030000290000000000320435000000000001004b0000000001000039000000010100c039000000c4024000390000000000120435000008070100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000007b00010009c000007b001008041000000c00110021000000808011001c700008005020000391ebd1eb80000040f0000000100200190000015910000613d000000000201043b0000000001000414000007b304200197000000040040008c000011ab0000c13d0000000103000031000000800030008c00000080040000390000000004034019000012160000013d0000000007640019000000000006004b000011160000613d00000009080000290000000009040019000000008a0804340000000009a90436000000000079004b000011120000c13d000000000005004b000011240000613d000900090060002d0000000305500210000000000607043300000000065601cf000000000656022f000000090800002900000000080804330000010005500089000000000858022f00000000055801cf000000000565019f0000000000570435000000000543001900000000000504350000001f033000390000084d03300197000000000543001900000000011500490000000d03000029000000240330003900000000001304350000000701000029000000004301043400000000013504360000084d063001970000001f0530018f000000000014004b000011440000813d000000000006004b000011400000613d00000000085400190000000007510019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c0000113a0000c13d000000000005004b0000115a0000613d0000000007010019000011500000013d0000000007610019000000000006004b0000114d0000613d00000000080400190000000009010019000000008a0804340000000009a90436000000000079004b000011490000c13d000000000005004b0000115a0000613d00000000046400190000000305500210000000000607043300000000065601cf000000000656022f00000000040404330000010005500089000000000454022f00000000045401cf000000000464019f0000000000470435000000000413001900000000000404350000000004000414000000040020008c000011640000c13d0000000103000031000000200030008c00000020040000390000000004034019000011960000013d0000001f033000390000084d033001970000000d0500002900000000015100490000000001310019000007b00010009c000007b0010080410000006001100210000007b00050009c000007b00300004100000000030540190000004003300210000000000131019f000007b00040009c000007b004008041000000c003400210000000000131019f1ebd1eb80000040f0000006003100270000007b003300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000d05700029000011850000613d000000000801034f0000000d09000029000000008a08043c0000000009a90436000000000059004b000011810000c13d000000000006004b000011920000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000011e50000613d0000001f01400039000000600210018f0000000d01200029000000000021004b00000000020000390000000102004039000007be0010009c0000008d0000213d00000001002001900000008d0000c13d000000400010043f000000200030008c00000dd50000413d0000000d010000290000000001010433000000000001004b0000000002000039000000010200c039000000000021004b0000100e0000613d00000dd50000013d0000000a05000029000000090250006900000008030000290000001f033000390000084d033001970000000002320019000007b00050009c000007b00300004100000000030540190000004003300210000007b00020009c000007b0020080410000006002200210000000000232019f000007b00010009c000007b001008041000000c001100210000000000121019f0000000002000416000000000002004b000011f10000c13d0000000002040019000011f50000013d00000064021000390000000603000029000000000032043500000044021000390000000403000029000000000032043500000020021000390000083b03000041000000000032043500000024031000390000000004000411000000000043043500000064030000390000000000310435000008200010009c0000008d0000213d000000a003100039000000400030043f000000000301043300000000010004140000000504000029000000040040008c000013d60000c13d0000000001020433000000010010008c00000000010000390000000101006039000000000001004b00000a160000c13d0000083c01000041000000000010043f0000000501000029000000040010043f000007fe0100004100001ebf000104300000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000011ec0000c13d0000020e0000013d000007b4011001c70000800902000039000000000300041600000000050000191ebd1eb30000040f0000006003100270000007b003300197000000800030008c000000800400003900000000040340190000001f0640018f000000e0074001900000000a05700029000012050000613d000000000801034f0000000a09000029000000008a08043c0000000009a90436000000000059004b000012010000c13d000000000006004b000012120000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000012760000613d0000001f01400039000001e00110018f0000000a02100029000000000012004b00000000010000390000000101004039000c00000002001d000007be0020009c0000008d0000213d00000001001001900000008d0000c13d0000000c01000029000000400010043f000000800030008c00000dd50000413d0000000c010000290000081a0010009c0000008d0000213d0000000c020000290000006001200039000000400010043f0000000a0100002900000000010104330000000001120436000900000001001d00000007010000290000000001010433000007be0010009c00000dd50000213d00000009020000290000000000120435000000400100043d0000081f0010009c0000008d0000213d0000004002100039000000400020043f0000000a030000290000004002300039000000000202043300000000022104360000006003300039000000000303043300000000003204350000000c020000290000004002200039000a00000002001d00000000001204350000000d010000290000000201100367000000000101043b000007b00010009c00000dd50000213d0000000c020000290000000005020433000000400200043d00000020032000390000000b0400002900000000004304350000000000120435000007b00020009c000007b00200804100000040012002100000000002000414000007b00020009c000007b002008041000000c002200210000000000112019f00000805011001c70000800d0200003900000003030000390000083f0400004100000000060004111ebd1eb30000040f000000010020019000000dd50000613d0000000c010000290000000001010433000000400200043d000000000112043600000009030000290000000003030433000007be0330019700000000003104350000000a010000290000000001010433000000003101043400000040042000390000000000140435000000000103043300000060032000390000000000130435000007b00020009c000007b002008041000000400120021000000840011001c700001ebe0001042e0000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000127d0000c13d0000020e0000013d00000002060003670000004401600370000000000201043b000007be0020009c00000dd50000213d0000000401600370000000000301043b000007b00030009c00000dd50000213d0000000c01000029000000210110008a0000084d011001970000003f011000390000084d01100197000000400400043d0000000001140019000000000041004b00000000070000390000000107004039000007be0010009c0000008d0000213d00000001007001900000008d0000c13d000000400010043f00000000015404360000000a08000029000000000080007c00000dd50000213d00000009070000290000002007700039000000000676034f0000084d075001980000001f0850018f0000000005710019000012ab0000613d000000000906034f000000000a010019000000009b09043c000000000aba043600000000005a004b000012a70000c13d000000000008004b000012b80000613d000000000676034f0000000307800210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f00000000006504350000000c05400029000000200550008a0000000000050435000000c002200210000000400600043d0000002005600039000a00000005001d0000000000250435000000e0023002100000002803600039000000000023043500000000020404330000084d052001970000001f0420018f000c00000006001d0000002c03600039000000000031004b000015220000813d000000000005004b000012d60000613d00000000074100190000000006430019000000200660008a000000200770008a0000000008560019000000000957001900000000090904330000000000980435000000200550008c000012d00000c13d000000000004004b000015380000613d00000000060300190000152e0000013d0000000006530019000000000005004b000012e30000613d0000000007010019000000000803001900000000790704340000000008980436000000000068004b000012df0000c13d000000000004004b000012f00000613d00000000015100190000000304400210000000000506043300000000054501cf000000000545022f00000000010104330000010004400089000000000141022f00000000014101cf000000000151019f0000000000160435000000000132001900000000000104350000000c030000290000000001310049000000200210008a00000000002304350000001f011000390000084d021001970000000001320019000000000021004b00000000020000390000000102004039000007be0010009c0000008d0000213d00000001002001900000008d0000c13d000000400010043f000008070100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000007b00010009c000007b001008041000000c00110021000000808011001c700008005020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000007b7020000410000000000200443000007b301100197000900000001001d00000004001004430000000001000414000007b00010009c000007b001008041000000c001100210000007b8011001c700008002020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000000000001004b000000800200003900000dd50000613d000000400500043d0000006401500039000000000021043500000024015000390000000d02000029000000000021043500000809010000410000000000150435000000040150003900000008020000290000000000210435000000440150003900000000000104350000000c010000290000000001010433000000840250003900000000001204350000084d041001970000001f0310018f000c00000005001d000000a4025000390000000b0020006b000014960000813d000000000004004b000013450000613d0000000b063000290000000005320019000000200550008a000000200660008a0000000007450019000000000846001900000000080804330000000000870435000000200440008c0000133f0000c13d000000000003004b000014ad0000613d0000000005020019000014a20000013d0000081b0100004100040000000b001d00000000001b04350000000401b00039000000200200003900000000002104350000002402b0003900000007010000291ebd15f10000040f000000040200002900000e110000013d0000000007640019000000000006004b0000135d0000613d00000005080000290000000009040019000000008a0804340000000009a90436000000000079004b000013590000c13d000000000005004b0000136b0000613d000500050060002d0000000305500210000000000607043300000000065601cf000000000656022f000000050800002900000000080804330000010005500089000000000858022f00000000055801cf000000000565019f00000000005704350000000a050000290000000205500039000000000551034f00000000014300190000084d042001980000001f0620018f000000000001043500000000034100190000137a0000613d000000000705034f0000000008010019000000007907043c0000000008980436000000000038004b000013760000c13d000000000006004b000013870000613d000000000445034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000000121001900000000000104350000000001b10049000000200210008a00000000002b04350000001f011000390000084d021001970000000001b20019000000000021004b00000000020000390000000102004039000007be0010009c0000008d0000213d00000001002001900000008d0000c13d000000400010043f00070000000b001d0000100a0000013d000000400300043d000008200030009c0000008d0000213d000000a001300039000000400010043f00000080013000390000000c02000029000000000021043500000060023000390000000705000029000000000052043500000040053000390000000b060000290000000000650435000000200630003900000000004604350000000d0400002900000000004304350000082104000041000000400800043d0000000004480436000a00000004001d0000000404800039000000400700003900000000007404350000000003030433000007b0033001970000004404800039000000000034043500000000030604330000006404800039000000000034043500000000030504330000008404800039000000a0050000390000000000540435000000e404800039000000003503043400000000005404350000084d075001970000001f0650018f000d00000008001d0000010404800039000000000043004b000014220000813d000000000007004b000013d20000613d00000000096300190000000008640019000000200880008a000000200990008a000000000a780019000000000b790019000000000b0b04330000000000ba0435000000200770008c000013cc0000c13d000000000006004b000014380000613d00000000080400190000142e0000013d000007b00020009c000007b0020080410000004002200210000007b00030009c000007b0030080410000006003300210000000000223019f000007b00010009c000007b001008041000000c001100210000000000112019f00000005020000291ebd1eb30000040f0000006003100270000007b003300197000000200030008c000000200400003900000000040340190000001f0540018f0000002004400190000013f10000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000047004b000013ed0000c13d000000000005004b000013fe0000613d000000000641034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000100200190000014160000613d000000000003004b0000000002000019000011d90000c13d000007b7010000410000000000100443000000050100002900000004001004430000000001000414000007b00010009c000007b001008041000000c001100210000007b8011001c700008002020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000000000001004b00000a160000c13d000011df0000013d0000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000141d0000c13d0000020e0000013d0000000008740019000000000007004b0000142b0000613d0000000009030019000000000a040019000000009b090434000000000aba043600000000008a004b000014270000c13d000000000006004b000014380000613d00000000037300190000000306600210000000000708043300000000076701cf000000000767022f00000000030304330000010006600089000000000363022f00000000036301cf000000000373019f00000000003804350000000003000410000000000645001900000000000604350000001f055000390000084d0550019700000000020204330000000d06000029000000a406600039000000c00750003900000000007604350000000004450019000000002702043400000000067404360000084d05700197000b00000007001d0000001f0470018f000c00000006001d000000000062004b0000145b0000813d000000000005004b000014570000613d00000000074200190000000c06400029000000200660008a000000200770008a0000000008560019000000000957001900000000090904330000000000980435000000200550008c000014510000c13d000000000004004b000014710000613d0000000c06000029000014670000013d0000000c06500029000000000005004b000014640000613d00000000070200190000000c0800002900000000790704340000000008980436000000000068004b000014600000c13d000000000004004b000014710000613d00000000025200190000000304400210000000000506043300000000054501cf000000000545022f00000000020204330000010004400089000000000242022f00000000024201cf000000000252019f00000000002604350000000b040000290000000c0240002900000000000204350000000001010433000007b3023001970000000d0400002900000024034000390000000000230435000000c402400039000000000001004b0000000001000039000000010100c0390000000000120435000008070100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000007b00010009c000007b001008041000000c00110021000000808011001c700008005020000391ebd1eb80000040f0000000100200190000015910000613d000000000201043b0000000001000414000007b302200197000000040020008c000014cf0000c13d0000000103000031000000400030008c00000040040000390000000004034019000015020000013d0000000005420019000000000004004b0000149f0000613d0000000b06000029000000000702001900000000680604340000000007870436000000000057004b0000149b0000c13d000000000003004b000014ad0000613d000b000b0040002d0000000303300210000000000405043300000000043401cf000000000434022f0000000b0600002900000000060604330000010003300089000000000636022f00000000033601cf000000000343019f00000000003504350000000002210019000000000002043500000000020004140000000903000029000000040030008c000014c90000613d0000001f011000390000084d01100197000000a401100039000007b00010009c000007b00100804100000060011002100000000c03000029000007b00030009c000007b0030080410000004003300210000000000131019f000007b00020009c000007b002008041000000c002200210000000000121019f00000009020000291ebd1eb30000040f0000006003100270000107b00030019d00030000000103550000000100200190000015920000613d0000000c01000029000007be0010009c0000008d0000213d0000000c01000029000000400010043f00000da50000013d0000000b030000290000001f033000390000084d033001970000000d050000290000000c045000690000000003340019000007b00030009c000007b0030080410000006003300210000007b00050009c000007b00400004100000000040540190000004004400210000000000343019f000007b00010009c000007b001008041000000c001100210000000000131019f1ebd1eb80000040f0000006003100270000007b003300197000000400030008c000000400400003900000000040340190000001f0640018f00000060074001900000000d05700029000014f10000613d000000000801034f0000000d09000029000000008a08043c0000000009a90436000000000059004b000014ed0000c13d000000000006004b000014fe0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f000300000001035500000001002001900000159f0000613d0000001f01400039000000e00210018f0000000d01200029000000000021004b00000000020000390000000102004039000007be0010009c0000008d0000213d00000001002001900000008d0000c13d000000400010043f000000400030008c00000dd50000413d0000081f0010009c0000008d0000213d0000004002100039000000400020043f0000000d02000029000000000202043300000000012104360000000a0300002900000000030304330000000000310435000000400300043d000000000223043600000000010104330000000000120435000007b00030009c000007b003008041000000400130021000000822011001c700001ebe0001042e0000000006530019000000000005004b0000152b0000613d0000000007010019000000000803001900000000790704340000000008980436000000000068004b000015270000c13d000000000004004b000015380000613d00000000015100190000000304400210000000000506043300000000054501cf000000000545022f00000000010104330000010004400089000000000141022f00000000014101cf000000000151019f0000000000160435000000000132001900000000000104350000000c030000290000000001310049000000200210008a00000000002304350000001f011000390000084d021001970000000001320019000000000021004b00000000020000390000000102004039000007be0010009c0000008d0000213d00000001002001900000008d0000c13d000000400010043f000008070100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000007b00010009c000007b001008041000000c00110021000000808011001c700008005020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000007b7020000410000000000200443000007b301100197000900000001001d00000004001004430000000001000414000007b00010009c000007b001008041000000c001100210000007b8011001c700008002020000391ebd1eb80000040f0000000100200190000015910000613d000000000101043b000000000001004b00000dd50000613d000000400500043d00000064015000390000008002000039000000000021043500000024015000390000000d02000029000000000021043500000809010000410000000000150435000000040150003900000008020000290000000000210435000000440150003900000000000104350000000c010000290000000001010433000000840250003900000000001204350000084d041001970000001f0310018f000c00000005001d000000a4025000390000000a0020006b000015ab0000813d000000000004004b0000158d0000613d0000000a063000290000000005320019000000200550008a000000200660008a0000000007450019000000000846001900000000080804330000000000870435000000200440008c000015870000c13d000000000003004b000015c20000613d0000000005020019000015b70000013d000000000001042f000007b0033001970000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000159a0000c13d0000020e0000013d0000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000015a60000c13d0000020e0000013d0000000005420019000000000004004b000015b40000613d0000000a06000029000000000702001900000000680604340000000007870436000000000057004b000015b00000c13d000000000003004b000015c20000613d000a000a0040002d0000000303300210000000000405043300000000043401cf000000000434022f0000000a0600002900000000060604330000010003300089000000000636022f00000000033601cf000000000343019f00000000003504350000000002210019000000000002043500000000020004140000000903000029000000040030008c000015de0000613d0000001f011000390000084d01100197000000a401100039000007b00010009c000007b00100804100000060011002100000000c03000029000007b00030009c000007b0030080410000004003300210000000000131019f000007b00020009c000007b002008041000000c002200210000000000121019f00000009020000291ebd1eb30000040f0000006003100270000107b00030019d00030000000103550000000100200190000015e40000613d0000000c01000029000007be0010009c0000008d0000213d0000000c01000029000000400010043f00000e690000013d000007b0033001970000001f0530018f000007bb06300198000000400200043d00000000046200190000020e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000015ec0000c13d0000020e0000013d000000004301043400000000013204360000084d063001970000001f0530018f000000000014004b000016070000813d000000000006004b000016030000613d00000000085400190000000007510019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c000015fd0000c13d000000000005004b0000161d0000613d0000000007010019000016130000013d0000000007610019000000000006004b000016100000613d00000000080400190000000009010019000000008a0804340000000009a90436000000000079004b0000160c0000c13d000000000005004b0000161d0000613d00000000046400190000000305500210000000000607043300000000065601cf000000000656022f00000000040404330000010005500089000000000454022f00000000045401cf000000000464019f0000000000470435000000000431001900000000000404350000001f033000390000084d023001970000000001210019000000000001042d00000020030000390000000003310436000000004202043400000000002304350000084d062001970000001f0520018f0000004001100039000000000014004b0000163c0000813d000000000006004b000016380000613d00000000085400190000000007510019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c000016320000c13d000000000005004b000016520000613d0000000007010019000016480000013d0000000007610019000000000006004b000016450000613d00000000080400190000000009010019000000008a0804340000000009a90436000000000079004b000016410000c13d000000000005004b000016520000613d00000000046400190000000305500210000000000607043300000000065601cf000000000656022f00000000040404330000010005500089000000000454022f00000000045401cf000000000464019f0000000000470435000000000412001900000000000404350000001f022000390000084d022001970000000001120019000000000001042d0000001f03100039000000000023004b0000000004000019000008180400404100000818052001970000081803300197000000000653013f000000000053004b00000000030000190000081803002041000008180060009c000000000304c019000000000003004b000016700000613d0000000203100367000000000303043b000007be0030009c000016700000213d00000020011000390000000004310019000000000024004b000016700000213d0000000002030019000000000001042d000000000100001900001ebf00010430000008170010009c000016820000213d000000630010008c000016820000a13d00000002030003670000000401300370000000000101043b000007b30010009c000016820000213d0000002402300370000000000202043b000007b30020009c000016820000213d0000004403300370000000000303043b000000000001042d000000000100001900001ebf000104300000ffff0220018f000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000016920000613d000000000101043b000000000001042d000000000100001900001ebf000104300000001f022000390000084d022001970000000001120019000000000021004b00000000020000390000000102004039000007be0010009c000016a00000213d0000000100200190000016a00000c13d000000400010043f000000000001042d0000082a01000041000000000010043f0000004101000039000000040010043f000007fe0100004100001ebf000104300003000000000002000000000201041a000000010320019000000001062002700000007f0660618f0000001f0060008c00000000040000390000000104002039000000000043004b000016e50000c13d000000400500043d0000000004650436000000000003004b000016d00000613d000100000004001d000300000006001d000200000005001d000000000010043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f0000000100200190000016f10000613d0000000306000029000000000006004b000016d60000613d000000000201043b0000000001000019000000020500002900000001070000290000000003170019000000000402041a000000000043043500000001022000390000002001100039000000000061004b000016c80000413d000016d80000013d0000084e012001970000000000140435000000000006004b00000020010000390000000001006039000016d80000013d000000000100001900000002050000290000003f011000390000084d021001970000000001520019000000000021004b00000000020000390000000102004039000007be0010009c000016eb0000213d0000000100200190000016eb0000c13d000000400010043f0000000001050019000000000001042d0000082a01000041000000000010043f0000002201000039000000040010043f000007fe0100004100001ebf000104300000082a01000041000000000010043f0000004101000039000000040010043f000007fe0100004100001ebf00010430000000000100001900001ebf0001043000000000030100190000001f01100039000000000021004b0000000004000019000008180400404100000818052001970000081801100197000000000651013f000000000051004b00000000010000190000081801002041000008180060009c000000000104c019000000000001004b0000173b0000613d0000000205000367000000000135034f000000000401043b000007bc0040009c000017350000813d0000001f014000390000084d011001970000003f011000390000084d07100197000000400100043d0000000007710019000000000017004b00000000080000390000000108004039000007be0070009c000017350000213d0000000100800190000017350000c13d0000002008300039000000400070043f00000000034104360000000007840019000000000027004b0000173b0000213d000000000585034f0000084d064001980000001f0740018f0000000002630019000017250000613d000000000805034f0000000009030019000000008a08043c0000000009a90436000000000029004b000017210000c13d000000000007004b000017320000613d000000000565034f0000000306700210000000000702043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f000000000052043500000000024300190000000000020435000000000001042d0000082a01000041000000000010043f0000004101000039000000040010043f000007fe0100004100001ebf00010430000000000100001900001ebf000104300005000000000002000200000001001d000307b30020019c000017ea0000613d000400000003001d000000000030043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000017e80000613d000000000101043b000000000101041a000007b3021001970000000001000411000000000001004b000500000002001d0000178c0000613d000007b301100198000017f70000613d000000000012004b0000178c0000613d000100000001001d000000000020043f0000000a01000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000017e80000613d000000000101043b0000000102000029000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000017e80000613d000000000101043b000000000101041a000000ff0010019000000005020000290000178c0000c13d0000000401000029000000000010043f0000000901000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000017e80000613d000000000101043b000000000101041a000007b301100197000000010010006c00000001010000290000000502000029000017f70000c13d000000000002004b0000000802000039000017b20000613d0000000401000029000000000010043f0000000901000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000017e80000613d000000000101043b000000000201041a000007b202200197000000000021041b0000000501000029000000000010043f0000000801000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000017e80000613d000000000101043b000000000201041a000000010220008a000000000021041b00000008020000390000000301000029000000000010043f000000200020043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000017e80000613d000000000101043b000000000201041a0000000102200039000000000021041b0000000401000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000017e80000613d000000000101043b000000000201041a000007b2022001970000000306000029000000000262019f000000000021041b0000000001000414000007b00010009c000007b001008041000000c001100210000007b4011001c70000800d0200003900000004030000390000080604000041000000050500002900000004070000291ebd1eb30000040f0000000100200190000017e80000613d0000000201000029000007b3011001970000000503000029000000000013004b000017ef0000c13d000000000001042d000000000100001900001ebf000104300000084401000041000000000010043f000000040000043f000007fe0100004100001ebf000104300000085102000041000000000020043f000000040010043f0000000401000029000000240010043f000000440030043f0000081d0100004100001ebf00010430000000000002004b000017ff0000c13d0000081601000041000000000010043f0000000401000029000000040010043f000007fe0100004100001ebf0001043000000000030100190000085001000041000000000010043f000000040030043f0000000401000029000000240010043f000008380100004100001ebf000104300001000000000002000100000002001d000007b001100197000000000010043f0000000101000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f00000001002001900000181c0000613d000000000101043b000000000101041a000000010010006c00000000010000390000000101006039000000000001042d000000000100001900001ebf00010430000007b302200197000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f00000001002001900000182c0000613d000000000101043b000000000001042d000000000100001900001ebf000104300009000000000002000200000004001d000400000001001d000300000002001d000507b30020019c000019830000613d000600000003001d000000000030043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000019810000613d000000000101043b000000000101041a000707b30010019b0000000001000411000000000001004b0000187d0000613d000007b302100198000019920000613d000000070020006b0000187d0000613d000100000002001d0000000701000029000000000010043f0000000a01000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000019810000613d000000000101043b0000000102000029000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000019810000613d000000000101043b000000000101041a000000ff001001900000187d0000c13d0000000601000029000000000010043f0000000901000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000019810000613d000000000101043b000000000101041a000007b3011001970000000102000029000000000021004b000019920000c13d000000070000006b0000000802000039000018a30000613d0000000601000029000000000010043f0000000901000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000019810000613d000000000101043b000000000201041a000007b202200197000000000021041b0000000701000029000000000010043f0000000801000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000019810000613d000000000101043b000000000201041a000000010220008a000000000021041b00000008020000390000000501000029000000000010043f000000200020043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000019810000613d000000000101043b000000000201041a0000000102200039000000000021041b0000000601000029000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f0000000100200190000019810000613d000000000101043b000000000201041a000007b2022001970000000506000029000000000262019f000000000021041b0000000001000414000007b00010009c000007b001008041000000c001100210000007b4011001c70000800d0200003900000004030000390000080604000041000000070500002900000006070000291ebd1eb30000040f0000000100200190000019810000613d0000000401000029000007b301100197000000070010006b000019880000c13d000007b7010000410000000000100443000000030100002900000004001004430000000001000414000007b00010009c000007b001008041000000c001100210000007b8011001c700008002020000391ebd1eb80000040f0000000100200190000019910000613d000000000101043b000000000001004b0000000602000029000019800000613d000000400d00043d0000006401d00039000000800c0000390000000000c104350000004401d0003900000000002104350000002401d0003900000007020000290000000000210435000008520100004100000000001d04350000000001000411000007b3011001970000000402d0003900000000001204350000008402d00039000000020100002900000000410104340000000000120435000000200b00008a0000000006b1016f0000001f0510018f000000a403d00039000000000034004b000019110000813d000000000006004b0000190d0000613d00000000085400190000000007530019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c000019070000c13d000000000005004b000019270000613d00000000070300190000191d0000013d0000000007630019000000000006004b0000191a0000613d00000000080400190000000009030019000000008a0804340000000009a90436000000000079004b000019160000c13d000000000005004b000019270000613d00000000046400190000000305500210000000000607043300000000065601cf000000000656022f00000000040404330000010005500089000000000454022f00000000045401cf000000000464019f00000000004704350000000003310019000000000003043500000000030004140000000502000029000000040020008c000019350000c13d0000000005000415000000090550008a00000005055002100000000103000031000000200030008c000000200400003900000000040340190000196b0000013d00060000000c001d0000001f011000390000000001b1016f000000a401100039000007b00010009c000007b0010080410000006001100210000007b000d0009c000007b00400004100000000040d40190000004004400210000000000141019f000007b00030009c000007b003008041000000c003300210000000000131019f00070000000d001d1ebd1eb30000040f000000070d0000290000006003100270000007b003300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057d0019000019570000613d000000000801034f00000000090d0019000000008a08043c0000000009a90436000000000059004b000019530000c13d000000000006004b000019640000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000005000415000000080550008a00000005055002100000000100200190000019a10000613d0000001f01400039000000600210018f0000000001d20019000000000021004b00000000020000390000000102004039000007be0010009c000019d50000213d0000000100200190000019d50000c13d000000400010043f000000200030008c000019810000413d00000000010d04330000084800100198000019810000c13d0000000502500270000000000201001f0000084901100197000008520010009c000019cf0000c13d000000000001042d000000000100001900001ebf000104300000084401000041000000000010043f000000040000043f000007fe0100004100001ebf000104300000085102000041000000000020043f000000040010043f0000000601000029000000240010043f0000000701000029000000440010043f0000081d0100004100001ebf00010430000000000001042f000000070000006b0000199a0000c13d0000081601000041000000000010043f0000000601000029000000040010043f000007fe0100004100001ebf000104300000085001000041000000000010043f000000040020043f0000000601000029000000240010043f000008380100004100001ebf00010430000000000003004b000019a50000c13d0000006002000039000019cc0000013d0000001f0230003900000853022001970000003f022000390000085404200197000000400200043d0000000004420019000000000024004b00000000050000390000000105004039000007be0040009c000019d50000213d0000000100500190000019d50000c13d000000400040043f0000001f0430018f0000000006320436000007bb05300198000600000006001d0000000003560019000019bf0000613d000000000601034f0000000607000029000000006806043c0000000007870436000000000037004b000019bb0000c13d000000000004004b000019cc0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000000001020433000000000001004b000019db0000c13d0000084401000041000000000010043f0000000501000029000000040010043f000007fe0100004100001ebf000104300000082a01000041000000000010043f0000004101000039000000040010043f000007fe0100004100001ebf000104300000000602000029000007b00020009c000007b0020080410000004002200210000007b00010009c000007b0010080410000006001100210000000000121019f00001ebf000104300005000000000002000500000004001d000400000003001d000300000002001d000007b001100197000000000010043f0000000301000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000001b060000613d000000000101043b00000003020000290000ffff0220018f000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000001b060000613d000000000101043b000000000201041a000000010320019000000001062002700000007f0660618f0000001f0060008c00000000040000390000000104002039000000000043004b00001b0e0000c13d000000400700043d0000000005670436000000000003004b00001a2e0000613d000100000006001d000200000007001d000300000005001d000000000010043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000010020019000001b060000613d0000000108000029000000000008004b00001a350000613d000000000201043b00000000010000190000000506000029000000030500002900000002070000290000000003150019000000000402041a000000000043043500000001022000390000002001100039000000000081004b00001a260000413d00001a390000013d0000084e012001970000000000150435000000000006004b00000020010000390000000001006039000000050600002900001a390000013d00000000010000190000000506000029000000030500002900000002070000290000003f011000390000084d031001970000000001730019000000000031004b00000000030000390000000103004039000007be0010009c00001b080000213d000000010030019000001b080000c13d000000400010043f0000000003070433000000000003004b00001a950000613d000000000006004b00001ac00000613d000000010060008c00001b140000613d000007be0060009c00001b080000213d0000001f036000390000084d033001970000003f033000390000084d033001970000000003310019000007be0030009c00001b080000213d000000000d050019000000400030043f00000000046104360000000403600029000000000030007c00001b060000213d000000000f07001900000002030003670000000406300360000000050c0000290000084d07c001980000001f08c0018f000000000574001900001a680000613d000000000906034f000000000a040019000000009b09043c000000000aba043600000000005a004b00001a640000c13d000000000008004b00001a750000613d000000000676034f0000000307800210000000000805043300000000087801cf000000000878022f000000000606043b0000010007700089000000000676022f00000000067601cf000000000686019f00000000006504350000000004c400190000000000040435000000400e00043d000000020410003900000000040404330000ffff0440018f000000030040008c00001b2c0000c13d0000000201c0008a00000000040f04330000084d074001970000001f0640018f0000002005e00039000000000c0d001900000000005d004b00001ac20000813d000000000007004b00001a910000613d00000000096c00190000000008650019000000200880008a000000200990008a000000000a780019000000000b790019000000000b0b04330000000000ba0435000000200770008c00001a8b0000c13d000000000006004b00001ad80000613d000000000805001900001ace0000013d000007be0060009c00001b080000213d0000001f036000390000084d033001970000003f033000390000084d033001970000000003310019000007be0030009c00001b080000213d000000400030043f00000000036104360000000405600029000000000050007c00001b060000213d000000050a0000290000084d04a001980000001f05a0018f00000004020000290000000206200367000000000243001900001ab00000613d000000000706034f0000000008030019000000007907043c0000000008980436000000000028004b00001aac0000c13d000000000005004b00001abd0000613d000000000446034f0000000305500210000000000602043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004204350000000002a300190000000000020435000000000001042d0000000001070019000000000001042d0000000008750019000000000007004b00001acb0000613d00000000090c0019000000000a050019000000009b090434000000000aba043600000000008a004b00001ac70000c13d000000000006004b00001ad80000613d000000000c7c00190000000306600210000000000708043300000000076701cf000000000767022f00000000090c04330000010006600089000000000969022f00000000066901cf000000000676019f000000000068043500000004060000290000000206600039000000000663034f00000000035400190000084d051001980000001f0710018f0000000000030435000000000453001900001ae70000613d000000000806034f0000000009030019000000008a08043c0000000009a90436000000000049004b00001ae30000c13d000000000007004b00001af40000613d000000000556034f0000000306700210000000000704043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f0000000000540435000000000113001900000000000104350000000001e10049000000200310008a00000000003e04350000001f011000390000084d021001970000000001e20019000000000021004b00000000020000390000000102004039000007be0010009c00001b080000213d000000010020019000001b080000c13d000000400010043f00000000010e0019000000000001042d000000000100001900001ebf000104300000082a01000041000000000010043f0000004101000039000000040010043f000007fe0100004100001ebf000104300000082a01000041000000000010043f0000002201000039000000040010043f000007fe0100004100001ebf000104300000002402100039000000010300003900000000003204350000081b02000041000000000021043500000004021000390000002003000039000000000032043500000044021000390000000003020433000008120330019700000004040000290000000204400367000000000404043b0000081c04400197000000000334019f000000000032043500000045021000390000000000020435000007b00010009c000007b00100804100000040011002100000081d011001c700001ebf000104300000081b0200004100000000002e04350000000402e00039000000200300003900000000003204350000002402e0003900050000000e001d1ebd15f10000040f00000005020000290000000001210049000007b00010009c000007b001008041000007b00020009c000007b00200804100000060011002100000004002200210000000000121019f00001ebf000104300001000000000002000100000001001d000000000010043f0000000701000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000001b510000613d000000000101043b000000000101041a000007b30110019800001b530000613d000000000001042d000000000100001900001ebf000104300000081601000041000000000010043f0000000101000029000000040010043f000007fe0100004100001ebf00010430000000000010043f0000000901000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000010020019000001b670000613d000000000101043b000000000001042d000000000100001900001ebf00010430000700000000000200000020061000390000000202000367000000000362034f000000000703043b000000000007004b00001e310000613d0000006003600039000000000332034f000000000903043b000000000300003100000000041300490000001f0d40008a0000081805d001970000081804900197000000000854013f000000000054004b000000000400001900000818040020410000000000d9004b000000000a000019000008180a004041000008180080009c00000000040ac0190000002006600039000000000662034f000000000e06043b000000000004004b00001e290000613d0000000004190019000000000642034f000000000906043b000007be0090009c00001e290000213d0000000006930049000000200b4000390000081804600197000008180ab00197000000000c4a013f00000000004a004b0000000004000019000008180400404100000000006b004b000000000600001900000818060020410000081800c0009c000000000406c019000000000004004b00001e290000c13d0000001f049000390000084d044001970000003f044000390000084d04400197000000400a00043d00000000064a00190000000000a6004b00000000040000390000000104004039000007be0060009c00001e2b0000213d000000010040019000001e2b0000c13d000000400060043f00000000049a04360000000006b90019000000000036004b00001e290000213d000500000005001d000000000503001900000000030e001900070000000d001d000000000cb2034f0000084d0d9001980000001f0e90018f000000000bd4001900001bbb0000613d000000000f0c034f000000000604001900000000f80f043c00000000068604360000000000b6004b00001bb70000c13d00000000000e004b00001bc80000613d0000000006dc034f0000000308e00210000000000c0b0433000000000c8c01cf000000000c8c022f000000000606043b0000010008800089000000000686022f00000000068601cf0000000006c6019f00000000006b04350000000006940019000000000006043500000000060a0433000000400e00043d0000004008e0003900000000003804350000002008e00039000300000008001d0000000000780435000000000006004b00001bef0000613d0000006006e000390000000007000411000000000076043500000000070a04330000084d0a7001970000001f0970018f0000008008e00039000000000084004b000000000305001900001bf90000813d00000000000a004b000000050500002900001bea0000613d0000000006940019000000000b980019000000200bb0008a000000200c60008a0000000006ab0019000000000dac0019000000000d0d04330000000000d60435000000200aa0008c00001be40000c13d000000000009004b000000070c00002900001c110000613d000000000b08001900001c070000013d000000400400003900000000004e04350000081a00e0009c000000070c0000290000000003050019000000050500002900001e2b0000213d000400010000003d0000006006e0003900001c210000013d000000000ba8001900000000000a004b000000050500002900001c030000613d000000000c040019000000000608001900000000cd0c04340000000006d604360000000000b6004b00001bff0000c13d000000000009004b000000070c00002900001c110000613d0000000004a40019000000030690021000000000090b043300000000096901cf000000000969022f00000000040404330000010006600089000000000464022f00000000046401cf000000000494019f00000000004b0435000000000487001900000000000404350000000004e40049000000200640008a00000000006e04350000001f044000390000084d044001970000000006e40019000000000046004b00000000040000390000000104004039000007be0060009c00001e2b0000213d000000010040019000001e2b0000c13d000400020000003d000000400060043f000000000412034f000000000604043b000007b00060009c00001e290000213d0000006004100039000000000442034f000000000704043b0000081804700197000000000854013f000000000054004b000000000400001900000818040040410000000000c7004b00000000050000190000081805008041000008180080009c000000000405c019000000000004004b00001e290000c13d0000000001170019000000000212034f000000000702043b000007be0070009c00001e290000213d0000000002730049000000200510003900000818012001970000081803500197000000000413013f000000000013004b00000000010000190000081801004041000700000005001d000000000025004b00000000020000190000081802002041000008180040009c000000000102c019000000000001004b00001e290000c13d000000000060043f0000000301000039000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c7000080100200003900060000000e001d000500000007001d1ebd1eb80000040f000000010020019000001e290000613d000000000101043b0000000402000029000000000020043f000000200010043f0000000001000414000007b00010009c000007b001008041000000c00110021000000805011001c700008010020000391ebd1eb80000040f000000200c00008a000000010020019000001e290000613d000000000101043b000000000201041a000000010320019000000001072002700000007f0770618f0000001f0070008c00000000040000390000000104002039000000000043004b00001e350000c13d000000400b00043d00000000057b0436000000000003004b00001c930000613d000100000007001d00020000000b001d000400000005001d000000000010043f0000000001000414000007b00010009c000007b001008041000000c001100210000007bd011001c700008010020000391ebd1eb80000040f000000200c00008a00000001002001900000000609000029000000050a00002900001e290000613d0000000107000029000000000007004b00001c9b0000613d000000000201043b00000000010000190000000405000029000000020b0000290000000003150019000000000402041a000000000043043500000001022000390000002001100039000000000071004b00001c8b0000413d00001c9e0000013d0000084e012001970000000000150435000000000007004b000000200100003900000000010060390000000609000029000000050a00002900001c9e0000013d00000000010000190000000405000029000000020b0000290000003f011000390000000001c1016f000000000eb1001900000000001e004b00000000010000390000000101004039000007be00e0009c00001e2b0000213d000000010010019000001e2b0000c13d0000004000e0043f00000000010b0433000000000001004b00001cf50000613d00000000000a004b00001d1d0000613d0000000100a0008c00001e3b0000613d0000001f01a000390000000001c1016f0000003f011000390000000001c1016f00000000011e0019000007be0010009c00001e2b0000213d000000400010043f0000000002ae04360000000701a00029000000000010007c00001e290000213d000000000d050019000000020100036700000007041003600000000005ca01700000001f06a0018f000000000352001900001cc90000613d000000000704034f0000000008020019000000007907043c0000000008980436000000000038004b00001cc50000c13d000000000006004b00001cd60000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f00000000004304350000000002a200190000000000020435000000400f00043d0000000202e0003900000000020204330000ffff0220018f000000030020008c00001e530000c13d0000000202a0008a00000000030b04330000000006c3016f0000001f0530018f0000002004f0003900000000004d004b00001d1f0000813d000000000006004b00001cf10000613d00000000085d00190000000007540019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c00001ceb0000c13d000000000005004b00001d350000613d000000000704001900001d2b0000013d0000001f01a000390000000001c1016f0000003f011000390000000001c1016f00000000011e0019000007be0010009c00001e2b0000213d000000400010043f0000000001ae04360000000703a00029000000000030007c00001e290000213d0000000003ca01700000001f04a0018f00000007020000290000000205200367000000000231001900001d0d0000613d000000000605034f0000000007010019000000006806043c0000000007870436000000000027004b00001d090000c13d000000000004004b00001d1a0000613d000000000335034f0000000304400210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f00000000003204350000000001a10019000000000001043500001d630000013d000000000e0b001900001d630000013d0000000007640019000000000006004b00001d280000613d00000000080d00190000000009040019000000008a0804340000000009a90436000000000079004b00001d240000c13d000000000005004b00001d350000613d000000000d6d00190000000305500210000000000607043300000000065601cf000000000656022f00000000080d04330000010005500089000000000858022f00000000055801cf000000000565019f000000000057043500000007050000290000000205500039000000000551034f00000000014300190000000004c201700000001f0620018f0000000000010435000000000341001900001d440000613d000000000705034f0000000008010019000000007907043c0000000008980436000000000038004b00001d400000c13d000000000006004b00001d510000613d000000000445034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000000121001900000000000104350000000001f10049000000200210008a00000000002f04350000001f011000390000000002c1016f0000000001f20019000000000021004b00000000020000390000000102004039000007be0010009c000000060900002900001e2b0000213d000000010020019000001e2b0000c13d000000400010043f000000000e0f00190000000401000039000000000101041a000007b30210019800001e260000613d000000400f00043d0000081e0100004100000000001f04350000000401f0003900000040030000390000000000310435000000000b09001900000000030904330000004404f0003900000000003404350000000006c3016f0000001f0530018f0000006404f00039000000030d00002900000000004d004b00001d870000813d000000000006004b00001d830000613d00000000085d00190000000007540019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c00001d7d0000c13d000000000005004b00001d9d0000613d000000000704001900001d930000013d0000000007640019000000000006004b00001d900000613d00000000080d00190000000009040019000000008a0804340000000009a90436000000000079004b00001d8c0000c13d000000000005004b00001d9d0000613d000000000d6d00190000000305500210000000000607043300000000065601cf000000000656022f00000000080d04330000010005500089000000000858022f00000000055801cf000000000565019f0000000000570435000000000543001900000000000504350000001f033000390000000003c3016f000000000543001900000000011500490000002403f00039000000000013043500000000430e043400000000013504360000000006c3016f0000001f0530018f000000000014004b00001dbc0000813d000000000006004b00001db70000613d00000000085400190000000007510019000000200770008a000000200880008a0000000009670019000000000a680019000000000a0a04330000000000a90435000000200660008c00001db10000c13d000000000005004b00000000090b001900001dd30000613d000000000701001900001dc90000013d0000000007610019000000000006004b00001dc50000613d00000000080400190000000009010019000000008a0804340000000009a90436000000000079004b00001dc10000c13d000000000005004b00000000090b001900001dd30000613d00000000046400190000000305500210000000000607043300000000065601cf000000000656022f00000000040404330000010005500089000000000454022f00000000045401cf000000000464019f0000000000470435000000000413001900000000000404350000000004000414000000040020008c00001ddd0000c13d0000000103000031000000200030008c0000002004000039000000000403401900001e130000013d00070000000e001d0000001f033000390000000003c3016f0000000001f100490000000001310019000007b00010009c000007b0010080410000006001100210000007b000f0009c000007b00300004100000000030f40190000004003300210000000000131019f000007b00040009c000007b004008041000000c003400210000000000131019f00050000000f001d1ebd1eb80000040f000000050f0000290000006003100270000007b003300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057f001900001e000000613d000000000801034f00000000090f0019000000008a08043c0000000009a90436000000000059004b00001dfc0000c13d000000000006004b00001e0d0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f000300000001035500000001002001900000000609000029000000070e00002900001e660000613d0000001f01400039000000600210018f0000000001f20019000000000021004b00000000020000390000000102004039000007be0010009c00001e2b0000213d000000010020019000001e2b0000c13d000000400010043f000000200030008c00001e290000413d00000000010f0433000000000001004b0000000002000039000000010200c039000000000021004b00001e290000c13d000000000109001900000000020e0019000000000001042d000000000100001900001ebf000104300000082a01000041000000000010043f0000004101000039000000040010043f000007fe0100004100001ebf000104300000082401000041000000000010043f000008040100004100001ebf000104300000082a01000041000000000010043f0000002201000039000000040010043f000007fe0100004100001ebf000104300000002401e00039000000010200003900000000002104350000081b0100004100000000001e04350000000401e00039000000200200003900000000002104350000004401e000390000000002010433000008120220019700000007030000290000000203300367000000000303043b0000081c03300197000000000223019f00000000002104350000004501e000390000000000010435000007b000e0009c000007b00e0080410000004001e002100000081d011001c700001ebf000104300000081b0100004100000000001f04350000000401f00039000000200200003900000000002104350000002402f0003900000000010e001900070000000f001d1ebd15f10000040f00000007020000290000000001210049000007b00010009c000007b001008041000007b00020009c000007b00200804100000060011002100000004002200210000000000121019f00001ebf000104300000001f0530018f000007bb06300198000000400200043d000000000462001900001e710000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b00001e6d0000c13d000000000005004b00001e7e0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000007b00020009c000007b0020080410000004002200210000000000112019f00001ebf00010430000000000001042f000007b00010009c000007b0010080410000004001100210000007b00020009c000007b0020080410000006002200210000000000112019f0000000002000414000007b00020009c000007b002008041000000c002200210000000000112019f000007b4011001c700008010020000391ebd1eb80000040f000000010020019000001e980000613d000000000101043b000000000001042d000000000100001900001ebf0001043000000000050100190000000000200443000000040100003900000005024002700000000002020031000000000121043a0000002004400039000000000031004b00001e9d0000413d000007b00030009c000007b00300804100000060013002100000000002000414000007b00020009c000007b002008041000000c002200210000000000112019f00000855011001c700000000020500191ebd1eb80000040f000000010020019000001eb20000613d000000000101043b000000000001042d000000000001042f00001eb6002104210000000102000039000000000001042d0000000002000019000000000001042d00001ebb002104230000000102000039000000000001042d0000000002000019000000000001042d00001ebd0000043200001ebe0001042e00001ebf0001043000000000000000000000000000000000000000000000000000000000ffffffff5465737400000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e000000000000000000000000016c693a3924b947298f7227792953cd6bbb21ac81806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000ca5eb5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000120000000000000000000000000000000000000000000000000000000000000000000000000ffffffe000000000000000000000000000000000000000000000000100000000000000000200000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff00000002000000000000000000000000000000800000010000000000000000000000000000000000000000000000000000000000000000000000000082413eab00000000000000000000000000000000000000000000000000000000bc70b35300000000000000000000000000000000000000000000000000000000d045a0db00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fc0c546a00000000000000000000000000000000000000000000000000000000ff7bd03d00000000000000000000000000000000000000000000000000000000d045a0dc00000000000000000000000000000000000000000000000000000000d424388500000000000000000000000000000000000000000000000000000000e985e9c500000000000000000000000000000000000000000000000000000000c87b56dc00000000000000000000000000000000000000000000000000000000c87b56dd00000000000000000000000000000000000000000000000000000000ca5eb5e100000000000000000000000000000000000000000000000000000000ca69e32300000000000000000000000000000000000000000000000000000000bc70b35400000000000000000000000000000000000000000000000000000000bd815db000000000000000000000000000000000000000000000000000000000c6414e7b00000000000000000000000000000000000000000000000000000000a72f5dd700000000000000000000000000000000000000000000000000000000b88d4fdd00000000000000000000000000000000000000000000000000000000b88d4fde00000000000000000000000000000000000000000000000000000000b98bd07000000000000000000000000000000000000000000000000000000000bb0b6a5300000000000000000000000000000000000000000000000000000000a72f5dd800000000000000000000000000000000000000000000000000000000b21a33e400000000000000000000000000000000000000000000000000000000b731ea0a0000000000000000000000000000000000000000000000000000000095d89b400000000000000000000000000000000000000000000000000000000095d89b41000000000000000000000000000000000000000000000000000000009f68b96400000000000000000000000000000000000000000000000000000000a22cb4650000000000000000000000000000000000000000000000000000000082413eac000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000042842e0d000000000000000000000000000000000000000000000000000000005e280f100000000000000000000000000000000000000000000000000000000070a082300000000000000000000000000000000000000000000000000000000070a0823100000000000000000000000000000000000000000000000000000000715018a6000000000000000000000000000000000000000000000000000000007d25a05e000000000000000000000000000000000000000000000000000000005e280f11000000000000000000000000000000000000000000000000000000006352211e000000000000000000000000000000000000000000000000000000006fc1b31e000000000000000000000000000000000000000000000000000000005535d460000000000000000000000000000000000000000000000000000000005535d4610000000000000000000000000000000000000000000000000000000055f804b3000000000000000000000000000000000000000000000000000000005a0dfe4d0000000000000000000000000000000000000000000000000000000042842e0e0000000000000000000000000000000000000000000000000000000052ae28790000000000000000000000000000000000000000000000000000000013137d640000000000000000000000000000000000000000000000000000000021eb730a0000000000000000000000000000000000000000000000000000000021eb730b0000000000000000000000000000000000000000000000000000000023b872dd000000000000000000000000000000000000000000000000000000003400288b0000000000000000000000000000000000000000000000000000000013137d650000000000000000000000000000000000000000000000000000000017442b70000000000000000000000000000000000000000000000000000000001f5e133400000000000000000000000000000000000000000000000000000000081812fb00000000000000000000000000000000000000000000000000000000081812fc00000000000000000000000000000000000000000000000000000000095ea7b300000000000000000000000000000000000000000000000000000000111ecdad0000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000006fdde030000000000000000000000000000000000000020000000800000000000000000118cdaa70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000001e4fbdf70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000200000000000000000000000000000000000020000000800000000000000000d48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c242776014d4a4e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000200000000000000000000000000000000000040000000000000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e02000002000000000000000000000000000000440000000000000000000000007cb59012000000000000000000000000000000000000000000000000000000007883fa30ea56937810e36990b0bbb8d629d0cf59f68baf8431ff657cebe7eef50175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90000000000184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000000000000000000000000000000000000000004ee2d6d415b85acef810000000000000000000000000000000000000000000004ee2d6d415b85acef80ffffffff000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000005f5e10000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff30313233343536373839616263646566000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf7e273289000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff3f000000000000000000000000000000000000000000000000ffffffffffffff9f9a6d49cd00000000000000000000000000000000000000000000000000000000ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000043a78eb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf000000000000000000000000000000000000000000000000ffffffffffffff5fddc28c58000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000f6ff4fb7000000000000000000000000000000000000000000000000000000001e4ec46b00000000000000000000000000000000000000000000000000000000d045a0dc000000000000000000000000000000000000000000000000000000008e9e7099000000000000000000000000000000000000000000000000000000008351eea7000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000000000000000000000000000000000000000000000000ffffffffffffff7f4e487b7100000000000000000000000000000000000000000000000000000000be4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b67423e18da600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000080000000000000000017307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c315b08ba1800000000000000000000000000000000000000000000000000000000f652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f89c62b6400000000000000000000000000000000000000000000000000000000f0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d4414197fe8a4859c7bd88fc0f24184464406785daae8e84cb1860cc4a4eff72e05fe2470200000000000000000000000000000000000000000000800000000000000000f9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f6238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b8684e2b60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000440000000000000000000000009f70412000000000000000000000000000000000000000000000000000000000e4fe1d940000000000000000000000000000000000000000000000000000000023b872dd000000000000000000000000000000000000000000000000000000005274afe7000000000000000000000000000000000000000000000000000000005373352a000000000000000000000000000000000000000000000000000000002637a45000000000000000000000000000000000000000000000000000000000986156872b2ee0022b9585231dbbfde457f87f8a16b6c45e1a81c54c4ad8351f000000000000000000000000000000000000008000000000000000000000000091ac5e4f00000000000000000000000000000000000000000000000000000000c26bebcc0000000000000000000000000000000000000000000000000000000073c6ac6e0000000000000000000000000000000000000000000000000000000064a0ae9200000000000000000000000000000000000000000000000000000000a9fbf51f000000000000000000000000000000000000000000000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000005b5e139f0000000000000000000000000000000000000000000000000000000080ac58cd00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff177e802f0000000000000000000000000000000000000000000000000000000064283d7b00000000000000000000000000000000000000000000000000000000150b7a020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000003ffffffe00200000200000000000000000000000000000000000000000000000000000000170f21ad078e2d4f368ac135964ed0442d66f3be304253faee8da9feac5352ad
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.