More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 218 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Swap ETH2BSC | 20883586 | 41 days ago | IN | 0.00142857 ETH | 0.00049899 | ||||
Register Swap Pa... | 20883573 | 41 days ago | IN | 0 ETH | 0.00012762 | ||||
Register Swap Pa... | 20883573 | 41 days ago | IN | 0 ETH | 0.00012762 | ||||
Register Swap Pa... | 20883562 | 41 days ago | IN | 0 ETH | 0.00013386 | ||||
Register Swap Pa... | 20883560 | 41 days ago | IN | 0 ETH | 0.00033806 | ||||
Swap ETH2BSC | 20453125 | 101 days ago | IN | 0.00142857 ETH | 0.00010404 | ||||
Swap ETH2BSC | 19163244 | 282 days ago | IN | 0.00142857 ETH | 0.00139787 | ||||
Swap ETH2BSC | 19163208 | 282 days ago | IN | 0.00142857 ETH | 0.00199122 | ||||
Register Swap Pa... | 19162993 | 282 days ago | IN | 0 ETH | 0.00055472 | ||||
Register Swap Pa... | 19162993 | 282 days ago | IN | 0 ETH | 0.00055472 | ||||
Register Swap Pa... | 19154541 | 283 days ago | IN | 0 ETH | 0.00088103 | ||||
Swap ETH2BSC | 18973092 | 309 days ago | IN | 0.00142857 ETH | 0.00106063 | ||||
Register Swap Pa... | 18973088 | 309 days ago | IN | 0 ETH | 0.00039898 | ||||
Register Swap Pa... | 18973088 | 309 days ago | IN | 0 ETH | 0.00039898 | ||||
Swap ETH2BSC | 18973080 | 309 days ago | IN | 0.00142857 ETH | 0.00122185 | ||||
Swap ETH2BSC | 18973038 | 309 days ago | IN | 0.00142857 ETH | 0.00167883 | ||||
Register Swap Pa... | 18972997 | 309 days ago | IN | 0 ETH | 0.00050925 | ||||
Register Swap Pa... | 18972997 | 309 days ago | IN | 0 ETH | 0.00132933 | ||||
Register Swap Pa... | 18688366 | 349 days ago | IN | 0 ETH | 0.00092221 | ||||
Register Swap Pa... | 18688363 | 349 days ago | IN | 0 ETH | 0.00249176 | ||||
Swap1155ETH2BSC | 17244651 | 551 days ago | IN | 0.00142857 ETH | 0.00347788 | ||||
Register1155Swap... | 17226831 | 554 days ago | IN | 0 ETH | 0.00168187 | ||||
Register1155Swap... | 17226820 | 554 days ago | IN | 0 ETH | 0.00421283 | ||||
Swap ETH2BSC | 16919427 | 597 days ago | IN | 0.00142857 ETH | 0.00235134 | ||||
Swap ETH2BSC | 16838894 | 608 days ago | IN | 0.00142857 ETH | 0.00070364 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20883586 | 41 days ago | 0.00142857 ETH | ||||
20453125 | 101 days ago | 0.00142857 ETH | ||||
19163244 | 282 days ago | 0.00142857 ETH | ||||
19163208 | 282 days ago | 0.00142857 ETH | ||||
18973092 | 309 days ago | 0.00142857 ETH | ||||
18973080 | 309 days ago | 0.00142857 ETH | ||||
18973038 | 309 days ago | 0.00142857 ETH | ||||
16919427 | 597 days ago | 0.00142857 ETH | ||||
16838796 | 608 days ago | 0.00142857 ETH | ||||
15136002 | 854 days ago | 0.00142857 ETH | ||||
15005513 | 876 days ago | 0.00142857 ETH | ||||
15005340 | 876 days ago | 0.00142857 ETH | ||||
14725113 | 922 days ago | 0.00142857 ETH | ||||
14724993 | 922 days ago | 0.00142857 ETH | ||||
14681495 | 929 days ago | 0.00142857 ETH | ||||
14681401 | 929 days ago | 0.00142857 ETH | ||||
14675974 | 930 days ago | 0.00142857 ETH | ||||
14584074 | 944 days ago | 0.00142857 ETH | ||||
14583821 | 944 days ago | 0.00142857 ETH | ||||
14170595 | 1008 days ago | 0.00142857 ETH | ||||
13992381 | 1036 days ago | 0.00142857 ETH | ||||
13992366 | 1036 days ago | 0.00142857 ETH | ||||
13992267 | 1036 days ago | 0.00142857 ETH | ||||
13866357 | 1055 days ago | 0.00142857 ETH | ||||
13647439 | 1090 days ago | 0.00142857 ETH |
Loading...
Loading
Contract Name:
OpenBiSeaETHSwapAgentImpl
Compiler Version
v0.6.8+commit.0bbfe453
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED // (c) Oleksii Vynogradov 2021, All rights reserved, contact [email protected] if you like to use code pragma solidity ^0.6.8; import "./interfaces/IERC20Query.sol"; import "./interfaces/IERC721Query.sol"; import "./interfaces/IERC1155Query.sol"; import "./interfaces/IERC721.sol"; import "./interfaces/IERC721Receiver.sol"; import "./interfaces/IERC1155Receiver.sol"; import "./interfaces/IERC1155.sol"; import "openzeppelin-solidity/contracts/GSN/Context.sol"; import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; contract OpenBiSeaETHSwapAgentImpl is Context,IERC721Receiver,IERC1155Receiver { using SafeERC20 for IERC20; using SafeMath for uint256; mapping(address => bool) public registeredERC; mapping(bytes32 => bool) public filledBSCTx; address payable public owner; uint256 public swapFee; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event SwapPairRegister(address indexed sponsor,address indexed erc20Addr, string name, string symbol, uint8 decimals); event SwapPair721Register(address indexed sponsor,address indexed erc721Addr, string name, string symbol, string baseURI); event SwapPair1155Register(address indexed sponsor,address indexed erc1155Addr, string uri); event SwapStarted(address indexed erc20Addr, address indexed fromAddr, uint256 amount, uint256 feeAmount); event Swap721Started(address indexed erc721Addr, address indexed fromAddr, uint256 tokenId, uint256 feeAmount); event Swap1155Started(address indexed erc1155Addr, address indexed fromAddr, uint256 tokenId, uint256 amount, uint256 feeAmount); event SwapFilled(address indexed erc20Addr, bytes32 indexed bscTxHash, address indexed toAddress, uint256 amount); event Swap721Filled(address indexed erc721Addr, bytes32 indexed bscTxHash, address indexed toAddress, uint256 tokenId); event Swap1155Filled(address indexed erc1155Addr, bytes32 indexed bscTxHash, address indexed toAddress, uint256 tokenId, uint256 amount); uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor(uint256 fee) public { swapFee = fee; owner = _msgSender(); _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; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner == _msgSender(), "Ownable: caller is not the owner"); _; } modifier notContract() { require(!isContract(msg.sender), "contract is not allowed to swap"); require(msg.sender == tx.origin, "no proxy contract is allowed"); _; } function isContract(address addr) internal view returns (bool) { uint size; assembly { size := extcodesize(addr) } return size > 0; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(owner, address(0)); owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address payable newOwner) public onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } /** * @dev Returns set minimum swap fee from ERC20 to BEP20 */ function setSwapFee(uint256 fee) onlyOwner external { swapFee = fee; } function register1155SwapPairToBSC(address erc1155Addr) external returns (bool) { require(!registeredERC[erc1155Addr], "already registered"); string memory uri = IERC1155Query(erc1155Addr).uri(0); require(bytes(uri).length>0, "empty uri"); registeredERC[erc1155Addr] = true; emit SwapPair1155Register(msg.sender, erc1155Addr, uri); return true; } function register721SwapPairToBSC(address erc721Addr) external returns (bool) { require(!registeredERC[erc721Addr], "already registered"); string memory name = IERC721Query(erc721Addr).name(); string memory symbol = IERC721Query(erc721Addr).symbol(); string memory baseURI = IERC721Query(erc721Addr).baseURI(); require(bytes(name).length>0, "empty name"); require(bytes(symbol).length>0, "empty symbol"); registeredERC[erc721Addr] = true; emit SwapPair721Register(msg.sender, erc721Addr, name, symbol, baseURI); return true; } function registerSwapPairToBSC(address erc20Addr) external returns (bool) { require(!registeredERC[erc20Addr], "already registered"); string memory name = IERC20Query(erc20Addr).name(); string memory symbol = IERC20Query(erc20Addr).symbol(); uint8 decimals = IERC20Query(erc20Addr).decimals(); require(bytes(name).length>0, "empty name"); require(bytes(symbol).length>0, "empty symbol"); registeredERC[erc20Addr] = true; emit SwapPairRegister(msg.sender, erc20Addr, name, symbol, decimals); return true; } function fillBSC2ETHSwap(bytes32 bscTxHash, address erc20Addr, address toAddress, uint256 amount) onlyOwner external returns (bool) { require(!filledBSCTx[bscTxHash], "bsc tx filled already"); require(registeredERC[erc20Addr], "not registered token"); filledBSCTx[bscTxHash] = true; IERC20(erc20Addr).safeTransfer(toAddress, amount); emit SwapFilled(erc20Addr, bscTxHash, toAddress, amount); return true; } function fill721BSC2ETHSwap(bytes32 bscTxHash, address erc721Addr, address toAddress, uint256 tokenId) onlyOwner external returns (bool) { require(!filledBSCTx[bscTxHash], "bsc tx filled already"); require(registeredERC[erc721Addr], "not registered token"); filledBSCTx[bscTxHash] = true; IERC721(erc721Addr).safeTransferFrom(address(this), toAddress, tokenId); emit Swap721Filled(erc721Addr, bscTxHash, toAddress, tokenId); return true; } function fill1155BSC2ETHSwap(bytes32 bscTxHash, address erc1155Addr, address toAddress, uint256 tokenId, uint256 amount) onlyOwner external returns (bool) { require(!filledBSCTx[bscTxHash], "bsc tx filled already"); require(registeredERC[erc1155Addr], "not registered token"); filledBSCTx[bscTxHash] = true; IERC1155(erc1155Addr).safeTransferFrom(address(this), toAddress, tokenId, amount, "0x0"); emit Swap1155Filled(erc1155Addr, bscTxHash, toAddress, tokenId, amount); return true; } function swapETH2BSC(address erc20Addr, uint256 amount) payable external nonReentrant returns (bool) { require(registeredERC[erc20Addr], "not registered token"); require(msg.value == swapFee, "swap fee not equal"); IERC20(erc20Addr).safeTransferFrom(msg.sender, address(this), amount); if (msg.value != 0) { owner.transfer(msg.value); } emit SwapStarted(erc20Addr, msg.sender, amount, msg.value); return true; } function swap721ETH2BSC(address erc721Addr, uint256 tokenId) payable external nonReentrant returns (bool) { require(registeredERC[erc721Addr], "not registered token"); require(msg.value == swapFee, "swap fee not equal"); IERC721(erc721Addr).safeTransferFrom(msg.sender, address(this), tokenId); if (msg.value != 0) { owner.transfer(msg.value); } emit Swap721Started(erc721Addr, msg.sender, tokenId, msg.value); return true; } function swap1155ETH2BSC(address erc1155Addr, uint256 tokenId, uint256 amount) payable external nonReentrant returns (bool) { require(registeredERC[erc1155Addr], "not registered token"); require(msg.value == swapFee, "swap fee not equal"); IERC1155(erc1155Addr).safeTransferFrom(msg.sender, address(this), tokenId, amount, "0x0"); if (msg.value != 0) { owner.transfer(msg.value); } emit Swap1155Started(erc1155Addr, msg.sender, tokenId, amount, msg.value); return true; } /** * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { return this.onERC721Received.selector; } function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external override returns(bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external override returns(bytes4) { return this.onERC1155BatchReceived.selector; } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return this.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "./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; }
pragma solidity ^0.6.8; interface IERC1155Query { /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC165.sol"; /** * _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: UNLICENSED // (c) Oleksii Vynogradov 2021, All rights reserved, contact [email protected] if you like to use code pragma solidity ^0.6.4; /** * @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); }
pragma solidity ^0.6.8; interface IERC20Query { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the token name. */ function name() external view returns (string memory); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); }
// SPDX-License-Identifier: UNLICENSED // (c) Oleksii Vynogradov 2021, All rights reserved, contact [email protected] if you like to use code pragma solidity ^0.6.4; import "./IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
pragma solidity ^0.6.8; interface IERC721Query { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a prefix in {tokenURI} to each token's URI, or * to the token ID if no specific URI is set for that token ID. */ function baseURI() external view returns (string memory); /** * @dev Returns the token name. */ function name() external view returns (string memory); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Returns the token symbol. */ function symbol() external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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.6.0 <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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { 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.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * 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) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"erc1155Addr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"bscTxHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Swap1155Filled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"erc1155Addr","type":"address"},{"indexed":true,"internalType":"address","name":"fromAddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"Swap1155Started","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"erc721Addr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"bscTxHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Swap721Filled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"erc721Addr","type":"address"},{"indexed":true,"internalType":"address","name":"fromAddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"Swap721Started","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"erc20Addr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"bscTxHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SwapFilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"erc1155Addr","type":"address"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SwapPair1155Register","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"erc721Addr","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"SwapPair721Register","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"erc20Addr","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"SwapPairRegister","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"erc20Addr","type":"address"},{"indexed":true,"internalType":"address","name":"fromAddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"SwapStarted","type":"event"},{"inputs":[{"internalType":"bytes32","name":"bscTxHash","type":"bytes32"},{"internalType":"address","name":"erc1155Addr","type":"address"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fill1155BSC2ETHSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"bscTxHash","type":"bytes32"},{"internalType":"address","name":"erc721Addr","type":"address"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"fill721BSC2ETHSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"bscTxHash","type":"bytes32"},{"internalType":"address","name":"erc20Addr","type":"address"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fillBSC2ETHSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"filledBSCTx","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc1155Addr","type":"address"}],"name":"register1155SwapPairToBSC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc721Addr","type":"address"}],"name":"register721SwapPairToBSC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Addr","type":"address"}],"name":"registerSwapPairToBSC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"registeredERC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setSwapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc1155Addr","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swap1155ETH2BSC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"erc721Addr","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"swap721ETH2BSC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swapETH2BSC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516200285a3803806200285a8339818101604052602081101561003557600080fd5b5051600381905561004d6001600160e01b0361007816565b600280546001600160a01b0319166001600160a01b039290921691909117905550600160045561007c565b3390565b6127ce806200008c6000396000f3fe60806040526004361061011f5760003560e01c8063715018a6116100a0578063b9927a9c11610064578063b9927a9c146104f5578063bc197c8114610521578063ee514bc314610655578063f23a6e6114610688578063f2fde38b146107285761011f565b8063715018a6146103e4578063790486ae146103f9578063841af51f146104485780638da5cb5b1461047b5780639867df11146104ac5761011f565b806334e19907116100e757806334e19907146103025780634977937a1461032e57806350877c771461036057806354cf2aeb1461038a5780635c13c151146103b15761011f565b806301ffc9a71461012457806303db8c721461016c57806308b3def61461019f578063150b7a02146101cb578063279b4568146102b9575b600080fd5b34801561013057600080fd5b506101586004803603602081101561014757600080fd5b50356001600160e01b03191661075b565b604080519115158252519081900360200190f35b34801561017857600080fd5b506101586004803603602081101561018f57600080fd5b50356001600160a01b03166107d8565b610158600480360360408110156101b557600080fd5b506001600160a01b038135169060200135610dd4565b3480156101d757600080fd5b5061029c600480360360808110156101ee57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561022857600080fd5b82018360208201111561023a57600080fd5b803590602001918460018302840111600160201b8311171561025b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610fe5945050505050565b604080516001600160e01b03199092168252519081900360200190f35b3480156102c557600080fd5b50610158600480360360808110156102dc57600080fd5b508035906001600160a01b03602082013581169160408101359091169060600135610ff5565b34801561030e57600080fd5b5061032c6004803603602081101561032557600080fd5b50356111eb565b005b6101586004803603606081101561034457600080fd5b506001600160a01b038135169060208101359060400135611248565b34801561036c57600080fd5b506101586004803603602081101561038357600080fd5b5035611480565b34801561039657600080fd5b5061039f611495565b60408051918252519081900360200190f35b3480156103bd57600080fd5b50610158600480360360208110156103d457600080fd5b50356001600160a01b031661149b565b3480156103f057600080fd5b5061032c61197c565b34801561040557600080fd5b50610158600480360360a081101561041c57600080fd5b508035906001600160a01b03602082013581169160408101359091169060608101359060800135611a1e565b34801561045457600080fd5b506101586004803603602081101561046b57600080fd5b50356001600160a01b0316611c33565b34801561048757600080fd5b50610490611ecf565b604080516001600160a01b039092168252519081900360200190f35b3480156104b857600080fd5b50610158600480360360808110156104cf57600080fd5b508035906001600160a01b03602082013581169160408101359091169060600135611ede565b6101586004803603604081101561050b57600080fd5b506001600160a01b038135169060200135612085565b34801561052d57600080fd5b5061029c600480360360a081101561054457600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561057757600080fd5b82018360208201111561058957600080fd5b803590602001918460208302840111600160201b831117156105aa57600080fd5b919390929091602081019035600160201b8111156105c757600080fd5b8201836020820111156105d957600080fd5b803590602001918460208302840111600160201b831117156105fa57600080fd5b919390929091602081019035600160201b81111561061757600080fd5b82018360208201111561062957600080fd5b803590602001918460018302840111600160201b8311171561064a57600080fd5b509092509050612243565b34801561066157600080fd5b506101586004803603602081101561067857600080fd5b50356001600160a01b0316612257565b34801561069457600080fd5b5061029c600480360360a08110156106ab57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b8111156106ea57600080fd5b8201836020820111156106fc57600080fd5b803590602001918460018302840111600160201b8311171561071d57600080fd5b50909250905061226c565b34801561073457600080fd5b5061032c6004803603602081101561074b57600080fd5b50356001600160a01b031661227e565b604080516301ffc9a760e01b81526001600160e01b031983166004820152905160009130916301ffc9a791602480820192602092909190829003018186803b1580156107a657600080fd5b505afa1580156107ba573d6000803e3d6000fd5b505050506040513d60208110156107d057600080fd5b505192915050565b6001600160a01b03811660009081526020819052604081205460ff161561083b576040805162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6060826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b15801561087657600080fd5b505afa15801561088a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156108b357600080fd5b8101908080516040519392919084600160201b8211156108d257600080fd5b9083019060208201858111156108e757600080fd5b8251600160201b81118282018810171561090057600080fd5b82525081516020918201929091019080838360005b8381101561092d578181015183820152602001610915565b50505050905090810190601f16801561095a5780820380516001836020036101000a031916815260200191505b5060405250505090506060836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561099e57600080fd5b505afa1580156109b2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156109db57600080fd5b8101908080516040519392919084600160201b8211156109fa57600080fd5b908301906020820185811115610a0f57600080fd5b8251600160201b811182820188101715610a2857600080fd5b82525081516020918201929091019080838360005b83811015610a55578181015183820152602001610a3d565b50505050905090810190601f168015610a825780820380516001836020036101000a031916815260200191505b5060405250505090506060846001600160a01b0316636c0360eb6040518163ffffffff1660e01b815260040160006040518083038186803b158015610ac657600080fd5b505afa158015610ada573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610b0357600080fd5b8101908080516040519392919084600160201b821115610b2257600080fd5b908301906020820185811115610b3757600080fd5b8251600160201b811182820188101715610b5057600080fd5b82525081516020918201929091019080838360005b83811015610b7d578181015183820152602001610b65565b50505050905090810190601f168015610baa5780820380516001836020036101000a031916815260200191505b5060405250505090506000835111610bf6576040805162461bcd60e51b815260206004820152600a602482015269656d707479206e616d6560b01b604482015290519081900360640190fd5b6000825111610c3b576040805162461bcd60e51b815260206004820152600c60248201526b195b5c1d1e481cde5b589bdb60a21b604482015290519081900360640190fd5b6001600160a01b038516600081815260208181526040808320805460ff1916600117905580516060808252885190820152875133947f1a7c9a5fa5d51a321bc7df01f4a8bd15302e6a5e7dfb8f48e35ea8cf655f7629948a948a948a9490938493848101938501926080860192918a01918190849084905b83811015610ccb578181015183820152602001610cb3565b50505050905090810190601f168015610cf85780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b83811015610d2b578181015183820152602001610d13565b50505050905090810190601f168015610d585780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b83811015610d8b578181015183820152602001610d73565b50505050905090810190601f168015610db85780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3506001949350505050565b600060026004541415610e2e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026004556001600160a01b03831660009081526020819052604090205460ff16610e97576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6003543414610ee2576040805162461bcd60e51b81526020600482015260126024820152711cddd85c08199959481b9bdd08195c5d585b60721b604482015290519081900360640190fd5b60408051632142170760e11b81523360048201523060248201526044810184905290516001600160a01b038516916342842e0e91606480830192600092919082900301818387803b158015610f3657600080fd5b505af1158015610f4a573d6000803e3d6000fd5b5050505034600014610f91576002546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610f8f573d6000803e3d6000fd5b505b60408051838152346020820152815133926001600160a01b038716927fc09139a196eea1a99da5f09e3016893e60c2b6aabe784942df8233a5157ab01e929081900390910190a35060018060045592915050565b630a85bd0160e11b949350505050565b6000610fff612377565b6002546001600160a01b0390811691161461104f576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b60008581526001602052604090205460ff16156110ab576040805162461bcd60e51b81526020600482015260156024820152746273632074782066696c6c656420616c726561647960581b604482015290519081900360640190fd5b6001600160a01b03841660009081526020819052604090205460ff1661110f576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6000858152600160208190526040808320805460ff19169092179091558051632142170760e11b81523060048201526001600160a01b038681166024830152604482018690529151918716926342842e0e9260648084019382900301818387803b15801561117c57600080fd5b505af1158015611190573d6000803e3d6000fd5b50505050826001600160a01b031685856001600160a01b03167fdcf4a9a6cf1fd8be24480de01b10dd08e20e6a2e50bee21faefe2311de2bc58e856040518082815260200191505060405180910390a4506001949350505050565b6111f3612377565b6002546001600160a01b03908116911614611243576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b600355565b6000600260045414156112a2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026004556001600160a01b03841660009081526020819052604090205460ff1661130b576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6003543414611356576040805162461bcd60e51b81526020600482015260126024820152711cddd85c08199959481b9bdd08195c5d585b60721b604482015290519081900360640190fd5b60408051637921219560e11b8152336004820152306024820152604481018590526064810184905260a06084820152600360a48201526203078360ec1b60c482015290516001600160a01b0386169163f242432a9160e480830192600092919082900301818387803b1580156113cb57600080fd5b505af11580156113df573d6000803e3d6000fd5b5050505034600014611426576002546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611424573d6000803e3d6000fd5b505b60408051848152602081018490523481830152905133916001600160a01b038716917f8d122de08ad2d600423d7dc7dc12914c74797db61cdb3ffbd6116f9004f0af6a9181900360600190a3506001806004559392505050565b60016020526000908152604090205460ff1681565b60035481565b6001600160a01b03811660009081526020819052604081205460ff16156114fe576040805162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6060826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b15801561153957600080fd5b505afa15801561154d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561157657600080fd5b8101908080516040519392919084600160201b82111561159557600080fd5b9083019060208201858111156115aa57600080fd5b8251600160201b8111828201881017156115c357600080fd5b82525081516020918201929091019080838360005b838110156115f05781810151838201526020016115d8565b50505050905090810190601f16801561161d5780820380516001836020036101000a031916815260200191505b5060405250505090506060836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561166157600080fd5b505afa158015611675573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561169e57600080fd5b8101908080516040519392919084600160201b8211156116bd57600080fd5b9083019060208201858111156116d257600080fd5b8251600160201b8111828201881017156116eb57600080fd5b82525081516020918201929091019080838360005b83811015611718578181015183820152602001611700565b50505050905090810190601f1680156117455780820380516001836020036101000a031916815260200191505b5060405250505090506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561178957600080fd5b505afa15801561179d573d6000803e3d6000fd5b505050506040513d60208110156117b357600080fd5b505183519091506117f8576040805162461bcd60e51b815260206004820152600a602482015269656d707479206e616d6560b01b604482015290519081900360640190fd5b600082511161183d576040805162461bcd60e51b815260206004820152600c60248201526b195b5c1d1e481cde5b589bdb60a21b604482015290519081900360640190fd5b6001600160a01b038516600081815260208181526040808320805460ff19166001179055805160ff8616918101919091526060808252875190820152865133937ffe3bd005e346323fa452df8cafc28c55b99e3766ba8750571d139c6cf5bc08a093899389938993919283928382019260808501928901918190849084905b838110156118d45781810151838201526020016118bc565b50505050905090810190601f1680156119015780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561193457818101518382015260200161191c565b50505050905090810190601f1680156119615780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a3506001949350505050565b611984612377565b6002546001600160a01b039081169116146119d4576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b6000611a28612377565b6002546001600160a01b03908116911614611a78576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b60008681526001602052604090205460ff1615611ad4576040805162461bcd60e51b81526020600482015260156024820152746273632074782066696c6c656420616c726561647960581b604482015290519081900360640190fd5b6001600160a01b03851660009081526020819052604090205460ff16611b38576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6000868152600160208190526040808320805460ff19169092179091558051637921219560e11b81523060048201526001600160a01b038781166024830152604482018790526064820186905260a06084830152600360a48301526203078360ec1b60c483015291519188169263f242432a9260e48084019382900301818387803b158015611bc657600080fd5b505af1158015611bda573d6000803e3d6000fd5b5050604080518681526020810186905281516001600160a01b03808a1695508b94508a16927f3656b6ae101e5a48382e246af477ac87f2e485a3beb4df5e4f1613a3c5b70303928290030190a450600195945050505050565b6001600160a01b03811660009081526020819052604081205460ff1615611c96576040805162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6060826001600160a01b0316630e89341c60006040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015611cdd57600080fd5b505afa158015611cf1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611d1a57600080fd5b8101908080516040519392919084600160201b821115611d3957600080fd5b908301906020820185811115611d4e57600080fd5b8251600160201b811182820188101715611d6757600080fd5b82525081516020918201929091019080838360005b83811015611d94578181015183820152602001611d7c565b50505050905090810190601f168015611dc15780820380516001836020036101000a031916815260200191505b5060405250505090506000815111611e0c576040805162461bcd60e51b8152602060048201526009602482015268656d7074792075726960b81b604482015290519081900360640190fd5b6001600160a01b038316600081815260208181526040808320805460ff191660011790558051828152855181840152855133947ffd26c04769f9fda184e877277305184bcddd883c217f94c9eeee3dd5041f7a79948894849390840192918601918190849084905b83811015611e8c578181015183820152602001611e74565b50505050905090810190601f168015611eb95780820380516001836020036101000a031916815260200191505b509250505060405180910390a350600192915050565b6002546001600160a01b031681565b6000611ee8612377565b6002546001600160a01b03908116911614611f38576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b60008581526001602052604090205460ff1615611f94576040805162461bcd60e51b81526020600482015260156024820152746273632074782066696c6c656420616c726561647960581b604482015290519081900360640190fd5b6001600160a01b03841660009081526020819052604090205460ff16611ff8576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6000858152600160208190526040909120805460ff1916909117905561202e6001600160a01b038516848463ffffffff61237b16565b826001600160a01b031685856001600160a01b03167f3bebd9a738291e69898b5dbfadb6329b4b09fc648bdef68762928e521463abd9856040518082815260200191505060405180910390a4506001949350505050565b6000600260045414156120df576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026004556001600160a01b03831660009081526020819052604090205460ff16612148576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6003543414612193576040805162461bcd60e51b81526020600482015260126024820152711cddd85c08199959481b9bdd08195c5d585b60721b604482015290519081900360640190fd5b6121ae6001600160a01b03841633308563ffffffff6123d216565b34156121ef576002546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156121ed573d6000803e3d6000fd5b505b60408051838152346020820152815133926001600160a01b038716927ff60309f865a6aa297da5fac6188136a02e5acfdf6e8f6d35257a9f4e9653170f929081900390910190a35060018060045592915050565b63bc197c8160e01b98975050505050505050565b60006020819052908152604090205460ff1681565b63f23a6e6160e01b9695505050505050565b612286612377565b6002546001600160a01b039081169116146122d6576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b6001600160a01b03811661231b5760405162461bcd60e51b81526004018080602001828103825260268152602001806127036026913960400191505060405180910390fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526123cd908490612432565b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261242c908590612432565b50505050565b6060612487826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166124e39092919063ffffffff16565b8051909150156123cd578080602001905160208110156124a657600080fd5b50516123cd5760405162461bcd60e51b815260040180806020018281038252602a81526020018061276f602a913960400191505060405180910390fd5b60606124f284846000856124fc565b90505b9392505050565b60608247101561253d5760405162461bcd60e51b81526004018080602001828103825260268152602001806127296026913960400191505060405180910390fd5b61254685612658565b612597576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106125d65780518252601f1990920191602091820191016125b7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612638576040519150601f19603f3d011682016040523d82523d6000602084013e61263d565b606091505b509150915061264d82828661265e565b979650505050505050565b3b151590565b6060831561266d5750816124f5565b82511561267d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156126c75781810151838201526020016126af565b50505050905090810190601f1680156126f45780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220e90e8f0cdab6b27d4296be1e52d3df2f5113aa671c569df87857c7039d1051da64736f6c634300060800330000000000000000000000000000000000000000000000000005134734894778
Deployed Bytecode
0x60806040526004361061011f5760003560e01c8063715018a6116100a0578063b9927a9c11610064578063b9927a9c146104f5578063bc197c8114610521578063ee514bc314610655578063f23a6e6114610688578063f2fde38b146107285761011f565b8063715018a6146103e4578063790486ae146103f9578063841af51f146104485780638da5cb5b1461047b5780639867df11146104ac5761011f565b806334e19907116100e757806334e19907146103025780634977937a1461032e57806350877c771461036057806354cf2aeb1461038a5780635c13c151146103b15761011f565b806301ffc9a71461012457806303db8c721461016c57806308b3def61461019f578063150b7a02146101cb578063279b4568146102b9575b600080fd5b34801561013057600080fd5b506101586004803603602081101561014757600080fd5b50356001600160e01b03191661075b565b604080519115158252519081900360200190f35b34801561017857600080fd5b506101586004803603602081101561018f57600080fd5b50356001600160a01b03166107d8565b610158600480360360408110156101b557600080fd5b506001600160a01b038135169060200135610dd4565b3480156101d757600080fd5b5061029c600480360360808110156101ee57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561022857600080fd5b82018360208201111561023a57600080fd5b803590602001918460018302840111600160201b8311171561025b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610fe5945050505050565b604080516001600160e01b03199092168252519081900360200190f35b3480156102c557600080fd5b50610158600480360360808110156102dc57600080fd5b508035906001600160a01b03602082013581169160408101359091169060600135610ff5565b34801561030e57600080fd5b5061032c6004803603602081101561032557600080fd5b50356111eb565b005b6101586004803603606081101561034457600080fd5b506001600160a01b038135169060208101359060400135611248565b34801561036c57600080fd5b506101586004803603602081101561038357600080fd5b5035611480565b34801561039657600080fd5b5061039f611495565b60408051918252519081900360200190f35b3480156103bd57600080fd5b50610158600480360360208110156103d457600080fd5b50356001600160a01b031661149b565b3480156103f057600080fd5b5061032c61197c565b34801561040557600080fd5b50610158600480360360a081101561041c57600080fd5b508035906001600160a01b03602082013581169160408101359091169060608101359060800135611a1e565b34801561045457600080fd5b506101586004803603602081101561046b57600080fd5b50356001600160a01b0316611c33565b34801561048757600080fd5b50610490611ecf565b604080516001600160a01b039092168252519081900360200190f35b3480156104b857600080fd5b50610158600480360360808110156104cf57600080fd5b508035906001600160a01b03602082013581169160408101359091169060600135611ede565b6101586004803603604081101561050b57600080fd5b506001600160a01b038135169060200135612085565b34801561052d57600080fd5b5061029c600480360360a081101561054457600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561057757600080fd5b82018360208201111561058957600080fd5b803590602001918460208302840111600160201b831117156105aa57600080fd5b919390929091602081019035600160201b8111156105c757600080fd5b8201836020820111156105d957600080fd5b803590602001918460208302840111600160201b831117156105fa57600080fd5b919390929091602081019035600160201b81111561061757600080fd5b82018360208201111561062957600080fd5b803590602001918460018302840111600160201b8311171561064a57600080fd5b509092509050612243565b34801561066157600080fd5b506101586004803603602081101561067857600080fd5b50356001600160a01b0316612257565b34801561069457600080fd5b5061029c600480360360a08110156106ab57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b8111156106ea57600080fd5b8201836020820111156106fc57600080fd5b803590602001918460018302840111600160201b8311171561071d57600080fd5b50909250905061226c565b34801561073457600080fd5b5061032c6004803603602081101561074b57600080fd5b50356001600160a01b031661227e565b604080516301ffc9a760e01b81526001600160e01b031983166004820152905160009130916301ffc9a791602480820192602092909190829003018186803b1580156107a657600080fd5b505afa1580156107ba573d6000803e3d6000fd5b505050506040513d60208110156107d057600080fd5b505192915050565b6001600160a01b03811660009081526020819052604081205460ff161561083b576040805162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6060826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b15801561087657600080fd5b505afa15801561088a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156108b357600080fd5b8101908080516040519392919084600160201b8211156108d257600080fd5b9083019060208201858111156108e757600080fd5b8251600160201b81118282018810171561090057600080fd5b82525081516020918201929091019080838360005b8381101561092d578181015183820152602001610915565b50505050905090810190601f16801561095a5780820380516001836020036101000a031916815260200191505b5060405250505090506060836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561099e57600080fd5b505afa1580156109b2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156109db57600080fd5b8101908080516040519392919084600160201b8211156109fa57600080fd5b908301906020820185811115610a0f57600080fd5b8251600160201b811182820188101715610a2857600080fd5b82525081516020918201929091019080838360005b83811015610a55578181015183820152602001610a3d565b50505050905090810190601f168015610a825780820380516001836020036101000a031916815260200191505b5060405250505090506060846001600160a01b0316636c0360eb6040518163ffffffff1660e01b815260040160006040518083038186803b158015610ac657600080fd5b505afa158015610ada573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610b0357600080fd5b8101908080516040519392919084600160201b821115610b2257600080fd5b908301906020820185811115610b3757600080fd5b8251600160201b811182820188101715610b5057600080fd5b82525081516020918201929091019080838360005b83811015610b7d578181015183820152602001610b65565b50505050905090810190601f168015610baa5780820380516001836020036101000a031916815260200191505b5060405250505090506000835111610bf6576040805162461bcd60e51b815260206004820152600a602482015269656d707479206e616d6560b01b604482015290519081900360640190fd5b6000825111610c3b576040805162461bcd60e51b815260206004820152600c60248201526b195b5c1d1e481cde5b589bdb60a21b604482015290519081900360640190fd5b6001600160a01b038516600081815260208181526040808320805460ff1916600117905580516060808252885190820152875133947f1a7c9a5fa5d51a321bc7df01f4a8bd15302e6a5e7dfb8f48e35ea8cf655f7629948a948a948a9490938493848101938501926080860192918a01918190849084905b83811015610ccb578181015183820152602001610cb3565b50505050905090810190601f168015610cf85780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b83811015610d2b578181015183820152602001610d13565b50505050905090810190601f168015610d585780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b83811015610d8b578181015183820152602001610d73565b50505050905090810190601f168015610db85780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3506001949350505050565b600060026004541415610e2e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026004556001600160a01b03831660009081526020819052604090205460ff16610e97576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6003543414610ee2576040805162461bcd60e51b81526020600482015260126024820152711cddd85c08199959481b9bdd08195c5d585b60721b604482015290519081900360640190fd5b60408051632142170760e11b81523360048201523060248201526044810184905290516001600160a01b038516916342842e0e91606480830192600092919082900301818387803b158015610f3657600080fd5b505af1158015610f4a573d6000803e3d6000fd5b5050505034600014610f91576002546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610f8f573d6000803e3d6000fd5b505b60408051838152346020820152815133926001600160a01b038716927fc09139a196eea1a99da5f09e3016893e60c2b6aabe784942df8233a5157ab01e929081900390910190a35060018060045592915050565b630a85bd0160e11b949350505050565b6000610fff612377565b6002546001600160a01b0390811691161461104f576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b60008581526001602052604090205460ff16156110ab576040805162461bcd60e51b81526020600482015260156024820152746273632074782066696c6c656420616c726561647960581b604482015290519081900360640190fd5b6001600160a01b03841660009081526020819052604090205460ff1661110f576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6000858152600160208190526040808320805460ff19169092179091558051632142170760e11b81523060048201526001600160a01b038681166024830152604482018690529151918716926342842e0e9260648084019382900301818387803b15801561117c57600080fd5b505af1158015611190573d6000803e3d6000fd5b50505050826001600160a01b031685856001600160a01b03167fdcf4a9a6cf1fd8be24480de01b10dd08e20e6a2e50bee21faefe2311de2bc58e856040518082815260200191505060405180910390a4506001949350505050565b6111f3612377565b6002546001600160a01b03908116911614611243576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b600355565b6000600260045414156112a2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026004556001600160a01b03841660009081526020819052604090205460ff1661130b576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6003543414611356576040805162461bcd60e51b81526020600482015260126024820152711cddd85c08199959481b9bdd08195c5d585b60721b604482015290519081900360640190fd5b60408051637921219560e11b8152336004820152306024820152604481018590526064810184905260a06084820152600360a48201526203078360ec1b60c482015290516001600160a01b0386169163f242432a9160e480830192600092919082900301818387803b1580156113cb57600080fd5b505af11580156113df573d6000803e3d6000fd5b5050505034600014611426576002546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611424573d6000803e3d6000fd5b505b60408051848152602081018490523481830152905133916001600160a01b038716917f8d122de08ad2d600423d7dc7dc12914c74797db61cdb3ffbd6116f9004f0af6a9181900360600190a3506001806004559392505050565b60016020526000908152604090205460ff1681565b60035481565b6001600160a01b03811660009081526020819052604081205460ff16156114fe576040805162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6060826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b15801561153957600080fd5b505afa15801561154d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561157657600080fd5b8101908080516040519392919084600160201b82111561159557600080fd5b9083019060208201858111156115aa57600080fd5b8251600160201b8111828201881017156115c357600080fd5b82525081516020918201929091019080838360005b838110156115f05781810151838201526020016115d8565b50505050905090810190601f16801561161d5780820380516001836020036101000a031916815260200191505b5060405250505090506060836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561166157600080fd5b505afa158015611675573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561169e57600080fd5b8101908080516040519392919084600160201b8211156116bd57600080fd5b9083019060208201858111156116d257600080fd5b8251600160201b8111828201881017156116eb57600080fd5b82525081516020918201929091019080838360005b83811015611718578181015183820152602001611700565b50505050905090810190601f1680156117455780820380516001836020036101000a031916815260200191505b5060405250505090506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561178957600080fd5b505afa15801561179d573d6000803e3d6000fd5b505050506040513d60208110156117b357600080fd5b505183519091506117f8576040805162461bcd60e51b815260206004820152600a602482015269656d707479206e616d6560b01b604482015290519081900360640190fd5b600082511161183d576040805162461bcd60e51b815260206004820152600c60248201526b195b5c1d1e481cde5b589bdb60a21b604482015290519081900360640190fd5b6001600160a01b038516600081815260208181526040808320805460ff19166001179055805160ff8616918101919091526060808252875190820152865133937ffe3bd005e346323fa452df8cafc28c55b99e3766ba8750571d139c6cf5bc08a093899389938993919283928382019260808501928901918190849084905b838110156118d45781810151838201526020016118bc565b50505050905090810190601f1680156119015780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561193457818101518382015260200161191c565b50505050905090810190601f1680156119615780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a3506001949350505050565b611984612377565b6002546001600160a01b039081169116146119d4576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b6000611a28612377565b6002546001600160a01b03908116911614611a78576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b60008681526001602052604090205460ff1615611ad4576040805162461bcd60e51b81526020600482015260156024820152746273632074782066696c6c656420616c726561647960581b604482015290519081900360640190fd5b6001600160a01b03851660009081526020819052604090205460ff16611b38576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6000868152600160208190526040808320805460ff19169092179091558051637921219560e11b81523060048201526001600160a01b038781166024830152604482018790526064820186905260a06084830152600360a48301526203078360ec1b60c483015291519188169263f242432a9260e48084019382900301818387803b158015611bc657600080fd5b505af1158015611bda573d6000803e3d6000fd5b5050604080518681526020810186905281516001600160a01b03808a1695508b94508a16927f3656b6ae101e5a48382e246af477ac87f2e485a3beb4df5e4f1613a3c5b70303928290030190a450600195945050505050565b6001600160a01b03811660009081526020819052604081205460ff1615611c96576040805162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6060826001600160a01b0316630e89341c60006040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015611cdd57600080fd5b505afa158015611cf1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611d1a57600080fd5b8101908080516040519392919084600160201b821115611d3957600080fd5b908301906020820185811115611d4e57600080fd5b8251600160201b811182820188101715611d6757600080fd5b82525081516020918201929091019080838360005b83811015611d94578181015183820152602001611d7c565b50505050905090810190601f168015611dc15780820380516001836020036101000a031916815260200191505b5060405250505090506000815111611e0c576040805162461bcd60e51b8152602060048201526009602482015268656d7074792075726960b81b604482015290519081900360640190fd5b6001600160a01b038316600081815260208181526040808320805460ff191660011790558051828152855181840152855133947ffd26c04769f9fda184e877277305184bcddd883c217f94c9eeee3dd5041f7a79948894849390840192918601918190849084905b83811015611e8c578181015183820152602001611e74565b50505050905090810190601f168015611eb95780820380516001836020036101000a031916815260200191505b509250505060405180910390a350600192915050565b6002546001600160a01b031681565b6000611ee8612377565b6002546001600160a01b03908116911614611f38576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b60008581526001602052604090205460ff1615611f94576040805162461bcd60e51b81526020600482015260156024820152746273632074782066696c6c656420616c726561647960581b604482015290519081900360640190fd5b6001600160a01b03841660009081526020819052604090205460ff16611ff8576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6000858152600160208190526040909120805460ff1916909117905561202e6001600160a01b038516848463ffffffff61237b16565b826001600160a01b031685856001600160a01b03167f3bebd9a738291e69898b5dbfadb6329b4b09fc648bdef68762928e521463abd9856040518082815260200191505060405180910390a4506001949350505050565b6000600260045414156120df576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026004556001600160a01b03831660009081526020819052604090205460ff16612148576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6003543414612193576040805162461bcd60e51b81526020600482015260126024820152711cddd85c08199959481b9bdd08195c5d585b60721b604482015290519081900360640190fd5b6121ae6001600160a01b03841633308563ffffffff6123d216565b34156121ef576002546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156121ed573d6000803e3d6000fd5b505b60408051838152346020820152815133926001600160a01b038716927ff60309f865a6aa297da5fac6188136a02e5acfdf6e8f6d35257a9f4e9653170f929081900390910190a35060018060045592915050565b63bc197c8160e01b98975050505050505050565b60006020819052908152604090205460ff1681565b63f23a6e6160e01b9695505050505050565b612286612377565b6002546001600160a01b039081169116146122d6576040805162461bcd60e51b8152602060048201819052602482015260008051602061274f833981519152604482015290519081900360640190fd5b6001600160a01b03811661231b5760405162461bcd60e51b81526004018080602001828103825260268152602001806127036026913960400191505060405180910390fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526123cd908490612432565b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261242c908590612432565b50505050565b6060612487826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166124e39092919063ffffffff16565b8051909150156123cd578080602001905160208110156124a657600080fd5b50516123cd5760405162461bcd60e51b815260040180806020018281038252602a81526020018061276f602a913960400191505060405180910390fd5b60606124f284846000856124fc565b90505b9392505050565b60608247101561253d5760405162461bcd60e51b81526004018080602001828103825260268152602001806127296026913960400191505060405180910390fd5b61254685612658565b612597576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106125d65780518252601f1990920191602091820191016125b7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612638576040519150601f19603f3d011682016040523d82523d6000602084013e61263d565b606091505b509150915061264d82828661265e565b979650505050505050565b3b151590565b6060831561266d5750816124f5565b82511561267d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156126c75781810151838201526020016126af565b50505050905090810190601f1680156126f45780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220e90e8f0cdab6b27d4296be1e52d3df2f5113aa671c569df87857c7039d1051da64736f6c63430006080033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000005134734894778
-----Decoded View---------------
Arg [0] : fee (uint256): 1428571428571000
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000005134734894778
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.