Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,172 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Swap | 20452838 | 186 days ago | IN | 0.00001177 ETH | 0.00003457 | ||||
Swap | 20452800 | 186 days ago | IN | 0.00018074 ETH | 0.00003461 | ||||
Shutdown | 14595656 | 1027 days ago | IN | 0 ETH | 0.00076945 | ||||
Swap | 12579573 | 1341 days ago | IN | 0.01 ETH | 0.00433937 | ||||
Swap | 12211974 | 1398 days ago | IN | 0.045 ETH | 0.0037467 | ||||
Swap | 12203249 | 1399 days ago | IN | 0.5 ETH | 0.018436 | ||||
Swap | 12169612 | 1404 days ago | IN | 0.4181 ETH | 0.01933772 | ||||
Swap | 12164066 | 1405 days ago | IN | 0.1 ETH | 0.03079373 | ||||
Swap | 12147168 | 1408 days ago | IN | 0 ETH | 0.1104444 | ||||
Swap | 12145738 | 1408 days ago | IN | 0 ETH | 0.04276365 | ||||
Swap | 12144595 | 1408 days ago | IN | 0.1 ETH | 0.02801251 | ||||
Swap | 12144493 | 1408 days ago | IN | 0.09 ETH | 0.02482654 | ||||
Swap | 12144345 | 1408 days ago | IN | 0 ETH | 0.07287728 | ||||
Swap | 12143730 | 1408 days ago | IN | 0.007442 ETH | 0.00402 | ||||
Swap | 12143431 | 1408 days ago | IN | 0 ETH | 0.10305346 | ||||
Swap | 12143431 | 1408 days ago | IN | 0 ETH | 0.10305346 | ||||
Swap | 12143431 | 1408 days ago | IN | 0 ETH | 0.07725159 | ||||
Swap | 12143338 | 1408 days ago | IN | 0.09 ETH | 0.02215368 | ||||
Swap | 12141611 | 1409 days ago | IN | 0.38860362 ETH | 0.01176056 | ||||
Swap | 12140542 | 1409 days ago | IN | 0.06 ETH | 0.02545212 | ||||
Swap | 12138501 | 1409 days ago | IN | 0.28 ETH | 0.01970754 | ||||
Swap | 12138410 | 1409 days ago | IN | 0.15 ETH | 0.06019836 | ||||
Swap | 12138074 | 1409 days ago | IN | 0.05 ETH | 0.03783691 | ||||
Swap | 12137367 | 1409 days ago | IN | 0.03766808 ETH | 0.00465822 | ||||
Swap | 12136801 | 1409 days ago | IN | 0.02012884 ETH | 0.00465955 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
12579573 | 1341 days ago | 0.01 ETH | ||||
12211974 | 1398 days ago | 0.045 ETH | ||||
12203249 | 1399 days ago | 0.5 ETH | ||||
12169612 | 1404 days ago | 0.4181 ETH | ||||
12164066 | 1405 days ago | 0.1 ETH | ||||
12147168 | 1408 days ago | 456.29777581 ETH | ||||
12147168 | 1408 days ago | 456.29777581 ETH | ||||
12144595 | 1408 days ago | 0.1 ETH | ||||
12144493 | 1408 days ago | 0.09 ETH | ||||
12144345 | 1408 days ago | 0.08471516 ETH | ||||
12144345 | 1408 days ago | 0.08471516 ETH | ||||
12143431 | 1408 days ago | 2.38018576 ETH | ||||
12143431 | 1408 days ago | 2.38018576 ETH | ||||
12143338 | 1408 days ago | 0.09 ETH | ||||
12140542 | 1409 days ago | 0.06 ETH | ||||
12138501 | 1409 days ago | 0.28 ETH | ||||
12138410 | 1409 days ago | 0.15 ETH | ||||
12138074 | 1409 days ago | 0.05 ETH | ||||
12135850 | 1410 days ago | 0.3311 ETH | ||||
12135850 | 1410 days ago | 0.3311 ETH | ||||
12135540 | 1410 days ago | 0.1 ETH | ||||
12135072 | 1410 days ago | 3.88 ETH | ||||
12134822 | 1410 days ago | 0.05803019 ETH | ||||
12134822 | 1410 days ago | 0.05803019 ETH | ||||
12134789 | 1410 days ago | 0.1 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OpenOceanExchange
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-12-07 */ // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // SPDX-License-Identifier: MIT pragma solidity ^0.6.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); } // File: @openzeppelin/contracts/math/SafeMath.sol pragma solidity ^0.6.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; } } // File: @openzeppelin/contracts/utils/Address.sol pragma solidity ^0.6.2; /** * @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) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @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"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); 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); } } } } // File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol pragma solidity ^0.6.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using 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"); } } } // File: @openzeppelin/contracts/GSN/Context.sol pragma solidity ^0.6.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; } } // File: @openzeppelin/contracts/access/Ownable.sol pragma solidity ^0.6.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @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 virtual 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 newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: contracts/lib/Shutdownable.sol pragma solidity ^0.6.0; contract Shutdownable is Ownable { bool public isShutdown; event Shutdown(); modifier notShutdown { require(!isShutdown, "Smart contract is shut down."); _; } function shutdown() public onlyOwner { isShutdown = true; emit Shutdown(); } } // File: contracts/lib/UniversalERC20.sol pragma solidity ^0.6.0; /** * @dev See https://github.com/CryptoManiacsZone/1inchProtocol/blob/master/contracts/UniversalERC20.sol */ library UniversalERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 private constant ZERO_ADDRESS = IERC20(0x0000000000000000000000000000000000000000); IERC20 private constant ETH_ADDRESS = IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); function universalTransfer( IERC20 token, address to, uint256 amount ) internal returns (bool) { if (amount == 0) { return true; } if (isETH(token)) { payable(to).transfer(amount); return true; } else { token.safeTransfer(to, amount); return true; } } function universalTransferFrom( IERC20 token, address from, address to, uint256 amount ) internal { if (amount == 0) { return; } if (isETH(token)) { require(from == msg.sender && msg.value >= amount, "Wrong useage of ETH.universalTransferFrom()"); if (to != address(this)) { address(uint160(to)).transfer(amount); } if (msg.value > amount) { // return the remainder msg.sender.transfer(msg.value.sub(amount)); } } else { token.safeTransferFrom(from, to, amount); } } function universalTransferFromSenderToThis(IERC20 token, uint256 amount) internal { if (amount == 0) { return; } if (isETH(token)) { if (msg.value > amount) { // return the remainder msg.sender.transfer(msg.value.sub(amount)); } } else { token.safeTransferFrom(msg.sender, address(this), amount); } } function universalApprove( IERC20 token, address to, uint256 amount ) internal { if (!isETH(token)) { if (amount == 0) { token.safeApprove(to, 0); return; } uint256 allowance = token.allowance(address(this), to); if (allowance < amount) { if (allowance > 0) { token.safeApprove(to, 0); } token.safeApprove(to, amount); } } } function universalBalanceOf(IERC20 token, address who) internal view returns (uint256) { if (isETH(token)) { return who.balance; } else { return token.balanceOf(who); } } function universalDecimals(IERC20 token) internal view returns (uint256) { if (isETH(token)) { return 18; } (bool success, bytes memory data) = address(token).staticcall{gas: 10000}(abi.encodeWithSignature("decimals()")); if (!success || data.length == 0) { (success, data) = address(token).staticcall{gas: 10000}(abi.encodeWithSignature("DECIMALS()")); } return (success && data.length > 0) ? abi.decode(data, (uint256)) : 18; } function isETH(IERC20 token) internal pure returns (bool) { return (address(token) == address(ZERO_ADDRESS) || address(token) == address(ETH_ADDRESS)); } function notExist(IERC20 token) internal pure returns (bool) { return (address(token) == address(-1)); } } // File: contracts/lib/ExternalCall.sol pragma solidity ^0.6.0; library ExternalCall { // Source: https://github.com/gnosis/MultiSigWallet/blob/master/contracts/MultiSigWallet.sol // call has been separated into its own function in order to take advantage // of the Solidity's code generator to produce a loop that copies tx.data into memory. function externalCall( address target, uint256 value, bytes memory data, uint256 dataOffset, uint256 dataLength, uint256 gasLimit ) internal returns (bool result) { if (gasLimit == 0) { gasLimit = gasleft() - 40000; } assembly { let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention) let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that result := call( gasLimit, target, value, add(d, dataOffset), dataLength, // Size of the input (in bytes) - this is what fixes the padding problem x, 0 // Output is ignored, therefore the output size is zero ) } } } // File: contracts/OpenOceanExchange.sol pragma solidity ^0.6.0; contract OpenOceanExchange is Shutdownable { using SafeMath for uint256; using SafeERC20 for IERC20; using UniversalERC20 for IERC20; using ExternalCall for address; uint256 private feeRate; event FeeRateChanged(uint256 indexed oldFeeRate, uint256 indexed newFeeRate); event Order(address indexed sender, IERC20 indexed inToken, IERC20 indexed outToken, uint256 inAmount, uint256 outAmount); event Swapped( IERC20 indexed inToken, IERC20 indexed outToken, address indexed referrer, uint256 inAmount, uint256 outAmount, uint256 fee, uint256 referrerFee ); constructor(address _owner, uint256 _feeRate) public { transferOwnership(_owner); feeRate = _feeRate; } function changeFeeRate(uint256 _feeRate) public onlyOwner { uint256 oldFeeRate = feeRate; feeRate = _feeRate; emit FeeRateChanged(oldFeeRate, _feeRate); } receive() external payable notShutdown { require(msg.sender != tx.origin); } function swap( IERC20 inToken, IERC20 outToken, uint256 inAmount, uint256 minOutAmount, uint256 guaranteedAmount, address payable referrer, address[] memory addressesToCall, bytes memory dataToCall, uint256[] memory offsets, uint256[] memory gasLimitsAndValues ) public payable notShutdown returns (uint256 outAmount) { require(minOutAmount > 0, "Min out amount should be greater than zero."); require(addressesToCall.length > 0, "Call data should exists."); require((msg.value != 0) == inToken.isETH(), "OpenOcean: msg.value should be used only for ETH swap"); if (!inToken.isETH()) { inToken.safeTransferFrom(msg.sender, address(this), inAmount); } for (uint256 i = 0; i < addressesToCall.length; i++) { require( addressesToCall[i].externalCall( gasLimitsAndValues[i] & ((1 << 128) - 1), dataToCall, offsets[i], offsets[i + 1] - offsets[i], gasLimitsAndValues[i] >> 128 ) ); } inToken.universalTransfer(msg.sender, inToken.universalBalanceOf(address(this))); outAmount = outToken.universalBalanceOf(address(this)); uint256 fee; uint256 referrerFee; (outAmount, fee, referrerFee) = handleFees(outToken, outAmount, guaranteedAmount, referrer); require(outAmount >= minOutAmount, "Return amount less than the minimum required amount"); outToken.universalTransfer(msg.sender, outAmount); emit Order(msg.sender, inToken, outToken, inAmount, outAmount); emit Swapped(inToken, outToken, referrer, inAmount, outAmount, fee, referrerFee); } function handleFees( IERC20 toToken, uint256 outAmount, uint256 guaranteedAmount, address referrer ) internal returns ( uint256 realOutAmount, uint256 fee, uint256 referrerFee ) { if (outAmount <= guaranteedAmount || feeRate == 0) { return (outAmount, 0, 0); } fee = outAmount.sub(guaranteedAmount).mul(feeRate).div(10000); if (referrer != address(0) && referrer != msg.sender && referrer != tx.origin) { referrerFee = fee.div(10); if (toToken.universalTransfer(referrer, referrerFee)) { outAmount = outAmount.sub(referrerFee); fee = fee.sub(referrerFee); } else { referrerFee = 0; } } if (toToken.universalTransfer(owner(), fee)) { outAmount = outAmount.sub(fee); } return (outAmount, fee, referrerFee); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_feeRate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldFeeRate","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newFeeRate","type":"uint256"}],"name":"FeeRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"inToken","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"outToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"inAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"outAmount","type":"uint256"}],"name":"Order","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Shutdown","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"inToken","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"outToken","type":"address"},{"indexed":true,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"inAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"outAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"referrerFee","type":"uint256"}],"name":"Swapped","type":"event"},{"inputs":[{"internalType":"uint256","name":"_feeRate","type":"uint256"}],"name":"changeFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isShutdown","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shutdown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"inToken","type":"address"},{"internalType":"contract IERC20","name":"outToken","type":"address"},{"internalType":"uint256","name":"inAmount","type":"uint256"},{"internalType":"uint256","name":"minOutAmount","type":"uint256"},{"internalType":"uint256","name":"guaranteedAmount","type":"uint256"},{"internalType":"address payable","name":"referrer","type":"address"},{"internalType":"address[]","name":"addressesToCall","type":"address[]"},{"internalType":"bytes","name":"dataToCall","type":"bytes"},{"internalType":"uint256[]","name":"offsets","type":"uint256[]"},{"internalType":"uint256[]","name":"gasLimitsAndValues","type":"uint256[]"}],"name":"swap","outputs":[{"internalType":"uint256","name":"outAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620015c4380380620015c4833981810160405260408110156200003757600080fd5b50805160209091015160006200004c6200009a565b600080546001600160a01b0319166001600160a01b038316908117825560405192935091600080516020620015a4833981519152908290a35062000090826200009e565b600155506200019c565b3390565b620000a86200009a565b6000546001600160a01b039081169116146200010b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620001525760405162461bcd60e51b81526004018080602001828103825260268152602001806200157e6026913960400191505060405180910390fd5b600080546040516001600160a01b0380851693921691600080516020620015a483398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6113d280620001ac6000396000f3fe6080604052600436106100745760003560e01c8063bf86d6901161004e578063bf86d6901461015c578063f2fde38b14610185578063f88309d7146101b8578063fc0e74d114610428576100e7565b8063715018a6146100ec5780638da5cb5b14610101578063affca93214610132576100e7565b366100e757600054600160a01b900460ff16156100d8576040805162461bcd60e51b815260206004820152601c60248201527f536d61727420636f6e7472616374206973207368757420646f776e2e00000000604482015290519081900360640190fd5b333214156100e557600080fd5b005b600080fd5b3480156100f857600080fd5b506100e561043d565b34801561010d57600080fd5b506101166104df565b604080516001600160a01b039092168252519081900360200190f35b34801561013e57600080fd5b506100e56004803603602081101561015557600080fd5b50356104ee565b34801561016857600080fd5b5061017161057f565b604080519115158252519081900360200190f35b34801561019157600080fd5b506100e5600480360360208110156101a857600080fd5b50356001600160a01b031661058f565b61041660048036036101408110156101cf57600080fd5b6001600160a01b038235811692602081013582169260408201359260608301359260808101359260a08201359092169181019060e0810160c0820135600160201b81111561021c57600080fd5b82018360208201111561022e57600080fd5b803590602001918460208302840111600160201b8311171561024f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561029e57600080fd5b8201836020820111156102b057600080fd5b803590602001918460018302840111600160201b831117156102d157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561032357600080fd5b82018360208201111561033557600080fd5b803590602001918460208302840111600160201b8311171561035657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103a557600080fd5b8201836020820111156103b757600080fd5b803590602001918460208302840111600160201b831117156103d857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610687945050505050565b60408051918252519081900360200190f35b34801561043457600080fd5b506100e5610a4b565b610445610adf565b6000546001600160a01b03908116911614610495576040805162461bcd60e51b81526020600482018190526024820152600080516020611328833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6104f6610adf565b6000546001600160a01b03908116911614610546576040805162461bcd60e51b81526020600482018190526024820152600080516020611328833981519152604482015290519081900360640190fd5b6001805490829055604051829082907fb9ffe02e89fee6f5544ee152a08c2cafbc3a4a89a66737ef42115dcd508aea1090600090a35050565b600054600160a01b900460ff1681565b610597610adf565b6000546001600160a01b039081169116146105e7576040805162461bcd60e51b81526020600482018190526024820152600080516020611328833981519152604482015290519081900360640190fd5b6001600160a01b03811661062c5760405162461bcd60e51b81526004018080602001828103825260268152602001806112796026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054600160a01b900460ff16156106e7576040805162461bcd60e51b815260206004820152601c60248201527f536d61727420636f6e7472616374206973207368757420646f776e2e00000000604482015290519081900360640190fd5b600088116107265760405162461bcd60e51b815260040180806020018281038252602b815260200180611348602b913960400191505060405180910390fd5b600085511161077c576040805162461bcd60e51b815260206004820152601860248201527f43616c6c20646174612073686f756c64206578697374732e0000000000000000604482015290519081900360640190fd5b61078e8b6001600160a01b0316610ae3565b1515341515146107cf5760405162461bcd60e51b815260040180806020018281038252603581526020018061129f6035913960400191505060405180910390fd5b6107e18b6001600160a01b0316610ae3565b6107fa576107fa6001600160a01b038c1633308c610b1d565b60005b85518110156108c8576108b783828151811061081557fe5b60200260200101516fffffffffffffffffffffffffffffffff168686848151811061083c57fe5b602002602001015187858151811061085057fe5b602002602001015188866001018151811061086757fe5b602002602001015103608088878151811061087e57fe5b6020026020010151901c8b878151811061089457fe5b60200260200101516001600160a01b0316610b7d9095949392919063ffffffff16565b6108c057600080fd5b6001016107fd565b506108f1336108e06001600160a01b038e1630610bab565b6001600160a01b038e169190610c4c565b506109056001600160a01b038b1630610bab565b90506000806109168c848b8b610cc8565b919450925090508983101561095c5760405162461bcd60e51b81526004018080602001828103825260338152602001806112d46033913960400191505060405180910390fd5b6109706001600160a01b038d163385610c4c565b508b6001600160a01b03168d6001600160a01b0316336001600160a01b03167f4ec237690cd79c8ab7ec9b0747f20cb9e9a58b89bd4e09312f5773ab546bee4c8e87604051808381526020018281526020019250505060405180910390a4876001600160a01b03168c6001600160a01b03168e6001600160a01b03167fe2cee3f6836059820b673943853afebd9b3026125dab0d774284e6f28a4855be8e8787876040518085815260200184815260200183815260200182815260200194505050505060405180910390a450509a9950505050505050505050565b610a53610adf565b6000546001600160a01b03908116911614610aa3576040805162461bcd60e51b81526020600482018190526024820152600080516020611328833981519152604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1781556040517f4426aa1fb73e391071491fcfe21a88b5c38a0a0333a1f6e77161470439704cf89190a1565b3390565b60006001600160a01b0382161580610b1757506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b92915050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610b77908590610dda565b50505050565b600081610b8c57619c405a0391505b60405160208601600082868884018b8d89f19998505050505050505050565b6000610bb683610ae3565b15610bcc57506001600160a01b03811631610b17565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610c1957600080fd5b505afa158015610c2d573d6000803e3d6000fd5b505050506040513d6020811015610c4357600080fd5b50519392505050565b600081610c5b57506001610cc1565b610c6484610ae3565b15610ca9576040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015610c9f573d6000803e3d6000fd5b5060019050610cc1565b610cbd6001600160a01b0385168484610e90565b5060015b9392505050565b60008060008486111580610cdc5750600154155b15610cef57508491506000905080610dd0565b610d1a612710610d14600154610d0e898b610ee290919063ffffffff16565b90610f24565b90610f7d565b91506001600160a01b03841615801590610d3d57506001600160a01b0384163314155b8015610d5257506001600160a01b0384163214155b15610d9e57610d6282600a610f7d565b9050610d786001600160a01b0388168583610c4c565b15610d9a57610d878682610ee2565b9550610d938282610ee2565b9150610d9e565b5060005b610dba610da96104df565b6001600160a01b0389169084610c4c565b15610dcc57610dc98683610ee2565b95505b8592505b9450945094915050565b6060610e2f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610fbf9092919063ffffffff16565b805190915015610e8b57808060200190516020811015610e4e57600080fd5b5051610e8b5760405162461bcd60e51b815260040180806020018281038252602a815260200180611373602a913960400191505060405180910390fd5b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610e8b908490610dda565b6000610cc183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fd6565b600082610f3357506000610b17565b82820282848281610f4057fe5b0414610cc15760405162461bcd60e51b81526004018080602001828103825260218152602001806113076021913960400191505060405180910390fd5b6000610cc183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061106d565b6060610fce84846000856110d2565b949350505050565b600081848411156110655760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561102a578181015183820152602001611012565b50505050905090810190601f1680156110575780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836110bc5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561102a578181015183820152602001611012565b5060008385816110c857fe5b0495945050505050565b60606110dd8561123f565b61112e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061116d5780518252601f19909201916020918201910161114e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146111cf576040519150601f19603f3d011682016040523d82523d6000602084013e6111d4565b606091505b509150915081156111e8579150610fce9050565b8051156111f85780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561102a578181015183820152602001611012565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610fce57505015159291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f70656e4f6365616e3a206d73672e76616c75652073686f756c642062652075736564206f6e6c7920666f7220455448207377617052657475726e20616d6f756e74206c657373207468616e20746865206d696e696d756d20726571756972656420616d6f756e74536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724d696e206f757420616d6f756e742073686f756c642062652067726561746572207468616e207a65726f2e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122045ddd996942f028ff4205b6d6ed30c750c16c8e9fe2a4ecafcea0ef377f5470564736f6c634300060c00334f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573738be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00000000000000000000000005bdce812ce8409442ac3fbbd10565f9b17a6c49d0000000000000000000000000000000000000000000000000000000000002710
Deployed Bytecode
0x6080604052600436106100745760003560e01c8063bf86d6901161004e578063bf86d6901461015c578063f2fde38b14610185578063f88309d7146101b8578063fc0e74d114610428576100e7565b8063715018a6146100ec5780638da5cb5b14610101578063affca93214610132576100e7565b366100e757600054600160a01b900460ff16156100d8576040805162461bcd60e51b815260206004820152601c60248201527f536d61727420636f6e7472616374206973207368757420646f776e2e00000000604482015290519081900360640190fd5b333214156100e557600080fd5b005b600080fd5b3480156100f857600080fd5b506100e561043d565b34801561010d57600080fd5b506101166104df565b604080516001600160a01b039092168252519081900360200190f35b34801561013e57600080fd5b506100e56004803603602081101561015557600080fd5b50356104ee565b34801561016857600080fd5b5061017161057f565b604080519115158252519081900360200190f35b34801561019157600080fd5b506100e5600480360360208110156101a857600080fd5b50356001600160a01b031661058f565b61041660048036036101408110156101cf57600080fd5b6001600160a01b038235811692602081013582169260408201359260608301359260808101359260a08201359092169181019060e0810160c0820135600160201b81111561021c57600080fd5b82018360208201111561022e57600080fd5b803590602001918460208302840111600160201b8311171561024f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561029e57600080fd5b8201836020820111156102b057600080fd5b803590602001918460018302840111600160201b831117156102d157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561032357600080fd5b82018360208201111561033557600080fd5b803590602001918460208302840111600160201b8311171561035657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103a557600080fd5b8201836020820111156103b757600080fd5b803590602001918460208302840111600160201b831117156103d857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610687945050505050565b60408051918252519081900360200190f35b34801561043457600080fd5b506100e5610a4b565b610445610adf565b6000546001600160a01b03908116911614610495576040805162461bcd60e51b81526020600482018190526024820152600080516020611328833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6104f6610adf565b6000546001600160a01b03908116911614610546576040805162461bcd60e51b81526020600482018190526024820152600080516020611328833981519152604482015290519081900360640190fd5b6001805490829055604051829082907fb9ffe02e89fee6f5544ee152a08c2cafbc3a4a89a66737ef42115dcd508aea1090600090a35050565b600054600160a01b900460ff1681565b610597610adf565b6000546001600160a01b039081169116146105e7576040805162461bcd60e51b81526020600482018190526024820152600080516020611328833981519152604482015290519081900360640190fd5b6001600160a01b03811661062c5760405162461bcd60e51b81526004018080602001828103825260268152602001806112796026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054600160a01b900460ff16156106e7576040805162461bcd60e51b815260206004820152601c60248201527f536d61727420636f6e7472616374206973207368757420646f776e2e00000000604482015290519081900360640190fd5b600088116107265760405162461bcd60e51b815260040180806020018281038252602b815260200180611348602b913960400191505060405180910390fd5b600085511161077c576040805162461bcd60e51b815260206004820152601860248201527f43616c6c20646174612073686f756c64206578697374732e0000000000000000604482015290519081900360640190fd5b61078e8b6001600160a01b0316610ae3565b1515341515146107cf5760405162461bcd60e51b815260040180806020018281038252603581526020018061129f6035913960400191505060405180910390fd5b6107e18b6001600160a01b0316610ae3565b6107fa576107fa6001600160a01b038c1633308c610b1d565b60005b85518110156108c8576108b783828151811061081557fe5b60200260200101516fffffffffffffffffffffffffffffffff168686848151811061083c57fe5b602002602001015187858151811061085057fe5b602002602001015188866001018151811061086757fe5b602002602001015103608088878151811061087e57fe5b6020026020010151901c8b878151811061089457fe5b60200260200101516001600160a01b0316610b7d9095949392919063ffffffff16565b6108c057600080fd5b6001016107fd565b506108f1336108e06001600160a01b038e1630610bab565b6001600160a01b038e169190610c4c565b506109056001600160a01b038b1630610bab565b90506000806109168c848b8b610cc8565b919450925090508983101561095c5760405162461bcd60e51b81526004018080602001828103825260338152602001806112d46033913960400191505060405180910390fd5b6109706001600160a01b038d163385610c4c565b508b6001600160a01b03168d6001600160a01b0316336001600160a01b03167f4ec237690cd79c8ab7ec9b0747f20cb9e9a58b89bd4e09312f5773ab546bee4c8e87604051808381526020018281526020019250505060405180910390a4876001600160a01b03168c6001600160a01b03168e6001600160a01b03167fe2cee3f6836059820b673943853afebd9b3026125dab0d774284e6f28a4855be8e8787876040518085815260200184815260200183815260200182815260200194505050505060405180910390a450509a9950505050505050505050565b610a53610adf565b6000546001600160a01b03908116911614610aa3576040805162461bcd60e51b81526020600482018190526024820152600080516020611328833981519152604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1781556040517f4426aa1fb73e391071491fcfe21a88b5c38a0a0333a1f6e77161470439704cf89190a1565b3390565b60006001600160a01b0382161580610b1757506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b92915050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610b77908590610dda565b50505050565b600081610b8c57619c405a0391505b60405160208601600082868884018b8d89f19998505050505050505050565b6000610bb683610ae3565b15610bcc57506001600160a01b03811631610b17565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610c1957600080fd5b505afa158015610c2d573d6000803e3d6000fd5b505050506040513d6020811015610c4357600080fd5b50519392505050565b600081610c5b57506001610cc1565b610c6484610ae3565b15610ca9576040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015610c9f573d6000803e3d6000fd5b5060019050610cc1565b610cbd6001600160a01b0385168484610e90565b5060015b9392505050565b60008060008486111580610cdc5750600154155b15610cef57508491506000905080610dd0565b610d1a612710610d14600154610d0e898b610ee290919063ffffffff16565b90610f24565b90610f7d565b91506001600160a01b03841615801590610d3d57506001600160a01b0384163314155b8015610d5257506001600160a01b0384163214155b15610d9e57610d6282600a610f7d565b9050610d786001600160a01b0388168583610c4c565b15610d9a57610d878682610ee2565b9550610d938282610ee2565b9150610d9e565b5060005b610dba610da96104df565b6001600160a01b0389169084610c4c565b15610dcc57610dc98683610ee2565b95505b8592505b9450945094915050565b6060610e2f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610fbf9092919063ffffffff16565b805190915015610e8b57808060200190516020811015610e4e57600080fd5b5051610e8b5760405162461bcd60e51b815260040180806020018281038252602a815260200180611373602a913960400191505060405180910390fd5b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610e8b908490610dda565b6000610cc183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fd6565b600082610f3357506000610b17565b82820282848281610f4057fe5b0414610cc15760405162461bcd60e51b81526004018080602001828103825260218152602001806113076021913960400191505060405180910390fd5b6000610cc183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061106d565b6060610fce84846000856110d2565b949350505050565b600081848411156110655760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561102a578181015183820152602001611012565b50505050905090810190601f1680156110575780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836110bc5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561102a578181015183820152602001611012565b5060008385816110c857fe5b0495945050505050565b60606110dd8561123f565b61112e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061116d5780518252601f19909201916020918201910161114e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146111cf576040519150601f19603f3d011682016040523d82523d6000602084013e6111d4565b606091505b509150915081156111e8579150610fce9050565b8051156111f85780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561102a578181015183820152602001611012565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610fce57505015159291505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f70656e4f6365616e3a206d73672e76616c75652073686f756c642062652075736564206f6e6c7920666f7220455448207377617052657475726e20616d6f756e74206c657373207468616e20746865206d696e696d756d20726571756972656420616d6f756e74536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724d696e206f757420616d6f756e742073686f756c642062652067726561746572207468616e207a65726f2e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122045ddd996942f028ff4205b6d6ed30c750c16c8e9fe2a4ecafcea0ef377f5470564736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005bdce812ce8409442ac3fbbd10565f9b17a6c49d0000000000000000000000000000000000000000000000000000000000002710
-----Decoded View---------------
Arg [0] : _owner (address): 0x5bDCE812ce8409442ac3FBbd10565F9B17A6C49D
Arg [1] : _feeRate (uint256): 10000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005bdce812ce8409442ac3fbbd10565f9b17a6c49d
Arg [1] : 0000000000000000000000000000000000000000000000000000000000002710
Deployed Bytecode Sourcemap
26912:4012:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21675:10;;-1:-1:-1;;;21675:10:0;;;;21674:11;21666:52;;;;;-1:-1:-1;;;21666:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;27976:10:::1;27990:9;27976:23;;27968:32;;;::::0;::::1;;26912:4012:::0;;;;;20910:148;;;;;;;;;;;;;:::i;20268:79::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;20268:79:0;;;;;;;;;;;;;;27724:186;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27724:186:0;;:::i;21578:22::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;21213:244;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21213:244:0;-1:-1:-1;;;;;21213:244:0;;:::i;28016:1865::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28016:1865:0;;;;;;;;-1:-1:-1;28016:1865:0;;-1:-1:-1;;;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28016:1865:0;;;;;;;;-1:-1:-1;28016:1865:0;;-1:-1:-1;;;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28016:1865:0;;;;;;;;-1:-1:-1;28016:1865:0;;-1:-1:-1;;;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28016:1865:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28016:1865:0;;-1:-1:-1;28016:1865:0;;-1:-1:-1;;;;;28016:1865:0:i;:::-;;;;;;;;;;;;;;;;21746:99;;;;;;;;;;;;;:::i;20910:148::-;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20472:67:0;;;;;;;;;;;;;;;21017:1:::1;21001:6:::0;;20980:40:::1;::::0;-1:-1:-1;;;;;21001:6:0;;::::1;::::0;20980:40:::1;::::0;21017:1;;20980:40:::1;21048:1;21031:19:::0;;-1:-1:-1;;;;;;21031:19:0::1;::::0;;20910:148::o;20268:79::-;20306:7;20333:6;-1:-1:-1;;;;;20333:6:0;20268:79;:::o;27724:186::-;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20472:67:0;;;;;;;;;;;;;;;27814:7:::1;::::0;;27832:18;;;;27866:36:::1;::::0;27842:8;;27814:7;;27866:36:::1;::::0;27793:18:::1;::::0;27866:36:::1;20550:1;27724:186:::0;:::o;21578:22::-;;;-1:-1:-1;;;21578:22:0;;;;;:::o;21213:244::-;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20472:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;21302:22:0;::::1;21294:73;;;;-1:-1:-1::0;;;21294:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21404:6;::::0;;21383:38:::1;::::0;-1:-1:-1;;;;;21383:38:0;;::::1;::::0;21404:6;::::1;::::0;21383:38:::1;::::0;::::1;21432:6;:17:::0;;-1:-1:-1;;;;;;21432:17:0::1;-1:-1:-1::0;;;;;21432:17:0;;;::::1;::::0;;;::::1;::::0;;21213:244::o;28016:1865::-;28410:17;21675:10;;-1:-1:-1;;;21675:10:0;;;;21674:11;21666:52;;;;;-1:-1:-1;;;21666:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;28463:1:::1;28448:12;:16;28440:72;;;;-1:-1:-1::0;;;28440:72:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28556:1;28531:15;:22;:26;28523:63;;;::::0;;-1:-1:-1;;;28523:63:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;28625:15;:7;-1:-1:-1::0;;;;;28625:13:0::1;;:15::i;:::-;28605:35;;28606:9;:14:::0;::::1;28605:35;28597:101;;;;-1:-1:-1::0;;;28597:101:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28716:15;:7;-1:-1:-1::0;;;;;28716:13:0::1;;:15::i;:::-;28711:110;;28748:61;-1:-1:-1::0;;;;;28748:24:0;::::1;28773:10;28793:4;28800:8:::0;28748:24:::1;:61::i;:::-;28838:9;28833:401;28857:15;:22;28853:1;:26;28833:401;;;28927:280;28981:18;29000:1;28981:21;;;;;;;;;;;;;;29006:14;28981:40;29044:10;29077:7;29085:1;29077:10;;;;;;;;;;;;;;29127:7;29135:1;29127:10;;;;;;;;;;;;;;29110:7;29118:1;29122;29118:5;29110:14;;;;;;;;;;;;;;:27;29185:3;29160:18;29179:1;29160:21;;;;;;;;;;;;;;:28;;28927:15;28943:1;28927:18;;;;;;;;;;;;;;-1:-1:-1::0;;;;;28927:31:0::1;;;:280;;;;;;;;:::i;:::-;28901:321;;;::::0;::::1;;28881:3;;28833:401;;;-1:-1:-1::0;29246:80:0::1;29272:10;29284:41;-1:-1:-1::0;;;;;29284:26:0;::::1;29319:4;29284:26;:41::i;:::-;-1:-1:-1::0;;;;;29246:25:0;::::1;::::0;:80;:25:::1;:80::i;:::-;-1:-1:-1::0;29349:42:0::1;-1:-1:-1::0;;;;;29349:27:0;::::1;29385:4;29349:27;:42::i;:::-;29337:54;;29402:11;29424:19:::0;29486:59:::1;29497:8;29507:9;29518:16;29536:8;29486:10;:59::i;:::-;29454:91:::0;;-1:-1:-1;29454:91:0;-1:-1:-1;29454:91:0;-1:-1:-1;29566:25:0;;::::1;;29558:89;;;;-1:-1:-1::0;;;29558:89:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29658:49;-1:-1:-1::0;;;;;29658:26:0;::::1;29685:10;29697:9:::0;29658:26:::1;:49::i;:::-;;29752:8;-1:-1:-1::0;;;;;29725:57:0::1;29743:7;-1:-1:-1::0;;;;;29725:57:0::1;29731:10;-1:-1:-1::0;;;;;29725:57:0::1;;29762:8;29772:9;29725:57;;;;;;;;;;;;;;;;;;;;;;;;29825:8;-1:-1:-1::0;;;;;29798:75:0::1;29815:8;-1:-1:-1::0;;;;;29798:75:0::1;29806:7;-1:-1:-1::0;;;;;29798:75:0::1;;29835:8;29845:9;29856:3;29861:11;29798:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21729:1;;28016:1865:::0;;;;;;;;;;;;:::o;21746:99::-;20490:12;:10;:12::i;:::-;20480:6;;-1:-1:-1;;;;;20480:6:0;;;:22;;;20472:67;;;;;-1:-1:-1;;;20472:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20472:67:0;;;;;;;;;;;;;;;21794:10:::1;:17:::0;;-1:-1:-1;;;;21794:17:0::1;-1:-1:-1::0;;;21794:17:0::1;::::0;;21827:10:::1;::::0;::::1;::::0;21794;21827::::1;21746:99::o:0;18820:106::-;18908:10;18820:106;:::o;25223:167::-;25275:4;-1:-1:-1;;;;;25300:39:0;;;;:81;;-1:-1:-1;;;;;;25343:38:0;;22286:42;25343:38;25300:81;25292:90;25223:167;-1:-1:-1;;25223:167:0:o;15306:205::-;15434:68;;;-1:-1:-1;;;;;15434:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15434:68:0;-1:-1:-1;;;15434:68:0;;;15407:96;;15427:5;;15407:19;:96::i;:::-;15306:205;;;;:::o;25894:928::-;26103:11;26131:13;26127:74;;26184:5;26172:9;:17;26161:28;;26127:74;26250:4;26244:11;26382:2;26376:4;26372:13;26732:1;26712;26610:10;26580;26577:1;26573:18;26549:5;26524:6;26497:8;26474:330;26464:340;26220:595;-1:-1:-1;;;;;;;;;26220:595:0:o;24461:228::-;24539:7;24563:12;24569:5;24563;:12::i;:::-;24559:123;;;-1:-1:-1;;;;;;24599:11:0;;;24592:18;;24559:123;24650:5;-1:-1:-1;;;;;24650:15:0;;24666:3;24650:20;;;;;;;;;;;;;-1:-1:-1;;;;;24650:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;24650:20:0;;24461:228;-1:-1:-1;;;24461:228:0:o;22338:400::-;22459:4;22480:11;22476:55;;-1:-1:-1;22515:4:0;22508:11;;22476:55;22547:12;22553:5;22547;:12::i;:::-;22543:188;;;22576:28;;-1:-1:-1;;;;;22576:20:0;;;:28;;;;;22597:6;;22576:28;;;;22597:6;22576:20;:28;;;;;;;;;;;;;;;;;;;;;22626:4;22619:11;;;;22543:188;22663:30;-1:-1:-1;;;;;22663:18:0;;22682:2;22686:6;22663:18;:30::i;:::-;-1:-1:-1;22715:4:0;22543:188;22338:400;;;;;:::o;29889:1032::-;30081:21;30117:11;30143:19;30207:16;30194:9;:29;;:45;;;-1:-1:-1;30227:7:0;;:12;30194:45;30190:102;;;-1:-1:-1;30264:9:0;;-1:-1:-1;30275:1:0;;-1:-1:-1;30275:1:0;30256:24;;30190:102;30310:55;30359:5;30310:44;30346:7;;30310:31;30324:16;30310:9;:13;;:31;;;;:::i;:::-;:35;;:44::i;:::-;:48;;:55::i;:::-;30304:61;-1:-1:-1;;;;;;30382:22:0;;;;;;:48;;-1:-1:-1;;;;;;30408:22:0;;30420:10;30408:22;;30382:48;:73;;;;-1:-1:-1;;;;;;30434:21:0;;30446:9;30434:21;;30382:73;30378:373;;;30486:11;:3;30494:2;30486:7;:11::i;:::-;30472:25;-1:-1:-1;30516:48:0;-1:-1:-1;;;;;30516:25:0;;30542:8;30472:25;30516;:48::i;:::-;30512:228;;;30597:26;:9;30611:11;30597:13;:26::i;:::-;30585:38;-1:-1:-1;30648:20:0;:3;30656:11;30648:7;:20::i;:::-;30642:26;;30512:228;;;-1:-1:-1;30723:1:0;30512:228;30767:39;30793:7;:5;:7::i;:::-;-1:-1:-1;;;;;30767:25:0;;;30802:3;30767:25;:39::i;:::-;30763:102;;;30835:18;:9;30849:3;30835:13;:18::i;:::-;30823:30;;30763:102;30885:9;30877:36;;29889:1032;;;;;;;;;:::o;17426:761::-;17850:23;17876:69;17904:4;17876:69;;;;;;;;;;;;;;;;;17884:5;-1:-1:-1;;;;;17876:27:0;;;:69;;;;;:::i;:::-;17960:17;;17850:95;;-1:-1:-1;17960:21:0;17956:224;;18102:10;18091:30;;;;;;;;;;;;;;;-1:-1:-1;18091:30:0;18083:85;;;;-1:-1:-1;;;18083:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17426:761;;;:::o;15121:177::-;15231:58;;;-1:-1:-1;;;;;15231:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15231:58:0;-1:-1:-1;;;15231:58:0;;;15204:86;;15224:5;;15204:19;:86::i;4223:136::-;4281:7;4308:43;4312:1;4315;4308:43;;;;;;;;;;;;;;;;;:3;:43::i;5113:471::-;5171:7;5416:6;5412:47;;-1:-1:-1;5446:1:0;5439:8;;5412:47;5483:5;;;5487:1;5483;:5;:1;5507:5;;;;;:10;5499:56;;;;-1:-1:-1;;;5499:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6060:132;6118:7;6145:39;6149:1;6152;6145:39;;;;;;;;;;;;;;;;;:3;:39::i;12100:196::-;12203:12;12235:53;12258:6;12266:4;12272:1;12275:12;12235:22;:53::i;:::-;12228:60;12100:196;-1:-1:-1;;;;12100:196:0:o;4662:192::-;4748:7;4784:12;4776:6;;;;4768:29;;;;-1:-1:-1;;;4768:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4820:5:0;;;4662:192::o;6688:278::-;6774:7;6809:12;6802:5;6794:28;;;;-1:-1:-1;;;6794:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6833:9;6849:1;6845;:5;;;;;;;6688:278;-1:-1:-1;;;;;6688:278:0:o;13477:979::-;13607:12;13640:18;13651:6;13640:10;:18::i;:::-;13632:60;;;;;-1:-1:-1;;;13632:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;13766:12;13780:23;13807:6;-1:-1:-1;;;;;13807:11:0;13827:8;13838:4;13807:36;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;13807:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13765:78;;;;13858:7;13854:595;;;13889:10;-1:-1:-1;13882:17:0;;-1:-1:-1;13882:17:0;13854:595;14003:17;;:21;13999:439;;14266:10;14260:17;14327:15;14314:10;14310:2;14306:19;14299:44;14214:148;14402:20;;-1:-1:-1;;;14402:20:0;;;;;;;;;;;;;;;;;14409:12;;14402:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8985:619;9045:4;9513:20;;9356:66;9553:23;;;;;;:42;;-1:-1:-1;;9580:15:0;;;9545:51;-1:-1:-1;;8985:619:0:o
Swarm Source
ipfs://45ddd996942f028ff4205b6d6ed30c750c16c8e9fe2a4ecafcea0ef377f54705
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BSC | 100.00% | $575.8 | 20.5214 | $11,816.16 |
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.