Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 848 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Settle With Perm... | 21506486 | 28 mins ago | IN | 0 ETH | 0.00124587 | ||||
Settle With Perm... | 21505646 | 3 hrs ago | IN | 0 ETH | 0.00130404 | ||||
Settle With Perm... | 21504268 | 7 hrs ago | IN | 0 ETH | 0.0014105 | ||||
Settle With Perm... | 21504222 | 8 hrs ago | IN | 0 ETH | 0.00159835 | ||||
Settle With Perm... | 21503088 | 11 hrs ago | IN | 0 ETH | 0.00189369 | ||||
Settle With Perm... | 21501938 | 15 hrs ago | IN | 0 ETH | 0.00205551 | ||||
Settle With Perm... | 21501609 | 16 hrs ago | IN | 0 ETH | 0.00138034 | ||||
Settle With Perm... | 21501293 | 17 hrs ago | IN | 0 ETH | 0.00194852 | ||||
Settle With Perm... | 21501013 | 18 hrs ago | IN | 0 ETH | 0.00217526 | ||||
Settle With Perm... | 21500586 | 20 hrs ago | IN | 0 ETH | 0.00155008 | ||||
Settle With Perm... | 21500450 | 20 hrs ago | IN | 0 ETH | 0.00125231 | ||||
Transfer | 21499822 | 22 hrs ago | IN | 0 ETH | 0.00006693 | ||||
Settle With Perm... | 21499219 | 24 hrs ago | IN | 0 ETH | 0.00159804 | ||||
Settle With Perm... | 21498832 | 26 hrs ago | IN | 0 ETH | 0.00068802 | ||||
Settle With Perm... | 21495240 | 38 hrs ago | IN | 0 ETH | 0.00188071 | ||||
Settle With Perm... | 21495051 | 38 hrs ago | IN | 0 ETH | 0.002093 | ||||
Settle With Perm... | 21494968 | 39 hrs ago | IN | 0 ETH | 0.0020765 | ||||
Settle With Perm... | 21494937 | 39 hrs ago | IN | 0 ETH | 0.00175526 | ||||
Settle | 21494439 | 40 hrs ago | IN | 0 ETH | 0.00168155 | ||||
Settle With Perm... | 21494249 | 41 hrs ago | IN | 0 ETH | 0.00195482 | ||||
Settle With Perm... | 21494230 | 41 hrs ago | IN | 0 ETH | 0.00200949 | ||||
Settle With Perm... | 21494213 | 41 hrs ago | IN | 0 ETH | 0.00158832 | ||||
Settle With Perm... | 21493519 | 43 hrs ago | IN | 0 ETH | 0.00185378 | ||||
Settle With Perm... | 21490949 | 2 days ago | IN | 0 ETH | 0.00176435 | ||||
Settle With Perm... | 21484635 | 3 days ago | IN | 0 ETH | 0.00119921 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21506486 | 28 mins ago | 0.84172096 ETH | ||||
21506486 | 28 mins ago | 0.84172096 ETH | ||||
21505646 | 3 hrs ago | 0.10101553 ETH | ||||
21505646 | 3 hrs ago | 0.10101553 ETH | ||||
21504222 | 8 hrs ago | 61.22013711 ETH | ||||
21504222 | 8 hrs ago | 61.22013711 ETH | ||||
21503088 | 11 hrs ago | 15.48962491 ETH | ||||
21503088 | 11 hrs ago | 15.48962491 ETH | ||||
21501293 | 17 hrs ago | 0.12401712 ETH | ||||
21501293 | 17 hrs ago | 0.12401712 ETH | ||||
21501013 | 18 hrs ago | 41.11156928 ETH | ||||
21501013 | 18 hrs ago | 41.11156928 ETH | ||||
21500586 | 20 hrs ago | 5.0237891 ETH | ||||
21500586 | 20 hrs ago | 5.0237891 ETH | ||||
21500450 | 20 hrs ago | 0.01026692 ETH | ||||
21500450 | 20 hrs ago | 0.01026692 ETH | ||||
21499219 | 24 hrs ago | 0.02134282 ETH | ||||
21499219 | 24 hrs ago | 0.02134282 ETH | ||||
21498832 | 26 hrs ago | 0.3043338 ETH | ||||
21498832 | 26 hrs ago | 0.00086618 ETH | ||||
21498832 | 26 hrs ago | 0.30519999 ETH | ||||
21495051 | 38 hrs ago | 0.05436681 ETH | ||||
21495051 | 38 hrs ago | 0.0025828 ETH | ||||
21495051 | 38 hrs ago | 0.05694962 ETH | ||||
21494968 | 39 hrs ago | 0.10187872 ETH |
Loading...
Loading
Contract Name:
JamSettlement
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; import "./JamBalanceManager.sol"; import "./base/JamSigning.sol"; import "./base/JamTransfer.sol"; import "./interfaces/IJamBalanceManager.sol"; import "./interfaces/IJamSettlement.sol"; import "./libraries/JamInteraction.sol"; import "./libraries/JamOrder.sol"; import "./libraries/JamHooks.sol"; import "./libraries/ExecInfo.sol"; import "./libraries/common/BMath.sol"; import "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Holder.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol"; /// @title JamSettlement /// @notice The settlement contract executes the full lifecycle of a trade on chain. /// Solvers figure out what "interactions" to pass to this contract such that the user order is fulfilled. /// The contract ensures that only the user agreed price can be executed and otherwise will fail to execute. /// As long as the trade is fulfilled, the solver is allowed to keep any potential excess. contract JamSettlement is IJamSettlement, ReentrancyGuard, JamSigning, JamTransfer, ERC721Holder, ERC1155Holder { IJamBalanceManager public immutable balanceManager; constructor(address _permit2, address _daiAddress) { balanceManager = new JamBalanceManager(address(this), _permit2, _daiAddress); } receive() external payable {} function runInteractions(JamInteraction.Data[] calldata interactions) internal returns (bool result) { for (uint i; i < interactions.length; ++i) { // Prevent calls to balance manager require(interactions[i].to != address(balanceManager)); bool execResult = JamInteraction.execute(interactions[i]); // Return false only if interaction was meant to succeed but failed. if (!execResult && interactions[i].result) return false; } return true; } /// @inheritdoc IJamSettlement function settle( JamOrder.Data calldata order, Signature.TypedSignature calldata signature, JamInteraction.Data[] calldata interactions, JamHooks.Def calldata hooks, ExecInfo.SolverData calldata solverData ) external payable nonReentrant { validateOrder(order, hooks, signature, solverData.curFillPercent); require(runInteractions(hooks.beforeSettle), "BEFORE_SETTLE_HOOKS_FAILED"); balanceManager.transferTokens( IJamBalanceManager.TransferData( order.taker, solverData.balanceRecipient, order.sellTokens, order.sellAmounts, order.sellNFTIds, order.sellTokenTransfers, solverData.curFillPercent ) ); _settle(order, interactions, hooks, solverData.curFillPercent); } /// @inheritdoc IJamSettlement function settleWithPermitsSignatures( JamOrder.Data calldata order, Signature.TypedSignature calldata signature, Signature.TakerPermitsInfo calldata takerPermitsInfo, JamInteraction.Data[] calldata interactions, JamHooks.Def calldata hooks, ExecInfo.SolverData calldata solverData ) external payable nonReentrant { validateOrder(order, hooks, signature, solverData.curFillPercent); require(runInteractions(hooks.beforeSettle), "BEFORE_SETTLE_HOOKS_FAILED"); balanceManager.transferTokensWithPermits( IJamBalanceManager.TransferData( order.taker, solverData.balanceRecipient, order.sellTokens, order.sellAmounts, order.sellNFTIds, order.sellTokenTransfers, solverData.curFillPercent ), takerPermitsInfo ); _settle(order, interactions, hooks, solverData.curFillPercent); } /// @inheritdoc IJamSettlement function settleInternal( JamOrder.Data calldata order, Signature.TypedSignature calldata signature, JamHooks.Def calldata hooks, ExecInfo.MakerData calldata makerData ) external payable nonReentrant { validateOrder(order, hooks, signature, makerData.curFillPercent); require(runInteractions(hooks.beforeSettle), "BEFORE_SETTLE_HOOKS_FAILED"); balanceManager.transferTokens( IJamBalanceManager.TransferData( order.taker, msg.sender, order.sellTokens, order.sellAmounts, order.sellNFTIds, order.sellTokenTransfers, makerData.curFillPercent ) ); _settleInternal(order, hooks, makerData); } /// @inheritdoc IJamSettlement function settleInternalWithPermitsSignatures( JamOrder.Data calldata order, Signature.TypedSignature calldata signature, Signature.TakerPermitsInfo calldata takerPermitsInfo, JamHooks.Def calldata hooks, ExecInfo.MakerData calldata makerData ) external payable nonReentrant { validateOrder(order, hooks, signature, makerData.curFillPercent); require(runInteractions(hooks.beforeSettle), "BEFORE_SETTLE_HOOKS_FAILED"); balanceManager.transferTokensWithPermits( IJamBalanceManager.TransferData( order.taker, msg.sender, order.sellTokens, order.sellAmounts, order.sellNFTIds, order.sellTokenTransfers, makerData.curFillPercent ), takerPermitsInfo ); _settleInternal(order, hooks, makerData); } /// @inheritdoc IJamSettlement function settleBatch( JamOrder.Data[] calldata orders, Signature.TypedSignature[] calldata signatures, Signature.TakerPermitsInfo[] calldata takersPermitsInfo, JamInteraction.Data[] calldata interactions, JamHooks.Def[] calldata hooks, ExecInfo.BatchSolverData calldata solverData ) external payable nonReentrant { validateBatchOrders(orders, hooks, signatures, takersPermitsInfo, solverData.takersPermitsUsage, solverData.curFillPercents); bool isMaxFill = solverData.curFillPercents.length == 0; bool executeHooks = hooks.length != 0; uint takersPermitsInd; for (uint i; i < orders.length; ++i) { if (executeHooks){ require(runInteractions(hooks[i].beforeSettle), "BEFORE_SETTLE_HOOKS_FAILED"); } if (solverData.takersPermitsUsage.length != 0 && solverData.takersPermitsUsage[i]){ balanceManager.transferTokensWithPermits( IJamBalanceManager.TransferData( orders[i].taker, solverData.balanceRecipient, orders[i].sellTokens, orders[i].sellAmounts, orders[i].sellNFTIds, orders[i].sellTokenTransfers, isMaxFill ? BMath.HUNDRED_PERCENT : solverData.curFillPercents[i] ), takersPermitsInfo[takersPermitsInd++] ); } else { balanceManager.transferTokens( IJamBalanceManager.TransferData( orders[i].taker, solverData.balanceRecipient, orders[i].sellTokens, orders[i].sellAmounts, orders[i].sellNFTIds, orders[i].sellTokenTransfers, isMaxFill ? BMath.HUNDRED_PERCENT : solverData.curFillPercents[i] ) ); } } require(runInteractions(interactions), "INTERACTIONS_FAILED"); for (uint i; i < orders.length; ++i) { uint256[] memory curBuyAmounts = solverData.transferExactAmounts ? orders[i].buyAmounts : calculateNewAmounts(i, orders, solverData.curFillPercents); transferTokensFromContract( orders[i].buyTokens, curBuyAmounts, orders[i].buyNFTIds, orders[i].buyTokenTransfers, orders[i].receiver, isMaxFill ? BMath.HUNDRED_PERCENT : solverData.curFillPercents[i], true ); if (executeHooks){ require(runInteractions(hooks[i].afterSettle), "AFTER_SETTLE_HOOKS_FAILED"); } emit Settlement(orders[i].nonce); } } function _settle( JamOrder.Data calldata order, JamInteraction.Data[] calldata interactions, JamHooks.Def calldata hooks, uint16 curFillPercent ) private { require(runInteractions(interactions), "INTERACTIONS_FAILED"); transferTokensFromContract( order.buyTokens, order.buyAmounts, order.buyNFTIds, order.buyTokenTransfers, order.receiver, curFillPercent, false ); if (order.receiver == address(this)){ require(!hasDuplicate(order.buyTokens, order.buyNFTIds, order.buyTokenTransfers), "DUPLICATE_TOKENS"); require(hooks.afterSettle.length > 0, "AFTER_SETTLE_HOOKS_REQUIRED"); for (uint i; i < hooks.afterSettle.length; ++i){ require(hooks.afterSettle[i].result, "POTENTIAL_TOKENS_LOSS"); } } require(runInteractions(hooks.afterSettle), "AFTER_SETTLE_HOOKS_FAILED"); emit Settlement(order.nonce); } function _settleInternal( JamOrder.Data calldata order, JamHooks.Def calldata hooks, ExecInfo.MakerData calldata makerData ) private { uint256[] calldata buyAmounts = validateIncreasedAmounts(makerData.increasedBuyAmounts, order.buyAmounts); balanceManager.transferTokens( IJamBalanceManager.TransferData( msg.sender, order.receiver, order.buyTokens, buyAmounts, order.buyNFTIds, order.buyTokenTransfers, makerData.curFillPercent ) ); require(runInteractions(hooks.afterSettle), "AFTER_SETTLE_HOOKS_FAILED"); emit Settlement(order.nonce); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) pragma solidity ^0.8.0; import "./ERC1155Receiver.sol"; /** * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens. * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. * * @dev _Available since v3.1._ */ contract ERC1155Holder is ERC1155Receiver { function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) pragma solidity ^0.8.0; import "../IERC1155Receiver.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "../libraries/JamInteraction.sol"; import "../libraries/JamOrder.sol"; import "../libraries/JamHooks.sol"; import "../libraries/Signature.sol"; import "../libraries/common/BMath.sol"; import "lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol"; /// @title JamSigning /// @notice Functions which handles the signing and validation of Jam orders abstract contract JamSigning { mapping(address => mapping(uint256 => uint256)) private standardNonces; mapping(address => mapping(uint256 => uint256)) private limitOrdersNonces; uint256 private constant INF_EXPIRY = 9999999999; // expiry for limit orders bytes32 private constant DOMAIN_NAME = keccak256("JamSettlement"); bytes32 private constant DOMAIN_VERSION = keccak256("1"); bytes4 private constant EIP1271_MAGICVALUE = bytes4(keccak256("isValidSignature(bytes32,bytes)")); uint256 private constant ETH_SIGN_HASH_PREFIX = 0x19457468657265756d205369676e6564204d6573736167653a0a333200000000; bytes32 public constant EIP712_DOMAIN_TYPEHASH = keccak256(abi.encodePacked( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" )); bytes32 public constant JAM_ORDER_TYPE_HASH = keccak256(abi.encodePacked( "JamOrder(address taker,address receiver,uint256 expiry,uint256 nonce,address executor,uint16 minFillPercent,bytes32 hooksHash,address[] sellTokens,address[] buyTokens,uint256[] sellAmounts,uint256[] buyAmounts,uint256[] sellNFTIds,uint256[] buyNFTIds,bytes sellTokenTransfers,bytes buyTokenTransfers)" )); bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; constructor(){ _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = keccak256( abi.encode(EIP712_DOMAIN_TYPEHASH, DOMAIN_NAME, DOMAIN_VERSION, block.chainid, address(this)) ); } /// @notice The domain separator used in the order validation signature /// @return The domain separator used in encoding of order signature function DOMAIN_SEPARATOR() public view returns (bytes32) { return block.chainid == _CACHED_CHAIN_ID ? _CACHED_DOMAIN_SEPARATOR : keccak256( abi.encode(EIP712_DOMAIN_TYPEHASH, DOMAIN_NAME, DOMAIN_VERSION, block.chainid, address(this)) ); } /// @notice Hash beforeSettle and afterSettle interactions /// @param hooks pre and post interactions to hash /// @return The hash of the interactions function hashHooks(JamHooks.Def memory hooks) public pure returns (bytes32) { if (hooks.afterSettle.length == 0 && hooks.beforeSettle.length == 0){ return bytes32(0); } return keccak256(abi.encode(hooks)); } /// @notice Hash the order info and hooks /// @param order The order to hash /// @param hooksHash The hash of the hooks /// @return The hash of the order function hashOrder(JamOrder.Data calldata order, bytes32 hooksHash) public view returns (bytes32) { bytes32 dataHash = keccak256( // divide order into two parts and encode them separately to avoid stack too deep exception bytes.concat( abi.encode( JAM_ORDER_TYPE_HASH, order.taker, order.receiver, order.expiry, order.nonce, order.executor, order.minFillPercent, hooksHash ), abi.encode( keccak256(abi.encodePacked(order.sellTokens)), keccak256(abi.encodePacked(order.buyTokens)), keccak256(abi.encodePacked(order.sellAmounts)), keccak256(abi.encodePacked(order.buyAmounts)), keccak256(abi.encodePacked(order.sellNFTIds)), keccak256(abi.encodePacked(order.buyNFTIds)), keccak256(order.sellTokenTransfers), keccak256(order.buyTokenTransfers) ) ) ); return keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), dataHash ) ); } /// @notice Validate the order signature /// @param validationAddress The address to validate the signature against /// @param hash The hash of the order /// @param signature The signature to validate function validateSignature(address validationAddress, bytes32 hash, Signature.TypedSignature calldata signature) public view { if (signature.signatureType == Signature.Type.EIP712) { (bytes32 r, bytes32 s, uint8 v) = Signature.getRsv(signature.signatureBytes); address signer = ecrecover(hash, v, r, s); require(signer != address(0), "Invalid signer"); if (signer != validationAddress) { revert("Invalid EIP712 order signature"); } } else if (signature.signatureType == Signature.Type.EIP1271) { require( IERC1271(validationAddress).isValidSignature(hash, signature.signatureBytes) == EIP1271_MAGICVALUE, "Invalid EIP1271 order signature" ); } else if (signature.signatureType == Signature.Type.ETHSIGN) { bytes32 ethSignHash; assembly { mstore(0, ETH_SIGN_HASH_PREFIX) // length of 28 bytes mstore(28, hash) // length of 32 bytes ethSignHash := keccak256(0, 60) } (bytes32 r, bytes32 s, uint8 v) = Signature.getRsv(signature.signatureBytes); address signer = ecrecover(ethSignHash, v, r, s); require(signer != address(0), "Invalid signer"); if (signer != validationAddress) { revert("Invalid ETHSIGH order signature"); } } else { revert("Invalid Signature Type"); } } /// @notice validate all information about the order /// @param order The order to validate /// @param hooks User's hooks to validate /// @param signature The signature to check against /// @param curFillPercent Solver/Maker fill percent function validateOrder( JamOrder.Data calldata order, JamHooks.Def memory hooks, Signature.TypedSignature calldata signature, uint16 curFillPercent ) internal { // Allow settle from user without sig if (order.taker != msg.sender) { bytes32 hooksHash = hashHooks(hooks); bytes32 orderHash = hashOrder(order, hooksHash); validateSignature(order.taker, orderHash, signature); } require(order.executor == msg.sender || order.executor == address(0), "INVALID_EXECUTOR"); require(order.buyTokens.length == order.buyAmounts.length, "INVALID_BUY_TOKENS_LENGTH"); require(order.buyTokens.length == order.buyTokenTransfers.length, "INVALID_BUY_TRANSFERS_LENGTH"); require(order.sellTokens.length == order.sellAmounts.length, "INVALID_SELL_TOKENS_LENGTH"); require(order.sellTokens.length == order.sellTokenTransfers.length, "INVALID_SELL_TRANSFERS_LENGTH"); require(curFillPercent >= order.minFillPercent, "INVALID_FILL_PERCENT"); invalidateOrderNonce(order.taker, order.nonce, order.expiry == INF_EXPIRY); require(block.timestamp < order.expiry, "ORDER_EXPIRED"); } /// @notice Cancel limit order by invalidating nonce for the sender address /// @param nonce The nonce to invalidate function cancelLimitOrder(uint256 nonce) external { invalidateOrderNonce(msg.sender, nonce, true); } /// @notice Check if taker's limit order nonce is valid /// @param taker address /// @param nonce to check /// @return True if nonce is valid function isLimitOrderNonceValid(address taker, uint256 nonce) external view returns (bool) { uint256 invalidatorSlot = nonce >> 8; uint256 invalidatorBit = 1 << (nonce & 0xff); return (limitOrdersNonces[taker][invalidatorSlot] & invalidatorBit) == 0; } /// @notice Check if nonce is valid and invalidate it /// @param taker address /// @param nonce The nonce to invalidate /// @param isLimitOrder True if it is a limit order function invalidateOrderNonce(address taker, uint256 nonce, bool isLimitOrder) private { require(nonce != 0, "ZERO_NONCE"); uint256 invalidatorSlot = nonce >> 8; uint256 invalidatorBit = 1 << (nonce & 0xff); mapping(uint256 => uint256) storage invalidNonces = isLimitOrder ? limitOrdersNonces[taker] : standardNonces[taker]; uint256 invalidator = invalidNonces[invalidatorSlot]; require(invalidator & invalidatorBit != invalidatorBit, "INVALID_NONCE"); invalidNonces[invalidatorSlot] = invalidator | invalidatorBit; } /// @notice validate if increased amounts are more than initial amounts that user signed /// @param increasedAmounts The increased amounts to validate (if empty, return initial amounts) /// @param initialAmounts The initial amounts to validate against /// @return The increased amounts if exist, otherwise the initial amounts function validateIncreasedAmounts( uint256[] calldata increasedAmounts, uint256[] calldata initialAmounts ) internal returns (uint256[] calldata){ if (increasedAmounts.length == 0) { return initialAmounts; } require(increasedAmounts.length == initialAmounts.length, "INVALID_INCREASED_AMOUNTS_LENGTH"); for (uint256 i; i < increasedAmounts.length; ++i) { require(increasedAmounts[i] >= initialAmounts[i], "INVALID_INCREASED_AMOUNTS"); } return increasedAmounts; } /// @notice validate all information about the batch of orders /// @param orders to validate /// @param hooks All takers hooks to validate /// @param signatures All takers signatures to check against /// @param curFillPercents Partial fill percent for each order function validateBatchOrders( JamOrder.Data[] calldata orders, JamHooks.Def[] calldata hooks, Signature.TypedSignature[] calldata signatures, Signature.TakerPermitsInfo[] calldata takersPermitsInfo, bool[] calldata takersPermitsUsage, uint16[] calldata curFillPercents ) internal { bool isMaxFill = curFillPercents.length == 0; bool noHooks = hooks.length == 0; bool allTakersWithoutPermits = takersPermitsUsage.length == 0; require(orders.length == signatures.length, "INVALID_SIGNATURES_LENGTH"); require(orders.length == takersPermitsUsage.length || allTakersWithoutPermits, "INVALID_TAKERS_PERMITS_USAGE_LENGTH"); require(orders.length == hooks.length || noHooks, "INVALID_HOOKS_LENGTH"); require(orders.length == curFillPercents.length || isMaxFill, "INVALID_FILL_PERCENTS_LENGTH"); uint takersWithPermits; for (uint i; i < orders.length; ++i) { require(orders[i].receiver != address(this), "INVALID_RECEIVER_FOR_BATCH_SETTLE"); validateOrder( orders[i], noHooks ? JamHooks.Def(new JamInteraction.Data[](0), new JamInteraction.Data[](0)) : hooks[i], signatures[i], isMaxFill ? BMath.HUNDRED_PERCENT : curFillPercents[i] ); if (!allTakersWithoutPermits && takersPermitsUsage[i]){ ++takersWithPermits; } } require(takersPermitsInfo.length == takersWithPermits, "INVALID_TAKERS_PERMITS_LENGTH"); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; import "../libraries/JamOrder.sol"; import "../libraries/common/BMath.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; /// @title JamTransfer /// @notice Functions for transferring tokens from SettlementContract abstract contract JamTransfer { event NativeTransfer(address indexed receiver, uint256 amount); using SafeERC20 for IERC20; /// @dev Transfer tokens from this contract to receiver /// @param tokens tokens' addresses /// @param amounts tokens' amounts /// @param nftIds NFTs' ids /// @param tokenTransferTypes command sequence of transfer types /// @param receiver address function transferTokensFromContract( address[] calldata tokens, uint256[] memory amounts, uint256[] calldata nftIds, bytes calldata tokenTransferTypes, address receiver, uint16 fillPercent, bool transferExactAmounts ) internal { uint nftInd; for (uint i; i < tokens.length; ++i) { if (tokenTransferTypes[i] == Commands.SIMPLE_TRANSFER) { uint tokenBalance = IERC20(tokens[i]).balanceOf(address(this)); uint partialFillAmount = BMath.getPercentage(amounts[i], fillPercent); require(tokenBalance >= partialFillAmount, "INVALID_OUTPUT_TOKEN_BALANCE"); IERC20(tokens[i]).safeTransfer(receiver, transferExactAmounts ? partialFillAmount : tokenBalance); } else if (tokenTransferTypes[i] == Commands.NATIVE_TRANSFER){ require(tokens[i] == JamOrder.NATIVE_TOKEN, "INVALID_NATIVE_TOKEN"); uint tokenBalance = address(this).balance; uint partialFillAmount = BMath.getPercentage(amounts[i], fillPercent); require(tokenBalance >= partialFillAmount, "INVALID_OUTPUT_NATIVE_BALANCE"); (bool sent, ) = payable(receiver).call{value: transferExactAmounts ? partialFillAmount : tokenBalance}(""); require(sent, "FAILED_TO_SEND_ETH"); emit NativeTransfer(receiver, transferExactAmounts ? partialFillAmount : tokenBalance); } else if (tokenTransferTypes[i] == Commands.NFT_ERC721_TRANSFER) { uint tokenBalance = IERC721(tokens[i]).balanceOf(address(this)); require(amounts[i] == 1 && tokenBalance >= 1, "INVALID_OUTPUT_ERC721_AMOUNT"); IERC721(tokens[i]).safeTransferFrom(address(this), receiver, nftIds[nftInd++]); } else if (tokenTransferTypes[i] == Commands.NFT_ERC1155_TRANSFER) { uint tokenBalance = IERC1155(tokens[i]).balanceOf(address(this), nftIds[nftInd]); require(tokenBalance >= amounts[i], "INVALID_OUTPUT_ERC1155_BALANCE"); IERC1155(tokens[i]).safeTransferFrom( address(this), receiver, nftIds[nftInd++], transferExactAmounts ? amounts[i] : tokenBalance, "" ); } else { revert("INVALID_TRANSFER_TYPE"); } } require(nftInd == nftIds.length, "INVALID_BUY_NFT_IDS_LENGTH"); } /// @dev Transfer native tokens to receiver from this contract /// @param receiver address /// @param amount amount of native tokens function transferNativeFromContract(address receiver, uint256 amount) public { (bool sent, ) = payable(receiver).call{value: amount}(""); require(sent, "FAILED_TO_SEND_ETH"); } /// @dev Calculate new amounts of tokens if solver transferred excess to contract during settleBatch /// @param curInd index of current order /// @param orders array of orders /// @param fillPercents[] fill percentage /// @return array of new amounts function calculateNewAmounts( uint256 curInd, JamOrder.Data[] calldata orders, uint16[] memory fillPercents ) internal returns (uint256[] memory) { JamOrder.Data calldata curOrder = orders[curInd]; uint256[] memory newAmounts = new uint256[](curOrder.buyTokens.length); uint16 curFillPercent = fillPercents.length == 0 ? BMath.HUNDRED_PERCENT : fillPercents[curInd]; for (uint i; i < curOrder.buyTokens.length; ++i) { if (curOrder.buyTokenTransfers[i] == Commands.SIMPLE_TRANSFER || curOrder.buyTokenTransfers[i] == Commands.NATIVE_TRANSFER) { uint256 fullAmount; for (uint j = curInd; j < orders.length; ++j) { for (uint k; k < orders[j].buyTokens.length; ++k) { if (orders[j].buyTokens[k] == curOrder.buyTokens[i]) { fullAmount += orders[j].buyAmounts[k]; require(fillPercents.length == 0 || curFillPercent == fillPercents[j], "DIFF_FILL_PERCENT_FOR_SAME_TOKEN"); } } } uint256 tokenBalance = curOrder.buyTokenTransfers[i] == Commands.NATIVE_TRANSFER ? address(this).balance : IERC20(curOrder.buyTokens[i]).balanceOf(address(this)); // if at least two takers buy same token, we need to divide the whole tokenBalance among them. // for edge case with newAmounts[i] overflow, solver should submit tx with transferExactAmounts=true newAmounts[i] = BMath.getInvertedPercentage(tokenBalance * curOrder.buyAmounts[i] / fullAmount, curFillPercent); if (newAmounts[i] < curOrder.buyAmounts[i]) { newAmounts[i] = curOrder.buyAmounts[i]; } } else { newAmounts[i] = curOrder.buyAmounts[i]; } } return newAmounts; } /// @dev Check if there are duplicate tokens /// @param tokens tokens' addresses /// @param nftIds NFTs' ids /// @param tokenTransferTypes command sequence of transfer types /// @return true if there are duplicate tokens function hasDuplicate( address[] calldata tokens, uint256[] calldata nftIds, bytes calldata tokenTransferTypes ) internal pure returns (bool) { if (tokens.length == 0) { return false; } uint curNftInd; for (uint i; i < tokens.length - 1; ++i) { uint tmpNftInd = curNftInd; for (uint j = i + 1; j < tokens.length; ++j) { if (tokenTransferTypes[j] == Commands.NFT_ERC721_TRANSFER || tokenTransferTypes[j] == Commands.NFT_ERC1155_TRANSFER){ ++tmpNftInd; } if (tokens[i] == tokens[j]) { if (tokenTransferTypes[i] == Commands.NFT_ERC721_TRANSFER || tokenTransferTypes[i] == Commands.NFT_ERC1155_TRANSFER){ if (nftIds[curNftInd] == nftIds[tmpNftInd]){ return true; } } else { return true; } } } if (tokenTransferTypes[i] == Commands.NFT_ERC721_TRANSFER || tokenTransferTypes[i] == Commands.NFT_ERC1155_TRANSFER){ ++curNftInd; } } return false; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface IDaiLikePermit { /// @param holder The address of the token owner. /// @param spender The address of the token spender. /// @param nonce The owner's nonce, increases at each call to permit. /// @param expiry The timestamp at which the permit is no longer valid. /// @param allowed Boolean that sets approval amount, true for type(uint256).max and false for 0. /// @param v Must produce valid secp256k1 signature from the owner along with r and s. /// @param r Must produce valid secp256k1 signature from the owner along with v and s. /// @param s Must produce valid secp256k1 signature from the owner along with r and v. function permit( address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s ) external; // DAI's Polygon getNonce, instead of `nonces(address)` function function getNonce(address user) external view returns (uint256 nonce); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; import "../libraries/Signature.sol"; /// @title IJamBalanceManager /// @notice User approvals are made here. This handles the complexity of multiple allowance types. interface IJamBalanceManager { /// @dev All information needed to transfer tokens struct TransferData { address from; address receiver; address[] tokens; uint256[] amounts; uint256[] nftIds; bytes tokenTransferTypes; uint16 fillPercent; } /// @dev indices for transferTokensWithPermits function struct Indices { uint64 batchToApproveInd; // current `batchToApprove` index uint64 permitSignaturesInd; // current `takerPermitsInfo.permitSignatures` index uint64 nftsInd; // current `data.nftIds` index uint64 batchLen; // current length of `batchTransferDetails` } /// @notice Transfer tokens from taker to solverContract/settlementContract/makerAddress. /// Or transfer tokens directly from maker to taker for settleInternal case /// @param transferData data for transfer function transferTokens( TransferData calldata transferData ) external; /// @notice Transfer tokens from taker to solverContract/settlementContract /// @param transferData data for transfer /// @param takerPermitsInfo taker permits info function transferTokensWithPermits( TransferData calldata transferData, Signature.TakerPermitsInfo calldata takerPermitsInfo ) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; import "../libraries/JamInteraction.sol"; import "../libraries/JamOrder.sol"; import "../libraries/JamHooks.sol"; import "../libraries/Signature.sol"; import "../libraries/ExecInfo.sol"; interface IJamSettlement { /// @dev Event emitted when a settlement is executed successfully event Settlement(uint256 indexed nonce); /// @dev Settle a jam order. /// Pulls sell tokens into the contract and ensures that after running interactions receiver has the minimum of buy /// @param order user signed order /// @param signature user signature /// @param interactions list of interactions to settle the order /// @param hooks pre and post interactions /// @param solverData solver specifies this data by itself function settle( JamOrder.Data calldata order, Signature.TypedSignature calldata signature, JamInteraction.Data[] calldata interactions, JamHooks.Def calldata hooks, ExecInfo.SolverData calldata solverData ) external payable; /// @dev Settle a jam order using taker's Permit/Permit2 signatures /// Pulls sell tokens into the contract and ensures that after running interactions receiver has the minimum of buy /// @param order user signed order /// @param signature user signature /// @param takerPermitsInfo taker information about permit and permit2 /// @param interactions list of interactions to settle the order /// @param hooks pre and post interactions /// @param solverData solver specifies this data by itself function settleWithPermitsSignatures( JamOrder.Data calldata order, Signature.TypedSignature calldata signature, Signature.TakerPermitsInfo calldata takerPermitsInfo, JamInteraction.Data[] calldata interactions, JamHooks.Def calldata hooks, ExecInfo.SolverData calldata solverData ) external payable; /// @dev Settle a jam order. /// Pulls sell tokens into the contract and ensures that after running interactions receiver has the minimum of buy /// @param order user signed order /// @param signature user signature /// @param hooks pre and post interactions /// @param makerData maker specifies this data by itself function settleInternal( JamOrder.Data calldata order, Signature.TypedSignature calldata signature, JamHooks.Def calldata hooks, ExecInfo.MakerData calldata makerData ) external payable; /// @dev Settle a jam order using taker's Permit/Permit2 signatures /// Pulls sell tokens into the contract and ensures that after running interactions receiver has the minimum of buy /// @param order user signed order /// @param signature user signature /// @param takerPermitsInfo taker information about permit and permit2 /// @param hooks pre and post interactions /// @param makerData maker specifies this data by itself function settleInternalWithPermitsSignatures( JamOrder.Data calldata order, Signature.TypedSignature calldata signature, Signature.TakerPermitsInfo calldata takerPermitsInfo, JamHooks.Def calldata hooks, ExecInfo.MakerData calldata makerData ) external payable; /// @dev Settle a batch of orders. /// Pulls sell tokens into the contract and ensures that after running interactions receivers have the minimum of buy /// @param orders takers signed orders /// @param signatures takers signatures /// @param takersPermitsInfo takers information about permit and permit2 /// @param interactions list of interactions to settle the order /// @param hooks pre and post takers interactions /// @param solverData solver specifies this data by itself function settleBatch( JamOrder.Data[] calldata orders, Signature.TypedSignature[] calldata signatures, Signature.TakerPermitsInfo[] calldata takersPermitsInfo, JamInteraction.Data[] calldata interactions, JamHooks.Def[] calldata hooks, ExecInfo.BatchSolverData calldata solverData ) external payable; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; // Part of IAllowanceTransfer(https://github.com/Uniswap/permit2/blob/main/src/interfaces/IAllowanceTransfer.sol) interface IPermit2 { // ------------------ // IAllowanceTransfer // ------------------ /// @notice Details for a token transfer. struct AllowanceTransferDetails { // the owner of the token address from; // the recipient of the token address to; // the amount of the token uint160 amount; // the token to be transferred address token; } /// @notice The permit data for a token struct PermitDetails { // ERC20 token address address token; // the maximum amount allowed to spend uint160 amount; // timestamp at which a spender's token allowances become invalid uint48 expiration; // an incrementing value indexed per owner,token,and spender for each signature uint48 nonce; } /// @notice The permit message signed for multiple token allowances struct PermitBatch { // the permit data for multiple token allowances PermitDetails[] details; // address permissioned on the allowed tokens address spender; // deadline on the permit signature uint256 sigDeadline; } /// @notice A mapping from owner address to token address to spender address to PackedAllowance struct, which contains details and conditions of the approval. /// @notice The mapping is indexed in the above order see: allowance[ownerAddress][tokenAddress][spenderAddress] /// @dev The packed slot holds the allowed amount, expiration at which the allowed amount is no longer valid, and current nonce thats updated on any signature based approvals. function allowance(address user, address token, address spender) external view returns (uint160 amount, uint48 expiration, uint48 nonce); /// @notice Permit a spender to the signed amounts of the owners tokens via the owner's EIP-712 signature /// @dev May fail if the owner's nonce was invalidated in-flight by invalidateNonce /// @param owner The owner of the tokens being approved /// @param permitBatch Data signed over by the owner specifying the terms of approval /// @param signature The owner's signature over the permit data function permit(address owner, PermitBatch memory permitBatch, bytes calldata signature) external; /// @notice Transfer approved tokens in a batch /// @param transferDetails Array of owners, recipients, amounts, and tokens for the transfers /// @dev Requires the from addresses to have approved at least the desired amount /// of tokens to msg.sender. function transferFrom(AllowanceTransferDetails[] calldata transferDetails) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; import "./interfaces/IJamBalanceManager.sol"; import "./interfaces/IPermit2.sol"; import "./interfaces/IDaiLikePermit.sol"; import "./libraries/JamOrder.sol"; import "./libraries/Signature.sol"; import "./libraries/common/SafeCast160.sol"; import "./libraries/common/BMath.sol"; import "./base/JamTransfer.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; /// @title JamBalanceManager /// @notice The reason a balance manager exists is to prevent interaction to the settlement contract draining user funds /// By having another contract that allowances are made to, we can enforce that it is only used to draw in user balances to settlement and not sent out contract JamBalanceManager is IJamBalanceManager { address private immutable operator; using SafeERC20 for IERC20; IPermit2 private immutable PERMIT2; address private immutable DAI_TOKEN; uint256 private immutable _chainId; constructor(address _operator, address _permit2, address _daiAddress) { // Operator can be defined at creation time with `msg.sender` // Pass in the settlement - and that can be the only caller. operator = _operator; _chainId = block.chainid; PERMIT2 = IPermit2(_permit2); DAI_TOKEN = _daiAddress; } modifier onlyOperator(address account) { require(account == operator, "INVALID_CALLER"); _; } /// @inheritdoc IJamBalanceManager function transferTokens( TransferData calldata data ) onlyOperator(msg.sender) external { IPermit2.AllowanceTransferDetails[] memory batchTransferDetails; uint nftsInd; uint batchLen; for (uint i; i < data.tokens.length; ++i) { if (data.tokenTransferTypes[i] == Commands.SIMPLE_TRANSFER) { IERC20(data.tokens[i]).safeTransferFrom( data.from, data.receiver, BMath.getPercentage(data.amounts[i], data.fillPercent) ); } else if (data.tokenTransferTypes[i] == Commands.PERMIT2_TRANSFER) { if (batchLen == 0){ batchTransferDetails = new IPermit2.AllowanceTransferDetails[](data.tokens.length - i); } batchTransferDetails[batchLen++] = IPermit2.AllowanceTransferDetails({ from: data.from, to: data.receiver, amount: SafeCast160.toUint160(BMath.getPercentage(data.amounts[i], data.fillPercent)), token: data.tokens[i] }); continue; } else if (data.tokenTransferTypes[i] == Commands.NATIVE_TRANSFER) { require(data.tokens[i] == JamOrder.NATIVE_TOKEN, "INVALID_NATIVE_TOKEN_ADDRESS"); require(data.fillPercent == BMath.HUNDRED_PERCENT, "INVALID_FILL_PERCENT"); if (data.receiver != operator){ JamTransfer(operator).transferNativeFromContract( data.receiver, BMath.getPercentage(data.amounts[i], data.fillPercent) ); } } else if (data.tokenTransferTypes[i] == Commands.NFT_ERC721_TRANSFER) { require(data.fillPercent == BMath.HUNDRED_PERCENT, "INVALID_FILL_PERCENT"); require(data.amounts[i] == 1, "INVALID_ERC721_AMOUNT"); IERC721(data.tokens[i]).safeTransferFrom(data.from, data.receiver, data.nftIds[nftsInd++]); } else if (data.tokenTransferTypes[i] == Commands.NFT_ERC1155_TRANSFER) { require(data.fillPercent == BMath.HUNDRED_PERCENT, "INVALID_FILL_PERCENT"); IERC1155(data.tokens[i]).safeTransferFrom(data.from, data.receiver, data.nftIds[nftsInd++], data.amounts[i], ""); } else { revert("INVALID_TRANSFER_TYPE"); } if (batchLen != 0){ assembly {mstore(batchTransferDetails, sub(mload(batchTransferDetails), 1))} } } require(nftsInd == data.nftIds.length, "INVALID_NFT_IDS_LENGTH"); require(batchLen == batchTransferDetails.length, "INVALID_BATCH_PERMIT2_LENGTH"); if (batchLen != 0){ PERMIT2.transferFrom(batchTransferDetails); } } /// @inheritdoc IJamBalanceManager function transferTokensWithPermits( TransferData calldata data, Signature.TakerPermitsInfo calldata takerPermitsInfo ) onlyOperator(msg.sender) external { IPermit2.AllowanceTransferDetails[] memory batchTransferDetails; IPermit2.PermitDetails[] memory batchToApprove = new IPermit2.PermitDetails[](takerPermitsInfo.noncesPermit2.length); Indices memory indices = Indices(0, 0, 0, 0); for (uint i; i < data.tokens.length; ++i) { if (data.tokenTransferTypes[i] == Commands.SIMPLE_TRANSFER || data.tokenTransferTypes[i] == Commands.CALL_PERMIT_THEN_TRANSFER) { if (data.tokenTransferTypes[i] == Commands.CALL_PERMIT_THEN_TRANSFER){ permitToken( data.from, data.tokens[i], takerPermitsInfo.deadline, takerPermitsInfo.permitSignatures[indices.permitSignaturesInd++] ); } IERC20(data.tokens[i]).safeTransferFrom( data.from, data.receiver, BMath.getPercentage(data.amounts[i], data.fillPercent) ); } else if (data.tokenTransferTypes[i] == Commands.PERMIT2_TRANSFER || data.tokenTransferTypes[i] == Commands.CALL_PERMIT2_THEN_TRANSFER) { if (data.tokenTransferTypes[i] == Commands.CALL_PERMIT2_THEN_TRANSFER){ batchToApprove[indices.batchToApproveInd] = IPermit2.PermitDetails({ token: data.tokens[i], amount: type(uint160).max, expiration: takerPermitsInfo.deadline, nonce: takerPermitsInfo.noncesPermit2[indices.batchToApproveInd] }); ++indices.batchToApproveInd; } if (indices.batchLen == 0){ batchTransferDetails = new IPermit2.AllowanceTransferDetails[](data.tokens.length - i); } batchTransferDetails[indices.batchLen++] = IPermit2.AllowanceTransferDetails({ from: data.from, to: data.receiver, amount: SafeCast160.toUint160(BMath.getPercentage(data.amounts[i], data.fillPercent)), token: data.tokens[i] }); continue; } else if (data.tokenTransferTypes[i] == Commands.NATIVE_TRANSFER) { require(data.tokens[i] == JamOrder.NATIVE_TOKEN, "INVALID_NATIVE_TOKEN_ADDRESS"); require(data.fillPercent == BMath.HUNDRED_PERCENT, "INVALID_FILL_PERCENT"); if (data.receiver != operator){ JamTransfer(operator).transferNativeFromContract( data.receiver, BMath.getPercentage(data.amounts[i], data.fillPercent) ); } } else if (data.tokenTransferTypes[i] == Commands.NFT_ERC721_TRANSFER) { require(data.fillPercent == BMath.HUNDRED_PERCENT, "INVALID_FILL_PERCENT"); require(data.amounts[i] == 1, "INVALID_ERC721_AMOUNT"); IERC721(data.tokens[i]).safeTransferFrom(data.from, data.receiver, data.nftIds[indices.nftsInd++]); } else if (data.tokenTransferTypes[i] == Commands.NFT_ERC1155_TRANSFER) { require(data.fillPercent == BMath.HUNDRED_PERCENT, "INVALID_FILL_PERCENT"); IERC1155(data.tokens[i]).safeTransferFrom(data.from, data.receiver, data.nftIds[indices.nftsInd++], data.amounts[i], ""); } else { revert("INVALID_TRANSFER_TYPE"); } // Shortening array if (indices.batchLen != 0){ assembly {mstore(batchTransferDetails, sub(mload(batchTransferDetails), 1))} } } require(indices.batchToApproveInd == batchToApprove.length, "INVALID_NUMBER_OF_TOKENS_TO_APPROVE"); require(indices.batchLen == batchTransferDetails.length, "INVALID_BATCH_PERMIT2_LENGTH"); require(indices.permitSignaturesInd == takerPermitsInfo.permitSignatures.length, "INVALID_NUMBER_OF_PERMIT_SIGNATURES"); require(indices.nftsInd == data.nftIds.length, "INVALID_NFT_IDS_LENGTH"); if (batchToApprove.length != 0) { // Update approvals for new taker's data.tokens PERMIT2.permit({ owner: data.from, permitBatch: IPermit2.PermitBatch({ details: batchToApprove, spender: address(this), sigDeadline: takerPermitsInfo.deadline }), signature: takerPermitsInfo.signatureBytesPermit2 }); } // Batch transfer if (indices.batchLen != 0){ PERMIT2.transferFrom(batchTransferDetails); } } /// @dev Call permit function on token contract, supports both ERC20Permit and DaiPermit formats /// @param takerAddress address /// @param tokenAddress address /// @param deadline timestamp when the signature expires /// @param permitSignature signature function permitToken( address takerAddress, address tokenAddress, uint deadline, bytes calldata permitSignature ) private { (bytes32 r, bytes32 s, uint8 v) = Signature.getRsv(permitSignature); if (tokenAddress == DAI_TOKEN){ if (_chainId == 137){ IDaiLikePermit(tokenAddress).permit( takerAddress, address(this), IDaiLikePermit(tokenAddress).getNonce(takerAddress), deadline, true, v, r, s ); } else { IDaiLikePermit(tokenAddress).permit( takerAddress, address(this), IERC20Permit(tokenAddress).nonces(takerAddress), deadline, true, v, r, s ); } } else { IERC20Permit(tokenAddress).permit(takerAddress, address(this), type(uint).max, deadline, v, r, s); } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; import "./libraries/JamInteraction.sol"; import "./libraries/JamOrder.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Holder.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol"; /// @title JamSolver /// @notice This is an example of solver used for tests only contract JamSolver is ERC721Holder, ERC1155Holder{ using SafeERC20 for IERC20; address public owner; address public settlement; address private constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; constructor(address _settlement) { owner = msg.sender; settlement = _settlement; } receive() external payable {} modifier onlyOwner() { require(msg.sender == owner); _; } modifier onlySettlement() { require(msg.sender == settlement); _; } modifier onlyOwnerOrigin() { require(tx.origin == owner); _; } function withdraw (address receiver) public onlyOwner { if (address(this).balance > 0) { payable(receiver).call{value: address(this).balance}(""); } } function withdrawTokens (address[] calldata tokens, address receiver) public onlyOwner { for (uint i; i < tokens.length; i++) { IERC20 token = IERC20(tokens[i]); if (token.balanceOf(address(this)) > 0) { token.safeTransfer(receiver, token.balanceOf(address(this))); } } } function execute ( JamInteraction.Data[] calldata calls, address[] calldata outputTokens, uint256[] calldata outputAmounts, uint256[] calldata outputIds, bytes calldata outputTransferTypes, address receiver ) public payable onlyOwnerOrigin onlySettlement { for(uint i; i < calls.length; i++) { JamInteraction.execute(calls[i]); } for(uint i; i < outputTokens.length; i++) { if (outputTransferTypes[i] == Commands.SIMPLE_TRANSFER){ IERC20 token = IERC20(outputTokens[i]); token.safeTransfer(receiver, outputAmounts[i]); } else if (outputTransferTypes[i] == Commands.NATIVE_TRANSFER){ payable(receiver).call{value: outputAmounts[i]}(""); } else if (outputTransferTypes[i] == Commands.NFT_ERC721_TRANSFER){ IERC721 token = IERC721(outputTokens[i]); token.safeTransferFrom(address(this), receiver, outputIds[i]); } else if (outputTransferTypes[i] == Commands.NFT_ERC1155_TRANSFER){ IERC1155 token = IERC1155(outputTokens[i]); token.safeTransferFrom(address(this), receiver, outputIds[i], outputAmounts[i], ""); } } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; library BMath { uint16 internal constant HUNDRED_PERCENT = 10000; function getPercentage(uint256 value, uint16 percent) internal pure returns (uint256){ if (percent >= HUNDRED_PERCENT){ return value; } return value * percent / HUNDRED_PERCENT; } function getInvertedPercentage(uint256 value, uint16 percent) internal pure returns (uint256){ if (percent >= HUNDRED_PERCENT){ return value; } return value * HUNDRED_PERCENT / percent; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; library SafeCast160 { /// @notice Thrown when a valude greater than type(uint160).max is cast to uint160 error UnsafeCast(); /// @notice Safely casts uint256 to uint160 /// @param value The uint256 to be cast function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) revert UnsafeCast(); return uint160(value); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; library ExecInfo { /// @dev Data structure that solvers specify by themselves in settle() function struct SolverData { address balanceRecipient; // receiver of the initial tokens transfer from taker (usually it is solver contract) uint16 curFillPercent; // percentage by which the solver fills the order (curFillPercent >= order.minFillPercent) } /// @dev Data structure that solvers specify by themselves in settleBatch() function struct BatchSolverData { address balanceRecipient; // receiver of the initial tokens transfer from taker (usually it is solver contract) uint16[] curFillPercents; // if empty array, then all orders will be 100% filled bool[] takersPermitsUsage; // indicates whether taker has permit/permit2 signature for each order // (if empty array, then all orders without permits signatures) bool transferExactAmounts; // True - if solver is planning to transfer exact amounts which are specified in order.buyAmounts // False - if solver is planning to transfer more tokens than in order.buyAmounts, } /// @dev Data structure that makers specify by themselves in settleInternal() function struct MakerData { uint256[] increasedBuyAmounts; // if maker wants to increase user's order.buyAmounts, // then maker can specify new buyAmounts here, otherwise it should be empty array uint16 curFillPercent; // percentage by which the maker fills the order (curFillPercent >= order.minFillPercent) } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; import "../libraries/JamInteraction.sol"; /// @title JamHooks /// @notice JamHooks is a library for managing pre and post interactions library JamHooks { /// @dev Data structure for pre and post interactions struct Def { JamInteraction.Data[] beforeSettle; JamInteraction.Data[] afterSettle; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; library JamInteraction { /// @dev Data representing an interaction on the chain struct Data { /// bool result; address to; uint256 value; bytes data; } /// @dev Execute the interaciton and return the result /// /// @param interaction The interaction to execute /// @return result Whether the interaction succeeded function execute(Data calldata interaction) internal returns (bool result) { (bool _result,) = payable(interaction.to).call{ value: interaction.value }(interaction.data); return _result; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; /// @title Commands /// @notice Commands are used to specify how tokens are transferred in Data.buyTokenTransfers and Data.sellTokenTransfers library Commands { bytes1 internal constant SIMPLE_TRANSFER = 0x00; // simple transfer with standard transferFrom bytes1 internal constant PERMIT2_TRANSFER = 0x01; // transfer using permit2.transfer bytes1 internal constant CALL_PERMIT_THEN_TRANSFER = 0x02; // call permit then simple transfer bytes1 internal constant CALL_PERMIT2_THEN_TRANSFER = 0x03; // call permit2.permit then permit2.transfer bytes1 internal constant NATIVE_TRANSFER = 0x04; bytes1 internal constant NFT_ERC721_TRANSFER = 0x05; bytes1 internal constant NFT_ERC1155_TRANSFER = 0x06; } /// @title JamOrder library JamOrder { address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /// @dev Data representing a Jam Order. struct Data { address taker; address receiver; uint256 expiry; uint256 nonce; address executor; // only msg.sender=executor is allowed to execute (if executor=address(0), then order can be executed by anyone) uint16 minFillPercent; // 100% = 10000, if taker allows partial fills, then it could be less than 100% bytes32 hooksHash; // keccak256(pre interactions + post interactions) address[] sellTokens; address[] buyTokens; uint256[] sellAmounts; uint256[] buyAmounts; uint256[] sellNFTIds; uint256[] buyNFTIds; bytes sellTokenTransfers; // Commands sequence of sellToken transfer types bytes buyTokenTransfers; // Commands sequence of buyToken transfer types } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; library Signature { enum Type { NONE, // 0 EIP712, //1 EIP1271, //2 ETHSIGN //3 } struct TypedSignature { Type signatureType; bytes signatureBytes; } struct TakerPermitsInfo { bytes[] permitSignatures; bytes signatureBytesPermit2; uint48[] noncesPermit2; uint48 deadline; } function getRsv(bytes memory sig) internal pure returns (bytes32, bytes32, uint8){ require(sig.length == 65, "Invalid signature length"); bytes32 r; bytes32 s; uint8 v; assembly { r := mload(add(sig, 32)) s := mload(add(sig, 64)) v := and(mload(add(sig, 65)), 255) } if (v < 27) v += 27; require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "Invalid sig value S"); require(v == 27 || v == 28, "Invalid sig value V"); return (r, s, v); } }
{ "optimizer": { "enabled": true, "runs": 200000 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_permit2","type":"address"},{"internalType":"address","name":"_daiAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NativeTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"Settlement","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EIP712_DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"JAM_ORDER_TYPE_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceManager","outputs":[{"internalType":"contract IJamBalanceManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"cancelLimitOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"beforeSettle","type":"tuple[]"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"afterSettle","type":"tuple[]"}],"internalType":"struct JamHooks.Def","name":"hooks","type":"tuple"}],"name":"hashHooks","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint16","name":"minFillPercent","type":"uint16"},{"internalType":"bytes32","name":"hooksHash","type":"bytes32"},{"internalType":"address[]","name":"sellTokens","type":"address[]"},{"internalType":"address[]","name":"buyTokens","type":"address[]"},{"internalType":"uint256[]","name":"sellAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"buyAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"sellNFTIds","type":"uint256[]"},{"internalType":"uint256[]","name":"buyNFTIds","type":"uint256[]"},{"internalType":"bytes","name":"sellTokenTransfers","type":"bytes"},{"internalType":"bytes","name":"buyTokenTransfers","type":"bytes"}],"internalType":"struct JamOrder.Data","name":"order","type":"tuple"},{"internalType":"bytes32","name":"hooksHash","type":"bytes32"}],"name":"hashOrder","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"isLimitOrderNonceValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint16","name":"minFillPercent","type":"uint16"},{"internalType":"bytes32","name":"hooksHash","type":"bytes32"},{"internalType":"address[]","name":"sellTokens","type":"address[]"},{"internalType":"address[]","name":"buyTokens","type":"address[]"},{"internalType":"uint256[]","name":"sellAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"buyAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"sellNFTIds","type":"uint256[]"},{"internalType":"uint256[]","name":"buyNFTIds","type":"uint256[]"},{"internalType":"bytes","name":"sellTokenTransfers","type":"bytes"},{"internalType":"bytes","name":"buyTokenTransfers","type":"bytes"}],"internalType":"struct JamOrder.Data","name":"order","type":"tuple"},{"components":[{"internalType":"enum Signature.Type","name":"signatureType","type":"uint8"},{"internalType":"bytes","name":"signatureBytes","type":"bytes"}],"internalType":"struct Signature.TypedSignature","name":"signature","type":"tuple"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"interactions","type":"tuple[]"},{"components":[{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"beforeSettle","type":"tuple[]"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"afterSettle","type":"tuple[]"}],"internalType":"struct JamHooks.Def","name":"hooks","type":"tuple"},{"components":[{"internalType":"address","name":"balanceRecipient","type":"address"},{"internalType":"uint16","name":"curFillPercent","type":"uint16"}],"internalType":"struct ExecInfo.SolverData","name":"solverData","type":"tuple"}],"name":"settle","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint16","name":"minFillPercent","type":"uint16"},{"internalType":"bytes32","name":"hooksHash","type":"bytes32"},{"internalType":"address[]","name":"sellTokens","type":"address[]"},{"internalType":"address[]","name":"buyTokens","type":"address[]"},{"internalType":"uint256[]","name":"sellAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"buyAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"sellNFTIds","type":"uint256[]"},{"internalType":"uint256[]","name":"buyNFTIds","type":"uint256[]"},{"internalType":"bytes","name":"sellTokenTransfers","type":"bytes"},{"internalType":"bytes","name":"buyTokenTransfers","type":"bytes"}],"internalType":"struct JamOrder.Data[]","name":"orders","type":"tuple[]"},{"components":[{"internalType":"enum Signature.Type","name":"signatureType","type":"uint8"},{"internalType":"bytes","name":"signatureBytes","type":"bytes"}],"internalType":"struct Signature.TypedSignature[]","name":"signatures","type":"tuple[]"},{"components":[{"internalType":"bytes[]","name":"permitSignatures","type":"bytes[]"},{"internalType":"bytes","name":"signatureBytesPermit2","type":"bytes"},{"internalType":"uint48[]","name":"noncesPermit2","type":"uint48[]"},{"internalType":"uint48","name":"deadline","type":"uint48"}],"internalType":"struct Signature.TakerPermitsInfo[]","name":"takersPermitsInfo","type":"tuple[]"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"interactions","type":"tuple[]"},{"components":[{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"beforeSettle","type":"tuple[]"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"afterSettle","type":"tuple[]"}],"internalType":"struct JamHooks.Def[]","name":"hooks","type":"tuple[]"},{"components":[{"internalType":"address","name":"balanceRecipient","type":"address"},{"internalType":"uint16[]","name":"curFillPercents","type":"uint16[]"},{"internalType":"bool[]","name":"takersPermitsUsage","type":"bool[]"},{"internalType":"bool","name":"transferExactAmounts","type":"bool"}],"internalType":"struct ExecInfo.BatchSolverData","name":"solverData","type":"tuple"}],"name":"settleBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint16","name":"minFillPercent","type":"uint16"},{"internalType":"bytes32","name":"hooksHash","type":"bytes32"},{"internalType":"address[]","name":"sellTokens","type":"address[]"},{"internalType":"address[]","name":"buyTokens","type":"address[]"},{"internalType":"uint256[]","name":"sellAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"buyAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"sellNFTIds","type":"uint256[]"},{"internalType":"uint256[]","name":"buyNFTIds","type":"uint256[]"},{"internalType":"bytes","name":"sellTokenTransfers","type":"bytes"},{"internalType":"bytes","name":"buyTokenTransfers","type":"bytes"}],"internalType":"struct JamOrder.Data","name":"order","type":"tuple"},{"components":[{"internalType":"enum Signature.Type","name":"signatureType","type":"uint8"},{"internalType":"bytes","name":"signatureBytes","type":"bytes"}],"internalType":"struct Signature.TypedSignature","name":"signature","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"beforeSettle","type":"tuple[]"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"afterSettle","type":"tuple[]"}],"internalType":"struct JamHooks.Def","name":"hooks","type":"tuple"},{"components":[{"internalType":"uint256[]","name":"increasedBuyAmounts","type":"uint256[]"},{"internalType":"uint16","name":"curFillPercent","type":"uint16"}],"internalType":"struct ExecInfo.MakerData","name":"makerData","type":"tuple"}],"name":"settleInternal","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint16","name":"minFillPercent","type":"uint16"},{"internalType":"bytes32","name":"hooksHash","type":"bytes32"},{"internalType":"address[]","name":"sellTokens","type":"address[]"},{"internalType":"address[]","name":"buyTokens","type":"address[]"},{"internalType":"uint256[]","name":"sellAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"buyAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"sellNFTIds","type":"uint256[]"},{"internalType":"uint256[]","name":"buyNFTIds","type":"uint256[]"},{"internalType":"bytes","name":"sellTokenTransfers","type":"bytes"},{"internalType":"bytes","name":"buyTokenTransfers","type":"bytes"}],"internalType":"struct JamOrder.Data","name":"order","type":"tuple"},{"components":[{"internalType":"enum Signature.Type","name":"signatureType","type":"uint8"},{"internalType":"bytes","name":"signatureBytes","type":"bytes"}],"internalType":"struct Signature.TypedSignature","name":"signature","type":"tuple"},{"components":[{"internalType":"bytes[]","name":"permitSignatures","type":"bytes[]"},{"internalType":"bytes","name":"signatureBytesPermit2","type":"bytes"},{"internalType":"uint48[]","name":"noncesPermit2","type":"uint48[]"},{"internalType":"uint48","name":"deadline","type":"uint48"}],"internalType":"struct Signature.TakerPermitsInfo","name":"takerPermitsInfo","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"beforeSettle","type":"tuple[]"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"afterSettle","type":"tuple[]"}],"internalType":"struct JamHooks.Def","name":"hooks","type":"tuple"},{"components":[{"internalType":"uint256[]","name":"increasedBuyAmounts","type":"uint256[]"},{"internalType":"uint16","name":"curFillPercent","type":"uint16"}],"internalType":"struct ExecInfo.MakerData","name":"makerData","type":"tuple"}],"name":"settleInternalWithPermitsSignatures","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint16","name":"minFillPercent","type":"uint16"},{"internalType":"bytes32","name":"hooksHash","type":"bytes32"},{"internalType":"address[]","name":"sellTokens","type":"address[]"},{"internalType":"address[]","name":"buyTokens","type":"address[]"},{"internalType":"uint256[]","name":"sellAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"buyAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"sellNFTIds","type":"uint256[]"},{"internalType":"uint256[]","name":"buyNFTIds","type":"uint256[]"},{"internalType":"bytes","name":"sellTokenTransfers","type":"bytes"},{"internalType":"bytes","name":"buyTokenTransfers","type":"bytes"}],"internalType":"struct JamOrder.Data","name":"order","type":"tuple"},{"components":[{"internalType":"enum Signature.Type","name":"signatureType","type":"uint8"},{"internalType":"bytes","name":"signatureBytes","type":"bytes"}],"internalType":"struct Signature.TypedSignature","name":"signature","type":"tuple"},{"components":[{"internalType":"bytes[]","name":"permitSignatures","type":"bytes[]"},{"internalType":"bytes","name":"signatureBytesPermit2","type":"bytes"},{"internalType":"uint48[]","name":"noncesPermit2","type":"uint48[]"},{"internalType":"uint48","name":"deadline","type":"uint48"}],"internalType":"struct Signature.TakerPermitsInfo","name":"takerPermitsInfo","type":"tuple"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"interactions","type":"tuple[]"},{"components":[{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"beforeSettle","type":"tuple[]"},{"components":[{"internalType":"bool","name":"result","type":"bool"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct JamInteraction.Data[]","name":"afterSettle","type":"tuple[]"}],"internalType":"struct JamHooks.Def","name":"hooks","type":"tuple"},{"components":[{"internalType":"address","name":"balanceRecipient","type":"address"},{"internalType":"uint16","name":"curFillPercent","type":"uint16"}],"internalType":"struct ExecInfo.SolverData","name":"solverData","type":"tuple"}],"name":"settleWithPermitsSignatures","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferNativeFromContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"validationAddress","type":"address"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"components":[{"internalType":"enum Signature.Type","name":"signatureType","type":"uint8"},{"internalType":"bytes","name":"signatureBytes","type":"bytes"}],"internalType":"struct Signature.TypedSignature","name":"signature","type":"tuple"}],"name":"validateSignature","outputs":[],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e0346200026d5762008da2906001600160401b03601f38849003908101601f1916830190828211848310176200027257808491604096879485528339810103126200026d576200005e6020620000568462000288565b930162000288565b91600091600183554660a05284519060208201927f454950373132446f6d61696e28737472696e67206e616d652c737472696e672084527f76657273696f6e2c75696e7432353620636861696e49642c61646472657373208784015271766572696679696e67436f6e74726163742960701b6060840152605283526080830193838510838611176200025957848852835190209160a084019283527f05fca2bf864448463a9141ae37fa0b2158f24d3135772bc23bc081c1765a8c2c60c08501527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660e0850152466101008501523061012085015260a085526101409283850195808710838811176200024557868a52519020608052612b62848101938401918211868310176200023157906060949392916200624087393090526001600160a01b0390811661016083015295861661018082015203019082f09081156200022657501660c05251615fa290816200029e823960805181612e78015260a05181612e52015260c05181818161061c01528181610ada0152818161152301528181611b6601528181611d76015281816120ba01528181612460015281816126700152612ce50152f35b8351903d90823e3d90fd5b634e487b7160e01b87526041600452602487fd5b634e487b7160e01b88526041600452602488fd5b634e487b7160e01b86526041600452602486fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036200026d5756fe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806301ffc9a714610197578063150b7a021461018e578063173260eb1461018557806328b2a7961461017c5780632b7280ae146101735780633644e5151461016a578063416e6d5e14610161578063460dd949146101585780637c317e0f1461014f5780637eea39f21461014657806387528f131461013d578063a5cdc8fc14610134578063af2ad5101461012b578063bc197c8114610122578063bfab1fc614610119578063c7977be714610110578063ec98377614610107578063f23a6e61146100fe5763f80b26e30361000e576100f9611481565b61000e565b506100f961127c565b506100f96111bb565b506100f9611181565b506100f961107a565b506100f9610fb5565b506100f9610ebb565b506100f9610dc2565b506100f9610cf7565b506100f9610c74565b506100f9610c01565b506100f9610b2f565b506100f9610a8e565b506100f9610a54565b506100f9610a12565b506100f96107bb565b506100f961053e565b506100f9610461565b506100f96101cf565b7fffffffff000000000000000000000000000000000000000000000000000000008116036101ca57565b600080fd5b50346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760207fffffffff0000000000000000000000000000000000000000000000000000000060043561022e816101a0565b167f4e2312e0000000000000000000000000000000000000000000000000000000008114908115610265575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861025a565b73ffffffffffffffffffffffffffffffffffffffff8116036101ca57565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6080810190811067ffffffffffffffff8211176102f957604052565b6103016102ad565b604052565b67ffffffffffffffff81116102f957604052565b6040810190811067ffffffffffffffff8211176102f957604052565b610160810190811067ffffffffffffffff8211176102f957604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102f957604052565b6040519060e0820182811067ffffffffffffffff8211176102f957604052565b604051906103c18261031a565b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff81116103ff575b01160190565b6104076102ad565b6103f9565b929192610418826103c3565b916104266040519384610353565b8294818452818301116101ca578281602093846000960137010152565b9080601f830112156101ca5781602061045e9335910161040c565b90565b50346101ca5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5761049c60043561028f565b6104a760243561028f565b60643567ffffffffffffffff81116101ca576104c7903690600401610443565b5060206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b90816101e09103126101ca5790565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5c60409101126101ca5760a490565b908160409103126101ca5790565b5060807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5767ffffffffffffffff600480358281116101ca5761058a90369083016104f2565b916024358181116101ca576105a29036908401610530565b926044358281116101ca576105ba9036908501610530565b916064359081116101ca576105d29036908501610530565b926105db6119ea565b60208401946105e9866116e1565b6105f33686611410565b916105fe9285613b93565b61060883806116f6565b61061191611b4b565b61061a9061174a565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169061065b836117bb565b61066860e08501856116f6565b9790916106796101208701876116f6565b906106886101608901896116f6565b9190926101a08a0161069a908b6117c5565b9590966106a6906116e1565b976106af610394565b9e8f926106d290849073ffffffffffffffffffffffffffffffffffffffff169052565b33602084015236906106e392611816565b906040015236906106f392610f4c565b60608c0152369061070392610f4c565b60808a015236906107139261040c565b60a088015261ffff1660c0870152813b156101ca5761077d9561076792600092836040518096819582947feb8d211600000000000000000000000000000000000000000000000000000000845283016119cc565b03925af180156107a0575b610787575b50612cab565b6100196001600055565b8061079461079a92610306565b8061086f565b38610777565b6107a86119dd565b610772565b908160809103126101ca5790565b5060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600467ffffffffffffffff81358181116101ca5761080790369084016104f2565b906024358181116101ca5761081f9036908501610530565b6044358281116101ca5761083690369086016107ad565b906064358381116101ca5761084e9036908701610530565b926084359081116101ca576100199561086991369101610530565b9361206c565b60009103126101ca57565b60405160208101907f4a616d4f7264657228616464726573732074616b65722c61646472657373207282527f656365697665722c75696e74323536206578706972792c75696e74323536206e60408201527f6f6e63652c61646472657373206578656375746f722c75696e743136206d696e60608201527f46696c6c50657263656e742c6279746573333220686f6f6b73486173682c616460808201527f64726573735b5d2073656c6c546f6b656e732c616464726573735b5d2062757960a08201527f546f6b656e732c75696e743235365b5d2073656c6c416d6f756e74732c75696e60c08201527f743235365b5d20627579416d6f756e74732c75696e743235365b5d2073656c6c60e08201527f4e46544964732c75696e743235365b5d206275794e46544964732c62797465736101008201527f2073656c6c546f6b656e5472616e73666572732c627974657320627579546f6b6101208201527f656e5472616e736665727329000000000000000000000000000000000000000061014082015261012c8152610a0c81610336565b51902090565b50346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576020610a4c61087a565b604051908152f35b50346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576020610a4c612e4f565b50346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b9181601f840112156101ca5782359167ffffffffffffffff83116101ca576020808501948460051b0101116101ca57565b5060c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600467ffffffffffffffff81358181116101ca57610b7b9036908401610afe565b90916024358181116101ca57610b949036908601610afe565b906044358381116101ca57610bac9036908801610afe565b906064358581116101ca57610bc49036908a01610afe565b9490936084358781116101ca57610bde9036908c01610afe565b98909760a4359081116101ca576100199b610bfb913691016107ad565b996121fe565b50346101ca5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600435610c3d8161028f565b610c716000808080809573ffffffffffffffffffffffffffffffffffffffff60243591165af1610c6b614593565b506145c3565b80f35b50346101ca5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576020600160ff600435610cb68161028f565b73ffffffffffffffffffffffffffffffffffffffff60243591166000526002845260406000208160081c6000528452161b6040600020541615604051908152f35b5060c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5767ffffffffffffffff6004358181116101ca57610d439036906004016104f2565b906024358181116101ca57610d5c903690600401610530565b906044358181116101ca57610d75903690600401610afe565b916064359081116101ca57610d8e903690600401610530565b9260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c3601126101ca57610019946114db565b50346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576004358015610e5d57600160ff8260081c92161b610e303373ffffffffffffffffffffffffffffffffffffffff166000526002602052604060002090565b9160009281845280602052604084205491610e4f848085161415613d2d565b845260205217604082205580f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f5a45524f5f4e4f4e4345000000000000000000000000000000000000000000006044820152fd5b50346101ca5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600435610ef78161028f565b6044359067ffffffffffffffff82116101ca57610f1b610019923690600401610530565b9060243590613566565b60209067ffffffffffffffff8111610f3f575b60051b0190565b610f476102ad565b610f38565b9291610f5782610f25565b91610f656040519384610353565b829481845260208094019160051b81019283116101ca57905b828210610f8b5750505050565b81358152908301908301610f7e565b9080601f830112156101ca5781602061045e93359101610f4c565b50346101ca5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57610ff060043561028f565b610ffb60243561028f565b67ffffffffffffffff6044358181116101ca5761101c903690600401610f9a565b506064358181116101ca57611035903690600401610f9a565b506084359081116101ca5761104e903690600401610443565b506040517fbc197c81000000000000000000000000000000000000000000000000000000008152602090f35b50346101ca5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760043567ffffffffffffffff81116101ca57610a4c6110cf60209236906004016104f2565b60243590613148565b60405160208101907f454950373132446f6d61696e28737472696e67206e616d652c737472696e672082527f76657273696f6e2c75696e7432353620636861696e49642c616464726573732060408201527f766572696679696e67436f6e74726163742900000000000000000000000000006060820152605281526080810181811067ffffffffffffffff821117611174575b60405251902090565b61117c6102ad565b61116b565b50346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576020610a4c6110d8565b5060e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600467ffffffffffffffff81358181116101ca5761120790369084016104f2565b906024358181116101ca5761121f9036908501610530565b906044358181116101ca5761123790369086016107ad565b906064358181116101ca5761124f9036908701610afe565b9290916084359081116101ca576100199661126c91369101610530565b9361127636610501565b95611c43565b50346101ca5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576112b760043561028f565b6112c260243561028f565b60843567ffffffffffffffff81116101ca576112e2903690600401610443565b5060206040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b801515036101ca57565b9080601f830112156101ca57813561132e81610f25565b9260409161133e83519586610353565b808552602093848087019260051b840101938185116101ca57858401925b85841061136d575050505050505090565b67ffffffffffffffff84358181116101ca578601916080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085880301126101ca578451906113bb826102dd565b8a8501356113c88161130d565b8252858501356113d78161028f565b8b83015260609081860135878401528501359384116101ca57611401878c80979681970101610443565b9082015281520193019261135c565b9190916040818403126101ca57604080519167ffffffffffffffff91830182811184821017611474575b604052829481358381116101ca5781611454918401611317565b845260208201359283116101ca5760209261146f9201611317565b910152565b61147c6102ad565b61143a565b50346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760043567ffffffffffffffff81116101ca57610a4c6114d66020923690600401611410565b612fe0565b92909391936114e86119ea565b6114f06116d5565b6114fa3685611410565b916115059286613b93565b61150f82806116f6565b61151891611b4b565b6115219061174a565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1693611562846117bb565b61156a6117af565b61157760e08701876116f6565b906115866101208901896116f6565b906115956101608b018b6116f6565b9190926101a08c016115a7908d6117c5565b9590966115b26116d5565b986115bb610394565b73ffffffffffffffffffffffffffffffffffffffff909b168b5273ffffffffffffffffffffffffffffffffffffffff1660208b015236906115fb92611816565b6040890152369061160b92610f4c565b6060870152369061161b92610f4c565b6080850152369061162b9261040c565b60a083015261ffff1660c0820152853b156101ca57600061168061169f9782936040519485809481937feb8d2116000000000000000000000000000000000000000000000000000000008352600483016119cc565b03925af180156116bc575b6116a9575b506116996116d5565b93612b1d565b6103c16001600055565b806107946116b692610306565b38611690565b6116c46119dd565b61168b565b61ffff8116036101ca57565b60a43561045e816116c9565b3561045e816116c9565b61045e903690611410565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156101ca570180359067ffffffffffffffff82116101ca57602001918160051b360383136101ca57565b1561175157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4245464f52455f534554544c455f484f4f4b535f4641494c45440000000000006044820152fd5b60843561045e8161028f565b3561045e8161028f565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156101ca570180359067ffffffffffffffff82116101ca576020019181360383136101ca57565b929161182182610f25565b9161182f6040519384610353565b829481845260208094019160051b81019283116101ca57905b8282106118555750505050565b83809183356118638161028f565b815201910190611848565b90815180825260208080930193019160005b82811061188e575050505090565b835185529381019392810192600101611880565b60005b8381106118b55750506000910152565b81810151838201526020016118a5565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611901815180928187528780880191016118a2565b0116010190565b9060e0810173ffffffffffffffffffffffffffffffffffffffff8084511683526020918183860151168385015260408501519260e0604086015283518092528061010086019401926000905b8382106119b35750505050509060c0806119a761199561198361045e966060890151878203606089015261186e565b6080880151868203608088015261186e565b60a087015185820360a08701526118c5565b94015161ffff16910152565b8451811686529482019493820193600190910190611954565b90602061045e928181520190611908565b506040513d6000823e3d90fd5b6002600054146119fb576002600055565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611ab7570190565b611abf611a59565b0190565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015611b34575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81813603018212156101ca570190565b611b3c611ac3565b611afd565b3561045e8161130d565b60009173ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016935b828110611b99575050505050600190565b6020858382611ba985888a611af3565b0135611bb48161028f565b16146101ca576000809184611bca85888a611af3565b91820135611bd78161028f565b611be460608401846117c5565b9290604090848251958692833781018781520394013591165af1611c06614593565b501580611c2a575b611c2057611c1b90611a89565b611b88565b5050505050600090565b50611c3e611c39828587611af3565b611b41565b611c0e565b9493929190611c506119ea565b611c5c602088016116e1565b611c663687611410565b91611c719288613b93565b611c7b84806116f6565b611c8491611b4b565b611c8d9061174a565b611c96856117bb565b90611ca0876117bb565b87611cae60e08901896116f6565b90611cbd6101208b018b6116f6565b90611ccc6101608d018d6116f6565b9290938d6101a08101611cde916117c5565b969097602001611ced906116e1565b98611cf6610394565b73ffffffffffffffffffffffffffffffffffffffff909c168c5273ffffffffffffffffffffffffffffffffffffffff1660208c01523690611d3692611816565b60408a01523690611d4692610f4c565b60608801523690611d5692610f4c565b60808601523690611d669261040c565b60a084015261ffff1660c08301527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1696873b156101ca57611df9600060209361169f9a61169996836040518096819582947f8c575a9f00000000000000000000000000000000000000000000000000000000845260048401611f6a565b03925af18015611e23575b611e10575b50016116e1565b80610794611e1d92610306565b38611e09565b611e2b6119dd565b611e04565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156101ca57016020813591019167ffffffffffffffff82116101ca578160051b360383136101ca57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156101ca57016020813591019167ffffffffffffffff82116101ca5781360383136101ca57565b359065ffffffffffff821682036101ca57565b91908082526020809201929160005b828110611f42575050505090565b90919293828060019265ffffffffffff611f5b89611f12565b16815201950193929101611f34565b90611f7d90604083526040830190611908565b818103602092830152906080820190611f968480611e30565b809193608086525260a084019060a08160051b8601019380926000915b83831061201957505050505061200c6060612005611fea61045e969585611fdd85978b018b611ec2565b91898403908a0152611e83565b611ff76040890189611e30565b908783036040890152611f25565b9501611f12565b65ffffffffffff16910152565b9091929395858061205d837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608c600196030187526120578b87611ec2565b90611e83565b98019301930191939290611fb3565b90939291936120796119ea565b6020840190612087826116e1565b6120913686611410565b9161209c9285613b93565b6120a683806116f6565b6120af91611b4b565b6120b89061174a565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906120f9836117bb565b9061210760e08501856116f6565b91906121176101208701876116f6565b906121266101608901896116f6565b9190926101a08a01612138908b6117c5565b959096612144906116e1565b9761214d610394565b73ffffffffffffffffffffffffffffffffffffffff909a168a523360208b0152369061217892611816565b6040890152369061218892610f4c565b6060870152369061219892610f4c565b608085015236906121a89261040c565b60a083015261ffff1660c0820152813b156101ca5761169f9561076792600092836040518096819582947f8c575a9f00000000000000000000000000000000000000000000000000000000845260048401611f6a565b989a99979491908961223a8a858f9761224296869c999d9a9d61221f6119ea565b8c61222d60408701876116f6565b97909660208101906116f6565b99909861422b565b61224f60208801886116f6565b969050600089815b8d898210612417575050505050506122779161227291611b4b565b6128cc565b60005b8281106122935750505050505090506103c16001600055565b8060606122a1818801611b41565b156123ef57866122ca6122c36122b885898d61287e565b6101408101906116f6565b3691610f4c565b87878b6122d887838361287e565b61010081016122e6916116f6565b6122f489858598949861287e565b6101808101612302916116f6565b9290918a61231181888861287e565b6101c0810161231f916117c5565b9761232b92919761287e565b602001612337906117bb565b96156000149b612354996123949d6123c9575050612710976146f2565b818a80612399575b5061236890868a61287e565b01357f7a70845dec8dc098eecb16e760b0c1569874487f0459ae689c738e281b28ed38600080a2611a89565b61227a565b6123b76123ad6123c2936123bd9389612818565b60208101906116f6565b90611b4b565b612989565b818a61235c565b6123e9916123de8260206123e49401906116f6565b90612866565b6116e1565b976146f2565b8661241261240a61240360208401846116f6565b3691612931565b878b86615662565b6122ca565b8082916127f2575b508b9061242f60408301836116f6565b9050151591826127d4575b5050156126515761248b612486828b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169561287e565b6117bb565b918c8b8d612498816117bb565b928d6124b26124a888838561287e565b60e08101906116f6565b906124cc6124c18a858761287e565b6101208101906116f6565b9190928a6125036124f8826124f06124e5828b8d61287e565b6101608101906116f6565b99909a61287e565b6101a08101906117c5565b98909915600014612636575050612710985b61251d610394565b73ffffffffffffffffffffffffffffffffffffffff909d168d5273ffffffffffffffffffffffffffffffffffffffff1660208d0152369061255d92611816565b60408b0152369061256d92610f4c565b6060890152369061257d92610f4c565b6080870152369061258d9261040c565b60a085015261ffff1660c08401526125a484611a89565b936125b0908787611af3565b92813b156101ca5761260f936125f992600092836040518096819582947f8c575a9f00000000000000000000000000000000000000000000000000000000845260048401611f6a565b03925af18015612629575b612616575b50611a89565b8a90612257565b8061079461262392610306565b38612609565b6126316119dd565b612604565b61264b916123de8260206123e49401906116f6565b98612515565b612696612486828b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169561287e565b8c8b8d6126a2816117bb565b928d6126b26124a888838561287e565b906126c16124c18a858761287e565b9190928a6126da6124f8826124f06124e5828b8d61287e565b989099156000146127b9575050612710985b6126f4610394565b73ffffffffffffffffffffffffffffffffffffffff909b168b5273ffffffffffffffffffffffffffffffffffffffff1660208b0152369061273492611816565b6040890152369061274492610f4c565b6060870152369061275492610f4c565b608085015236906127649261040c565b60a083015261ffff1660c0820152823b156101ca5760006125f961260f9482936040519485809481937feb8d2116000000000000000000000000000000000000000000000000000000008352600483016119cc565b6127ce916123de8260206123e49401906116f6565b986126ec565b6127eb9250906123de826040611c399401906116f6565b818c61243a565b6123b76128066128119361280c938d612818565b806116f6565b61174a565b808e61241f565b9190811015612859575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1813603018212156101ca570190565b612861611ac3565b612822565b91908110156128765760051b0190565b610f47611ac3565b91908110156128bf575b60051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe21813603018212156101ca570190565b6128c7611ac3565b612888565b156128d357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e544552414354494f4e535f4641494c4544000000000000000000000000006044820152fd5b929161293c82610f25565b9161294a6040519384610353565b829481845260208094019160051b81019283116101ca57905b8282106129705750505050565b838091833561297e816116c9565b815201910190612963565b1561299057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41465445525f534554544c455f484f4f4b535f4641494c4544000000000000006044820152fd5b156129f557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4455504c49434154455f544f4b454e53000000000000000000000000000000006044820152fd5b15612a5a57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f41465445525f534554544c455f484f4f4b535f524551554952454400000000006044820152fd5b15612abf57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f504f54454e5449414c5f544f4b454e535f4c4f535300000000000000000000006044820152fd5b93612b3161227261248694612b7e94611b4b565b612b9a610100860191612b4483886116f6565b959091886020612b586101408301836116f6565b92909561018082019a612b6b8c846116f6565b929091612b946101c086019d8e876117c5565b979096019a612b8c8c6117bb565b983691610f4c565b91614d7c565b73ffffffffffffffffffffffffffffffffffffffff163014612bfa575b50505090612bd16123bd6123b784602060609601906116f6565b01357f7a70845dec8dc098eecb16e760b0c1569874487f0459ae689c738e281b28ed38600080a2565b612c21612c3b93612c2a612c3694612c18612c32958a9b999b6116f6565b9490938a6116f6565b9290918a6117c5565b949093615a71565b1590565b6129ee565b6020830190612c56612c4d83866116f6565b90501515612a53565b60005b612c6383866116f6565b9050811015612c995780612c8f612c8a611c39612c9494612c84888b6116f6565b90611af3565b612ab8565b611a89565b612c59565b50929050612bd16123bd6123b7612bb7565b90612cb683806116f6565b612cc46101408501856116f6565b91612cce93613e3e565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001694612d12602086016117bb565b92612d216101008701876116f6565b939091612d326101808901896116f6565b9190926101c08a01612d44908b6117c5565b959096602001612d53906116e1565b97612d5c610394565b3381529973ffffffffffffffffffffffffffffffffffffffff1660208b01523690612d8692611816565b60408901523690612d9692610f4c565b60608701523690612da692610f4c565b60808501523690612db69261040c565b60a083015261ffff1660c0820152833b156101ca576123b7612bd192600080612e146060986123bd966040519485809481937feb8d2116000000000000000000000000000000000000000000000000000000008352600483016119cc565b03925af18015612e42575b612e2f575b5060208101906116f6565b80610794612e3c92610306565b38612e24565b612e4a6119dd565b612e1f565b467f000000000000000000000000000000000000000000000000000000000000000003612e9a577f000000000000000000000000000000000000000000000000000000000000000090565b612ea26110d8565b604051602081019182527f05fca2bf864448463a9141ae37fa0b2158f24d3135772bc23bc081c1765a8c2c60408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176111745760405251902090565b908082519081815260208091019281808460051b8301019501936000915b848310612f565750505050505090565b9091929394958480612fd0837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086600196030187528a5180511515825273ffffffffffffffffffffffffffffffffffffffff84820151168483015260408082015190830152606080910151916080809282015201906118c5565b9801930193019194939290612f46565b602081018051511580613080575b61307957610a0c61304d9160405192839161301c602084019660208852516040808601526080850190612f28565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0848303016060850152612f28565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610353565b5050600090565b5081515115612fee565b9060005b81811061309b5750505090565b90919260019073ffffffffffffffffffffffffffffffffffffffff85356130c18161028f565b1681526020908101940192910161308e565b91907f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116101ca5760051b809282370190565b60206103c191939293604051948161312887935180928680870191016118a2565b820161313c825180938680850191016118a2565b01038085520183610353565b90610a0c6131f4926133d961315b61087a565b91613165816117bb565b9260209687966131768885016117bb565b613182608086016117bb565b61318e60a087016116e1565b604080519c8d0196875273ffffffffffffffffffffffffffffffffffffffff998a16602088015292891686840152868301356060878101919091528701356080870152971660a085015261ffff90961660c084015260e083015293969384916101000190565b03926132267fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe094858101835282610353565b6133d4866133c88961325f61325361324160e08901896116f6565b9290845192839188830195869161308a565b038b8101835282610353565b519020956132956132896132776101008401846116f6565b9290855192839189830195869161308a565b038c8101835282610353565b5190206132ca6132be6132ac6101208501856116f6565b929086519283918a83019586916130d3565b038d8101835282610353565b5190208a6132f46133006132e26101408701876116f6565b939088519384918c83019687916130d3565b03908101835282610353565b5190208b6132f461332a6133186101608801886116f6565b939089519384918d83019687916130d3565b519020916133568d6133406101808801886116f6565b9290918b6132f48b5194859283019687916130d3565b5190209361338a6133716133786133716101a08a018a6117c5565b369161040c565b8b8151910120976101c08101906117c5565b8051908a012096519889019b8c5260208c015260408b015260608a0152608089015260a088015260c087015260e08601529093849161010090910190565b03858101845283610353565b613107565b838151910120926132f46133eb612e4f565b95519485928301968790916042927f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201520190565b6004111561343457565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b3560048110156101ca5790565b1561347757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f496e76616c6964207369676e65720000000000000000000000000000000000006044820152fd5b908160209103126101ca575161045e816101a0565b60409061045e949281528160208201520191611e83565b1561350857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f496e76616c69642045495031323731206f72646572207369676e6174757265006044820152fd5b91600161357282613463565b61357b8161342a565b03613673576135c66020926135a061359b613371858760009701906117c5565b615e2e565b6040805194855260ff909116602085015283019190915260608201529081906080820190565b838052039060015afa15613666575b73ffffffffffffffffffffffffffffffffffffffff8060005116916135fb831515613470565b160361360357565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f496e76616c696420454950373132206f72646572207369676e617475726500006044820152606490fd5b0390fd5b61366e6119dd565b6135d5565b600261367e82613463565b6136878161342a565b036137695761371160206103c1946136c384837fffffffff000000000000000000000000000000000000000000000000000000009601906117c5565b919073ffffffffffffffffffffffffffffffffffffffff6040518096819582947f1626ba7e000000000000000000000000000000000000000000000000000000009b8c8552600485016134ea565b0392165afa90811561375c575b60009161372e575b501614613501565b61374f915060203d8111613755575b6137478183610353565b8101906134d5565b38613726565b503d61373d565b6137646119dd565b61371e565b90600361377583613463565b61377e8161342a565b03613871576020906137cb60009384927f19457468657265756d205369676e6564204d6573736167653a0a3332000000008452601c526135a061359b613371603c862093878101906117c5565b838052039060015afa15613864575b73ffffffffffffffffffffffffffffffffffffffff80915116916137ff831515613470565b16146103c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f496e76616c69642045544853494748206f72646572207369676e6174757265006044820152606490fd5b61386c6119dd565b6137da565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964205369676e61747572652054797065000000000000000000006044820152606490fd5b156138d757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f494e56414c49445f4558454355544f52000000000000000000000000000000006044820152fd5b1561393c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f494e56414c49445f4255595f544f4b454e535f4c454e475448000000000000006044820152fd5b156139a157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f4255595f5452414e53464552535f4c454e475448000000006044820152fd5b15613a0657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f494e56414c49445f53454c4c5f544f4b454e535f4c454e4754480000000000006044820152fd5b15613a6b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e56414c49445f53454c4c5f5452414e53464552535f4c454e4754480000006044820152fd5b15613ad057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f46494c4c5f50455243454e540000000000000000000000006044820152fd5b15613b3557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4f524445525f45585049524544000000000000000000000000000000000000006044820152fd5b9192613c076103c194613cc293613ba9866117bb565b9173ffffffffffffffffffffffffffffffffffffffff928333911603613d03575b5050608085019033613bf7613bde846117bb565b73ffffffffffffffffffffffffffffffffffffffff1690565b14918215613cef575b50506138d0565b613c57613c3e6101008501613c38613c1f82886116f6565b9050613c2f6101408901896116f6565b91905014613935565b856116f6565b9050613c4e6101c08601866117c5565b9190501461399a565b613ca0613c8760e08501613c38613c6e82886116f6565b9050613c7e6101208901896116f6565b919050146139ff565b9050613c976101a08601866117c5565b91905014613a64565b61ffff613cb9613cb260a086016116e1565b61ffff1690565b91161015613ac9565b613ce8613cce826117bb565b9160408101359260606402540be3ff851492013590613d92565b4210613b2e565b613cfa9192506117bb565b16153880613c00565b613d18613d12613d2693612fe0565b88613148565b613d21886117bb565b613566565b3880613bca565b15613d3457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f494e56414c49445f4e4f4e4345000000000000000000000000000000000000006044820152fd5b908015610e5d57613e1491600160ff8360081c93161b93600090600014613e175750613dde9073ffffffffffffffffffffffffffffffffffffffff166000526002602052604060002090565b925b613df4828590600052602052604060002090565b54613e03828083161415613d2d565b179290600052602052604060002090565b55565b73ffffffffffffffffffffffffffffffffffffffff60409216815260016020522092613de0565b91939290938415613f4857818503613eea5760005b858110613e61575050509190565b613e6c818786612866565b35613e78828585612866565b3511613e8c57613e8790611a89565b613e53565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f494e56414c49445f494e435245415345445f414d4f554e5453000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f494e56414c49445f494e435245415345445f414d4f554e54535f4c454e4754486044820152fd5b9350919050565b15613f5657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f494e56414c49445f5349474e4154555245535f4c454e475448000000000000006044820152fd5b15613fbb57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f494e56414c49445f54414b4552535f5045524d4954535f55534147455f4c454e60448201527f47544800000000000000000000000000000000000000000000000000000000006064820152fd5b1561404657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f484f4f4b535f4c454e4754480000000000000000000000006044820152fd5b156140ab57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f46494c4c5f50455243454e54535f4c454e475448000000006044820152fd5b1561411057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f494e56414c49445f52454345495645525f464f525f42415443485f534554544c60448201527f45000000000000000000000000000000000000000000000000000000000000006064820152fd5b6040516020810181811067ffffffffffffffff8211176141b9575b6040526000815290565b6141c16102ad565b6141af565b156141cd57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e56414c49445f54414b4552535f5045524d4954535f4c454e4754480000006044820152fd5b9899859b9a9894919597969881159361424787159a8914613f4f565b86881480156143b3575b61425a90613fb4565b85881480156143ab575b61426d9061403f565b82881480156143a4575b614283909a989a6140a4565b60009b8c9815985b8b81106142aa575050505050505050505050506103c1929350146141c6565b8f88614328916143188f8590816142e8816020936142e28c6142db613bde886142d58787309661287e565b016117bb565b1415614109565b8b61287e565b95806143895750506142f8614194565b90614301614194565b9061430a6103b4565b928352820152925b8b612818565b908a156143755761271092613b93565b8a8a828b8261435e575b50509050614349575b61434490611a89565b61428b565b9c61435661434491611a89565b9d905061433b565b611c39925061436c93612866565b8b90828b614332565b6143836123e4868b8b612866565b92613b93565b61439e925090614399918b612818565b6116eb565b92614312565b5084614277565b508515614264565b5089614251565b908210156143c6570190565b611abf611ac3565b908160209103126101ca575190565b60209181518110156143f2575b60051b010190565b6143fa611ac3565b6143ea565b1561440657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f494e56414c49445f4f55545055545f455243313135355f42414c414e434500006044820152fd5b1561446b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f4f55545055545f4552433732315f414d4f554e54000000006044820152fd5b156144d057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f4e41544956455f544f4b454e0000000000000000000000006044820152fd5b1561453557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e56414c49445f4f55545055545f4e41544956455f42414c414e43450000006044820152fd5b3d156145be573d906145a4826103c3565b916145b26040519384610353565b82523d6000602084013e565b606090565b156145ca57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4641494c45445f544f5f53454e445f45544800000000000000000000000000006044820152fd5b1561462f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f4f55545055545f544f4b454e5f42414c414e4345000000006044820152fd5b1561469457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f494e56414c49445f4255595f4e46545f4944535f4c454e4754480000000000006044820152fd5b91939698979092600096875b8581106147195750505050505050506103c19293501461468d565b61477561475061472a83858c6143ba565b357fff000000000000000000000000000000000000000000000000000000000000001690565b7fff000000000000000000000000000000000000000000000000000000000000001690565b6148705780612c8f8d614795613bde613bde61248661481f978d8d612866565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260209291899186918e91908690829060249082905afa958615614863575b600096614824575b5050916147fa61480092614809946143dd565b51615f18565b80931015614628565b61481a613bde612486868d8d612866565b6152d0565b6146fe565b61480994929650926148526147fa928561480096903d1061485c575b61484a8183610353565b8101906143ce565b96929450926147e7565b503d614840565b61486b6119dd565b6147df565b8b8a837f04000000000000000000000000000000000000000000000000000000000000008b6148c561472a877fff000000000000000000000000000000000000000000000000000000000000009586946143ba565b160361498557505090877f88479153c5a43e333375e4daf2e98cddbb4cb43428c64efdab6e987c263b662061497d8961481f9561493c73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8c6149356124868a73ffffffffffffffffffffffffffffffffffffffff978894612866565b16146144c9565b61495761494e8b6147fa8947996143dd565b8096101561452e565b169261496d600080808085895af1610c6b614593565b6040519081529081906020820190565b0390a2611a89565b909a9291507f0500000000000000000000000000000000000000000000000000000000000000816149ba61472a85888f6143ba565b1603614b6e57506149cc818888612866565b6149d5906117bb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660409087838b84517f70a082310000000000000000000000000000000000000000000000000000000081528c8360209182846004998180308d820190614a61909173ffffffffffffffffffffffffffffffffffffffff6020820193169052565b03915afa968715614ac298614ab198613bde98613bde9861248698614aac95614b61575b600094614b42575b5050614a9c60019283926143dd565b51149182614b37575b5050614464565b612866565b94614abb81611a89565b9d88612866565b35843b156101ca578f9461481f95600080946125f99651968795869485937f42842e0e0000000000000000000000000000000000000000000000000000000085523090850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b101590503880614aa5565b614b59929450803d1061485c5761484a8183610353565b913880614a8d565b614b696119dd565b614a85565b81929a50614ba161472a7f060000000000000000000000000000000000000000000000000000000000000093868d6143ba565b1603614d1d57614bbb613bde613bde612486848a8a612866565b90614c35614bca8b8d87612866565b6040517efdd58e00000000000000000000000000000000000000000000000000000000815230600480830191909152913560248201529093602091908290829060449082905afa918215614d10575b600092614cf3575b5050614c2d838b6143dd565b5111156143ff565b614c49613bde613bde612486848b8b612866565b91614c5e614c568c611a89565b9b8d87612866565b3590614c6a838b6143dd565b5191843b156101ca578f9461481f95600080946125f9604051978896879586947ff242432a00000000000000000000000000000000000000000000000000000000865230908601929060c0949273ffffffffffffffffffffffffffffffffffffffff80921685521660208401526040830152606082015260a06080820152600060a08201520190565b614d099250803d1061485c5761484a8183610353565b3880614c21565b614d186119dd565b614c19565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f494e56414c49445f5452414e534645525f5459504500000000000000000000006044820152606490fd5b9091939692989798600096875b848110614da45750505050505050506103c19293501461468d565b614db561475061472a83858c6143ba565b614e925780612c8f8d614dd5613bde613bde612486614e51978c8c612866565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020929185918d918590829060249082905afa948515614e85575b600095614e56575b5050916147fa614e3792614e3f946143dd565b821015614628565b8861481a613bde612486868c8c612866565b614d89565b614e3f9492955092614e7b6147fa9285614e3796903d1061485c5761484a8183610353565b9592945092614e24565b614e8d6119dd565b614e1c565b8b8a837f04000000000000000000000000000000000000000000000000000000000000008b614ee761472a877fff000000000000000000000000000000000000000000000000000000000000009586946143ba565b1603614f8757505090877f88479153c5a43e333375e4daf2e98cddbb4cb43428c64efdab6e987c263b662061497d88614f70614f68614e5197614f5d73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8d6149356124868c73ffffffffffffffffffffffffffffffffffffffff998a94612866565b6147fa8847986143dd565b85101561452e565b8a169261496d600080808085895af1610c6b614593565b909a9291507f050000000000000000000000000000000000000000000000000000000000000081614fbc61472a85888f6143ba565b16036150ed5750614fd7613bde613bde612486848a8a612866565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004808301919091529261503b916020918290829060249082905afa9182156150e0575b6000926150c3575b506001905080614a9c878f6143dd565b615052614ab1613bde613bde612486878d8d612866565b35843b156101ca5790517f42842e0e0000000000000000000000000000000000000000000000000000000081523092810192835273ffffffffffffffffffffffffffffffffffffffff8a1660208401526040830191909152614e5193909160009183918290849082906060016125f9565b6150d99250803d1061485c5761484a8183610353565b388061502b565b6150e86119dd565b615023565b819a5061511f61472a7f060000000000000000000000000000000000000000000000000000000000000093868d6143ba565b1603614d1d57886151328b9a8787612866565b61513b906117bb565b73ffffffffffffffffffffffffffffffffffffffff1661515c838c87612866565b604080517efdd58e000000000000000000000000000000000000000000000000000000008152306004808301919091529235602482015291946020939192909185918b918b918f918890829060449082905afa9788156152c3575b600098615280575b5050612486846151e994613bde94614aac6151e06151fa99613bde976143dd565b518c10156143ff565b916151f381611a89565b9e89612866565b3590803b156101ca578a6000614e51976125f9829651978896879586947ff242432a00000000000000000000000000000000000000000000000000000000865230908601929060c0949273ffffffffffffffffffffffffffffffffffffffff80921685521660208401526040830152606082015260a06080820152600060a08201520190565b613bde929850946151e994613bde94614aac6151e0846152b3612486978c6151fa9d903d1061485c5761484a8183610353565b9d975099505050945094506151bf565b6152cb6119dd565b6151b7565b6153c49160008073ffffffffffffffffffffffffffffffffffffffff604051946153798661534d60209a8b8301987fa9059cbb000000000000000000000000000000000000000000000000000000008a52602484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101885287610353565b1692604051946153888661031a565b8786527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488870152519082855af16153be614593565b91615473565b8051806153d057505050565b818391810103126101ca578101516153e78161130d565b156153ef5750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b919290156154ee5750815115615487575090565b3b156154905790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156155015750805190602001fd5b613662906040519182917f08c379a00000000000000000000000000000000000000000000000000000000083526020600484015260248301906118c5565b9061554982610f25565b6155566040519182610353565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06155848294610f25565b0190602036910137565b906001820180921161559c57565b6103c1611a59565b9190820180921161559c57565b156155b857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f444946465f46494c4c5f50455243454e545f464f525f53414d455f544f4b454e6044820152fd5b8181029291811591840414171561559c57565b8115615633570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b909392919361567282868361287e565b9461568b6156846101008801886116f6565b905061553f565b93805115600014615a3157612710925b60005b6156ac6101008a018a6116f6565b9050811015615a26576156d361475061472a836156cd6101c08e018e6117c5565b906143ba565b15818a82156159c3575b50501561599c576000865b85811061588d5750898683927f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000061574b61472a876156cd6101c08901896117c5565b16146000906000146157f85750475b846101408501948561576b916116f6565b6157759291612866565b3561577f91615616565b9061578991615629565b9061579391615f3c565b61579d838b6143dd565b5280828c6157ab828d6143dd565b51926157b6916116f6565b6157c09291612866565b3511926157d3936157d8575b5050611a89565b61569e565b6123de6157e5928d6116f6565b356157f0828a6143dd565b5238816157cc565b615813613bde613bde612486886123de6101008a018a6116f6565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152906020908190839060249082905afa928315615880575b92615863575b505061575a565b6158799250803d1061485c5761484a8183610353565b388061585c565b6158886119dd565b615856565b9992959690949397919860005b6158b36158a88d888b61287e565b6101008101906116f6565b9050811015615983578b888c73ffffffffffffffffffffffffffffffffffffffff615902613bde6124866158f3612486898f6158a88b6123de928c61287e565b946123de6101008e018e6116f6565b91161461591a575b505061591590611a89565b61589a565b97615934836123de6122b861593b958c615915989e61287e565b35906155a4565b966159538d8c5115908d821561595c575b50506155b1565b90508b8861590a565b6159769250613cb29161596e916143dd565b5161ffff1690565b61ffff8c16148e8d61594c565b509891979394909695929961599790611a89565b6156e8565b806159b26157d3926123de6101408d018d6116f6565b356159bd828a6143dd565b52611a89565b7f0400000000000000000000000000000000000000000000000000000000000000925061472a7fff00000000000000000000000000000000000000000000000000000000000000926156cd836101c0615a1d9501906117c5565b1614818a6156dd565b509496505050505050565b615a3e61596e85836143dd565b9261569b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161559c57565b909395919492948415615d4657600094855b615a8c82615a44565b811015615d38578887615a9e8361558e565b848110615b6b575050615ad961475061472a848a7f0500000000000000000000000000000000000000000000000000000000000000956143ba565b1481878b8315615b0f575b505050615afa575b615af590611a89565b615a83565b95615b07615af591611a89565b969050615aec565b7f060000000000000000000000000000000000000000000000000000000000000093507fff0000000000000000000000000000000000000000000000000000000000000092615b619261472a926143ba565b161481878b615ae4565b909391507f05000000000000000000000000000000000000000000000000000000000000009992998b828a83615ba861475061472a8585886143ba565b14928315615cdc575b505050615ccc575b8a898d8973ffffffffffffffffffffffffffffffffffffffff615bf1613bde612486898b615beb6124868b838a612866565b96612866565b911614615c12575b50505050615c0690611a89565b928a9193999299615a9e565b615c23926147509261472a926143ba565b148a898d8315615c70575b505050600014615c6057615c43898487612866565b35615c4f858588612866565b3514615c6057615c068a898d615bf9565b5050505050509350505050600190565b7f060000000000000000000000000000000000000000000000000000000000000093507fff0000000000000000000000000000000000000000000000000000000000000092615cc29261472a926143ba565b16148a898d615c2e565b93615cd690611a89565b93615bb9565b7f060000000000000000000000000000000000000000000000000000000000000093507fff0000000000000000000000000000000000000000000000000000000000000092615d2e9261472a926143ba565b1614828a8e615bb1565b505050509350505050600090565b50509350505050600090565b60ff601b9116019060ff821161559c57565b15615d6b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964207369672076616c75652053000000000000000000000000006044820152fd5b15615dd057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964207369672076616c75652056000000000000000000000000006044820152fd5b906041825103615eba5760208201519060ff604160408501519401511691601b8310615eaa575b615e817f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115615d64565b615e9a60ff8416601b8114908115615e9f575b50615dc9565b929190565b601c91501438615e94565b91615eb490615d52565b91615e55565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e67746800000000000000006044820152fd5b9061ffff166127109081811015615f3757615f339192615616565b0490565b505090565b9061ffff1661271080821015615f3757828161045e9402918183041490151761562957615f67611a59565b61562956fea2646970667358221220e43379b0f270b31f4d62cb5510ca717c9274981474b7e5943b19ab4b9589b77d64736f6c6343000811003361010034620000e157601f62002b6238819003918201601f19168301916001600160401b03831184841017620000e657808492606094604052833981010312620000e1576200004e81620000fc565b906200006b60406200006360208401620000fc565b9201620000fc565b6080929092524660e0526001600160a01b031660a05260c052604051612a50908162000112823960805181818160c5015281816107c301528181610852015281816108e6015261106e015260a051818181610e5d01528181610f0b015261177e015260c0518161248c015260e051816124b70152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620000e15756fe60806040526004361015610013575b600080fd5b60003560e01c80638c575a9f1461003b5763eb8d21161461003357600080fd5b61000e611003565b3461000e577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60408136011261000e5760043567ffffffffffffffff811161000e5761008b903690600401610ff5565b9067ffffffffffffffff6024351161000e576080906024353603011261000e576100ec73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633146117de565b606061010c6101056044602435016024356004016118ad565b9050611c51565b90610115611bf0565b600081526000602082015260006040820152818101906000825260005b61013f60408701876118ad565b9050811015610d5e576101b061018b6101658361015f60a08b018b611901565b90611982565b357fff000000000000000000000000000000000000000000000000000000000000001690565b7fff000000000000000000000000000000000000000000000000000000000000001690565b158015610d00575b1561039657807f02000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000006102176101656102cb9561015f60a08d018d611901565b16146102fb575b6102a061025c61024361023e8461023860408d018d6118ad565b90611a0a565b611a28565b73ffffffffffffffffffffffffffffffffffffffff1690565b61026589611a28565b61027160208b01611a28565b9061029a8b61029460c061028c8961023860608601866118ad565b359201611996565b90612998565b92611e61565b6102c26102b5855167ffffffffffffffff1690565b67ffffffffffffffff1690565b6102d057611873565b610132565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8551018552611873565b61039165ffffffffffff61030e89611a28565b61032261023e8561023860408e018e6118ad565b906103316064602435016121a3565b91610387610344600460243501806118ad565b67ffffffffffffffff61036260208d015167ffffffffffffffff1690565b6103808d602061037184612189565b67ffffffffffffffff16910152565b16916121b6565b9490931691612457565b61021e565b7f01000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000006103ec6101658461015f60a08c018c611901565b16148015610ca2575b156106e6577f03000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000006104506101658461015f60a08c018c611901565b16146105d0575b61046c6102b5845167ffffffffffffffff1690565b156105a3575b6102cb9061059d61048288611a28565b61055561049160208b01611a28565b6105388b61051b6104d661023e896102386104cb6104c66104b98461023860608b018b6118ad565b3561029460c08a01611996565b6129cf565b9560408101906118ad565b936104fe6104e2611bf0565b73ffffffffffffffffffffffffffffffffffffffff9098168852565b73ffffffffffffffffffffffffffffffffffffffff166020870152565b73ffffffffffffffffffffffffffffffffffffffff166040850152565b73ffffffffffffffffffffffffffffffffffffffff166060830152565b67ffffffffffffffff610570875167ffffffffffffffff1690565b61058a61057c82612189565b67ffffffffffffffff168952565b16906105968289611cf9565b5286611cf9565b50611873565b92506102cb6105c86105c3856105bc60408a018a6118ad565b9050611bd9565b611c51565b939050610472565b6106b56105e761023e8361023860408b018b6118ad565b6106956105f86064602435016121a3565b6106866106356106306106156044602435016024356004016118ad565b61062a6102b58c5167ffffffffffffffff1690565b91611a0a565b6121a3565b9161065d610641611bf0565b73ffffffffffffffffffffffffffffffffffffffff9096168652565b73ffffffffffffffffffffffffffffffffffffffff602086015265ffffffffffff166040850152565b65ffffffffffff166060830152565b6106aa6102b5855167ffffffffffffffff1690565b906105968289611cf9565b506106e16106d36106ce845167ffffffffffffffff1690565b612189565b67ffffffffffffffff168352565b610457565b7f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000061073c6101658461015f60a08c018c611901565b160361093a5761078a73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff61078361023e8561023860408d018d6118ad565b1614611b74565b60c08601906107a861271061ffff6107a185611996565b16146119a5565b6020870173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff61080183611a28565b1603610813575b506102cb91506102a0565b61081f61083b91611a28565b926102946108348461023860608d018d6118ad565b3591611996565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163b1561000e576040517f7c317e0f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301526102cb91600081806044810103818373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af1801561092d575b15610808578061092161092792611a79565b80611af7565b87610808565b610935611b02565b61090f565b7f05000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000006109906101658461015f60a08c018c611901565b1603610ae8576109ab61271061ffff6107a160c08a01611996565b6109c860016109c18361023860608b018b6118ad565b3514611b0f565b6109e261024361024361023e8461023860408c018c6118ad565b906109ec87611a28565b6109f860208901611a28565b90610a4b610a0960808b018b6118ad565b67ffffffffffffffff610a2760408a015167ffffffffffffffff1690565b610a44610a3382612189565b67ffffffffffffffff1660408c0152565b1691611a0a565b35843b1561000e576040517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316600482015292909116602483015260448201526102cb926000908290606490829084905af18015610adb575b610ac8575b506102a0565b80610921610ad592611a79565b87610ac2565b610ae3611b02565b610abd565b7f06000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000610b3e6101658461015f60a08c018c611901565b1603610c3f57610b5961271061ffff6107a160c08a01611996565b610b7361024361024361023e8461023860408c018c6118ad565b90610b7d87611a28565b91610b8a60208901611a28565b92610b9b610a0960808b018b6118ad565b35610bad8461023860608d018d6118ad565b3592803b1561000e576040517ff242432a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529590921660248601526044850152606484019190915260a06084840152600060a484018190526102cb9391829060c490829084905af18015610adb57610ac857506102a0565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f494e56414c49445f5452414e534645525f5459504500000000000000000000006044820152606490fd5b0390fd5b507f03000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000610cf96101658461015f60a08c018c611901565b16146103f5565b507f02000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000610d576101658461015f60a08c018c611901565b16146101b8565b5083610e23610e0360408894610d92610d7f825167ffffffffffffffff1690565b67ffffffffffffffff87519116146121e0565b610dba610da7885167ffffffffffffffff1690565b67ffffffffffffffff8a51911614611d80565b610df4610dd2602083015167ffffffffffffffff1690565b67ffffffffffffffff610dea600460243501806118ad565b929050161461226b565b015167ffffffffffffffff1690565b67ffffffffffffffff610e1960808601866118ad565b9290501614611d1b565b8051610eef575b505051610e409067ffffffffffffffff166102b5565b610e4657005b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b1561000e57610ec26000929183926040519485809481937f0d58b1db00000000000000000000000000000000000000000000000000000000835260048301611de5565b03925af18015610ee2575b610ed357005b80610921610ee092611a79565b005b610eea611b02565b610ecd565b9091610f3173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001693611a28565b65ffffffffffff610f466064602435016121a3565b610f4e611c10565b948552306020860152166040840152610f706024803501602435600401611901565b9190853b1561000e57610e40956102b59560008094610fbe604051978896879586947f2a2d80d100000000000000000000000000000000000000000000000000000000865260048601612335565b03925af18015610fe8575b610fd5575b5091610e2a565b80610921610fe292611a79565b84610fce565b610ff0611b02565b610fc9565b908160e091031261000e5790565b503461000e576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57600490813567ffffffffffffffff811161000e576110559036908401610ff5565b73ffffffffffffffffffffffffffffffffffffffff92837f0000000000000000000000000000000000000000000000000000000000000000169261109a8433146117de565b606092600095869387966040928385019960a08601995b6110bb8c886118ad565b905081101561174b578b6110da61018b610165848f61015f908d611901565b61116257906111286110f961024361023e84610238611132978e6118ad565b6111028a611a28565b61110d8c8c01611a28565b9061029a8c61029460c061028c8961023860608601866118ad565b8961113757611873565b6110b1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8b51018b52611873565b7f01000000000000000000000000000000000000000000000000000000000000008c611191818b9e9d9e611901565b92906111c3610165877fff00000000000000000000000000000000000000000000000000000000000000968794611982565b16036113015750508a156112cd575b9061059d6112c0826112c68d9e6112b78e61129a8f8f61127d6111329c61123861023e6111fe86611a28565b9b61023861120d8a8901611a28565b946112326104c66112258561023860608e018e6118ad565b3561029460c08d01611996565b986118ad565b95611260611244611bf0565b73ffffffffffffffffffffffffffffffffffffffff909c168c52565b8a019073ffffffffffffffffffffffffffffffffffffffff169052565b87019073ffffffffffffffffffffffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff166060850152565b80938491611873565b9e611cf9565b528c611cf9565b999850808787828b946112e08f856118ad565b6112eb929150611bd9565b6112f490611c51565b9c9d9350935050506111d2565b918982849d9e9d7f0400000000000000000000000000000000000000000000000000000000000000899561133d6101658a61015f819b89611901565b160361145f57505061023e61136f9461023873eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9594610783946118ad565b60c087019061138661271061ffff6107a185611996565b888801858561139483611a28565b16036113a6575b506111329150611128565b6113b26113c791611a28565b926102946108348461023860608e018e6118ad565b853b1561000e57600061142d91611132948a5193849283927f7c317e0f0000000000000000000000000000000000000000000000000000000084528c84016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b0381838a5af18015611452575b1561139b578061092161144c92611a79565b3861139b565b61145a611b02565b61143a565b90919293507f0500000000000000000000000000000000000000000000000000000000000000826114976101658861015f8689611901565b16036115c357505061023e83610238610243946114dc60016109c16114e299610238896114d261271061ffff6107a160c06102439f01611996565b60608101906118ad565b8d6118ad565b906114ec88611a28565b6114f78a8a01611a28565b9061151a61150860808c018c6118ad565b61151488929892611873565b97611a0a565b3591843b1561000e5761113294600092838b61158d8e51978896879586947f42842e0e000000000000000000000000000000000000000000000000000000008652850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b03925af180156115b6575b6115a3575b50611128565b806109216115b092611a79565b3861159d565b6115be611b02565b611598565b6101659193509361015f7f0600000000000000000000000000000000000000000000000000000000000000956115f894611901565b16036116e55761162661024361024361023e8f61023886916114dc6127108f6107a160c061ffff9201611996565b9061163088611a28565b9161163c8a8a01611a28565b9061164d61150860808c018c6118ad565b35916116608461023860608e018e6118ad565b3591803b1561000e576111329560008b61158d82968f51988997889687957ff242432a0000000000000000000000000000000000000000000000000000000087528601929060c0949273ffffffffffffffffffffffffffffffffffffffff80921685521660208401526040830152606082015260a06080820152600060a08201520190565b610c9e8587519182917f08c379a0000000000000000000000000000000000000000000000000000000008352820160609060208152601560208201527f494e56414c49445f5452414e534645525f54595045000000000000000000000060408201520190565b84868b858c61176a8761176160808f018f6118ad565b91905014611d1b565b61177683518214611d80565b61177c57005b7f000000000000000000000000000000000000000000000000000000000000000016803b1561000e57610ec29360008094518096819582947f0d58b1db0000000000000000000000000000000000000000000000000000000084528301611de5565b156117e557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f494e56414c49445f43414c4c45520000000000000000000000000000000000006044820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146118a1570190565b6118a9611843565b0190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e57602001918160051b3603831361000e57565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e5760200191813603831361000e57565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9082101561198e570190565b6118a9611952565b3561ffff8116810361000e5790565b156119ac57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f46494c4c5f50455243454e540000000000000000000000006044820152fd5b9190811015611a1b575b60051b0190565b611a23611952565b611a14565b3573ffffffffffffffffffffffffffffffffffffffff8116810361000e5790565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff8111611a8d57604052565b611a95611a49565b604052565b6040810190811067ffffffffffffffff821117611a8d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117611a8d57604052565b600091031261000e57565b506040513d6000823e3d90fd5b15611b1657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f494e56414c49445f4552433732315f414d4f554e5400000000000000000000006044820152fd5b15611b7b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f4e41544956455f544f4b454e5f41444452455353000000006044820152fd5b91908203918211611be657565b611bee611843565b565b604051906080820182811067ffffffffffffffff821117611a8d57604052565b604051906060820182811067ffffffffffffffff821117611a8d57604052565b60209067ffffffffffffffff8111611c495760051b0190565b611a23611a49565b90611c5b82611c30565b604090611c6a82519182611ab6565b8381527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611c988295611c30565b019160005b838110611caa5750505050565b60209082516080810181811067ffffffffffffffff821117611cec575b8452600081528260008183015260008583015260006060830152828601015201611c9d565b611cf4611a49565b611cc7565b6020918151811015611d0e575b60051b010190565b611d16611952565b611d06565b15611d2257565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f494e56414c49445f4e46545f4944535f4c454e475448000000000000000000006044820152fd5b15611d8757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f42415443485f5045524d4954325f4c454e475448000000006044820152fd5b60208082019080835283518092528060408094019401926000905b838210611e0f57505050505090565b8451805173ffffffffffffffffffffffffffffffffffffffff90811688528185015181168886015281830151811688840152606091820151169087015260809095019493820193600190910190611e00565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff948516602484015294841660448301526064808301969096529481529293611f41939290916000918291611ed7608487611ab6565b169260405194611ee686611a9a565b8786527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488870152519082855af13d15611f66573d91611f2583611f6e565b92611f336040519485611ab6565b83523d60008785013e6120bf565b80519081611f4e57505050565b82611bee93611f61938301019101611fb7565b611fcf565b6060916120bf565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff8111611faa575b01160190565b611fb2611a49565b611fa4565b9081602091031261000e5751801515810361000e5790565b15611fd657565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b1561206157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b919290156120e257508151156120d3575090565b6120df903b151561205a565b90565b8251909150156120f55750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110612172575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201612131565b60019067ffffffffffffffff8091169081146118a1570190565b3565ffffffffffff8116810361000e5790565b90916121cf928110156121d3575b60051b810190611901565b9091565b6121db611952565b6121c4565b156121e757565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f494e56414c49445f4e554d4245525f4f465f544f4b454e535f544f5f4150505260448201527f4f564500000000000000000000000000000000000000000000000000000000006064820152fd5b1561227257565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f494e56414c49445f4e554d4245525f4f465f5045524d49545f5349474e41545560448201527f52455300000000000000000000000000000000000000000000000000000000006064820152fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9493919492909273ffffffffffffffffffffffffffffffffffffffff80941681526060602090808284015260c08301885196828086015287518092528360e086019801926000915b8383106123ca575050505050866123b66040926120df98990151608085019073ffffffffffffffffffffffffffffffffffffffff169052565b015160a082015260408185039101526122f6565b8451805182168b52808701518216878c015260408082015165ffffffffffff908116918d019190915290830151168a8301526080909901989385019360019092019161237d565b92919261241d82611f6e565b9161242b6040519384611ab6565b82948184528183011161000e578281602093846000960137010152565b9081602091031261000e575190565b926124689061246d92953691612411565b6128ae565b9491939073ffffffffffffffffffffffffffffffffffffffff809316927f0000000000000000000000000000000000000000000000000000000000000000168314600014612726577f000000000000000000000000000000000000000000000000000000000000000060890361262f576040517f2d0335ab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015291602083602481875afa928315612622575b6000936125f2575b50833b1561000e576040517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604481019290925260648201939093526001608482015260ff90941660a485015260c484019290925260e4830152600090829081838161010481015b03925af180156125e5575b6125d85750565b80610921611bee92611a79565b6125ed611b02565b6125d1565b61261491935060203d811161261b575b61260c8183611ab6565b810190612448565b9138612539565b503d612602565b61262a611b02565b612531565b6040517f7ecebe0000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015291602083602481875afa928315612622576000936125f25750833b1561000e576040517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604481019290925260648201939093526001608482015260ff90941660a485015260c484019290925260e48301526000908290818381610104810103925af180156125e5576125d85750565b8295939194953b1561000e576040517fd505accf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90951660048601523060248601527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6044860152606485019190915260ff909216608484015260a483019390935260c482015290600090829081838160e481016125c6565b60ff601b9116019060ff8211611be657565b156127eb57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964207369672076616c75652053000000000000000000000000006044820152fd5b1561285057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964207369672076616c75652056000000000000000000000000006044820152fd5b90604182510361293a5760208201519060ff604160408501519401511691601b831061292a575b6129017f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156127e4565b61291a60ff8416601b811490811561291f575b50612849565b929190565b601c91501438612914565b91612934906127d2565b916128d5565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e67746800000000000000006044820152fd5b9061ffff1661271091828210156129c9578181029181830414901517156129bd570490565b6129c5611843565b0490565b91505090565b73ffffffffffffffffffffffffffffffffffffffff908181116129f0571690565b60046040517fc4bd89a9000000000000000000000000000000000000000000000000000000008152fdfea26469706673582212201e1e83105420998e08c8a026f669933e438765b218fbb7dd2da997ee6da4e32c64736f6c63430008110033000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba30000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Deployed Bytecode
0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806301ffc9a714610197578063150b7a021461018e578063173260eb1461018557806328b2a7961461017c5780632b7280ae146101735780633644e5151461016a578063416e6d5e14610161578063460dd949146101585780637c317e0f1461014f5780637eea39f21461014657806387528f131461013d578063a5cdc8fc14610134578063af2ad5101461012b578063bc197c8114610122578063bfab1fc614610119578063c7977be714610110578063ec98377614610107578063f23a6e61146100fe5763f80b26e30361000e576100f9611481565b61000e565b506100f961127c565b506100f96111bb565b506100f9611181565b506100f961107a565b506100f9610fb5565b506100f9610ebb565b506100f9610dc2565b506100f9610cf7565b506100f9610c74565b506100f9610c01565b506100f9610b2f565b506100f9610a8e565b506100f9610a54565b506100f9610a12565b506100f96107bb565b506100f961053e565b506100f9610461565b506100f96101cf565b7fffffffff000000000000000000000000000000000000000000000000000000008116036101ca57565b600080fd5b50346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760207fffffffff0000000000000000000000000000000000000000000000000000000060043561022e816101a0565b167f4e2312e0000000000000000000000000000000000000000000000000000000008114908115610265575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861025a565b73ffffffffffffffffffffffffffffffffffffffff8116036101ca57565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6080810190811067ffffffffffffffff8211176102f957604052565b6103016102ad565b604052565b67ffffffffffffffff81116102f957604052565b6040810190811067ffffffffffffffff8211176102f957604052565b610160810190811067ffffffffffffffff8211176102f957604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102f957604052565b6040519060e0820182811067ffffffffffffffff8211176102f957604052565b604051906103c18261031a565b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff81116103ff575b01160190565b6104076102ad565b6103f9565b929192610418826103c3565b916104266040519384610353565b8294818452818301116101ca578281602093846000960137010152565b9080601f830112156101ca5781602061045e9335910161040c565b90565b50346101ca5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5761049c60043561028f565b6104a760243561028f565b60643567ffffffffffffffff81116101ca576104c7903690600401610443565b5060206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b90816101e09103126101ca5790565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5c60409101126101ca5760a490565b908160409103126101ca5790565b5060807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5767ffffffffffffffff600480358281116101ca5761058a90369083016104f2565b916024358181116101ca576105a29036908401610530565b926044358281116101ca576105ba9036908501610530565b916064359081116101ca576105d29036908501610530565b926105db6119ea565b60208401946105e9866116e1565b6105f33686611410565b916105fe9285613b93565b61060883806116f6565b61061191611b4b565b61061a9061174a565b7f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be73ffffffffffffffffffffffffffffffffffffffff169061065b836117bb565b61066860e08501856116f6565b9790916106796101208701876116f6565b906106886101608901896116f6565b9190926101a08a0161069a908b6117c5565b9590966106a6906116e1565b976106af610394565b9e8f926106d290849073ffffffffffffffffffffffffffffffffffffffff169052565b33602084015236906106e392611816565b906040015236906106f392610f4c565b60608c0152369061070392610f4c565b60808a015236906107139261040c565b60a088015261ffff1660c0870152813b156101ca5761077d9561076792600092836040518096819582947feb8d211600000000000000000000000000000000000000000000000000000000845283016119cc565b03925af180156107a0575b610787575b50612cab565b6100196001600055565b8061079461079a92610306565b8061086f565b38610777565b6107a86119dd565b610772565b908160809103126101ca5790565b5060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600467ffffffffffffffff81358181116101ca5761080790369084016104f2565b906024358181116101ca5761081f9036908501610530565b6044358281116101ca5761083690369086016107ad565b906064358381116101ca5761084e9036908701610530565b926084359081116101ca576100199561086991369101610530565b9361206c565b60009103126101ca57565b60405160208101907f4a616d4f7264657228616464726573732074616b65722c61646472657373207282527f656365697665722c75696e74323536206578706972792c75696e74323536206e60408201527f6f6e63652c61646472657373206578656375746f722c75696e743136206d696e60608201527f46696c6c50657263656e742c6279746573333220686f6f6b73486173682c616460808201527f64726573735b5d2073656c6c546f6b656e732c616464726573735b5d2062757960a08201527f546f6b656e732c75696e743235365b5d2073656c6c416d6f756e74732c75696e60c08201527f743235365b5d20627579416d6f756e74732c75696e743235365b5d2073656c6c60e08201527f4e46544964732c75696e743235365b5d206275794e46544964732c62797465736101008201527f2073656c6c546f6b656e5472616e73666572732c627974657320627579546f6b6101208201527f656e5472616e736665727329000000000000000000000000000000000000000061014082015261012c8152610a0c81610336565b51902090565b50346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576020610a4c61087a565b604051908152f35b50346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576020610a4c612e4f565b50346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be168152f35b9181601f840112156101ca5782359167ffffffffffffffff83116101ca576020808501948460051b0101116101ca57565b5060c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600467ffffffffffffffff81358181116101ca57610b7b9036908401610afe565b90916024358181116101ca57610b949036908601610afe565b906044358381116101ca57610bac9036908801610afe565b906064358581116101ca57610bc49036908a01610afe565b9490936084358781116101ca57610bde9036908c01610afe565b98909760a4359081116101ca576100199b610bfb913691016107ad565b996121fe565b50346101ca5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600435610c3d8161028f565b610c716000808080809573ffffffffffffffffffffffffffffffffffffffff60243591165af1610c6b614593565b506145c3565b80f35b50346101ca5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576020600160ff600435610cb68161028f565b73ffffffffffffffffffffffffffffffffffffffff60243591166000526002845260406000208160081c6000528452161b6040600020541615604051908152f35b5060c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5767ffffffffffffffff6004358181116101ca57610d439036906004016104f2565b906024358181116101ca57610d5c903690600401610530565b906044358181116101ca57610d75903690600401610afe565b916064359081116101ca57610d8e903690600401610530565b9260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c3601126101ca57610019946114db565b50346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576004358015610e5d57600160ff8260081c92161b610e303373ffffffffffffffffffffffffffffffffffffffff166000526002602052604060002090565b9160009281845280602052604084205491610e4f848085161415613d2d565b845260205217604082205580f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f5a45524f5f4e4f4e4345000000000000000000000000000000000000000000006044820152fd5b50346101ca5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600435610ef78161028f565b6044359067ffffffffffffffff82116101ca57610f1b610019923690600401610530565b9060243590613566565b60209067ffffffffffffffff8111610f3f575b60051b0190565b610f476102ad565b610f38565b9291610f5782610f25565b91610f656040519384610353565b829481845260208094019160051b81019283116101ca57905b828210610f8b5750505050565b81358152908301908301610f7e565b9080601f830112156101ca5781602061045e93359101610f4c565b50346101ca5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57610ff060043561028f565b610ffb60243561028f565b67ffffffffffffffff6044358181116101ca5761101c903690600401610f9a565b506064358181116101ca57611035903690600401610f9a565b506084359081116101ca5761104e903690600401610443565b506040517fbc197c81000000000000000000000000000000000000000000000000000000008152602090f35b50346101ca5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760043567ffffffffffffffff81116101ca57610a4c6110cf60209236906004016104f2565b60243590613148565b60405160208101907f454950373132446f6d61696e28737472696e67206e616d652c737472696e672082527f76657273696f6e2c75696e7432353620636861696e49642c616464726573732060408201527f766572696679696e67436f6e74726163742900000000000000000000000000006060820152605281526080810181811067ffffffffffffffff821117611174575b60405251902090565b61117c6102ad565b61116b565b50346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576020610a4c6110d8565b5060e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600467ffffffffffffffff81358181116101ca5761120790369084016104f2565b906024358181116101ca5761121f9036908501610530565b906044358181116101ca5761123790369086016107ad565b906064358181116101ca5761124f9036908701610afe565b9290916084359081116101ca576100199661126c91369101610530565b9361127636610501565b95611c43565b50346101ca5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576112b760043561028f565b6112c260243561028f565b60843567ffffffffffffffff81116101ca576112e2903690600401610443565b5060206040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b801515036101ca57565b9080601f830112156101ca57813561132e81610f25565b9260409161133e83519586610353565b808552602093848087019260051b840101938185116101ca57858401925b85841061136d575050505050505090565b67ffffffffffffffff84358181116101ca578601916080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085880301126101ca578451906113bb826102dd565b8a8501356113c88161130d565b8252858501356113d78161028f565b8b83015260609081860135878401528501359384116101ca57611401878c80979681970101610443565b9082015281520193019261135c565b9190916040818403126101ca57604080519167ffffffffffffffff91830182811184821017611474575b604052829481358381116101ca5781611454918401611317565b845260208201359283116101ca5760209261146f9201611317565b910152565b61147c6102ad565b61143a565b50346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760043567ffffffffffffffff81116101ca57610a4c6114d66020923690600401611410565b612fe0565b92909391936114e86119ea565b6114f06116d5565b6114fa3685611410565b916115059286613b93565b61150f82806116f6565b61151891611b4b565b6115219061174a565b7f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be73ffffffffffffffffffffffffffffffffffffffff1693611562846117bb565b61156a6117af565b61157760e08701876116f6565b906115866101208901896116f6565b906115956101608b018b6116f6565b9190926101a08c016115a7908d6117c5565b9590966115b26116d5565b986115bb610394565b73ffffffffffffffffffffffffffffffffffffffff909b168b5273ffffffffffffffffffffffffffffffffffffffff1660208b015236906115fb92611816565b6040890152369061160b92610f4c565b6060870152369061161b92610f4c565b6080850152369061162b9261040c565b60a083015261ffff1660c0820152853b156101ca57600061168061169f9782936040519485809481937feb8d2116000000000000000000000000000000000000000000000000000000008352600483016119cc565b03925af180156116bc575b6116a9575b506116996116d5565b93612b1d565b6103c16001600055565b806107946116b692610306565b38611690565b6116c46119dd565b61168b565b61ffff8116036101ca57565b60a43561045e816116c9565b3561045e816116c9565b61045e903690611410565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156101ca570180359067ffffffffffffffff82116101ca57602001918160051b360383136101ca57565b1561175157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4245464f52455f534554544c455f484f4f4b535f4641494c45440000000000006044820152fd5b60843561045e8161028f565b3561045e8161028f565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156101ca570180359067ffffffffffffffff82116101ca576020019181360383136101ca57565b929161182182610f25565b9161182f6040519384610353565b829481845260208094019160051b81019283116101ca57905b8282106118555750505050565b83809183356118638161028f565b815201910190611848565b90815180825260208080930193019160005b82811061188e575050505090565b835185529381019392810192600101611880565b60005b8381106118b55750506000910152565b81810151838201526020016118a5565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611901815180928187528780880191016118a2565b0116010190565b9060e0810173ffffffffffffffffffffffffffffffffffffffff8084511683526020918183860151168385015260408501519260e0604086015283518092528061010086019401926000905b8382106119b35750505050509060c0806119a761199561198361045e966060890151878203606089015261186e565b6080880151868203608088015261186e565b60a087015185820360a08701526118c5565b94015161ffff16910152565b8451811686529482019493820193600190910190611954565b90602061045e928181520190611908565b506040513d6000823e3d90fd5b6002600054146119fb576002600055565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611ab7570190565b611abf611a59565b0190565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015611b34575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81813603018212156101ca570190565b611b3c611ac3565b611afd565b3561045e8161130d565b60009173ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be16935b828110611b99575050505050600190565b6020858382611ba985888a611af3565b0135611bb48161028f565b16146101ca576000809184611bca85888a611af3565b91820135611bd78161028f565b611be460608401846117c5565b9290604090848251958692833781018781520394013591165af1611c06614593565b501580611c2a575b611c2057611c1b90611a89565b611b88565b5050505050600090565b50611c3e611c39828587611af3565b611b41565b611c0e565b9493929190611c506119ea565b611c5c602088016116e1565b611c663687611410565b91611c719288613b93565b611c7b84806116f6565b611c8491611b4b565b611c8d9061174a565b611c96856117bb565b90611ca0876117bb565b87611cae60e08901896116f6565b90611cbd6101208b018b6116f6565b90611ccc6101608d018d6116f6565b9290938d6101a08101611cde916117c5565b969097602001611ced906116e1565b98611cf6610394565b73ffffffffffffffffffffffffffffffffffffffff909c168c5273ffffffffffffffffffffffffffffffffffffffff1660208c01523690611d3692611816565b60408a01523690611d4692610f4c565b60608801523690611d5692610f4c565b60808601523690611d669261040c565b60a084015261ffff1660c08301527f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be73ffffffffffffffffffffffffffffffffffffffff1696873b156101ca57611df9600060209361169f9a61169996836040518096819582947f8c575a9f00000000000000000000000000000000000000000000000000000000845260048401611f6a565b03925af18015611e23575b611e10575b50016116e1565b80610794611e1d92610306565b38611e09565b611e2b6119dd565b611e04565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156101ca57016020813591019167ffffffffffffffff82116101ca578160051b360383136101ca57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156101ca57016020813591019167ffffffffffffffff82116101ca5781360383136101ca57565b359065ffffffffffff821682036101ca57565b91908082526020809201929160005b828110611f42575050505090565b90919293828060019265ffffffffffff611f5b89611f12565b16815201950193929101611f34565b90611f7d90604083526040830190611908565b818103602092830152906080820190611f968480611e30565b809193608086525260a084019060a08160051b8601019380926000915b83831061201957505050505061200c6060612005611fea61045e969585611fdd85978b018b611ec2565b91898403908a0152611e83565b611ff76040890189611e30565b908783036040890152611f25565b9501611f12565b65ffffffffffff16910152565b9091929395858061205d837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608c600196030187526120578b87611ec2565b90611e83565b98019301930191939290611fb3565b90939291936120796119ea565b6020840190612087826116e1565b6120913686611410565b9161209c9285613b93565b6120a683806116f6565b6120af91611b4b565b6120b89061174a565b7f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be73ffffffffffffffffffffffffffffffffffffffff16906120f9836117bb565b9061210760e08501856116f6565b91906121176101208701876116f6565b906121266101608901896116f6565b9190926101a08a01612138908b6117c5565b959096612144906116e1565b9761214d610394565b73ffffffffffffffffffffffffffffffffffffffff909a168a523360208b0152369061217892611816565b6040890152369061218892610f4c565b6060870152369061219892610f4c565b608085015236906121a89261040c565b60a083015261ffff1660c0820152813b156101ca5761169f9561076792600092836040518096819582947f8c575a9f00000000000000000000000000000000000000000000000000000000845260048401611f6a565b989a99979491908961223a8a858f9761224296869c999d9a9d61221f6119ea565b8c61222d60408701876116f6565b97909660208101906116f6565b99909861422b565b61224f60208801886116f6565b969050600089815b8d898210612417575050505050506122779161227291611b4b565b6128cc565b60005b8281106122935750505050505090506103c16001600055565b8060606122a1818801611b41565b156123ef57866122ca6122c36122b885898d61287e565b6101408101906116f6565b3691610f4c565b87878b6122d887838361287e565b61010081016122e6916116f6565b6122f489858598949861287e565b6101808101612302916116f6565b9290918a61231181888861287e565b6101c0810161231f916117c5565b9761232b92919761287e565b602001612337906117bb565b96156000149b612354996123949d6123c9575050612710976146f2565b818a80612399575b5061236890868a61287e565b01357f7a70845dec8dc098eecb16e760b0c1569874487f0459ae689c738e281b28ed38600080a2611a89565b61227a565b6123b76123ad6123c2936123bd9389612818565b60208101906116f6565b90611b4b565b612989565b818a61235c565b6123e9916123de8260206123e49401906116f6565b90612866565b6116e1565b976146f2565b8661241261240a61240360208401846116f6565b3691612931565b878b86615662565b6122ca565b8082916127f2575b508b9061242f60408301836116f6565b9050151591826127d4575b5050156126515761248b612486828b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be169561287e565b6117bb565b918c8b8d612498816117bb565b928d6124b26124a888838561287e565b60e08101906116f6565b906124cc6124c18a858761287e565b6101208101906116f6565b9190928a6125036124f8826124f06124e5828b8d61287e565b6101608101906116f6565b99909a61287e565b6101a08101906117c5565b98909915600014612636575050612710985b61251d610394565b73ffffffffffffffffffffffffffffffffffffffff909d168d5273ffffffffffffffffffffffffffffffffffffffff1660208d0152369061255d92611816565b60408b0152369061256d92610f4c565b6060890152369061257d92610f4c565b6080870152369061258d9261040c565b60a085015261ffff1660c08401526125a484611a89565b936125b0908787611af3565b92813b156101ca5761260f936125f992600092836040518096819582947f8c575a9f00000000000000000000000000000000000000000000000000000000845260048401611f6a565b03925af18015612629575b612616575b50611a89565b8a90612257565b8061079461262392610306565b38612609565b6126316119dd565b612604565b61264b916123de8260206123e49401906116f6565b98612515565b612696612486828b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be169561287e565b8c8b8d6126a2816117bb565b928d6126b26124a888838561287e565b906126c16124c18a858761287e565b9190928a6126da6124f8826124f06124e5828b8d61287e565b989099156000146127b9575050612710985b6126f4610394565b73ffffffffffffffffffffffffffffffffffffffff909b168b5273ffffffffffffffffffffffffffffffffffffffff1660208b0152369061273492611816565b6040890152369061274492610f4c565b6060870152369061275492610f4c565b608085015236906127649261040c565b60a083015261ffff1660c0820152823b156101ca5760006125f961260f9482936040519485809481937feb8d2116000000000000000000000000000000000000000000000000000000008352600483016119cc565b6127ce916123de8260206123e49401906116f6565b986126ec565b6127eb9250906123de826040611c399401906116f6565b818c61243a565b6123b76128066128119361280c938d612818565b806116f6565b61174a565b808e61241f565b9190811015612859575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1813603018212156101ca570190565b612861611ac3565b612822565b91908110156128765760051b0190565b610f47611ac3565b91908110156128bf575b60051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe21813603018212156101ca570190565b6128c7611ac3565b612888565b156128d357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e544552414354494f4e535f4641494c4544000000000000000000000000006044820152fd5b929161293c82610f25565b9161294a6040519384610353565b829481845260208094019160051b81019283116101ca57905b8282106129705750505050565b838091833561297e816116c9565b815201910190612963565b1561299057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41465445525f534554544c455f484f4f4b535f4641494c4544000000000000006044820152fd5b156129f557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4455504c49434154455f544f4b454e53000000000000000000000000000000006044820152fd5b15612a5a57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f41465445525f534554544c455f484f4f4b535f524551554952454400000000006044820152fd5b15612abf57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f504f54454e5449414c5f544f4b454e535f4c4f535300000000000000000000006044820152fd5b93612b3161227261248694612b7e94611b4b565b612b9a610100860191612b4483886116f6565b959091886020612b586101408301836116f6565b92909561018082019a612b6b8c846116f6565b929091612b946101c086019d8e876117c5565b979096019a612b8c8c6117bb565b983691610f4c565b91614d7c565b73ffffffffffffffffffffffffffffffffffffffff163014612bfa575b50505090612bd16123bd6123b784602060609601906116f6565b01357f7a70845dec8dc098eecb16e760b0c1569874487f0459ae689c738e281b28ed38600080a2565b612c21612c3b93612c2a612c3694612c18612c32958a9b999b6116f6565b9490938a6116f6565b9290918a6117c5565b949093615a71565b1590565b6129ee565b6020830190612c56612c4d83866116f6565b90501515612a53565b60005b612c6383866116f6565b9050811015612c995780612c8f612c8a611c39612c9494612c84888b6116f6565b90611af3565b612ab8565b611a89565b612c59565b50929050612bd16123bd6123b7612bb7565b90612cb683806116f6565b612cc46101408501856116f6565b91612cce93613e3e565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fe96910cf84318d1b8a5e2a6962774711467c0be1694612d12602086016117bb565b92612d216101008701876116f6565b939091612d326101808901896116f6565b9190926101c08a01612d44908b6117c5565b959096602001612d53906116e1565b97612d5c610394565b3381529973ffffffffffffffffffffffffffffffffffffffff1660208b01523690612d8692611816565b60408901523690612d9692610f4c565b60608701523690612da692610f4c565b60808501523690612db69261040c565b60a083015261ffff1660c0820152833b156101ca576123b7612bd192600080612e146060986123bd966040519485809481937feb8d2116000000000000000000000000000000000000000000000000000000008352600483016119cc565b03925af18015612e42575b612e2f575b5060208101906116f6565b80610794612e3c92610306565b38612e24565b612e4a6119dd565b612e1f565b467f000000000000000000000000000000000000000000000000000000000000000103612e9a577f1131508dd63d6df5c732341da8d2f2c65a4f3e48588770496e3abaa206718b0090565b612ea26110d8565b604051602081019182527f05fca2bf864448463a9141ae37fa0b2158f24d3135772bc23bc081c1765a8c2c60408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176111745760405251902090565b908082519081815260208091019281808460051b8301019501936000915b848310612f565750505050505090565b9091929394958480612fd0837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086600196030187528a5180511515825273ffffffffffffffffffffffffffffffffffffffff84820151168483015260408082015190830152606080910151916080809282015201906118c5565b9801930193019194939290612f46565b602081018051511580613080575b61307957610a0c61304d9160405192839161301c602084019660208852516040808601526080850190612f28565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0848303016060850152612f28565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610353565b5050600090565b5081515115612fee565b9060005b81811061309b5750505090565b90919260019073ffffffffffffffffffffffffffffffffffffffff85356130c18161028f565b1681526020908101940192910161308e565b91907f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116101ca5760051b809282370190565b60206103c191939293604051948161312887935180928680870191016118a2565b820161313c825180938680850191016118a2565b01038085520183610353565b90610a0c6131f4926133d961315b61087a565b91613165816117bb565b9260209687966131768885016117bb565b613182608086016117bb565b61318e60a087016116e1565b604080519c8d0196875273ffffffffffffffffffffffffffffffffffffffff998a16602088015292891686840152868301356060878101919091528701356080870152971660a085015261ffff90961660c084015260e083015293969384916101000190565b03926132267fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe094858101835282610353565b6133d4866133c88961325f61325361324160e08901896116f6565b9290845192839188830195869161308a565b038b8101835282610353565b519020956132956132896132776101008401846116f6565b9290855192839189830195869161308a565b038c8101835282610353565b5190206132ca6132be6132ac6101208501856116f6565b929086519283918a83019586916130d3565b038d8101835282610353565b5190208a6132f46133006132e26101408701876116f6565b939088519384918c83019687916130d3565b03908101835282610353565b5190208b6132f461332a6133186101608801886116f6565b939089519384918d83019687916130d3565b519020916133568d6133406101808801886116f6565b9290918b6132f48b5194859283019687916130d3565b5190209361338a6133716133786133716101a08a018a6117c5565b369161040c565b8b8151910120976101c08101906117c5565b8051908a012096519889019b8c5260208c015260408b015260608a0152608089015260a088015260c087015260e08601529093849161010090910190565b03858101845283610353565b613107565b838151910120926132f46133eb612e4f565b95519485928301968790916042927f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201520190565b6004111561343457565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b3560048110156101ca5790565b1561347757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f496e76616c6964207369676e65720000000000000000000000000000000000006044820152fd5b908160209103126101ca575161045e816101a0565b60409061045e949281528160208201520191611e83565b1561350857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f496e76616c69642045495031323731206f72646572207369676e6174757265006044820152fd5b91600161357282613463565b61357b8161342a565b03613673576135c66020926135a061359b613371858760009701906117c5565b615e2e565b6040805194855260ff909116602085015283019190915260608201529081906080820190565b838052039060015afa15613666575b73ffffffffffffffffffffffffffffffffffffffff8060005116916135fb831515613470565b160361360357565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f496e76616c696420454950373132206f72646572207369676e617475726500006044820152606490fd5b0390fd5b61366e6119dd565b6135d5565b600261367e82613463565b6136878161342a565b036137695761371160206103c1946136c384837fffffffff000000000000000000000000000000000000000000000000000000009601906117c5565b919073ffffffffffffffffffffffffffffffffffffffff6040518096819582947f1626ba7e000000000000000000000000000000000000000000000000000000009b8c8552600485016134ea565b0392165afa90811561375c575b60009161372e575b501614613501565b61374f915060203d8111613755575b6137478183610353565b8101906134d5565b38613726565b503d61373d565b6137646119dd565b61371e565b90600361377583613463565b61377e8161342a565b03613871576020906137cb60009384927f19457468657265756d205369676e6564204d6573736167653a0a3332000000008452601c526135a061359b613371603c862093878101906117c5565b838052039060015afa15613864575b73ffffffffffffffffffffffffffffffffffffffff80915116916137ff831515613470565b16146103c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f496e76616c69642045544853494748206f72646572207369676e6174757265006044820152606490fd5b61386c6119dd565b6137da565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964205369676e61747572652054797065000000000000000000006044820152606490fd5b156138d757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f494e56414c49445f4558454355544f52000000000000000000000000000000006044820152fd5b1561393c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f494e56414c49445f4255595f544f4b454e535f4c454e475448000000000000006044820152fd5b156139a157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f4255595f5452414e53464552535f4c454e475448000000006044820152fd5b15613a0657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f494e56414c49445f53454c4c5f544f4b454e535f4c454e4754480000000000006044820152fd5b15613a6b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e56414c49445f53454c4c5f5452414e53464552535f4c454e4754480000006044820152fd5b15613ad057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f46494c4c5f50455243454e540000000000000000000000006044820152fd5b15613b3557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4f524445525f45585049524544000000000000000000000000000000000000006044820152fd5b9192613c076103c194613cc293613ba9866117bb565b9173ffffffffffffffffffffffffffffffffffffffff928333911603613d03575b5050608085019033613bf7613bde846117bb565b73ffffffffffffffffffffffffffffffffffffffff1690565b14918215613cef575b50506138d0565b613c57613c3e6101008501613c38613c1f82886116f6565b9050613c2f6101408901896116f6565b91905014613935565b856116f6565b9050613c4e6101c08601866117c5565b9190501461399a565b613ca0613c8760e08501613c38613c6e82886116f6565b9050613c7e6101208901896116f6565b919050146139ff565b9050613c976101a08601866117c5565b91905014613a64565b61ffff613cb9613cb260a086016116e1565b61ffff1690565b91161015613ac9565b613ce8613cce826117bb565b9160408101359260606402540be3ff851492013590613d92565b4210613b2e565b613cfa9192506117bb565b16153880613c00565b613d18613d12613d2693612fe0565b88613148565b613d21886117bb565b613566565b3880613bca565b15613d3457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f494e56414c49445f4e4f4e4345000000000000000000000000000000000000006044820152fd5b908015610e5d57613e1491600160ff8360081c93161b93600090600014613e175750613dde9073ffffffffffffffffffffffffffffffffffffffff166000526002602052604060002090565b925b613df4828590600052602052604060002090565b54613e03828083161415613d2d565b179290600052602052604060002090565b55565b73ffffffffffffffffffffffffffffffffffffffff60409216815260016020522092613de0565b91939290938415613f4857818503613eea5760005b858110613e61575050509190565b613e6c818786612866565b35613e78828585612866565b3511613e8c57613e8790611a89565b613e53565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f494e56414c49445f494e435245415345445f414d4f554e5453000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f494e56414c49445f494e435245415345445f414d4f554e54535f4c454e4754486044820152fd5b9350919050565b15613f5657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f494e56414c49445f5349474e4154555245535f4c454e475448000000000000006044820152fd5b15613fbb57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f494e56414c49445f54414b4552535f5045524d4954535f55534147455f4c454e60448201527f47544800000000000000000000000000000000000000000000000000000000006064820152fd5b1561404657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f484f4f4b535f4c454e4754480000000000000000000000006044820152fd5b156140ab57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f46494c4c5f50455243454e54535f4c454e475448000000006044820152fd5b1561411057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f494e56414c49445f52454345495645525f464f525f42415443485f534554544c60448201527f45000000000000000000000000000000000000000000000000000000000000006064820152fd5b6040516020810181811067ffffffffffffffff8211176141b9575b6040526000815290565b6141c16102ad565b6141af565b156141cd57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e56414c49445f54414b4552535f5045524d4954535f4c454e4754480000006044820152fd5b9899859b9a9894919597969881159361424787159a8914613f4f565b86881480156143b3575b61425a90613fb4565b85881480156143ab575b61426d9061403f565b82881480156143a4575b614283909a989a6140a4565b60009b8c9815985b8b81106142aa575050505050505050505050506103c1929350146141c6565b8f88614328916143188f8590816142e8816020936142e28c6142db613bde886142d58787309661287e565b016117bb565b1415614109565b8b61287e565b95806143895750506142f8614194565b90614301614194565b9061430a6103b4565b928352820152925b8b612818565b908a156143755761271092613b93565b8a8a828b8261435e575b50509050614349575b61434490611a89565b61428b565b9c61435661434491611a89565b9d905061433b565b611c39925061436c93612866565b8b90828b614332565b6143836123e4868b8b612866565b92613b93565b61439e925090614399918b612818565b6116eb565b92614312565b5084614277565b508515614264565b5089614251565b908210156143c6570190565b611abf611ac3565b908160209103126101ca575190565b60209181518110156143f2575b60051b010190565b6143fa611ac3565b6143ea565b1561440657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f494e56414c49445f4f55545055545f455243313135355f42414c414e434500006044820152fd5b1561446b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f4f55545055545f4552433732315f414d4f554e54000000006044820152fd5b156144d057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f4e41544956455f544f4b454e0000000000000000000000006044820152fd5b1561453557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f494e56414c49445f4f55545055545f4e41544956455f42414c414e43450000006044820152fd5b3d156145be573d906145a4826103c3565b916145b26040519384610353565b82523d6000602084013e565b606090565b156145ca57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4641494c45445f544f5f53454e445f45544800000000000000000000000000006044820152fd5b1561462f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f4f55545055545f544f4b454e5f42414c414e4345000000006044820152fd5b1561469457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f494e56414c49445f4255595f4e46545f4944535f4c454e4754480000000000006044820152fd5b91939698979092600096875b8581106147195750505050505050506103c19293501461468d565b61477561475061472a83858c6143ba565b357fff000000000000000000000000000000000000000000000000000000000000001690565b7fff000000000000000000000000000000000000000000000000000000000000001690565b6148705780612c8f8d614795613bde613bde61248661481f978d8d612866565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260209291899186918e91908690829060249082905afa958615614863575b600096614824575b5050916147fa61480092614809946143dd565b51615f18565b80931015614628565b61481a613bde612486868d8d612866565b6152d0565b6146fe565b61480994929650926148526147fa928561480096903d1061485c575b61484a8183610353565b8101906143ce565b96929450926147e7565b503d614840565b61486b6119dd565b6147df565b8b8a837f04000000000000000000000000000000000000000000000000000000000000008b6148c561472a877fff000000000000000000000000000000000000000000000000000000000000009586946143ba565b160361498557505090877f88479153c5a43e333375e4daf2e98cddbb4cb43428c64efdab6e987c263b662061497d8961481f9561493c73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8c6149356124868a73ffffffffffffffffffffffffffffffffffffffff978894612866565b16146144c9565b61495761494e8b6147fa8947996143dd565b8096101561452e565b169261496d600080808085895af1610c6b614593565b6040519081529081906020820190565b0390a2611a89565b909a9291507f0500000000000000000000000000000000000000000000000000000000000000816149ba61472a85888f6143ba565b1603614b6e57506149cc818888612866565b6149d5906117bb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660409087838b84517f70a082310000000000000000000000000000000000000000000000000000000081528c8360209182846004998180308d820190614a61909173ffffffffffffffffffffffffffffffffffffffff6020820193169052565b03915afa968715614ac298614ab198613bde98613bde9861248698614aac95614b61575b600094614b42575b5050614a9c60019283926143dd565b51149182614b37575b5050614464565b612866565b94614abb81611a89565b9d88612866565b35843b156101ca578f9461481f95600080946125f99651968795869485937f42842e0e0000000000000000000000000000000000000000000000000000000085523090850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b101590503880614aa5565b614b59929450803d1061485c5761484a8183610353565b913880614a8d565b614b696119dd565b614a85565b81929a50614ba161472a7f060000000000000000000000000000000000000000000000000000000000000093868d6143ba565b1603614d1d57614bbb613bde613bde612486848a8a612866565b90614c35614bca8b8d87612866565b6040517efdd58e00000000000000000000000000000000000000000000000000000000815230600480830191909152913560248201529093602091908290829060449082905afa918215614d10575b600092614cf3575b5050614c2d838b6143dd565b5111156143ff565b614c49613bde613bde612486848b8b612866565b91614c5e614c568c611a89565b9b8d87612866565b3590614c6a838b6143dd565b5191843b156101ca578f9461481f95600080946125f9604051978896879586947ff242432a00000000000000000000000000000000000000000000000000000000865230908601929060c0949273ffffffffffffffffffffffffffffffffffffffff80921685521660208401526040830152606082015260a06080820152600060a08201520190565b614d099250803d1061485c5761484a8183610353565b3880614c21565b614d186119dd565b614c19565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f494e56414c49445f5452414e534645525f5459504500000000000000000000006044820152606490fd5b9091939692989798600096875b848110614da45750505050505050506103c19293501461468d565b614db561475061472a83858c6143ba565b614e925780612c8f8d614dd5613bde613bde612486614e51978c8c612866565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526020929185918d918590829060249082905afa948515614e85575b600095614e56575b5050916147fa614e3792614e3f946143dd565b821015614628565b8861481a613bde612486868c8c612866565b614d89565b614e3f9492955092614e7b6147fa9285614e3796903d1061485c5761484a8183610353565b9592945092614e24565b614e8d6119dd565b614e1c565b8b8a837f04000000000000000000000000000000000000000000000000000000000000008b614ee761472a877fff000000000000000000000000000000000000000000000000000000000000009586946143ba565b1603614f8757505090877f88479153c5a43e333375e4daf2e98cddbb4cb43428c64efdab6e987c263b662061497d88614f70614f68614e5197614f5d73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8d6149356124868c73ffffffffffffffffffffffffffffffffffffffff998a94612866565b6147fa8847986143dd565b85101561452e565b8a169261496d600080808085895af1610c6b614593565b909a9291507f050000000000000000000000000000000000000000000000000000000000000081614fbc61472a85888f6143ba565b16036150ed5750614fd7613bde613bde612486848a8a612866565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004808301919091529261503b916020918290829060249082905afa9182156150e0575b6000926150c3575b506001905080614a9c878f6143dd565b615052614ab1613bde613bde612486878d8d612866565b35843b156101ca5790517f42842e0e0000000000000000000000000000000000000000000000000000000081523092810192835273ffffffffffffffffffffffffffffffffffffffff8a1660208401526040830191909152614e5193909160009183918290849082906060016125f9565b6150d99250803d1061485c5761484a8183610353565b388061502b565b6150e86119dd565b615023565b819a5061511f61472a7f060000000000000000000000000000000000000000000000000000000000000093868d6143ba565b1603614d1d57886151328b9a8787612866565b61513b906117bb565b73ffffffffffffffffffffffffffffffffffffffff1661515c838c87612866565b604080517efdd58e000000000000000000000000000000000000000000000000000000008152306004808301919091529235602482015291946020939192909185918b918b918f918890829060449082905afa9788156152c3575b600098615280575b5050612486846151e994613bde94614aac6151e06151fa99613bde976143dd565b518c10156143ff565b916151f381611a89565b9e89612866565b3590803b156101ca578a6000614e51976125f9829651978896879586947ff242432a00000000000000000000000000000000000000000000000000000000865230908601929060c0949273ffffffffffffffffffffffffffffffffffffffff80921685521660208401526040830152606082015260a06080820152600060a08201520190565b613bde929850946151e994613bde94614aac6151e0846152b3612486978c6151fa9d903d1061485c5761484a8183610353565b9d975099505050945094506151bf565b6152cb6119dd565b6151b7565b6153c49160008073ffffffffffffffffffffffffffffffffffffffff604051946153798661534d60209a8b8301987fa9059cbb000000000000000000000000000000000000000000000000000000008a52602484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101885287610353565b1692604051946153888661031a565b8786527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488870152519082855af16153be614593565b91615473565b8051806153d057505050565b818391810103126101ca578101516153e78161130d565b156153ef5750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b919290156154ee5750815115615487575090565b3b156154905790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156155015750805190602001fd5b613662906040519182917f08c379a00000000000000000000000000000000000000000000000000000000083526020600484015260248301906118c5565b9061554982610f25565b6155566040519182610353565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06155848294610f25565b0190602036910137565b906001820180921161559c57565b6103c1611a59565b9190820180921161559c57565b156155b857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f444946465f46494c4c5f50455243454e545f464f525f53414d455f544f4b454e6044820152fd5b8181029291811591840414171561559c57565b8115615633570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b909392919361567282868361287e565b9461568b6156846101008801886116f6565b905061553f565b93805115600014615a3157612710925b60005b6156ac6101008a018a6116f6565b9050811015615a26576156d361475061472a836156cd6101c08e018e6117c5565b906143ba565b15818a82156159c3575b50501561599c576000865b85811061588d5750898683927f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000061574b61472a876156cd6101c08901896117c5565b16146000906000146157f85750475b846101408501948561576b916116f6565b6157759291612866565b3561577f91615616565b9061578991615629565b9061579391615f3c565b61579d838b6143dd565b5280828c6157ab828d6143dd565b51926157b6916116f6565b6157c09291612866565b3511926157d3936157d8575b5050611a89565b61569e565b6123de6157e5928d6116f6565b356157f0828a6143dd565b5238816157cc565b615813613bde613bde612486886123de6101008a018a6116f6565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152906020908190839060249082905afa928315615880575b92615863575b505061575a565b6158799250803d1061485c5761484a8183610353565b388061585c565b6158886119dd565b615856565b9992959690949397919860005b6158b36158a88d888b61287e565b6101008101906116f6565b9050811015615983578b888c73ffffffffffffffffffffffffffffffffffffffff615902613bde6124866158f3612486898f6158a88b6123de928c61287e565b946123de6101008e018e6116f6565b91161461591a575b505061591590611a89565b61589a565b97615934836123de6122b861593b958c615915989e61287e565b35906155a4565b966159538d8c5115908d821561595c575b50506155b1565b90508b8861590a565b6159769250613cb29161596e916143dd565b5161ffff1690565b61ffff8c16148e8d61594c565b509891979394909695929961599790611a89565b6156e8565b806159b26157d3926123de6101408d018d6116f6565b356159bd828a6143dd565b52611a89565b7f0400000000000000000000000000000000000000000000000000000000000000925061472a7fff00000000000000000000000000000000000000000000000000000000000000926156cd836101c0615a1d9501906117c5565b1614818a6156dd565b509496505050505050565b615a3e61596e85836143dd565b9261569b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161559c57565b909395919492948415615d4657600094855b615a8c82615a44565b811015615d38578887615a9e8361558e565b848110615b6b575050615ad961475061472a848a7f0500000000000000000000000000000000000000000000000000000000000000956143ba565b1481878b8315615b0f575b505050615afa575b615af590611a89565b615a83565b95615b07615af591611a89565b969050615aec565b7f060000000000000000000000000000000000000000000000000000000000000093507fff0000000000000000000000000000000000000000000000000000000000000092615b619261472a926143ba565b161481878b615ae4565b909391507f05000000000000000000000000000000000000000000000000000000000000009992998b828a83615ba861475061472a8585886143ba565b14928315615cdc575b505050615ccc575b8a898d8973ffffffffffffffffffffffffffffffffffffffff615bf1613bde612486898b615beb6124868b838a612866565b96612866565b911614615c12575b50505050615c0690611a89565b928a9193999299615a9e565b615c23926147509261472a926143ba565b148a898d8315615c70575b505050600014615c6057615c43898487612866565b35615c4f858588612866565b3514615c6057615c068a898d615bf9565b5050505050509350505050600190565b7f060000000000000000000000000000000000000000000000000000000000000093507fff0000000000000000000000000000000000000000000000000000000000000092615cc29261472a926143ba565b16148a898d615c2e565b93615cd690611a89565b93615bb9565b7f060000000000000000000000000000000000000000000000000000000000000093507fff0000000000000000000000000000000000000000000000000000000000000092615d2e9261472a926143ba565b1614828a8e615bb1565b505050509350505050600090565b50509350505050600090565b60ff601b9116019060ff821161559c57565b15615d6b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964207369672076616c75652053000000000000000000000000006044820152fd5b15615dd057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e76616c6964207369672076616c75652056000000000000000000000000006044820152fd5b906041825103615eba5760208201519060ff604160408501519401511691601b8310615eaa575b615e817f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115615d64565b615e9a60ff8416601b8114908115615e9f575b50615dc9565b929190565b601c91501438615e94565b91615eb490615d52565b91615e55565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e67746800000000000000006044820152fd5b9061ffff166127109081811015615f3757615f339192615616565b0490565b505090565b9061ffff1661271080821015615f3757828161045e9402918183041490151761562957615f67611a59565b61562956fea2646970667358221220e43379b0f270b31f4d62cb5510ca717c9274981474b7e5943b19ab4b9589b77d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba30000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
-----Decoded View---------------
Arg [0] : _permit2 (address): 0x000000000022D473030F116dDEE9F6B43aC78BA3
Arg [1] : _daiAddress (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3
Arg [1] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Loading...
Loading
Loading...
Loading
OVERVIEW
Bebop is a crypto platform that makes trading in DeFi both easy and efficientMultichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.