Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 38 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Cancel Order | 19064582 | 788 days ago | IN | 0 ETH | 0.00120756 | ||||
| Fill Order | 18944399 | 804 days ago | IN | 0 ETH | 0.00211453 | ||||
| Create Order | 18936427 | 806 days ago | IN | 0 ETH | 0.00322483 | ||||
| Fill Order | 18832065 | 820 days ago | IN | 0 ETH | 0.00076485 | ||||
| Create Order | 18831543 | 820 days ago | IN | 0 ETH | 0.00440913 | ||||
| Cancel Order | 18745802 | 832 days ago | IN | 0 ETH | 0.00257145 | ||||
| Create Order | 18723432 | 835 days ago | IN | 0 ETH | 0.00806867 | ||||
| Cancel Order | 18600390 | 853 days ago | IN | 0 ETH | 0.00117895 | ||||
| Create Order | 18600387 | 853 days ago | IN | 0 ETH | 0.00275567 | ||||
| Fill Order | 18541855 | 861 days ago | IN | 0 ETH | 0.00079366 | ||||
| Create Order | 18496294 | 867 days ago | IN | 0 ETH | 0.00165125 | ||||
| Fill Order | 18481070 | 869 days ago | IN | 0 ETH | 0.00073927 | ||||
| Create Order | 18471142 | 871 days ago | IN | 0 ETH | 0.00414569 | ||||
| Fill Order | 18464896 | 872 days ago | IN | 0 ETH | 0.00467682 | ||||
| Fill Order | 18464723 | 872 days ago | IN | 0 ETH | 0.00338801 | ||||
| Create Order | 18459082 | 872 days ago | IN | 0 ETH | 0.00187719 | ||||
| Cancel Order | 18454088 | 873 days ago | IN | 0 ETH | 0.0005938 | ||||
| Create Order | 18451536 | 873 days ago | IN | 0 ETH | 0.00155962 | ||||
| Transfer Ownersh... | 18451424 | 873 days ago | IN | 0 ETH | 0.00033987 | ||||
| Fill Order | 18448200 | 874 days ago | IN | 0 ETH | 0.00130772 | ||||
| Fill Order | 18442307 | 875 days ago | IN | 0 ETH | 0.00434182 | ||||
| Fill Order | 18442298 | 875 days ago | IN | 0 ETH | 0.00403469 | ||||
| Fill Order | 18442293 | 875 days ago | IN | 0 ETH | 0.00401102 | ||||
| Fill Order | 18437359 | 875 days ago | IN | 0 ETH | 0.00235724 | ||||
| Create Order | 18436389 | 876 days ago | IN | 0 ETH | 0.00272488 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
FetOtcExchange
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
/// @title FET OTC Exchange
/// @author hodl.esf.eth
contract FetOtcExchange is Ownable {
using SafeERC20 for IERC20;
struct Order {
uint128 amount;
uint128 price;
address seller;
uint64 validUntil;
bool filled;
bool cancelled;
address paymentToken;
}
mapping(IERC20 => bool) public paymentTokens; // Mapping to store approved payment tokens
mapping(uint256 => Order) public orders;
uint256 public nextOrderId = 1;
uint256 public tokenBalance;
uint256 public constant FEE_RATE = 250; // 0.25%
IERC20 public immutable allowedToken;
/// @notice Event emitted when a new order is created
event OrderCreated(uint256 indexed orderId, address indexed seller, uint128 amount, uint128 price, uint64 validUntil, address paymentToken);
/// @notice Event emitted when an order is cancelled
event OrderCancelled(uint256 indexed orderId);
/// @notice Event emitted when an order is filled
event OrderFilled(uint256 indexed orderId, address indexed buyer, address indexed seller, uint128 amount, uint128 price, address currency);
/// @notice Event emitted when a payment token is added
event PaymentTokenAdded(IERC20 indexed newPaymentToken);
/// @notice Event emitted when a payment token is removed
event PaymentTokenRemoved(IERC20 indexed removedPaymentToken);
error TransferFailed(address from, uint128 amount);
error CancellationFailed(address from, uint256 orderId);
error FillFailed(address from, uint256 orderId);
error WithdrawFailed(address to, uint256 amount);
error OrderCreationFailed(uint128 amount, uint128 price, uint64 validUntil);
error PaymentTokenOperationFailed(address token);
error InvalidPaymentToken(IERC20 token);
/// @notice Contract constructor
/// @param _allowedToken The address of the token that is allowed for trading
constructor(IERC20 _allowedToken) {
allowedToken = _allowedToken;
}
/// @notice Creates a new order
/// @param amount The amount of tokens to sell
/// @param price The price per token
/// @param validUntil The time until the order is valid
/// @param paymentToken The token to use for payment
function createOrder(uint128 amount, uint128 price, uint64 validUntil, address paymentToken) external {
if (validUntil <= block.timestamp || amount == 0 || price == 0) {
revert OrderCreationFailed(amount, price, validUntil);
}
allowedToken.safeTransferFrom(msg.sender, address(this), amount);
uint256 orderId;
unchecked{
orderId = nextOrderId++;
}
orders[orderId] = Order(amount, price, msg.sender, validUntil, false, false, paymentToken);
tokenBalance += amount;
emit OrderCreated(orderId, msg.sender, amount, price, validUntil, paymentToken);
}
/// @notice Cancels an existing order
/// @param orderId The ID of the order to cancel
function cancelOrder(uint256 orderId) external {
Order storage order = orders[orderId];
// Check multiple conditions: if the caller is the seller, if the order is not already cancelled, and if it's not already filled
if (order.seller != msg.sender || order.cancelled || order.filled) {
revert CancellationFailed(msg.sender, orderId);
}
// Mark the order as cancelled
order.cancelled = true;
// Transfer the tokens back to the seller
allowedToken.safeTransfer(msg.sender, order.amount);
// Update the token balance stored in the contract
tokenBalance -= order.amount;
emit OrderCancelled(orderId);
}
/// @notice Fills an existing order
/// @param orderId The ID of the order to fill
function fillOrder(uint256 orderId) external payable {
Order storage order = orders[orderId];
if (order.filled || order.cancelled || order.validUntil < block.timestamp) {
revert FillFailed(msg.sender, orderId);
}
// For ETH payments, validate msg.value
if (order.paymentToken == address(0) && msg.value != order.price) {
revert FillFailed(msg.sender, orderId);
}
order.filled = true;
// Case: Payment in ETH
if (order.paymentToken == address(0)) {
uint256 fee = (msg.value * FEE_RATE) / 10000;
uint256 sellerShare = msg.value - fee;
// Fee remains in the contract, so no need to explicitly transfer
// Transfer remaining amount to the seller
(bool success,) = order.seller.call{value: sellerShare}("");
if (!success) {
revert FillFailed(order.seller, orderId);
}
// Case: Payment in ERC-20
} else if (paymentTokens[IERC20(order.paymentToken)]) {
IERC20 token = IERC20(order.paymentToken);
uint256 fee = (order.price * FEE_RATE) / 10000;
uint256 sellerShare = order.price - fee;
// this will revert if fails
token.safeTransferFrom(msg.sender, owner(), fee);
token.safeTransferFrom(msg.sender, order.seller, sellerShare);
} else {
revert("Payment token not supported");
}
allowedToken.transfer(msg.sender, order.amount);
// Update the token balance stored in the contract
tokenBalance -= order.amount;
emit OrderFilled(orderId, msg.sender, order.seller, order.amount, order.price, order.paymentToken);
}
/// @notice Withdraws tokens from the contract
/// @param token The token to withdraw
function withdrawToken(IERC20 token) external onlyOwner {
if (address(token) == address(allowedToken)) {
revert WithdrawFailed(msg.sender, tokenBalance);
}
uint256 amount = token.balanceOf(address(this));
token.safeTransfer(msg.sender, amount);
}
/// @notice Withdraws excess allowed tokens from the contract
function withdrawAllowedToken() external onlyOwner {
uint256 actualBalance = allowedToken.balanceOf(address(this));
uint256 excess = actualBalance - tokenBalance;
require(excess > 0, "No excess tokens to withdraw");
allowedToken.safeTransfer(msg.sender, excess);
}
/// @notice Withdraws ETH from the contract
function withdrawETH() external onlyOwner {
uint256 amount = address(this).balance;
(bool success,) = msg.sender.call{value: amount}("");
if (!success) {
revert WithdrawFailed(msg.sender, amount);
}
}
/// @notice Adds a payment token
/// @param _paymentToken The token to add as a payment option
function addPaymentToken(IERC20 _paymentToken) external onlyOwner {
if (address(_paymentToken) == address(allowedToken) || address(_paymentToken) == address(0)) {
revert InvalidPaymentToken(_paymentToken);
}
paymentTokens[_paymentToken] = true;
emit PaymentTokenAdded(_paymentToken);
}
/// @notice Removes a payment token
/// @param _paymentToken The payment token to remove
function removePaymentToken(IERC20 _paymentToken) external onlyOwner {
if (!paymentTokens[_paymentToken]) {
revert InvalidPaymentToken(_paymentToken);
}
delete paymentTokens[_paymentToken];
emit PaymentTokenRemoved(_paymentToken);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @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.
*/
abstract 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() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"_allowedToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"CancellationFailed","type":"error"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"FillFailed","type":"error"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"InvalidPaymentToken","type":"error"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint64","name":"validUntil","type":"uint64"}],"name":"OrderCreationFailed","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"PaymentTokenOperationFailed","type":"error"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"TransferFailed","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"OrderCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderId","type":"uint256"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"price","type":"uint128"},{"indexed":false,"internalType":"uint64","name":"validUntil","type":"uint64"},{"indexed":false,"internalType":"address","name":"paymentToken","type":"address"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderId","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"price","type":"uint128"},{"indexed":false,"internalType":"address","name":"currency","type":"address"}],"name":"OrderFilled","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":[{"indexed":true,"internalType":"contract IERC20","name":"newPaymentToken","type":"address"}],"name":"PaymentTokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"removedPaymentToken","type":"address"}],"name":"PaymentTokenRemoved","type":"event"},{"inputs":[],"name":"FEE_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_paymentToken","type":"address"}],"name":"addPaymentToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowedToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"cancelOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint64","name":"validUntil","type":"uint64"},{"internalType":"address","name":"paymentToken","type":"address"}],"name":"createOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"fillOrder","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"nextOrderId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"orders","outputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint64","name":"validUntil","type":"uint64"},{"internalType":"bool","name":"filled","type":"bool"},{"internalType":"bool","name":"cancelled","type":"bool"},{"internalType":"address","name":"paymentToken","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"paymentTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_paymentToken","type":"address"}],"name":"removePaymentToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllowedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a060405260016003553480156200001657600080fd5b5060405162002bb738038062002bb783398181016040528101906200003c9190620001e1565b6200005c620000506200009760201b60201c565b6200009f60201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000213565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001958262000168565b9050919050565b6000620001a98262000188565b9050919050565b620001bb816200019c565b8114620001c757600080fd5b50565b600081519050620001db81620001b0565b92915050565b600060208284031215620001fa57620001f962000163565b5b60006200020a84828501620001ca565b91505092915050565b60805161295762000260600039600081816104640152818161077301528181610a0d01528181610ff4015281816111fe015281816112f401528181611352015261137e01526129576000f3fe6080604052600436106100fe5760003560e01c806385fa292f11610095578063a512542111610064578063a5125421146102c8578063a85c38ef146102f1578063c3b88b4214610334578063e086e5ec14610371578063f2fde38b14610388576100fe565b806385fa292f1461021e57806389476069146102495780638da5cb5b146102725780639e1a4d191461029d576100fe565b8063514fcac7116100d1578063514fcac7146101ab57806367b830ad146101d457806369520d11146101f0578063715018a614610207576100fe565b80632a58b330146101035780632d11c58a1461012e5780633391f7ae146101595780634a7dc8e014610182575b600080fd5b34801561010f57600080fd5b506101186103b1565b6040516101259190611d6a565b60405180910390f35b34801561013a57600080fd5b506101436103b7565b6040516101509190611d6a565b60405180910390f35b34801561016557600080fd5b50610180600480360381019061017b9190611e70565b6103bc565b005b34801561018e57600080fd5b506101a960048036038101906101a49190611f15565b610769565b005b3480156101b757600080fd5b506101d260048036038101906101cd9190611f6e565b6108d6565b005b6101ee60048036038101906101e99190611f6e565b610acd565b005b3480156101fc57600080fd5b506102056111f2565b005b34801561021357600080fd5b5061021c61133c565b005b34801561022a57600080fd5b50610233611350565b6040516102409190611ffa565b60405180910390f35b34801561025557600080fd5b50610270600480360381019061026b9190611f15565b611374565b005b34801561027e57600080fd5b506102876114bd565b6040516102949190612024565b60405180910390f35b3480156102a957600080fd5b506102b26114e6565b6040516102bf9190611d6a565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea9190611f15565b6114ec565b005b3480156102fd57600080fd5b5061031860048036038101906103139190611f6e565b611617565b60405161032b9796959493929190612078565b60405180910390f35b34801561034057600080fd5b5061035b60048036038101906103569190611f15565b6116ff565b60405161036891906120e7565b60405180910390f35b34801561037d57600080fd5b5061038661171f565b005b34801561039457600080fd5b506103af60048036038101906103aa9190612102565b6117e0565b005b60035481565b60fa81565b428267ffffffffffffffff161115806103e757506000846fffffffffffffffffffffffffffffffff16145b8061040457506000836fffffffffffffffffffffffffffffffff16145b1561044a578383836040517f60d52c970000000000000000000000000000000000000000000000000000000081526004016104419392919061212f565b60405180910390fd5b6104a93330866fffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611863909392919063ffffffff16565b6000600360008154809291906001019190505590506040518060e00160405280866fffffffffffffffffffffffffffffffff168152602001856fffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018467ffffffffffffffff1681526020016000151581526020016000151581526020018373ffffffffffffffffffffffffffffffffffffffff168152506002600083815260200190815260200160002060008201518160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060208201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550608082015181600101601c6101000a81548160ff02191690831515021790555060a082015181600101601d6101000a81548160ff02191690831515021790555060c08201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050846fffffffffffffffffffffffffffffffff16600460008282546107069190612195565b925050819055503373ffffffffffffffffffffffffffffffffffffffff16817f386dfb9826a08f44cc0a3c635620df8a0db8688f8bfec037912f91ff748101d18787878760405161075a94939291906121c9565b60405180910390a35050505050565b6107716118ec565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806107f75750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1561083957806040517f4e34486d0000000000000000000000000000000000000000000000000000000081526004016108309190611ffa565b60405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fa317c10673baf4f03b3c1041bd5ddbb537d0333a86fec3607c75f9dbb630f48f60405160405180910390a250565b60006002600083815260200190815260200160002090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158061095a575080600101601d9054906101000a900460ff165b80610973575080600101601c9054906101000a900460ff165b156109b75733826040517f16282e180000000000000000000000000000000000000000000000000000000081526004016109ae92919061220e565b60405180910390fd5b600181600101601d6101000a81548160ff021916908315150217905550610a51338260000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661196a9092919063ffffffff16565b8060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1660046000828254610a959190612237565b92505081905550817f61b9399f2f0f32ca39ce8d7be32caed5ec22fe07a6daba3a467ed479ec60658260405160405180910390a25050565b600060026000838152602001908152602001600020905080600101601c9054906101000a900460ff1680610b0f575080600101601d9054906101000a900460ff165b80610b3b5750428160010160149054906101000a900467ffffffffffffffff1667ffffffffffffffff16105b15610b7f5733826040517fd1bada51000000000000000000000000000000000000000000000000000000008152600401610b7692919061220e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610c1157508060000160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff163414155b15610c555733826040517fd1bada51000000000000000000000000000000000000000000000000000000008152600401610c4c92919061220e565b60405180910390fd5b600181600101601c6101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610df857600061271060fa34610cdc919061226b565b610ce691906122dc565b905060008134610cf69190612237565b905060008360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051610d429061233e565b60006040518083038185875af1925050503d8060008114610d7f576040519150601f19603f3d011682016040523d82523d6000602084013e610d84565b606091505b5050905080610df0578360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040517fd1bada51000000000000000000000000000000000000000000000000000000008152600401610de792919061220e565b60405180910390fd5b505050610ff2565b600160008260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fb65760008160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600061271060fa8460000160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16610edb919061226b565b610ee591906122dc565b90506000818460000160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16610f279190612237565b9050610f5d33610f356114bd565b848673ffffffffffffffffffffffffffffffffffffffff16611863909392919063ffffffff16565b610fae338560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838673ffffffffffffffffffffffffffffffffffffffff16611863909392919063ffffffff16565b505050610ff1565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe8906123b0565b60405180910390fd5b5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338360000160009054906101000a90046fffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b815260040161106d929190612401565b6020604051808303816000875af115801561108c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b09190612456565b508060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16600460008282546110f59190612237565b925050819055508060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16837f6ebd11fb40999aadf46fabf69c12b691307de64334c89434106b7f27b93379758460000160009054906101000a90046fffffffffffffffffffffffffffffffff168560000160109054906101000a90046fffffffffffffffffffffffffffffffff168660020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516111e693929190612483565b60405180910390a45050565b6111fa6118ec565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016112559190612024565b602060405180830381865afa158015611272573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129691906124cf565b90506000600454826112a89190612237565b9050600081116112ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e490612548565b60405180910390fd5b61133833827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661196a9092919063ffffffff16565b5050565b6113446118ec565b61134e60006119f0565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b61137c6118ec565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361141057336004546040517fa226991200000000000000000000000000000000000000000000000000000000815260040161140792919061220e565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161144b9190612024565b602060405180830381865afa158015611468573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148c91906124cf565b90506114b933828473ffffffffffffffffffffffffffffffffffffffff1661196a9092919063ffffffff16565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60045481565b6114f46118ec565b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661158257806040517f4e34486d0000000000000000000000000000000000000000000000000000000081526004016115799190611ffa565b60405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff02191690558073ffffffffffffffffffffffffffffffffffffffff167f85a3e72f8dd6db3794f93109c3c5f5b79d6112f6979431c45f98b26134b42af260405160405180910390a250565b60026020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900467ffffffffffffffff169080600101601c9054906101000a900460ff169080600101601d9054906101000a900460ff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905087565b60016020528060005260406000206000915054906101000a900460ff1681565b6117276118ec565b600047905060003373ffffffffffffffffffffffffffffffffffffffff16826040516117529061233e565b60006040518083038185875af1925050503d806000811461178f576040519150601f19603f3d011682016040523d82523d6000602084013e611794565b606091505b50509050806117dc5733826040517fa22699120000000000000000000000000000000000000000000000000000000081526004016117d392919061220e565b60405180910390fd5b5050565b6117e86118ec565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184e906125da565b60405180910390fd5b611860816119f0565b50565b6118e6846323b872dd60e01b858585604051602401611884939291906125fa565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611ab4565b50505050565b6118f4611b7c565b73ffffffffffffffffffffffffffffffffffffffff166119126114bd565b73ffffffffffffffffffffffffffffffffffffffff1614611968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195f9061267d565b60405180910390fd5b565b6119eb8363a9059cbb60e01b848460405160240161198992919061220e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611ab4565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000611b16826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611b849092919063ffffffff16565b9050600081511480611b38575080806020019051810190611b379190612456565b5b611b77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6e9061270f565b60405180910390fd5b505050565b600033905090565b6060611b938484600085611b9c565b90509392505050565b606082471015611be1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd8906127a1565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611c0a9190612827565b60006040518083038185875af1925050503d8060008114611c47576040519150601f19603f3d011682016040523d82523d6000602084013e611c4c565b606091505b5091509150611c5d87838387611c69565b92505050949350505050565b60608315611ccb576000835103611cc357611c8385611cde565b611cc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb99061288a565b60405180910390fd5b5b829050611cd6565b611cd58383611d01565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082511115611d145781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4891906128ff565b60405180910390fd5b6000819050919050565b611d6481611d51565b82525050565b6000602082019050611d7f6000830184611d5b565b92915050565b600080fd5b60006fffffffffffffffffffffffffffffffff82169050919050565b611daf81611d8a565b8114611dba57600080fd5b50565b600081359050611dcc81611da6565b92915050565b600067ffffffffffffffff82169050919050565b611def81611dd2565b8114611dfa57600080fd5b50565b600081359050611e0c81611de6565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611e3d82611e12565b9050919050565b611e4d81611e32565b8114611e5857600080fd5b50565b600081359050611e6a81611e44565b92915050565b60008060008060808587031215611e8a57611e89611d85565b5b6000611e9887828801611dbd565b9450506020611ea987828801611dbd565b9350506040611eba87828801611dfd565b9250506060611ecb87828801611e5b565b91505092959194509250565b6000611ee282611e32565b9050919050565b611ef281611ed7565b8114611efd57600080fd5b50565b600081359050611f0f81611ee9565b92915050565b600060208284031215611f2b57611f2a611d85565b5b6000611f3984828501611f00565b91505092915050565b611f4b81611d51565b8114611f5657600080fd5b50565b600081359050611f6881611f42565b92915050565b600060208284031215611f8457611f83611d85565b5b6000611f9284828501611f59565b91505092915050565b6000819050919050565b6000611fc0611fbb611fb684611e12565b611f9b565b611e12565b9050919050565b6000611fd282611fa5565b9050919050565b6000611fe482611fc7565b9050919050565b611ff481611fd9565b82525050565b600060208201905061200f6000830184611feb565b92915050565b61201e81611e32565b82525050565b60006020820190506120396000830184612015565b92915050565b61204881611d8a565b82525050565b61205781611dd2565b82525050565b60008115159050919050565b6120728161205d565b82525050565b600060e08201905061208d600083018a61203f565b61209a602083018961203f565b6120a76040830188612015565b6120b4606083018761204e565b6120c16080830186612069565b6120ce60a0830185612069565b6120db60c0830184612015565b98975050505050505050565b60006020820190506120fc6000830184612069565b92915050565b60006020828403121561211857612117611d85565b5b600061212684828501611e5b565b91505092915050565b6000606082019050612144600083018661203f565b612151602083018561203f565b61215e604083018461204e565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006121a082611d51565b91506121ab83611d51565b92508282019050808211156121c3576121c2612166565b5b92915050565b60006080820190506121de600083018761203f565b6121eb602083018661203f565b6121f8604083018561204e565b6122056060830184612015565b95945050505050565b60006040820190506122236000830185612015565b6122306020830184611d5b565b9392505050565b600061224282611d51565b915061224d83611d51565b925082820390508181111561226557612264612166565b5b92915050565b600061227682611d51565b915061228183611d51565b925082820261228f81611d51565b915082820484148315176122a6576122a5612166565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006122e782611d51565b91506122f283611d51565b925082612302576123016122ad565b5b828204905092915050565b600081905092915050565b50565b600061232860008361230d565b915061233382612318565b600082019050919050565b60006123498261231b565b9150819050919050565b600082825260208201905092915050565b7f5061796d656e7420746f6b656e206e6f7420737570706f727465640000000000600082015250565b600061239a601b83612353565b91506123a582612364565b602082019050919050565b600060208201905081810360008301526123c98161238d565b9050919050565b60006123eb6123e66123e184611d8a565b611f9b565b611d51565b9050919050565b6123fb816123d0565b82525050565b60006040820190506124166000830185612015565b61242360208301846123f2565b9392505050565b6124338161205d565b811461243e57600080fd5b50565b6000815190506124508161242a565b92915050565b60006020828403121561246c5761246b611d85565b5b600061247a84828501612441565b91505092915050565b6000606082019050612498600083018661203f565b6124a5602083018561203f565b6124b26040830184612015565b949350505050565b6000815190506124c981611f42565b92915050565b6000602082840312156124e5576124e4611d85565b5b60006124f3848285016124ba565b91505092915050565b7f4e6f2065786365737320746f6b656e7320746f20776974686472617700000000600082015250565b6000612532601c83612353565b915061253d826124fc565b602082019050919050565b6000602082019050818103600083015261256181612525565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006125c4602683612353565b91506125cf82612568565b604082019050919050565b600060208201905081810360008301526125f3816125b7565b9050919050565b600060608201905061260f6000830186612015565b61261c6020830185612015565b6126296040830184611d5b565b949350505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612667602083612353565b915061267282612631565b602082019050919050565b600060208201905081810360008301526126968161265a565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006126f9602a83612353565b91506127048261269d565b604082019050919050565b60006020820190508181036000830152612728816126ec565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061278b602683612353565b91506127968261272f565b604082019050919050565b600060208201905081810360008301526127ba8161277e565b9050919050565b600081519050919050565b60005b838110156127ea5780820151818401526020810190506127cf565b60008484015250505050565b6000612801826127c1565b61280b818561230d565b935061281b8185602086016127cc565b80840191505092915050565b600061283382846127f6565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000612874601d83612353565b915061287f8261283e565b602082019050919050565b600060208201905081810360008301526128a381612867565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b60006128d1826128aa565b6128db8185612353565b93506128eb8185602086016127cc565b6128f4816128b5565b840191505092915050565b6000602082019050818103600083015261291981846128c6565b90509291505056fea264697066735822122085b53ce8859d304b163b6f047eeeeabcd8f88fdbbaefb9ba26dc64ad6f2c66b964736f6c63430008130033000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad85
Deployed Bytecode
0x6080604052600436106100fe5760003560e01c806385fa292f11610095578063a512542111610064578063a5125421146102c8578063a85c38ef146102f1578063c3b88b4214610334578063e086e5ec14610371578063f2fde38b14610388576100fe565b806385fa292f1461021e57806389476069146102495780638da5cb5b146102725780639e1a4d191461029d576100fe565b8063514fcac7116100d1578063514fcac7146101ab57806367b830ad146101d457806369520d11146101f0578063715018a614610207576100fe565b80632a58b330146101035780632d11c58a1461012e5780633391f7ae146101595780634a7dc8e014610182575b600080fd5b34801561010f57600080fd5b506101186103b1565b6040516101259190611d6a565b60405180910390f35b34801561013a57600080fd5b506101436103b7565b6040516101509190611d6a565b60405180910390f35b34801561016557600080fd5b50610180600480360381019061017b9190611e70565b6103bc565b005b34801561018e57600080fd5b506101a960048036038101906101a49190611f15565b610769565b005b3480156101b757600080fd5b506101d260048036038101906101cd9190611f6e565b6108d6565b005b6101ee60048036038101906101e99190611f6e565b610acd565b005b3480156101fc57600080fd5b506102056111f2565b005b34801561021357600080fd5b5061021c61133c565b005b34801561022a57600080fd5b50610233611350565b6040516102409190611ffa565b60405180910390f35b34801561025557600080fd5b50610270600480360381019061026b9190611f15565b611374565b005b34801561027e57600080fd5b506102876114bd565b6040516102949190612024565b60405180910390f35b3480156102a957600080fd5b506102b26114e6565b6040516102bf9190611d6a565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea9190611f15565b6114ec565b005b3480156102fd57600080fd5b5061031860048036038101906103139190611f6e565b611617565b60405161032b9796959493929190612078565b60405180910390f35b34801561034057600080fd5b5061035b60048036038101906103569190611f15565b6116ff565b60405161036891906120e7565b60405180910390f35b34801561037d57600080fd5b5061038661171f565b005b34801561039457600080fd5b506103af60048036038101906103aa9190612102565b6117e0565b005b60035481565b60fa81565b428267ffffffffffffffff161115806103e757506000846fffffffffffffffffffffffffffffffff16145b8061040457506000836fffffffffffffffffffffffffffffffff16145b1561044a578383836040517f60d52c970000000000000000000000000000000000000000000000000000000081526004016104419392919061212f565b60405180910390fd5b6104a93330866fffffffffffffffffffffffffffffffff167f000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad8573ffffffffffffffffffffffffffffffffffffffff16611863909392919063ffffffff16565b6000600360008154809291906001019190505590506040518060e00160405280866fffffffffffffffffffffffffffffffff168152602001856fffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018467ffffffffffffffff1681526020016000151581526020016000151581526020018373ffffffffffffffffffffffffffffffffffffffff168152506002600083815260200190815260200160002060008201518160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060208201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550608082015181600101601c6101000a81548160ff02191690831515021790555060a082015181600101601d6101000a81548160ff02191690831515021790555060c08201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050846fffffffffffffffffffffffffffffffff16600460008282546107069190612195565b925050819055503373ffffffffffffffffffffffffffffffffffffffff16817f386dfb9826a08f44cc0a3c635620df8a0db8688f8bfec037912f91ff748101d18787878760405161075a94939291906121c9565b60405180910390a35050505050565b6107716118ec565b7f000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad8573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806107f75750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b1561083957806040517f4e34486d0000000000000000000000000000000000000000000000000000000081526004016108309190611ffa565b60405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fa317c10673baf4f03b3c1041bd5ddbb537d0333a86fec3607c75f9dbb630f48f60405160405180910390a250565b60006002600083815260200190815260200160002090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158061095a575080600101601d9054906101000a900460ff165b80610973575080600101601c9054906101000a900460ff165b156109b75733826040517f16282e180000000000000000000000000000000000000000000000000000000081526004016109ae92919061220e565b60405180910390fd5b600181600101601d6101000a81548160ff021916908315150217905550610a51338260000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff167f000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad8573ffffffffffffffffffffffffffffffffffffffff1661196a9092919063ffffffff16565b8060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1660046000828254610a959190612237565b92505081905550817f61b9399f2f0f32ca39ce8d7be32caed5ec22fe07a6daba3a467ed479ec60658260405160405180910390a25050565b600060026000838152602001908152602001600020905080600101601c9054906101000a900460ff1680610b0f575080600101601d9054906101000a900460ff165b80610b3b5750428160010160149054906101000a900467ffffffffffffffff1667ffffffffffffffff16105b15610b7f5733826040517fd1bada51000000000000000000000000000000000000000000000000000000008152600401610b7692919061220e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610c1157508060000160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff163414155b15610c555733826040517fd1bada51000000000000000000000000000000000000000000000000000000008152600401610c4c92919061220e565b60405180910390fd5b600181600101601c6101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610df857600061271060fa34610cdc919061226b565b610ce691906122dc565b905060008134610cf69190612237565b905060008360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051610d429061233e565b60006040518083038185875af1925050503d8060008114610d7f576040519150601f19603f3d011682016040523d82523d6000602084013e610d84565b606091505b5050905080610df0578360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040517fd1bada51000000000000000000000000000000000000000000000000000000008152600401610de792919061220e565b60405180910390fd5b505050610ff2565b600160008260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fb65760008160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600061271060fa8460000160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16610edb919061226b565b610ee591906122dc565b90506000818460000160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16610f279190612237565b9050610f5d33610f356114bd565b848673ffffffffffffffffffffffffffffffffffffffff16611863909392919063ffffffff16565b610fae338560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838673ffffffffffffffffffffffffffffffffffffffff16611863909392919063ffffffff16565b505050610ff1565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe8906123b0565b60405180910390fd5b5b7f000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad8573ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338360000160009054906101000a90046fffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b815260040161106d929190612401565b6020604051808303816000875af115801561108c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b09190612456565b508060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16600460008282546110f59190612237565b925050819055508060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16837f6ebd11fb40999aadf46fabf69c12b691307de64334c89434106b7f27b93379758460000160009054906101000a90046fffffffffffffffffffffffffffffffff168560000160109054906101000a90046fffffffffffffffffffffffffffffffff168660020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516111e693929190612483565b60405180910390a45050565b6111fa6118ec565b60007f000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad8573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016112559190612024565b602060405180830381865afa158015611272573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129691906124cf565b90506000600454826112a89190612237565b9050600081116112ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e490612548565b60405180910390fd5b61133833827f000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad8573ffffffffffffffffffffffffffffffffffffffff1661196a9092919063ffffffff16565b5050565b6113446118ec565b61134e60006119f0565b565b7f000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad8581565b61137c6118ec565b7f000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad8573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361141057336004546040517fa226991200000000000000000000000000000000000000000000000000000000815260040161140792919061220e565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161144b9190612024565b602060405180830381865afa158015611468573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148c91906124cf565b90506114b933828473ffffffffffffffffffffffffffffffffffffffff1661196a9092919063ffffffff16565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60045481565b6114f46118ec565b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661158257806040517f4e34486d0000000000000000000000000000000000000000000000000000000081526004016115799190611ffa565b60405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff02191690558073ffffffffffffffffffffffffffffffffffffffff167f85a3e72f8dd6db3794f93109c3c5f5b79d6112f6979431c45f98b26134b42af260405160405180910390a250565b60026020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900467ffffffffffffffff169080600101601c9054906101000a900460ff169080600101601d9054906101000a900460ff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905087565b60016020528060005260406000206000915054906101000a900460ff1681565b6117276118ec565b600047905060003373ffffffffffffffffffffffffffffffffffffffff16826040516117529061233e565b60006040518083038185875af1925050503d806000811461178f576040519150601f19603f3d011682016040523d82523d6000602084013e611794565b606091505b50509050806117dc5733826040517fa22699120000000000000000000000000000000000000000000000000000000081526004016117d392919061220e565b60405180910390fd5b5050565b6117e86118ec565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184e906125da565b60405180910390fd5b611860816119f0565b50565b6118e6846323b872dd60e01b858585604051602401611884939291906125fa565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611ab4565b50505050565b6118f4611b7c565b73ffffffffffffffffffffffffffffffffffffffff166119126114bd565b73ffffffffffffffffffffffffffffffffffffffff1614611968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195f9061267d565b60405180910390fd5b565b6119eb8363a9059cbb60e01b848460405160240161198992919061220e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611ab4565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000611b16826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611b849092919063ffffffff16565b9050600081511480611b38575080806020019051810190611b379190612456565b5b611b77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6e9061270f565b60405180910390fd5b505050565b600033905090565b6060611b938484600085611b9c565b90509392505050565b606082471015611be1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd8906127a1565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611c0a9190612827565b60006040518083038185875af1925050503d8060008114611c47576040519150601f19603f3d011682016040523d82523d6000602084013e611c4c565b606091505b5091509150611c5d87838387611c69565b92505050949350505050565b60608315611ccb576000835103611cc357611c8385611cde565b611cc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb99061288a565b60405180910390fd5b5b829050611cd6565b611cd58383611d01565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082511115611d145781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4891906128ff565b60405180910390fd5b6000819050919050565b611d6481611d51565b82525050565b6000602082019050611d7f6000830184611d5b565b92915050565b600080fd5b60006fffffffffffffffffffffffffffffffff82169050919050565b611daf81611d8a565b8114611dba57600080fd5b50565b600081359050611dcc81611da6565b92915050565b600067ffffffffffffffff82169050919050565b611def81611dd2565b8114611dfa57600080fd5b50565b600081359050611e0c81611de6565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611e3d82611e12565b9050919050565b611e4d81611e32565b8114611e5857600080fd5b50565b600081359050611e6a81611e44565b92915050565b60008060008060808587031215611e8a57611e89611d85565b5b6000611e9887828801611dbd565b9450506020611ea987828801611dbd565b9350506040611eba87828801611dfd565b9250506060611ecb87828801611e5b565b91505092959194509250565b6000611ee282611e32565b9050919050565b611ef281611ed7565b8114611efd57600080fd5b50565b600081359050611f0f81611ee9565b92915050565b600060208284031215611f2b57611f2a611d85565b5b6000611f3984828501611f00565b91505092915050565b611f4b81611d51565b8114611f5657600080fd5b50565b600081359050611f6881611f42565b92915050565b600060208284031215611f8457611f83611d85565b5b6000611f9284828501611f59565b91505092915050565b6000819050919050565b6000611fc0611fbb611fb684611e12565b611f9b565b611e12565b9050919050565b6000611fd282611fa5565b9050919050565b6000611fe482611fc7565b9050919050565b611ff481611fd9565b82525050565b600060208201905061200f6000830184611feb565b92915050565b61201e81611e32565b82525050565b60006020820190506120396000830184612015565b92915050565b61204881611d8a565b82525050565b61205781611dd2565b82525050565b60008115159050919050565b6120728161205d565b82525050565b600060e08201905061208d600083018a61203f565b61209a602083018961203f565b6120a76040830188612015565b6120b4606083018761204e565b6120c16080830186612069565b6120ce60a0830185612069565b6120db60c0830184612015565b98975050505050505050565b60006020820190506120fc6000830184612069565b92915050565b60006020828403121561211857612117611d85565b5b600061212684828501611e5b565b91505092915050565b6000606082019050612144600083018661203f565b612151602083018561203f565b61215e604083018461204e565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006121a082611d51565b91506121ab83611d51565b92508282019050808211156121c3576121c2612166565b5b92915050565b60006080820190506121de600083018761203f565b6121eb602083018661203f565b6121f8604083018561204e565b6122056060830184612015565b95945050505050565b60006040820190506122236000830185612015565b6122306020830184611d5b565b9392505050565b600061224282611d51565b915061224d83611d51565b925082820390508181111561226557612264612166565b5b92915050565b600061227682611d51565b915061228183611d51565b925082820261228f81611d51565b915082820484148315176122a6576122a5612166565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006122e782611d51565b91506122f283611d51565b925082612302576123016122ad565b5b828204905092915050565b600081905092915050565b50565b600061232860008361230d565b915061233382612318565b600082019050919050565b60006123498261231b565b9150819050919050565b600082825260208201905092915050565b7f5061796d656e7420746f6b656e206e6f7420737570706f727465640000000000600082015250565b600061239a601b83612353565b91506123a582612364565b602082019050919050565b600060208201905081810360008301526123c98161238d565b9050919050565b60006123eb6123e66123e184611d8a565b611f9b565b611d51565b9050919050565b6123fb816123d0565b82525050565b60006040820190506124166000830185612015565b61242360208301846123f2565b9392505050565b6124338161205d565b811461243e57600080fd5b50565b6000815190506124508161242a565b92915050565b60006020828403121561246c5761246b611d85565b5b600061247a84828501612441565b91505092915050565b6000606082019050612498600083018661203f565b6124a5602083018561203f565b6124b26040830184612015565b949350505050565b6000815190506124c981611f42565b92915050565b6000602082840312156124e5576124e4611d85565b5b60006124f3848285016124ba565b91505092915050565b7f4e6f2065786365737320746f6b656e7320746f20776974686472617700000000600082015250565b6000612532601c83612353565b915061253d826124fc565b602082019050919050565b6000602082019050818103600083015261256181612525565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006125c4602683612353565b91506125cf82612568565b604082019050919050565b600060208201905081810360008301526125f3816125b7565b9050919050565b600060608201905061260f6000830186612015565b61261c6020830185612015565b6126296040830184611d5b565b949350505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612667602083612353565b915061267282612631565b602082019050919050565b600060208201905081810360008301526126968161265a565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006126f9602a83612353565b91506127048261269d565b604082019050919050565b60006020820190508181036000830152612728816126ec565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061278b602683612353565b91506127968261272f565b604082019050919050565b600060208201905081810360008301526127ba8161277e565b9050919050565b600081519050919050565b60005b838110156127ea5780820151818401526020810190506127cf565b60008484015250505050565b6000612801826127c1565b61280b818561230d565b935061281b8185602086016127cc565b80840191505092915050565b600061283382846127f6565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000612874601d83612353565b915061287f8261283e565b602082019050919050565b600060208201905081810360008301526128a381612867565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b60006128d1826128aa565b6128db8185612353565b93506128eb8185602086016127cc565b6128f4816128b5565b840191505092915050565b6000602082019050818103600083015261291981846128c6565b90509291505056fea264697066735822122085b53ce8859d304b163b6f047eeeeabcd8f88fdbbaefb9ba26dc64ad6f2c66b964736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad85
-----Decoded View---------------
Arg [0] : _allowedToken (address): 0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000aea46a60368a7bd060eec7df8cba43b7ef41ad85
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.