Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 122275730 | 841 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
OpenPeerEscrow
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity)
/**
*Submitted for verification at Arbiscan.io on 2023-08-17
*/
// File: interfaces/IOpenPeerDeployer.sol
pragma solidity ^0.8.17;
interface IOpenPeerDeployer {
function partnerFeeBps(address _partner) external view returns (uint256);
}
// File: libs/ERC2771Context.sol
pragma solidity ^0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
/**
* @dev Context variant with ERC2771 support.
*/
abstract contract ERC2771Context is Context {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address internal _trustedForwarder;
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(address trustedForwarder) {
_trustedForwarder = trustedForwarder;
}
function isTrustedForwarder(address forwarder) public view virtual returns (bool) {
return forwarder == _trustedForwarder;
}
function _msgSender() internal view virtual override returns (address sender) {
if (isTrustedForwarder(msg.sender)) {
// The assembly code is more direct than the Solidity version using `abi.decode`.
assembly {
sender := shr(96, calldataload(sub(calldatasize(), 20)))
}
} else {
return super._msgSender();
}
}
function _msgData() internal view virtual override returns (bytes calldata) {
if (isTrustedForwarder(msg.sender)) {
return msg.data[:msg.data.length - 20];
} else {
return super._msgData();
}
}
}
// File: @openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
// 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);
}
// File: @openzeppelin/contracts/token/ERC721/IERC721.sol
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
/**
* @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);
}
// File: @openzeppelin/contracts/interfaces/IERC721.sol
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)
pragma solidity ^0.8.0;
// File: @openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
// File: @openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}
// File: OpenPeerEscrow.sol
pragma solidity ^0.8.17;
contract OpenPeerEscrow is ERC2771Context, Initializable {
using SafeERC20 for IERC20;
mapping(bytes32 => Escrow) public escrows;
address payable public seller;
address public deployer;
address public arbitrator;
address payable public feeRecipient;
address public feeDiscountNFT;
uint256 public feeBps;
uint256 public immutable disputeFee = 0.001 ether;
mapping(bytes32 => mapping(address => bool)) public disputePayments;
/**********************
+ Events +
***********************/
event EscrowCreated(bytes32 indexed _orderHash);
event Released(bytes32 indexed _orderHash);
event CancelledByBuyer(bytes32 indexed _orderHash);
event SellerCancelDisabled(bytes32 indexed _orderHash);
event CancelledBySeller(bytes32 indexed _orderHash);
event DisputeOpened(bytes32 indexed _orderHash, address indexed _sender);
event DisputeResolved(bytes32 indexed _orderHash, address indexed _winner);
struct Escrow {
// So we know the escrow exists
bool exists;
// This is the timestamp in which the seller can cancel the escrow after.
// It has a special value:
// 1 : Permanently locked by the buyer (i.e. marked as paid; the seller can never cancel)
uint32 sellerCanCancelAfter;
uint256 fee;
bool dispute;
address payable partner;
uint256 openPeerFee;
}
/// @param _trustedForwarder Forwarder address
constructor(address _trustedForwarder) ERC2771Context(_trustedForwarder) {
_disableInitializers();
}
/// @param _seller Seller address
/// @param _feeBps OP fee (bps) ex: 30 == 0.3%
/// @param _arbitrator Address of the arbitrator (currently OP staff)
/// @param _feeRecipient Address to receive the fees
/// @param trustedForwarder Forwarder address
function initialize(
address payable _seller,
uint256 _feeBps,
address _arbitrator,
address payable _feeRecipient,
address trustedForwarder,
address _feeDiscountNFT
) external virtual initializer {
require(_seller != address(0), "Invalid seller");
require(_feeRecipient != address(0), "Invalid fee recipient");
require(_arbitrator != address(0), "Invalid arbitrator");
require(trustedForwarder != address(0), "Invalid trust forwarder");
seller = _seller;
feeBps = _feeBps;
arbitrator = _arbitrator;
feeRecipient = _feeRecipient;
_trustedForwarder = trustedForwarder;
feeDiscountNFT = _feeDiscountNFT;
deployer = _msgSender();
}
// Modifiers
modifier onlySeller() {
require(_msgSender() == seller, "Must be seller");
_;
}
modifier onlyArbitrator() {
require(_msgSender() == arbitrator, "Must be arbitrator");
_;
}
// Errors
error EscrowNotFound();
function createNativeEscrow(
bytes32 _orderID,
address payable _buyer,
uint256 _amount,
address payable _partner,
uint32 _sellerWaitingTime
) external payable {
create(
_orderID,
_buyer,
address(0),
_amount,
_partner,
_sellerWaitingTime
);
}
function createERC20Escrow(
bytes32 _orderID,
address payable _buyer,
address _token,
uint256 _amount,
address payable _partner,
uint32 _sellerWaitingTime
) external {
create(_orderID, _buyer, _token, _amount, _partner, _sellerWaitingTime);
}
function create(
bytes32 _orderID,
address payable _buyer,
address _token,
uint256 _amount,
address payable _partner,
uint32 _sellerWaitingTime
) private {
require(_amount > 0, "Invalid amount");
require(_buyer != address(0), "Invalid buyer");
require(_buyer != seller, "Seller and buyer must be different");
require(
_sellerWaitingTime >= 15 minutes && _sellerWaitingTime <= 1 days,
"Invalid seller waiting time"
);
bytes32 _orderHash = keccak256(
abi.encodePacked(_orderID, seller, _buyer, _token, _amount)
);
require(!escrows[_orderHash].exists, "Order already exists");
uint256 opFee = ((_amount * openPeerFee()) / 10_000);
uint256 orderFee = ((_amount * sellerFee(_partner)) / 10_000);
uint256 amount = orderFee + _amount;
if (_token == address(0)) {
require(msg.value == amount, "Incorrect MATIC sent");
} else {
uint256 balanceBefore = IERC20(_token).balanceOf(address(this));
IERC20(_token).safeTransferFrom(
_msgSender(),
address(this),
amount
);
uint256 balanceAfter = IERC20(_token).balanceOf(address(this));
require(
(balanceAfter - balanceBefore) == amount,
"Wrong ERC20 amount"
);
}
Escrow memory escrow = Escrow(
true,
uint32(block.timestamp) + _sellerWaitingTime,
orderFee,
false,
_partner,
opFee
);
escrows[_orderHash] = escrow;
emit EscrowCreated(_orderHash);
}
/// @notice Disable the seller from cancelling
/// @return bool
function markAsPaid(
bytes32 _orderID,
address payable _buyer,
address _token,
uint256 _amount
) external returns (bool) {
require(_msgSender() == _buyer, "Must be buyer");
Escrow memory _escrow;
bytes32 _orderHash;
(_escrow, _orderHash) = getEscrowAndHash(
_orderID,
_buyer,
_token,
_amount
);
if (!_escrow.exists) {
revert EscrowNotFound();
}
if (_escrow.sellerCanCancelAfter == 1) return false;
escrows[_orderHash].sellerCanCancelAfter = 1;
emit SellerCancelDisabled(_orderHash);
return true;
}
/// @notice Release ether or token in escrow to the buyer.
/// @return bool
function release(
bytes32 _orderID,
address payable _buyer,
address _token,
uint256 _amount
) external onlySeller returns (bool) {
Escrow memory _escrow;
bytes32 _orderHash;
(_escrow, _orderHash) = getEscrowAndHash(
_orderID,
_buyer,
_token,
_amount
);
if (!_escrow.exists) {
revert EscrowNotFound();
}
transferEscrowAndFees(
_orderHash,
_buyer,
_token,
_buyer,
_amount,
_escrow.fee,
_escrow.partner,
_escrow.openPeerFee,
false
);
emit Released(_orderHash);
return true;
}
/// @notice Cancel the escrow as a buyer with 0 fees
/// @return bool
function buyerCancel(
bytes32 _orderID,
address payable _buyer,
address _token,
uint256 _amount
) external returns (bool) {
require(_msgSender() == _buyer, "Must be buyer");
Escrow memory _escrow;
bytes32 _orderHash;
(_escrow, _orderHash) = getEscrowAndHash(
_orderID,
_buyer,
_token,
_amount
);
if (!_escrow.exists) {
revert EscrowNotFound();
}
transferEscrowAndFees(
_orderHash,
_buyer,
_token,
seller,
_amount + _escrow.fee,
0,
_escrow.partner,
0,
false
);
emit CancelledByBuyer(_orderHash);
return true;
}
/// @notice Cancel the escrow as a seller
/// @return bool
function sellerCancel(
bytes32 _orderID,
address payable _buyer,
address _token,
uint256 _amount
) external onlySeller returns (bool) {
Escrow memory _escrow;
bytes32 _orderHash;
(_escrow, _orderHash) = getEscrowAndHash(
_orderID,
_buyer,
_token,
_amount
);
if (!_escrow.exists) {
revert EscrowNotFound();
}
if (
_escrow.sellerCanCancelAfter <= 1 ||
_escrow.sellerCanCancelAfter > block.timestamp
) {
return false;
}
transferEscrowAndFees(
_orderHash,
_buyer,
_token,
seller,
_amount + _escrow.fee,
0,
_escrow.partner,
0,
false
);
emit CancelledBySeller(_orderHash);
return true;
}
/// @notice Allow seller or buyer to open a dispute
function openDispute(
bytes32 _orderID,
address payable _buyer,
address _token,
uint256 _amount
) external payable returns (bool) {
require(
_msgSender() == seller || _msgSender() == _buyer,
"Must be seller or buyer"
);
Escrow memory _escrow;
bytes32 _orderHash;
(_escrow, _orderHash) = getEscrowAndHash(
_orderID,
_buyer,
_token,
_amount
);
if (!_escrow.exists) {
revert EscrowNotFound();
}
require(_escrow.sellerCanCancelAfter == 1, "Cannot open a dispute yet");
require(
msg.value == disputeFee,
"To open a dispute, you must pay 1 MATIC"
);
require(
!disputePayments[_orderHash][_msgSender()],
"This address already paid for the dispute"
);
escrows[_orderHash].dispute = true;
disputePayments[_orderHash][_msgSender()] = true;
emit DisputeOpened(_orderHash, _msgSender());
return true;
}
/// @notice Allow arbitrator to resolve a dispute
/// @param _winner Address to receive the escrowed values - fees
function resolveDispute(
bytes32 _orderID,
address payable _buyer,
address _token,
uint256 _amount,
address payable _winner
) external onlyArbitrator returns (bool) {
Escrow memory _escrow;
bytes32 _orderHash;
(_escrow, _orderHash) = getEscrowAndHash(
_orderID,
_buyer,
_token,
_amount
);
if (!_escrow.exists) {
revert EscrowNotFound();
}
require(_escrow.dispute, "Dispute is not open");
require(
_winner == seller || _winner == _buyer,
"Winner must be seller or buyer"
);
emit DisputeResolved(_orderHash, _winner);
transferEscrowAndFees(
_orderHash,
_buyer,
_token,
_winner,
_amount,
_escrow.fee,
_escrow.partner,
_escrow.openPeerFee,
true
);
return true;
}
/// @notice Transfer the value of an escrow
/// @param _to Recipient address
/// @param _amount Amount to be transfered
/// @param _fee Fee to be transfered
/// @param _disputeResolution Is a dispute being resolved?
function transferEscrowAndFees(
bytes32 _orderHash,
address payable _buyer,
address _token,
address payable _to,
uint256 _amount,
uint256 _fee,
address payable _partner,
uint256 _openPeerFee,
bool _disputeResolution
) private {
delete escrows[_orderHash];
bool sellerPaid = disputePayments[_orderHash][seller];
bool buyerPaid = disputePayments[_orderHash][_buyer];
delete disputePayments[_orderHash][seller];
delete disputePayments[_orderHash][_buyer];
// transfers the amount to the seller | buyer
withdraw(_token, _to, _amount);
if (_openPeerFee > 0) {
// transfers the OP fee to the fee recipient
withdraw(_token, feeRecipient, _openPeerFee);
}
if (_fee - _openPeerFee > 0) {
// transfers the OP fee to the fee recipient
withdraw(_token, _partner, _fee - _openPeerFee);
}
if (_disputeResolution) {
(bool sentToWinner, ) = _to.call{value: disputeFee}("");
require(sentToWinner, "Failed to send the fee MATIC to the winner");
if (sellerPaid && buyerPaid) {
(bool sent, ) = feeRecipient.call{value: disputeFee}("");
require(
sent,
"Failed to send the fee MATIC to the fee recipient"
);
}
} else if (sellerPaid && !buyerPaid) {
// only the seller paid for the dispute, returns the fee to the seller
(bool sent, ) = seller.call{value: disputeFee}("");
require(sent, "Failed to send the fee MATIC to the seller");
} else if (buyerPaid && !sellerPaid) {
// only the buyer paid for the dispute, returns the fee to the buyer
(bool sent, ) = _buyer.call{value: disputeFee}("");
require(sent, "Failed to send the fee MATIC to the buyer");
} else if (buyerPaid && sellerPaid) {
// seller and buyer paid for the dispute, split the fee between the winner and the fee recipient
(bool sentToWinner, ) = _to.call{value: disputeFee}("");
require(sentToWinner, "Failed to send the fee MATIC to winner");
(bool sent, ) = feeRecipient.call{value: disputeFee}("");
require(sent, "Failed to send the fee MATIC to the fee recipient");
}
}
/// @notice Withdraw values in the contract
/// @param _token Address of the token to withdraw fees in to
/// @param _to Address to withdraw fees in to
/// @param _amount Amount to withdraw
function withdraw(
address _token,
address payable _to,
uint256 _amount
) private {
if (_token == address(0)) {
(bool sent, ) = _to.call{value: _amount}("");
require(sent, "Failed to send MATIC");
} else {
require(
IERC20(_token).transfer(_to, _amount),
"Failed to send tokens"
);
}
}
/// @notice Version recipient
function versionRecipient() external pure returns (string memory) {
return "1.0";
}
/// @notice Hashes the values and returns the matching escrow object and trade hash.
/// @dev Returns an empty escrow struct and 0 _orderHash if not found.
/// @param _orderID Escrow "_orderID" parameter
/// @param _buyer Escrow "buyer" parameter
/// @param _token Escrow "token" parameter
/// @param _amount Escrow "amount" parameter
/// @return Escrow
function getEscrowAndHash(
bytes32 _orderID,
address _buyer,
address _token,
uint256 _amount
) private view returns (Escrow memory, bytes32) {
bytes32 _orderHash = keccak256(
abi.encodePacked(_orderID, seller, _buyer, _token, _amount)
);
return (escrows[_orderHash], _orderHash);
}
/***********************
+ Getters +
***********************/
function openPeerFee() public view returns (uint256) {
IERC721 discountNFT = IERC721(feeDiscountNFT);
if (
feeDiscountNFT != address(0) &&
discountNFT.balanceOf(_msgSender()) > 0
) {
return 0;
}
return feeBps;
}
function sellerFee(address _partner) public view returns (uint256) {
return
openPeerFee() + IOpenPeerDeployer(deployer).partnerFeeBps(_partner);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_trustedForwarder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EscrowNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_orderHash","type":"bytes32"}],"name":"CancelledByBuyer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_orderHash","type":"bytes32"}],"name":"CancelledBySeller","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_orderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"_sender","type":"address"}],"name":"DisputeOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_orderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"_winner","type":"address"}],"name":"DisputeResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_orderHash","type":"bytes32"}],"name":"EscrowCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_orderHash","type":"bytes32"}],"name":"Released","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_orderHash","type":"bytes32"}],"name":"SellerCancelDisabled","type":"event"},{"inputs":[],"name":"arbitrator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_orderID","type":"bytes32"},{"internalType":"address payable","name":"_buyer","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"buyerCancel","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_orderID","type":"bytes32"},{"internalType":"address payable","name":"_buyer","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_partner","type":"address"},{"internalType":"uint32","name":"_sellerWaitingTime","type":"uint32"}],"name":"createERC20Escrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_orderID","type":"bytes32"},{"internalType":"address payable","name":"_buyer","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_partner","type":"address"},{"internalType":"uint32","name":"_sellerWaitingTime","type":"uint32"}],"name":"createNativeEscrow","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disputeFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"disputePayments","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"escrows","outputs":[{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"uint32","name":"sellerCanCancelAfter","type":"uint32"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bool","name":"dispute","type":"bool"},{"internalType":"address payable","name":"partner","type":"address"},{"internalType":"uint256","name":"openPeerFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeDiscountNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_seller","type":"address"},{"internalType":"uint256","name":"_feeBps","type":"uint256"},{"internalType":"address","name":"_arbitrator","type":"address"},{"internalType":"address payable","name":"_feeRecipient","type":"address"},{"internalType":"address","name":"trustedForwarder","type":"address"},{"internalType":"address","name":"_feeDiscountNFT","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_orderID","type":"bytes32"},{"internalType":"address payable","name":"_buyer","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"markAsPaid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_orderID","type":"bytes32"},{"internalType":"address payable","name":"_buyer","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"openDispute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"openPeerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_orderID","type":"bytes32"},{"internalType":"address payable","name":"_buyer","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"release","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_orderID","type":"bytes32"},{"internalType":"address payable","name":"_buyer","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_winner","type":"address"}],"name":"resolveDispute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seller","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_orderID","type":"bytes32"},{"internalType":"address payable","name":"_buyer","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sellerCancel","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_partner","type":"address"}],"name":"sellerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]Contract Creation Code
60a060405266038d7ea4c680006080523480156200001c57600080fd5b506040516200275c3803806200275c8339810160408190526200003f9162000139565b600080546001600160a01b0319166001600160a01b038316179055620000646200006b565b506200016b565b600054600160a81b900460ff1615620000da5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b600054600160a01b900460ff9081161462000137576000805460ff60a01b191660ff60a01b17905560405160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200014c57600080fd5b81516001600160a01b03811681146200016457600080fd5b9392505050565b6080516125a4620001b8600039600081816103e60152818161070b015281816113a50152818161147f0152818161152a015281816115f7015281816116c9015261179001526125a46000f3fe6080604052600436106101355760003560e01c80638d0504e2116100ab578063cbdef6331161006f578063cbdef63314610428578063d5f3948814610448578063e0c8fb7114610468578063f1f565ae14610488578063f7871aba1461049b578063f830baad146104bb57600080fd5b80638d0504e21461037d5780638f9c296714610392578063a2dc2ab7146103b2578063b9ce896b146103d4578063c5194dc61461040857600080fd5b806346904840116100fd57806346904840146102a9578063486ff0cd146102c95780634f004b15146102fb578063572b6c051461030e5780635ff798af1461033d5780636cc6cde11461035d57600080fd5b806308551a531461013a5780631e93f1431461017757806324a9d853146101a75780632d83549c146101cb57806331e0a5631461026e575b600080fd5b34801561014657600080fd5b5060025461015a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561018357600080fd5b50610197610192366004612121565b6104db565b604051901515815260200161016e565b3480156101b357600080fd5b506101bd60075481565b60405190815260200161016e565b3480156101d757600080fd5b5061022f6101e6366004612169565b6001602081905260009182526040909120805491810154600282015460039092015460ff808516946101009081900463ffffffff16949182169291046001600160a01b03169086565b60408051961515875263ffffffff909516602087015293850192909252151560608401526001600160a01b0316608083015260a082015260c00161016e565b34801561027a57600080fd5b50610197610289366004612182565b600860209081526000928352604080842090915290825290205460ff1681565b3480156102b557600080fd5b5060055461015a906001600160a01b031681565b3480156102d557600080fd5b5060408051808201825260038152620312e360ec1b6020820152905161016e91906121d6565b610197610309366004612121565b6105e5565b34801561031a57600080fd5b50610197610329366004612209565b6000546001600160a01b0391821691161490565b34801561034957600080fd5b5061019761035836600461222d565b6108bd565b34801561036957600080fd5b5060045461015a906001600160a01b031681565b34801561038957600080fd5b506101bd610a7b565b34801561039e57600080fd5b506101976103ad366004612121565b610b2c565b3480156103be57600080fd5b506103d26103cd36600461228c565b610c2f565b005b3480156103e057600080fd5b506101bd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561041457600080fd5b50610197610423366004612121565b610f12565b34801561043457600080fd5b50610197610443366004612121565b611000565b34801561045457600080fd5b5060035461015a906001600160a01b031681565b34801561047457600080fd5b506101bd610483366004612209565b61112b565b6103d261049636600461231e565b6111b2565b3480156104a757600080fd5b506103d26104b6366004612379565b6111c8565b3480156104c757600080fd5b5060065461015a906001600160a01b031681565b6000836001600160a01b03166104ef6111de565b6001600160a01b03161461053a5760405162461bcd60e51b815260206004820152600d60248201526c26bab9ba10313290313abcb2b960991b60448201526064015b60405180910390fd5b6105426120d4565b600061055087878787611203565b815191935091506105745760405163f1d80ab160e01b815260040160405180910390fd5b816020015163ffffffff16600103610591576000925050506105dd565b600081815260016020526040808220805464ffffffff0019166101001790555182917fe95fa7985c7585e90dab2dc46470726468662be06f67d79a31a5012e4bc0edeb91a26001925050505b949350505050565b6002546000906001600160a01b03166105fc6111de565b6001600160a01b031614806106295750836001600160a01b031661061e6111de565b6001600160a01b0316145b6106755760405162461bcd60e51b815260206004820152601760248201527f4d7573742062652073656c6c6572206f722062757965720000000000000000006044820152606401610531565b61067d6120d4565b600061068b87878787611203565b815191935091506106af5760405163f1d80ab160e01b815260040160405180910390fd5b816020015163ffffffff166001146107095760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f74206f70656e2061206469737075746520796574000000000000006044820152606401610531565b7f000000000000000000000000000000000000000000000000000000000000000034146107885760405162461bcd60e51b815260206004820152602760248201527f546f206f70656e206120646973707574652c20796f75206d757374207061792060448201526631204d4154494360c81b6064820152608401610531565b60008181526008602052604081209061079f6111de565b6001600160a01b0316815260208101919091526040016000205460ff161561081b5760405162461bcd60e51b815260206004820152602960248201527f54686973206164647265737320616c7265616479207061696420666f7220746860448201526865206469737075746560b81b6064820152608401610531565b6000818152600160208181526040808420600201805460ff19168417905560089091528220909161084a6111de565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561087a6111de565b6001600160a01b0316817fe7b614d99462ab012c8191c9348164cd62a4aec6d211f42371fd1f0759e5c22060405160405180910390a35060019695505050505050565b6004546000906001600160a01b03166108d46111de565b6001600160a01b03161461091f5760405162461bcd60e51b815260206004820152601260248201527126bab9ba1031329030b93134ba3930ba37b960711b6044820152606401610531565b6109276120d4565b600061093588888888611203565b815191935091506109595760405163f1d80ab160e01b815260040160405180910390fd5b81606001516109a05760405162461bcd60e51b81526020600482015260136024820152722234b9b83aba329034b9903737ba1037b832b760691b6044820152606401610531565b6002546001600160a01b03858116911614806109cd5750866001600160a01b0316846001600160a01b0316145b610a195760405162461bcd60e51b815260206004820152601e60248201527f57696e6e6572206d7573742062652073656c6c6572206f7220627579657200006044820152606401610531565b6040516001600160a01b0385169082907fc513157869d5df7583154f47d70526162925e137610792515fae2d874b519daa90600090a3610a6d8188888789876040015188608001518960a0015160016112c5565b506001979650505050505050565b6006546000906001600160a01b03168015801590610b1757506000816001600160a01b03166370a08231610aad6111de565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1591906123e5565b115b15610b2457600091505090565b505060075490565b6000836001600160a01b0316610b406111de565b6001600160a01b031614610b865760405162461bcd60e51b815260206004820152600d60248201526c26bab9ba10313290313abcb2b960991b6044820152606401610531565b610b8e6120d4565b6000610b9c87878787611203565b81519193509150610bc05760405163f1d80ab160e01b815260040160405180910390fd5b6002546040830151610bf7918391899189916001600160a01b0390911690610be8908a612414565b600088608001516000806112c5565b60405181907fd9b627ddaa414e8e6c82366cc9c179f6281d73968827cc17038a56852e28ac8b90600090a25060019695505050505050565b600054600160a81b900460ff1615808015610c5757506000546001600160a01b90910460ff16105b80610c785750303b158015610c785750600054600160a01b900460ff166001145b610cdb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610531565b6000805460ff60a01b1916600160a01b1790558015610d08576000805460ff60a81b1916600160a81b1790555b6001600160a01b038716610d4f5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b63632b960911b6044820152606401610531565b6001600160a01b038416610d9d5760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a5908199959481c9958da5c1a595b9d605a1b6044820152606401610531565b6001600160a01b038516610de85760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b93134ba3930ba37b960711b6044820152606401610531565b6001600160a01b038316610e3e5760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420747275737420666f727761726465720000000000000000006044820152606401610531565b600280546001600160a01b03199081166001600160a01b038a811691909117909255600788905560048054821688841617905560058054821687841617905560008054821686841617905560068054909116918416919091179055610ea16111de565b600380546001600160a01b0319166001600160a01b03929092169190911790558015610f09576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6002546000906001600160a01b0316610f296111de565b6001600160a01b031614610f705760405162461bcd60e51b815260206004820152600e60248201526d26bab9ba1031329039b2b63632b960911b6044820152606401610531565b610f786120d4565b6000610f8687878787611203565b81519193509150610faa5760405163f1d80ab160e01b815260040160405180910390fd5b610fc88187878988876040015188608001518960a0015160006112c5565b60405181907f6eec2dd2382427616d4ea7ef183b16091feac4e2e63c8b55f25215f132df8d1490600090a25060019695505050505050565b6002546000906001600160a01b03166110176111de565b6001600160a01b03161461105e5760405162461bcd60e51b815260206004820152600e60248201526d26bab9ba1031329039b2b63632b960911b6044820152606401610531565b6110666120d4565b600061107487878787611203565b815191935091506110985760405163f1d80ab160e01b815260040160405180910390fd5b6001826020015163ffffffff161115806110bb575042826020015163ffffffff16115b156110cb576000925050506105dd565b60025460408301516110f3918391899189916001600160a01b0390911690610be8908a612414565b60405181907f366d2b4e6cc37ecebb3d7d41df6d581634fd8137412710a1e086e4ca4656bb5890600090a25060019695505050505050565b60035460405163f1c9b1b360e01b81526001600160a01b038381166004830152600092169063f1c9b1b390602401602060405180830381865afa158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a91906123e5565b6111a2610a7b565b6111ac9190612414565b92915050565b6111c18585600086868661181e565b5050505050565b6111d686868686868661181e565b505050505050565b600080546001600160a01b031633036111fe575060131936013560601c90565b503390565b61120b6120d4565b60025460405160009182916112369189916001600160a01b0390911690899089908990602001612427565b60408051808303601f190181528282528051602091820120600081815260018084529084902060c086018552805460ff808216151588526101009182900463ffffffff169588019590955291810154948601949094526002840154928316151560608601529091046001600160a01b0316608084015260039091015460a0830152909890975095505050505050565b6000898152600160208181526040808420805464ffffffffff19168155928301849055600280840180546001600160a81b031916905560039093018490556008825280842092546001600160a01b039081168552929091528083208054928c1684529220805460ff198084169094558154909316905560ff908116911661134d898989611d1d565b831561136b5760055461136b908a906001600160a01b031686611d1d565b60006113778588612461565b111561139157611391898661138c878a612461565b611d1d565b8215611505576000886001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000060405160006040518083038185875af1925050503d8060008114611404576040519150601f19603f3d011682016040523d82523d6000602084013e611409565b606091505b505090508061145b5760405162461bcd60e51b815260206004820152602a602482015260008051602061254f8339815191526044820152693a3432903bb4b73732b960b11b6064820152608401610531565b8280156114655750815b156114ff576005546040516000916001600160a01b0316907f0000000000000000000000000000000000000000000000000000000000000000908381818185875af1925050503d80600081146114d7576040519150601f19603f3d011682016040523d82523d6000602084013e6114dc565b606091505b50509050806114fd5760405162461bcd60e51b815260040161053190612474565b505b50611811565b818015611510575080155b156115d9576002546040516000916001600160a01b0316907f0000000000000000000000000000000000000000000000000000000000000000908381818185875af1925050503d8060008114611582576040519150601f19603f3d011682016040523d82523d6000602084013e611587565b606091505b50509050806114ff5760405162461bcd60e51b815260206004820152602a602482015260008051602061254f8339815191526044820152693a34329039b2b63632b960b11b6064820152608401610531565b8080156115e4575081155b156116ac5760008a6001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000060405160006040518083038185875af1925050503d8060008114611656576040519150601f19603f3d011682016040523d82523d6000602084013e61165b565b606091505b50509050806114ff5760405162461bcd60e51b8152602060048201526029602482015260008051602061254f8339815191526044820152683a343290313abcb2b960b91b6064820152608401610531565b8080156116b65750815b15611811576000886001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000060405160006040518083038185875af1925050503d8060008114611728576040519150601f19603f3d011682016040523d82523d6000602084013e61172d565b606091505b505090508061177b5760405162461bcd60e51b8152602060048201526026602482015260008051602061254f8339815191526044820152653bb4b73732b960d11b6064820152608401610531565b6005546040516000916001600160a01b0316907f0000000000000000000000000000000000000000000000000000000000000000908381818185875af1925050503d80600081146117e8576040519150601f19603f3d011682016040523d82523d6000602084013e6117ed565b606091505b505090508061180e5760405162461bcd60e51b815260040161053190612474565b50505b5050505050505050505050565b6000831161185f5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610531565b6001600160a01b0385166118a55760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210313abcb2b960991b6044820152606401610531565b6002546001600160a01b039081169086160361190e5760405162461bcd60e51b815260206004820152602260248201527f53656c6c657220616e64206275796572206d75737420626520646966666572656044820152611b9d60f21b6064820152608401610531565b6103848163ffffffff161015801561192f5750620151808163ffffffff1611155b61197b5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c69642073656c6c65722077616974696e672074696d6500000000006044820152606401610531565b6002546040516000916119a29189916001600160a01b031690899089908990602001612427565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915060ff1615611a115760405162461bcd60e51b81526020600482015260146024820152734f7264657220616c72656164792065786973747360601b6044820152606401610531565b6000612710611a1e610a7b565b611a2890876124b3565b611a3291906124ca565b90506000612710611a428661112b565b611a4c90886124b3565b611a5691906124ca565b90506000611a648783612414565b90506001600160a01b038816611abf57803414611aba5760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd081350551250c81cd95b9d60621b6044820152606401610531565b611c06565b6040516370a0823160e01b81523060048201526000906001600160a01b038a16906370a0823190602401602060405180830381865afa158015611b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2a91906123e5565b9050611b49611b376111de565b6001600160a01b038b16903085611e87565b6040516370a0823160e01b81523060048201526000906001600160a01b038b16906370a0823190602401602060405180830381865afa158015611b90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb491906123e5565b905082611bc18383612461565b14611c035760405162461bcd60e51b815260206004820152601260248201527115dc9bdb99c8115490cc8c08185b5bdd5b9d60721b6044820152606401610531565b50505b6040805160c081019091526001815260009060208101611c2688426124ec565b63ffffffff90811682526020808301879052600060408085018290526001600160a01b038d811660608088019190915260809687018c90528c8452600180865283852089518154978b015164ffffffffff1990981690151564ffffffff001916176101009790981687029790971787558884015190870155870151600286018054978901516001600160a81b0319909816911515610100600160a81b03191691909117969091169093029490941790915560a0840151600390920191909155905191925086917f172bd7c7b396e5e48c349fc8e1c845f01eefba35dff18954119870b39fd05e799190a25050505050505050505050565b6001600160a01b038316611dcb576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611d78576040519150601f19603f3d011682016040523d82523d6000602084013e611d7d565b606091505b5050905080611dc55760405162461bcd60e51b81526020600482015260146024820152734661696c656420746f2073656e64204d4154494360601b6044820152606401610531565b50505050565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015611e1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3e9190612510565b611e825760405162461bcd60e51b81526020600482015260156024820152744661696c656420746f2073656e6420746f6b656e7360581b6044820152606401610531565b505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611dc59085906000611f31826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611fb19092919063ffffffff16565b9050805160001480611f52575080806020019051810190611f529190612510565b611e825760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610531565b60606105dd848460008585600080866001600160a01b03168587604051611fd89190612532565b60006040518083038185875af1925050503d8060008114612015576040519150601f19603f3d011682016040523d82523d6000602084013e61201a565b606091505b509150915061202b87838387612036565b979650505050505050565b606083156120a557825160000361209e576001600160a01b0385163b61209e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610531565b50816105dd565b6105dd83838151156120ba5781518083602001fd5b8060405162461bcd60e51b815260040161053191906121d6565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b6001600160a01b038116811461211e57600080fd5b50565b6000806000806080858703121561213757600080fd5b84359350602085013561214981612109565b9250604085013561215981612109565b9396929550929360600135925050565b60006020828403121561217b57600080fd5b5035919050565b6000806040838503121561219557600080fd5b8235915060208301356121a781612109565b809150509250929050565b60005b838110156121cd5781810151838201526020016121b5565b50506000910152565b60208152600082518060208401526121f58160408501602087016121b2565b601f01601f19169190910160400192915050565b60006020828403121561221b57600080fd5b813561222681612109565b9392505050565b600080600080600060a0868803121561224557600080fd5b85359450602086013561225781612109565b9350604086013561226781612109565b925060608601359150608086013561227e81612109565b809150509295509295909350565b60008060008060008060c087890312156122a557600080fd5b86356122b081612109565b95506020870135945060408701356122c781612109565b935060608701356122d781612109565b925060808701356122e781612109565b915060a08701356122f781612109565b809150509295509295509295565b803563ffffffff8116811461231957600080fd5b919050565b600080600080600060a0868803121561233657600080fd5b85359450602086013561234881612109565b935060408601359250606086013561235f81612109565b915061236d60808701612305565b90509295509295909350565b60008060008060008060c0878903121561239257600080fd5b8635955060208701356123a481612109565b945060408701356123b481612109565b93506060870135925060808701356123cb81612109565b91506123d960a08801612305565b90509295509295509295565b6000602082840312156123f757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156111ac576111ac6123fe565b9485526bffffffffffffffffffffffff19606094851b8116602087015292841b83166034860152921b166048830152605c820152607c0190565b818103818111156111ac576111ac6123fe565b602080825260319082015260008051602061254f8339815191526040820152701d1a1948199959481c9958da5c1a595b9d607a1b606082015260800190565b80820281158282048414176111ac576111ac6123fe565b6000826124e757634e487b7160e01b600052601260045260246000fd5b500490565b63ffffffff818116838216019080821115612509576125096123fe565b5092915050565b60006020828403121561252257600080fd5b8151801515811461222657600080fd5b600082516125448184602087016121b2565b919091019291505056fe4661696c656420746f2073656e642074686520666565204d4154494320746f20a26469706673582212205a7a56027b6753248e5787c3bb2b812f124fb3986819251d4d62ac42db64b3e264736f6c63430008120033000000000000000000000000fe0fa3c06d03bdc7fb49c892bbb39113b534fb57
Deployed Bytecode
0x6080604052600436106101355760003560e01c80638d0504e2116100ab578063cbdef6331161006f578063cbdef63314610428578063d5f3948814610448578063e0c8fb7114610468578063f1f565ae14610488578063f7871aba1461049b578063f830baad146104bb57600080fd5b80638d0504e21461037d5780638f9c296714610392578063a2dc2ab7146103b2578063b9ce896b146103d4578063c5194dc61461040857600080fd5b806346904840116100fd57806346904840146102a9578063486ff0cd146102c95780634f004b15146102fb578063572b6c051461030e5780635ff798af1461033d5780636cc6cde11461035d57600080fd5b806308551a531461013a5780631e93f1431461017757806324a9d853146101a75780632d83549c146101cb57806331e0a5631461026e575b600080fd5b34801561014657600080fd5b5060025461015a906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561018357600080fd5b50610197610192366004612121565b6104db565b604051901515815260200161016e565b3480156101b357600080fd5b506101bd60075481565b60405190815260200161016e565b3480156101d757600080fd5b5061022f6101e6366004612169565b6001602081905260009182526040909120805491810154600282015460039092015460ff808516946101009081900463ffffffff16949182169291046001600160a01b03169086565b60408051961515875263ffffffff909516602087015293850192909252151560608401526001600160a01b0316608083015260a082015260c00161016e565b34801561027a57600080fd5b50610197610289366004612182565b600860209081526000928352604080842090915290825290205460ff1681565b3480156102b557600080fd5b5060055461015a906001600160a01b031681565b3480156102d557600080fd5b5060408051808201825260038152620312e360ec1b6020820152905161016e91906121d6565b610197610309366004612121565b6105e5565b34801561031a57600080fd5b50610197610329366004612209565b6000546001600160a01b0391821691161490565b34801561034957600080fd5b5061019761035836600461222d565b6108bd565b34801561036957600080fd5b5060045461015a906001600160a01b031681565b34801561038957600080fd5b506101bd610a7b565b34801561039e57600080fd5b506101976103ad366004612121565b610b2c565b3480156103be57600080fd5b506103d26103cd36600461228c565b610c2f565b005b3480156103e057600080fd5b506101bd7f00000000000000000000000000000000000000000000000000038d7ea4c6800081565b34801561041457600080fd5b50610197610423366004612121565b610f12565b34801561043457600080fd5b50610197610443366004612121565b611000565b34801561045457600080fd5b5060035461015a906001600160a01b031681565b34801561047457600080fd5b506101bd610483366004612209565b61112b565b6103d261049636600461231e565b6111b2565b3480156104a757600080fd5b506103d26104b6366004612379565b6111c8565b3480156104c757600080fd5b5060065461015a906001600160a01b031681565b6000836001600160a01b03166104ef6111de565b6001600160a01b03161461053a5760405162461bcd60e51b815260206004820152600d60248201526c26bab9ba10313290313abcb2b960991b60448201526064015b60405180910390fd5b6105426120d4565b600061055087878787611203565b815191935091506105745760405163f1d80ab160e01b815260040160405180910390fd5b816020015163ffffffff16600103610591576000925050506105dd565b600081815260016020526040808220805464ffffffff0019166101001790555182917fe95fa7985c7585e90dab2dc46470726468662be06f67d79a31a5012e4bc0edeb91a26001925050505b949350505050565b6002546000906001600160a01b03166105fc6111de565b6001600160a01b031614806106295750836001600160a01b031661061e6111de565b6001600160a01b0316145b6106755760405162461bcd60e51b815260206004820152601760248201527f4d7573742062652073656c6c6572206f722062757965720000000000000000006044820152606401610531565b61067d6120d4565b600061068b87878787611203565b815191935091506106af5760405163f1d80ab160e01b815260040160405180910390fd5b816020015163ffffffff166001146107095760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f74206f70656e2061206469737075746520796574000000000000006044820152606401610531565b7f00000000000000000000000000000000000000000000000000038d7ea4c6800034146107885760405162461bcd60e51b815260206004820152602760248201527f546f206f70656e206120646973707574652c20796f75206d757374207061792060448201526631204d4154494360c81b6064820152608401610531565b60008181526008602052604081209061079f6111de565b6001600160a01b0316815260208101919091526040016000205460ff161561081b5760405162461bcd60e51b815260206004820152602960248201527f54686973206164647265737320616c7265616479207061696420666f7220746860448201526865206469737075746560b81b6064820152608401610531565b6000818152600160208181526040808420600201805460ff19168417905560089091528220909161084a6111de565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561087a6111de565b6001600160a01b0316817fe7b614d99462ab012c8191c9348164cd62a4aec6d211f42371fd1f0759e5c22060405160405180910390a35060019695505050505050565b6004546000906001600160a01b03166108d46111de565b6001600160a01b03161461091f5760405162461bcd60e51b815260206004820152601260248201527126bab9ba1031329030b93134ba3930ba37b960711b6044820152606401610531565b6109276120d4565b600061093588888888611203565b815191935091506109595760405163f1d80ab160e01b815260040160405180910390fd5b81606001516109a05760405162461bcd60e51b81526020600482015260136024820152722234b9b83aba329034b9903737ba1037b832b760691b6044820152606401610531565b6002546001600160a01b03858116911614806109cd5750866001600160a01b0316846001600160a01b0316145b610a195760405162461bcd60e51b815260206004820152601e60248201527f57696e6e6572206d7573742062652073656c6c6572206f7220627579657200006044820152606401610531565b6040516001600160a01b0385169082907fc513157869d5df7583154f47d70526162925e137610792515fae2d874b519daa90600090a3610a6d8188888789876040015188608001518960a0015160016112c5565b506001979650505050505050565b6006546000906001600160a01b03168015801590610b1757506000816001600160a01b03166370a08231610aad6111de565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1591906123e5565b115b15610b2457600091505090565b505060075490565b6000836001600160a01b0316610b406111de565b6001600160a01b031614610b865760405162461bcd60e51b815260206004820152600d60248201526c26bab9ba10313290313abcb2b960991b6044820152606401610531565b610b8e6120d4565b6000610b9c87878787611203565b81519193509150610bc05760405163f1d80ab160e01b815260040160405180910390fd5b6002546040830151610bf7918391899189916001600160a01b0390911690610be8908a612414565b600088608001516000806112c5565b60405181907fd9b627ddaa414e8e6c82366cc9c179f6281d73968827cc17038a56852e28ac8b90600090a25060019695505050505050565b600054600160a81b900460ff1615808015610c5757506000546001600160a01b90910460ff16105b80610c785750303b158015610c785750600054600160a01b900460ff166001145b610cdb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610531565b6000805460ff60a01b1916600160a01b1790558015610d08576000805460ff60a81b1916600160a81b1790555b6001600160a01b038716610d4f5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b63632b960911b6044820152606401610531565b6001600160a01b038416610d9d5760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a5908199959481c9958da5c1a595b9d605a1b6044820152606401610531565b6001600160a01b038516610de85760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21030b93134ba3930ba37b960711b6044820152606401610531565b6001600160a01b038316610e3e5760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420747275737420666f727761726465720000000000000000006044820152606401610531565b600280546001600160a01b03199081166001600160a01b038a811691909117909255600788905560048054821688841617905560058054821687841617905560008054821686841617905560068054909116918416919091179055610ea16111de565b600380546001600160a01b0319166001600160a01b03929092169190911790558015610f09576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6002546000906001600160a01b0316610f296111de565b6001600160a01b031614610f705760405162461bcd60e51b815260206004820152600e60248201526d26bab9ba1031329039b2b63632b960911b6044820152606401610531565b610f786120d4565b6000610f8687878787611203565b81519193509150610faa5760405163f1d80ab160e01b815260040160405180910390fd5b610fc88187878988876040015188608001518960a0015160006112c5565b60405181907f6eec2dd2382427616d4ea7ef183b16091feac4e2e63c8b55f25215f132df8d1490600090a25060019695505050505050565b6002546000906001600160a01b03166110176111de565b6001600160a01b03161461105e5760405162461bcd60e51b815260206004820152600e60248201526d26bab9ba1031329039b2b63632b960911b6044820152606401610531565b6110666120d4565b600061107487878787611203565b815191935091506110985760405163f1d80ab160e01b815260040160405180910390fd5b6001826020015163ffffffff161115806110bb575042826020015163ffffffff16115b156110cb576000925050506105dd565b60025460408301516110f3918391899189916001600160a01b0390911690610be8908a612414565b60405181907f366d2b4e6cc37ecebb3d7d41df6d581634fd8137412710a1e086e4ca4656bb5890600090a25060019695505050505050565b60035460405163f1c9b1b360e01b81526001600160a01b038381166004830152600092169063f1c9b1b390602401602060405180830381865afa158015611176573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119a91906123e5565b6111a2610a7b565b6111ac9190612414565b92915050565b6111c18585600086868661181e565b5050505050565b6111d686868686868661181e565b505050505050565b600080546001600160a01b031633036111fe575060131936013560601c90565b503390565b61120b6120d4565b60025460405160009182916112369189916001600160a01b0390911690899089908990602001612427565b60408051808303601f190181528282528051602091820120600081815260018084529084902060c086018552805460ff808216151588526101009182900463ffffffff169588019590955291810154948601949094526002840154928316151560608601529091046001600160a01b0316608084015260039091015460a0830152909890975095505050505050565b6000898152600160208181526040808420805464ffffffffff19168155928301849055600280840180546001600160a81b031916905560039093018490556008825280842092546001600160a01b039081168552929091528083208054928c1684529220805460ff198084169094558154909316905560ff908116911661134d898989611d1d565b831561136b5760055461136b908a906001600160a01b031686611d1d565b60006113778588612461565b111561139157611391898661138c878a612461565b611d1d565b8215611505576000886001600160a01b03167f00000000000000000000000000000000000000000000000000038d7ea4c6800060405160006040518083038185875af1925050503d8060008114611404576040519150601f19603f3d011682016040523d82523d6000602084013e611409565b606091505b505090508061145b5760405162461bcd60e51b815260206004820152602a602482015260008051602061254f8339815191526044820152693a3432903bb4b73732b960b11b6064820152608401610531565b8280156114655750815b156114ff576005546040516000916001600160a01b0316907f00000000000000000000000000000000000000000000000000038d7ea4c68000908381818185875af1925050503d80600081146114d7576040519150601f19603f3d011682016040523d82523d6000602084013e6114dc565b606091505b50509050806114fd5760405162461bcd60e51b815260040161053190612474565b505b50611811565b818015611510575080155b156115d9576002546040516000916001600160a01b0316907f00000000000000000000000000000000000000000000000000038d7ea4c68000908381818185875af1925050503d8060008114611582576040519150601f19603f3d011682016040523d82523d6000602084013e611587565b606091505b50509050806114ff5760405162461bcd60e51b815260206004820152602a602482015260008051602061254f8339815191526044820152693a34329039b2b63632b960b11b6064820152608401610531565b8080156115e4575081155b156116ac5760008a6001600160a01b03167f00000000000000000000000000000000000000000000000000038d7ea4c6800060405160006040518083038185875af1925050503d8060008114611656576040519150601f19603f3d011682016040523d82523d6000602084013e61165b565b606091505b50509050806114ff5760405162461bcd60e51b8152602060048201526029602482015260008051602061254f8339815191526044820152683a343290313abcb2b960b91b6064820152608401610531565b8080156116b65750815b15611811576000886001600160a01b03167f00000000000000000000000000000000000000000000000000038d7ea4c6800060405160006040518083038185875af1925050503d8060008114611728576040519150601f19603f3d011682016040523d82523d6000602084013e61172d565b606091505b505090508061177b5760405162461bcd60e51b8152602060048201526026602482015260008051602061254f8339815191526044820152653bb4b73732b960d11b6064820152608401610531565b6005546040516000916001600160a01b0316907f00000000000000000000000000000000000000000000000000038d7ea4c68000908381818185875af1925050503d80600081146117e8576040519150601f19603f3d011682016040523d82523d6000602084013e6117ed565b606091505b505090508061180e5760405162461bcd60e51b815260040161053190612474565b50505b5050505050505050505050565b6000831161185f5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610531565b6001600160a01b0385166118a55760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210313abcb2b960991b6044820152606401610531565b6002546001600160a01b039081169086160361190e5760405162461bcd60e51b815260206004820152602260248201527f53656c6c657220616e64206275796572206d75737420626520646966666572656044820152611b9d60f21b6064820152608401610531565b6103848163ffffffff161015801561192f5750620151808163ffffffff1611155b61197b5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c69642073656c6c65722077616974696e672074696d6500000000006044820152606401610531565b6002546040516000916119a29189916001600160a01b031690899089908990602001612427565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915060ff1615611a115760405162461bcd60e51b81526020600482015260146024820152734f7264657220616c72656164792065786973747360601b6044820152606401610531565b6000612710611a1e610a7b565b611a2890876124b3565b611a3291906124ca565b90506000612710611a428661112b565b611a4c90886124b3565b611a5691906124ca565b90506000611a648783612414565b90506001600160a01b038816611abf57803414611aba5760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd081350551250c81cd95b9d60621b6044820152606401610531565b611c06565b6040516370a0823160e01b81523060048201526000906001600160a01b038a16906370a0823190602401602060405180830381865afa158015611b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2a91906123e5565b9050611b49611b376111de565b6001600160a01b038b16903085611e87565b6040516370a0823160e01b81523060048201526000906001600160a01b038b16906370a0823190602401602060405180830381865afa158015611b90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb491906123e5565b905082611bc18383612461565b14611c035760405162461bcd60e51b815260206004820152601260248201527115dc9bdb99c8115490cc8c08185b5bdd5b9d60721b6044820152606401610531565b50505b6040805160c081019091526001815260009060208101611c2688426124ec565b63ffffffff90811682526020808301879052600060408085018290526001600160a01b038d811660608088019190915260809687018c90528c8452600180865283852089518154978b015164ffffffffff1990981690151564ffffffff001916176101009790981687029790971787558884015190870155870151600286018054978901516001600160a81b0319909816911515610100600160a81b03191691909117969091169093029490941790915560a0840151600390920191909155905191925086917f172bd7c7b396e5e48c349fc8e1c845f01eefba35dff18954119870b39fd05e799190a25050505050505050505050565b6001600160a01b038316611dcb576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611d78576040519150601f19603f3d011682016040523d82523d6000602084013e611d7d565b606091505b5050905080611dc55760405162461bcd60e51b81526020600482015260146024820152734661696c656420746f2073656e64204d4154494360601b6044820152606401610531565b50505050565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015611e1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3e9190612510565b611e825760405162461bcd60e51b81526020600482015260156024820152744661696c656420746f2073656e6420746f6b656e7360581b6044820152606401610531565b505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611dc59085906000611f31826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611fb19092919063ffffffff16565b9050805160001480611f52575080806020019051810190611f529190612510565b611e825760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610531565b60606105dd848460008585600080866001600160a01b03168587604051611fd89190612532565b60006040518083038185875af1925050503d8060008114612015576040519150601f19603f3d011682016040523d82523d6000602084013e61201a565b606091505b509150915061202b87838387612036565b979650505050505050565b606083156120a557825160000361209e576001600160a01b0385163b61209e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610531565b50816105dd565b6105dd83838151156120ba5781518083602001fd5b8060405162461bcd60e51b815260040161053191906121d6565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b6001600160a01b038116811461211e57600080fd5b50565b6000806000806080858703121561213757600080fd5b84359350602085013561214981612109565b9250604085013561215981612109565b9396929550929360600135925050565b60006020828403121561217b57600080fd5b5035919050565b6000806040838503121561219557600080fd5b8235915060208301356121a781612109565b809150509250929050565b60005b838110156121cd5781810151838201526020016121b5565b50506000910152565b60208152600082518060208401526121f58160408501602087016121b2565b601f01601f19169190910160400192915050565b60006020828403121561221b57600080fd5b813561222681612109565b9392505050565b600080600080600060a0868803121561224557600080fd5b85359450602086013561225781612109565b9350604086013561226781612109565b925060608601359150608086013561227e81612109565b809150509295509295909350565b60008060008060008060c087890312156122a557600080fd5b86356122b081612109565b95506020870135945060408701356122c781612109565b935060608701356122d781612109565b925060808701356122e781612109565b915060a08701356122f781612109565b809150509295509295509295565b803563ffffffff8116811461231957600080fd5b919050565b600080600080600060a0868803121561233657600080fd5b85359450602086013561234881612109565b935060408601359250606086013561235f81612109565b915061236d60808701612305565b90509295509295909350565b60008060008060008060c0878903121561239257600080fd5b8635955060208701356123a481612109565b945060408701356123b481612109565b93506060870135925060808701356123cb81612109565b91506123d960a08801612305565b90509295509295509295565b6000602082840312156123f757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156111ac576111ac6123fe565b9485526bffffffffffffffffffffffff19606094851b8116602087015292841b83166034860152921b166048830152605c820152607c0190565b818103818111156111ac576111ac6123fe565b602080825260319082015260008051602061254f8339815191526040820152701d1a1948199959481c9958da5c1a595b9d607a1b606082015260800190565b80820281158282048414176111ac576111ac6123fe565b6000826124e757634e487b7160e01b600052601260045260246000fd5b500490565b63ffffffff818116838216019080821115612509576125096123fe565b5092915050565b60006020828403121561252257600080fd5b8151801515811461222657600080fd5b600082516125448184602087016121b2565b919091019291505056fe4661696c656420746f2073656e642074686520666565204d4154494320746f20a26469706673582212205a7a56027b6753248e5787c3bb2b812f124fb3986819251d4d62ac42db64b3e264736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fe0fa3c06d03bdc7fb49c892bbb39113b534fb57
-----Decoded View---------------
Arg [0] : _trustedForwarder (address): 0xfe0fa3C06d03bDC7fb49c892BbB39113B534fB57
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000fe0fa3c06d03bdc7fb49c892bbb39113b534fb57
Deployed Bytecode Sourcemap
46806:16467:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46953:29;;;;;;;;;;-1:-1:-1;46953:29:0;;;;-1:-1:-1;;;;;46953:29:0;;;;;;-1:-1:-1;;;;;194:32:1;;;176:51;;164:2;149:18;46953:29:0;;;;;;;;52432:711;;;;;;;;;;-1:-1:-1;52432:711:0;;;;;:::i;:::-;;:::i;:::-;;;1101:14:1;;1094:22;1076:41;;1064:2;1049:18;52432:711:0;936:187:1;47129:21:0;;;;;;;;;;;;;;;;;;;1274:25:1;;;1262:2;1247:18;47129:21:0;1128:177:1;46903:41:0;;;;;;;;;;-1:-1:-1;46903:41:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;46903:41:0;;;;;;;;1809:14:1;;1802:22;1784:41;;1873:10;1861:23;;;1856:2;1841:18;;1834:51;1901:18;;;1894:34;;;;1971:14;1964:22;1959:2;1944:18;;1937:50;-1:-1:-1;;;;;2024:32:1;2018:3;2003:19;;1996:61;2044:3;2073:19;;2066:35;1771:3;1756:19;46903:41:0;1495:612:1;47213:67:0;;;;;;;;;;-1:-1:-1;47213:67:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;47051:35;;;;;;;;;;-1:-1:-1;47051:35:0;;;;-1:-1:-1;;;;;47051:35:0;;;61825:97;;;;;;;;;;-1:-1:-1;61902:12:0;;;;;;;;;;;-1:-1:-1;;;61902:12:0;;;;61825:97;;;;61902:12;61825:97;:::i;56068:1136::-;;;;;;:::i;:::-;;:::i;1513:138::-;;;;;;;;;;-1:-1:-1;1513:138:0;;;;;:::i;:::-;1589:4;1626:17;-1:-1:-1;;;;;1613:30:0;;;1626:17;;1613:30;;1513:138;57337:1042;;;;;;;;;;-1:-1:-1;57337:1042:0;;;;;:::i;:::-;;:::i;47019:25::-;;;;;;;;;;-1:-1:-1;47019:25:0;;;;-1:-1:-1;;;;;47019:25:0;;;62785:304;;;;;;;;;;;;;:::i;54117:840::-;;;;;;;;;;-1:-1:-1;54117:840:0;;;;;:::i;:::-;;:::i;48725:792::-;;;;;;;;;;-1:-1:-1;48725:792:0;;;;;:::i;:::-;;:::i;:::-;;47157:49;;;;;;;;;;;;;;;53237:792;;;;;;;;;;-1:-1:-1;53237:792:0;;;;;:::i;:::-;;:::i;55034:969::-;;;;;;;;;;-1:-1:-1;55034:969:0;;;;;:::i;:::-;;:::i;46989:23::-;;;;;;;;;;-1:-1:-1;46989:23:0;;;;-1:-1:-1;;;;;46989:23:0;;;63097:173;;;;;;;;;;-1:-1:-1;63097:173:0;;;;;:::i;:::-;;:::i;49821:392::-;;;;;;:::i;:::-;;:::i;50221:315::-;;;;;;;;;;-1:-1:-1;50221:315:0;;;;;:::i;:::-;;:::i;47093:29::-;;;;;;;;;;-1:-1:-1;47093:29:0;;;;-1:-1:-1;;;;;47093:29:0;;;52432:711;52588:4;52629:6;-1:-1:-1;;;;;52613:22:0;:12;:10;:12::i;:::-;-1:-1:-1;;;;;52613:22:0;;52605:48;;;;-1:-1:-1;;;52605:48:0;;7009:2:1;52605:48:0;;;6991:21:1;7048:2;7028:18;;;7021:30;-1:-1:-1;;;7067:18:1;;;7060:43;7120:18;;52605:48:0;;;;;;;;;52666:21;;:::i;:::-;52698:18;52751:114;52782:8;52805:6;52826;52847:7;52751:16;:114::i;:::-;52881:14;;52727:138;;-1:-1:-1;52727:138:0;-1:-1:-1;52876:71:0;;52919:16;;-1:-1:-1;;;52919:16:0;;;;;;;;;;;52876:71;52961:7;:28;;;:33;;52993:1;52961:33;52957:51;;53003:5;52996:12;;;;;;52957:51;53021:19;;;;53064:1;53021:19;;;;;;:44;;-1:-1:-1;;53021:44:0;;;;;53081:32;53029:10;;53081:32;;;53131:4;53124:11;;;;52432:711;;;;;;;:::o;56068:1136::-;56288:6;;56233:4;;-1:-1:-1;;;;;56288:6:0;56272:12;:10;:12::i;:::-;-1:-1:-1;;;;;56272:22:0;;:48;;;;56314:6;-1:-1:-1;;;;;56298:22:0;:12;:10;:12::i;:::-;-1:-1:-1;;;;;56298:22:0;;56272:48;56250:121;;;;-1:-1:-1;;;56250:121:0;;7351:2:1;56250:121:0;;;7333:21:1;7390:2;7370:18;;;7363:30;7429:25;7409:18;;;7402:53;7472:18;;56250:121:0;7149:347:1;56250:121:0;56382:21;;:::i;:::-;56414:18;56467:114;56498:8;56521:6;56542;56563:7;56467:16;:114::i;:::-;56597:14;;56443:138;;-1:-1:-1;56443:138:0;-1:-1:-1;56592:71:0;;56635:16;;-1:-1:-1;;;56635:16:0;;;;;;;;;;;56592:71;56683:7;:28;;;:33;;56715:1;56683:33;56675:71;;;;-1:-1:-1;;;56675:71:0;;7703:2:1;56675:71:0;;;7685:21:1;7742:2;7722:18;;;7715:30;7781:27;7761:18;;;7754:55;7826:18;;56675:71:0;7501:349:1;56675:71:0;56792:10;56779:9;:23;56757:112;;;;-1:-1:-1;;;56757:112:0;;8057:2:1;56757:112:0;;;8039:21:1;8096:2;8076:18;;;8069:30;8135:34;8115:18;;;8108:62;-1:-1:-1;;;8186:18:1;;;8179:37;8233:19;;56757:112:0;7855:403:1;56757:112:0;56903:27;;;;:15;:27;;;;;;56931:12;:10;:12::i;:::-;-1:-1:-1;;;;;56903:41:0;;;;;;;;;;;;-1:-1:-1;56903:41:0;;;;56902:42;56880:133;;;;-1:-1:-1;;;56880:133:0;;8465:2:1;56880:133:0;;;8447:21:1;8504:2;8484:18;;;8477:30;8543:34;8523:18;;;8516:62;-1:-1:-1;;;8594:18:1;;;8587:39;8643:19;;56880:133:0;8263:405:1;56880:133:0;57026:19;;;;57056:4;57026:19;;;;;;;;:27;;:34;;-1:-1:-1;;57026:34:0;;;;;57071:15;:27;;;;;57056:4;;57099:12;:10;:12::i;:::-;-1:-1:-1;;;;;57071:41:0;;;;;;;;;;;;-1:-1:-1;57071:41:0;:48;;-1:-1:-1;;57071:48:0;;;;;;;;;;57161:12;:10;:12::i;:::-;-1:-1:-1;;;;;57135:39:0;57149:10;57135:39;;;;;;;;;;-1:-1:-1;57192:4:0;;56068:1136;-1:-1:-1;;;;;;56068:1136:0:o;57337:1042::-;49714:10;;57546:4;;-1:-1:-1;;;;;49714:10:0;49698:12;:10;:12::i;:::-;-1:-1:-1;;;;;49698:26:0;;49690:57;;;;-1:-1:-1;;;49690:57:0;;8875:2:1;49690:57:0;;;8857:21:1;8914:2;8894:18;;;8887:30;-1:-1:-1;;;8933:18:1;;;8926:48;8991:18;;49690:57:0;8673:342:1;49690:57:0;57563:21:::1;;:::i;:::-;57595:18;57648:114;57679:8;57702:6;57723;57744:7;57648:16;:114::i;:::-;57778:14:::0;;57624:138;;-1:-1:-1;57624:138:0;-1:-1:-1;57773:71:0::1;;57816:16;;-1:-1:-1::0;;;57816:16:0::1;;;;;;;;;;;57773:71;57864:7;:15;;;57856:47;;;::::0;-1:-1:-1;;;57856:47:0;;9222:2:1;57856:47:0::1;::::0;::::1;9204:21:1::0;9261:2;9241:18;;;9234:30;-1:-1:-1;;;9280:18:1;;;9273:49;9339:18;;57856:47:0::1;9020:343:1::0;57856:47:0::1;57947:6;::::0;-1:-1:-1;;;;;57936:17:0;;::::1;57947:6:::0;::::1;57936:17;::::0;:38:::1;;;57968:6;-1:-1:-1::0;;;;;57957:17:0::1;:7;-1:-1:-1::0;;;;;57957:17:0::1;;57936:38;57914:118;;;::::0;-1:-1:-1;;;57914:118:0;;9570:2:1;57914:118:0::1;::::0;::::1;9552:21:1::0;9609:2;9589:18;;;9582:30;9648:32;9628:18;;;9621:60;9698:18;;57914:118:0::1;9368:354:1::0;57914:118:0::1;58050:36;::::0;-1:-1:-1;;;;;58050:36:0;::::1;::::0;58066:10;;58050:36:::1;::::0;;;::::1;58097:252;58133:10;58158:6;58179;58200:7;58222;58244;:11;;;58270:7;:15;;;58300:7;:19;;;58334:4;58097:21;:252::i;:::-;-1:-1:-1::0;58367:4:0::1;::::0;57337:1042;-1:-1:-1;;;;;;;57337:1042:0:o;62785:304::-;62879:14;;62829:7;;-1:-1:-1;;;;;62879:14:0;62925:28;;;;;:84;;;63008:1;62970:11;-1:-1:-1;;;;;62970:21:0;;62992:12;:10;:12::i;:::-;62970:35;;-1:-1:-1;;;;;;62970:35:0;;;;;;;-1:-1:-1;;;;;194:32:1;;;62970:35:0;;;176:51:1;149:18;;62970:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:39;62925:84;62907:149;;;63043:1;63036:8;;;62785:304;:::o;62907:149::-;-1:-1:-1;;63075:6:0;;;62785:304::o;54117:840::-;54274:4;54315:6;-1:-1:-1;;;;;54299:22:0;:12;:10;:12::i;:::-;-1:-1:-1;;;;;54299:22:0;;54291:48;;;;-1:-1:-1;;;54291:48:0;;7009:2:1;54291:48:0;;;6991:21:1;7048:2;7028:18;;;7021:30;-1:-1:-1;;;7067:18:1;;;7060:43;7120:18;;54291:48:0;6807:337:1;54291:48:0;54352:21;;:::i;:::-;54384:18;54437:114;54468:8;54491:6;54512;54533:7;54437:16;:114::i;:::-;54567:14;;54413:138;;-1:-1:-1;54413:138:0;-1:-1:-1;54562:71:0;;54605:16;;-1:-1:-1;;;54605:16:0;;;;;;;;;;;54562:71;54748:6;;54779:11;;;;54645:238;;54681:10;;54706:6;;54727;;-1:-1:-1;;;;;54748:6:0;;;;54769:21;;:7;:21;:::i;:::-;54805:1;54821:7;:15;;;54851:1;54867:5;54645:21;:238::i;:::-;54899:28;;54916:10;;54899:28;;;;;-1:-1:-1;54945:4:0;;54117:840;-1:-1:-1;;;;;;54117:840:0:o;48725:792::-;33425:19;33448:13;-1:-1:-1;;;33448:13:0;;;;33447:14;;33495:34;;;;-1:-1:-1;33513:12:0;;33528:1;-1:-1:-1;;;33513:12:0;;;;;:16;33495:34;33494:108;;;-1:-1:-1;33574:4:0;22197:19;:23;;;33535:66;;-1:-1:-1;33584:12:0;;-1:-1:-1;;;33584:12:0;;;;33600:1;33584:17;33535:66;33472:204;;;;-1:-1:-1;;;33472:204:0;;10380:2:1;33472:204:0;;;10362:21:1;10419:2;10399:18;;;10392:30;10458:34;10438:18;;;10431:62;-1:-1:-1;;;10509:18:1;;;10502:44;10563:19;;33472:204:0;10178:410:1;33472:204:0;33687:12;:16;;-1:-1:-1;;;;33687:16:0;-1:-1:-1;;;33687:16:0;;;33714:67;;;;33749:13;:20;;-1:-1:-1;;;;33749:20:0;-1:-1:-1;;;33749:20:0;;;33714:67;-1:-1:-1;;;;;48999:21:0;::::1;48991:48;;;::::0;-1:-1:-1;;;48991:48:0;;10795:2:1;48991:48:0::1;::::0;::::1;10777:21:1::0;10834:2;10814:18;;;10807:30;-1:-1:-1;;;10853:18:1;;;10846:44;10907:18;;48991:48:0::1;10593:338:1::0;48991:48:0::1;-1:-1:-1::0;;;;;49058:27:0;::::1;49050:61;;;::::0;-1:-1:-1;;;49050:61:0;;11138:2:1;49050:61:0::1;::::0;::::1;11120:21:1::0;11177:2;11157:18;;;11150:30;-1:-1:-1;;;11196:18:1;;;11189:51;11257:18;;49050:61:0::1;10936:345:1::0;49050:61:0::1;-1:-1:-1::0;;;;;49130:25:0;::::1;49122:56;;;::::0;-1:-1:-1;;;49122:56:0;;11488:2:1;49122:56:0::1;::::0;::::1;11470:21:1::0;11527:2;11507:18;;;11500:30;-1:-1:-1;;;11546:18:1;;;11539:48;11604:18;;49122:56:0::1;11286:342:1::0;49122:56:0::1;-1:-1:-1::0;;;;;49197:30:0;::::1;49189:66;;;::::0;-1:-1:-1;;;49189:66:0;;11835:2:1;49189:66:0::1;::::0;::::1;11817:21:1::0;11874:2;11854:18;;;11847:30;11913:25;11893:18;;;11886:53;11956:18;;49189:66:0::1;11633:347:1::0;49189:66:0::1;49268:6;:16:::0;;-1:-1:-1;;;;;;49268:16:0;;::::1;-1:-1:-1::0;;;;;49268:16:0;;::::1;::::0;;;::::1;::::0;;;49295:6:::1;:16:::0;;;49322:10:::1;:24:::0;;;::::1;::::0;;::::1;;::::0;;49357:12:::1;:28:::0;;;::::1;::::0;;::::1;;::::0;;-1:-1:-1;49396:36:0;;;::::1;::::0;;::::1;;::::0;;49443:14:::1;:32:::0;;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;49497:12:::1;:10;:12::i;:::-;49486:8;:23:::0;;-1:-1:-1;;;;;;49486:23:0::1;-1:-1:-1::0;;;;;49486:23:0;;;::::1;::::0;;;::::1;::::0;;33803:102;;;;33854:5;33838:21;;-1:-1:-1;;;;33838:21:0;;;33879:14;;-1:-1:-1;12137:36:1;;33879:14:0;;12125:2:1;12110:18;33879:14:0;;;;;;;33803:102;33414:498;48725:792;;;;;;:::o;53237:::-;49600:6;;53401:4;;-1:-1:-1;;;;;49600:6:0;49584:12;:10;:12::i;:::-;-1:-1:-1;;;;;49584:22:0;;49576:49;;;;-1:-1:-1;;;49576:49:0;;12386:2:1;49576:49:0;;;12368:21:1;12425:2;12405:18;;;12398:30;-1:-1:-1;;;12444:18:1;;;12437:44;12498:18;;49576:49:0;12184:338:1;49576:49:0;53418:21:::1;;:::i;:::-;53450:18;53503:114;53534:8;53557:6;53578;53599:7;53503:16;:114::i;:::-;53633:14:::0;;53479:138;;-1:-1:-1;53479:138:0;-1:-1:-1;53628:71:0::1;;53671:16;;-1:-1:-1::0;;;53671:16:0::1;;;;;;;;;;;53628:71;53711:252;53747:10;53772:6;53793;53814;53835:7;53857;:11;;;53883:7;:15;;;53913:7;:19;;;53947:5;53711:21;:252::i;:::-;53979:20;::::0;53988:10;;53979:20:::1;::::0;;;::::1;-1:-1:-1::0;54017:4:0::1;::::0;53237:792;-1:-1:-1;;;;;;53237:792:0:o;55034:969::-;49600:6;;55203:4;;-1:-1:-1;;;;;49600:6:0;49584:12;:10;:12::i;:::-;-1:-1:-1;;;;;49584:22:0;;49576:49;;;;-1:-1:-1;;;49576:49:0;;12386:2:1;49576:49:0;;;12368:21:1;12425:2;12405:18;;;12398:30;-1:-1:-1;;;12444:18:1;;;12437:44;12498:18;;49576:49:0;12184:338:1;49576:49:0;55220:21:::1;;:::i;:::-;55252:18;55305:114;55336:8;55359:6;55380;55401:7;55305:16;:114::i;:::-;55435:14:::0;;55281:138;;-1:-1:-1;55281:138:0;-1:-1:-1;55430:71:0::1;;55473:16;;-1:-1:-1::0;;;55473:16:0::1;;;;;;;;;;;55430:71;55563:1;55531:7;:28;;;:33;;;;:96;;;;55612:15;55581:7;:28;;;:46;;;55531:96;55513:165;;;55661:5;55654:12;;;;;;55513:165;55793:6;::::0;55824:11:::1;::::0;::::1;::::0;55690:238:::1;::::0;55726:10;;55751:6;;55772;;-1:-1:-1;;;;;55793:6:0;;::::1;::::0;55814:21:::1;::::0;:7;:21:::1;:::i;55690:238::-;55944:29;::::0;55962:10;;55944:29:::1;::::0;;;::::1;-1:-1:-1::0;55991:4:0::1;::::0;55034:969;-1:-1:-1;;;;;;55034:969:0:o;63097:173::-;63229:8;;63211:51;;-1:-1:-1;;;63211:51:0;;-1:-1:-1;;;;;194:32:1;;;63211:51:0;;;176::1;63155:7:0;;63229:8;;63211:41;;149:18:1;;63211:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;63195:13;:11;:13::i;:::-;:67;;;;:::i;:::-;63175:87;63097:173;-1:-1:-1;;63097:173:0:o;49821:392::-;50041:164;50062:8;50085:6;50114:1;50131:7;50153:8;50176:18;50041:6;:164::i;:::-;49821:392;;;;;:::o;50221:315::-;50457:71;50464:8;50474:6;50482;50490:7;50499:8;50509:18;50457:6;:71::i;:::-;50221:315;;;;;;:::o;1659:410::-;1721:14;1626:17;;-1:-1:-1;;;;;1626:17:0;1771:10;1613:30;1748:314;;-1:-1:-1;;;1957:14:0;1953:23;1940:37;1936:2;1932:46;1659:410;:::o;1748:314::-;-1:-1:-1;872:10:0;;1659:410::o;62319:367::-;62477:13;;:::i;:::-;62584:6;;62557:59;;62492:7;;;;62557:59;;62574:8;;-1:-1:-1;;;;;62584:6:0;;;;62592;;62600;;62608:7;;62557:59;;;:::i;:::-;;;;;;;-1:-1:-1;;62557:59:0;;;;;;62533:94;;62557:59;62533:94;;;;62646:19;;;;:7;:19;;;;;;;62638:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;62638:40:0;;;;;;;;;;;;;;62557:59;;62533:94;;-1:-1:-1;62319:367:0;-1:-1:-1;;;;;;62319:367:0:o;58628:2502::-;58958:19;;;;:7;:19;;;;;;;;58951:26;;-1:-1:-1;;58951:26:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;;58951:26:0;;;;;;;;;;59006:15;:27;;;;;59034:6;;-1:-1:-1;;;;;59034:6:0;;;59006:35;;;;;;;;;;;59069;;;;;;;;;-1:-1:-1;;59115:42:0;;;;;;59168;;;;;;;58951:26;59006:35;;;;59069;59278:30;59287:6;59295:3;59300:7;59278:8;:30::i;:::-;59323:16;;59319:151;;59431:12;;59414:44;;59423:6;;-1:-1:-1;;;;;59431:12:0;59445;59414:8;:44::i;:::-;59508:1;59486:19;59493:12;59486:4;:19;:::i;:::-;:23;59482:161;;;59584:47;59593:6;59601:8;59611:19;59618:12;59611:4;:19;:::i;:::-;59584:8;:47::i;:::-;59659:18;59655:1468;;;59695:17;59718:3;-1:-1:-1;;;;;59718:8:0;59734:10;59718:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59694:55;;;59772:12;59764:67;;;;-1:-1:-1;;;59764:67:0;;13640:2:1;59764:67:0;;;13622:21:1;13679:2;13659:18;;;13652:30;-1:-1:-1;;;;;;;;;;;13698:18:1;;;13691:62;-1:-1:-1;;;13769:18:1;;;13762:40;13819:19;;59764:67:0;13438:406:1;59764:67:0;59852:10;:23;;;;;59866:9;59852:23;59848:266;;;59912:12;;:40;;59897:9;;-1:-1:-1;;;;;59912:12:0;;59937:10;;59897:9;59912:40;59897:9;59912:40;59937:10;59912:12;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59896:56;;;60001:4;59971:127;;;;-1:-1:-1;;;59971:127:0;;;;;;;:::i;:::-;59877:237;59848:266;59679:446;59655:1468;;;60135:10;:24;;;;;60150:9;60149:10;60135:24;60131:992;;;60276:6;;:34;;60261:9;;-1:-1:-1;;;;;60276:6:0;;60295:10;;60261:9;60276:34;60261:9;60276:34;60295:10;60276:6;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60260:50;;;60333:4;60325:59;;;;-1:-1:-1;;;60325:59:0;;14469:2:1;60325:59:0;;;14451:21:1;14508:2;14488:18;;;14481:30;-1:-1:-1;;;;;;;;;;;14527:18:1;;;14520:62;-1:-1:-1;;;14598:18:1;;;14591:40;14648:19;;60325:59:0;14267:406:1;60131:992:0;60406:9;:24;;;;;60420:10;60419:11;60406:24;60402:721;;;60530:9;60545:6;-1:-1:-1;;;;;60545:11:0;60564:10;60545:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60529:50;;;60602:4;60594:58;;;;-1:-1:-1;;;60594:58:0;;14880:2:1;60594:58:0;;;14862:21:1;14919:2;14899:18;;;14892:30;-1:-1:-1;;;;;;;;;;;14938:18:1;;;14931:62;-1:-1:-1;;;15009:18:1;;;15002:39;15058:19;;60594:58:0;14678:405:1;60402:721:0;60674:9;:23;;;;;60687:10;60674:23;60670:453;;;60825:17;60848:3;-1:-1:-1;;;;;60848:8:0;60864:10;60848:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60824:55;;;60902:12;60894:63;;;;-1:-1:-1;;;60894:63:0;;15290:2:1;60894:63:0;;;15272:21:1;15329:2;15309:18;;;15302:30;-1:-1:-1;;;;;;;;;;;15348:18:1;;;15341:62;-1:-1:-1;;;15419:18:1;;;15412:36;15465:19;;60894:63:0;15088:402:1;60894:63:0;60990:12;;:40;;60975:9;;-1:-1:-1;;;;;60990:12:0;;61015:10;;60975:9;60990:40;60975:9;60990:40;61015:10;60990:12;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60974:56;;;61053:4;61045:66;;;;-1:-1:-1;;;61045:66:0;;;;;;;:::i;:::-;60699:424;;60670:453;58940:2190;;58628:2502;;;;;;;;;:::o;50544:1806::-;50786:1;50776:7;:11;50768:38;;;;-1:-1:-1;;;50768:38:0;;15697:2:1;50768:38:0;;;15679:21:1;15736:2;15716:18;;;15709:30;-1:-1:-1;;;15755:18:1;;;15748:44;15809:18;;50768:38:0;15495:338:1;50768:38:0;-1:-1:-1;;;;;50825:20:0;;50817:46;;;;-1:-1:-1;;;50817:46:0;;16040:2:1;50817:46:0;;;16022:21:1;16079:2;16059:18;;;16052:30;-1:-1:-1;;;16098:18:1;;;16091:43;16151:18;;50817:46:0;15838:337:1;50817:46:0;50892:6;;-1:-1:-1;;;;;50892:6:0;;;50882:16;;;;50874:63;;;;-1:-1:-1;;;50874:63:0;;16382:2:1;50874:63:0;;;16364:21:1;16421:2;16401:18;;;16394:30;16460:34;16440:18;;;16433:62;-1:-1:-1;;;16511:18:1;;;16504:32;16553:19;;50874:63:0;16180:398:1;50874:63:0;50992:10;50970:18;:32;;;;:64;;;;;51028:6;51006:18;:28;;;;50970:64;50948:141;;;;-1:-1:-1;;;50948:141:0;;16785:2:1;50948:141:0;;;16767:21:1;16824:2;16804:18;;;16797:30;16863:29;16843:18;;;16836:57;16910:18;;50948:141:0;16583:351:1;50948:141:0;51174:6;;51147:59;;51102:18;;51147:59;;51164:8;;-1:-1:-1;;;;;51174:6:0;;51182;;51190;;51198:7;;51147:59;;;:::i;:::-;;;;-1:-1:-1;;51147:59:0;;;;;;;;;51123:94;;51147:59;51123:94;;;;51237:19;;;;:7;:19;;;;;:26;51123:94;;-1:-1:-1;51237:26:0;;51236:27;51228:60;;;;-1:-1:-1;;;51228:60:0;;17725:2:1;51228:60:0;;;17707:21:1;17764:2;17744:18;;;17737:30;-1:-1:-1;;;17783:18:1;;;17776:50;17843:18;;51228:60:0;17523:344:1;51228:60:0;51301:13;51346:6;51329:13;:11;:13::i;:::-;51319:23;;:7;:23;:::i;:::-;51318:34;;;;:::i;:::-;51301:52;;51364:16;51418:6;51395:19;51405:8;51395:9;:19::i;:::-;51385:29;;:7;:29;:::i;:::-;51384:40;;;;:::i;:::-;51364:61;-1:-1:-1;51436:14:0;51453:18;51464:7;51364:61;51453:18;:::i;:::-;51436:35;-1:-1:-1;;;;;;51488:20:0;;51484:562;;51546:6;51533:9;:19;51525:52;;;;-1:-1:-1;;;51525:52:0;;18469:2:1;51525:52:0;;;18451:21:1;18508:2;18488:18;;;18481:30;-1:-1:-1;;;18527:18:1;;;18520:50;18587:18;;51525:52:0;18267:344:1;51525:52:0;51484:562;;;51634:39;;-1:-1:-1;;;51634:39:0;;51667:4;51634:39;;;176:51:1;51610:21:0;;-1:-1:-1;;;;;51634:24:0;;;;;149:18:1;;51634:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;51610:63;;51688:134;51738:12;:10;:12::i;:::-;-1:-1:-1;;;;;51688:31:0;;;51777:4;51801:6;51688:31;:134::i;:::-;51860:39;;-1:-1:-1;;;51860:39:0;;51893:4;51860:39;;;176:51:1;51837:20:0;;-1:-1:-1;;;;;51860:24:0;;;;;149:18:1;;51860:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;51837:62;-1:-1:-1;51974:6:0;51941:28;51956:13;51837:62;51941:28;:::i;:::-;51940:40;51914:120;;;;-1:-1:-1;;;51914:120:0;;18818:2:1;51914:120:0;;;18800:21:1;18857:2;18837:18;;;18830:30;-1:-1:-1;;;18876:18:1;;;18869:48;18934:18;;51914:120:0;18616:342:1;51914:120:0;51595:451;;51484:562;52081:181;;;;;;;;;52102:4;52081:181;;52058:20;;52081:181;;;52121:44;52147:18;52128:15;52121:44;:::i;:::-;52081:181;;;;;;;;;;;;;-1:-1:-1;52081:181:0;;;;;;;-1:-1:-1;;;;;52081:181:0;;;;;;;;;;;;;;;;;;52273:19;;;52081:181;52273:19;;;;;;:28;;;;;;;;-1:-1:-1;;52273:28:0;;;;;;-1:-1:-1;;52273:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;52273:28:0;;;;;;-1:-1:-1;;;;;;52273:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;52317:25;;52273:28;;-1:-1:-1;52273:19:0;;52317:25;;-1:-1:-1;52317:25:0;50757:1593;;;;;50544:1806;;;;;;:::o;61348:434::-;-1:-1:-1;;;;;61477:20:0;;61473:302;;61515:9;61530:3;-1:-1:-1;;;;;61530:8:0;61546:7;61530:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61514:44;;;61581:4;61573:37;;;;-1:-1:-1;;;61573:37:0;;19342:2:1;61573:37:0;;;19324:21:1;19381:2;19361:18;;;19354:30;-1:-1:-1;;;19400:18:1;;;19393:50;19460:18;;61573:37:0;19140:344:1;61573:37:0;61499:123;61348:434;;;:::o;61473:302::-;61669:37;;-1:-1:-1;;;61669:37:0;;-1:-1:-1;;;;;19689:32:1;;;61669:37:0;;;19671:51:1;19738:18;;;19731:34;;;61669:23:0;;;;;19644:18:1;;61669:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;61643:120;;;;-1:-1:-1;;;61643:120:0;;20260:2:1;61643:120:0;;;20242:21:1;20299:2;20279:18;;;20272:30;-1:-1:-1;;;20318:18:1;;;20311:51;20379:18;;61643:120:0;20058:345:1;61643:120:0;61348:434;;;:::o;41040:205::-;41168:68;;;-1:-1:-1;;;;;20666:15:1;;;41168:68:0;;;20648:34:1;20718:15;;20698:18;;;20691:43;20750:18;;;;20743:34;;;41168:68:0;;;;;;;;;;20583:18:1;;;;41168:68:0;;;;;;;;-1:-1:-1;;;;;41168:68:0;-1:-1:-1;;;41168:68:0;;;41141:96;;41161:5;;45388:23;45414:69;45442:4;45414:69;;;;;;;;;;;;;;;;;45422:5;-1:-1:-1;;;;;45414:27:0;;;:69;;;;;:::i;:::-;45388:95;;45502:10;:17;45523:1;45502:22;:56;;;;45539:10;45528:30;;;;;;;;;;;;:::i;:::-;45494:111;;;;-1:-1:-1;;;45494:111:0;;20990:2:1;45494:111:0;;;20972:21:1;21029:2;21009:18;;;21002:30;21068:34;21048:18;;;21041:62;-1:-1:-1;;;21119:18:1;;;21112:40;21169:19;;45494:111:0;20788:406:1;6562:229:0;6699:12;6731:52;6753:6;6761:4;6767:1;6770:12;6699;7936;7950:23;7977:6;-1:-1:-1;;;;;7977:11:0;7996:5;8003:4;7977:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7935:73;;;;8026:69;8053:6;8061:7;8070:10;8082:12;8026:26;:69::i;:::-;8019:76;7648:455;-1:-1:-1;;;;;;;7648:455:0:o;10221:644::-;10406:12;10435:7;10431:427;;;10463:10;:17;10484:1;10463:22;10459:290;;-1:-1:-1;;;;;22197:19:0;;;10673:60;;;;-1:-1:-1;;;10673:60:0;;22100:2:1;10673:60:0;;;22082:21:1;22139:2;22119:18;;;22112:30;22178:31;22158:18;;;22151:59;22227:18;;10673:60:0;21898:353:1;10673:60:0;-1:-1:-1;10770:10:0;10763:17;;10431:427;10813:33;10821:10;10833:12;11568:17;;:21;11564:388;;11800:10;11794:17;11857:15;11844:10;11840:2;11836:19;11829:44;11564:388;11927:12;11920:20;;-1:-1:-1;;;11920:20:0;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;238:139:1:-;-1:-1:-1;;;;;321:31:1;;311:42;;301:70;;367:1;364;357:12;301:70;238:139;:::o;382:549::-;476:6;484;492;500;553:3;541:9;532:7;528:23;524:33;521:53;;;570:1;567;560:12;521:53;606:9;593:23;583:33;;666:2;655:9;651:18;638:32;679:39;712:5;679:39;:::i;:::-;737:5;-1:-1:-1;794:2:1;779:18;;766:32;807:41;766:32;807:41;:::i;:::-;382:549;;;;-1:-1:-1;867:7:1;;921:2;906:18;893:32;;-1:-1:-1;;382:549:1:o;1310:180::-;1369:6;1422:2;1410:9;1401:7;1397:23;1393:32;1390:52;;;1438:1;1435;1428:12;1390:52;-1:-1:-1;1461:23:1;;1310:180;-1:-1:-1;1310:180:1:o;2112:323::-;2180:6;2188;2241:2;2229:9;2220:7;2216:23;2212:32;2209:52;;;2257:1;2254;2247:12;2209:52;2293:9;2280:23;2270:33;;2353:2;2342:9;2338:18;2325:32;2366:39;2399:5;2366:39;:::i;:::-;2424:5;2414:15;;;2112:323;;;;;:::o;2440:250::-;2525:1;2535:113;2549:6;2546:1;2543:13;2535:113;;;2625:11;;;2619:18;2606:11;;;2599:39;2571:2;2564:10;2535:113;;;-1:-1:-1;;2682:1:1;2664:16;;2657:27;2440:250::o;2695:396::-;2844:2;2833:9;2826:21;2807:4;2876:6;2870:13;2919:6;2914:2;2903:9;2899:18;2892:34;2935:79;3007:6;3002:2;2991:9;2987:18;2982:2;2974:6;2970:15;2935:79;:::i;:::-;3075:2;3054:15;-1:-1:-1;;3050:29:1;3035:45;;;;3082:2;3031:54;;2695:396;-1:-1:-1;;2695:396:1:o;3096:255::-;3155:6;3208:2;3196:9;3187:7;3183:23;3179:32;3176:52;;;3224:1;3221;3214:12;3176:52;3263:9;3250:23;3282:39;3315:5;3282:39;:::i;:::-;3340:5;3096:255;-1:-1:-1;;;3096:255:1:o;3356:707::-;3467:6;3475;3483;3491;3499;3552:3;3540:9;3531:7;3527:23;3523:33;3520:53;;;3569:1;3566;3559:12;3520:53;3605:9;3592:23;3582:33;;3665:2;3654:9;3650:18;3637:32;3678:39;3711:5;3678:39;:::i;:::-;3736:5;-1:-1:-1;3793:2:1;3778:18;;3765:32;3806:41;3765:32;3806:41;:::i;:::-;3866:7;-1:-1:-1;3920:2:1;3905:18;;3892:32;;-1:-1:-1;3976:3:1;3961:19;;3948:33;3990:41;3948:33;3990:41;:::i;:::-;4050:7;4040:17;;;3356:707;;;;;;;;:::o;4276:938::-;4396:6;4404;4412;4420;4428;4436;4489:3;4477:9;4468:7;4464:23;4460:33;4457:53;;;4506:1;4503;4496:12;4457:53;4545:9;4532:23;4564:39;4597:5;4564:39;:::i;:::-;4622:5;-1:-1:-1;4674:2:1;4659:18;;4646:32;;-1:-1:-1;4730:2:1;4715:18;;4702:32;4743:41;4702:32;4743:41;:::i;:::-;4803:7;-1:-1:-1;4862:2:1;4847:18;;4834:32;4875:41;4834:32;4875:41;:::i;:::-;4935:7;-1:-1:-1;4994:3:1;4979:19;;4966:33;5008:41;4966:33;5008:41;:::i;:::-;5068:7;-1:-1:-1;5127:3:1;5112:19;;5099:33;5141:41;5099:33;5141:41;:::i;:::-;5201:7;5191:17;;;4276:938;;;;;;;;:::o;5219:163::-;5286:20;;5346:10;5335:22;;5325:33;;5315:61;;5372:1;5369;5362:12;5315:61;5219:163;;;:::o;5387:630::-;5497:6;5505;5513;5521;5529;5582:3;5570:9;5561:7;5557:23;5553:33;5550:53;;;5599:1;5596;5589:12;5550:53;5635:9;5622:23;5612:33;;5695:2;5684:9;5680:18;5667:32;5708:39;5741:5;5708:39;:::i;:::-;5766:5;-1:-1:-1;5818:2:1;5803:18;;5790:32;;-1:-1:-1;5874:2:1;5859:18;;5846:32;5887:41;5846:32;5887:41;:::i;:::-;5947:7;-1:-1:-1;5973:38:1;6006:3;5991:19;;5973:38;:::i;:::-;5963:48;;5387:630;;;;;;;;:::o;6022:780::-;6141:6;6149;6157;6165;6173;6181;6234:3;6222:9;6213:7;6209:23;6205:33;6202:53;;;6251:1;6248;6241:12;6202:53;6287:9;6274:23;6264:33;;6347:2;6336:9;6332:18;6319:32;6360:39;6393:5;6360:39;:::i;:::-;6418:5;-1:-1:-1;6475:2:1;6460:18;;6447:32;6488:41;6447:32;6488:41;:::i;:::-;6548:7;-1:-1:-1;6602:2:1;6587:18;;6574:32;;-1:-1:-1;6658:3:1;6643:19;;6630:33;6672:41;6630:33;6672:41;:::i;:::-;6732:7;-1:-1:-1;6758:38:1;6791:3;6776:19;;6758:38;:::i;:::-;6748:48;;6022:780;;;;;;;;:::o;9727:184::-;9797:6;9850:2;9838:9;9829:7;9825:23;9821:32;9818:52;;;9866:1;9863;9856:12;9818:52;-1:-1:-1;9889:16:1;;9727:184;-1:-1:-1;9727:184:1:o;9916:127::-;9977:10;9972:3;9968:20;9965:1;9958:31;10008:4;10005:1;9998:15;10032:4;10029:1;10022:15;10048:125;10113:9;;;10134:10;;;10131:36;;;10147:18;;:::i;12527:563::-;12784:19;;;-1:-1:-1;;12891:2:1;12887:15;;;12883:24;;12878:2;12869:12;;12862:46;12942:15;;;12938:24;;12933:2;12924:12;;12917:46;12997:15;;12993:24;12988:2;12979:12;;12972:46;13043:2;13034:12;;13027:28;13080:3;13071:13;;12527:563::o;13095:128::-;13162:9;;;13183:11;;;13180:37;;;13197:18;;:::i;13849:413::-;14051:2;14033:21;;;14090:2;14070:18;;;14063:30;-1:-1:-1;;;;;;;;;;;14124:2:1;14109:18;;14102:62;-1:-1:-1;;;14195:2:1;14180:18;;14173:47;14252:3;14237:19;;13849:413::o;17872:168::-;17945:9;;;17976;;17993:15;;;17987:22;;17973:37;17963:71;;18014:18;;:::i;18045:217::-;18085:1;18111;18101:132;;18155:10;18150:3;18146:20;18143:1;18136:31;18190:4;18187:1;18180:15;18218:4;18215:1;18208:15;18101:132;-1:-1:-1;18247:9:1;;18045:217::o;18963:172::-;19030:10;19060;;;19072;;;19056:27;;19095:11;;;19092:37;;;19109:18;;:::i;:::-;19092:37;18963:172;;;;:::o;19776:277::-;19843:6;19896:2;19884:9;19875:7;19871:23;19867:32;19864:52;;;19912:1;19909;19902:12;19864:52;19944:9;19938:16;19997:5;19990:13;19983:21;19976:5;19973:32;19963:60;;20019:1;20016;20009:12;21606:287;21735:3;21773:6;21767:13;21789:66;21848:6;21843:3;21836:4;21828:6;21824:17;21789:66;:::i;:::-;21871:16;;;;;21606:287;-1:-1:-1;;21606:287:1:o
Swarm Source
ipfs://5a7a56027b6753248e5787c3bb2b812f124fb3986819251d4d62ac42db64b3e2
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.