Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Grant Role | 12600042 | 1310 days ago | IN | 0 ETH | 0.00076891 |
Loading...
Loading
Contract Name:
Exchange
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-solidity/contracts/access/AccessControl.sol"; import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol"; import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol"; import "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol"; import "openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol"; import "openzeppelin-solidity/contracts/token/ERC1155/IERC1155.sol"; import "openzeppelin-solidity/contracts/token/ERC1155/IERC1155Receiver.sol"; import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol"; contract Exchange is AccessControl, IERC721Receiver, IERC1155Receiver, ReentrancyGuard { using SafeMath for uint256; struct NftTokenInfo { address tokenAddress; uint256 id; uint256 amount; } bytes32 public SIGNER_ROLE = keccak256("SIGNER_ROLE"); event ExchangeMadeErc721( address seller, address buyer, address sellTokenAddress, uint256 sellId, uint256 sellAmount, address buyTokenAddress, uint256 buyId, uint256 buyAmount, address[] feeAddresses, uint256[] feeAmounts ); event ExchangeMadeErc1155( address seller, address buyer, address sellTokenAddress, uint256 sellId, uint256 sellAmount, address buyTokenAddress, uint256 buyId, uint256 buyAmount, address[] feeAddresses, uint256[] feeAmounts ); constructor() { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(SIGNER_ROLE, _msgSender()); } function makeExchangeERC721( bytes32 idOrder, address[2] calldata SellerBuyer, NftTokenInfo calldata tokenToBuy, NftTokenInfo calldata tokenToSell, address[] calldata feeAddresses, uint256[] calldata feeAmounts, bytes calldata signature ) external nonReentrant { require( tokenToBuy.tokenAddress != address(0) && tokenToBuy.amount == 0, "Exchange: Wrong tokenToBuy" ); require( tokenToSell.tokenAddress != address(0) && tokenToSell.id == 0, "Exchange: Wrong tokenToSell" ); require( feeAddresses.length == feeAmounts.length, "Exchange: Wrong fees" ); _verifySigner( idOrder, SellerBuyer, tokenToBuy, tokenToSell, feeAddresses, feeAmounts, signature ); IERC721(tokenToBuy.tokenAddress).safeTransferFrom( SellerBuyer[0], SellerBuyer[1], tokenToBuy.id ); uint256 tokenToSeller = tokenToSell.amount; for (uint256 i = 0; i < feeAddresses.length; i = i.add(1)) { tokenToSeller = tokenToSeller.sub(uint256(feeAmounts[i])); IERC20(tokenToSell.tokenAddress).transferFrom( SellerBuyer[1], address(feeAddresses[i]), uint256(feeAmounts[i]) ); } IERC20(tokenToSell.tokenAddress).transferFrom( SellerBuyer[1], SellerBuyer[0], tokenToSeller ); emit ExchangeMadeErc721( SellerBuyer[0], SellerBuyer[1], tokenToBuy.tokenAddress, tokenToBuy.id, tokenToBuy.amount, tokenToSell.tokenAddress, tokenToSell.id, tokenToSell.amount, feeAddresses, feeAmounts ); } function makeExchangeERC1155( bytes32 idOrder, address[2] calldata SellerBuyer, NftTokenInfo calldata tokenToBuy, NftTokenInfo calldata tokenToSell, address[] calldata feeAddresses, uint256[] calldata feeAmounts, bytes calldata signature ) external nonReentrant { require( tokenToBuy.tokenAddress != address(0), "Exchange: Wrong tokenToBuy" ); require( tokenToSell.tokenAddress != address(0) && tokenToSell.id == 0, "Exchange: Wrong tokenToSell" ); require( feeAddresses.length == feeAmounts.length, "Exchange: Wrong fees" ); _verifySigner( idOrder, SellerBuyer, tokenToBuy, tokenToSell, feeAddresses, feeAmounts, signature ); IERC1155(tokenToBuy.tokenAddress).safeTransferFrom( SellerBuyer[0], SellerBuyer[1], tokenToBuy.id, tokenToBuy.amount, "" ); uint256 tokenToSeller = tokenToSell.amount; for (uint256 i = 0; i < feeAddresses.length; i = i.add(1)) { tokenToSeller = tokenToSeller.sub(feeAmounts[i]); IERC20(tokenToSell.tokenAddress).transferFrom( SellerBuyer[1], feeAddresses[i], feeAmounts[i] ); } IERC20(tokenToSell.tokenAddress).transferFrom( SellerBuyer[1], SellerBuyer[0], tokenToSeller ); emit ExchangeMadeErc1155( SellerBuyer[0], SellerBuyer[1], tokenToBuy.tokenAddress, tokenToBuy.id, tokenToBuy.amount, tokenToSell.tokenAddress, tokenToSell.id, tokenToSell.amount, feeAddresses, feeAmounts ); } function _verifySigner( bytes32 idOrder, address[2] calldata SellerBuyer, NftTokenInfo calldata tokenToBuy, NftTokenInfo calldata tokenToSell, address[] calldata feeAddresses, uint256[] calldata feeAmounts, bytes calldata signature ) private view { bytes memory message = abi.encodePacked( idOrder, SellerBuyer[0], tokenToBuy.tokenAddress, tokenToBuy.id, tokenToBuy.amount ); message = abi.encodePacked( message, tokenToSell.tokenAddress, //tokenToSell.id, tokenToSell.amount ); message = abi.encodePacked( message, feeAddresses, feeAmounts, SellerBuyer[1] ); address messageSigner = ECDSA.recover(keccak256(message), signature); require( hasRole(SIGNER_ROLE, messageSigner), "Exchange: Signer should sign transaction" ); } function onERC1155Received( address, address, uint256, uint256, bytes calldata ) external pure override returns (bytes4) { return IERC1155Receiver.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] calldata, uint256[] calldata, bytes calldata ) external pure override returns (bytes4) { return IERC1155Receiver.onERC1155BatchReceived.selector; } function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { return IERC721Receiver.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function grantRole(bytes32 role, address account) external; function revokeRole(bytes32 role, address account) external; function renounceRole(bytes32 role, address account) external; } /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping (address => bool) members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/ */ function _checkRole(bytes32 role, address account) internal view { if(!hasRole(role, account)) { revert(string(abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ))); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, getRoleAdmin(role), adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns(bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns(bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } } else if (signature.length == 64) { // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { let vs := mload(add(signature, 0x40)) r := mload(add(signature, 0x20)) s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } } else { revert("ECDSA: invalid signature length"); } return recover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value"); require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value"); // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); require(signer != address(0), "ECDSA: invalid signature"); return signer; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 999999 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"sellTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"sellId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sellAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"buyId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"buyAmount","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"feeAddresses","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"feeAmounts","type":"uint256[]"}],"name":"ExchangeMadeErc1155","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"sellTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"sellId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sellAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"buyId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"buyAmount","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"feeAddresses","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"feeAmounts","type":"uint256[]"}],"name":"ExchangeMadeErc721","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"idOrder","type":"bytes32"},{"internalType":"address[2]","name":"SellerBuyer","type":"address[2]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Exchange.NftTokenInfo","name":"tokenToBuy","type":"tuple"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Exchange.NftTokenInfo","name":"tokenToSell","type":"tuple"},{"internalType":"address[]","name":"feeAddresses","type":"address[]"},{"internalType":"uint256[]","name":"feeAmounts","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"makeExchangeERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"idOrder","type":"bytes32"},{"internalType":"address[2]","name":"SellerBuyer","type":"address[2]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Exchange.NftTokenInfo","name":"tokenToBuy","type":"tuple"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Exchange.NftTokenInfo","name":"tokenToSell","type":"tuple"},{"internalType":"address[]","name":"feeAddresses","type":"address[]"},{"internalType":"uint256[]","name":"feeAmounts","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"makeExchangeERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040527fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f706002553480156200003557600080fd5b5060018055620000486000335b6200005d565b60025462000057903362000042565b6200010d565b6200006982826200006d565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000069576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000c93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61243e806200011d6000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80638fa777c51161008c578063a217fddf11610066578063a217fddf14610241578063bc197c8114610249578063d547741f14610284578063f23a6e6114610297576100df565b80638fa777c5146101e157806391d14854146101f4578063a1ebf35d14610238576100df565b80632f2ff15d116100bd5780632f2ff15d146101a657806336568abe146101bb5780638cba32e4146101ce576100df565b806301ffc9a7146100e4578063150b7a021461010c578063248a9ca314610175575b600080fd5b6100f76100f2366004611fd8565b6102d0565b60405190151581526020015b60405180910390f35b61014461011a366004611db2565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610103565b610198610183366004611eb5565b60009081526020819052604090206001015490565b604051908152602001610103565b6101b96101b4366004611ecd565b61036b565b005b6101b96101c9366004611ecd565b610397565b6101b96101dc366004611ef8565b61044f565b6101b96101ef366004611ef8565b610ad0565b6100f7610202366004611ecd565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61019860025481565b610198600081565b610144610257366004611cfb565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b6101b9610292366004611ecd565b6110c2565b6101446102a5366004611e1f565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061036357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b90505b919050565b60008281526020819052604090206001015461038881335b6110e8565b61039283836111b8565b505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610441576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61044b82826112a8565b5050565b600260015414156104bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610438565b600260015560006104d060208a018a611ce1565b73ffffffffffffffffffffffffffffffffffffffff16141580156104f657506040880135155b61055c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45786368616e67653a2057726f6e6720746f6b656e546f4275790000000000006044820152606401610438565b600061056b6020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff161415801561059157506020870135155b6105f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2057726f6e6720746f6b656e546f53656c6c00000000006044820152606401610438565b848314610660576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f45786368616e67653a2057726f6e6720666565730000000000000000000000006044820152606401610438565b6106728a8a8a8a8a8a8a8a8a8a61135f565b61067f6020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e6106a760208c018c611ce1565b6106b760408d0160208e01611ce1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260208b01356044820152606401600060405180830381600087803b15801561072e57600080fd5b505af1158015610742573d6000803e3d6000fd5b50505050604087013560005b86811015610930576107a8868683818110610792577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135836115b690919063ffffffff16565b91506107b760208a018a611ce1565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd6107e260408e0160208f01611ce1565b8a8a8581811061081b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906108309190611ce1565b898986818110610869577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401602060405180830381600087803b1580156108e557600080fd5b505af11580156108f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091d9190611e95565b506109298160016115c9565b905061074e565b5061093e6020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd61096960408d0160208e01611ce1565b61097660208e018e611ce1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260448101849052606401602060405180830381600087803b1580156109ea57600080fd5b505af11580156109fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a229190611e95565b507f74d58a65dc3a851bf09ab93723849d19404719aa639a1b718d934449acba75168a60005b602002016020810190610a5b9190611ce1565b610a6b60408d0160208e01611ce1565b610a7860208d018d611ce1565b6020808e01359060408f013590610a91908f018f611ce1565b8e602001358f604001358f8f8f8f604051610ab79c9b9a999897969594939291906121fd565b60405180910390a1505060018055505050505050505050565b60026001541415610b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610438565b60026001556000610b5160208a018a611ce1565b73ffffffffffffffffffffffffffffffffffffffff161415610bcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45786368616e67653a2057726f6e6720746f6b656e546f4275790000000000006044820152606401610438565b6000610bde6020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff1614158015610c0457506020870135155b610c6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2057726f6e6720746f6b656e546f53656c6c00000000006044820152606401610438565b848314610cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f45786368616e67653a2057726f6e6720666565730000000000000000000000006044820152606401610438565b610ce58a8a8a8a8a8a8a8a8a8a61135f565b610cf26020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff1663f242432a610d1a60208c018c611ce1565b610d2a60408d0160208e01611ce1565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260208c013560448301528b0135606482015260a06084820152600060a482015260c401600060405180830381600087803b158015610dba57600080fd5b505af1158015610dce573d6000803e3d6000fd5b50505050604087013560005b86811015610fa657610e1e868683818110610792577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9150610e2d60208a018a611ce1565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd610e5860408e0160208f01611ce1565b8a8a85818110610e91577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002016020810190610ea69190611ce1565b898986818110610edf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401602060405180830381600087803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f939190611e95565b50610f9f8160016115c9565b9050610dda565b50610fb46020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd610fdf60408d0160208e01611ce1565b610fec60208e018e611ce1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260448101849052606401602060405180830381600087803b15801561106057600080fd5b505af1158015611074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110989190611e95565b507fd660850669486fa3a2f51b47e56f6c7c230f046c612c27745baae05abd68f98d8a6000610a48565b6000828152602081905260409020600101546110de8133610383565b61039283836112a8565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661044b5761113e8173ffffffffffffffffffffffffffffffffffffffff1660146115d5565b6111498360206115d5565b60405160200161115a92919061217c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a0000000000000000000000000000000000000000000000000000000008252610438916004016122b7565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661044b5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561124a3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff161561044b5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008a61136f60208c018c611ce1565b61137c60208c018c611ce1565b604080516020818101959095527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b8116828401529290931b9091166054830152918b01356068820152908a0135608882015260a801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905290508061141460208a018a611ce1565b896040013560405160200161142b93929190612065565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905080878787878e60016020020160208101906114769190611ce1565b60405160200161148b969594939291906120b7565b604051602081830303815290604052905060006114e5828051906020012085858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118db92505050565b60025460009081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205490915060ff166115a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f45786368616e67653a205369676e65722073686f756c64207369676e2074726160448201527f6e73616374696f6e0000000000000000000000000000000000000000000000006064820152608401610438565b505050505050505050505050565b60006115c2828461235d565b9392505050565b60006115c28284612308565b606060006115e4836002612320565b6115ef906002612308565b67ffffffffffffffff81111561162e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611658576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106116b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611740577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061177c846002612320565b611787906001612308565b90505b6001811115611872577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106117ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b82828151811061182c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361186b816123a4565b905061178a565b5083156115c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610438565b6000806000808451604114156119055750505060208201516040830151606084015160001a6119ae565b84516040141561194c5750505060408201516020830151907f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81169060ff1c601b016119ae565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610438565b6119ba868285856119c4565b9695505050505050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115611a76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610438565b8360ff16601b1480611a8b57508360ff16601c145b611b17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610438565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611b6b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611c13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610438565b95945050505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461036657600080fd5b60008083601f840112611c51578182fd5b50813567ffffffffffffffff811115611c68578182fd5b6020830191508360208260051b8501011115611c8357600080fd5b9250929050565b60008083601f840112611c9b578182fd5b50813567ffffffffffffffff811115611cb2578182fd5b602083019150836020828501011115611c8357600080fd5b600060608284031215611cdb578081fd5b50919050565b600060208284031215611cf2578081fd5b6115c282611c1c565b60008060008060008060008060a0898b031215611d16578384fd5b611d1f89611c1c565b9750611d2d60208a01611c1c565b9650604089013567ffffffffffffffff80821115611d49578586fd5b611d558c838d01611c40565b909850965060608b0135915080821115611d6d578586fd5b611d798c838d01611c40565b909650945060808b0135915080821115611d91578384fd5b50611d9e8b828c01611c8a565b999c989b5096995094979396929594505050565b600080600080600060808688031215611dc9578081fd5b611dd286611c1c565b9450611de060208701611c1c565b935060408601359250606086013567ffffffffffffffff811115611e02578182fd5b611e0e88828901611c8a565b969995985093965092949392505050565b60008060008060008060a08789031215611e37578182fd5b611e4087611c1c565b9550611e4e60208801611c1c565b94506040870135935060608701359250608087013567ffffffffffffffff811115611e77578283fd5b611e8389828a01611c8a565b979a9699509497509295939492505050565b600060208284031215611ea6578081fd5b815180151581146115c2578182fd5b600060208284031215611ec6578081fd5b5035919050565b60008060408385031215611edf578182fd5b82359150611eef60208401611c1c565b90509250929050565b6000806000806000806000806000806101808b8d031215611f17578182fd5b8a35995060608b018c811115611f2b578283fd5b60208c019950611f3b8d82611cca565b985050611f4b8c60c08d01611cca565b96506101208b013567ffffffffffffffff80821115611f68578384fd5b611f748e838f01611c40565b90985096506101408d0135915080821115611f8d578384fd5b611f998e838f01611c40565b90965094506101608d0135915080821115611fb2578384fd5b50611fbf8d828e01611c8a565b915080935050809150509295989b9194979a5092959850565b600060208284031215611fe9578081fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115c2578182fd5b60008284527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115612049578081fd5b8260051b80836020870137939093016020019283525090919050565b60008451612077818460208901612374565b60609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001691909301908152601481019190915260340192915050565b6000875160206120ca8285838d01612374565b9083019088835b8981101561210a5773ffffffffffffffffffffffffffffffffffffffff6120f783611c1c565b16845292820192908201906001016120d1565b5050507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115612139578182fd5b8460051b8087833760609490941b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169301928352505060140195945050505050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516121b4816017850160208801612374565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516121f1816028840160208801612374565b01602801949350505050565b600073ffffffffffffffffffffffffffffffffffffffff808f168352808e166020840152808d1660408401528b60608401528a6080840152808a1660a08401528860c08401528760e084015261014061010084015261014083018681526101608401905087835b8881101561228c578361227683611c1c565b1683526020928301929190910190600101612264565b50508381036101208501526122a2818688612018565b925050509d9c50505050505050505050505050565b60006020825282518060208401526122d6816040850160208701612374565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000821982111561231b5761231b6123d9565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612358576123586123d9565b500290565b60008282101561236f5761236f6123d9565b500390565b60005b8381101561238f578181015183820152602001612377565b8381111561239e576000848401525b50505050565b6000816123b3576123b36123d9565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122007f7a8f231880fe62ada0f7423d9049652727730c9080e75a683bfcf27ec7a8464736f6c63430008030033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80638fa777c51161008c578063a217fddf11610066578063a217fddf14610241578063bc197c8114610249578063d547741f14610284578063f23a6e6114610297576100df565b80638fa777c5146101e157806391d14854146101f4578063a1ebf35d14610238576100df565b80632f2ff15d116100bd5780632f2ff15d146101a657806336568abe146101bb5780638cba32e4146101ce576100df565b806301ffc9a7146100e4578063150b7a021461010c578063248a9ca314610175575b600080fd5b6100f76100f2366004611fd8565b6102d0565b60405190151581526020015b60405180910390f35b61014461011a366004611db2565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610103565b610198610183366004611eb5565b60009081526020819052604090206001015490565b604051908152602001610103565b6101b96101b4366004611ecd565b61036b565b005b6101b96101c9366004611ecd565b610397565b6101b96101dc366004611ef8565b61044f565b6101b96101ef366004611ef8565b610ad0565b6100f7610202366004611ecd565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61019860025481565b610198600081565b610144610257366004611cfb565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b6101b9610292366004611ecd565b6110c2565b6101446102a5366004611e1f565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061036357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b90505b919050565b60008281526020819052604090206001015461038881335b6110e8565b61039283836111b8565b505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610441576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61044b82826112a8565b5050565b600260015414156104bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610438565b600260015560006104d060208a018a611ce1565b73ffffffffffffffffffffffffffffffffffffffff16141580156104f657506040880135155b61055c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45786368616e67653a2057726f6e6720746f6b656e546f4275790000000000006044820152606401610438565b600061056b6020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff161415801561059157506020870135155b6105f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2057726f6e6720746f6b656e546f53656c6c00000000006044820152606401610438565b848314610660576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f45786368616e67653a2057726f6e6720666565730000000000000000000000006044820152606401610438565b6106728a8a8a8a8a8a8a8a8a8a61135f565b61067f6020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e6106a760208c018c611ce1565b6106b760408d0160208e01611ce1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260208b01356044820152606401600060405180830381600087803b15801561072e57600080fd5b505af1158015610742573d6000803e3d6000fd5b50505050604087013560005b86811015610930576107a8868683818110610792577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135836115b690919063ffffffff16565b91506107b760208a018a611ce1565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd6107e260408e0160208f01611ce1565b8a8a8581811061081b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906108309190611ce1565b898986818110610869577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401602060405180830381600087803b1580156108e557600080fd5b505af11580156108f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091d9190611e95565b506109298160016115c9565b905061074e565b5061093e6020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd61096960408d0160208e01611ce1565b61097660208e018e611ce1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260448101849052606401602060405180830381600087803b1580156109ea57600080fd5b505af11580156109fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a229190611e95565b507f74d58a65dc3a851bf09ab93723849d19404719aa639a1b718d934449acba75168a60005b602002016020810190610a5b9190611ce1565b610a6b60408d0160208e01611ce1565b610a7860208d018d611ce1565b6020808e01359060408f013590610a91908f018f611ce1565b8e602001358f604001358f8f8f8f604051610ab79c9b9a999897969594939291906121fd565b60405180910390a1505060018055505050505050505050565b60026001541415610b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610438565b60026001556000610b5160208a018a611ce1565b73ffffffffffffffffffffffffffffffffffffffff161415610bcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45786368616e67653a2057726f6e6720746f6b656e546f4275790000000000006044820152606401610438565b6000610bde6020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff1614158015610c0457506020870135155b610c6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2057726f6e6720746f6b656e546f53656c6c00000000006044820152606401610438565b848314610cd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f45786368616e67653a2057726f6e6720666565730000000000000000000000006044820152606401610438565b610ce58a8a8a8a8a8a8a8a8a8a61135f565b610cf26020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff1663f242432a610d1a60208c018c611ce1565b610d2a60408d0160208e01611ce1565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff938416600482015292909116602483015260208c013560448301528b0135606482015260a06084820152600060a482015260c401600060405180830381600087803b158015610dba57600080fd5b505af1158015610dce573d6000803e3d6000fd5b50505050604087013560005b86811015610fa657610e1e868683818110610792577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9150610e2d60208a018a611ce1565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd610e5860408e0160208f01611ce1565b8a8a85818110610e91577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002016020810190610ea69190611ce1565b898986818110610edf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401602060405180830381600087803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f939190611e95565b50610f9f8160016115c9565b9050610dda565b50610fb46020890189611ce1565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd610fdf60408d0160208e01611ce1565b610fec60208e018e611ce1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260448101849052606401602060405180830381600087803b15801561106057600080fd5b505af1158015611074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110989190611e95565b507fd660850669486fa3a2f51b47e56f6c7c230f046c612c27745baae05abd68f98d8a6000610a48565b6000828152602081905260409020600101546110de8133610383565b61039283836112a8565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661044b5761113e8173ffffffffffffffffffffffffffffffffffffffff1660146115d5565b6111498360206115d5565b60405160200161115a92919061217c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a0000000000000000000000000000000000000000000000000000000008252610438916004016122b7565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661044b5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561124a3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff161561044b5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008a61136f60208c018c611ce1565b61137c60208c018c611ce1565b604080516020818101959095527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b8116828401529290931b9091166054830152918b01356068820152908a0135608882015260a801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905290508061141460208a018a611ce1565b896040013560405160200161142b93929190612065565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905080878787878e60016020020160208101906114769190611ce1565b60405160200161148b969594939291906120b7565b604051602081830303815290604052905060006114e5828051906020012085858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118db92505050565b60025460009081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205490915060ff166115a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f45786368616e67653a205369676e65722073686f756c64207369676e2074726160448201527f6e73616374696f6e0000000000000000000000000000000000000000000000006064820152608401610438565b505050505050505050505050565b60006115c2828461235d565b9392505050565b60006115c28284612308565b606060006115e4836002612320565b6115ef906002612308565b67ffffffffffffffff81111561162e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611658576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106116b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611740577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061177c846002612320565b611787906001612308565b90505b6001811115611872577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106117ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b82828151811061182c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361186b816123a4565b905061178a565b5083156115c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610438565b6000806000808451604114156119055750505060208201516040830151606084015160001a6119ae565b84516040141561194c5750505060408201516020830151907f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81169060ff1c601b016119ae565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610438565b6119ba868285856119c4565b9695505050505050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115611a76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610438565b8360ff16601b1480611a8b57508360ff16601c145b611b17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610438565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611b6b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611c13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610438565b95945050505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461036657600080fd5b60008083601f840112611c51578182fd5b50813567ffffffffffffffff811115611c68578182fd5b6020830191508360208260051b8501011115611c8357600080fd5b9250929050565b60008083601f840112611c9b578182fd5b50813567ffffffffffffffff811115611cb2578182fd5b602083019150836020828501011115611c8357600080fd5b600060608284031215611cdb578081fd5b50919050565b600060208284031215611cf2578081fd5b6115c282611c1c565b60008060008060008060008060a0898b031215611d16578384fd5b611d1f89611c1c565b9750611d2d60208a01611c1c565b9650604089013567ffffffffffffffff80821115611d49578586fd5b611d558c838d01611c40565b909850965060608b0135915080821115611d6d578586fd5b611d798c838d01611c40565b909650945060808b0135915080821115611d91578384fd5b50611d9e8b828c01611c8a565b999c989b5096995094979396929594505050565b600080600080600060808688031215611dc9578081fd5b611dd286611c1c565b9450611de060208701611c1c565b935060408601359250606086013567ffffffffffffffff811115611e02578182fd5b611e0e88828901611c8a565b969995985093965092949392505050565b60008060008060008060a08789031215611e37578182fd5b611e4087611c1c565b9550611e4e60208801611c1c565b94506040870135935060608701359250608087013567ffffffffffffffff811115611e77578283fd5b611e8389828a01611c8a565b979a9699509497509295939492505050565b600060208284031215611ea6578081fd5b815180151581146115c2578182fd5b600060208284031215611ec6578081fd5b5035919050565b60008060408385031215611edf578182fd5b82359150611eef60208401611c1c565b90509250929050565b6000806000806000806000806000806101808b8d031215611f17578182fd5b8a35995060608b018c811115611f2b578283fd5b60208c019950611f3b8d82611cca565b985050611f4b8c60c08d01611cca565b96506101208b013567ffffffffffffffff80821115611f68578384fd5b611f748e838f01611c40565b90985096506101408d0135915080821115611f8d578384fd5b611f998e838f01611c40565b90965094506101608d0135915080821115611fb2578384fd5b50611fbf8d828e01611c8a565b915080935050809150509295989b9194979a5092959850565b600060208284031215611fe9578081fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146115c2578182fd5b60008284527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115612049578081fd5b8260051b80836020870137939093016020019283525090919050565b60008451612077818460208901612374565b60609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001691909301908152601481019190915260340192915050565b6000875160206120ca8285838d01612374565b9083019088835b8981101561210a5773ffffffffffffffffffffffffffffffffffffffff6120f783611c1c565b16845292820192908201906001016120d1565b5050507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115612139578182fd5b8460051b8087833760609490941b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169301928352505060140195945050505050565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516121b4816017850160208801612374565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516121f1816028840160208801612374565b01602801949350505050565b600073ffffffffffffffffffffffffffffffffffffffff808f168352808e166020840152808d1660408401528b60608401528a6080840152808a1660a08401528860c08401528760e084015261014061010084015261014083018681526101608401905087835b8881101561228c578361227683611c1c565b1683526020928301929190910190600101612264565b50508381036101208501526122a2818688612018565b925050509d9c50505050505050505050505050565b60006020825282518060208401526122d6816040850160208701612374565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000821982111561231b5761231b6123d9565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612358576123586123d9565b500290565b60008282101561236f5761236f6123d9565b500390565b60005b8381101561238f578181015183820152602001612377565b8381111561239e576000848401525b50505050565b6000816123b3576123b36123d9565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122007f7a8f231880fe62ada0f7423d9049652727730c9080e75a683bfcf27ec7a8464736f6c63430008030033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.